/* ===================================================
   style.css — Seluruh styling WAGateway Device Manager (Light Theme)
   =================================================== */

/* === CSS VARIABLES (Light Theme) === */
:root {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-input: #f7f8fa;
    --bg-input-focus: #ffffff;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-active: #10b981;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-placeholder: #c0c5ce;
    --accent: #10b981;
    --accent-dark: #059669;
    --accent-light: #d1fae5;
    --accent-glow: rgba(16, 185, 129, 0.2);
    --accent-soft: rgba(16, 185, 129, 0.06);
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --danger-light: #fef2f2;
    --danger-border: #fecaca;
    --danger-glow: rgba(239, 68, 68, 0.12);
    --warning: #f59e0b;
    --warning-dark: #d97706;
    --warning-light: #fffbeb;
    --warning-glow: rgba(245, 158, 11, 0.12);
    --cyan: #06b6d4;
    --cyan-light: #ecfeff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
    --shadow-xl: 0 25px 60px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}


/* === ANIMATED BACKGROUND === */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(16, 185, 129, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    pointer-events: none;
}

.bg-orb-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.14), transparent 70%);
    top: -150px; right: -100px;
    animation: orbFloat1 15s ease-in-out infinite;
}

.bg-orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1), transparent 70%);
    bottom: -100px; left: -100px;
    animation: orbFloat2 18s ease-in-out infinite;
}

.bg-orb-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08), transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: orbFloat3 12s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 30px) scale(1.1); }
    66% { transform: translate(20px, -20px) scale(0.95); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, -40px) scale(1.15); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
}


/* === LAYOUT === */
.app-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}


/* === SIDEBAR === */
.sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 28px 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.04);
}

.sidebar-brand {
    padding: 0 24px 28px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.sidebar-brand h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.sidebar-brand .brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), #06b6d4);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.sidebar-brand p {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sidebar-nav { flex: 1; padding: 8px 12px; }

.nav-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 16px 12px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    margin-bottom: 2px;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 10px;
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--accent-soft);
}

.nav-item.active {
    color: var(--accent-dark);
    background: var(--accent-soft);
    font-weight: 600;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.nav-item i { width: 20px; text-align: center; font-size: 15px; position: relative; z-index: 1; }
.nav-item span { position: relative; z-index: 1; }

.nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 6px var(--accent-glow);
}


/* === MAIN CONTENT === */
.main-content {
    margin-left: 260px;
    padding: 32px 40px;
    min-height: 100vh;
}


/* === TOP BAR === */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.page-title { display: flex; flex-direction: column; gap: 4px; }

.page-title h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.page-title p {
    font-size: 14px;
    color: var(--text-secondary);
}

.top-actions { display: flex; gap: 12px; align-items: center; }


/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 16px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-danger-ghost {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-danger-ghost:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-light);
}

.btn-qr {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-qr:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 4px 16px var(--danger-glow);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(239, 68, 68, 0.3);
}


/* === STATS CARDS === */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card:hover::before { opacity: 1; }

.stat-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 14px;
}

.stat-icon.green { background: var(--accent-light); color: var(--accent-dark); }
.stat-icon.yellow { background: var(--warning-light); color: var(--warning-dark); }
.stat-icon.red { background: var(--danger-light); color: var(--danger-dark); }
.stat-icon.cyan { background: var(--cyan-light); color: var(--cyan); }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 4px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}


/* === TABLE CARD === */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.table-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.25;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.table-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.table-header .count-badge {
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    font-family: 'JetBrains Mono', monospace;
}

.table-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    transition: all 0.2s;
}

.table-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-input-focus);
}

.table-search i { color: var(--text-muted); font-size: 13px; }

.table-search input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    width: 180px;
}

.table-search input::placeholder { color: var(--text-placeholder); }


/* === TABLE === */
.device-table {
    width: 100%;
    border-collapse: collapse;
}

.device-table thead th {
    padding: 14px 24px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

.device-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    animation: rowSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

@keyframes rowSlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.device-table tbody tr:hover { background: var(--accent-soft); }
.device-table tbody tr:last-child { border-bottom: none; }

.device-table tbody td {
    padding: 16px 24px;
    font-size: 14px;
    vertical-align: middle;
}


/* Number cell */
.number-cell {
    display: flex;
    align-items: center;
    gap: 14px;
}

.number-avatar {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--accent-light);
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--accent-dark);
    flex-shrink: 0;
}

.number-info { display: flex; flex-direction: column; gap: 2px; }

.number-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.number-time {
    font-size: 11px;
    color: var(--text-muted);
}


/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-connected {
    background: var(--accent-light);
    color: #059669;
}

