/* ============================================================
   Control Panel — Main Stylesheet
   Dark sidebar layout, professional B2B look
   ============================================================ */

:root {
    --sidebar-bg:       #0f172a;
    --sidebar-accent:   #1e293b;
    --sidebar-text:     #94a3b8;
    --sidebar-active:   #1d4ed8;
    --sidebar-hover:    #1e293b;
    --topbar-bg:        #ffffff;
    --topbar-border:    #e2e8f0;
    --primary:          #1d4ed8;
    --primary-hover:    #1e40af;
    --danger:           #dc2626;
    --success:          #16a34a;
    --warning:          #d97706;
    --text-primary:     #0f172a;
    --text-muted:       #64748b;
    --bg:               #f8fafc;
    --card-bg:          #ffffff;
    --border:           #e2e8f0;
    --sidebar-width:    250px;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

/* ============================================================
   Login Page
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 1.5rem;
}

.login-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.35s ease;
}

.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo svg {
    width: 56px;
    height: 56px;
}

.login-title {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 2rem;
}

.login-card .form-label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.login-card .form-control {
    border: 1.5px solid var(--border);
    border-radius: 6px;
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.login-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
    outline: none;
}

.btn-login {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.65rem 1rem;
    width: 100%;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 0.5rem;
}

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

.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #991b1b;
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* ============================================================
   App Shell — Sidebar + Main layout
   ============================================================ */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-brand {
    display: block;
    text-decoration: none !important;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo img {
    flex-shrink: 0;
}

.sidebar-brand-text {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

/* Legacy aliases — kept for backward compat */
.sidebar-brand-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: 0.01em;
}

.sidebar-brand-sub {
    font-size: 0.7rem;
    color: var(--sidebar-text);
}

.sidebar-nav {
    padding: 0.75rem 0;
    flex: 1;
}

.sidebar-section {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    padding: 1rem 1.25rem 0.35rem;
    margin-top: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 1rem;
    margin: 0 0.5rem;
    border-radius: 7px;
    color: rgba(255,255,255,0.65);
    text-decoration: none !important;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.sidebar-link:hover {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.9);
}
.sidebar-link.active {
    background: #1d4ed8;
    color: #fff;
    font-weight: 600;
}

/* sidebar-nav a alias for spec compliance */
.sidebar-nav a { border-radius: 7px; transition: background 0.15s; }
.sidebar-nav a:hover { background: rgba(255,255,255,0.07); }
.sidebar-nav a.active { background: #1d4ed8; color: #fff; }


.sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: inherit;
    opacity: 0.75;
}
.sidebar-link:hover .sidebar-icon,
.sidebar-link.active .sidebar-icon {
    opacity: 1;
}

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

.sidebar-user-info {
    font-size: 0.75rem;
    color: var(--sidebar-text);
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.sidebar-user-name {
    font-weight: 600;
    color: #cbd5e1;
    font-size: 0.82rem;
}

/* ============================================================
   Main content area
   ============================================================ */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============================================================
   Top Bar
   ============================================================ */
.topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.topbar-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.topbar-user strong {
    color: #0f172a;
    font-weight: 600;
}

/* Role badges */
.badge-role {
    display: inline-flex;
    align-items: center;
    padding: 0.2em 0.6em;
    border-radius: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-role-superadmin { background: #ede9fe; color: #6d28d9; }
.badge-role-admin      { background: #dbeafe; color: #1d4ed8; }
.badge-role-supervisor { background: #dcfce7; color: #16a34a; }

.btn-logout {
    font-size: 0.8rem;
    color: var(--danger);
    border: 1px solid #fecaca;
    border-radius: 5px;
    padding: 0.3rem 0.65rem;
    background: transparent;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    text-decoration: none;
}

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

/* ============================================================
   Page Content
   ============================================================ */
.page-content {
    padding: 1.75rem 2rem;
    flex: 1;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.page-header p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #64748b;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}
.card-body { padding: 1.5rem; }
.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    font-size: 0.9rem;
    color: #0f172a;
    background: #fafafa;
}

/* ============================================================
   Stat Cards (dashboard overview)
   ============================================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-card-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================================
   Tables
   ============================================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
}

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

.data-table thead th {
    background: #f8fafc;
    padding: 0.65rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

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

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

.data-table tbody tr:nth-child(even) td {
    background: #fafcff;
}

.data-table tbody tr:hover td,
.table-hover tbody tr:hover { background: #f0f7ff; cursor: pointer; }


/* ============================================================
   Status dots
   ============================================================ */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.4rem;
}

.status-dot-green  { background: var(--success); }
.status-dot-red    { background: var(--danger); }
.status-dot-yellow { background: var(--warning); }
.status-dot-gray   { background: #94a3b8; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 7px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    line-height: 1;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: #1d4ed8;
    color: #fff;
    box-shadow: 0 1px 3px rgba(29,78,216,0.3);
}
.btn-primary:hover { background: #1e40af; box-shadow: 0 3px 8px rgba(29,78,216,0.35); color: #fff; text-decoration: none; }
.btn-danger {
    background: #dc2626;
    color: #fff;
    box-shadow: 0 1px 3px rgba(220,38,38,0.3);
}
.btn-danger:hover { background: #b91c1c; color: #fff; text-decoration: none; }
.btn-success   { background: var(--success); color: #fff; }
.btn-secondary { background: #64748b;        color: #fff; }
.btn-outline {
    background: transparent;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.btn-outline:hover { background: #f8fafc; border-color: #cbd5e1; text-decoration: none; }
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.78rem; }
.btn:hover { text-decoration: none; }

/* ============================================================
   Form controls
   ============================================================ */
.form-group { margin-bottom: 1rem; }

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

.form-control {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
    outline: none;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ============================================================
   Alerts / Flash messages
   ============================================================ */
.alert {
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    border: 1px solid transparent;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.alert-danger  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.alert-info    { background: #eff6ff; border-color: #bfdbfe; color: #1e3a5f; }

.flash-message { animation: slideIn 0.2s ease-out; }

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

/* ============================================================
   Capture cards (capture browser grid)
   ============================================================ */
.capture-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .capture-grid { grid-template-columns: repeat(2, 1fr); }
}

.capture-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.capture-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.capture-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: #e2e8f0;
    display: block;
}

.capture-card-body {
    padding: 0.75rem;
}

.capture-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.capture-url {
    font-size: 0.78rem;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
}

.capture-title {
    font-size: 0.78rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   Lightbox overlay
   ============================================================ */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-img {
    max-width: 95vw;
    max-height: 92vh;
    border-radius: 6px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.12s;
}

.lightbox-close:hover { opacity: 1; }

/* ============================================================
   Disclaimer / modal
   ============================================================ */
.modal-backdrop-custom {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 900;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop-custom.active {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 10px;
    max-width: 520px;
    width: 100%;
    padding: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
}

.modal-box h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 0.75rem;
}

.modal-box p,
.modal-box ul {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

/* ============================================================
   Generic .table (used alongside Bootstrap .table and .data-table)
   ============================================================ */
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th {
    text-align: left;
    padding: 0.7rem 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #f8fafc; }

/* ============================================================
   Empty state
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
    color: #94a3b8;
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.empty-state p { font-size: 0.875rem; color: #94a3b8; margin-bottom: 1.25rem; }

/* ============================================================
   Content area
   ============================================================ */
.content-area {
    padding: 2rem;
    flex: 1;
}

.page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.text-muted   { color: var(--text-muted) !important; }
.text-danger  { color: var(--danger) !important; }
.mono         { font-family: ui-monospace, 'Cascadia Code', monospace; font-size: 0.82rem; }
.result-count { margin-bottom: 1rem; font-size: 0.85rem; }

/* ============================================================
   Status dots
   ============================================================ */
.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-green  { background: var(--success); box-shadow: 0 0 0 3px rgba(22,163,74,0.15); }
.dot-yellow { background: var(--warning); box-shadow: 0 0 0 3px rgba(217,119,6,0.15); }
.dot-red    { background: var(--danger);  box-shadow: 0 0 0 3px rgba(220,38,38,0.12); }

/* ============================================================
   Table card wrapper
   ============================================================ */
.table-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ============================================================
   Clickable rows + action cells
   ============================================================ */
.clickable-row:hover td { background: #f0f9ff; cursor: pointer; }

.actions-cell {
    white-space: nowrap;
}

.btn-icon {
    background: none;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.25rem 0.45rem;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: background 0.12s, border-color 0.12s;
    margin-right: 0.25rem;
}
.btn-icon:hover             { background: #f1f5f9; border-color: #94a3b8; color: var(--text-primary); }
.btn-icon-danger:hover      { background: #fef2f2; border-color: #fecaca; color: var(--danger); }

.rename-row td { padding: 0 1rem 0.5rem; background: #f8fafc; }

/* ============================================================
   Filter bar
   ============================================================ */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 140px;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-input,
.form-select {
    border: 1.5px solid var(--border);
    border-radius: 6px;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: auto;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29,78,216,0.1);
    outline: none;
}

.filter-group-submit { justify-content: flex-end; }

/* ============================================================
   Notice / info banner
   ============================================================ */
.notice {
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.84rem;
    border: 1px solid transparent;
}

.notice-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e3a5f;
}

.notice-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #78350f;
}

/* ============================================================
   Settings card
   ============================================================ */
.settings-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem;
    max-width: 680px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.settings-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 1.25rem;
}

.settings-form { margin-bottom: 0; }

.form-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 0.75rem 1.5rem;
    align-items: start;
    margin-bottom: 1rem;
}

.form-row .form-label { padding-top: 0.45rem; }

.form-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.settings-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

.settings-readonly-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 0.75rem 1.5rem;
    align-items: start;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.settings-label {
    font-weight: 600;
    color: var(--text-primary);
    padding-top: 0.2rem;
}

/* ============================================================
   Badges (feature status)
   ============================================================ */
.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-muted   { background: #f1f5f9; color: #475569; }
.badge-info    { background: #eff6ff; color: #1e3a5f; }

/* ============================================================
   Lightbox meta panel
   ============================================================ */
.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    max-width: 95vw;
}

.lightbox-meta {
    color: #e2e8f0;
    font-size: 0.82rem;
    max-width: 800px;
    width: 100%;
}

.lightbox-meta-list {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 0.25rem 1rem;
    margin: 0;
}

.lightbox-meta-list dt {
    font-weight: 700;
    color: #94a3b8;
    white-space: nowrap;
}

.lightbox-meta-list dd {
    margin: 0;
    word-break: break-all;
    color: #f1f5f9;
}

.lightbox-meta-list a {
    color: #93c5fd;
}

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

    .sidebar.open {
        transform: translateX(0);
    }

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

    .filter-bar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .filter-group { min-width: 100%; }

    .capture-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .form-row,
    .settings-readonly-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .capture-grid {
        grid-template-columns: 1fr !important;
    }

    .content-area { padding: 1rem; }
}

/* --- Phase 9 Polish (kept for compat) --- */
.sidebar-logo { display:flex; align-items:center; gap:12px; padding:1.25rem 1rem 1.25rem 1.25rem; border-bottom:1px solid rgba(255,255,255,0.08); }
.sidebar-brand { color:#fff; font-weight:600; font-size:0.9rem; letter-spacing:0.03em; }

.capture-card { transition:transform 0.15s, box-shadow 0.15s; }
.capture-card:hover { transform:translateY(-3px); box-shadow:0 8px 24px rgba(0,0,0,0.12); }

.table-hover tbody tr:hover td { background:#f0f7ff; cursor:pointer; }

/* --- Keylogger disclaimer modal --- */
.disclaimer-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.disclaimer-modal.active { display: flex; }
.disclaimer-content {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    max-width: 540px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.disclaimer-body { font-size: 0.875rem; line-height: 1.6; color: #334155; }
.disclaimer-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1rem; }
