/* ==========================================================================
   Co.Credit Broker Portal — UI Kit styles
   Cosmetic recreation of the portal. Tokens mirror src/theme/*.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --orange: #F26739; --orange-light: #F5865C; --orange-lighter: #F8A57E; --orange-dark: #C75129;
  --navy: #070D25; --navy-light: #3E4C73;
  --sage: #D1E0DD; --sage-light: #E9F0EE; --sage-lighter: #F2F7F6;
  --success: #64C164; --success-lighter: #B9F0B9; --success-dark: #207B20;
  --warning: #FFC107; --error: #FF5242;
  --g0:#fff; --g100:#F9FAFB; --g200:#F4F6F8; --g300:#DFE3E8; --g400:#C4CDD5;
  --g500:#919EAB; --g600:#637381; --g700:#454F5B; --g800:#212B36; --g900:#161C24;
  --ink:#1C1C1C; --text:#212B36; --text2:#637381; --text3:#919EAB;
  --canvas:#FAFAF9; --border:#E5E7EB; --divider: rgba(145,158,171,0.24);
  --r:8px; --r-md:12px; --r-lg:16px; --r-pill:24px;
  --sh-card: 0 0 2px 0 rgba(145,158,171,0.2), 0 12px 24px -4px rgba(145,158,171,0.12);
  --sh-z8: 0 8px 16px 0 rgba(145,158,171,0.16);
  --sh-z20: 0 20px 40px -4px rgba(145,158,171,0.16);
  --sh-cta: 0 4px 12px rgba(242,103,57,0.40);
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #root { height: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--g200); -webkit-font-smoothing: antialiased; }
.iconify { display: inline-block; }
button { font-family: var(--font); cursor: pointer; }

/* ---- App shell -------------------------------------------------------- */
.app { display: flex; height: 100vh; overflow: hidden; }

/* Sidebar */
.sidebar { width: 280px; flex-shrink: 0; background: var(--navy); color: #fff; display: flex; flex-direction: column; padding: 22px 18px; }
.sidebar .brand { padding: 4px 8px 26px; }
.sidebar .brand img { height: 30px; }
.nav-sub { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,0.36); padding: 4px 12px 10px; }
.nav-item { display: flex; align-items: center; gap: 13px; padding: 11px 13px; border-radius: var(--r); color: rgba(255,255,255,0.66); font-size: 14px; font-weight: 500; transition: background .2s, color .2s; }
.nav-item .iconify { font-size: 22px; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active { background: rgba(242,103,57,0.16); color: var(--orange); font-weight: 600; }
.nav-item.active .iconify { color: var(--orange); }
.sidebar .spacer { flex: 1; }
.nav-footer { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 14px; display: flex; align-items: center; gap: 11px; }
.nav-footer .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.nav-footer .who { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.3; }
.nav-footer .who small { display: block; font-weight: 400; color: rgba(255,255,255,0.5); font-size: 12px; }

/* Main */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 72px; flex-shrink: 0; background: rgba(255,255,255,0.8); backdrop-filter: blur(8px); border-bottom: 1px solid var(--g200); display: flex; align-items: center; padding: 0 32px; gap: 16px; }
.topbar .search { flex: 1; max-width: 360px; height: 40px; background: var(--g200); border-radius: var(--r); display: flex; align-items: center; gap: 8px; padding: 0 14px; color: var(--text3); font-size: 14px; }
.topbar .icon-btn { width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent; color: var(--text2); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.topbar .icon-btn:hover { background: var(--g200); }
.content { flex: 1; overflow-y: auto; padding: 32px 40px; }
.content-inner { max-width: 1100px; margin: 0 auto; }

/* ---- Typography helpers ---------------------------------------------- */
.page-h { font-size: 24px; font-weight: 700; color: var(--ink); }
.page-sub { font-size: 16px; color: var(--text2); margin-top: 4px; }

/* ---- Card ------------------------------------------------------------- */
.card { background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-card); padding: 24px; }
.card.accent { border-left: 4px solid var(--orange); }
.card.hair { box-shadow: none; border: 1px solid var(--border); border-radius: var(--r-md); }
.card.hair:hover { box-shadow: var(--sh-z8); }

/* ---- Icon tile -------------------------------------------------------- */
.tile { border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tile.sage { background: var(--sage-light); color: var(--navy-light); }
.tile.success { background: var(--success-lighter); color: var(--success-dark); }
.tile.grey { background: var(--g100); color: var(--g600); }
.tile.primary { background: var(--orange-lighter); color: #fff; }

/* ---- Buttons ---------------------------------------------------------- */
.btn { border: none; border-radius: var(--r); font-size: 14px; font-weight: 600; height: 44px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s, box-shadow .15s; }
.btn .iconify { font-size: 18px; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: var(--sh-cta); }
.btn-primary:hover { background: var(--orange-dark); box-shadow: none; }
.btn-pill { border-radius: var(--r-pill); }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--g100); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: rgba(145,158,171,0.08); }
.btn-block { width: 100%; }
.btn-sm { height: 36px; font-size: 13px; padding: 0 14px; }

/* ---- Labels / chips --------------------------------------------------- */
.label { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.label.success { background: rgba(100,193,100,0.16); color: var(--success-dark); }
.label.warning { background: rgba(255,193,7,0.16); color: #7A4F01; }
.label.primary { background: rgba(242,103,57,0.16); color: #9B3D16; }
.label.info { background: rgba(145,158,171,0.16); color: var(--text2); }

/* ---- Form fields ------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; color: var(--navy); }
.field .control { height: 48px; border: 1px solid rgba(145,158,171,0.32); border-radius: var(--r); padding: 0 14px; font-family: var(--font); font-size: 16px; color: var(--text); background: #fff; display: flex; align-items: center; gap: 8px; outline: none; }
.field .control:focus, .field .control.focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(242,103,57,0.12); }
.field .control::placeholder { color: #9CA3AF; }

/* utilities */
.row { display: flex; } .between { justify-content: space-between; } .center { align-items: center; }
.grid { display: grid; }
.muted { color: var(--text2); } .accent-text { color: var(--orange); }
.fade-in { animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
