* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; background: #f5f7fb; color: #1f2937; }
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: #111827; color: white; padding: 24px 18px; display: flex; flex-direction: column; gap: 24px; }
.brand h1 { margin: 0; font-size: 22px; }
.brand p { margin: 6px 0 0; color: #9ca3af; font-size: 14px; }
.nav { display: flex; flex-direction: column; gap: 10px; }
.nav-link { border: 0; text-align: left; background: transparent; color: #d1d5db; padding: 12px 14px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.nav-link:hover, .nav-link.active { background: #1f2937; color: white; }
.sidebar-footer { margin-top: auto; }
.main { padding: 28px; }
.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 20px; }
.topbar h2 { margin: 0; }
.topbar p { margin: 4px 0 0; color: #6b7280; }
.card, .subcard { background: white; border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); padding: 18px; }
.subcard { margin-bottom: 16px; border: 1px solid #e5e7eb; box-shadow: none; }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.section-head.between { justify-content: space-between; }
.section-head h3, .subcard h4 { margin: 0; }
.inline-actions { display: flex; gap: 10px; }
label { display: block; margin-bottom: 6px; font-size: 13px; color: #4b5563; }
input { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 10px; background: white; }
.primary-btn, .secondary-btn { border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; font-size: 14px; }
.primary-btn { background: #2563eb; color: white; }
.secondary-btn { background: #e5e7eb; color: #111827; }
.full-width { width: 100%; }
.actions { display: flex; gap: 10px; margin-top: 14px; }
.form-grid, .modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.full-span { grid-column: 1 / -1; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: top; font-size: 14px; }
th { color: #6b7280; font-weight: 600; }
.hidden { display: none !important; }
.pill { background: #dbeafe; color: #1d4ed8; padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi-card strong { display: block; font-size: 28px; margin-top: 8px; }
.kpi-label { color: #6b7280; font-size: 13px; }
.modal { position: fixed; inset: 0; background: rgba(17, 24, 39, 0.55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-content { background: white; border-radius: 14px; padding: 20px; width: 100%; max-width: 640px; }
.toast { position: fixed; right: 20px; bottom: 20px; background: #111827; color: white; padding: 12px 16px; border-radius: 10px; box-shadow: 0 8px 20px rgba(0,0,0,0.18); }
.auth-card { max-width: 520px; }
@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; align-items: center; overflow-x: auto; }
  .sidebar-footer { margin-top: 0; margin-left: auto; }
  .kpi-grid, .form-grid, .modal-grid { grid-template-columns: 1fr; }
}
