/* UmrahOS — Global CSS App */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --platform-primary: #0F172A;
  --platform-accent:  #10B981;
  --platform-gold:    #F59E0B;
  --travel-primary:   #1E3A8A;
  --travel-accent:    #F59E0B;

  --sidebar-w: 256px;
  --radius:    12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
}

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

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: #F8FAFC;
  color: #0F172A;
  line-height: 1.6;
  font-size: 14px;
}

/* ── LAYOUT ── */
.app-layout { display: flex; min-height: 100vh; }
.main-content { flex: 1; margin-left: var(--sidebar-w); padding: 24px; max-width: 100%; }

/* ── SIDEBAR ── */
.sidebar {
  position: fixed; left: 0; top: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--travel-primary);
  display: flex; flex-direction: column;
  z-index: 50; transition: transform .3s;
  box-shadow: 4px 0 24px rgba(0,0,0,.15);
}
.sidebar-logo { padding: 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-logo img { height: 40px; object-fit: contain; max-width: 100%; }
.sidebar-logo .logo-text { color: #fff; font-weight: 700; font-size: 18px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 4px; }

.nav-label { color: rgba(255,255,255,.4); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 10px 12px 2px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; border-radius: 8px; margin-bottom: 1px;
  color: rgba(255,255,255,.7); text-decoration: none;
  font-size: 13.5px; font-weight: 500;
  transition: all .2s;
}
.nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.2); color: #fff; font-weight: 600; }
.nav-item .nav-icon { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.nav-badge { margin-left: auto; background: #EF4444; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 20px; }

.sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: 14px; flex-shrink: 0; }
.user-name { color: #fff; font-weight: 600; font-size: 13px; }
.user-role { color: rgba(255,255,255,.5); font-size: 11px; }

/* ── TOPBAR ── */
.topbar {
  background: #fff; border-bottom: 1px solid #E2E8F0;
  padding: 12px 24px; display: flex; align-items: center;
  justify-content: space-between; position: sticky; top: 0; z-index: 40;
  box-shadow: var(--shadow-sm);
}
.topbar-title { font-size: 18px; font-weight: 700; color: #0F172A; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

/* ── CARDS ── */
.card { background: #fff; border-radius: var(--radius); border: 1px solid #E2E8F0; padding: 24px; box-shadow: var(--shadow-sm); }
.card-title { font-size: 16px; font-weight: 700; color: #0F172A; margin-bottom: 4px; }
.card-subtitle { font-size: 13px; color: #64748B; margin-bottom: 20px; }

/* ── STAT CARDS ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: var(--radius); border: 1px solid #E2E8F0; padding: 20px; box-shadow: var(--shadow-sm); transition: box-shadow .2s; }
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 12px; }
.stat-value { font-size: 26px; font-weight: 800; color: #0F172A; line-height: 1; }
.stat-label { font-size: 13px; color: #64748B; margin-top: 4px; }
.stat-trend { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; display: inline-flex; align-items: center; gap: 3px; margin-top: 8px; }
.trend-up { background: #DCFCE7; color: #16A34A; }
.trend-down { background: #FEE2E2; color: #DC2626; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: all .2s; white-space: nowrap; }
.btn-primary { background: var(--travel-primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.15); }
.btn-accent  { background: var(--travel-accent); color: #0F172A; }
.btn-green   { background: #10B981; color: #fff; }
.btn-green:hover { background: #059669; }
.btn-red     { background: #EF4444; color: #fff; }
.btn-red:hover { background: #DC2626; }
.btn-gray    { background: #F1F5F9; color: #475569; border: 1px solid #E2E8F0; }
.btn-gray:hover { background: #E2E8F0; }
.btn-outline { background: transparent; border: 1.5px solid var(--travel-primary); color: var(--travel-primary); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { padding: 7px; border-radius: 8px; }

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-green  { background: #DCFCE7; color: #16A34A; }
.badge-yellow { background: #FEF9C3; color: #A16207; }
.badge-red    { background: #FEE2E2; color: #DC2626; }
.badge-blue   { background: #DBEAFE; color: #1D4ED8; }
.badge-gray   { background: #F1F5F9; color: #475569; }
.badge-teal   { background: #CCFBF1; color: #0F766E; }
.badge-indigo { background: #E0E7FF; color: #4338CA; }
.badge-purple { background: #EDE9FE; color: #7C3AED; }
.badge-orange { background: #FFEDD5; color: #C2410C; }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.form-label .required { color: #EF4444; margin-left: 2px; }
.form-control {
  width: 100%; padding: 9px 14px; border-radius: 8px;
  border: 1.5px solid #E2E8F0; font-size: 13.5px; font-family: inherit;
  background: #fff; color: #0F172A;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus { outline: none; border-color: var(--travel-primary); box-shadow: 0 0 0 3px rgba(30,58,138,.1); }
.form-control.is-invalid { border-color: #EF4444; }
.form-error { color: #EF4444; font-size: 12px; margin-top: 4px; }
.form-hint  { color: #94A3B8; font-size: 12px; margin-top: 4px; }

textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* ── TABLES ── */
.table-container { overflow-x: auto; border-radius: var(--radius); border: 1px solid #E2E8F0; }
table { width: 100%; border-collapse: collapse; }
thead { background: #F8FAFC; }
th { padding: 11px 16px; text-align: left; font-size: 12px; font-weight: 700; color: #64748B; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid #E2E8F0; white-space: nowrap; }
td { padding: 13px 16px; font-size: 13.5px; color: #374151; border-bottom: 1px solid #F1F5F9; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #F8FAFC; }
.td-actions { display: flex; gap: 6px; align-items: center; }

/* ── ALERTS ── */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 13.5px; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.alert-success { background: #DCFCE7; color: #14532D; border: 1px solid #86EFAC; }
.alert-error   { background: #FEE2E2; color: #7F1D1D; border: 1px solid #FCA5A5; }
.alert-warning { background: #FEF9C3; color: #713F12; border: 1px solid #FDE68A; }
.alert-info    { background: #DBEAFE; color: #1E3A8A; border: 1px solid #93C5FD; }

/* ── MODAL ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { background: #fff; border-radius: 16px; padding: 28px; max-width: 520px; width: 100%; box-shadow: var(--shadow-lg); animation: modalIn .2s ease; }
@keyframes modalIn { from { opacity:0; transform: scale(.95) translateY(-10px); } to { opacity:1; transform: scale(1) translateY(0); } }
.modal-title { font-size: 18px; font-weight: 700; color: #0F172A; margin-bottom: 6px; }
.modal-subtitle { font-size: 13px; color: #64748B; margin-bottom: 20px; }

/* ── PAGINATION ── */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 20px; }
.page-link { padding: 7px 12px; border-radius: 6px; font-size: 13px; font-weight: 500; text-decoration: none; color: #475569; border: 1px solid #E2E8F0; transition: all .15s; }
.page-link:hover { background: #F1F5F9; }
.page-link.active { background: var(--travel-primary); color: #fff; border-color: var(--travel-primary); }
.page-link.disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* ── BREADCRUMB ── */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #94A3B8; margin-bottom: 20px; }
.breadcrumb a { color: #94A3B8; text-decoration: none; }
.breadcrumb a:hover { color: var(--travel-primary); }
.breadcrumb .sep { color: #CBD5E1; }
.breadcrumb .current { color: #374151; font-weight: 600; }

/* ── PROGRESS BAR ── */
.progress { height: 6px; background: #E2E8F0; border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 4px; transition: width .4s; background: var(--travel-primary); }

/* ── AVATAR ── */
.avatar-initial { width: 36px; height: 36px; border-radius: 50%; background: var(--travel-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }

/* ── TOAST ── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 14px 18px; border-radius: 10px; color: #fff; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; max-width: 360px; animation: toastIn .3s ease; }
@keyframes toastIn { from { opacity:0; transform: translateY(16px); } to { opacity:1; transform: translateY(0); } }
.toast-success { background: #10B981; }
.toast-error   { background: #EF4444; }
.toast-warning { background: #F59E0B; }
.toast-info    { background: #3B82F6; }

/* ── SEARCH BOX ── */
.search-box { position: relative; }
.search-box input { padding-left: 38px; }
.search-box .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94A3B8; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 48px 24px; color: #94A3B8; }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: #475569; margin-bottom: 6px; }
.empty-state p { font-size: 13px; margin-bottom: 16px; }

/* ── SUSPENDED BANNER ── */
.suspended-banner { background: #DC2626; color: #fff; text-align: center; padding: 10px 24px; font-size: 13px; font-weight: 500; }
.suspended-banner a { color: #FEF9C3; font-weight: 700; text-decoration: underline; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ── UTILITIES ── */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.text-sm { font-size: 12.5px; }
.text-muted { color: #94A3B8; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
