/* ============================================================
   LlavePlus – Main Design System CSS
   ============================================================ */

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

/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
  --primary:        #2563EB;
  --primary-dark:   #1d4ed8;
  --primary-light:  #eff6ff;
  --dark:           #0F172A;
  --dark-2:         #1e293b;
  --dark-3:         #334155;
  --light:          #F8FAFC;
  --white:          #ffffff;
  --success:        #10B981;
  --success-light:  #ecfdf5;
  --warning:        #F59E0B;
  --warning-light:  #fffbeb;
  --danger:         #EF4444;
  --danger-light:   #fef2f2;
  --info:           #3B82F6;
  --info-light:     #eff6ff;
  --gray:           #64748B;
  --gray-light:     #94a3b8;
  --gray-lighter:   #cbd5e1;
  --gray-border:    #e2e8f0;
  --sidebar-width:  260px;
  --topbar-height:  64px;
  --radius:         8px;
  --radius-lg:      12px;
  --radius-xl:      16px;
  --shadow-sm:      0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.1);
  --shadow:         0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-md:      0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --shadow-lg:      0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
  --transition:     all .2s ease;
  --font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: .9375rem;
  color: var(--dark);
  background: var(--light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.3; color: var(--dark); }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem; padding: .5rem 1.125rem; border-radius: var(--radius);
  font-size: .875rem; font-weight: 600; line-height: 1.5; cursor: pointer;
  transition: var(--transition); white-space: nowrap; border: 2px solid transparent; text-decoration: none;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.35); transform: translateY(-1px); }
.btn-secondary { background: var(--white); color: var(--dark-3); border-color: var(--gray-border); }
.btn-secondary:hover:not(:disabled) { background: var(--light); border-color: var(--gray-lighter); color: var(--dark); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #dc2626; border-color: #dc2626; color: #fff; box-shadow: 0 4px 12px rgba(239,68,68,.35); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover:not(:disabled) { background: #059669; border-color: #059669; color: #fff; }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-warning:hover:not(:disabled) { background: #d97706; border-color: #d97706; color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover:not(:disabled) { background: var(--primary); color: #fff; }
.btn-sm { padding: .3125rem .75rem; font-size: .8125rem; border-radius: 6px; }
.btn-lg { padding: .75rem 1.75rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius); }

