/* ===== AMOM Components ===== */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
  border: 1px solid transparent;
  line-height: 1.5;
}
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(14,165,233,0.3);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(14,165,233,0.45);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--color-surface2);
  border-color: var(--color-border2);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover:not(:disabled) {
  background: rgba(14,165,233,0.1);
}

.btn-danger {
  background: rgba(248,113,113,0.15);
  color: var(--color-danger);
  border-color: rgba(248,113,113,0.3);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(248,113,113,0.25);
}

.btn-success {
  background: rgba(52,211,153,0.15);
  color: var(--color-success);
  border-color: rgba(52,211,153,0.3);
}
.btn-success:hover:not(:disabled) { background: rgba(52,211,153,0.25); }

.btn-sm { padding: var(--sp-1) var(--sp-3); font-size: var(--text-xs); }
.btn-lg { padding: var(--sp-3) var(--sp-8); font-size: var(--text-base); }
.btn-icon { padding: var(--sp-2); width: 34px; height: 34px; justify-content: center; }
.btn-full { width: 100%; justify-content: center; }

/* ── Cards ── */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.card:hover { border-color: var(--color-border2); }
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--color-border);
}
.card-title { font-size: var(--text-base); font-weight: var(--font-semibold); }
.card-body { padding: var(--sp-5) var(--sp-6); }
.card-footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--color-border);
  background: rgba(0,0,0,0.1);
}

/* Stat Cards */
.stat-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-5) var(--sp-6);
  display: flex; align-items: flex-start; gap: var(--sp-4);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--card-accent, var(--gradient-primary));
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--color-border2); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-xl);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
}
.stat-info { flex: 1; min-width: 0; }
.stat-label { font-size: var(--text-xs); color: var(--color-text-muted); font-weight: var(--font-medium); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--sp-1); }
.stat-value { font-size: var(--text-2xl); font-weight: var(--font-bold); line-height: 1.2; }
.stat-sub   { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--sp-1); }
.stat-trend { font-size: var(--text-xs); font-weight: var(--font-semibold); }
.stat-trend.up   { color: var(--color-success); }
.stat-trend.down { color: var(--color-danger); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  white-space: nowrap;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.badge-success  { background: var(--color-success-bg);  color: var(--color-success); }
.badge-warning  { background: var(--color-warning-bg);  color: var(--color-warning); }
.badge-danger   { background: var(--color-danger-bg);   color: var(--color-danger); }
.badge-info     { background: var(--color-info-bg);     color: var(--color-info); }
.badge-primary  { background: rgba(56,189,248,0.12);    color: var(--color-primary); }
.badge-secondary{ background: rgba(45,212,191,0.12);    color: var(--color-secondary); }
.badge-subtle   { background: var(--color-surface2);    color: var(--color-text-muted); }
.badge-purple   { background: rgba(167,139,250,0.12);   color: var(--color-accent); }

/* ── Forms ── */
.form-group { margin-bottom: var(--sp-5); }
.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-2);
}
.form-label .required { color: var(--color-danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
}
.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(14,165,233,0.15);
  background: var(--color-surface2);
}
.form-control::placeholder { color: var(--color-text-subtle); }
.form-control:disabled { opacity: 0.6; cursor: not-allowed; }

select.form-control { cursor: pointer; }
select.form-control option { background: var(--color-surface); color: var(--color-text); }

textarea.form-control { resize: vertical; min-height: 100px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.form-hint { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--sp-1); }
.form-error { font-size: var(--text-xs); color: var(--color-danger); margin-top: var(--sp-1); }
.form-control.error { border-color: var(--color-danger); }

.input-group { position: relative; }
.input-icon {
  position: absolute; left: var(--sp-4); top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-subtle);
  pointer-events: none;
  display: flex;
}
.input-group .form-control { padding-left: calc(var(--sp-4) * 2 + 16px); }
.input-addon-right {
  position: absolute; right: var(--sp-3); top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  cursor: pointer;
}

/* Toggle/Switch */
.toggle-switch {
  display: flex; align-items: center; gap: var(--sp-2); cursor: pointer;
}
.toggle-input { display: none; }
.toggle-track {
  width: 44px; height: 24px;
  background: var(--color-surface3);
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--transition-base);
  border: 1px solid var(--color-border);
}
.toggle-input:checked + .toggle-track { background: var(--color-primary); border-color: var(--color-primary); }
.toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-spring);
  box-shadow: var(--shadow-sm);
}
.toggle-input:checked + .toggle-track .toggle-thumb { transform: translateX(20px); }

