/* === AppHosting Dashboard === */

:root {
    --sidebar-bg: #111827;
    --sidebar-text: #9ca3af;
    --sidebar-text-hover: #f3f4f6;
    --sidebar-active-bg: rgba(255, 255, 255, 0.08);
    --content-bg: #f9fafb;
    --card-bg: #fff;
    --text: #111827;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --green: #059669;
    --red: #dc2626;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--content-bg);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: none; }

/* ======================== LAYOUT ======================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand a {
    color: #fff;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-logo {
    width: 28px;
    height: 28px;
}

.sidebar-brand a:hover { color: #fff; }

.sidebar-nav {
    padding: 0.75rem 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-section-label {
    padding: 0.5rem 0.75rem 0.25rem;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.3);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--sidebar-text);
    transition: all 0.15s ease;
    font-weight: 400;
}

.nav-item:hover {
    color: var(--sidebar-text-hover);
    background: var(--sidebar-active-bg);
}

.nav-item.active {
    color: #fff;
    background: var(--sidebar-active-bg);
    font-weight: 500;
}

.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.5;
    flex-shrink: 0;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
    opacity: 0.8;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer a,
.sidebar-footer button {
    color: var(--sidebar-text);
    font-size: 0.8125rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.sidebar-footer a:hover,
.sidebar-footer button:hover {
    color: var(--sidebar-text-hover);
}

/* Main content */
.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    background: var(--content-bg);
}

.content-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.content-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--text);
}

.content-header .subtitle {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0.125rem 0 0;
}

.content-body {
    padding: 1.5rem 2rem 2rem;
}

/* ======================== CARDS ======================== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 1rem 1.25rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.875rem;
}

.card-body { padding: 1.25rem; }
.card-body.p-0 { padding: 0; }

/* ======================== STAT CARDS ======================== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1;
    color: var(--text);
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.375rem;
}

/* ======================== TABLES ======================== */
.table-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-card-header {
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.table-card-header h2 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table thead th {
    padding: 0.75rem 1.25rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
    background: #fafafa;
}

.data-table tbody td {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: #fafbfc;
}

.data-table .text-end { text-align: right; }

/* ======================== BADGES ======================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2em 0.6em;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

.badge-proxy { background: #dbeafe; color: #1e40af; }
.badge-static { background: #dcfce7; color: #166534; }

/* ======================== STATUS ======================== */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-active .status-dot { background: var(--green); }
.status-active { color: var(--green); }
.status-disabled .status-dot { background: #d1d5db; }
.status-disabled { color: var(--text-secondary); }

/* ======================== BUTTONS ======================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1.25;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

.btn-secondary {
    background: var(--card-bg);
    border-color: var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: #f3f4f6;
    color: var(--text);
}

.btn-danger {
    background: var(--card-bg);
    border-color: var(--border);
    color: var(--red);
}

.btn-danger:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--red);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-group {
    display: inline-flex;
    gap: 0.5rem;
}

/* ======================== FORMS ======================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text);
    margin-bottom: 0.375rem;
}

.form-hint {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text);
    background: var(--card-bg);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder { color: #9ca3af; }

/* ======================== PAGE HEADERS ======================== */
.page-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ======================== DETAIL VIEW ======================== */
.detail-grid {
    display: grid;
    gap: 0;
}

.detail-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    border-bottom: 1px solid #f3f4f6;
    padding: 0.75rem 0;
}

.detail-row:last-child { border-bottom: none; }

.detail-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    font-size: 0.875rem;
    color: var(--text);
}

.detail-value code {
    background: #f3f4f6;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.8125rem;
    color: var(--text);
}

/* ======================== EMPTY STATE ======================== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.375rem;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0 0 1.25rem;
}

/* ======================== AUTH PAGES ======================== */
.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--content-bg);
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 0 1rem;
}

