/* FITNESS2000 – LIGHT SaaS (Green + Yellow)
   - clean, readable, modern
   - keeps your "glass" feel, but on a bright background
*/

:root{
  --bg0:#f6fff8;
  --bg1:#f2fff7;
  --bg2:#fffbe8;
  /* darker typography for better readability */
  --text:#05070d;
  --muted: rgba(5,7,13,.78);

  --primary:#16a34a;       /* emerald-ish */
  --primary2:#22c55e;
  --accent:#facc15;        /* yellow */
  --accent2:#f59e0b;

  --stroke: rgba(15,23,42,.10);
  --stroke2: rgba(15,23,42,.14);
  --glassA: rgba(255,255,255,.78);
  --glassB: rgba(255,255,255,.55);

  --shadow: 0 0 0 1px rgba(15,23,42,.06), 0 16px 70px rgba(2,6,23,.12);
  --shadowHot: 0 0 0 1px rgba(15,23,42,.08), 0 30px 120px rgba(2,6,23,.14);
  --radius: 22px;
}

html{scroll-behavior:smooth;}

body{
  color: var(--text);
  background:
    radial-gradient(1100px 800px at 14% 12%, rgba(34,197,94,.14), transparent 60%),
    radial-gradient(900px 700px at 82% 18%, rgba(250,204,21,.14), transparent 58%),
    linear-gradient(135deg, var(--bg1), var(--bg2));
  font-feature-settings: "ss01" 1, "ss02" 1;
}

/* optional subtle photo texture if bg exists */
body::before{
  content:"";
  position:fixed; inset:0;
  background-image:
    url(assets/bg.webp),
    url(assets/bg.jpg),
    url(public/assets/bg.webp),
    url(public/assets/bg.jpg),
    url(/assets/bg.webp),
    url(/assets/bg.jpg),
    url(/public/assets/bg.webp),
    url(/public/assets/bg.jpg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: .06;
  filter: grayscale(1) contrast(1.05);
  transform: scale(1.02);
  z-index:-2;
  pointer-events:none;
}

body::after{
  content:"";
  position:fixed; inset:0;
  background:
    radial-gradient(900px 700px at 22% 88%, rgba(34,197,94,.12), transparent 60%),
    radial-gradient(900px 700px at 78% 82%, rgba(250,204,21,.10), transparent 60%);
  z-index:-1;
  pointer-events:none;
}

h1,h2,h3{letter-spacing:-0.035em;}
.kicker{color:rgba(15,23,42,.78); font-size:12px; letter-spacing:.14em; text-transform:uppercase;}
.muted{color:var(--muted);}
.nowrap{white-space:nowrap;}

/* Glass */
.glass{
  background: linear-gradient(180deg, var(--glassA), var(--glassB));
  backdrop-filter: blur(16px);
  border: 1px solid var(--stroke);
}

/* Cards / wrappers */
.kartou{
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.62));
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.kartou:hover{border-color: var(--stroke2);}

.kartouInset{
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.62);
}

.tableWrap{
  border-radius: calc(var(--radius) - 4px);
  overflow:hidden;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.70);
}

thead th{
  background: rgba(15,23,42,.04);
  border-bottom: 1px solid rgba(15,23,42,.10);
  color: rgba(15,23,42,.80);
  padding: 12px 14px !important;
}

tbody td{padding: 12px 14px !important; border-top:1px solid rgba(15,23,42,.06);}

tbody tr:hover td{background: rgba(34,197,94,.05);}

/* Inputs */
input,select,textarea{
  background: rgba(255,255,255,.82) !important;
  color: var(--text) !important;
  border: 1px solid rgba(15,23,42,.14) !important;
  border-radius: 16px !important;
}
input::placeholder,textarea::placeholder{color: rgba(15,23,42,.58);}
input:focus,select:focus,textarea:focus{
  outline: none;
  border-color: rgba(34,197,94,.60) !important;
  box-shadow: 0 0 0 4px rgba(34,197,94,.18);
}