/* Checkbox */
.checkbox-label {
  display: flex; align-items: center; gap: var(--sp-2);
  cursor: pointer; font-size: var(--text-sm); color: var(--color-text-muted);
}
.checkbox-input { display: none; }
.checkbox-box {
  width: 18px; height: 18px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--color-surface);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.checkbox-input:checked + .checkbox-box {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.checkbox-input:checked + .checkbox-box::after {
  content: '✓';
  color: white;
  font-size: 11px;
  font-weight: bold;
}

/* ── Tables ── */
.table-container { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.data-table th {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
  background: rgba(0,0,0,0.15);
}
.data-table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  vertical-align: middle;
}
.data-table tbody tr { transition: background var(--transition-fast); }
.data-table tbody tr:hover { background: rgba(56,189,248,0.04); }
.data-table tbody tr:last-child td { border-bottom: none; }

.table-actions { display: flex; gap: var(--sp-1); }

/* ── Tabs ── */
.tabs-container { margin-bottom: var(--sp-5); }
.tabs-list {
  display: flex;
  gap: var(--sp-1);
  background: var(--color-surface);
  padding: var(--sp-1);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  overflow-x: auto;
  margin-bottom: var(--sp-4);
}
.tab-btn {
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-muted);
  white-space: nowrap;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  background: none;
}
.tab-btn:hover { color: var(--color-text); background: var(--color-surface2); }
.tab-btn.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(14,165,233,0.3);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.25s ease; }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4);
  animation: backdropIn 0.2s ease;
}
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdropOut { to { opacity: 0; } }

.modal {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border2);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn var(--transition-spring) both;
}
.modal-lg  { max-width: 780px; }
.modal-xl  { max-width: 960px; }
.modal-sm  { max-width: 400px; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--color-border);
}
.modal-title { font-size: var(--text-lg); font-weight: var(--font-semibold); }
.modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.modal-close:hover { background: var(--color-surface2); color: var(--color-text); }
.modal-body { padding: var(--sp-6); }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--color-border);
}

/* ── Filters Bar ── */
.filters-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}
.filters-bar .form-control { flex: 1; min-width: 200px; }
.search-field { min-width: 240px !important; }

/* ── Notification Panel ── */
.notif-panel {
  position: fixed;
  top: calc(var(--header-height) + 8px);
  right: var(--sp-4);
  width: 360px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  z-index: calc(var(--z-header) + 1);
  overflow: hidden;
  animation: slideDown var(--transition-spring) both;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.notif-header { padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--color-border); display: flex; align-items: center; justify-content: space-between; }
.notif-item { display: flex; gap: var(--sp-3); padding: var(--sp-3) var(--sp-5); border-bottom: 1px solid var(--color-border); transition: background var(--transition-fast); cursor: pointer; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--color-surface); }
.notif-item.unread { background: rgba(14,165,233,0.05); }
.notif-icon { width: 36px; height: 36px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: var(--text-sm); font-weight: var(--font-medium); margin-bottom: 2px; }
.notif-body  { font-size: var(--text-xs); color: var(--color-text-muted); }
.notif-time  { font-size: var(--text-xs); color: var(--color-text-subtle); white-space: nowrap; }

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.toast {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  min-width: 280px;
  max-width: 380px;
  animation: toastIn var(--transition-spring) both;
}
.toast.exiting { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(40px); }
}
.toast-success { border-left: 3px solid var(--color-success); }
.toast-error   { border-left: 3px solid var(--color-danger); }
.toast-warning { border-left: 3px solid var(--color-warning); }
.toast-info    { border-left: 3px solid var(--color-info); }

/* ── Search & Filters ── */
.search-input-group { position: relative; flex: 1; }
.search-input-group .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--color-text-subtle); pointer-events: none; }
.search-input-group .form-control { padding-left: 38px; }

/* ── Progress Bar ── */
.progress-bar { height: 6px; background: var(--color-surface2); border-radius: var(--radius-full); overflow: hidden; }
.progress-fill { height: 100%; border-radius: var(--radius-full); background: var(--gradient-primary); transition: width 0.5s ease; }

/* ── Skeleton Loading ── */
.skeleton { background: linear-gradient(90deg, var(--color-surface) 0%, var(--color-surface2) 50%, var(--color-surface) 100%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-md); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Divider ── */
.divider { height: 1px; background: var(--color-border); margin: var(--sp-5) 0; }
.divider-text { display: flex; align-items: center; gap: var(--sp-3); color: var(--color-text-subtle); font-size: var(--text-xs); margin: var(--sp-5) 0; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--color-border); }

