/* pibiCo Brand Stylesheet - Mailbox Style */

:root {
    --primary-color: #4682b4;
    --secondary-color: #6a9bc3;
    --accent-color: #2c5171;
    --text-color: #333;
    --text-light: #666;
    --bg-gradient: linear-gradient(135deg, #2c5171 0%, #4682b4 50%, #6a9bc3 100%);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

/* App Layout */
.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 0 1.5rem;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--accent-color);
}

.app-header-title svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary-color);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-header-btn {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.app-header-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-color);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-header-btn:hover {
    background: rgba(70, 130, 180, 0.1);
}

.app-header-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.app-header-link svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-header-link:hover {
    background: rgba(70, 130, 180, 0.1);
    color: var(--primary-color);
}

/* Main Content */
.app-main {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

/* Footer */
.app-footer {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    padding: 0 1.5rem;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.app-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.app-footer a:hover {
    text-decoration: underline;
}

.footer-sep {
    color: #ccc;
}

/* Cards */
.pibico-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Inputs */
.pibico-input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
    background: white;
    color: var(--text-color);
    transition: all 0.2s;
    line-height: 1.4;
}

.pibico-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(70, 130, 180, 0.1);
}

.pibico-input:disabled {
    background: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
}

/* Buttons */
.pibico-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.4;
}

.pibico-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pibico-btn-primary {
    background: var(--primary-color);
    color: white;
}

.pibico-btn-primary:hover:not(:disabled) {
    background: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(70, 130, 180, 0.3);
}

.pibico-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pibico-btn-icon {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 0.5rem;
    min-width: auto;
}

.pibico-btn-icon:hover:not(:disabled) {
    background: rgba(70, 130, 180, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Status indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    transition: all 0.3s ease;
}

.status-indicator.connecting .status-dot {
    background: #fbbf24;
    animation: pulse 1.5s ease-in-out infinite;
}

.status-indicator.connected .status-dot {
    background: #10b981;
}

.status-indicator.disconnected .status-dot {
    background: #ef4444;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Utility classes */
.pibico-flex {
    display: flex;
}

.pibico-items-center {
    align-items: center;
}

.pibico-justify-between {
    justify-content: space-between;
}

.pibico-gap-sm {
    gap: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .app-header {
        padding: 0 1rem;
    }

    .app-header-title {
        font-size: 1rem;
    }

    .app-main {
        padding: 0.75rem;
    }

    .app-footer {
        font-size: 0.7rem;
        padding: 0 1rem;
    }
}