/* Buttons */
.btn{
  border-radius: 16px;
  transition: transform .08s ease, filter .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.btn:hover{filter: brightness(1.03);}
.btn:active{transform: translateY(1px) scale(.99);}

.btn-primary{
  background: linear-gradient(135deg, rgba(34,197,94,.98), rgba(22,163,74,.92));
  color: #06120b;
  border: 1px solid rgba(15,23,42,.10);
  position:relative; overflow:hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.60), 0 16px 60px rgba(34,197,94,.18);
}
.btn-primary::before{
  content:"";
  position:absolute; inset:-45% -65%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.45), transparent 55%);
  transform: rotate(12deg);
  opacity:.55;
  pointer-events:none;
}

.btn-accent{
  background: linear-gradient(135deg, rgba(250,204,21,.98), rgba(245,158,11,.92));
  color:#2a1a00;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 0 0 1px rgba(255,255,255,.60), 0 16px 60px rgba(250,204,21,.16);
}

.btn-ghost{
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(15,23,42,.12);
  color: rgba(15,23,42,.86);
}
.btn-ghost:hover{background: rgba(255,255,255,.78); border-color: rgba(15,23,42,.16);}

/* Chips / badges */
.chip{
  display:inline-flex; align-items:center; gap:.45rem;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(15,23,42,.12);
  color: rgba(15,23,42,.78);
  font-size: 12px;
}
.chip-dot{width:8px;height:8px;border-radius:999px;background: rgba(34,197,94,.95); box-shadow: 0 0 0 3px rgba(34,197,94,.14);}

/* Sidebar */
.sidebar{
  border-radius: 26px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.62));
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: var(--shadowHot);
}
.brand{
  display:flex; align-items:center; gap:.9rem;
  padding: .9rem .6rem 1.1rem .6rem;
  border-bottom: 1px solid rgba(15,23,42,.10);
  margin-bottom: .85rem;
}
.brandMark{
  width:46px; height:46px; border-radius:16px;
  background: linear-gradient(135deg, rgba(34,197,94,.98), rgba(250,204,21,.34));
  box-shadow: 0 0 0 1px rgba(15,23,42,.10), 0 22px 80px rgba(2,6,23,.12);
  display:flex; align-items:center; justify-content:center;
}
.brandMark svg{width:22px;height:22px;}
.brandTitle{font-weight:900; letter-spacing:-0.03em; color: rgba(15,23,42,.92);}
.brandSub{font-size:12px; color: rgba(15,23,42,.74); margin-top:2px;}

.navlink{
  display:flex; align-items:center; gap:.75rem;
  position:relative;
  border-radius: 16px;
  background: rgba(255,255,255,.62) !important;
  border-color: rgba(15,23,42,.10) !important;
  color: rgba(15,23,42,.86);
}
.navlink:hover{background: rgba(255,255,255,.78) !important;}
.navicon{width:18px;height:18px; opacity:.92}
.navpill{
  margin-left:auto;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.78);
  color: rgba(15,23,42,.72);
}
.navchev{opacity:.55}
.navlink::before{
  content:"";
  position:absolute; left:-10px; top:10px; bottom:10px;
  width:3px; border-radius: 999px;
  background: transparent;
}
.navlink.is-active::before{ background: linear-gradient(180deg, rgba(34,197,94,.98), rgba(250,204,21,.40)); }
.navlink.is-active{
  box-shadow: 0 0 0 1px rgba(15,23,42,.08), 0 30px 110px rgba(2,6,23,.10);
  background: rgba(34,197,94,.08) !important;
  border-color: rgba(34,197,94,.24) !important;
}

/* Topbar */
.topbar{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap: 14px; margin-bottom: 14px;}
.topbarLeft{display:flex; flex-wrap:wrap; align-items:center; gap:10px;}

.searchTop{
  display:flex; align-items:center; gap:10px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.70);
}
.searchTop input{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  min-width: 280px;
}
.keyHint{
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.78);
  color: rgba(15,23,42,.76);
}

/* Dashboard extras (shared classes) */
.segBtn,.miniSeg{
  border: 1px solid rgba(15,23,42,.12) !important;
  background: rgba(255,255,255,.72) !important;
  color: rgba(15,23,42,.80) !important;
}
.segBtn.active,.miniSeg.active{
  background: rgba(34,197,94,.14) !important;
  border-color: rgba(34,197,94,.28) !important;
  box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}

/* Make Tailwind text utilities readable on light */
.text-slate-100,.text-slate-200,.text-slate-300{color: rgba(15,23,42,.92) !important;}
.text-slate-300\/80,.text-slate-300\/70,.text-slate-300\/60,.text-slate-400\/80,.text-slate-400\/70{color: rgba(15,23,42,.76) !important;}