/* ── Chip / Tag ── */
.chip {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: 4px 12px;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.chip:hover, .chip.active { background: rgba(14,165,233,0.15); border-color: var(--color-primary); color: var(--color-primary); }
.chip.active { cursor: default; }

/* ── Stats mini ── */
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.mini-stat { text-align: center; padding: var(--sp-3); background: var(--color-surface); border-radius: var(--radius-lg); border: 1px solid var(--color-border); }
.mini-stat-val { font-size: var(--text-xl); font-weight: var(--font-bold); }
.mini-stat-lbl { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 2px; }

/* ── Avatar group ── */
.avatar-group { display: flex; }
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--color-bg); margin-left: -8px; background: var(--gradient-secondary); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: bold; color: white; }
.avatar-group .avatar-sm:first-child { margin-left: 0; }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--color-border); }
.timeline-item { position: relative; margin-bottom: var(--sp-5); }
.timeline-dot { position: absolute; left: -22px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--color-primary); border: 2px solid var(--color-bg); }
.timeline-content { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--sp-3) var(--sp-4); }

/* Calendar Base */
.calendar { background: var(--gradient-card); border: 1px solid var(--color-border); border-radius: var(--radius-xl); overflow: hidden; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--color-border); }
.cal-month { font-weight: var(--font-semibold); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-day-name { text-align: center; padding: var(--sp-2); font-size: var(--text-xs); color: var(--color-text-muted); font-weight: var(--font-semibold); border-bottom: 1px solid var(--color-border); }
.cal-day {
  height: 85px; padding: var(--sp-2); border: 1px solid var(--color-border);
  border-top: none; border-left: none;
  font-size: var(--text-xs); cursor: pointer;
  transition: all var(--transition-fast);
  display: flex; flex-direction: column;
}
.cal-day:nth-child(7n) { border-right: none; }
.cal-day:hover { background: var(--color-surface2); }
.cal-day.today { background: rgba(14,165,233,0.05); }
.cal-day.today .cal-date { background: var(--color-primary); color: white; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.cal-day.other-month { opacity: 0.3; pointer-events: none; background: var(--color-surface); }
.cal-day.holiday .cal-date { color: var(--color-danger); font-weight: bold; }
.cal-day-name.holiday { color: var(--color-danger); }
.cal-day.selected { border: 2px solid var(--color-primary); background: rgba(14,165,233,0.05); }

.cal-dots { display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.cal-dot-more { font-size: 9px; line-height: 6px; color: var(--color-text-subtle); font-weight: bold; margin-left: 2px; }
.cal-dot.emp-end { background: var(--color-warning); }
.cal-dot.project-end { background: var(--color-danger); }
.cal-dot.itenerary { background: var(--color-primary); }
.cal-dot.payday { background: var(--color-success); }
.cal-dot.holiday { background: var(--color-danger); }

/* ── Chart container ── */
.chart-container { position: relative; width: 100%; }
.chart-container canvas { width: 100% !important; }

/* ── Role Permission Matrix ── */
.permission-matrix th, .permission-matrix td { padding: var(--sp-2) var(--sp-3); font-size: var(--text-xs); }
.permission-matrix th { font-weight: var(--font-semibold); background: rgba(0,0,0,0.2); }
.perm-check { width: 18px; height: 18px; accent-color: var(--color-primary); cursor: pointer; }

/* ── Upload area ── */
.upload-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--color-primary);
  background: rgba(14,165,233,0.05);
}
.upload-zone input { display: none; }
.upload-icon { font-size: 36px; margin-bottom: var(--sp-3); }

/* ── No permission notice ── */
.no-permission {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--sp-16);
  text-align: center;
  color: var(--color-text-muted);
}
.no-permission-icon { font-size: 48px; margin-bottom: var(--sp-4); opacity: 0.4; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes bounceIn { 0% { transform: scale(0.8); opacity: 0; } 70% { transform: scale(1.05); } 100% { transform: scale(1); opacity: 1; } }

/* ── Toggle Switch ── */
.toggle-switch { position: relative; display: inline-block; cursor: pointer; }
.toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  display: block; width: 44px; height: 24px;
  background: var(--color-surface2); border-radius: 12px;
  border: 1px solid var(--color-border);
  transition: background var(--transition-fast), border-color var(--transition-fast);
  position: relative;
}
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%; background: var(--color-text-muted);
  transition: transform var(--transition-fast), background var(--transition-fast);
}
.toggle-input:checked + .toggle-track { background: rgba(52,211,153,0.25); border-color: var(--color-success); }
.toggle-input:checked + .toggle-track .toggle-thumb { background: var(--color-success); transform: translateX(20px); }

