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

:root {
  --primary: #f97316;
  --primary-dark: #ea6c0a;
  --primary-light: rgba(249,115,22,0.12);
  --bg: #0f0f17;
  --bg2: #1a1a2e;
  --bg3: #22223a;
  --bg4: #2a2a42;
  --border: #2d2d4a;
  --border-light: #3a3a5c;
  --text: #e2e8f0;
  --muted: #64748b;
  --muted2: #94a3b8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --sidebar-w: 260px;
  --topbar-h: 60px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

html, body { height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  overflow: hidden;
  font-size: 14px;
}

/* ── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Sidebar ───────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 100;
}

.sidebar-header { padding: 1.25rem 1rem; border-bottom: 1px solid var(--border); }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}
.sidebar-brand { font-size: 1rem; font-weight: 700; color: var(--text); }
.sidebar-sub { font-size: 0.7rem; color: var(--muted2); }

.nav-items { flex: 1; padding: 0.75rem 0.75rem; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  color: var(--muted2);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  user-select: none;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(249,115,22,0.2);
}

.sidebar-user {
  padding: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.user-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 0.875rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-group { font-size: 0.72rem; color: var(--muted2); }

.logout-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}
.logout-btn svg { width: 18px; height: 18px; }
.logout-btn:hover { color: var(--danger); background: rgba(239,68,68,0.1); }

/* ── Main ──────────────────────────────────────────────────────────────────── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.topbar {
  height: var(--topbar-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--muted2);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}
.menu-toggle svg { width: 22px; height: 22px; }

.page-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.topbar-right { display: flex; align-items: center; gap: 0.75rem; }

.clock-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--success);
}

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--success); box-shadow: 0 0 6px var(--success); animation: pulse 2s infinite; }
.dot-red { background: var(--danger); }
.dot-orange { background: var(--primary); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card-sm { padding: 1rem; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.card-title { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.card-subtitle { font-size: 0.78rem; color: var(--muted2); margin-top: 2px; }

/* ── 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); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ── Stat Cards ────────────────────────────────────────────────────────────── */
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 24px; height: 24px; }
.stat-icon.orange { background: rgba(249,115,22,0.15); color: var(--primary); }
.stat-icon.blue { background: rgba(59,130,246,0.15); color: var(--info); }
.stat-icon.green { background: rgba(16,185,129,0.15); color: var(--success); }
.stat-icon.yellow { background: rgba(245,158,11,0.15); color: var(--warning); }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--muted2); margin-top: 3px; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg4); }
.btn-danger { background: rgba(239,68,68,0.1); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-success { background: rgba(16,185,129,0.1); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }
.btn-success:hover { background: rgba(16,185,129,0.2); }
.btn-icon { padding: 0.4rem; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; }
.btn-icon:hover { background: var(--bg4); }
.btn-icon svg { width: 15px; height: 15px; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 0.95rem; border-radius: 10px; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-row { display: grid; gap: 1rem; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted2);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input, select, textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.875rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { resize: vertical; min-height: 80px; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 20px; padding-right: 2rem; }

.checkbox-group { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-group input[type="checkbox"] { width: auto; }
.checkbox-group label { margin: 0; text-transform: none; letter-spacing: 0; font-size: 0.875rem; color: var(--text); }

/* ── Tables ────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 0.625rem 0.875rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg3); }
tbody td { padding: 0.75rem 0.875rem; font-size: 0.875rem; }

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-orange { background: rgba(249,115,22,0.12); color: var(--primary); border: 1px solid rgba(249,115,22,0.2); }
.badge-blue { background: rgba(59,130,246,0.12); color: var(--info); border: 1px solid rgba(59,130,246,0.2); }
.badge-green { background: rgba(16,185,129,0.12); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }
.badge-yellow { background: rgba(245,158,11,0.12); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }
.badge-red { background: rgba(239,68,68,0.12); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.badge-gray { background: rgba(100,116,139,0.12); color: var(--muted2); border: 1px solid rgba(100,116,139,0.2); }

/* ── Search / Filters ──────────────────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}
.search-box svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.search-box input { padding-left: 2.25rem; }

/* ── Modal ─────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg2);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.2s;
  box-shadow: var(--shadow);
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-lg { max-width: 780px; }
.modal-xl { max-width: 960px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ── Toast ─────────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: var(--bg3);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  min-width: 260px;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  box-shadow: var(--shadow);
  animation: slideIn 0.25s ease;
}
@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.toast.fadeOut { animation: slideOut 0.25s ease forwards; }
@keyframes slideOut {
  to { transform: translateX(120%); opacity: 0; }
}
.toast-icon { width: 18px; height: 18px; flex-shrink: 0; }
.toast.success { border-left: 3px solid var(--success); }
.toast.success .toast-icon { color: var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.error .toast-icon { color: var(--danger); }
.toast.info { border-left: 3px solid var(--info); }
.toast.info .toast-icon { color: var(--info); }

/* ── Empty State ───────────────────────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted2);
}
.empty svg { width: 48px; height: 48px; opacity: 0.3; margin-bottom: 1rem; }
.empty h3 { font-size: 1rem; color: var(--text); margin-bottom: 0.5rem; }
.empty p { font-size: 0.875rem; }

/* ── Loading ───────────────────────────────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--muted2);
  gap: 0.75rem;
}
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ───────────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 1.25rem 0; }
.section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
}

/* ── Permissions Grid ──────────────────────────────────────────────────────── */
.perm-grid { display: flex; flex-direction: column; gap: 0.5rem; }
.perm-row {
  display: flex;
  align-items: center;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem;
  gap: 0.5rem;
}
.perm-label { flex: 1; font-size: 0.875rem; font-weight: 500; }
.perm-checks { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.perm-check { display: flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; color: var(--muted2); }
.perm-check input { width: 14px; height: 14px; margin: 0; }

/* ── Calendar ──────────────────────────────────────────────────────────────── */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.cal-title { font-size: 1rem; font-weight: 700; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-head {
  text-align: center;
  padding: 0.5rem 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cal-day {
  min-height: 80px;
  background: var(--bg3);
  border-radius: 8px;
  padding: 0.35rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s;
}
.cal-day:hover { border-color: var(--border-light); }
.cal-day.today { border-color: var(--primary); }
.cal-day.other-month .cal-day-num { opacity: 0.3; }
.cal-day-num { font-size: 0.78rem; font-weight: 600; color: var(--muted2); padding: 2px 4px; }
.cal-day.today .cal-day-num { color: var(--primary); }
.cal-event {
  font-size: 0.7rem;
  padding: 2px 5px;
  border-radius: 4px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

/* ── Invoice Items Table ───────────────────────────────────────────────────── */
.items-table { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.items-table table { margin: 0; }
.items-table thead th { background: var(--bg3); }
.item-actions { display: flex; gap: 0.35rem; }
.invoice-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
  padding: 0.875rem 1rem;
  background: var(--bg3);
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}
.invoice-total strong { font-size: 1.1rem; color: var(--primary); }

/* ── Announcement Card ─────────────────────────────────────────────────────── */
.announcement-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
}
.announcement-card.pinned { border-color: rgba(249,115,22,0.3); }
.announcement-card.pinned::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius) var(--radius) 0 0;
}
.ann-meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.625rem; flex-wrap: wrap; }
.ann-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.625rem; }
.ann-content { font-size: 0.875rem; color: var(--muted2); white-space: pre-line; line-height: 1.6; }
.ann-actions { display: flex; gap: 0.5rem; margin-top: 0.875rem; }

/* ── Rules ─────────────────────────────────────────────────────────────────── */
.rule-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.rule-category-header {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.rule-category-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(249,115,22,0.2);
}
.rule-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.5rem; }
.rule-content { font-size: 0.875rem; color: var(--muted2); white-space: pre-line; line-height: 1.7; }

/* ── Timeclock Big Button ───────────────────────────────────────────────────── */
.clock-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1rem;
}
.clock-status {
  font-size: 1rem;
  color: var(--muted2);
  margin-bottom: 0.5rem;
}
.clock-time-display {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.clock-date-display {
  font-size: 0.9rem;
  color: var(--muted2);
  margin-bottom: 2rem;
}
.clock-btn {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  box-shadow: 0 0 30px rgba(249,115,22,0.2);
}
.clock-btn svg { width: 36px; height: 36px; }
.clock-btn:hover { background: var(--primary); color: white; box-shadow: 0 0 40px rgba(249,115,22,0.4); transform: scale(1.05); }
.clock-btn.clocked-in { border-color: var(--danger); background: rgba(239,68,68,0.1); color: var(--danger); box-shadow: 0 0 30px rgba(239,68,68,0.2); }
.clock-btn.clocked-in:hover { background: var(--danger); color: white; }
.clock-duration { font-size: 0.9rem; color: var(--muted2); margin-top: 1rem; }

/* ── Employee card ─────────────────────────────────────────────────────────── */
.emp-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.15s;
}
.emp-card:hover { border-color: var(--border-light); }
.emp-card.inactive { opacity: 0.5; }
.emp-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
}
.emp-info { flex: 1; min-width: 0; }
.emp-name { font-weight: 700; font-size: 0.9rem; }
.emp-meta { font-size: 0.78rem; color: var(--muted2); margin-top: 2px; }
.emp-actions { display: flex; gap: 0.5rem; }

/* ── Parts ─────────────────────────────────────────────────────────────────── */
.part-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.part-row:last-child { border-bottom: none; }
.part-info { flex: 1; }
.part-name { font-weight: 600; font-size: 0.875rem; }
.part-cat { font-size: 0.75rem; color: var(--muted2); }
.part-price { font-weight: 700; color: var(--primary); white-space: nowrap; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    z-index: 200;
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: flex; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .form-row.cols-2 { grid-template-columns: 1fr; }
  .form-row.cols-3 { grid-template-columns: 1fr; }
  .content { padding: 1rem; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .cal-grid { grid-template-columns: repeat(7, 1fr); }
  .cal-day { min-height: 50px; }
}
