:root {
  /* Fikia green sidebar + orange interior accents */
  --green: #30B54A;
  --green-deep: #25a03d;
  --green-soft: rgba(48, 181, 74, 0.12);
  --green-mist: #f0fdf4;
  --orange: #f48c25;
  --orange-deep: #e07512;
  --orange-soft: rgba(244, 140, 37, 0.14);
  --accent-pos: #30B54A;
  --accent-pos-soft: rgba(48, 181, 74, 0.12);
  --red: #E60000;
  --red-deep: #cc0000;
  --red-soft: rgba(230, 0, 0, 0.1);
  --ink: #1c2430;
  --ink-2: #2f3a48;
  --muted: #6b7785;
  --muted-2: #8a95a3;
  --line: rgba(28, 36, 48, 0.08);
  --line-strong: rgba(28, 36, 48, 0.12);
  --white: #ffffff;
  --surface: #ffffff;
  --bg: #f4f6f8;
  --sidebar: #1f8f3a;
  --sidebar-2: #187a30;
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Montserrat", sans-serif;
  --display: "Montserrat", sans-serif;
  --shadow: 0 10px 30px rgba(20, 40, 30, 0.06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
p { margin: 0; }
a { color: #1f8f3a; text-decoration: none; }
a:hover { color: #f48c25; }
.muted { color: var(--muted); line-height: 1.5; }
.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.accent-red { color: var(--red); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 12px;
  padding: 0.85rem 1.2rem;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn-primary {
  background: #f48c25;
  color: var(--white);
}
.btn-primary:hover {
  background: #e07512;
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--green-deep);
  border: 1px solid rgba(48, 181, 74, 0.35);
  border-radius: 12px;
  padding: 0.8rem 1.15rem;
  font-weight: 500;
}
.btn-ghost:hover { background: var(--green-soft); }

.alert {
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  font-weight: 500;
}
.alert-error { background: var(--red-soft); color: var(--red); border: 1px solid rgba(230,0,0,0.2); }
.alert-success { background: var(--green-mist); color: var(--green-deep); border: 1px solid rgba(48,181,74,0.25); }

/* ========== AUTH ========== */
.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 50% at 0% 0%, rgba(48, 181, 74, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(230, 0, 0, 0.08), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, var(--green-mist) 100%);
  position: relative;
  overflow: hidden;
}
.auth-body::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(48,181,74,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(48,181,74,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 30% 40%, black, transparent 70%);
  pointer-events: none;
  animation: gridDrift 18s linear infinite;
}
.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(1.25rem, 4vw, 3rem);
  max-width: 1180px;
  margin: 0 auto;
  align-items: center;
}
.auth-shell.single { grid-template-columns: 1fr; max-width: 440px; }
.auth-brand { animation: rise 0.8s var(--ease) both; }
.brand-mark {
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 4.8rem);
  line-height: 0.9;
  margin: 0 0 1.5rem;
  background: linear-gradient(90deg, var(--green), var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.04em;
}
.auth-brand h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  line-height: 1.02;
  margin: 0 0 1.1rem;
  max-width: 12ch;
  font-family: var(--font);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.auth-brand h1 em,
.auth-brand h1 .accent {
  color: var(--red);
  font-style: normal;
}
.brand-copy {
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
  font-weight: 500;
}
.brand-points {
  margin-top: 2rem;
  display: grid;
  gap: 0.75rem;
}
.brand-points span {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 600;
}
.brand-points i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.75rem;
}
.auth-panel {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border: 2px solid rgba(48, 181, 74, 0.2);
  border-radius: 20px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow);
  animation: rise 0.8s var(--ease) 0.12s both;
}
.auth-panel h2 {
  font-size: 1.85rem;
  margin-bottom: 0.35rem;
  font-family: var(--font);
  font-weight: 800;
}
.auth-panel > .muted { margin-bottom: 1.4rem; }
.stack-form { display: grid; gap: 1rem; }
.stack-form label {
  display: grid;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.stack-form input,
.stack-form select,
.stack-form textarea {
  width: 100%;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  font: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}
.stack-form .btn { width: 100%; margin-top: 0.35rem; }
.auth-footer { margin-top: 1.35rem; color: var(--muted-2); font-size: 0.95rem; font-weight: 500; }

/* ========== APP SHELL ========== */
.app-body {
  display: grid;
  grid-template-columns: 272px 1fr;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 55% 35% at 100% 0%, rgba(48, 181, 74, 0.08), transparent 50%),
    linear-gradient(180deg, #ffffff, var(--green-mist));
}
.sidebar {
  background:
    linear-gradient(165deg, rgba(48,181,74,0.18), transparent 42%),
    var(--sidebar);
  color: var(--sidebar-text);
  padding: 1.6rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.sidebar-brand {
  font-family: var(--font);
  font-weight: 800;
  font-size: 1.65rem;
  background: linear-gradient(90deg, var(--green), #7dff9a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 0.25rem 0.85rem 0.35rem;
  letter-spacing: -0.03em;
  line-height: 1;
}
.sidebar-tag {
  margin: -1rem 0.85rem 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  font-weight: 600;
}
.sidebar-nav { display: grid; gap: 0.3rem; }
.nav-item {
  color: rgba(255,255,255,0.72);
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.nav-item i { width: 1.1rem; text-align: center; opacity: 0.9; }
.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
  transform: translateX(2px);
}
.nav-item.active {
  background: linear-gradient(90deg, var(--green), var(--green-deep));
  color: #fff;
  box-shadow: 0 8px 24px rgba(48, 181, 74, 0.35);
}
.nav-item.disabled { opacity: 0.32; pointer-events: none; }
.sidebar-logout { margin-top: auto; }
.sidebar-logout button {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  border-radius: 12px;
  padding: 0.85rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: background 0.2s var(--ease);
}
.sidebar-logout button:hover { background: rgba(230, 0, 0, 0.22); color: #fff; }

.app-main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 1.6rem 2rem 1.2rem;
  border-bottom: 1px solid rgba(48, 181, 74, 0.12);
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 5;
  animation: rise 0.5s var(--ease) both;
}
.topbar h1 {
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-family: var(--font);
  font-weight: 800;
}
.topbar-meta { display: flex; gap: 0.6rem; align-items: center; }
.pill {
  display: inline-flex;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--green-soft);
  border: 1px solid rgba(48, 181, 74, 0.3);
  color: var(--green-deep);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
.content { padding: 1.5rem 2rem 2.75rem; }

.hero-strip {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  animation: rise 0.55s var(--ease) both;
}
.hero-strip h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 0.4rem;
  font-family: var(--font);
  font-weight: 800;
}
.hero-strip .muted { max-width: 36rem; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.35rem;
}
.stat-tile {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(48, 181, 74, 0.18);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem 1.15rem;
  box-shadow: var(--shadow);
  animation: rise 0.6s var(--ease) both;
}
.stat-tile::after {
  content: "";
  position: absolute;
  right: -20%;
  top: -40%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--green-soft);
  pointer-events: none;
}
.stat-tile:nth-child(2)::after { background: var(--red-soft); }
.stat-tile:nth-child(2) { animation-delay: 0.06s; }
.stat-tile:nth-child(3) { animation-delay: 0.12s; }
.stat-tile:nth-child(4) { animation-delay: 0.18s; }
.stat-label {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.stat-value {
  position: relative;
  z-index: 1;
  margin: 0.55rem 0 0;
  font-family: var(--font);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.panel {
  background: var(--surface);
  border: 1px solid rgba(48, 181, 74, 0.18);
  border-radius: var(--radius);
  padding: 1.35rem 1.45rem;
  box-shadow: var(--shadow);
  animation: rise 0.65s var(--ease) 0.1s both;
}
.panel h3 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  font-family: var(--font);
  font-weight: 800;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.05fr);
  gap: 1.15rem;
  align-items: start;
}
.check-row {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  font-size: 0.92rem !important;
}
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}
.data-table th {
  text-align: left;
  padding: 0.65rem 0.4rem;
  color: var(--muted-2);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.data-table td {
  text-align: left;
  padding: 0.95rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-weight: 500;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background 0.2s var(--ease); }
.data-table tbody tr:hover { background: var(--green-mist); }
.link-danger {
  background: none;
  border: 0;
  color: var(--red);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0;
}
.wallet-list { display: grid; gap: 0.85rem; }
.wallet-tile {
  border: 1px solid rgba(48, 181, 74, 0.2);
  border-radius: 14px;
  padding: 1.05rem 1.15rem;
  background: var(--green-mist);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.wallet-tile:hover {
  transform: translateY(-2px);
  border-color: var(--green);
}
.action-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.money-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.15rem;
  margin-bottom: 1.35rem;
  animation: rise 0.55s var(--ease) both;
}
.money-hero-main {
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  color: #fff;
  border-radius: 20px;
  padding: 1.6rem 1.7rem;
  position: relative;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.money-hero-main::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  right: -60px;
  top: -70px;
  background: rgba(255,255,255,0.12);
}
.money-hero-main::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  right: 40px;
  bottom: -50px;
  background: rgba(230, 0, 0, 0.18);
}
.money-hero-main > * { position: relative; z-index: 1; }
.money-hero-main .eyebrow { color: rgba(255,255,255,0.8); }
.money-hero-main .hero-amount {
  font-family: var(--font);
  font-weight: 900;
  font-size: clamp(2.3rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0.4rem 0 0.8rem;
}
.money-hero-side { display: grid; gap: 1rem; }
.money-hero-side .stat-tile { margin: 0; min-height: auto; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gridDrift {
  from { transform: translateY(0); }
  to { transform: translateY(48px); }
}

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; padding: 1.25rem; }
  .auth-brand h1 { max-width: none; }
  .brand-points { display: none; }
  .app-body { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
  }
  .sidebar-brand { font-size: 1.35rem; padding: 0; }
  .sidebar-tag { display: none; }
  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    gap: 0.35rem;
    width: 100%;
    padding-bottom: 0.2rem;
  }
  .nav-item { white-space: nowrap; padding: 0.65rem 0.8rem; font-size: 0.88rem; }
  .sidebar-logout { margin: 0 0 0 auto; }
  .sidebar-logout button { width: auto; padding: 0.65rem 0.9rem; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .two-col, .money-hero { grid-template-columns: 1fr; }
  .content, .topbar { padding-left: 1.1rem; padding-right: 1.1rem; }
}

