/* ══ InteliGro-tema vir die grondregstelling-app (2026-10-01) ═══════════════════════════════
   Tokens en komponente oorgeneem uit InteliGro (C:\Tools\inteligro\frontend\index.html):
   donker panele, groen aksent, Inter/Jost/Outfit, JetBrains Mono vir syfers, Lucide-ikone in
   getinte blokkies. ALLES is ge-namespace onder .ig-* (of onder html.ig) sodat hierdie lêer
   niks in die regstel-skerm se eie style raak wat dit nie doelbewus oorskryf nie. */

:root {
  --bg: #0F1419; --panel: #1A1F26; --panel2: #22272F; --panel3: #2A3038;
  --border: #2A2F36; --border2: #363D45; --border3: #454C55;
  --green: #41B649; --green2: #2E9E3F; --green-br: #5FD168;
  --green-dim: rgba(65,182,73,.16); --green-glow: rgba(65,182,73,.30);
  --gold: #F4B400; --gold-dim: rgba(244,180,0,.18);
  --blue: #3A86B7; --blue-dim: rgba(58,134,183,.18);
  --soil: #A88B82; --ai: #7686D0; --red: #E07070; --red-dim: rgba(208,80,80,.18);
  --text: #E6E8EB; --text2: #9AA0A6; --text3: #6B7280;
  --r-sm: 6px; --r-md: 9px; --r-lg: 12px; --r-xl: 16px; --r-pill: 999px;
  --shadow: 0 2px 5px -1px rgba(0,0,0,.28), 0 6px 16px -3px rgba(0,0,0,.34);
  --shadow2: 0 6px 16px -4px rgba(0,0,0,.42), 0 16px 36px -8px rgba(0,0,0,.5);
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-kop: 'Jost', 'Outfit', system-ui, sans-serif;
  --f-knop: 'Outfit', 'Inter', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;
}

/* Lucide-kontrak: 24×24-raster, 2 px-lyn, kleur volg die teks. */
.ic { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2;
      stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; pointer-events: none; }
.ic.sm { width: 15px; height: 15px; vertical-align: -2px; }
.ic.lg { width: 22px; height: 22px; }

