/* ============================================
   SiteSmith — Dashboard Styles
   ============================================ */

/* ---- Layout ---- */
.dash-wrap {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px;
    background: #0B1120;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.sidebar-header .logo-text {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: -0.02em;
}
.sidebar-header .logo-text strong {
    font-weight: 800;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    border-left: 3px solid transparent;
}

.sidebar-nav-item:hover {
    color: var(--text);
    background: rgba(249, 115, 22, 0.05);
}

.sidebar-nav-item.active {
    color: var(--orange);
    background: rgba(249, 115, 22, 0.08);
    border-left-color: var(--orange);
}

.sidebar-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-nav-item.active svg {
    opacity: 1;
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 20px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), #FB923C);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.sidebar-user-info {
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    font-size: 0.7rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Main Content ---- */
.dash-main {
    flex: 1;
    margin-left: 240px;
    min-height: 100vh;
    background: var(--dark-bg);
}

.dash-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(9, 14, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.dash-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-topbar h1 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.dash-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), #FB923C);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
}

.hamburger-btn {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    cursor: pointer;
    color: var(--text-muted);
}
.hamburger-btn:hover {
    color: var(--text);
    border-color: var(--orange);
}

.dash-content {
    padding: 32px;
}

/* ---- View Sections ---- */
.dash-view {
    display: none;
    animation: fadeIn 0.25s ease;
}
.dash-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Stats Cards ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}
.stat-card:hover {
    border-color: rgba(148, 163, 184, 0.2);
    transform: translateY(-1px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
}
.stat-card.orange::before { background: var(--orange); }
.stat-card.cyan::before { background: var(--cyan); }
.stat-card.green::before { background: var(--green); }
.stat-card.purple::before { background: var(--purple); }
.stat-card.red::before { background: var(--red); }

.stat-card-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-card-value {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

.stat-card-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 4px;
}

/* Clickable Stat Cards */
.stat-card-link {
    cursor: pointer;
}
.stat-card-link:hover {
    border-color: var(--orange);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.stat-card-link.orange:hover { border-color: var(--orange); }
.stat-card-link.cyan:hover { border-color: var(--cyan); }
.stat-card-link.green:hover { border-color: var(--green); }
.stat-card-link.purple:hover { border-color: var(--purple); }
.stat-card-link.red:hover { border-color: var(--red); }
.stat-card-arrow {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--text-dim);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s, transform 0.2s;
}
.stat-card-link:hover .stat-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ---- Section Titles ---- */
.dash-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dash-section-title h2 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0;
}

/* ---- Data Tables ---- */
.dash-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.dash-table thead th {
    background: #0B1120;
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.dash-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.dash-table tbody tr:last-child {
    border-bottom: none;
}
.dash-table tbody tr:hover {
    background: rgba(249, 115, 22, 0.03);
}
.dash-table tbody tr.clickable {
    cursor: pointer;
}

.dash-table td {
    padding: 12px 16px;
    color: var(--text-muted);
    vertical-align: middle;
}

.dash-table .text-main {
    color: var(--text);
    font-weight: 500;
}

.dash-table .text-mono {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.table-empty {
    padding: 48px 16px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.table-empty svg {
    display: block;
    margin: 0 auto 12px;
    opacity: 0.3;
}

/* ---- Status Indicators ---- */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}
.status-dot.up, .status-dot.active { background: var(--green); box-shadow: 0 0 6px rgba(16, 185, 129, 0.5); }
.status-dot.down, .status-dot.revoked { background: var(--red); box-shadow: 0 0 6px rgba(239, 68, 68, 0.5); }
.status-dot.unknown { background: var(--text-dim); }
.status-dot.paused, .status-dot.partial { background: var(--orange); box-shadow: 0 0 6px rgba(249, 115, 22, 0.5); }

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.status-badge.up { background: rgba(16, 185, 129, 0.12); color: var(--green); }
.status-badge.down { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.status-badge.active { background: rgba(16, 185, 129, 0.12); color: var(--green); }
.status-badge.inactive { background: rgba(148, 163, 184, 0.12); color: var(--text-dim); }
.status-badge.revoked { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.status-badge.expired { background: rgba(249, 115, 22, 0.12); color: var(--orange); }

/* ---- Uptime Bar ---- */
.uptime-bar {
    display: flex;
    gap: 1px;
    height: 28px;
    border-radius: 4px;
    overflow: hidden;
}

.uptime-bar-segment {
    flex: 1;
    border-radius: 2px;
    transition: opacity 0.15s;
    position: relative;
}
.uptime-bar-segment:hover {
    opacity: 0.8;
}
.uptime-bar-segment.up, .uptime-bar-segment.active { background: var(--green); }
.uptime-bar-segment.down, .uptime-bar-segment.revoked { background: var(--red); }
.uptime-bar-segment.partial, .uptime-bar-segment.expired { background: var(--orange); }
.uptime-bar-segment.none, .uptime-bar-segment.unknown { background: #1E293B; }

.uptime-bar-segment[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #0B1120;
    color: var(--text);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    border: 1px solid var(--border);
}

.uptime-legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 4px;
}

/* ---- Trends ---- */
.trends-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .trends-grid { grid-template-columns: 1fr; }
}

.trend-card {
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.trend-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 60px;
}

.trend-bar {
    flex: 1;
    background: var(--orange);
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    position: relative;
    transition: opacity 0.15s;
}

.trend-bar:hover {
    opacity: 0.7;
}

.trend-bar[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #0B1120;
    color: var(--text);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    border: 1px solid var(--border);
}

/* ---- Monitor Detail ---- */
.monitor-detail { margin-bottom: 24px; }
.monitor-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.monitor-detail-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}
.monitor-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.monitor-stat {
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
}
.monitor-stat-val {
    font-size: 1.3rem;
    font-weight: 700;
}
.monitor-stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 2px;
}
@media (max-width: 768px) {
    .monitor-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Modals ---- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 500;
    align-items: center;
    justify-content: center;
}
.modal-overlay.open {
    display: flex;
}

.modal-dialog {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s;
}
.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ---- Forms ---- */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--dark-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-glow);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-dim);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%2394A3B8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ---- Buttons (dashboard specific) ---- */
.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-ghost {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-family: inherit;
    transition: color 0.15s, background 0.15s;
}
.btn-ghost:hover {
    color: var(--text);
    background: rgba(148, 163, 184, 0.08);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}
