:root {
    --ocean-light: #18b7be;
    --ocean-medium: #178ca4;
    --ocean-dark: #05070a;
    --surface-page: #0a0f14;
    --surface-panel: #141c24;
    --surface-panel-alt: #1b2631;
    --text-primary: #ffffff;
    --text-secondary: #e1e8ed;
    --text-muted: #8da4b3;
    --border-hairline: rgba(225, 232, 237, 0.12);
    --border-subtle: rgba(225, 232, 237, 0.20);
    --state-ok: #10b981;
    --state-warn: #f59e0b;
    --state-down: #ef4444;
    --state-info: #60a5fa;
    --shadow-card: 0 10px 24px rgba(0, 0, 0, 0.34);
    --shadow-soft: 0 14px 30px rgba(0, 0, 0, 0.38);
    --radius-md: 14px;
    --radius-lg: 18px;
    --content-max-width: 1180px;
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: radial-gradient(circle at 88% -8%, rgba(24, 183, 190, 0.16), transparent 42%), var(--surface-page);
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 72px;
    border-bottom: 1px solid var(--border-hairline);
    background: rgba(10, 15, 20, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-container {
    height: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    text-decoration: none;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.brand-mark {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--ocean-light);
    box-shadow: 0 0 0 6px rgba(24, 183, 190, 0.15);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-size: 14px;
    color: var(--text-secondary);
}

.btn-ghost,
.btn-primary {
    border: none;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-ghost {
    height: 40px;
    padding: 0 14px;
    color: var(--text-primary);
    background: rgba(24, 183, 190, 0.08);
    border: 1px solid rgba(24, 183, 190, 0.32);
}

.btn-ghost:hover {
    background: rgba(24, 183, 190, 0.16);
}

.btn-primary {
    height: 44px;
    padding: 0 16px;
    background: var(--ocean-light);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(24, 183, 190, 0.28);
}

.btn-primary:hover {
    background: var(--ocean-medium);
    transform: translateY(-1px);
}

.btn-full {
    width: 100%;
}

.main-content {
    min-height: calc(100vh - 72px - 68px);
}

.site-footer {
    border-top: 1px solid var(--border-hairline);
    background: rgba(5, 7, 10, 0.75);
}

.footer-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 22px 28px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 13px;
}

.auth-content {
    min-height: calc(100vh - 72px - 68px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 24px;
}

.auth-container {
    width: 100%;
    max-width: 460px;
}

.auth-card {
    background: var(--surface-panel);
    border: 1px solid var(--border-hairline);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    padding: 36px 30px;
}

.auth-title {
    margin: 0 0 8px;
    text-align: center;
    font-size: 28px;
}

.auth-subtitle {
    margin: 0 0 28px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
}

.form-input {
    height: 44px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: var(--surface-page);
    color: var(--text-primary);
    padding: 10px 12px;
    font-family: var(--font-sans);
    font-size: 15px;
}

.form-input:focus {
    outline: none;
    border-color: var(--ocean-light);
    box-shadow: 0 0 0 4px rgba(24, 183, 190, 0.2);
}

.alert {
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

.dashboard-section {
    padding: 42px 24px 56px;
}

.dashboard-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-title {
    margin: 0 0 8px;
    font-size: 36px;
    letter-spacing: -0.02em;
}

.dashboard-subtitle {
    margin: 0 0 10px;
    color: var(--text-secondary);
    font-size: 16px;
}

.dashboard-meta {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.metric-card,
.panel-card {
    background: linear-gradient(145deg, rgba(20, 28, 36, 0.95), rgba(10, 15, 20, 0.98));
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 22px;
}

.metric-card {
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: '';
    position: absolute;
    top: -32px;
    right: -32px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(24, 183, 190, 0.2), transparent 70%);
}

.metric-title {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.metric-value {
    margin: 0;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ocean-light);
}

.metric-note {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

.metric-note code {
    color: var(--text-secondary);
}

.panel-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.panel-wide {
    margin-top: 18px;
}

.panel-head {
    margin-bottom: 16px;
}

.panel-title {
    margin: 0;
    font-size: 20px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.status-card {
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    background: rgba(5, 7, 10, 0.55);
    padding: 13px;
}

.status-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-title {
    margin: 0;
    font-size: 15px;
}

.status-summary {
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.status-detail {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.state-ok .status-dot {
    background: var(--state-ok);
}

.state-warn .status-dot {
    background: var(--state-warn);
}

.state-down .status-dot {
    background: var(--state-down);
}

.state-info .status-dot {
    background: var(--state-info);
}

.state-ok {
    border-color: rgba(16, 185, 129, 0.35);
}

.state-warn {
    border-color: rgba(245, 158, 11, 0.35);
}

.state-down {
    border-color: rgba(239, 68, 68, 0.35);
}

.state-info {
    border-color: rgba(96, 165, 250, 0.35);
}

.whatsapp-status {
    display: grid;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.whatsapp-status p {
    margin: 0;
}

.whatsapp-status strong {
    color: var(--text-primary);
}

.whatsapp-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
}

.whatsapp-pill.on {
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.whatsapp-pill.off {
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.34);
    color: #fbbf24;
}

.progress-list {
    display: grid;
    gap: 10px;
}

.progress-row {
    display: grid;
    gap: 7px;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.progress-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(141, 164, 179, 0.22);
}

.progress-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #18b7be 0%, #2dd4bf 100%);
}

.progress-fill.secondary {
    background: linear-gradient(90deg, #60a5fa 0%, #18b7be 100%);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.detail-item {
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    background: rgba(10, 15, 20, 0.56);
    padding: 12px;
}

.detail-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 7px;
}

.detail-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

@media (max-width: 1080px) {
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .panel-grid {
        grid-template-columns: 1fr;
    }

    .details-grid {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    }
}

@media (max-width: 640px) {
    .site-header {
        height: 64px;
    }

    .header-container,
    .footer-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .header-right .user-name {
        display: none;
    }

    .main-content {
        min-height: calc(100vh - 64px - 94px);
    }

    .dashboard-section {
        padding: 24px 14px 40px;
    }

    .dashboard-title {
        font-size: 28px;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
        align-items: flex-start;
    }
}