/* Getinte ikoonblokkie (InteliGro se .igl-ico) */
.ig-teel { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto;
           color: var(--green-br); background: linear-gradient(145deg, rgba(64,176,72,.24), rgba(64,176,72,.07));
           border: 1px solid rgba(95,209,104,.30); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.ig-teel .ic { width: 20px; height: 20px; }
.ig-teel.goud  { color: var(--gold); background: linear-gradient(145deg, rgba(244,180,0,.22), rgba(244,180,0,.06)); border-color: rgba(244,180,0,.32); }
.ig-teel.blou  { color: #7fc4dd; background: linear-gradient(145deg, rgba(58,134,183,.26), rgba(58,134,183,.07)); border-color: rgba(127,196,221,.32); }
.ig-teel.grys  { color: var(--text2); background: linear-gradient(145deg, rgba(154,160,166,.18), rgba(154,160,166,.05)); border-color: rgba(154,160,166,.25); }
.ig-teel.rooi  { color: var(--red); background: linear-gradient(145deg, rgba(224,112,112,.22), rgba(224,112,112,.06)); border-color: rgba(224,112,112,.32); }

/* ── Kopbalk ─────────────────────────────────────────────────────────────── */
.ig-kop { background: var(--panel); border-bottom: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,.18);
          display: flex; align-items: center; gap: 12px; padding: 10px 18px; flex-wrap: wrap; position: sticky; top: 0; z-index: 90;
          font-family: var(--f-body); color: var(--text); }
.ig-merk { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ig-merk h1 { margin: 0; font-family: var(--f-kop); font-weight: 600; font-size: 19px; color: #fff; letter-spacing: -.2px; line-height: 1.15; }
.ig-merk .ig-sub { font-size: 12px; color: var(--text2); margin-top: 1px; }
.ig-kop .ig-spasie { flex: 1; }
.ig-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.ig-nav a, .ig-nav span { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; white-space: nowrap;
          font-family: var(--f-knop); font-size: 13px; font-weight: 600; padding: 7px 13px; border-radius: var(--r-pill);
          color: var(--text2); background: var(--panel2); border: 1px solid var(--border2); transition: all .15s; }
.ig-nav a:hover { color: var(--green-br); border-color: var(--border3); }
.ig-nav .aktief { color: #fff; background: var(--green-dim); border-color: rgba(95,209,104,.45); cursor: default; }
.ig-nav .aktief .ic { color: var(--green-br); }
.ig-ekchip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: var(--r-pill);
             background: var(--panel2); border: 1px solid var(--border2); font-size: 12px; color: var(--text2); white-space: nowrap; }
.ig-ekchip .ig-voorletter { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
             background: var(--green-dim); color: var(--green-br); font-weight: 700; font-size: 11px; font-family: var(--f-knop); }
.ig-ekchip strong { color: var(--text); font-weight: 600; }

/* ── Knoppies (InteliGro .btn-main / .btn-sec) ──────────────────────────── */
.ig-knop { display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; white-space: nowrap;
           font-family: var(--f-knop); font-size: 13px; font-weight: 600; line-height: 1.1;
           padding: 8px 15px; border-radius: var(--r-md); border: 1px solid var(--green); background: var(--green2); color: #fff; text-decoration: none;
           transition: background .15s, border-color .15s, box-shadow .15s, color .15s; }
.ig-knop:hover { background: var(--green); box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.ig-knop:focus-visible { outline: 2px solid var(--green-br); outline-offset: 2px; }
.ig-knop:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.ig-knop.sek { background: var(--panel2); color: var(--text); border-color: var(--border2); }
.ig-knop.sek:hover { border-color: var(--border3); color: var(--green-br); background: var(--panel3); }
.ig-knop.blou { background: rgba(58,134,183,.18); color: #9fd3ea; border-color: rgba(127,196,221,.45); }
.ig-knop.blou:hover { background: rgba(58,134,183,.30); }
.ig-knop.gevaar { background: var(--red-dim); color: #f0a0a0; border-color: rgba(224,112,112,.45); }
.ig-knop.gevaar:hover { background: rgba(208,80,80,.32); color: #fff; }
.ig-knop.klein { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.ig-knop.ikoon { padding: 7px; }

/* ── Kaarte / panele ────────────────────────────────────────────────────── */
.ig-paneel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow); }

/* ── Velde ─────────────────────────────────────────────────────────────── */
.ig-veld { width: 100%; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--border2); background: #12171d;
           color: var(--text); font-family: var(--f-body); font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
.ig-veld::placeholder { color: var(--text3); }
.ig-veld:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-dim); }
.ig-etiket { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin: 0 0 5px; font-family: var(--f-body); }

/* ── Segment-kieser (InteliGro se pil-segmente) ────────────────────────── */
.ig-seg { display: inline-flex; background: #12171d; border: 1px solid var(--border2); border-radius: var(--r-pill); padding: 3px; gap: 2px; flex-wrap: wrap; }
.ig-seg button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: var(--r-pill);
                 font-family: var(--f-knop); font-size: 12.5px; font-weight: 600; color: var(--text2); transition: all .15s; }
.ig-seg button:hover { color: var(--text); }
.ig-seg button.aktief { background: var(--green-dim); color: #fff; box-shadow: inset 0 0 0 1px rgba(95,209,104,.45); }
.ig-seg button:focus-visible { outline: 2px solid var(--green-br); outline-offset: 1px; }

/* ── Pille ─────────────────────────────────────────────────────────────── */
.ig-pil { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-pill); font-size: 11.5px;
          font-weight: 700; font-family: var(--f-knop); white-space: nowrap; border: 1px solid transparent; }
.ig-pil.todo { background: var(--gold-dim); color: #FFD680; border-color: rgba(244,180,0,.4); }
.ig-pil.busy { background: rgba(232,122,23,.18); color: #F5A35A; border-color: rgba(232,122,23,.45); }
.ig-pil.done { background: var(--green-dim); color: var(--green-br); border-color: rgba(95,209,104,.4); }
.ig-pil.wag  { background: rgba(154,160,166,.14); color: var(--text2); border-color: var(--border3); }
.ig-pil.info { background: var(--blue-dim); color: #9fd3ea; border-color: rgba(127,196,221,.38); }
.ig-pil.grond   { background: rgba(168,139,130,.16); color: #D2B8AE; border-color: rgba(168,139,130,.42); }
.ig-pil.blaar   { background: rgba(155,203,60,.14); color: #B9DE72; border-color: rgba(155,203,60,.4); }
.ig-pil.aalwurm { background: rgba(232,122,23,.14); color: #F2B07A; border-color: rgba(232,122,23,.38); }
.ig-pil.none    { color: var(--text3); }
.ig-pil.regsteller { background: rgba(118,134,208,.18); color: #b4bdf0; border-color: rgba(118,134,208,.45); }
.ig-pil.admin   { background: var(--green-dim); color: var(--green-br); border-color: rgba(95,209,104,.4); }
.ig-pil.gustav  { background: var(--gold-dim); color: #FFD680; border-color: rgba(244,180,0,.4); }
.ig-pil.af      { background: rgba(154,160,166,.12); color: var(--text3); border-color: var(--border2); text-decoration: line-through; }

/* ── Modaal ────────────────────────────────────────────────────────────── */
.ig-modaal-bg { display: none; position: fixed; inset: 0; background: rgba(5,8,10,.62); backdrop-filter: blur(3px); z-index: 200;
                align-items: center; justify-content: center; padding: 16px; }
.ig-modaal-bg.oop { display: flex; }
.ig-modaal { background: var(--panel); color: var(--text); border: 1px solid var(--border2); border-radius: var(--r-xl); box-shadow: var(--shadow2);
             width: 100%; max-width: 760px; max-height: 88vh; overflow: auto; padding: 20px 22px; font-family: var(--f-body); }
.ig-modaal-kop { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ig-modaal-kop h3 { margin: 0; font-family: var(--f-kop); font-weight: 600; font-size: 19px; color: #fff; flex: 1; }
.ig-modaal p { color: var(--text2); font-size: 13px; line-height: 1.5; }

/* ── Aanmeld-skerm (InteliGro se landing: satellietbeeld + glas-paneel) ── */
.ig-aanmeld { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px;
              background: #0b1014 url('/sa-satelliet.jpg') center/cover no-repeat; font-family: var(--f-body); }
.ig-aanmeld::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, rgba(11,16,20,.35), rgba(11,16,20,.88)); }
.ig-aanmeld .ig-glas { position: relative; width: 100%; max-width: 380px; padding: 26px 24px 22px; border-radius: 18px;
              background: rgba(16,24,30,.62); border: 1px solid rgba(120,150,140,.22); backdrop-filter: blur(16px) saturate(1.1);
              -webkit-backdrop-filter: blur(16px) saturate(1.1); box-shadow: 0 24px 60px -16px rgba(0,0,0,.7); color: #eef3f1; }
.ig-aanmeld h2 { margin: 12px 0 2px; font-family: var(--f-kop); font-weight: 600; font-size: 22px; color: #fff; }
.ig-aanmeld .ig-glas p { margin: 0 0 16px; font-size: 13px; color: #9fb2ad; }
.ig-aanmeld .ig-veld { margin-bottom: 10px; background: rgba(10,16,20,.7); }
.ig-aanmeld .ig-knop { width: 100%; padding: 11px; font-size: 15px; }
.ig-aanmeld .ig-fout { color: var(--red); font-size: 13px; margin-top: 10px; min-height: 18px; }

/* Rol-sigbaarheid: html[data-rol] word gestel sodra /api/ek antwoord. */
html[data-rol="regsteller"] .nie-vir-regsteller { display: none !important; }
html:not([data-rol="admin"]) .net-admin { display: none !important; }

@media (max-width: 720px) {
  .ig-kop { padding: 8px 12px; gap: 8px; }
  /* S3 (2026-10-12): die kern se Instellings-knoppie bly REGS BO in die eerste ry, ook as die kop op die foon na
     drie rye toevou (dit het op die 3de ry beland, top 102 px). Die kop hou plek oop sodat niks daaronder inskuif nie. */
  .ig-kop:has(> .ak-knoppie) { padding-right: 60px; }
  .ig-kop > .ak-knoppie { position: absolute; top: 8px; right: 8px; margin: 0; }
  .ig-merk h1 { font-size: 16px; }
  .ig-nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .ig-nav a, .ig-nav span { min-height: 40px; }
  .ig-knop { min-height: 42px; }
  .ig-modaal { padding: 16px 14px; max-height: 92vh; }
  .ig-veld { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