.btn-icon:hover {
    color: var(--text);
    border-color: var(--orange);
}

.action-btns {
    display: flex;
    gap: 4px;
}

/* ---- Copy Button ---- */
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}
.copy-btn:hover {
    border-color: var(--orange);
    color: var(--orange);
}
.copy-btn.copied {
    border-color: var(--green);
    color: var(--green);
}

/* ---- Monitor Detail ---- */
.monitor-detail {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.monitor-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.monitor-detail-header h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.monitor-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.monitor-stat {
    background: var(--dark-bg);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}

.monitor-stat-val {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

.monitor-stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

/* ---- Webhook Logs ---- */
.log-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.log-entry:last-child { border-bottom: none; }

.log-time {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.75rem;
    color: var(--text-dim);
    white-space: nowrap;
    flex-shrink: 0;
}

.log-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}
.log-status.ok { background: rgba(16, 185, 129, 0.12); color: var(--green); }
.log-status.err { background: rgba(239, 68, 68, 0.12); color: var(--red); }

.log-msg {
    color: var(--text-muted);
    flex: 1;
    word-break: break-all;
}

/* ---- Settings ---- */
.settings-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.settings-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.plan-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--dark-bg);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.plan-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.plan-tier {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---- Notifications ---- */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    font-size: 0.85rem;
    color: var(--text);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    z-index: 600;
    animation: toastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }

    .dash-main {
        margin-left: 0;
    }

    .hamburger-btn {
        display: flex;
    }

    .dash-topbar {
        padding: 12px 16px;
    }

    .dash-content {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card-value {
        font-size: 1.4rem;
    }

    .dash-table-wrap {
        overflow-x: auto;
    }

    .dash-table {
        min-width: 600px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-dialog {
        width: 95%;
        max-height: 90vh;
    }

    .monitor-stats {
        grid-template-columns: 1fr 1fr;
    }

    .plan-card {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Sidebar Overlay (mobile) ---- */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
}
.sidebar-overlay.open {
    display: block;
}

/* ---- Loading Skeleton ---- */
.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, rgba(148, 163, 184, 0.08) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- Login Page ---- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(249, 115, 22, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
    z-index: 1;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
    text-decoration: none;
    color: var(--text);
}

.auth-logo .logo-text {
    font-size: 1.4rem;
    font-weight: 300;
}
.auth-logo .logo-text strong {
    font-weight: 800;
}

.auth-tabs {
    display: flex;
    background: var(--dark-bg);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 28px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}
.auth-tab.active {
    background: var(--surface-2);
    color: var(--text);
}

.auth-form {
    display: none;
}
.auth-form.active {
    display: block;
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--red);
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: none;
}
.auth-error.visible {
    display: block;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-dim);
}
.auth-footer a {
    color: var(--orange);
    text-decoration: none;
    font-weight: 500;
}
.auth-footer a:hover {
    text-decoration: underline;
}

/* ---- Status Page (Public) ---- */
.status-page {
    max-width: 680px;
    margin: 0 auto;
    padding: 48px 24px;
}

.status-header {
    text-align: center;
    margin-bottom: 40px;
}

.status-header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.status-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.status-overall {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 32px;
    font-size: 1rem;
    font-weight: 600;
}
.status-overall.operational {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--green);
}
.status-overall.partial {
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.2);
    color: var(--orange);
}
.status-overall.major {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--red);
}

.status-overall-icon {
    width: 24px;
    height: 24px;
}

.status-services {
    margin-bottom: 40px;
}

.status-service {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
}

.status-service-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.status-service-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
}

.status-service-uptime {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.status-uptime-bar {
    display: flex;
    gap: 1px;
    height: 20px;
    border-radius: 3px;
    overflow: hidden;
}

.status-uptime-segment {
    flex: 1;
    border-radius: 1px;
    position: relative;
}
.status-uptime-segment.up { background: var(--green); }
.status-uptime-segment.down { background: var(--red); }
.status-uptime-segment.partial { background: var(--orange); }
.status-uptime-segment.none { background: #1E293B; }

.status-uptime-segment:hover {
    opacity: 0.8;
}
.status-uptime-segment[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #0B1120;
    color: var(--text);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 10;
    border: 1px solid var(--border);
}

.status-uptime-legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.status-footer {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.8rem;
}

.status-footer a {
    color: var(--orange);
    text-decoration: none;
    font-weight: 500;
}
.status-footer a:hover {
    text-decoration: underline;
}

.status-loading {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-dim);
}

.status-error {
    text-align: center;
    padding: 80px 24px;
    color: var(--red);
}

/* ---- Screenshots ---- */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.screenshot-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}
.screenshot-card:hover {
    border-color: var(--orange);
}

.screenshot-preview {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    cursor: pointer;
    background: #0F172A;
}
.screenshot-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.screenshot-info {
    padding: 12px 16px;
}

.screenshot-url {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.screenshot-meta {
    font-size: 0.7rem;
    color: var(--text-dim);
}

@media (max-width: 480px) {
    .screenshots-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Pagination ---- */
.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 0 4px;
}

.pagination-info {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.pagination-controls .btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
}