/* ── Notification Panel ── */
.notif-panel {
  position: fixed; top: 64px; right: 16px;
  width: 360px; max-height: 480px; overflow-y: auto;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); z-index: 1001;
  box-shadow: var(--shadow-xl);
  animation: slideInDown 0.25s ease;
}
.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--color-border);
}
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--color-border);
  cursor: pointer; transition: background var(--transition-fast);
}
.notif-item:hover { background: var(--color-surface); }
.notif-item.unread { background: rgba(56,189,248,0.04); }
.notif-item.unread::before { content: ''; position: absolute; left: 0; width: 3px; top: 14px; bottom: 14px; background: var(--color-primary); border-radius: 0 2px 2px 0; }
.notif-item { position: relative; }
.notif-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: var(--font-semibold); margin-bottom: 2px; }
.notif-body { font-size: 12px; color: var(--color-text-muted); line-height: 1.5; }
.notif-time { font-size: 11px; color: var(--color-text-subtle); white-space: nowrap; flex-shrink: 0; }
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-primary);
  display: none;
  box-shadow: 0 0 6px rgba(56,189,248,0.6);
}

/* ── Page Loader ── */
#page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--color-bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s ease;
}
#page-loader.hidden { opacity: 0; pointer-events: none; }
.loader-ring {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 3px solid var(--color-surface);
  border-top-color: var(--color-primary);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── btn-warning ── */
.btn-warning {
  background: rgba(251,191,36,0.15);
  color: var(--color-warning);
  border-color: rgba(251,191,36,0.3);
}
.btn-warning:hover:not(:disabled) { background: rgba(251,191,36,0.25); }

/* ── Loading Dots ── */
.loading-dots { display: inline-flex; gap: 4px; align-items: center; }
.loading-dots span { width: 6px; height: 6px; border-radius: 50%; background: white; animation: dot-bounce 1.4s infinite ease-in-out; }
.loading-dots span:nth-child(2) { animation-delay: 0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0.32s; }
@keyframes dot-bounce { 0%,80%,100%{transform:scale(0)} 40%{transform:scale(1)} }

/* ── Grid utilities ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-4); }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--sp-4); }
.grid-5 { display: grid; grid-template-columns: repeat(5,1fr); gap: var(--sp-4); }
@media(max-width:1200px){ .grid-5{grid-template-columns:repeat(3,1fr)} }
@media(max-width:900px){ .grid-2,.grid-3,.grid-4,.grid-5{grid-template-columns:1fr 1fr} }
@media(max-width:600px){ .grid-2,.grid-3,.grid-4,.grid-5{grid-template-columns:1fr} }

/* ── Horizontal Calendar (Itinerary) ── */
.horizontal-calendar-container {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-4) var(--sp-2);
  box-shadow: var(--shadow-sm);
}
.horizontal-calendar {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: var(--sp-2);
  padding: 0 var(--sp-2) 8px var(--sp-2); /* bottom padding for scrollbar */
}
.horizontal-calendar::-webkit-scrollbar {
  height: 6px;
}
.horizontal-calendar::-webkit-scrollbar-track {
  background: transparent;
}
.horizontal-calendar::-webkit-scrollbar-thumb {
  background: var(--color-border2);
  border-radius: 4px;
}
.cal-date-item {
  min-width: 65px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-3) var(--sp-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface2);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  position: relative;
}
.cal-date-item:hover {
  background: var(--color-surface3);
  border-color: var(--color-border2);
  transform: translateY(-1px);
}
.cal-date-item.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(14,165,233,0.3);
}
.cal-date-item.today::before {
  content: 'Hari ini';
  position: absolute;
  top: -10px;
  font-size: 9px;
  background: var(--color-primary);
  color: #fff;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: var(--font-bold);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.cal-day {
  font-size: var(--text-xs);
  text-transform: uppercase;
  font-weight: var(--font-semibold);
  opacity: 0.8;
  margin-bottom: 4px;
}
.cal-num {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  line-height: 1;
}
.cal-dot {
  width: 6px;
  height: 6px;
  background: var(--color-danger);
  border-radius: 50%;
  margin-top: 6px;
}
.cal-date-item.active .cal-dot {
  background: white;
}