/* Card */
.card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-border); overflow: hidden; transition: var(--transition); }
.card-header { padding: 1.125rem 1.5rem; border-bottom: 1px solid var(--gray-border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.card-header h3, .card-header h4 { font-size: 1rem; font-weight: 600; margin: 0; }
.card-body { padding: 1.5rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-border); background: var(--light); }

/* Table */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--gray-border); }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; white-space: nowrap; }
.table thead th { background: var(--light); padding: .75rem 1rem; text-align: left; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gray); border-bottom: 1px solid var(--gray-border); }
.table tbody td { padding: .875rem 1rem; border-bottom: 1px solid var(--gray-border); color: var(--dark-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table-hover tbody tr { transition: background .15s; }
.table-hover tbody tr:hover { background: var(--light); }
.table-striped tbody tr:nth-child(even) { background: #fafbfc; }

/* Badge */
.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.badge-blue    { background: #dbeafe; color: #1d4ed8; }
.badge-green   { background: #d1fae5; color: #065f46; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-red     { background: #fee2e2; color: #991b1b; }
.badge-yellow  { background: #fef3c7; color: #92400e; }
.badge-gray    { background: #f1f5f9; color: #475569; }
.badge-orange  { background: #ffedd5; color: #9a3412; }
.badge-teal    { background: #ccfbf1; color: #115e59; }
.badge-purple  { background: #ede9fe; color: #5b21b6; }
.badge-indigo  { background: #e0e7ff; color: #3730a3; }
.badge-lime    { background: #ecfccb; color: #365314; }
.badge-amber   { background: #fef3c7; color: #92400e; }

/* Forms */
.form-group { margin-bottom: 1.125rem; }
.form-label { display: block; font-size: .8125rem; font-weight: 600; color: var(--dark-2); margin-bottom: .375rem; }
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control { width: 100%; padding: .5625rem .875rem; border: 1.5px solid var(--gray-border); border-radius: var(--radius); font-size: .9rem; color: var(--dark); background: var(--white); transition: var(--transition); outline: none; line-height: 1.5; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form-control::placeholder { color: var(--gray-light); }
.form-control:disabled { background: var(--light); cursor: not-allowed; opacity: .7; }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-valid   { border-color: var(--success); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2.5rem; }
.form-check { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .875rem; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.form-text { font-size: .78rem; color: var(--gray); margin-top: .25rem; }
.invalid-feedback { font-size: .78rem; color: var(--danger); margin-top: .25rem; display: block; }
.input-group { display: flex; align-items: stretch; }
.input-group .form-control { border-radius: 0; flex: 1; }
.input-group .form-control:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.input-group .form-control:last-child  { border-radius: 0 var(--radius) var(--radius) 0; }
.input-group-text { display: flex; align-items: center; padding: .5625rem .875rem; background: var(--light); border: 1.5px solid var(--gray-border); font-size: .875rem; color: var(--gray); white-space: nowrap; }
.input-group .input-group-text:first-child { border-right: none; border-radius: var(--radius) 0 0 var(--radius); }
.input-group .input-group-text:last-child  { border-left: none; border-radius: 0 var(--radius) var(--radius) 0; }

/* Sidebar */
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-width); background: var(--dark); display: flex; flex-direction: column; z-index: 200; transition: transform .3s cubic-bezier(.4,0,.2,1); overflow: hidden; }
.sidebar-brand { padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.06); display: flex; align-items: center; gap: .75rem; text-decoration: none; flex-shrink: 0; }
.sidebar-brand img { height: 32px; width: auto; }
.sidebar-brand-name { font-size: 1.125rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.sidebar-brand-name span { color: var(--primary); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 1rem 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.1) transparent; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }
.sidebar-section { padding: .25rem .75rem .125rem; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.3); margin-top: .75rem; }
.sidebar-item { display: block; }
.sidebar-link { display: flex; align-items: center; gap: .75rem; padding: .6rem 1.5rem; color: rgba(255,255,255,.65); font-size: .875rem; font-weight: 500; text-decoration: none; transition: var(--transition); position: relative; }
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar-active .sidebar-link, .sidebar-link.sidebar-active { color: #fff; background: rgba(37,99,235,.25); font-weight: 600; }
.sidebar-active .sidebar-link::before, .sidebar-link.sidebar-active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); border-radius: 0 3px 3px 0; }
.sidebar-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: .8; }
.sidebar-active .sidebar-icon { opacity: 1; }
.sidebar-badge { margin-left: auto; background: var(--primary); color: #fff; font-size: .65rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; }
.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid rgba(255,255,255,.06); flex-shrink: 0; }

/* App Layout */
.app-wrapper { display: flex; min-height: 100vh; }
.main-content { flex: 1; display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
.topbar { position: sticky; top: 0; height: var(--topbar-height); background: var(--white); border-bottom: 1px solid var(--gray-border); display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; z-index: 100; gap: 1rem; box-shadow: var(--shadow-sm); }
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.topbar-right { display: flex; align-items: center; gap: .75rem; }
.topbar-title { font-size: 1.0625rem; font-weight: 700; color: var(--dark); }
.sidebar-toggle { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius); color: var(--gray); transition: var(--transition); }
.sidebar-toggle:hover { background: var(--light); color: var(--dark); }
.page-content { padding: 1.5rem; flex: 1; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-header h1 { font-size: 1.375rem; font-weight: 700; }
.page-header p  { font-size: .875rem; color: var(--gray); margin-top: .25rem; }

/* Grid */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Stat Cards */
.stat-card { background: var(--white); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; border: 1px solid var(--gray-border); box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 1rem; transition: var(--transition); }
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-icon { width: 52px; height: 52px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.5rem; }
.stat-icon.blue   { background: #dbeafe; color: var(--primary); }
.stat-icon.green  { background: #d1fae5; color: var(--success); }
.stat-icon.yellow { background: #fef3c7; color: var(--warning); }
.stat-icon.red    { background: #fee2e2; color: var(--danger); }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-info { flex: 1; min-width: 0; }
.stat-value { font-size: 1.625rem; font-weight: 800; color: var(--dark); line-height: 1.2; }
.stat-label { font-size: .8rem; color: var(--gray); font-weight: 500; margin-top: .15rem; }
.stat-change { font-size: .78rem; margin-top: .35rem; font-weight: 600; }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* Alert */
.alert { display: flex; align-items: flex-start; gap: .75rem; padding: .875rem 1.125rem; border-radius: var(--radius); font-size: .875rem; border: 1px solid transparent; margin-bottom: 1rem; }
.alert-info    { background: var(--info-light);    border-color: #bfdbfe; color: #1e40af; }
.alert-success { background: var(--success-light); border-color: #a7f3d0; color: #065f46; }
.alert-danger  { background: var(--danger-light);  border-color: #fecaca; color: #991b1b; }
.alert-warning { background: var(--warning-light); border-color: #fde68a; color: #92400e; }
.alert-close { margin-left: auto; background: none; border: none; cursor: pointer; opacity: .5; padding: 0; font-size: 1rem; line-height: 1; transition: opacity .15s; }
.alert-close:hover { opacity: 1; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.6); backdrop-filter: blur(3px); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity .25s; }
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal { background: var(--white); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); width: 100%; max-width: 540px; max-height: 90vh; display: flex; flex-direction: column; transform: scale(.95) translateY(10px); transition: transform .25s; }
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-sm { max-width: 400px; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 960px; }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-shrink: 0; }
.modal-header h3 { font-size: 1.0625rem; font-weight: 700; margin: 0; }
.modal-close { width: 30px; height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--gray); transition: var(--transition); flex-shrink: 0; }
.modal-close:hover { background: var(--light); color: var(--dark); }
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-border); display: flex; align-items: center; justify-content: flex-end; gap: .75rem; flex-shrink: 0; }

/* Pagination */
.pagination { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 .5rem; border-radius: var(--radius); font-size: .8125rem; font-weight: 500; color: var(--gray); border: 1px solid var(--gray-border); transition: var(--transition); text-decoration: none; }
.pagination a:hover { background: var(--light); color: var(--dark); }
.pagination .active, .pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* Avatar */
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; flex-shrink: 0; }
.avatar-sm { width: 28px; height: 28px; font-size: .7rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1rem; }

/* Dropdown */
.dropdown { position: relative; display: inline-flex; }
.dropdown-menu { position: absolute; top: calc(100% + .5rem); right: 0; background: var(--white); border: 1px solid var(--gray-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); min-width: 200px; z-index: 300; opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity .2s, transform .2s; }
.dropdown.open .dropdown-menu { opacity: 1; pointer-events: all; transform: translateY(0); }
.dropdown-item { display: flex; align-items: center; gap: .625rem; padding: .625rem 1rem; font-size: .875rem; color: var(--dark-2); cursor: pointer; transition: background .15s; }
.dropdown-item:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.dropdown-item:last-child  { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.dropdown-item:hover { background: var(--light); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-divider { border: none; border-top: 1px solid var(--gray-border); margin: .25rem 0; }

/* Tabs */
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--gray-border); margin-bottom: 1.5rem; }
.tab-link { padding: .625rem 1rem; font-size: .875rem; font-weight: 600; color: var(--gray); border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; transition: var(--transition); display: flex; align-items: center; gap: .5rem; }
.tab-link:hover { color: var(--primary); }
.tab-link.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Empty State */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1.5rem; text-align: center; color: var(--gray); }
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: .4; }
.empty-state h3 { font-size: 1rem; color: var(--dark-2); margin-bottom: .5rem; }
.empty-state p  { font-size: .875rem; margin-bottom: 1.25rem; }

/* Spinner */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2.5px solid rgba(37,99,235,.2); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Progress */
.progress { height: 8px; background: var(--gray-border); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 999px; transition: width .4s; }

/* Timeline */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: .5rem; top: 0; bottom: 0; width: 2px; background: var(--gray-border); }
.timeline-item { position: relative; margin-bottom: 1.25rem; }
.timeline-item::before { content: ''; position: absolute; left: -1.625rem; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); border: 2px solid var(--white); box-shadow: 0 0 0 2px var(--primary); }
.timeline-date { font-size: .75rem; color: var(--gray); margin-bottom: .25rem; }
.timeline-content { font-size: .875rem; color: var(--dark-2); }

/* Utilities */
.text-muted   { color: var(--gray) !important; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-dark    { color: var(--dark) !important; }
.text-white   { color: #fff !important; }
.text-sm  { font-size: .8125rem; }
.text-xs  { font-size: .75rem; }
.text-lg  { font-size: 1.125rem; }
.fw-400 { font-weight: 400; } .fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; } .fw-800 { font-weight: 800; }
.text-center { text-align: center; } .text-right { text-align: right; } .text-left { text-align: left; }
.mt-0{margin-top:0} .mt-1{margin-top:.25rem} .mt-2{margin-top:.5rem} .mt-3{margin-top:1rem} .mt-4{margin-top:1.5rem} .mt-5{margin-top:2rem}
.mb-0{margin-bottom:0} .mb-1{margin-bottom:.25rem} .mb-2{margin-bottom:.5rem} .mb-3{margin-bottom:1rem} .mb-4{margin-bottom:1.5rem} .mb-5{margin-bottom:2rem}
.p-0{padding:0} .p-1{padding:.25rem} .p-2{padding:.5rem} .p-3{padding:1rem} .p-4{padding:1.5rem}
.d-flex{display:flex} .d-grid{display:grid} .d-block{display:block} .d-none{display:none}
.flex-col{flex-direction:column} .flex-wrap{flex-wrap:wrap}
.align-center{align-items:center} .align-start{align-items:flex-start} .align-end{align-items:flex-end}
.justify-center{justify-content:center} .justify-between{justify-content:space-between} .justify-end{justify-content:flex-end}
.gap-1{gap:.25rem} .gap-2{gap:.5rem} .gap-3{gap:1rem} .gap-4{gap:1.5rem}
.w-100{width:100%} .h-100{height:100%}
.rounded{border-radius:var(--radius)} .rounded-lg{border-radius:var(--radius-lg)} .rounded-full{border-radius:999px}
.shadow-sm{box-shadow:var(--shadow-sm)} .shadow{box-shadow:var(--shadow)} .shadow-md{box-shadow:var(--shadow-md)}
.overflow-hidden{overflow:hidden} .overflow-auto{overflow:auto}
.position-relative{position:relative}
.separator { border: none; border-top: 1px solid var(--gray-border); margin: 1rem 0; }

/* Responsive */
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); z-index: 400; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: flex; }
  .main-content { margin-left: 0; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: 1fr; }
  .page-content { padding: 1rem; }
  .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 350; }
  .sidebar-backdrop.active { display: block; }
  .topbar-title { font-size: .9rem; }
  .table { font-size: .8125rem; }
  .card-body { padding: 1rem; }
  .card-header { padding: .875rem 1rem; }
}
@media (max-width: 576px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .btn-lg { padding: .625rem 1.25rem; font-size: .9rem; }
  .stat-card { padding: 1rem; }
  .stat-value { font-size: 1.375rem; }
}
@media print {
  .sidebar, .topbar, .btn, .no-print { display: none !important; }
  .main-content { margin-left: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  body { background: #fff; }
}
