/* =====================================================
   ARRUMADINHO DA RECEPÇÃO ANGELIM — Estilos Globais
   ===================================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg:           #0d0d12;
    --surface:      #16161e;
    --surface-2:    #1e1e2a;
    --border:       #2a2a38;
    --primary:      #f0a500;
    --primary-dark: #c88800;
    --primary-glow: rgba(240, 165, 0, 0.25);
    --success:      #22c55e;
    --success-glow: rgba(34, 197, 94, 0.25);
    --danger:       #ef4444;
    --undo:         #6b7280;
    --text:         #f0f0f0;
    --text-muted:   #888898;
    --text-dim:     #555566;
    --radius:       14px;
    --radius-sm:    8px;
    --shadow:       0 4px 24px rgba(0,0,0,0.5);
    --transition:   all 0.18s ease;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
ul, ol { list-style: none; }

/* ---------- Status Bar ---------- */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
}
.status-bar.online  { background: rgba(34,197,94,0.15); color: var(--success); }
.status-bar.offline { background: rgba(239,68,68,0.15); color: var(--danger); }

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.online  .status-dot { background: var(--success); box-shadow: 0 0 6px var(--success); animation: pulse-green 2s infinite; }
.offline .status-dot { background: var(--danger); }

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

.pending-badge {
    margin-left: auto;
    background: var(--primary);
    color: #000;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

/* ---------- App Header ---------- */
.app-header {
    padding: 44px 20px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.app-title {
    font-size: clamp(15px, 4vw, 20px);
    font-weight: 900;
    letter-spacing: 0.5px;
    line-height: 1.2;
    color: var(--primary);
    text-transform: uppercase;
}

.app-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    letter-spacing: 0.3px;
}

.header-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    padding-top: 4px;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    font-size: 18px;
    transition: var(--transition);
    border: 1px solid var(--border);
}
.btn-icon:hover, .btn-icon:active { background: var(--border); transform: scale(0.95); }

/* ---------- Main Content ---------- */
.main-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 20px 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ---------- Counter Section ---------- */
.counter-section {
    text-align: center;
    padding: 28px 16px 20px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.counter-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.counter-display {
    position: relative;
    display: inline-block;
}

.counter-number {
    font-size: clamp(80px, 22vw, 140px);
    font-weight: 900;
    line-height: 1;
    color: var(--primary);
    display: block;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: -4px;
    font-variant-numeric: tabular-nums;
}

.counter-number.bump {
    transform: scale(1.12);
}

/* ---------- Action Section (big button) ---------- */
.action-section {
    position: relative;
}

.btn-register {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    padding: 26px 20px;
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    color: #fff;
    border-radius: var(--radius);
    font-size: clamp(18px, 5vw, 24px);
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 6px 32px rgba(34, 197, 94, 0.4);
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
    border: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    position: relative;
    overflow: hidden;
}

.btn-register::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.1s;
}

.btn-register:active::after {
    background: rgba(255,255,255,0.08);
}

.btn-register:active {
    transform: scale(0.96);
    box-shadow: 0 2px 12px rgba(34, 197, 94, 0.3);
}

.btn-register.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-register .btn-icon-reg {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.95;
}

/* Success feedback overlay */
.success-feedback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    border-radius: var(--radius);
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    letter-spacing: 1px;
}

.success-feedback.show {
    opacity: 1;
}

.success-feedback .success-icon {
    font-size: 28px;
    animation: pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop {
    0%   { transform: scale(0); }
    100% { transform: scale(1); }
}

/* ---------- Undo Section ---------- */
.undo-section {
    text-align: center;
}

.btn-undo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
    justify-content: center;
    touch-action: manipulation;
}

.btn-undo:active {
    transform: scale(0.97);
    background: var(--border);
}

.undo-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    opacity: 0.7;
}

/* ---------- Admin quick actions (main page) ---------- */
.admin-actions-section {
    display: flex;
    justify-content: flex-end;
}

.btn-admin-danger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #9ca3af;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-admin-danger:hover {
    border-color: rgba(239, 68, 68, 0.5);
    color: var(--danger);
    background: rgba(239, 68, 68, 0.06);
}

.btn-admin-danger:active {
    transform: scale(0.97);
}

/* ---------- History Section ---------- */
.history-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.history-title {
    padding: 14px 16px 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.history-list {
    max-height: 320px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
    animation: slideIn 0.2s ease;
}

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

.history-item:last-child { border-bottom: none; }
.history-item.history-undo { opacity: 0.55; }

.history-dot {
    font-size: 10px;
    flex-shrink: 0;
    color: var(--success);
}
.history-undo .history-dot { color: var(--undo); }

.history-time {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    min-width: 44px;
    font-variant-numeric: tabular-nums;
}

.history-user {
    font-size: 14px;
    color: var(--text-muted);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-badge-undo {
    font-size: 10px;
    font-weight: 700;
    background: var(--surface-2);
    color: var(--undo);
    padding: 2px 8px;
    border-radius: 20px;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.history-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
}

/* ---------- Buttons (generic) ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.btn-primary {
    background: var(--primary);
    color: #000;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

.btn-danger {
    background: rgba(239,68,68,0.15);
    color: var(--danger);
    border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-full { width: 100%; }

/* ---------- Login Page ---------- */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 32px;
    box-shadow: var(--shadow);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--primary);
    margin-bottom: 16px;
}