/* Guardrails: some pages used extra light gray, force better contrast */
p,li,td,th,label,small{color: rgba(15,23,42,.92);}
small,.help,.hint,.subtle{color: rgba(15,23,42,.78);}


/* STRONG CONTRAST OVERRIDES */
body{font-weight:500;}
h1,h2,h3,.h1,.h2,.h3{color: var(--text); font-weight:800;}
.btn,button,input,select,textarea{font-weight:600;}
.navlink span{font-weight:650;}

/* Force dark text for leftover dark-theme utility classes used in templates */
.text-slate-200\/90,.text-slate-200\/80,.text-slate-200\/70,
.text-slate-200\/60,.text-slate-200\/50,
.text-slate-300\/80,.text-slate-300\/70,.text-slate-300\/60,
.text-slate-400\/80,.text-slate-400\/70,.text-slate-400\/60,
.text-slate-500\/90,.text-slate-500\/80,.text-slate-500\/70,
.text-gray-400,.text-gray-500,.text-zinc-400,.text-zinc-500{
  color: rgba(5,7,13,.90) !important;
}
.text-slate-600,.text-slate-700,.text-slate-800,.text-slate-900{
  color: rgba(5,7,13,.94) !important;
}
small,.help,.hint,.subtle,.text-xs{color: rgba(5,7,13,.82) !important; font-weight:600;}
.placeholder\:text-slate-400::placeholder, input::placeholder, textarea::placeholder{
  color: rgba(5,7,13,.55) !important;
  font-weight:600;
}
a{color: rgba(5,7,13,.92);}


/* Icons */
.ico{width:18px;height:18px;display:inline-block;vertical-align:-0.15em;flex:0 0 auto}
.ico--title{width:20px;height:20px}
.btn .ico{width:16px;height:16px}
a.btn, button.btn{display:inline-flex;align-items:center;gap:.45rem}
.kpiTitle, .cardTitle{display:flex;align-items:center;gap:.45rem}

/* === Readability overrides (Tailwind text utilities in templates) === */
/* Some pages still use dark-theme utility classes (e.g. text-slate-200/90).
   On the light theme these become unreadable. Force them darker + a bit bolder. */
.text-slate-200, .text-slate-300, .text-slate-400,
.text-slate-200\/90, .text-slate-300\/80, .text-slate-400\/80,
.text-slate-500, .text-slate-500\/80,
.text-gray-500, .text-gray-400,
.text-zinc-500, .text-zinc-400,
.text-neutral-500, .text-neutral-400{
  color: rgba(5,7,13,.82) !important;
}
.text-slate-500\/80, .text-slate-400\/80, .text-slate-300\/80{
  font-weight: 650 !important;
}

/* Make small labels and helper texts more readable */
.kpiLabel, .brandSub, .keyHint{color: rgba(5,7,13,.78) !important;}
.kpiLabel{font-weight: 750;}

/* === Icons: ensure they always render and inherit color === */
.ico, .navicon{stroke: currentColor; fill: none;}
.btn .ico{opacity:.95}


/* === EXTRA READABILITY PATCH (v6) === */
:root{
  --text-strong:#0b1220;
  --text-soft: rgba(11,18,32,.78);
  --text-faint: rgba(11,18,32,.64);
}

/* Catch-all for common utility classes that stay too light on the new theme */
.text-slate-400,.text-slate-500,.text-slate-600,.text-slate-700,
.text-gray-400,.text-gray-500,.text-gray-600,.text-gray-700,
.text-zinc-400,.text-zinc-500,.text-zinc-600,.text-zinc-700{
  color: var(--text-soft) !important;
}
.text-slate-800,.text-slate-900,.text-gray-800,.text-gray-900,.text-zinc-800,.text-zinc-900{
  color: var(--text-strong) !important;
}

/* Tables – make headers and cells crisp */
table thead th, .table thead th{
  color: var(--text-strong) !important;
  font-weight: 800 !important;
}
table tbody td, .table tbody td, table td{
  color: var(--text-strong) !important;
  font-weight: 550;
}
table small, .table small, table .hint, table .subtle, .table .hint, .table .subtle{
  color: var(--text-soft) !important;
}

