@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #090d16;
    --bg-card: rgba(22, 28, 45, 0.4);
    --border-glass: rgba(255, 255, 255, 0.08);
    --primary: #0ea5e9;
    --primary-glow: rgba(14, 165, 233, 0.3);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --danger: #f43f5e;
    --danger-glow: rgba(244, 63, 94, 0.3);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.3);
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --sidebar-width: 280px;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0b0f19;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Layout */
.app-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
    position: fixed;
    top: 38px; /* Alignment yang serasi dengan judul halaman */
    left: 40px; /* Posisi default saat sidebar ditutup */
    width: 42px;
    height: 42px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 60;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.sidebar-toggle-btn:hover {
    background: rgba(14, 165, 233, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.sidebar-toggle-btn svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.2;
}

/* Sidebar (Default Desktop State) */
.sidebar {
    width: var(--sidebar-width); /* Lebar penuh 280px */
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid var(--border-glass);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 50;
    left: 0;
    top: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.school-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-glass);
    transition: gap 0.3s ease, justify-content 0.3s ease;
}

.school-logo {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), #2563eb);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
    flex-shrink: 0;
}

.school-name {
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    color: #ffffff;
    white-space: nowrap;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.school-name span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
    margin-top: 2px;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease, gap 0.3s ease, justify-content 0.3s ease, padding 0.3s ease;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #2563eb);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.25);
}

.nav-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-link span {
    white-space: nowrap;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--border-glass);
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width); /* Jarak default saat sidebar terbuka */
    flex-grow: 1;
    padding: 40px;
    min-height: 100vh;
    background: radial-gradient(circle at 70% 10%, rgba(14, 165, 233, 0.05) 0%, transparent 60%);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   State Kelas Kontrol Sidebar Toggle (localStorage)
   ========================================================================== */

/* State Closed (Tersembunyi) */
html.sidebar-closed .sidebar {
    transform: translateX(-100%);
}

html.sidebar-closed .sidebar-toggle-btn {
    left: 40px;
}

html.sidebar-closed .main-content {
    margin-left: 0;
}

/* State Open (Terbuka) */
html.sidebar-open .sidebar {
    transform: translateX(0);
}

html.sidebar-open .sidebar-toggle-btn {
    left: 320px; /* Bergeser sejajar di samping sidebar (280px + 40px) */
}

html.sidebar-open .main-content {
    margin-left: var(--sidebar-width);
}

/* Atur page header agar selalu menyisakan ruang untuk tombol toggle desktop */
@media (min-width: 992px) {
    .page-header {
        padding-left: 60px;
        transition: padding-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.page-title h1 {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
}

.page-title p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Glassmorphism Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Stats Widgets */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.primary { background: rgba(14, 165, 233, 0.15); color: var(--primary); border: 1px solid rgba(14, 165, 233, 0.2); }
.stat-icon.success { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.stat-icon.danger { background: rgba(244, 63, 94, 0.15); color: var(--danger); border: 1px solid rgba(244, 63, 94, 0.2); }
.stat-icon.warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-top: 2px;
}

/* Interactive elements */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #2563eb);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid var(--border-glass);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #e11d48);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--danger-glow);
}
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(244, 63, 94, 0.4);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 12px 16px;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-glass);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    padding: 16px 20px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-main);
}

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

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-present {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-late {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-absent {
    background: rgba(244, 63, 94, 0.12);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.25);
}

.badge-blue {
    background: rgba(14, 165, 233, 0.12);
    color: var(--primary);
    border: 1px solid rgba(14, 165, 233, 0.25);
}

/* Camera & Scanning Interface */
.scanner-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
}

@media (max-width: 992px) {
    .scanner-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
    }
}

.webcam-panel {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #020617;
    border: 2px solid var(--border-glass);
    aspect-ratio: 4/3;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.webcam-panel video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Efek Cermin */
}

.webcam-panel canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scaleX(-1); /* Menyamakan efek cermin video */
    pointer-events: none;
    z-index: 10;
}

/* Scanner Overlay Animations */
.scan-line {
    position: absolute;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, transparent, var(--primary), transparent);
    animation: scanning 3s ease-in-out infinite;
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 0 10px var(--primary);
}

@keyframes scanning {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

.webcam-overlay {
    position: absolute;
    inset: 0;
    border: 30px solid rgba(2, 6, 23, 0.6);
    pointer-events: none;
    z-index: 4;
}

.webcam-corner {
    position: absolute;
    width: 25px;
    height: 25px;
    border: 4px solid var(--primary);
    z-index: 5;
}

.corner-tl { top: 15px; left: 15px; border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
.corner-tr { top: 15px; right: 15px; border-left: none; border-bottom: none; border-radius: 0 8px 0 0; }
.corner-bl { bottom: 15px; left: 15px; border-right: none; border-top: none; border-radius: 0 0 0 8px; }
.corner-br { bottom: 15px; right: 15px; border-left: none; border-top: none; border-radius: 0 0 8px 0; }

/* Camera Loading Screen */
.camera-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #020617;
    z-index: 30;
    gap: 15px;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px var(--primary-glow);
}

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

.camera-placeholder p {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
}

/* User Profile Image Circle */
.user-avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-glass);
}