.login-title {
    font-size: 22px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 1px;
    line-height: 1.2;
    text-transform: uppercase;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-dim);
}

.btn-login {
    margin-top: 8px;
    padding: 16px;
    font-size: 17px;
}

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.form-input::placeholder { color: var(--text-dim); }
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.input-wrapper {
    position: relative;
}

.input-wrapper .form-input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.6;
    padding: 4px;
}

/* ---------- Alerts ---------- */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}

.alert-error {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
}
.alert-success {
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.3);
    color: #86efac;
}
.alert-icon { flex-shrink: 0; font-size: 16px; }

/* ---------- Relatórios Page ---------- */
.relatorios-page .app-header {
    position: relative;
}

.relatorios-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 20px 80px;
}

.page-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    align-items: flex-end;
}

.filter-row .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 130px;
}

.filter-btn {
    flex-shrink: 0;
    padding: 14px 20px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 16px;
    text-align: center;
}

.stat-value {
    font-size: 40px;
    font-weight: 900;
    color: var(--primary);
    display: block;
    line-height: 1;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Chart container */
.chart-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
}

.chart-wrapper {
    position: relative;
    height: 220px;
}

/* Export buttons */
.export-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Table */
.data-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.data-table-title {
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table .undo-row td { color: var(--text-dim); font-style: italic; }

/* Loading state */
.loading-overlay {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ---------- Admin Page ---------- */
.admin-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 20px 80px;
}

.user-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 2px;
}

.user-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.badge-admin   { background: rgba(240,165,0,0.15); color: var(--primary); border: 1px solid rgba(240,165,0,0.3); }
.badge-active  { background: rgba(34,197,94,0.12); color: var(--success); border: 1px solid rgba(34,197,94,0.2); }
.badge-inactive{ background: rgba(239,68,68,0.12); color: var(--danger);  border: 1px solid rgba(239,68,68,0.2); }

.user-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-backdrop.hidden { display: none; }

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow);
    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-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--primary);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* ── Undo row com stepper ── */
.undo-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.undo-row .btn-undo { flex: 1; }

.qty-stepper {
    display: flex;
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}
.stepper-btn {
    width: 36px;
    height: 44px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stepper-btn:hover { background: var(--border); color: var(--text); }
.stepper-val {
    min-width: 36px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    padding: 0 4px;
}

/* ── Botão register pending state ── */
.btn-register.pending {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 6px 32px rgba(217,119,6,0.4);
}

/* ── Popup de confirmação ── */
.popup-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.82);
    z-index: 9998;
}
.popup-backdrop.popup-show {
    display: block;
    animation: popupFade 0.22s ease both;
}
@keyframes popupFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.popup-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100vw - 48px);
    max-width: 320px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.9);
    z-index: 9999;
}
.popup-backdrop.popup-show .popup-card {
    animation: popupCard 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes popupCard {
    from { transform: translate(-50%, -50%) scale(0.84); opacity: 0; }
    to   { transform: translate(-50%, -50%) scale(1);    opacity: 1; }
}
.popup-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
}
.popup-number {
    font-size: clamp(72px, 20vw, 100px);
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
}
.popup-unit {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 28px;
}
.popup-btns {
    display: flex;
    gap: 10px;
}
.popup-btn { flex: 1; padding: 15px 10px; font-size: 15px; }
.btn-register-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}
.btn-register-sm:active { transform: scale(0.97); }

/* ── Tab nav ── */
.tab-nav {
    display: flex;
    gap: 2px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    overflow-x: auto;
}
.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Configurações ── */
.settings-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px;
    margin-bottom: 20px;
}
.settings-group-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}
.settings-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
}
.setting-info { flex: 1; }
.setting-label { font-size: 14px; font-weight: 600; display: block; margin-bottom: 2px; }
.setting-hint  { font-size: 11px; color: var(--text-muted); }

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.2s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

/* Range slider */
.setting-range-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    outline: none;
    cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.range-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    min-width: 28px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ── Tabela audit undo-row ── */
.undo-row td { color: var(--text-dim) !important; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 400px) {
    .login-card { padding: 28px 20px; }
    .modal { padding: 22px 18px; }
}

@media (min-width: 600px) {
    .main-content  { padding-top: 32px; }
    .counter-number { font-size: 140px; }
}