.status-connected .dot {
    background: #059669;
    box-shadow: 0 0 8px rgba(5, 150, 105, 0.4);
    animation: pulseGreen 2s ease-in-out infinite;
}

@keyframes pulseGreen {
    0%, 100% { box-shadow: 0 0 4px rgba(5, 150, 105, 0.3); }
    50% { box-shadow: 0 0 12px rgba(5, 150, 105, 0.6); }
}

.status-disconnected {
    background: var(--danger-light);
    color: #dc2626;
}

.status-disconnected .dot { background: #dc2626; }

.status-scanning {
    background: var(--warning-light);
    color: #d97706;
}

.status-scanning .dot {
    background: #d97706;
    animation: pulseYellow 1s ease-in-out infinite;
}

@keyframes pulseYellow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}


/* Actions cell */
.actions-cell {
    display: flex;
    gap: 8px;
}


/* === EMPTY STATE === */
.empty-state {
    padding: 80px 24px;
    text-align: center;
}

.empty-icon {
    width: 80px; height: 80px;
    border-radius: 20px;
    background: var(--accent-soft);
    border: 1.5px dashed rgba(16, 185, 129, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 30px;
    color: var(--text-muted);
}

.empty-state h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 320px;
    margin: 0 auto;
    line-height: 1.6;
}


/* === MODAL OVERLAY === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: none;
    opacity: 0;
    visibility: hidden;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 480px;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

.modal-top-bar {
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #06b6d4, var(--accent));
    background-size: 200% 100%;
    animation: shimmerBar 3s linear infinite;
}

@keyframes shimmerBar {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.modal-close:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-light);
}

.modal-body { padding: 24px 28px; }

.modal-footer {
    padding: 0 28px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}


/* === FORM === */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.form-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
}

.form-input:hover {
    border-color: var(--border-hover);
}

.form-input:focus {
    background: var(--bg-input-focus);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
    color: var(--text-placeholder);
    font-weight: 400;
}

.form-input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-hint.error-text { color: var(--danger); }

.form-counter {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 6px;
    transition: color 0.2s;
}

.form-counter.valid { color: var(--accent-dark); }
.form-counter.over { color: var(--danger); }


/* === QR MODAL === */
.qr-modal-box {
    max-width: 440px;
}

.qr-content {
    text-align: center;
    padding: 8px 0;
}

.qr-frame {
    width: 240px; height: 240px;
    margin: 0 auto 20px;
    border-radius: 16px;
    border: 2px solid var(--border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s;
    box-shadow: var(--shadow-sm);
}

.qr-frame.active { border-color: var(--accent); }

.qr-frame img {
    width: 220px; height: 220px;
    object-fit: contain;
    display: none;
}

.qr-frame img.visible { display: block; }

.qr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.qr-spinner {
    width: 50px; height: 50px;
    border: 3px solid rgba(16, 185, 129, 0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.qr-loading span {
    font-size: 12px;
    color: var(--text-muted);
}

.qr-number-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.qr-instruction {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto;
}

.qr-timer {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.qr-timer i { color: var(--warning); }

.qr-timer .timer-value {
    color: var(--warning);
    font-weight: 600;
}


/* === DELETE CONFIRM === */
.confirm-content { text-align: center; padding: 12px 0; }

.confirm-icon {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--danger-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    color: var(--danger);
}

.confirm-content h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.confirm-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.confirm-content .confirm-number {
    font-family: 'JetBrains Mono', monospace;
    color: var(--danger);
    font-weight: 600;
}


/* === TOAST NOTIFICATIONS === */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    animation: toastIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    min-width: 280px;
}

.toast.removing {
    animation: toastOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(40px) scale(0.95); }
}

.toast-icon {
    width: 28px; height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.toast-success .toast-icon { background: var(--accent-light); color: var(--accent-dark); }
.toast-error .toast-icon { background: var(--danger-light); color: var(--danger); }
.toast-info .toast-icon { background: var(--cyan-light); color: var(--cyan); }


/* === MOBILE MENU BTN === */
.mobile-menu-btn {
    display: none !important;
    width: 40px; height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}


/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }


/* === SHAKE ANIMATION === */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}


/* === RESPONSIVE === */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
    }
    .main-content { margin-left: 0; padding: 20px 16px; }
    .top-bar { flex-direction: column; align-items: flex-start; gap: 16px; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .device-table thead th,
    .device-table tbody td { padding: 12px 14px; }
    .table-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .table-search input { width: 140px; }
    .mobile-menu-btn { display: flex !important; }
}

@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr; }
    .actions-cell { flex-direction: column; }
}


/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}