/* Success Scan Overlay Card */
.scan-result-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.scan-log-list {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 380px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scan-log-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.scan-log-item.success-log {
    border-left: 4px solid var(--success);
    background: rgba(16, 185, 129, 0.03);
}

.scan-log-item.late-log {
    border-left: 4px solid var(--warning);
    background: rgba(245, 158, 11, 0.03);
}

.scan-log-item.error-log {
    border-left: 4px solid var(--danger);
    background: rgba(244, 63, 94, 0.03);
}

.log-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
}

.log-info {
    flex-grow: 1;
}

.log-name {
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
}

.log-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.log-time {
    font-weight: 700;
    font-size: 14px;
}

/* Modal Popup */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 480px;
    border-radius: 24px;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.open .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 20px;
}

/* Live Time & Date Display */
.live-clock-container {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(37, 99, 235, 0.1));
    border: 1px solid var(--primary-glow);
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 24px;
}

.live-time {
    font-size: 40px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
}

.live-date {
    font-size: 14px;
    color: var(--primary);
    margin-top: 6px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Custom Grid for Dashboard */
.dashboard-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 1200px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Responsivitas & Tampilan Ramah Perangkat Mobile (Android)
   ========================================================================== */

/* Bottom Navigation Bar for Mobile */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-glass);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 5px 10px;
    box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.4);
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    gap: 4px;
    flex: 1;
    height: 100%;
    transition: all 0.2s ease;
}

.bottom-nav-link svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.bottom-nav-link:hover {
    color: #ffffff;
}

.bottom-nav-link.active {
    color: var(--primary);
}

/* Modifikasi Element saat Responsif */
@media (max-width: 992px) {
    .sidebar {
        display: none !important;
    }
    
    .bottom-nav {
        display: flex;
    }
    
    .app-container {
        flex-direction: column;
        width: 100%;
        min-height: 100vh;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px 15px 85px 15px; /* bottom padding 85px agar tidak terhalang bottom nav */
        width: 100%;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .page-header div:last-child {
        text-align: left !important;
        width: 100%;
    }
    
    /* Layout scanner pada mobile */
    .scanner-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    /* Widget statistik agar flex-grow */
    .stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .stat-card {
        padding: 16px;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--border-glass);
        border-radius: 16px;
    }
    
    .card {
        padding: 16px;
        border-radius: 16px;
    }
}

@media (max-width: 576px) {
    .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 5px;
    }
    
    .card-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .card-title div {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    
    /* Forms responsif */
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* Webcam panel aspect ratio */
    .webcam-panel {
        border-radius: 16px;
    }
}

/* ==========================================================================
   Overlay Error Kamera Koneksi Tidak Aman (Insecure HTTP Context)
   ========================================================================== */
.insecure-error-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, #0f172a, #020617);
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 15px;
    overflow-y: auto;
    color: #f1f5f9;
    font-family: 'Outfit', 'Inter', sans-serif;
    box-sizing: border-box;
    text-align: left;
}

.insecure-error-overlay::-webkit-scrollbar {
    width: 6px;
}
.insecure-error-overlay::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
.insecure-error-overlay::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.insecure-error-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    width: 100%;
    justify-content: center;
}

.insecure-error-icon {
    width: 38px;
    height: 38px;
    color: #f43f5e;
    filter: drop-shadow(0 0 8px rgba(244, 63, 94, 0.4));
}

.insecure-error-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.insecure-error-desc {
    font-size: 12px;
    line-height: 1.5;
    color: #94a3b8;
    margin-bottom: 15px;
    text-align: center;
}

.insecure-error-tabs {
    width: 100%;
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.insecure-error-tab-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    padding: 8px 4px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.insecure-error-tab-btn.active {
    background: rgba(244, 63, 94, 0.1);
    border-color: #f43f5e;
    color: #ffffff;
}

.insecure-error-tab-content {
    display: none;
    width: 100%;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px;
    box-sizing: border-box;
}

.insecure-error-tab-content.active {
    display: block;
}

.insecure-error-steps {
    margin: 0;
    padding-left: 15px;
    font-size: 12px;
    line-height: 1.6;
    color: #cbd5e1;
}

.insecure-error-steps li {
    margin-bottom: 6px;
}

.insecure-error-code {
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11.5px;
    color: #38bdf8;
    word-break: break-all;
    display: inline-block;
    margin: 2px 0;
}

.insecure-error-copy-btn {
    background: var(--primary);
    border: none;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9.5px;
    font-weight: 600;
    margin-left: 4px;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    transition: background 0.2s;
}

.insecure-error-copy-btn:hover {
    background: #2563eb;
}

