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

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #93c5fd;
    --primary-soft: #eff6ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --sidebar: 250px;
    --border: #e2e8f0;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.16);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #f1f5f9;
    color: #334155;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

::selection { background: var(--primary-light); color: var(--dark); }

/* Login — layout dividido: painel de marca + formulário */
body.login-page {
    min-height: 100vh;
    overflow-x: hidden;
}

.login-split {
    min-height: 100vh;
    display: flex;
}

.login-brand {
    flex: 1 1 46%;
    max-width: 560px;
    background: linear-gradient(150deg, var(--primary-dark) 0%, var(--primary) 55%, #1e293b 130%);
    color: white;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.login-brand-shapes span {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.login-brand-shapes span:nth-child(1) { width: 420px; height: 420px; top: -140px; right: -140px; }
.login-brand-shapes span:nth-child(2) { width: 260px; height: 260px; bottom: -100px; left: -80px; background: rgba(255, 255, 255, 0.06); }
.login-brand-shapes span:nth-child(3) { width: 140px; height: 140px; bottom: 18%; right: 8%; background: rgba(255, 255, 255, 0.05); }

.login-brand-content {
    position: relative;
    z-index: 1;
    max-width: 420px;
    animation: fadeUp 0.5s var(--ease) both;
}

.login-brand-logo,
.login-brand-logo-img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    font-size: 28px;
    margin-bottom: 24px;
    object-fit: contain;
}

.login-brand-logo-img { background: white; padding: 8px; }

.login-brand-content h1 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.login-brand-tagline {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
    margin-bottom: 36px;
}

.login-brand-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-brand-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.92);
}

.login-brand-features i {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 9px;
}

.login-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 40px 24px;
}

.login-box {
    width: 100%;
    max-width: 380px;
    animation: loginRise 0.5s var(--ease) both;
}

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

.login-box-header { margin-bottom: 28px; }

.login-box-logo-mobile {
    display: none;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 16px;
    object-fit: contain;
}

.login-box-header h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.login-box-header p { color: #64748b; font-size: 14px; }

.input-icon-wrap { position: relative; }

.input-icon-wrap i.fas:first-child {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
}

.input-icon-wrap .form-control { padding-left: 40px; padding-right: 40px; }

.input-toggle-senha {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    transition: color 0.15s var(--ease);
}

.input-toggle-senha:hover { color: var(--primary); }

.login-footer-note {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

@media (max-width: 900px) {
    .login-brand { display: none; }
    .login-box-logo-mobile { display: block; }
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.form-control:hover { border-color: #cbd5e1; }

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

select.form-control { cursor: pointer; }

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background-color 0.15s var(--ease), filter 0.15s var(--ease), opacity 0.15s var(--ease);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

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

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn:disabled,
.btn.is-loading {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.28);
}

.btn-success:hover {
    background: #0d9c6f;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.32);
}

.btn-warning {
    background: var(--warning);
    color: white;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.28);
}

.btn-warning:hover { filter: brightness(0.94); transform: translateY(-1px); }

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.28);
}

.btn-danger:hover { filter: brightness(0.94); transform: translateY(-1px); }

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-secondary:hover { background: #475569; transform: translateY(-1px); }

.btn-info {
    background: #0ea5e9;
    color: white;
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.28);
}

.btn-info:hover { background: #0284c7; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(14, 165, 233, 0.32); }

.btn .fa-spin { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Layout */
.main-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar);
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1001;
    transition: transform 0.25s ease;
}

/* Botão hamburger — só existe visualmente em telas pequenas */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--dark);
    cursor: pointer;
    padding: 4px 8px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1000;
}