/* ========== HUB LOGIN (Fikia Hub style) ========== */
.hub-auth {
  min-height: 100vh;
  margin: 0;
  font-family: "Montserrat", sans-serif;
  color: #0a0a0a;
  background:
    radial-gradient(ellipse 80% 70% at 50% 40%, #ffffff 0%, #fff3e6 48%, #ffe8d2 100%);
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.hub-wrap {
  width: 100%;
  max-width: 420px;
  display: grid;
  gap: 1.1rem;
  justify-items: center;
}
.hub-card {
  width: 100%;
  background: #ffffff;
  border-radius: 28px;
  padding: 2rem 1.6rem 1.7rem;
  box-shadow: 0 18px 50px rgba(90, 40, 10, 0.08);
  text-align: center;
  animation: fadeUp 0.55s var(--ease) both;
}
.hub-logo-box {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #eef2f7;
  box-shadow: 0 8px 24px rgba(90, 40, 10, 0.06);
  display: grid;
  place-items: center;
}
.hub-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #f48c25, #e07512);
  font-size: 1.1rem;
  animation: popIn 0.55s var(--ease) both;
}
.hub-title {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 500;
  color: #0f2744;
  letter-spacing: -0.02em;
}
.hub-subtitle {
  margin: 0.35rem 0 1.35rem;
  color: #7b8794;
  font-size: 0.9rem;
  font-weight: 400;
}
.hub-form {
  display: grid;
  gap: 0.85rem;
  text-align: left;
}
.hub-field {
  position: relative;
  display: block;
}
.hub-field > i:first-child {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa6b2;
  font-size: 0.95rem;
}
.hub-field input {
  width: 100%;
  border: 1.5px solid #e5ebf1;
  border-radius: 14px;
  padding: 0.95rem 2.6rem 0.95rem 2.55rem;
  font: inherit;
  font-size: 0.98rem;
  background: #fff;
  color: #0a0a0a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.hub-field input::placeholder { color: #9aa6b2; }
.hub-field input:focus {
  outline: none;
  border-color: #f48c25;
  box-shadow: 0 0 0 4px rgba(244, 140, 37, 0.14);
}
.hub-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #9aa6b2;
  cursor: pointer;
  padding: 0.35rem;
}
.hub-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -0.15rem;
}
.hub-link {
  color: #f48c25;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
}
.hub-link:hover { color: #e07512; }
.hub-submit {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 0.95rem 1.1rem;
  background: #f48c25;
  color: #fff;
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hub-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(244, 140, 37, 0.28);
}
.hub-signup {
  margin: 1.15rem 0 0;
  color: #7b8794;
  font-size: 0.92rem;
  font-weight: 500;
}
.hub-signup a {
  color: #f48c25;
  font-weight: 600;
  text-decoration: none;
}
.hub-footer {
  text-align: center;
  color: #8b97a3;
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0;
}
.hub-card .alert { text-align: left; }

/* ========== PORTAL DASHBOARD (Fikia Hub style) ========== */
.portal-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: #f3f5f7;
  font-family: "Montserrat", sans-serif;
  color: var(--ink);
}
.portal-sidebar {
  background: linear-gradient(180deg, #30B54A, #22963c 55%, #1c7f33);
  color: #f7fff9;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  animation: slideInLeft 0.55s var(--ease) both;
}
.portal-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.35rem;
  flex-wrap: wrap;
}
.portal-brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ffffff;
  color: #1f8f3a;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  animation: popIn 0.6s var(--ease) 0.15s both;
}
.portal-brand-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;
}
.portal-brand-sub {
  margin: 0.1rem 0 0;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: #d9f7e2;
  font-weight: 500;
}
.portal-user {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 0.75rem 0.8rem;
}
.portal-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  color: #1c7f33;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(255,255,255,0.7);
}
.portal-user-name {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ffffff;
}
.portal-user-role {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: #e4fbea;
  font-weight: 400;
}
.portal-nav {
  display: grid;
  gap: 0.2rem;
  flex: 1;
}
.portal-nav-label {
  margin: 0.85rem 0 0.35rem;
  padding: 0 0.7rem;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: #c9f3d4;
  font-weight: 500;
}
.portal-nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  color: #f3fff6;
  font-size: 0.88rem;
  font-weight: 400;
  text-decoration: none;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.portal-nav-item i {
  width: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: #e8fff0;
}
.portal-nav-item:hover {
  background: rgba(255,255,255,0.14);
  color: #ffffff;
  transform: translateX(4px);
}
.portal-nav-item:hover i { color: #ffffff; }
.portal-nav-item.active {
  background: #ffffff;
  color: #146c2e;
  position: relative;
  font-weight: 500;
}
.portal-nav-item.active i { color: #1f8f3a; }
.portal-nav-item.active::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f48c25;
  position: absolute;
  right: 12px;
}
  .portal-nav-item.disabled {
  color: rgba(243, 255, 246, 0.48);
  pointer-events: none;
}
button.portal-nav-item {
  font-family: inherit;
}
.portal-nav-item.disabled i { color: rgba(243, 255, 246, 0.42); }
.portal-sidebar-foot { margin-top: auto; }
.portal-signout {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  border-radius: 10px;
  padding: 0.75rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.portal-signout:hover {
  background: rgba(255,255,255,0.18);
  color: #ffffff;
  border-color: rgba(255,255,255,0.4);
}

.portal-main { min-width: 0; }
.portal-content { padding: 1.35rem 1.5rem 2rem; }

.welcome-banner {
  background: linear-gradient(135deg, #f48c25, #e07512 55%, #c9610d);
  border-radius: 22px;
  padding: 1.5rem 1.6rem;
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.15rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.6s var(--ease) both;
}
.welcome-banner::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  right: -50px;
  top: -70px;
  background: rgba(255,255,255,0.12);
  animation: floatSoft 6s ease-in-out infinite;
}
.welcome-banner > * { position: relative; z-index: 1; }
.welcome-pill {
  display: inline-flex;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 230, 200, 0.4);
  background: rgba(255,255,255,0.12);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-bottom: 0.7rem;
}
.welcome-copy h1 {
  margin: 0 0 0.45rem;
  color: #ffffff;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 500;
}
.welcome-copy p {
  margin: 0;
  max-width: 42rem;
  color: #fff4e8;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
}
.welcome-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  color: #9a4d0c;
  border-radius: 12px;
  padding: 0.85rem 1.15rem;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.welcome-btn:hover {
  color: #7a3c08;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.15rem;
}
.kpi-value-text {
  font-size: 1.35rem;
  line-height: 1.25;
  word-break: break-word;
}

.period-filter {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid rgba(28, 36, 48, 0.08);
  border-radius: 16px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.45s var(--ease) both;
}
.period-filter-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
}
.period-filter label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #5f6b78;
  text-transform: uppercase;
}
.period-filter select,
.period-filter input[type="date"],
.period-filter input[type="month"],
.period-filter input[type="number"] {
  border: 1.5px solid #e5ebf1;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  min-width: 9.5rem;
  background: #fff;
  color: #1a2430;
}
.period-filter select:focus,
.period-filter input:focus {
  outline: none;
  border-color: #30b54a;
  box-shadow: 0 0 0 3px rgba(48, 181, 74, 0.15);
}
.period-filter-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}
.period-active {
  margin: 0;
  font-size: 0.84rem;
  color: #5f6b78;
}
.period-active strong {
  color: #1a2430;
  font-weight: 500;
}
.period-field.is-hidden {
  display: none;
}
.kpi-card {
  background: #fff;
  border-radius: 18px;
  padding: 1.05rem 1.1rem 1rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(20,40,30,0.04);
  animation: fadeUp 0.55s var(--ease) both;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(60, 30, 10, 0.1);
}
.kpi-card:nth-child(1) { animation-delay: 0.05s; }
.kpi-card:nth-child(2) { animation-delay: 0.1s; }
.kpi-card:nth-child(3) { animation-delay: 0.15s; }
.kpi-card:nth-child(4) { animation-delay: 0.2s; }
.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}
.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.85rem;
}
.kpi-icon.green { background: #30B54A; }
.kpi-icon.orange { background: #f48c25; }
.kpi-expand {
  color: #b0bac4;
  font-size: 0.75rem;
  text-decoration: none;
}
.kpi-expand:hover { color: var(--green); }
.muted-icon { color: #d0d7de; }
.kpi-label {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #7a8794;
  font-weight: 500;
}
.kpi-value {
  margin: 0.45rem 0 0.3rem;
  font-size: 1.25rem;
  font-weight: 500;
  color: #1a2430;
  letter-spacing: -0.02em;
}
.kpi-sub {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: #8b97a3;
  font-weight: 400;
}

.monitor-panel {
  background: #fff;
  border-radius: 18px;
  padding: 1.1rem 1.2rem 0.4rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(20,40,30,0.04);
  animation: fadeUp 0.65s var(--ease) 0.22s both;
}
.monitor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.monitor-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.monitor-title h2 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #1a2430;
}
.monitor-soft {
  color: #7a8794;
  font-size: 0.82rem;
  font-weight: 400;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #30B54A;
  box-shadow: 0 0 0 4px rgba(48, 181, 74, 0.18);
  animation: pulseDot 1.6s ease-in-out infinite;
}
.monitor-history {
  color: #f48c25;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.monitor-empty {
  padding: 1.25rem 0.25rem 1.4rem;
}
.monitor-empty p {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.92rem;
}
.monitor-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 0.15rem;
  border-bottom: 1px solid var(--line);
  animation: fadeUp 0.45s var(--ease) both;
  transition: background 0.2s ease;
}
.monitor-item:hover { background: #fffaf4; }
.monitor-item:nth-child(1) { animation-delay: 0.25s; }
.monitor-item:nth-child(2) { animation-delay: 0.3s; }
.monitor-item:nth-child(3) { animation-delay: 0.35s; }
.monitor-item:nth-child(4) { animation-delay: 0.4s; }
.monitor-item:nth-child(5) { animation-delay: 0.45s; }
.monitor-item:nth-child(6) { animation-delay: 0.5s; }
.monitor-item:last-child { border-bottom: 0; }
.monitor-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}
.monitor-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.monitor-icon.green { background: #30B54A; }
.monitor-icon.orange { background: #f48c25; }
.monitor-status.ok {
  color: #1f7a38;
  background: var(--accent-pos-soft);
}
.monitor-status.warn {
  color: var(--orange-deep);
  background: var(--orange-soft);
}
.monitor-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
}
.monitor-when {
  margin: 0.2rem 0 0;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  font-weight: 400;
}
.monitor-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.monitor-status {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  font-weight: 500;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
}
.monitor-status.ok {
  color: #1f7a38;
  background: var(--accent-pos-soft);
}
.monitor-status.warn {
  color: var(--orange-deep);
  background: var(--orange-soft);
}
.monitor-meta {
  color: var(--muted-2);
  font-size: 0.75rem;
  font-weight: 400;
}
.monitor-amount {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
}

/* Module pages inside portal */
.portal-content .hero-strip h2 {
  font-size: 1.35rem;
  font-weight: 500;
}
.portal-content .panel h3 {
  font-size: 1.05rem;
  font-weight: 500;
}
.portal-content .stat-value,
.portal-content .data-table {
  font-weight: 400;
}

/* Mobile chrome (hidden on desktop) */
.portal-mobile-bar { display: none; }
.portal-drawer-close { display: none; }
.portal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 24, 18, 0.45);
  z-index: 80;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

@media (max-width: 1400px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .portal-body { grid-template-columns: 1fr; }
  .portal-mobile-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 0.7rem 0.9rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(28, 36, 48, 0.08);
  }
  .portal-menu-btn,
  .portal-drawer-close,
  .portal-mobile-bell {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(28, 36, 48, 0.1);
    background: #fff;
    color: #1a2430;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.05rem;
    flex-shrink: 0;
    text-decoration: none;
    position: relative;
  }
  .portal-drawer-close {
    display: inline-flex;
    margin-left: auto;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
  }
  .portal-mobile-brand {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 0.1rem;
  }
  .portal-mobile-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1f8f3a;
  }
  .portal-mobile-page {
    font-size: 0.72rem;
    color: #6b7785;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .portal-mobile-bell .nav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    margin: 0;
  }
  .portal-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 86vw);
    max-height: 100vh;
    z-index: 90;
    transform: translateX(-105%);
    transition: transform 0.28s var(--ease);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.18);
  }
  .portal-body.nav-open .portal-sidebar {
    transform: translateX(0);
  }
  .portal-body.nav-open .portal-backdrop { display: block; }
  .portal-backdrop[hidden] { display: none !important; }
  .portal-nav {
    display: grid;
    gap: 0.2rem;
  }
  .portal-nav-label { display: block; }
  .portal-user, .portal-sidebar-foot { display: flex; }
  .portal-sidebar-foot { display: block; }
  .sidebar-chat:not(.is-open) { display: none; }
  .welcome-banner { flex-direction: column; align-items: flex-start; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .period-filter { flex-direction: column; align-items: stretch; }
  .period-filter-actions { justify-content: space-between; }
  .monitor-item { flex-direction: column; align-items: flex-start; }
  .monitor-right { justify-content: flex-start; }
  .portal-content { padding: 1rem 1rem 1.75rem; }
  .hero-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .table-wrap { margin: 0 -0.25rem; }
  .stack-form .row-2,
  .stack-form .row-3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .welcome-actions { width: 100%; flex-wrap: wrap; }
  .welcome-btn { flex: 1 1 auto; justify-content: center; }
  .assistant-panel { min-height: calc(100dvh - 11rem); border-radius: 14px; }
  .assistant-page .chatbot-messages { min-height: 240px; }
  .assistant-page .chatbot-form { flex-wrap: wrap; }
  .assistant-page .chatbot-form input { min-width: 0; width: 100%; }
  .assistant-page .chatbot-form .btn { width: 100%; }
  .data-table { font-size: 0.86rem; }
  .data-table th, .data-table td { padding: 0.7rem 0.35rem; }
  .btn, .portal-menu-btn, .hub-submit { min-height: 44px; }
  .hub-card { padding: 1.5rem 1.15rem 1.35rem; border-radius: 22px; }
}
@media (min-width: 721px) and (max-width: 1100px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .report-grid { grid-template-columns: 1fr 1fr; }
  .assistant-panel { min-height: calc(100dvh - 12rem); }
}

