/* URME AI Business Growth System — premium navy & gold UI */
:root {
  --navy: #0b2545;
  --navy-2: #12365f;
  --navy-3: #1b4977;
  --gold: #c8a24a;
  --gold-2: #e2c682;
  --gold-soft: #f7efdc;
  --ink: #172033;
  --muted: #667085;
  --line: #e4e9f2;
  --bg: #f4f6fb;
  --card: #ffffff;
  --success: #1b8a5a;
  --warning: #b7791f;
  --danger: #c0392b;
  --info: #2563eb;
  --sidebar: 272px;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(11, 37, 69, 0.07);
  --shadow-sm: 0 4px 14px rgba(11, 37, 69, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.925rem;
  -webkit-font-smoothing: antialiased;
}
body.bn { font-family: "Noto Sans Bengali", "Inter", system-ui, sans-serif; }
a { color: var(--navy-2); text-decoration: none; }
a:hover { color: var(--gold); }
h1, h2, h3, h4, h5 { color: var(--navy); font-weight: 700; letter-spacing: -0.02em; }
.text-muted { color: var(--muted) !important; }
.small, small { font-size: 0.8rem; }
hr { border-color: var(--line); opacity: 1; }

/* ---------------------------------------------------------------- buttons */
.btn { border-radius: 10px; font-weight: 600; font-size: 0.86rem; padding: 0.55rem 1rem; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.78rem; border-radius: 8px; }
.btn-urme {
  background: linear-gradient(135deg, var(--gold), #b58d35);
  border: 1px solid #b58d35;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(200, 162, 74, 0.25);
}
.btn-urme:hover, .btn-urme:focus { background: #b58d35; color: #fff; }
.btn-navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.btn-outline-navy { border-color: #c3cddd; color: var(--navy); background: #fff; }
.btn-outline-navy:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-soft { background: #eef2f9; border: 1px solid #e0e7f2; color: var(--navy); }
.btn-soft:hover { background: #e2e9f5; color: var(--navy); }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border-radius: 9px; }
.btn:focus-visible, .form-control:focus, .form-select:focus { box-shadow: 0 0 0 3px rgba(200, 162, 74, 0.22); outline: none; }

/* ---------------------------------------------------------------- layout */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar);
  min-height: 100vh;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  background: linear-gradient(180deg, #081d38 0%, #0b2545 45%, #0e2d53 100%);
  color: #e7edf6;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
  box-shadow: 8px 0 30px rgba(4, 16, 32, 0.15);
}
.sidebar::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 180px;
  background: radial-gradient(circle at 30% 100%, rgba(200, 162, 74, 0.18), transparent 70%);
  pointer-events: none;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.35rem 1.3rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1;
}
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(200, 162, 74, 0.95), rgba(200, 162, 74, 0.55));
  color: var(--navy);
  font-size: 1.35rem;
  box-shadow: 0 8px 20px rgba(200, 162, 74, 0.25);
  flex: 0 0 auto;
}
.brand-text strong { display: block; font-size: 1.2rem; letter-spacing: 0.12em; color: #fff; line-height: 1.1; }
.brand-text span { display: block; font-size: 0.63rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-2); margin-top: 4px; }
.sidebar-scroll { overflow-y: auto; flex: 1; padding: 0.85rem 0.85rem 1rem; position: relative; z-index: 1; scrollbar-width: thin; }
.sidebar-scroll::-webkit-scrollbar { width: 5px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 8px; }
.nav-section { margin-top: 0.85rem; }
.nav-section-label { font-size: 0.63rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(231, 237, 246, 0.42); padding: 0.2rem 0.75rem 0.35rem; font-weight: 600; }
.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(231, 237, 246, 0.78);
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.855rem;
  font-weight: 500;
  line-height: 1.25;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar .nav-link i { font-size: 1rem; opacity: 0.8; width: 1.15rem; text-align: center; }
.sidebar .nav-link:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.sidebar .nav-link.active { background: rgba(200, 162, 74, 0.14); color: #fff; }
.sidebar .nav-link.active::before {
  content: "";
  position: absolute;
  left: -0.85rem;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--gold);
}
.sidebar .nav-link .nav-count { margin-left: auto; background: var(--gold); color: var(--navy); font-size: 0.65rem; font-weight: 700; padding: 0.1rem 0.4rem; border-radius: 20px; }
.sidebar-footer { padding: 0.9rem 1rem 1.1rem; border-top: 1px solid rgba(255,255,255,.08); position: relative; z-index: 1; }
.sidebar-site { display: flex; align-items: center; justify-content: space-between; color: rgba(231,237,246,.7); font-size: .75rem; }
.sidebar-site a { color: var(--gold-2); }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(5, 14, 27, 0.55); z-index: 1035; backdrop-filter: blur(2px); }
.main-area { flex: 1; min-width: 0; margin-left: var(--sidebar); display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  height: 70px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}
.topbar-search { flex: 1; max-width: 420px; position: relative; }
.topbar-search i { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: #98a2b3; }
.topbar-search input { padding-left: 2.25rem; background: #f5f7fb; border-color: transparent; border-radius: 10px; }
.topbar-search input:focus { background: #fff; border-color: #d4dceb; }
.topbar-actions { display: flex; align-items: center; gap: 0.45rem; margin-left: auto; }
.topbar-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--navy); background: #f4f6fb; border: 1px solid transparent; position: relative; }
.topbar-icon:hover { background: #eef2f9; color: var(--navy); }
.topbar-icon .dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; background: #e04848; border: 2px solid #fff; border-radius: 50%; }
.notification-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 20px; background: #e04848; color: #fff; font-size: 0.62rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; line-height: 1; }
.notification-menu { width: min(380px, calc(100vw - 1.5rem)); padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.notification-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); background: #f8fafc; }
.notification-head form { margin: 0; }
.notification-head .btn-link { font-size: .75rem; text-decoration: none; color: var(--navy-3); }
.notification-scroll { max-height: 360px; overflow-y: auto; }
.notification-item { display: flex; gap: .7rem; width: 100%; text-align: left; padding: .75rem 1rem; border: 0; border-bottom: 1px solid #f0f3f8; background: #fff; color: var(--ink); }
.notification-item:hover { background: #f8fafc; }
.notification-item.is-unread { background: #f3f7ff; }
.notification-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: #eef2f9; color: var(--navy-3); }
.notification-copy { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.notification-copy .title { font-size: .8rem; font-weight: 600; color: var(--ink); }
.notification-copy .body { font-size: .75rem; color: var(--muted, #667085); line-height: 1.35; }
.notification-copy .time { font-size: .68rem; color: #98a2b3; }
.notification-empty { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 2rem 1rem; color: #98a2b3; font-size: .82rem; }
.notification-empty i { font-size: 1.4rem; }
.notification-footer { display: flex; align-items: center; justify-content: center; gap: .35rem; padding: .7rem; font-size: .78rem; font-weight: 600; color: var(--navy-3); background: #f8fafc; border-top: 1px solid var(--line); }
.notification-unread { border-left: 3px solid var(--gold); }
.user-chip { display: flex; align-items: center; gap: 0.55rem; padding: 0.3rem 0.4rem 0.3rem 0.3rem; border-radius: 12px; border: 1px solid transparent; }
.user-chip:hover { background: #f4f6fb; border-color: var(--line); }
.avatar { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--navy-2), var(--navy-3)); color: #fff; display: grid; place-items: center; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.03em; flex: 0 0 auto; }
.user-chip .name { font-size: 0.8rem; font-weight: 600; color: var(--ink); line-height: 1.15; }
.user-chip .role { font-size: 0.68rem; color: var(--muted); }
.content { padding: 1.6rem 1.6rem 2.2rem; flex: 1; }
.sidebar-toggle { display: none; width: 38px; height: 38px; border-radius: 10px; align-items: center; justify-content: center; background: #f4f6fb; color: var(--navy); border: 1px solid transparent; }

/* ---------------------------------------------------------------- headings */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.55rem; margin: 0 0 0.25rem; }
.page-head .subtitle { color: var(--muted); font-size: 0.86rem; margin: 0; }
.page-head .actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.breadcrumb { margin: 0 0 0.45rem; font-size: 0.75rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb-item + .breadcrumb-item::before { color: #b6bfcd; }

/* ---------------------------------------------------------------- cards */
.card-urme { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-urme > .card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 1.2rem; border-bottom: 1px solid var(--line);
}
.card-urme > .card-head h2, .card-urme > .card-head h3 { font-size: 0.98rem; margin: 0; }
.card-urme > .card-head .sub { color: var(--muted); font-size: 0.75rem; }
.card-body-urme { padding: 1.2rem; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; margin-bottom: 1.25rem; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.15rem;
  position: relative; overflow: hidden; box-shadow: var(--shadow-sm); min-height: 112px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.stat-card::after { content: ""; position: absolute; width: 96px; height: 96px; right: -40px; top: -45px; border-radius: 50%; background: rgba(11, 37, 69, 0.035); }
.stat-card.gold { background: linear-gradient(145deg, #0b2545, #12365f); border-color: transparent; color: #fff; }
.stat-card.gold::after { background: rgba(200, 162, 74, 0.18); }
.stat-card .label { font-size: 0.73rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.stat-card.gold .label { color: rgba(255,255,255,.65); }
.stat-card .value { font-size: 1.42rem; font-weight: 700; color: var(--navy); letter-spacing: -0.03em; line-height: 1.15; margin-top: 0.45rem; }
.stat-card.gold .value { color: #fff; }
.stat-card .meta { font-size: 0.72rem; color: var(--muted); margin-top: 0.35rem; display: flex; align-items: center; gap: 0.3rem; }
.stat-card.gold .meta { color: var(--gold-2); }
.stat-icon { position: absolute; right: 1rem; top: 1rem; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #f4f6fb; color: var(--navy); font-size: 1rem; }
.stat-card.gold .stat-icon { background: rgba(255,255,255,.1); color: var(--gold-2); }

.kpi-mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .75rem; }
.kpi-mini { border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem; background: #fbfcfe; }
.kpi-mini .label { font-size: .69rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.kpi-mini .value { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-top: .25rem; }

/* ---------------------------------------------------------------- tables */
.table-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.table-toolbar { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.table-responsive { overflow-x: auto; }
.table { margin: 0; font-size: .84rem; }
.table > thead th {
  background: #f7f9fc; color: #526078; font-size: .68rem; font-weight: 700; letter-spacing: .055em; text-transform: uppercase;
  border-bottom: 1px solid var(--line); padding: .7rem 1rem; white-space: nowrap;
}
.table > tbody > tr > td { padding: .78rem 1rem; border-color: #eef1f6; vertical-align: middle; color: #2b3548; }
.table > tbody > tr:hover { background: #fafbfe; }
.table td .primary { font-weight: 600; color: var(--navy); display: block; }
.table td .sub { font-size: .72rem; color: var(--muted); display: block; margin-top: 1px; }
.table-actions { display: flex; gap: .25rem; justify-content: flex-end; }
.table .money { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.table .code { font-family: "SFMono-Regular", Consolas, monospace; font-size: .74rem; color: var(--navy-2); background: #f2f5fa; padding: .15rem .4rem; border-radius: 5px; white-space: nowrap; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .85rem 1.1rem; border-top: 1px solid var(--line); }

.badge { font-weight: 600; font-size: .68rem; padding: .32rem .55rem; border-radius: 20px; letter-spacing: .01em; }
.badge.text-bg-success, .badge.bg-success { background: #e6f6ee !important; color: #157347 !important; }
.badge.text-bg-warning, .badge.bg-warning { background: #fdf3dd !important; color: #9a6700 !important; }
.badge.text-bg-danger, .badge.bg-danger { background: #fdecea !important; color: #b02a1f !important; }
.badge.text-bg-info, .badge.bg-info { background: #e8f0fe !important; color: #1d4ed8 !important; }
.badge.text-bg-secondary, .badge.bg-secondary { background: #eef1f6 !important; color: #566074 !important; }
.badge.text-bg-primary, .badge.bg-primary { background: #e9eefb !important; color: var(--navy-2) !important; }
.priority-urgent { background: #fdecea !important; color: #b02a1f !important; }
.priority-high { background: #fff1e6 !important; color: #b45309 !important; }
.priority-medium { background: #fdf8e7 !important; color: #8a6d0b !important; }
.priority-low { background: #eef2f6 !important; color: #566074 !important; }
.source-pill { display: inline-flex; align-items: center; gap: .3rem; font-size: .7rem; background: #f2f5fa; padding: .22rem .5rem; border-radius: 20px; color: #43506b; }

/* ---------------------------------------------------------------- forms */
.form-label { font-size: .78rem; font-weight: 600; color: #3b4659; margin-bottom: .3rem; }
.form-control, .form-select {
  border-color: #d8dfea; border-radius: 10px; padding: .55rem .8rem; font-size: .85rem; color: var(--ink); background-color: #fff;
}
.form-control::placeholder { color: #9aa5b5; }
.form-control:focus, .form-select:focus { border-color: #c9a85b; }
textarea.form-control { min-height: 90px; }
.form-text { font-size: .72rem; color: var(--muted); }
.form-section { padding: 1.25rem; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.form-section-title { font-size: .92rem; font-weight: 700; color: var(--navy); margin: 0 0 .9rem; display: flex; align-items: center; gap: .45rem; }
.form-section-title i { color: var(--gold); }
.form-actions { display: flex; gap: .6rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; padding: 1.1rem 1.25rem; background: #fafbfe; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.input-group-text { background: #f5f7fb; border-color: #d8dfea; font-size: .78rem; color: var(--muted); }
.form-check-input:checked { background-color: var(--gold); border-color: var(--gold); }
.form-switch .form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(200,162,74,.18); }
.required::after { content: " *"; color: #c0392b; }

/* ---- shared form layout (used by every module form) */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.05rem; max-width: 1080px; }
.form-layout.narrow { max-width: 720px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.1rem; }
.form-grid .field { min-width: 0; }
.form-grid .field.span-2 { grid-column: 1 / -1; }
.field label { display: block; font-size: .78rem; font-weight: 600; color: #3b4659; margin-bottom: .3rem; }
.field .req, .req { color: #c0392b; font-weight: 700; }
.field .hint, .hint { display: block; margin-top: .35rem; font-size: .73rem; color: var(--muted); line-height: 1.45; }
.field .form-control, .field .form-select, .field textarea { width: 100%; }
.card-urme > .card-body { padding: 1.2rem; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.2rem; background: #fafbfe; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.card-foot .hint { margin: 0; max-width: 46rem; }
.form-control-static { padding: .55rem .8rem; font-size: .85rem; color: var(--navy); background: #f7f9fc; border: 1px dashed #d8dfea; border-radius: 10px; min-height: 38px; }
form.card-urme { max-width: 1080px; }

/* ---- shared page layout */
.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1.15rem; align-items: start; }
.content-grid > * { min-width: 0; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.05rem; align-content: start; }
.stack > * { min-width: 0; }

/* ---- definition rows */
.detail-list { display: grid; }
.detail-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .6rem 0; border-bottom: 1px dashed #e8edf4; font-size: .83rem; }
.detail-list > div:first-child { padding-top: 0; }
.detail-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.detail-list span { color: var(--muted); flex: 0 0 auto; }
.detail-list strong { color: var(--navy); text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.detail-list.compact > div { padding: .42rem 0; font-size: .8rem; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .72rem 0; border-bottom: 1px solid #eef1f6; font-size: .84rem; }
.list-row:first-child { padding-top: 0; }
.list-row:last-child { border-bottom: 0; padding-bottom: 0; }
.list-row strong { color: var(--navy); font-weight: 600; }
.table-link { font-size: .78rem; font-weight: 600; color: var(--navy-3); white-space: nowrap; }
.table-link:hover { color: var(--gold); }
.table td.text-end, .table th.text-end { white-space: nowrap; }
.table td .primary { white-space: nowrap; }
.card-urme .list-group-item-action { color: #2c3a4f; border-color: #eef1f6; padding: .7rem 1rem; }
.card-urme .list-group-item-action:hover { background: #f7f9fc; }
.card-urme .list-group-item-action .fw-semibold { color: var(--navy-3); }

/* ---- callouts & notes */
.note-block { background: #f7f9fc; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; padding: .8rem .95rem; font-size: .8rem; color: #3f4b60; }
.note-label { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b7789; margin-bottom: .3rem; }
.note-block p:last-child, .note-block ul:last-child { margin-bottom: 0; }
.mini-heading { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 .45rem; }
.mini-empty { font-size: .78rem; color: #98a2b3; margin: 0; }
.guardrail-banner { display: flex; gap: .7rem; align-items: flex-start; background: #eef4ff; border: 1px solid #d5e2f7; color: #1f3f6d; border-radius: 12px; padding: .75rem .95rem; font-size: .8rem; margin-bottom: 1rem; }
.guardrail-banner > i { color: var(--navy-3); font-size: 1rem; margin-top: .05rem; }
.guardrail-banner strong { color: var(--navy); }

/* ---- totals */
.totals-panel { margin-top: 1rem; margin-left: auto; width: min(340px, 100%); display: grid; gap: .3rem; }
.totals-panel > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: .84rem; color: #4b576c; padding: .2rem 0; }
.totals-panel strong { font-variant-numeric: tabular-nums; color: var(--navy); }
.totals-panel .grand { border-top: 1px solid var(--line); margin-top: .3rem; padding-top: .6rem; font-weight: 700; font-size: .92rem; color: var(--navy); }
.totals-panel .grand strong { font-size: 1.06rem; }

/* ---- tabs / danger zone */
.tab-bar { display: flex; gap: .25rem; flex-wrap: wrap; padding: .3rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.tab-bar .tab { padding: .42rem .8rem; border-radius: 9px; font-size: .79rem; font-weight: 600; color: #4a576c; }
.tab-bar .tab:hover { background: #f4f6fb; color: var(--navy); }
.tab-bar .tab.active { background: var(--navy); color: #fff; }
.danger-zone { border-color: #f3d3d0; }
.danger-zone > .card-head, .danger-zone > .card-body { background: #fffaf9; }
.danger-zone > .card-head { border-bottom-color: #f3d3d0; }
.danger-zone > .card-head h2, .danger-zone > .card-head h3 { color: #a5281f; }
.remove-line:hover { color: #b02a1f; }
.workflow-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; counter-reset: step; }
.workflow-steps li { display: grid; grid-template-columns: 26px 1fr; column-gap: .65rem; padding: .55rem 0; border-bottom: 1px dashed #e8edf4; }
.workflow-steps li:last-child { border-bottom: 0; padding-bottom: 0; }
.workflow-steps li::before { counter-increment: step; content: counter(step); grid-row: 1 / span 2; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-soft); color: #8a6a1f; font-size: .75rem; font-weight: 700; display: grid; place-items: center; }
.workflow-steps strong { font-size: .82rem; color: var(--navy); }
.workflow-steps span { font-size: .76rem; color: var(--muted); }
.grow { flex: 1 1 auto; min-width: 0; }

/* ---- finance summary strip */
.stat-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.1rem; }
.stat-strip > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .75rem .9rem; box-shadow: var(--shadow-sm); }
.stat-strip span { display: block; font-size: .67rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.stat-strip strong { display: block; margin-top: .25rem; font-size: .95rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.chart-box { position: relative; height: 280px; }

/* ---- follow-ups */
.followup-card.is-overdue { border-left: 3px solid var(--danger); }
.followup-main { display: flex; gap: .85rem; align-items: flex-start; }
.followup-icon { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--gold-soft); color: #8a6a1f; font-size: 1rem; }
.followup-actions { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; margin-top: .85rem; padding-top: .85rem; border-top: 1px dashed #e8edf4; }
.followup-actions form { display: inline-flex; gap: .4rem; align-items: center; }
.reschedule-form .form-control { width: auto; max-width: 220px; }

/* ---- reports */
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.report-card { display: flex; gap: .85rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.05rem; box-shadow: var(--shadow-sm); }
.report-icon { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #f1f5fb; color: var(--navy-2); font-size: 1.1rem; }
.report-card h3 { font-size: .92rem; margin: 0 0 .2rem; }
.report-card p { font-size: .76rem; color: var(--muted); margin: 0; }
.report-actions { display: flex; gap: .3rem; flex-wrap: wrap; margin-left: auto; }
.report-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.report-head h2 { font-size: .98rem; margin: 0; }
.report-table > thead th:first-child { border-top-left-radius: 0; }
.summary-strip { display: flex; flex-wrap: wrap; gap: .5rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.summary-strip span { font-size: .76rem; color: #4b576c; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: .25rem .7rem; }

/* ---- linked records / stage pills */
.linked-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.linked-card { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; background: #fbfcfe; }
.linked-card > i { color: var(--gold); font-size: 1rem; margin-top: .1rem; }
.linked-card .mini-heading { display: block; }
.stage-pills { display: flex; flex-wrap: wrap; gap: .35rem; }
.stage-pill { border: 1px solid var(--line); background: #fff; color: #4a576c; font-size: .74rem; font-weight: 600; padding: .35rem .6rem; border-radius: 20px; }
.stage-pill:hover:not(:disabled) { border-color: var(--gold); color: var(--navy); background: var(--gold-soft); }
.stage-pill.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.stage-pill:disabled { opacity: .65; cursor: default; }

/* ---- generated text & document meta */
.ai-output { white-space: pre-line; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; font-size: .85rem; line-height: 1.65; color: #33405a; }
.context-block { margin: .35rem 0 0; white-space: pre-wrap; font-size: .74rem; color: #33405a; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.doc-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.doc-meta > div { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: .65rem .8rem; min-width: 0; }
.doc-meta span { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.doc-meta strong { display: block; font-size: .84rem; color: var(--navy); margin-top: .15rem; overflow-wrap: anywhere; }
.doc-meta small { display: block; font-size: .72rem; color: var(--muted); }
.inbox-avatar { width: 36px; height: 36px; border-radius: 10px; background: #eef3fb; color: var(--navy-2); display: grid; place-items: center; font-size: .74rem; font-weight: 700; flex: 0 0 auto; }

/* ---- WhatsApp chat */
.chat-log { display: flex; flex-direction: column; gap: .65rem; max-height: 60vh; overflow-y: auto; padding: .25rem; }
.chat-bubble .chat-meta { display: flex; justify-content: space-between; gap: .6rem; margin: 0 0 .3rem; }
.chat-bubble p { margin: 0; }
.chat-foot { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------- filter bar */
.filter-bar { display: flex; gap: .55rem; flex-wrap: wrap; align-items: end; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.filter-bar .field { min-width: 140px; }
.filter-bar .field.grow { flex: 1; min-width: 200px; }
.filter-bar .field label { font-size: .67rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .28rem; display: block; }
.filter-bar .form-control, .filter-bar .form-select { padding: .42rem .65rem; font-size: .8rem; }
.filter-bar .btn { padding: .42rem .8rem; }

/* ---------------------------------------------------------------- misc */
.empty-state { text-align: center; padding: 3rem 1.25rem; color: var(--muted); }
.empty-state .icon { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto .9rem; background: #f1f5fb; color: var(--navy-2); font-size: 1.5rem; }
.empty-state h3 { font-size: 1rem; margin-bottom: .35rem; }
.empty-state p { font-size: .82rem; margin-bottom: 1rem; }
.pagination { margin: 0; gap: .2rem; }
.page-link { border-color: var(--line); color: var(--navy-2); border-radius: 8px !important; font-size: .8rem; padding: .35rem .65rem; }
.page-item.active .page-link { background: var(--navy); border-color: var(--navy); }
.page-link:hover { color: var(--navy); background: #f3f6fb; }
.alert { border: 0; border-radius: 12px; font-size: .84rem; padding: .8rem 1rem; box-shadow: var(--shadow-sm); }
.alert-success { background: #e8f7ef; color: #146c43; }
.alert-danger { background: #fdeceb; color: #a5281f; }
.alert-warning { background: #fdf5e3; color: #8a6100; }
.alert-info { background: #e9f1fe; color: #1a4fb0; }
.flash-stack { position: fixed; top: 84px; right: 1.3rem; z-index: 1080; width: min(390px, calc(100vw - 2rem)); display: grid; gap: .5rem; }
.flash-stack .alert { margin: 0; padding: .8rem 1rem; box-shadow: 0 14px 34px rgba(11,37,69,.16); }
.progress { height: 6px; background: #eef1f6; border-radius: 6px; }
.progress-bar { background: var(--gold); }
.avatar-lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.25rem; }
.avatar-sm { width: 30px; height: 30px; border-radius: 8px; font-size: .66rem; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.1rem; align-items: start; }
.detail-grid > * { min-width: 0; }
.info-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .9rem 1.2rem; }
.info-item .label { font-size: .67rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-bottom: .18rem; }
.info-item .value { font-size: .87rem; font-weight: 500; color: var(--ink); word-break: break-word; }
.info-item.full { grid-column: 1 / -1; }
.mono { font-family: "SFMono-Regular", Consolas, monospace; }
.section-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
.timeline { position: relative; padding-left: 1.35rem; }
.timeline::before { content: ""; position: absolute; left: .38rem; top: .3rem; bottom: .3rem; width: 2px; background: #edf1f7; }
.timeline-item { position: relative; padding: 0 0 1.1rem 0; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -1.16rem; top: .3rem; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--gold); }
.timeline-item .meta { font-size: .7rem; color: var(--muted); }
.timeline-item .body { font-size: .82rem; white-space: pre-line; margin-top: .2rem; }
.note-box { background: #fbfcfe; border: 1px dashed #dde4ef; border-radius: 12px; padding: .9rem; font-size: .82rem; white-space: pre-line; }
.test-banner { display: flex; gap: .75rem; align-items: flex-start; background: #fff8e8; border: 1px solid #f1dfb5; color: #7a5a0a; border-radius: 12px; padding: .8rem 1rem; font-size: .8rem; }
.test-banner i { font-size: 1rem; margin-top: 1px; }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .55rem; }
.quick-action { display: flex; align-items: center; gap: .55rem; border: 1px solid var(--line); border-radius: 11px; padding: .65rem .7rem; font-size: .78rem; font-weight: 600; color: var(--navy); background: #fff; }
.quick-action:hover { border-color: #d9c38d; background: #fffcf4; color: var(--navy); }
.quick-action i { color: var(--gold); font-size: .95rem; }

/* ---------------------------------------------------------------- charts */
.chart-wrap { position: relative; height: 280px; width: 100%; }
.chart-wrap.sm { height: 230px; }
.chart-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .72rem; color: var(--muted); }
.chart-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: .35rem; background: var(--navy); }
.chart-legend .gold::before { background: var(--gold); }
.chart-legend .navy::before { background: var(--navy-3); }

/* ---------------------------------------------------------------- kanban */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: .8rem; overflow-x: auto; padding-bottom: .5rem; align-items: start; }
.kanban-col { background: #eef2f8; border-radius: 14px; padding: .65rem; min-height: 160px; }
.kanban-col-head { display: flex; align-items: center; justify-content: space-between; padding: .2rem .3rem .6rem; }
.kanban-col-head strong { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--navy); }
.kanban-col-head .count { font-size: .68rem; background: #fff; border-radius: 20px; padding: .12rem .45rem; color: var(--muted); }
.kanban-card { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: .7rem; margin-bottom: .5rem; box-shadow: 0 2px 6px rgba(11,37,69,.04); }
.kanban-card .name { font-size: .82rem; font-weight: 600; color: var(--navy); display: block; }
.kanban-card .meta { font-size: .68rem; color: var(--muted); margin-top: .2rem; display: flex; justify-content: space-between; gap: .4rem; }
.kanban-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: .55rem; font-size: .68rem; color: var(--muted); }
.kanban-total { font-size: .68rem; color: var(--muted); }

/* ---------------------------------------------------------------- timeline/chat */
.chat-list { display: grid; gap: .6rem; max-height: 520px; overflow-y: auto; }
.chat-bubble { max-width: 85%; border-radius: 14px; padding: .65rem .8rem; font-size: .8rem; line-height: 1.4; white-space: pre-line; }
.chat-bubble.out { margin-left: auto; background: #eaf1fb; color: #183b63; border-bottom-right-radius: 4px; }
.chat-bubble.in { background: #f4f6fa; color: #2b3548; border-bottom-left-radius: 4px; }
.chat-meta { font-size: .67rem; color: var(--muted); margin-top: .25rem; }
.chat-meta.out { text-align: right; }
.wa-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }

/* ---------------------------------------------------------------- auth */
.auth-body { background: var(--navy); min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-aside {
  background: linear-gradient(150deg, #071b34 0%, #0b2545 45%, #123a66 100%);
  color: #fff; padding: 3rem 3.5rem; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-aside::before {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -190px; top: -140px;
  background: radial-gradient(circle, rgba(200,162,74,.25), transparent 65%);
}
.auth-aside::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.auth-brand { display: flex; align-items: center; gap: .9rem; position: relative; z-index: 1; }
.auth-hero { position: relative; z-index: 1; max-width: 440px; }
.auth-hero h1 { color: #fff; font-size: 2.25rem; line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 1rem; }
.auth-hero h1 span { color: var(--gold-2); }
.auth-hero p { color: rgba(255,255,255,.68); font-size: .92rem; line-height: 1.7; }
.auth-points { display: grid; gap: .65rem; margin-top: 1.5rem; }
.auth-point { display: flex; gap: .65rem; align-items: flex-start; font-size: .82rem; color: rgba(255,255,255,.8); }
.auth-point i { color: var(--gold-2); margin-top: 2px; }
.auth-foot { position: relative; z-index: 1; font-size: .72rem; color: rgba(255,255,255,.45); }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 2rem; background: #f6f8fc; }
.auth-card { width: min(430px, 100%); background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(11,37,69,.12); border: 1px solid var(--line); padding: 2.1rem; }
.auth-card h2 { font-size: 1.45rem; margin-bottom: .3rem; }
.auth-card .lead-text { color: var(--muted); font-size: .84rem; margin-bottom: 1.4rem; }
.auth-card .brand-mini { display: none; align-items: center; gap: .6rem; margin-bottom: 1.4rem; }
.auth-links { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .76rem; }
.auth-divider { display: flex; align-items: center; gap: .7rem; color: #98a2b3; font-size: .68rem; margin: 1.1rem 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demo-box { background: #f8fafc; border: 1px dashed #d8dfea; border-radius: 10px; padding: .6rem .75rem; font-size: .7rem; color: var(--muted); line-height: 1.6; }

/* ---------------------------------------------------------------- public */
.public-body { background: #fff; }
.public-nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(11,37,69,.07); }
.public-nav .wrap { max-width: 1180px; margin: 0 auto; padding: .8rem 1.5rem; display: flex; align-items: center; gap: 1.5rem; }
.public-nav .brand { display: flex; align-items: center; gap: .7rem; color: var(--navy); font-weight: 800; letter-spacing: .08em; font-size: .98rem; }
.public-nav .brand .brand-mark { width: 38px; height: 38px; border-radius: 11px; font-size: 1.1rem; }
.public-nav .brand small { display: block; font-size: .54rem; letter-spacing: .22em; color: var(--gold); font-weight: 600; }
.public-links { display: flex; gap: 1.15rem; margin-left: auto; align-items: center; font-size: .83rem; font-weight: 500; }
.public-links a { color: #3d4b60; }
.public-links a:hover { color: var(--navy); }
.hero {
  background: linear-gradient(155deg, #071b34, #0b2545 55%, #123a66);
  color: #fff; position: relative; overflow: hidden; padding: 5rem 1.5rem 4rem;
}
.hero::before { content: ""; position: absolute; width: 700px; height: 700px; border-radius: 50%; right: -240px; top: -260px; background: radial-gradient(circle, rgba(200,162,74,.28), transparent 65%); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px); background-size: 34px 34px; opacity: .18; mask-image: linear-gradient(120deg, #000, transparent 65%); pointer-events: none; }
.hero-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid rgba(200,162,74,.4); color: var(--gold-2); border-radius: 30px; padding: .3rem .8rem; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin-bottom: 1.2rem; background: rgba(200,162,74,.08); }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 4vw, 3.35rem); line-height: 1.08; letter-spacing: -.035em; margin-bottom: 1.1rem; }
.hero h1 span { color: var(--gold-2); }
.hero .lead-text { color: rgba(255,255,255,.7); font-size: 1rem; line-height: 1.75; max-width: 540px; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-trust { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-top: 2.4rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); }
.hero-trust div strong { display: block; color: #fff; font-size: 1.1rem; }
.hero-trust div span { color: rgba(255,255,255,.55); font-size: .72rem; }
.enquiry-card { background: #fff; border-radius: 20px; padding: 1.6rem; box-shadow: 0 30px 70px rgba(3,14,28,.4); color: var(--ink); }
.enquiry-card h3 { font-size: 1.1rem; margin-bottom: .2rem; }
.enquiry-card p { font-size: .75rem; color: var(--muted); margin-bottom: 1rem; }
.public-section { max-width: 1180px; margin: 0 auto; padding: 4rem 1.5rem; }
.public-section .head { max-width: 650px; margin-bottom: 2rem; }
.public-section .head .kicker { color: var(--gold); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; }
.public-section .head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: .45rem 0 .6rem; }
.public-section .head p { color: var(--muted); font-size: .9rem; }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; }
.service-card { border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem 1.2rem; background: #fff; transition: .2s ease; }
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #e4d6b4; }
.service-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: #8a6a1d; font-size: 1.15rem; margin-bottom: .9rem; }
.service-card h3 { font-size: .98rem; margin-bottom: .35rem; }
.service-card p { font-size: .79rem; color: var(--muted); margin: 0; line-height: 1.6; }
.trust-band { background: #f7f9fc; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-grid { max-width: 1180px; margin: 0 auto; padding: 2rem 1.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.trust-item { display: flex; gap: .75rem; }
.trust-item i { color: var(--gold); font-size: 1.2rem; }
.trust-item strong { display: block; font-size: .86rem; color: var(--navy); }
.trust-item span { font-size: .76rem; color: var(--muted); }
.cta-band { background: var(--navy); border-radius: 20px; padding: 2.4rem; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 280px; height: 280px; right: -80px; top: -120px; border-radius: 50%; background: rgba(200,162,74,.16); }
.cta-band h2 { color: #fff; font-size: 1.5rem; margin-bottom: .3rem; }
.cta-band p { color: rgba(255,255,255,.6); font-size: .84rem; margin: 0; }
.public-footer { background: #071b34; color: rgba(255,255,255,.6); padding: 2.5rem 1.5rem; font-size: .78rem; }
.public-footer .wrap { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.public-footer a { color: rgba(255,255,255,.75); }
.legal-wrap { max-width: 820px; margin: 0 auto; padding: 3.5rem 1.5rem; }
.legal-wrap h1 { font-size: 1.9rem; margin-bottom: 1rem; }
.legal-wrap h2 { font-size: 1.1rem; margin: 1.8rem 0 .5rem; }
.legal-wrap p, .legal-wrap li { font-size: .88rem; color: #495569; line-height: 1.75; }

/* ---------------------------------------------------------------- email */
.inbox-list { display: grid; }
.inbox-row { display: flex; gap: .8rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); align-items: center; }
.inbox-row:hover { background: #fafbfe; }
.inbox-row .subject { font-size: .83rem; font-weight: 600; color: var(--navy); }
.inbox-row .from { font-size: .73rem; color: var(--muted); }
.inbox-row .date { margin-left: auto; font-size: .7rem; color: var(--muted); white-space: nowrap; }
.email-body { font-size: .86rem; line-height: 1.7; white-space: pre-line; color: #33405a; }

/* ---------------------------------------------------------------- settings */
.settings-nav { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.settings-nav a { padding: .48rem .85rem; border-radius: 9px; font-size: .8rem; font-weight: 600; color: #4a576c; background: #fff; border: 1px solid var(--line); }
.settings-nav a.active, .settings-nav a:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.integration-card { border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem; background: #fff; height: 100%; }
.integration-card .head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; margin-bottom: .5rem; }
.integration-card h3 { font-size: .9rem; margin: 0; }
.integration-card p { font-size: .74rem; color: var(--muted); margin-bottom: .75rem; }
.audit-details { font-size: .76rem; max-width: 420px; color: #4b576c; }
.settings-grid { display: grid; grid-template-columns: 240px 1fr; gap: 1.2rem; align-items: start; }

/* ---------------------------------------------------------------- errors */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 2rem; background: radial-gradient(circle at 20% 10%, #eef3fa, #f7f9fc 45%); }
.error-card { text-align: center; max-width: 460px; }
.error-code { font-size: 5rem; font-weight: 800; line-height: 1; color: var(--navy); letter-spacing: -.06em; }
.error-code span { color: var(--gold); }
.error-card h1 { font-size: 1.35rem; margin: .7rem 0 .4rem; }
.error-card p { color: var(--muted); font-size: .86rem; margin-bottom: 1.3rem; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1199.98px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .service-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero { padding-top: 3.5rem; }
  .enquiry-card { max-width: 560px; }
}
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .main-area { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; }
  .topbar { padding: 0 1rem; height: 64px; }
  .content { padding: 1.2rem 1rem 2rem; }
  .topbar-search { max-width: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-card .brand-mini { display: flex; }
  .settings-grid { grid-template-columns: 1fr; }
  .wa-panel { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .public-links .hide-sm { display: none; }
  .kanban { grid-template-columns: repeat(5, 260px); }
  .stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
  .topbar-search { display: none; }
  .page-head h1 { font-size: 1.35rem; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: .65rem; }
  .stat-card { padding: .9rem; min-height: 98px; }
  .stat-card .value { font-size: 1.15rem; }
  .stat-icon { width: 28px; height: 28px; font-size: .85rem; right: .75rem; top: .75rem; }
  .info-list { grid-template-columns: 1fr; }
  .filter-bar { padding: .8rem; }
  .filter-bar .field { min-width: calc(50% - .55rem); flex: 1; }
  .table-toolbar { padding: .8rem; }
  .user-chip .name, .user-chip .role { display: none; }
  .topbar-actions { gap: .2rem; }
  .hero { padding: 2.7rem 1rem 2.2rem; }
  .hero-trust { gap: 1rem; }
  .public-section { padding: 2.8rem 1rem; }
  .service-grid { grid-template-columns: 1fr; }
  .public-nav .wrap { padding: .7rem 1rem; }
  .public-links { gap: .7rem; }
  .quick-actions { grid-template-columns: 1fr; }
  .auth-panel { padding: 1.1rem; }
  .auth-card { padding: 1.4rem; border-radius: 16px; }
  .flash-stack { top: auto; bottom: 1rem; left: .7rem; right: .7rem; width: auto; }
  .chart-wrap { height: 230px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .field.span-2 { grid-column: auto; }
  .card-foot { flex-direction: column; align-items: stretch; }
  .card-foot .d-flex { flex-wrap: wrap; }
  .card-foot .d-flex .btn { flex: 1 1 auto; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-meta { grid-template-columns: 1fr; }
  .linked-grid { grid-template-columns: 1fr; }
  .report-card { flex-wrap: wrap; }
  .report-actions { margin-left: 0; width: 100%; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: .55rem; }
  .stat-card { padding: .8rem; min-height: 92px; }
  .stat-card .value { font-size: 1.02rem; }
  .stat-card .label { font-size: .66rem; }
  .stat-card .meta { font-size: .66rem; }
  .hero-actions .btn { width: 100%; }
  .filter-bar .field { min-width: 100%; }
}

/* ---------------------------------------------------------------- print */
@media print {
  .sidebar, .topbar, .flash-stack, .page-head .actions, .filter-bar, .table-toolbar, .btn, .no-print { display: none !important; }
  .main-area { margin: 0 !important; }
  .content { padding: 0 !important; }
  body { background: #fff; font-size: 11pt; }
  .card-urme, .table-card { box-shadow: none; border-color: #ccc; }
  a { color: #000; text-decoration: none; }
  .table > thead th { background: #eee !important; }
}

/* ------------------------------------------------------------- calendar */
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.calendar-title { font-size: 1.05rem; font-weight: 700; margin: 0; color: var(--ink); min-width: 140px; text-align: center; }
.calendar-wrap { overflow-x: auto; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 720px; }
.calendar-head { background: #f5f7fb; border-bottom: 1px solid var(--line); }
.calendar-weekday { padding: .55rem .6rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #667085; }
.calendar-day { min-height: 118px; padding: .4rem .45rem; border-top: 1px solid #edf1f7; border-right: 1px solid #edf1f7; background: #fff; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.is-weekend { background: #fbfcfe; }
.calendar-day.is-outside { background: #fafbfc; }
.calendar-day.is-outside .day-number { color: #b6bec9; }
.calendar-day.is-today { background: #f3f7ff; box-shadow: inset 0 0 0 2px rgba(11,37,69,.14); }
.calendar-day-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .25rem; }
.day-number { font-size: .75rem; font-weight: 700; color: #344054; width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 50%; }
.is-today .day-number { background: var(--navy); color: #fff; }
.calendar-add { font-size: .7rem; color: #98a2b3; line-height: 1; opacity: 0; transition: opacity .15s; }
.calendar-day:hover .calendar-add { opacity: 1; color: var(--navy); }
.calendar-events { display: flex; flex-direction: column; gap: .18rem; }
.calendar-event { display: flex; align-items: center; gap: .2rem; font-size: .64rem; line-height: 1.25; padding: .15rem .25rem; border-radius: 5px; background: #eef3fb; color: #173e66; text-decoration: none; overflow: hidden; }
.calendar-event:hover { background: #e2ebf9; color: #0b2545; }
.calendar-event i { font-size: .6rem; flex: 0 0 auto; }
.calendar-event .time { font-weight: 700; flex: 0 0 auto; }
.calendar-event .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-links { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6rem; padding: .8rem; margin-bottom: 1rem; }
.quick-links .quick-link { display: flex; align-items: center; gap: .55rem; padding: .6rem .7rem; border-radius: 10px; text-decoration: none; color: #173e66; background: #f5f8fd; border: 1px solid #e6edf7; min-width: 0; }
.quick-links .quick-link:hover { background: #eaf1fb; color: #0b2545; border-color: #d5e2f2; }
.quick-links .quick-link i { font-size: 1.05rem; color: #0b2545; flex: 0 0 auto; }
.quick-links .quick-link span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.quick-links .quick-link strong { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-links .quick-link small { font-size: .66rem; color: #667085; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1199.98px) { .quick-links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.calendar-event.event-task { background: #f0f8f2; color: #21653a; }
.calendar-event.event-task:hover { background: #e2f1e6; }
.calendar-event.event-overdue { background: #fdecec; color: #9b2c2c; }
.calendar-event.event-done { opacity: .55; text-decoration: line-through; }
.calendar-event.event-op { background: #f4f1fa; color: #4c3a7a; }
.calendar-event.event-op:hover { background: #ebe5f6; color: #372a5c; }
.calendar-event.event-op-visa { background: #eef4fb; color: #1f4e79; }
.calendar-event.event-op-visa:hover { background: #e1edf9; }
.calendar-event.event-op-ticket { background: #eef8fb; color: #17607a; }
.calendar-event.event-op-ticket:hover { background: #e0f2f8; }
.calendar-event.event-op-hotel { background: #f4f1fa; color: #4c3a7a; }
.calendar-event.event-op-hotel:hover { background: #ebe5f6; }
.calendar-event.event-op-payment { background: #fdf5e6; color: #8a5a00; }
.calendar-event.event-op-payment:hover { background: #faedd6; }
.calendar-event.event-op-document { background: #f0f4f8; color: #3f556c; }
.calendar-event.event-op-document:hover { background: #e4ebf3; }
.calendar-event.event-op-warning { background: #fdecec; color: #9b2c2c; }
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .3rem; }
.legend-followup { background: #2d659f; }
.legend-task { background: #2f7d4b; }
.legend-overdue { background: #c0392b; }
.legend-visa { background: #1f4e79; }
.legend-ticket { background: #17607a; }
.legend-hotel { background: #4c3a7a; }
.legend-payment { background: #8a5a00; }
.legend-document { background: #3f556c; }
@media (max-width: 767.98px) {
  .calendar-grid { min-width: 660px; }
  .calendar-day { min-height: 96px; }
}

/* --------------------------------------------------------------- sorting */
.sort-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.sort-link:hover { color: var(--navy-3); }
.sort-link.is-sorted { color: var(--navy); font-weight: 700; }
.sort-link .sort-idle { opacity: .25; font-size: .7rem; }
.sort-link.is-sorted i { font-size: .7rem; color: var(--gold); }

/* --------------------------------------------------------- submit loading */
.btn.is-loading { position: relative; pointer-events: none; opacity: .8; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: .95rem;
  height: .95rem;
  margin: -.5rem 0 0 -.5rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin .6s linear infinite;
  visibility: visible;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