.sidebar-overlay.open {
    display: block;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-header h3 {
    color: var(--primary);
    font-size: 20px;
}

.sidebar-nav { padding: 8px 0; }

.nav-item {
    padding: 11px 20px;
    margin: 2px 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #475569;
    text-decoration: none;
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
    border-left: 3px solid transparent;
    width: calc(100% - 20px);
    position: relative;
}

.nav-item i { width: 18px; text-align: center; transition: transform 0.2s var(--ease); }

.nav-item:hover {
    background: #f1f5f9;
    color: var(--dark);
    transform: translateX(2px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-soft), #dbeafe);
    color: var(--primary-dark);
    font-weight: 600;
}

.nav-item.active i { transform: scale(1.1); }

.nav-item-destaque {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
}

.nav-item-destaque i { color: #fff; }

.nav-item-destaque:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    transform: translateX(2px);
}

.nav-item-destaque.active {
    background: linear-gradient(135deg, var(--primary-dark), #1e3a8a);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.sidebar-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
}

.main-content {
    margin-left: var(--sidebar);
    flex: 1;
}

.top-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    padding: 16px 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
}

.top-header h1 {
    font-size: 22px;
    letter-spacing: -0.01em;
}

.content-wrapper {
    padding: 32px;
}

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

.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
    animation: fadeUp 0.35s var(--ease) both;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-card:hover .stat-icon { transform: scale(1.08) rotate(-4deg); }

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-card.blue::before { background: #3b82f6; }
.stat-card.orange::before { background: #f59e0b; }
.stat-card.green::before { background: #10b981; }
.stat-card.red::before { background: #ef4444; }

.stat-number {
    font-size: 32px;
    font-weight: 700;
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    transition: transform 0.25s var(--ease);
}

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

.stats-grid .stat-card:nth-child(1) { animation-delay: 0.02s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.06s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.10s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.14s; }

.stat-card.blue .stat-icon { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-card.orange .stat-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-card.green .stat-icon { background: linear-gradient(135deg, #10b981, #059669); }
.stat-card.red .stat-icon { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* Cards */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: box-shadow 0.2s var(--ease);
    animation: fadeUp 0.3s var(--ease) both;
}

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

.card-header h3 { font-size: 17px; letter-spacing: -0.01em; }

.card-body {
    padding: 24px;
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    position: sticky;
    top: 0;
}

tbody td {
    padding: 15px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

tbody tr { transition: background-color 0.15s var(--ease); }

tbody tr:hover {
    background: #f8fafc;
}

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

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1.4;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    animation: alertIn 0.3s var(--ease) both;
    position: relative;
}

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

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.6;
    color: inherit;
    padding: 4px;
    line-height: 1;
    transition: opacity 0.15s var(--ease);
}

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

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Modal — fade + scale, sem tocar no posicionamento (margin:auto) já
   usado inline em cada modal do sistema */
.modal {
    opacity: 0;
    transition: opacity 0.2s var(--ease);
}

.modal.modal-visible { opacity: 1; }

.modal > div {
    transition: transform 0.22s var(--ease);
    transform: translateY(14px) scale(0.97);
}

.modal.modal-visible > div { transform: translateY(0) scale(1); }

/* Empty states */
.empty-state { animation: fadeUp 0.3s var(--ease) both; }
.empty-state-icon { transition: transform 0.3s var(--ease); }
.empty-state:hover .empty-state-icon { transform: scale(1.06) rotate(-3deg); }

/* Toasts (notificações flutuantes, via showToast() em app.js) */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}

.toast {
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    border-left: 4px solid var(--primary);
    animation: toastIn 0.25s var(--ease) both;
}

.toast.hide { animation: toastOut 0.2s var(--ease) both; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(24px); }
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-icon { font-size: 16px; margin-top: 1px; }
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-info .toast-icon { color: var(--primary); }

/* Carrinho de itens (Nova/Editar OS) */
.os-itens-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 12px;
}

.os-catalogo-lista {
    display: none;
    margin-top: 6px;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
}

.os-catalogo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s var(--ease);
}

.os-catalogo-item:last-child { border-bottom: none; }
.os-catalogo-item:hover { background: var(--primary-soft); }
.os-catalogo-item.sem-estoque { opacity: 0.5; cursor: not-allowed; }

#osCarrinhoTable th { font-size: 12px; text-align: left; padding: 6px 4px; border-bottom: 2px solid var(--border); }
#osCarrinhoTable td { padding: 8px 4px; border-bottom: 1px solid #f1f5f9; font-size: 13px; }

/* Toggle Lista/Kanban */
.view-toggle {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: var(--radius-sm);
    padding: 3px;
    gap: 2px;
}

.view-toggle a {
    padding: 7px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.view-toggle a:hover { color: var(--dark); }
.view-toggle a.active { background: white; color: var(--primary); box-shadow: var(--shadow-sm); }

/* Kanban de OS */
.kanban-board {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    align-items: flex-start;
}

.kanban-column {
    background: #f8fafc;
    border-radius: var(--radius);
    min-width: 260px;
    max-width: 260px;
    flex-shrink: 0;
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 13px;
    color: #475569;
    border-bottom: 2px solid var(--border);
}

.kanban-count {
    background: white;
    border-radius: 999px;
    padding: 1px 9px;
    font-size: 12px;
    color: #64748b;
    box-shadow: var(--shadow-sm);
}

.kanban-column-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 65vh;
    overflow-y: auto;
}

.kanban-empty {
    text-align: center;
    color: #cbd5e1;
    font-size: 12px;
    padding: 20px 0;
}

.kanban-card {
    background: white;
    border-radius: var(--radius-sm);
    padding: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
    animation: fadeUp 0.25s var(--ease) both;
}

.kanban-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.kanban-card-title {
    display: block;
    font-weight: 700;
    font-size: 13px;
    color: var(--dark);
    text-decoration: none;
    margin-bottom: 6px;
}

.kanban-card-title:hover { color: var(--primary); }

.kanban-card-meta {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

.kanban-card-meta i { width: 12px; color: #94a3b8; }

.kanban-card-move { margin-top: 8px; }
.kanban-card-move select { padding: 6px 8px; font-size: 12px; border-radius: 6px; }

/* Timeline (histórico da OS) */
.os-timeline {
    position: relative;
    padding-left: 4px;
}

.os-timeline-item {
    display: flex;
    gap: 14px;
    position: relative;
    padding-bottom: 20px;
}

.os-timeline-item:last-child { padding-bottom: 0; }

.os-timeline-item::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 16px;
    bottom: -4px;
    width: 2px;
    background: var(--border);
}

.os-timeline-item:last-child::before { display: none; }

.os-timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
    flex-shrink: 0;
    margin-top: 3px;
    z-index: 1;
}

.os-timeline-content { font-size: 13px; }
.os-timeline-meta { color: #94a3b8; font-size: 12px; margin-top: 2px; }

/* Upload */
.image-upload-container {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.image-upload-container:hover {
    border-color: var(--primary);
    background: #eff6ff;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 900px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

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

    .top-header {
        padding: 12px 16px;
        gap: 10px;
    }

    .top-header h1 {
        font-size: 18px;
    }

    .header-search {
        display: none;
    }

    .content-wrapper {
        padding: 16px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-number {
        font-size: 22px;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .card-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 16px;
    }

    .card-body {
        padding: 16px;
    }

    thead th,
    tbody td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .login-box {
        padding: 28px 20px;
        margin: 16px;
    }
}