.auth-brand {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.auth-logo {
    width: 48px;
    height: 48px;
}

.auth-brand span {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.auth-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    margin: 0 0 0.25rem;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0 0 1.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.auth-footer a { font-weight: 500; }

/* ======================== ALERTS ======================== */
.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* ======================== BREADCRUMB ======================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .separator { color: #d1d5db; }

/* ======================== SPINNER ======================== */
.spinner {
    display: flex;
    justify-content: center;
    padding: 3rem 0;
}

.spinner::after {
    content: "";
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ======================== MISC ======================== */
.form-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.text-muted { color: var(--text-secondary); }

code {
    background: #f3f4f6;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.8125rem;
}

/* ======================== FILE BROWSER ======================== */
.file-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.file-new-folder {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.file-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    text-decoration: none;
}

a.file-item:hover { color: var(--accent); }

.file-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.file-upload-status {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #1e40af;
}

/* ======================== MODAL ======================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-dialog {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
}

.modal-header {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--border);
}

.modal-body { padding: 1.25rem; }

.modal-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* ======================== MOBILE HEADER ======================== */
.mobile-header {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.mobile-logo {
    width: 24px;
    height: 24px;
}

.mobile-brand {
    font-weight: 600;
    font-size: 1rem;
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--text);
    display: flex;
    align-items: center;
}

/* ======================== SIDEBAR TOGGLE (CSS-only, no JS needed) ======================== */
.sidebar-checkbox {
    display: none;
}

.sidebar-overlay {
    display: none;
}

/* ======================== CONTENT HEADER SPLIT ======================== */
.content-header-split {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.search-bar {
    margin-bottom: 1rem;
    max-width: 400px;
}

/* ======================== WEBHOOK LOGS ======================== */
.webhook-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.webhook-log-detail {
    margin-top: 0.75rem;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.webhook-log-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
}

.webhook-log-pre {
    background: var(--content-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 0.8125rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

/* ======================== MOBILE CARDS (hidden on desktop) ======================== */
.mobile-cards {
    display: none;
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .sidebar-checkbox:checked ~ .app-layout .sidebar {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 99;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        cursor: default;
    }

    .sidebar-checkbox:checked ~ .app-layout .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-header {
        display: flex;
    }

    .content-header {
        padding: 1rem;
        position: static;
    }

    .content-header-split {
        flex-direction: column;
        gap: 0.75rem;
    }

    .content-body {
        padding: 1rem;
    }

    /* Hide desktop tables, show mobile cards */
    .desktop-table {
        display: none;
    }

    .mobile-cards {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .mobile-card {
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
        padding: 1rem;
    }

    .mobile-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 0.5rem;
    }

    .mobile-card-title {
        font-weight: 500;
        font-size: 0.9375rem;
        color: var(--text);
    }

    .mobile-card-title a {
        color: var(--text);
    }

    .mobile-card-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
        font-size: 0.8125rem;
        color: var(--text-secondary);
        margin-bottom: 0.75rem;
    }

    .mobile-card-meta-item {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

    .mobile-card-actions {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border);
    }

    /* Tables that remain (files, simple tables): horizontal scroll */
    .table-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 500px;
    }

    /* Detail grid: stack on mobile */
    .detail-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    /* Stat grid: full width on small screens */
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* File toolbar: wrap */
    .file-toolbar {
        flex-wrap: wrap;
    }

    /* Button groups: wrap */
    .btn-group {
        flex-wrap: wrap;
    }

    /* Page actions */
    .page-actions {
        flex-wrap: wrap;
    }

    /* Modal: nearly full width */
    .modal-dialog {
        max-width: calc(100% - 2rem);
        margin: 1rem;
    }

    /* Cards: no max-width constraint on mobile */
    .card[style*="max-width"] {
        max-width: 100% !important;
    }

    /* Breadcrumbs: allow wrapping */
    .breadcrumb {
        flex-wrap: wrap;
    }

    /* Code: prevent horizontal overflow */
    code {
        word-break: break-all;
    }

    /* Full-width buttons on mobile */
    .btn-group .btn {
        flex: 1;
        justify-content: center;
        text-align: center;
    }
}

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

    .content-body {
        padding: 0.75rem;
    }

    .content-header {
        padding: 0.75rem;
    }
}

/* === Bar Chart === */

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 160px;
    padding: 0;
}

.bar-chart-col {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: flex-end;
    min-width: 0;
    cursor: default;
}

.bar-chart-bar {
    width: 100%;
    background: var(--accent);
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    transition: opacity 0.15s;
}

.bar-chart-col:hover .bar-chart-bar {
    opacity: 0.75;
}

.bar-chart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.375rem;
}

/* === Analytics Filter Controls === */

.analytics-site-filter {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.8125rem;
    font-family: inherit;
    min-width: 160px;
}

.analytics-date-input {
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.8125rem;
    font-family: inherit;
}

.analytics-search-input {
    min-width: 200px;
}

.analytics-separator {
    color: var(--border);
    margin: 0 0.25rem;
    user-select: none;
}

/* === Analytics Grid === */

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.analytics-grid-wide {
    grid-column: 1 / -1;
}

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

    .analytics-grid-wide {
        grid-column: auto;
    }

    .analytics-controls {
        gap: 0.375rem !important;
    }

    .analytics-site-filter {
        min-width: 0 !important;
        width: 100%;
    }

    .analytics-date-input,
    .analytics-search-input {
        min-width: 0 !important;
        width: 100%;
    }
}

/* === Request Log Badges === */

.status-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.status-2xx { background: #dcfce7; color: #166534; }
.status-3xx { background: #dbeafe; color: #1e40af; }
.status-4xx { background: #fef3c7; color: #92400e; }
.status-5xx { background: #fee2e2; color: #991b1b; }

.request-method {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: monospace;
}

.request-method-get { color: #059669; }
.request-method-post { color: #2563eb; }
.request-method-put { color: #d97706; }
.request-method-delete { color: #dc2626; }

/* Group color dot */
.group-color-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Error Logs */
.error-log-row { cursor: pointer; }
.error-log-row:hover { background: rgba(0, 0, 0, 0.02); }

.expand-icon {
    display: inline-block;
    font-size: 0.625rem;
    color: var(--text-secondary);
    transition: transform 0.15s ease;
}
.expand-icon.expanded { transform: rotate(90deg); }

.error-detail-row td { padding: 0 !important; border-top: none !important; }

.error-detail-panel {
    background: var(--content-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin: 0.25rem 0.5rem 0.75rem;
}

.error-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.error-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    font-size: 0.8125rem;
}

.error-detail-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
}

.error-detail-section { margin-top: 0.75rem; }

.error-detail-message {
    margin-top: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: rgba(220, 38, 38, 0.06);
    border-left: 3px solid var(--red);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.8125rem;
    word-break: break-word;
}

.error-detail-stacktrace {
    margin-top: 0.25rem;
    padding: 0.75rem;
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: var(--radius);
    font-size: 0.75rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 400px;
}
