/* ── FlyOnJourney CRM Theme ── Orange #E67E22 | Blue #1A3A6B ── */
:root {
  --foj-orange: #E67E22;
  --foj-orange-dark: #D35400;
  --foj-blue: #1A3A6B;
  --foj-blue-mid: #2557A7;
  --foj-blue-light: #EAF0FB;
  --foj-sidebar-bg: #0D2247;
  --foj-sidebar-hover: #1A3A6B;
  --foj-sidebar-active: #E67E22;
  --foj-text: #2C3E50;
  --foj-muted: #7F8C8D;
  --foj-border: #E8ECF0;
  --foj-card-shadow: 0 2px 12px rgba(26,58,107,.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: #F4F6FB; color: var(--foj-text); font-size: 14px; }

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: 240px; min-height: 100vh; background: var(--foj-sidebar-bg);
  position: fixed; top: 0; left: 0; z-index: 1000;
  display: flex; flex-direction: column; transition: width .3s;
}
.sidebar-brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-brand img { width: 38px; height: 38px; object-fit: contain; }
.sidebar-brand span { color: #fff; font-weight: 700; font-size: 1rem; line-height: 1.2; }
.sidebar-brand small { color: #E67E22; font-size: .7rem; font-weight: 500; letter-spacing: .5px; display: block; }

.sidebar-nav { flex: 1; padding: 10px 0; overflow-y: auto; }
.nav-section-label {
  padding: 14px 18px 4px;
  font-size: .65rem; font-weight: 700; letter-spacing: 1.2px;
  color: rgba(255,255,255,.3); text-transform: uppercase;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; color: rgba(255,255,255,.7);
  text-decoration: none; font-size: .875rem;
  border-left: 3px solid transparent;
  transition: all .2s;
}
.sidebar-nav a:hover { background: var(--foj-sidebar-hover); color: #fff; border-left-color: rgba(230,126,34,.5); }
.sidebar-nav a.active { background: rgba(230,126,34,.15); color: #E67E22; border-left-color: #E67E22; font-weight: 600; }
.sidebar-nav a i { width: 18px; text-align: center; font-size: .9rem; }
.sidebar-nav .badge-count { margin-left: auto; background: #E67E22; color: #fff; border-radius: 10px; padding: 1px 7px; font-size: .7rem; font-weight: 700; }

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-footer a { color: rgba(255,255,255,.5); font-size: .8rem; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.sidebar-footer a:hover { color: #fff; }

/* ── Main content ──────────────────────────────────────────── */
.main-content { margin-left: 240px; min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  background: #fff; padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--foj-border);
  position: sticky; top: 0; z-index: 100;
}
.topbar-title { font-size: 1.1rem; font-weight: 600; color: var(--foj-blue); }
.topbar-title small { font-size: .75rem; color: var(--foj-muted); font-weight: 400; display: block; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-user { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.topbar-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #E67E22, #1A3A6B);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .85rem;
}
.topbar-user-info span { font-size: .85rem; font-weight: 600; color: var(--foj-blue); display: block; }
.topbar-user-info small { font-size: .72rem; color: var(--foj-muted); }

.page-body { padding: 24px 28px; flex: 1; }

/* ── Stat cards ────────────────────────────────────────────── */
.stat-card {
  background: #fff; border-radius: 12px; padding: 20px 22px;
  box-shadow: var(--foj-card-shadow); border: 1px solid var(--foj-border);
  display: flex; align-items: center; gap: 16px;
  transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(26,58,107,.13); }
.stat-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.stat-icon.orange { background: rgba(230,126,34,.12); color: #E67E22; }
.stat-icon.blue   { background: rgba(26,58,107,.1);   color: #1A3A6B; }
.stat-icon.green  { background: rgba(39,174,96,.12);  color: #27AE60; }
.stat-icon.red    { background: rgba(231,76,60,.12);  color: #E74C3C; }
.stat-icon.purple { background: rgba(142,68,173,.12); color: #8E44AD; }
.stat-icon.teal   { background: rgba(26,188,156,.12); color: #1ABC9C; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--foj-blue); line-height: 1; }
.stat-label { font-size: .78rem; color: var(--foj-muted); margin-top: 3px; }

/* ── Cards ─────────────────────────────────────────────────── */
.foj-card {
  background: #fff; border-radius: 12px;
  box-shadow: var(--foj-card-shadow); border: 1px solid var(--foj-border);
  overflow: hidden;
}
.foj-card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--foj-border);
  display: flex; align-items: center; justify-content: space-between;
  background: #FAFBFD;
}
.foj-card-header h5 {
  font-size: .95rem; font-weight: 600; color: var(--foj-blue);
  display: flex; align-items: center; gap: 8px; margin: 0;
}
.foj-card-header h5 i { color: var(--foj-orange); }
.foj-card-body { padding: 20px; }

/* ── Reminder widget ───────────────────────────────────────── */
.reminder-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--foj-border);
}
.reminder-item:last-child { border-bottom: none; }
.reminder-dot {
  width: 10px; height: 10px; border-radius: 50%;
  margin-top: 5px; flex-shrink: 0;
}
.reminder-dot.tomorrow { background: #E67E22; }
.reminder-dot.today    { background: #E74C3C; }
.reminder-dot.overdue  { background: #95A5A6; }
.reminder-name { font-weight: 600; font-size: .875rem; color: var(--foj-blue); }
.reminder-meta { font-size: .78rem; color: var(--foj-muted); }
.reminder-actions { margin-left: auto; display: flex; gap: 6px; flex-shrink: 0; }

/* ── Table ─────────────────────────────────────────────────── */
.foj-table { width: 100%; border-collapse: collapse; }
.foj-table thead th {
  background: var(--foj-blue-light); color: var(--foj-blue);
  padding: 10px 14px; font-size: .78rem; font-weight: 700;
  letter-spacing: .4px; text-transform: uppercase; border: none;
}
.foj-table tbody tr { border-bottom: 1px solid var(--foj-border); transition: background .15s; }
.foj-table tbody tr:hover { background: #FAFBFD; }
.foj-table tbody td { padding: 11px 14px; vertical-align: middle; }
.foj-table tbody tr:last-child { border-bottom: none; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn-foj-primary {
  background: linear-gradient(135deg,#E67E22,#D35400);
  color: #fff; border: none; padding: 9px 20px;
  border-radius: 8px; font-weight: 600; font-size: .875rem;
  cursor: pointer; transition: opacity .2s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-foj-primary:hover { opacity: .9; color: #fff; }
.btn-foj-secondary {
  background: var(--foj-blue); color: #fff; border: none;
  padding: 9px 20px; border-radius: 8px; font-weight: 600; font-size: .875rem;
  cursor: pointer; transition: opacity .2s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-foj-secondary:hover { opacity: .85; color: #fff; }
.btn-wa { background: #25D366; color: #fff; border: none; padding: 6px 12px; border-radius: 6px; font-size: .8rem; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.btn-wa:hover { background: #1EBE5D; color: #fff; }
.btn-sm-icon { width: 30px; height: 30px; border-radius: 6px; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; transition: opacity .2s; }
.btn-sm-icon:hover { opacity: .8; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-label { font-weight: 600; font-size: .8rem; color: var(--foj-blue); margin-bottom: 4px; }
.form-control, .form-select {
  border: 1.5px solid var(--foj-border); border-radius: 8px;
  padding: 9px 12px; font-size: .875rem; transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--foj-orange); box-shadow: 0 0 0 3px rgba(230,126,34,.12); outline: none;
}

/* ── Progress bar ──────────────────────────────────────────── */
.call-progress { background: #E8ECF0; border-radius: 50px; height: 8px; overflow: hidden; }
.call-progress-bar { height: 100%; border-radius: 50px; background: linear-gradient(90deg,#E67E22,#D35400); transition: width .5s; }

/* ── Badges ────────────────────────────────────────────────── */
.badge { border-radius: 6px; padding: 3px 8px; font-size: .72rem; font-weight: 600; }

/* ── Alerts ────────────────────────────────────────────────── */
.reminder-banner {
  background: linear-gradient(135deg, rgba(230,126,34,.12), rgba(26,58,107,.06));
  border: 1.5px solid rgba(230,126,34,.3);
  border-radius: 10px; padding: 14px 18px;
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 20px;
}
.reminder-banner i { color: #E67E22; margin-top: 2px; }

/* ── Login page ────────────────────────────────────────────── */
.login-page { background: linear-gradient(135deg,#0D2247 0%,#1A3A6B 50%,#0D2247 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { background: #fff; border-radius: 16px; padding: 44px 40px; max-width: 420px; width: 100%; }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo img { height: 64px; object-fit: contain; }
.login-logo h2 { color: var(--foj-blue); font-weight: 700; margin-top: 10px; font-size: 1.3rem; }
.login-logo p { color: var(--foj-muted); font-size: .85rem; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .sidebar-brand span, .sidebar-brand small, .sidebar-nav a span,
  .nav-section-label, .sidebar-footer a span { display: none; }
  .sidebar-nav a { justify-content: center; padding: 12px; }
  .main-content { margin-left: 60px; }
  .page-body { padding: 16px; }
}