/* Budgets & Savings */
.stack-forms { display: grid; gap: 1rem; }
.goal-list { display: grid; gap: 0.9rem; }
.goal-card {
  border: 1px solid rgba(28,36,48,0.08);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  background: #fff;
  animation: fadeUp 0.45s var(--ease) both;
}
.goal-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.65rem;
}
.goal-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a2430;
}
.goal-meta {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: #7a8794;
  font-weight: 400;
}
.status-pill {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  font-weight: 500;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.status-pill.ok { color: #1f7a38; background: rgba(48,181,74,0.12); }
.status-pill.warn { color: #c9610d; background: rgba(244,140,37,0.14); }
.status-pill.over { color: #c62828; background: rgba(230,0,0,0.1); }
.progress-track {
  height: 8px;
  border-radius: 999px;
  background: #eef2f5;
  overflow: hidden;
  margin-bottom: 0.55rem;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.45s var(--ease);
}
.progress-fill.ok { background: #30B54A; }
.progress-fill.warn { background: #f48c25; }
.progress-fill.over { background: #E60000; }
.goal-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #5f6b78;
  margin-bottom: 0.45rem;
}
.goal-tip {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  color: #1f8f3a;
  font-weight: 400;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: end;
}
.filter-row label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #2f3a48;
}
.filter-row input[type="month"] {
  border: 1.5px solid #e5ebf1;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font: inherit;
}

.report-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.15rem;
  padding: 1.15rem 1.25rem;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(48, 181, 74, 0.10), rgba(255, 140, 0, 0.08)),
    #fff;
  border: 1px solid rgba(48, 181, 74, 0.12);
  animation: fadeUp 0.5s var(--ease) both;
}
.report-kpis .kpi-card {
  animation: fadeUp 0.55s var(--ease) both;
}
.report-kpis .kpi-card:nth-child(1) { animation-delay: 0.05s; }
.report-kpis .kpi-card:nth-child(2) { animation-delay: 0.12s; }
.report-kpis .kpi-card:nth-child(3) { animation-delay: 0.19s; }
.report-kpis .kpi-card:nth-child(4) { animation-delay: 0.26s; }
.report-panel {
  animation: fadeUp 0.6s var(--ease) both;
  animation-delay: 0.2s;
}
.report-bars .progress-fill {
  transition: width 0.7s var(--ease);
}
.report-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: #1f8f3a;
  font-weight: 500;
}
.report-hero h2 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 500;
}
.report-filter {
  display: flex;
  gap: 0.65rem;
  align-items: end;
  background: #fff;
  border: 1px solid rgba(28,36,48,0.08);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  box-shadow: var(--shadow);
}
.report-filter label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #5f6b78;
}
.report-filter input[type="month"] {
  border: 1.5px solid #e5ebf1;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}
.report-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  margin-top: 0.25rem;
}
.report-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}
.report-panel-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
}
.report-bars { display: grid; gap: 0.85rem; }
.report-bar-row { display: grid; gap: 0.35rem; }
.report-bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.86rem;
  color: #2f3a48;
}
.report-bar-meta strong { font-weight: 500; color: #1a2430; }
.report-health h3 { margin-bottom: 0.55rem; }

@media (max-width: 920px) {
  .report-hero { flex-direction: column; align-items: stretch; }
  .report-grid { grid-template-columns: 1fr; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-18px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 4px rgba(48, 181, 74, 0.18); }
  50% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(48, 181, 74, 0.08); }
}
@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Settings & Notifications */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}
.settings-prefs .check-row {
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(28, 36, 48, 0.06);
}
.settings-note { margin: 0.35rem 0 0.25rem; font-size: 0.82rem; }
.nav-badge {
  margin-left: auto;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #ff8c00;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.notify-panel { padding: 0.35rem 0.25rem; }
.notify-list { display: grid; gap: 0.55rem; }
.notify-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(28, 36, 48, 0.06);
  background: #fff;
  animation: fadeUp 0.45s var(--ease) both;
}
.notify-item.is-unread {
  background: linear-gradient(135deg, rgba(48, 181, 74, 0.06), rgba(255, 140, 0, 0.05));
  border-color: rgba(48, 181, 74, 0.18);
}
.notify-main { display: flex; gap: 0.75rem; align-items: flex-start; }
.notify-dot {
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: #c5ced8;
  flex-shrink: 0;
}
.notify-item.is-unread .notify-dot {
  background: #30b54a;
  box-shadow: 0 0 0 4px rgba(48, 181, 74, 0.16);
}
.notify-title { margin: 0 0 0.25rem; font-weight: 500; color: #1a2430; }
.notify-body { margin: 0 0 0.4rem; color: #4a5563; font-size: 0.9rem; line-height: 1.45; }
.notify-meta { margin: 0; font-size: 0.72rem; letter-spacing: 0.04em; color: #7a8694; }
.notify-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.advice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.advice-card {
  background: #fff;
  border: 1px solid rgba(28, 36, 48, 0.08);
  border-radius: 16px;
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
  animation: fadeUp 0.5s var(--ease) both;
}
.advice-card h3 { margin: 0 0 0.45rem; font-size: 1.05rem; font-weight: 500; }
.advice-card p { margin: 0; color: #4a5563; line-height: 1.5; }
.advice-tag {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: #1f8f3a;
}
.advice-tag.warn { color: #c45c00; }
.advice-tag.good { color: #1f8f3a; }
@media (max-width: 1100px) {
  .settings-grid { grid-template-columns: 1fr; }
  .advice-grid { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  .notify-item { flex-direction: column; }
  .notify-actions { justify-content: flex-start; }
}



/* In-account chatbot — docked in sidebar */
.chatbot-nav-btn {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.chatbot-nav-btn.is-active {
  background: #ffffff;
  color: #146c2e;
  position: relative;
  font-weight: 500;
}
.chatbot-nav-btn.is-active i { color: #1f8f3a; }
.chatbot-nav-btn.is-active::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f48c25;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.sidebar-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  font-family: var(--font);
}
.sidebar-chat .chatbot-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 220px;
  max-height: min(42vh, 420px);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  overflow: hidden;
}
.sidebar-chat.is-open .chatbot-panel {
  display: flex;
}
.sidebar-chat .chatbot-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.sidebar-chat .chatbot-kicker {
  margin: 0 0 0.15rem;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: #d9f7e2;
  font-weight: 500;
}
.sidebar-chat .chatbot-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
}
.sidebar-chat .chatbot-close {
  border: 0;
  background: rgba(255, 255, 255, 0.2);
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
}
.sidebar-chat .chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.7rem;
  display: grid;
  gap: 0.55rem;
  align-content: start;
  background: rgba(255, 255, 255, 0.08);
}
.chat-bubble {
  max-width: 95%;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  font-size: 0.78rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-bubble p { margin: 0; }
.chat-bot {
  justify-self: start;
  background: #ffffff;
  color: #243041;
  border-bottom-left-radius: 4px;
}
.chat-user {
  justify-self: end;
  background: #ff8c00;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}
.chat-action-link {
  display: inline-flex;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(48, 181, 74, 0.14);
  color: #146c2e;
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 500;
}
.sidebar-chat .chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.45rem 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.sidebar-chat .chatbot-suggestions button {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.14);
  color: #f3fff6;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  font: inherit;
  font-size: 0.68rem;
  cursor: pointer;
}
.sidebar-chat .chatbot-form {
  display: flex;
  gap: 0.35rem;
  padding: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.sidebar-chat .chatbot-form input {
  flex: 1;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.92);
  color: #1a2430;
}
.sidebar-chat .chatbot-form input:focus {
  outline: none;
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.sidebar-chat .chatbot-send {
  border: 0;
  width: 2.35rem;
  border-radius: 10px;
  background: #ff8c00;
  color: #fff;
  cursor: pointer;
}

@media (max-width: 920px) {
  .sidebar-chat {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 90;
    flex: none;
  }
  .sidebar-chat:not(.is-open) { display: none; }
  .sidebar-chat.is-open { display: flex; }
  .sidebar-chat .chatbot-panel {
    display: flex;
    max-height: min(65vh, 480px);
    background: #fff;
    border-color: rgba(28, 36, 48, 0.1);
    box-shadow: 0 18px 40px rgba(20, 30, 40, 0.22);
  }
  .sidebar-chat .chatbot-head {
    background: linear-gradient(135deg, rgba(48,181,74,0.12), rgba(255,140,0,0.08));
  }
  .sidebar-chat .chatbot-kicker { color: #1f8f3a; }
  .sidebar-chat .chatbot-head h2 { color: #1a2430; }
  .sidebar-chat .chatbot-close {
    background: rgba(28, 36, 48, 0.06);
    color: #4a5563;
  }
  .sidebar-chat .chatbot-messages { background: #f7faf8; }
  .sidebar-chat .chatbot-suggestions {
    border-top-color: rgba(28, 36, 48, 0.08);
    background: #fff;
  }
  .sidebar-chat .chatbot-suggestions button {
    border-color: rgba(28, 36, 48, 0.1);
    background: #f4f7f5;
    color: #2f3a48;
  }
  .sidebar-chat .chatbot-form {
    border-top-color: rgba(28, 36, 48, 0.08);
    background: #fff;
  }
}

/* Full-page AI Chat */
.assistant-page {
  margin-top: 0.5rem;
}
.assistant-panel {
  display: flex;
  flex-direction: column;
  min-height: min(72vh, 720px);
  background: #fff;
  border: 1px solid rgba(28, 36, 48, 0.08);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(26, 26, 26, 0.06);
  overflow: hidden;
}
.assistant-page .chatbot-messages {
  flex: 1;
  min-height: 320px;
  max-height: none;
  padding: 1.1rem 1.2rem;
  overflow-y: auto;
  background: #f7faf8;
}
.assistant-page .chatbot-form {
  display: flex;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border-top: 1px solid rgba(28, 36, 48, 0.08);
  background: #fff;
}
.assistant-page .chatbot-form input {
  flex: 1;
  border: 1px solid rgba(28, 36, 48, 0.12);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  font: inherit;
}
.assistant-page .chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  border-top: 1px solid rgba(28, 36, 48, 0.06);
}
.assistant-page .chatbot-suggestions button {
  border: 1px solid rgba(28, 36, 48, 0.1);
  background: #f4f7f5;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
}
.pill-ok {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(48,181,74,0.12);
  color: #1f8f3a;
  font-size: 0.88rem;
  font-weight: 600;
}