/* Pills / filters / tiny buttons */
.pill, .chip, .tag, .seg a, .seg button, .filters a, .filters button{
  color: var(--text-strong) !important;
  font-weight: 700;
}

/* Inputs */
input::placeholder, textarea::placeholder{
  color: var(--text-faint) !important;
  opacity: 1 !important;
}


/* READABILITY OVERRIDES – force dark readable text on light theme */
:root{
  --text:#05070d;
  --muted: rgba(5,7,13,.88);
}
body{ color: var(--text); font-weight: 480; }
.small, .muted, .hint, .scanHint, .sub, .help, .text-muted{ color: var(--muted) !important; font-weight: 600; }
a{ color: var(--text); }
a:hover{ color: var(--primary); }

/* Catch light/dark tailwind text utilities that are too pale for light theme */
[class*="text-slate-"]{ color: var(--text) !important; }
[class*="text-gray-"]{ color: var(--text) !important; }
[class*="text-zinc-"]{ color: var(--text) !important; }
[class*="text-neutral-"]{ color: var(--text) !important; }
[class*="text-stone-"]{ color: var(--text) !important; }

/* Headings / section labels */
.sectionTitle, .cardTitle{ color: var(--text) !important; font-weight: 800; letter-spacing: -.01em; }

/* Tables: darker headers + sticky */
.tableWrap{ overflow:auto; }
.tableWrap thead th, thead th{
  color: rgba(5,7,13,.92) !important;
  font-weight: 800 !important;
  position: sticky;
  top: 0;
  z-index: 2;
}
.tableWrap tbody td{ color: rgba(5,7,13,.90) !important; font-weight: 520; }
.tableWrap tbody td a{ color: rgba(5,7,13,.92) !important; font-weight: 650; }



/* Toasts */
.toastHost{
  position: fixed;
  right: 18px;
  top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}
.toast{
  pointer-events: auto;
  display:flex;
  align-items:flex-start;
  gap:10px;
  min-width: 260px;
  max-width: 420px;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,23,42,.14);
  box-shadow: 0 10px 30px rgba(2,6,23,.10);
  transform: translateY(-8px);
  opacity: 0;
  transition: .22s ease;
}
.toast.is-in{ transform: translateY(0); opacity: 1; }
.toast.is-out{ transform: translateY(-6px); opacity: 0; }
.toast__dot{
  width: 10px; height:10px; border-radius: 999px;
  margin-top: 4px;
  background: rgba(15,23,42,.35);
}
.toast--ok .toast__dot{ background: var(--primary); }
.toast--warn .toast__dot{ background: var(--accent2); }
.toast--err .toast__dot{ background: #ef4444; }
.toast__msg{ color: rgba(5,7,13,.92); font-weight: 700; font-size: 13px; line-height: 1.2rem; }
.toast__x{
  margin-left:auto;
  background: transparent;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: rgba(5,7,13,.55);
  padding: 0 6px;
  cursor: pointer;
}
.toast__x:hover{ color: rgba(5,7,13,.85); }




/* --- Compact action buttons (tables) --- */
.actions{ white-space:nowrap; }
.btn-icon{
  width:34px;
  height:34px;
  padding:0 !important;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:0;
  border:1px solid rgba(15,23,42,.14);
  background: rgba(255,255,255,.78);
  color: rgba(15,23,42,.92);
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}
.btn-icon:hover{
  background: rgba(255,255,255,.95);
  border-color: rgba(15,23,42,.22);
  transform: translateY(-1px);
}
.btn-icon:active{ transform: translateY(0); }
.btn-icon svg{ width:18px; height:18px; stroke-width:2.2; }
.btn-soft{ background: rgba(255,255,255,.62); }
.entryBtn{ width:30px; height:30px; border-radius:10px; box-shadow:none; }
.chipInline{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.70);
  font-size:12px;
  color: rgba(15,23,42,.88);
}
.btn-danger{
  background: rgba(225,29,72,.90) !important;
  color: #fff !important;
  border-color: rgba(225,29,72,.35) !important;
}
.btn-danger:hover{ background: rgba(225,29,72,1) !important; }

/* Make all table headers and small helper texts readable on light theme */
table thead th{
  color: #0f172a !important;
  font-weight: 800 !important;
}
table tbody td{ color:#111827 !important; }
small, .hint, .muted, .text-muted{ color:#334155 !important; font-weight:600; }
