/* =====================================================================
   MAHSA RMC - Research Information Management System
   assets/app.css

   Palette is fixed by the MAHSA identity: navy and gold. Everything else
   is derived from those two so nothing reads as an unrelated accent.
   ===================================================================== */

:root{
  --navy:        #0D2550;
  --navy-900:    #071733;
  --navy-700:    #16376C;
  --navy-500:    #2C5697;
  --navy-100:    #E4EAF4;
  --navy-050:    #F2F5FA;

  --gold:        #C9A84C;
  --gold-600:    #A8873A;
  --gold-200:    #EFE2BC;
  --gold-050:    #FBF6E7;

  --ink:         #14181F;
  --ink-muted:   #5A6373;
  --ink-faint:   #8A93A3;
  --rule:        #DDE3ED;
  --paper:       #FFFFFF;
  --canvas:      #F6F8FC;

  /* Rating scale. Derived from the navy/gold axis, not a stoplight -
     MoHE ratings are a ladder, so the colour is a single hue ramp. */
  --r-none:      #B9C0CC;
  --r-verypoor:  #C97B4C;
  --r-poor:      #C99B4C;
  --r-satis:     #9AA84C;
  --r-good:      #4C8C6B;
  --r-verygood:  #2F7A8C;
  --r-excellent: #2C5697;

  --radius:      10px;
  --radius-sm:   6px;
  --shadow:      0 1px 2px rgba(13,37,80,.06), 0 8px 24px rgba(13,37,80,.06);
  --shadow-lg:   0 2px 4px rgba(13,37,80,.08), 0 18px 48px rgba(13,37,80,.12);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body:    "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

*,*::before,*::after{ box-sizing:border-box; }

html{ -webkit-text-size-adjust:100%; }

body{
  margin:0;
  font-family:var(--font-body);
  font-size:15px;
  line-height:1.55;
  color:var(--ink);
  background:var(--canvas);
  -webkit-font-smoothing:antialiased;
}

a{ color:var(--navy-500); }

/* ------------------------------------------------------------- shell */
.shell{ display:flex; min-height:100vh; }

.sidebar{
  width:248px; flex:0 0 248px;
  background:var(--navy);
  color:#fff;
  display:flex; flex-direction:column;
  position:sticky; top:0; height:100vh;
}

.brand{
  display:flex; align-items:center; gap:12px;
  padding:20px 18px;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.brand-mark{
  width:38px; height:38px; flex:0 0 38px;
  border-radius:50%;
  border:1.5px solid var(--gold);
  color:var(--gold);
  display:grid; place-items:center;
  font-family:var(--font-display);
  font-weight:700; font-size:19px;
}
.brand-name{ font-weight:650; letter-spacing:.01em; font-size:14.5px; }
.brand-sub{
  font-size:10px; letter-spacing:.13em; text-transform:uppercase;
  color:var(--gold); margin-top:1px;
}

.nav{ padding:16px 10px; flex:1; overflow-y:auto; }
.nav-label{
  font-size:10px; letter-spacing:.14em; text-transform:uppercase;
  color:rgba(255,255,255,.42); padding:0 10px; margin:14px 0 7px;
}
.nav a{
  display:flex; align-items:center; gap:11px;
  padding:9px 11px; margin-bottom:2px;
  border-radius:var(--radius-sm);
  color:rgba(255,255,255,.82);
  text-decoration:none; font-size:14px;
  border-left:2px solid transparent;
}
.nav a:hover{ background:rgba(255,255,255,.07); color:#fff; }
.nav a.active{
  background:rgba(201,168,76,.14);
  border-left-color:var(--gold);
  color:#fff; font-weight:550;
}
.nav svg{ width:17px; height:17px; opacity:.85; flex:0 0 17px; }

.nav-user{
  padding:13px 16px;
  border-top:1px solid rgba(255,255,255,.10);
  display:flex; align-items:center; gap:11px;
}
.avatar{
  width:32px; height:32px; flex:0 0 32px; border-radius:50%;
  background:var(--gold); color:var(--navy-900);
  display:grid; place-items:center;
  font-weight:700; font-size:12.5px;
}
.nav-user-name{ font-size:12.5px; font-weight:550; line-height:1.3; }
.nav-user-role{ font-size:10.5px; color:rgba(255,255,255,.55); }

.main{ flex:1; min-width:0; display:flex; flex-direction:column; }

.topbar{
  background:var(--paper);
  border-bottom:1px solid var(--rule);
  padding:0 28px; height:58px;
  display:flex; align-items:center; justify-content:space-between;
  position:sticky; top:0; z-index:20;
}
.topbar h1{
  font-family:var(--font-body);
  font-size:15px; font-weight:600; margin:0; letter-spacing:-.005em;
}
.topbar-meta{ display:flex; align-items:center; gap:16px; font-size:12.5px; color:var(--ink-muted); }

.content{ padding:26px 28px 56px; max-width:1320px; width:100%; }

/* ------------------------------------------------------------- type */
.eyebrow{
  font-family:var(--font-mono);
  font-size:10.5px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--gold-600); margin:0 0 6px;
}
.page-title{
  font-family:var(--font-display);
  font-size:27px; font-weight:600; letter-spacing:-.015em;
  margin:0 0 5px; color:var(--navy-900);
}
.page-sub{ color:var(--ink-muted); margin:0 0 22px; font-size:14px; max-width:70ch; }

.section-head{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:16px; margin:32px 0 13px;
}
.section-head h2{
  font-family:var(--font-display);
  font-size:17.5px; font-weight:600; margin:0; color:var(--navy-900);
  letter-spacing:-.01em;
}
.section-head p{ margin:3px 0 0; font-size:13px; color:var(--ink-muted); }

.code{
  font-family:var(--font-mono); font-size:11.5px;
  color:var(--navy-500); background:var(--navy-050);
  padding:1px 5px; border-radius:3px; white-space:nowrap;
}

/* ------------------------------------------------------------- cards */
.card{
  background:var(--paper); border:1px solid var(--rule);
  border-radius:var(--radius); box-shadow:var(--shadow);
}
.card-pad{ padding:20px 22px; }

/* --------------------------------------------------- scoreboard hero */
.scoreboard{
  background:linear-gradient(150deg, var(--navy-900) 0%, var(--navy) 58%, var(--navy-700) 100%);
  color:#fff; border-radius:var(--radius);
  padding:26px 28px 24px; box-shadow:var(--shadow-lg);
  position:relative; overflow:hidden;
}
.scoreboard::after{
  content:""; position:absolute; right:-70px; top:-70px;
  width:280px; height:280px; border-radius:50%;
  border:1px solid rgba(201,168,76,.16);
}
.scoreboard::before{
  content:""; position:absolute; right:10px; bottom:-120px;
  width:200px; height:200px; border-radius:50%;
  border:1px solid rgba(201,168,76,.10);
}
.sb-top{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:28px; flex-wrap:wrap; position:relative; z-index:1;
}
.sb-eyebrow{
  font-family:var(--font-mono); font-size:10.5px;
  letter-spacing:.15em; text-transform:uppercase; color:var(--gold);
  margin:0 0 8px;
}
.sb-score{
  font-family:var(--font-display);
  font-size:62px; line-height:.94; font-weight:600;
  letter-spacing:-.03em; margin:0;
  font-variant-numeric:tabular-nums;
}
.sb-score small{
  font-size:20px; font-weight:400; color:rgba(255,255,255,.5);
  letter-spacing:0; margin-left:4px;
}
.sb-rating{
  margin-top:9px; display:flex; align-items:center; gap:12px; flex-wrap:wrap;
}
.sb-chip{
  font-size:11px; letter-spacing:.09em; text-transform:uppercase;
  font-weight:650; padding:4px 11px; border-radius:99px;
  background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.2);
}
.stars{ display:flex; gap:3px; }
.stars svg{ width:17px; height:17px; }
.star-on{ fill:var(--gold); }
.star-off{ fill:rgba(255,255,255,.16); }

.sb-delta{ text-align:right; }
.sb-delta-val{
  font-family:var(--font-display); font-size:26px; font-weight:600;
  letter-spacing:-.02em; font-variant-numeric:tabular-nums;
}
.sb-delta-lbl{ font-size:11.5px; color:rgba(255,255,255,.6); margin-top:1px; }
.delta-down{ color:#F0A98A; }
.delta-up{ color:#8FD9B6; }
.delta-flat{ color:rgba(255,255,255,.7); }

/* ------------------------------------------- THE RIBBON (signature)
   Section widths are proportional to their MyRA benchmark allocation,
   so the bar itself shows that Section C is a third of the assessment
   and Section H is a sliver. Fill = marks achieved. */
.ribbon-wrap{ margin-top:22px; position:relative; z-index:1; }
.ribbon-cap{
  display:flex; justify-content:space-between; align-items:baseline;
  font-size:11px; color:rgba(255,255,255,.55); margin-bottom:7px;
  font-family:var(--font-mono); letter-spacing:.05em;
}
.ribbon{
  display:flex; gap:2px; height:54px;
  border-radius:5px; overflow:hidden;
  background:rgba(255,255,255,.05);
}
.rib{
  position:relative; min-width:0;
  background:rgba(255,255,255,.08);
  display:flex; align-items:flex-end;
  overflow:hidden;
}
.rib-fill{
  width:100%;
  background:linear-gradient(180deg, var(--gold) 0%, var(--gold-600) 100%);
  height:0;
  transition:height .9s cubic-bezier(.22,.68,.36,1);
}
.rib-tag{
  position:absolute; top:6px; left:0; right:0;
  text-align:center; font-family:var(--font-mono);
  font-size:11px; font-weight:600; color:#fff;
  text-shadow:0 1px 3px rgba(7,23,51,.7);
  pointer-events:none;
}
.rib-legend{
  display:flex; gap:2px; margin-top:7px;
  font-size:10.5px; color:rgba(255,255,255,.6);
}
.rib-legend span{ text-align:center; min-width:0; overflow:hidden; }

@media (prefers-reduced-motion: reduce){
  .rib-fill{ transition:none; }
}

/* --------------------------------------------------- section grid */
.grid{ display:grid; gap:13px; }
.grid-7{ grid-template-columns:repeat(auto-fit, minmax(178px, 1fr)); }
.grid-2{ grid-template-columns:repeat(auto-fit, minmax(340px, 1fr)); }

.sec-card{
  background:var(--paper); border:1px solid var(--rule);
  border-radius:var(--radius); padding:15px 16px 14px;
  border-top:3px solid var(--r-none);
  box-shadow:var(--shadow);
}
.sec-card-head{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  margin-bottom:9px;
}
.sec-letter{
  font-family:var(--font-mono); font-size:11px; font-weight:600;
  color:var(--ink-faint); letter-spacing:.1em;
}
.sec-name{
  font-size:12px; color:var(--ink-muted); line-height:1.35;
  min-height:2.7em; margin-bottom:9px;
}
.sec-marks{
  font-family:var(--font-display); font-size:27px; font-weight:600;
  letter-spacing:-.02em; color:var(--navy-900);
  font-variant-numeric:tabular-nums; line-height:1;
}
.sec-marks small{ font-size:13px; color:var(--ink-faint); font-weight:400; }
.sec-bar{
  height:5px; border-radius:99px; background:var(--navy-100);
  margin:10px 0 8px; overflow:hidden;
}
.sec-bar i{ display:block; height:100%; border-radius:99px; }
.sec-foot{ display:flex; align-items:center; justify-content:space-between; gap:8px; }

.chip{
  font-size:9.5px; letter-spacing:.08em; text-transform:uppercase;
  font-weight:700; padding:3px 8px; border-radius:99px;
  color:#fff; white-space:nowrap;
}
.delta{
  font-family:var(--font-mono); font-size:11.5px; font-weight:600;
  font-variant-numeric:tabular-nums;
}
.delta.up{ color:#2E7D52; }
.delta.down{ color:#B4552C; }
.delta.flat{ color:var(--ink-faint); }

/* ------------------------------------------------------------ table */
.tbl-wrap{ overflow-x:auto; border-radius:var(--radius); }
table.tbl{
  width:100%; border-collapse:collapse; background:var(--paper);
  font-size:13.5px;
}
table.tbl thead th{
  text-align:left; padding:10px 13px;
  font-size:10.5px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--ink-muted); font-weight:650;
  background:var(--navy-050); border-bottom:1px solid var(--rule);
  white-space:nowrap;
}
table.tbl tbody td{
  padding:11px 13px; border-bottom:1px solid var(--rule);
  vertical-align:middle;
}
table.tbl tbody tr:last-child td{ border-bottom:none; }
table.tbl tbody tr:hover{ background:var(--navy-050); }
.num{ text-align:right; font-variant-numeric:tabular-nums; font-family:var(--font-mono); font-size:12.5px; }
.crit-label{ max-width:44ch; line-height:1.35; }

.opp-bar{
  display:inline-block; vertical-align:middle;
  height:6px; border-radius:99px; background:var(--gold);
  min-width:2px;
}

/* ------------------------------------------------------------ notes */
.note{
  border:1px solid var(--gold-200); background:var(--gold-050);
  border-left:3px solid var(--gold);
  border-radius:var(--radius-sm);
  padding:14px 17px; margin-bottom:12px;
}
.note h4{
  margin:0 0 5px; font-size:13.5px; font-weight:650; color:var(--navy-900);
  display:flex; align-items:center; gap:8px;
}
.note p{ margin:0; font-size:13px; color:var(--ink-muted); line-height:1.5; }
.note p + p{ margin-top:7px; }
.note-tag{
  font-family:var(--font-mono); font-size:9.5px; letter-spacing:.1em;
  text-transform:uppercase; color:var(--gold-600);
  border:1px solid var(--gold-200); border-radius:99px; padding:2px 7px;
}

/* ------------------------------------------------------------ trend */
.trend svg{ display:block; width:100%; height:auto; }
.trend-dot{ fill:var(--paper); stroke:var(--navy); stroke-width:2.5; }
.trend-line{ fill:none; stroke:var(--navy); stroke-width:2.5; stroke-linejoin:round; }
.trend-area{ fill:url(#trendGrad); }
.trend-lbl{ font-family:var(--font-mono); font-size:10px; fill:var(--ink-faint); }
.trend-val{ font-family:var(--font-display); font-size:15px; font-weight:600; fill:var(--navy-900); }

/* ------------------------------------------------------------ login */
.login-page{
  min-height:100vh; display:grid; place-items:center;
  background:
    radial-gradient(1000px 520px at 12% -8%, rgba(44,86,151,.34), transparent 62%),
    radial-gradient(760px 440px at 96% 108%, rgba(201,168,76,.16), transparent 60%),
    var(--navy-900);
  padding:26px;
}
.login-card{
  width:100%; max-width:404px; background:var(--paper);
  border-radius:14px; box-shadow:0 24px 70px rgba(0,0,0,.36);
  overflow:hidden;
}
.login-strip{ height:4px; background:linear-gradient(90deg, var(--gold), var(--gold-600)); }
.login-body{ padding:32px 32px 28px; }
.login-crest{
  width:56px; height:56px; margin:0 auto 16px; border-radius:50%;
  border:2px solid var(--gold); color:var(--navy);
  display:grid; place-items:center;
  font-family:var(--font-display); font-weight:700; font-size:26px;
}
.login-title{
  font-family:var(--font-display); font-size:22px; font-weight:600;
  text-align:center; margin:0 0 4px; color:var(--navy-900); letter-spacing:-.015em;
}
.login-sub{
  text-align:center; font-size:12px; color:var(--ink-muted);
  margin:0 0 24px; letter-spacing:.04em;
}

.field{ margin-bottom:14px; }
.field label{
  display:block; font-size:11.5px; font-weight:600;
  letter-spacing:.05em; text-transform:uppercase;
  color:var(--ink-muted); margin-bottom:5px;
}
.field input{
  width:100%; padding:10px 12px; font-size:14.5px; font-family:inherit;
  border:1px solid var(--rule); border-radius:var(--radius-sm);
  background:var(--paper); color:var(--ink);
}
.field input:focus{
  outline:none; border-color:var(--navy-500);
  box-shadow:0 0 0 3px rgba(44,86,151,.15);
}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:11px 18px; font-size:14.5px; font-weight:600; font-family:inherit;
  border:none; border-radius:var(--radius-sm); cursor:pointer;
  background:var(--navy); color:#fff; text-decoration:none;
}
.btn:hover{ background:var(--navy-700); }
.btn-block{ width:100%; }
.btn-gold-edge{ border-bottom:3px solid var(--gold); }
.btn-ghost{
  background:transparent; color:var(--navy-500);
  border:1px solid var(--rule);
}
.btn-ghost:hover{ background:var(--navy-050); }
.btn-sm{ padding:6px 12px; font-size:12.5px; }

.alert{
  padding:10px 13px; border-radius:var(--radius-sm);
  font-size:13px; margin-bottom:15px;
}
.alert-error{ background:#FDECE6; color:#8A3413; border:1px solid #F2C7B6; }
.alert-ok{ background:#E7F4EC; color:#1F5C3B; border:1px solid #BEDDCB; }

.login-foot{
  background:var(--navy-050); border-top:1px solid var(--rule);
  padding:12px 32px; text-align:center;
  font-size:11px; color:var(--ink-faint); letter-spacing:.04em;
}

/* --------------------------------------------------------- utility */
.muted{ color:var(--ink-muted); }
.faint{ color:var(--ink-faint); }
.mono{ font-family:var(--font-mono); }
.right{ text-align:right; }
.nowrap{ white-space:nowrap; }
.mt0{ margin-top:0; } .mb0{ margin-bottom:0; }

select.yr{
  font-family:inherit; font-size:13px; padding:6px 10px;
  border:1px solid var(--rule); border-radius:var(--radius-sm);
  background:var(--paper); color:var(--ink);
}
select.yr:focus{ outline:none; border-color:var(--navy-500);
  box-shadow:0 0 0 3px rgba(44,86,151,.15); }

:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; }

/* --------------------------------------------------------- responsive */
@media (max-width: 900px){
  .shell{ flex-direction:column; }
  .sidebar{
    width:100%; flex:none; height:auto; position:static;
    flex-direction:row; align-items:center; overflow-x:auto;
  }
  .brand{ border-bottom:none; border-right:1px solid rgba(255,255,255,.1); }
  .nav{ display:flex; gap:4px; padding:8px; align-items:center; }
  .nav-label{ display:none; }
  .nav a{ white-space:nowrap; margin-bottom:0; border-left:none; border-bottom:2px solid transparent; }
  .nav a.active{ border-left:none; border-bottom-color:var(--gold); }
  .nav-user{ border-top:none; }
  .content{ padding:18px 16px 44px; }
  .topbar{ padding:0 16px; }
  .sb-score{ font-size:48px; }
  .ribbon{ height:44px; }
  .rib-legend{ font-size:9px; }
}

@media print{
  .sidebar, .topbar{ display:none !important; }
  body{ background:#fff; }
  .card, .sec-card{ box-shadow:none; }
  .scoreboard{ background:var(--navy) !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}

/* =====================================================================
   RMC WORKFLOW COMPONENTS
   Staff-facing screens. Plain, large targets, no dense data tables.
   ===================================================================== */

/* ------------------------------------------------- nav badge */
.navbadge{
  margin-left:auto; font-style:normal; font-size:9.5px; letter-spacing:.06em;
  background:var(--gold); color:var(--navy-900);
  padding:2px 7px; border-radius:99px; font-weight:700;
}

/* ------------------------------------------------- my stats strip */
.mystat{ display:flex; gap:11px; flex-wrap:wrap; margin-bottom:8px; }
.mystat-item{
  display:flex; align-items:baseline; gap:8px;
  background:var(--paper); border:1px solid var(--rule);
  border-left:3px solid var(--navy-500);
  border-radius:var(--radius-sm); padding:11px 15px;
  text-decoration:none; color:var(--ink); box-shadow:var(--shadow);
}
.mystat-item:hover{ border-color:var(--navy-500); }
.mystat-item strong{
  font-family:var(--font-display); font-size:21px; font-weight:600;
  color:var(--navy-900); font-variant-numeric:tabular-nums; line-height:1;
}
.mystat-item span{ font-size:12.5px; color:var(--ink-muted); }
.mystat-item.ok{ border-left-color:#2E7D52; }
.mystat-item.warn{ border-left-color:#B4552C; }

/* ------------------------------------------------- the chooser */
.chooser{ display:grid; gap:11px; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); }
.choice{
  display:flex; align-items:center; gap:14px;
  background:var(--paper); border:1px solid var(--rule);
  border-radius:var(--radius); padding:16px 18px;
  text-decoration:none; color:var(--ink); box-shadow:var(--shadow);
  transition:border-color .12s, transform .12s;
}
.choice:hover{ border-color:var(--navy-500); transform:translateY(-1px); }
.choice:hover .choice-go{ color:var(--gold-600); transform:translateX(2px); }
.choice-icon{
  width:42px; height:42px; flex:0 0 42px; border-radius:10px;
  background:var(--navy-050); color:var(--navy);
  display:grid; place-items:center;
}
.choice-icon svg{ width:21px; height:21px; }
.choice-body{ flex:1; min-width:0; }
.choice-body strong{
  display:block; font-size:15px; font-weight:600; color:var(--navy-900);
  margin-bottom:2px; letter-spacing:-.005em;
}
.choice-body span{ display:block; font-size:12.5px; color:var(--ink-muted); line-height:1.4; }
.choice-go{ color:var(--ink-faint); font-size:19px; transition:transform .12s, color .12s; }

@media (prefers-reduced-motion: reduce){
  .choice, .choice-go{ transition:none; }
  .choice:hover{ transform:none; }
}

/* ------------------------------------------------- forms */
.formcard{ max-width:760px; }
.fieldgrid{ display:grid; grid-template-columns:1fr 1fr; gap:0 16px; }
.fieldgrid .field{ grid-column:1 / -1; margin-bottom:15px; }
.fieldgrid .field-half{ grid-column:span 1; }
.fieldgrid .field-check{ margin-bottom:9px; }

.field label i{ color:#B4552C; font-style:normal; }
.field select, .field textarea{
  width:100%; padding:10px 12px; font-size:14.5px; font-family:inherit;
  border:1px solid var(--rule); border-radius:var(--radius-sm);
  background:var(--paper); color:var(--ink);
}
.field select:focus, .field textarea:focus{
  outline:none; border-color:var(--navy-500);
  box-shadow:0 0 0 3px rgba(44,86,151,.15);
}
.field textarea{ resize:vertical; min-height:72px; }
.field input:disabled, .field select:disabled, .field textarea:disabled{
  background:var(--navy-050); color:var(--ink-muted);
}

.checkline{
  display:flex; align-items:flex-start; gap:9px;
  text-transform:none; letter-spacing:0; font-size:14px; font-weight:400;
  color:var(--ink); cursor:pointer; margin-bottom:0;
}
.checkline input{ width:17px; height:17px; margin:1px 0 0; flex:0 0 17px; accent-color:var(--navy); }

.fhelp{ font-size:12.5px; color:var(--ink-muted); margin:5px 0 0; line-height:1.45; }
.fhelp i{ color:#B4552C; font-style:normal; }

.formactions{
  display:flex; gap:10px; flex-wrap:wrap;
  padding-top:16px; margin-top:6px; border-top:1px solid var(--rule);
}

/* ------------------------------------------------- filter bar */
.filterbar{
  display:flex; align-items:center; gap:5px; flex-wrap:wrap; margin-bottom:14px;
}
.filterbar a{
  font-size:13px; padding:6px 13px; border-radius:99px;
  color:var(--ink-muted); text-decoration:none; border:1px solid transparent;
}
.filterbar a:hover{ background:var(--navy-050); }
.filterbar a.on{
  background:var(--navy); color:#fff; font-weight:550; border-color:var(--navy);
}
.filterbar a.btn{ color:#fff; }
.filterbar a.btn-ghost{ color:var(--navy-500); }

/* ------------------------------------------------- review row */
.decide{ display:flex; gap:6px; align-items:center; margin:0; }
.decide input[type=text]{
  flex:1; min-width:0; padding:6px 9px; font-size:12.5px; font-family:inherit;
  border:1px solid var(--rule); border-radius:var(--radius-sm);
}
.decide input[type=text]:focus{
  outline:none; border-color:var(--navy-500); box-shadow:0 0 0 2px rgba(44,86,151,.14);
}

/* ------------------------------------------------- year bars */
.ybar{ display:flex; align-items:center; gap:10px; margin-bottom:7px; }
.ybar-yr{
  font-family:var(--font-mono); font-size:11.5px; color:var(--ink-faint);
  width:34px; flex:0 0 34px;
}
.ybar-track{ flex:1; height:8px; background:var(--navy-100); border-radius:99px; overflow:hidden; }
.ybar-track i{ display:block; height:100%; background:var(--navy-500); border-radius:99px; }
.ybar-n{
  font-family:var(--font-mono); font-size:12px; color:var(--ink);
  width:34px; flex:0 0 34px; text-align:right; font-variant-numeric:tabular-nums;
}

/* ------------------------------------------------- activity feed */
.feed{ padding:9px 0; border-bottom:1px solid var(--rule); }
.feed:last-child{ border-bottom:none; }
.feed-type{
  display:inline-block; font-family:var(--font-mono); font-size:9.5px;
  letter-spacing:.08em; text-transform:uppercase; color:var(--gold-600);
  margin-right:7px;
}
.feed-title{ font-size:13.5px; color:var(--ink); }
.feed-who{ display:block; font-size:11.5px; color:var(--ink-faint); margin-top:2px; }

@media (max-width:640px){
  .fieldgrid{ grid-template-columns:1fr; }
  .fieldgrid .field-half{ grid-column:1 / -1; }
  .decide{ flex-wrap:wrap; }
  .chooser{ grid-template-columns:1fr; }
}

/* =====================================================================
   PROFILES, USERS AND PERMISSIONS
   ===================================================================== */

.fsec{
  font-size:12px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--gold-600); font-weight:650;
  margin:22px 0 12px; padding-bottom:7px; border-bottom:1px solid var(--rule);
}
.fsec:first-of-type{ margin-top:0; }

.field input[type=file]{
  width:100%; padding:9px 11px; font-size:13.5px; font-family:inherit;
  border:1px dashed var(--rule); border-radius:var(--radius-sm);
  background:var(--navy-050); color:var(--ink-muted); cursor:pointer;
}
.field input[type=file]:focus{ outline:none; border-color:var(--navy-500); }

.haveit{
  display:flex; align-items:center; gap:11px; margin-bottom:8px;
  padding:9px 11px; background:#E7F4EC; border:1px solid #BEDDCB;
  border-radius:var(--radius-sm); font-size:12.5px; color:#1F5C3B;
}
.haveit img{
  width:44px; height:44px; border-radius:6px; object-fit:cover;
  border:1px solid #BEDDCB;
}
.haveit span{ color:#2E7D52; }
.haveit a{ color:#1F5C3B; font-weight:600; }

.avatar-img{ object-fit:cover; }

/* ------------------------------------------------- permission grid */
.permrow{
  display:grid; gap:9px; grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  margin-bottom:6px;
}
.permrow .checkline{
  background:var(--navy-050); border:1px solid var(--rule);
  border-radius:var(--radius-sm); padding:11px 13px; align-items:flex-start;
}
.permrow .checkline strong{ font-size:13.5px; font-weight:600; color:var(--navy-900); }
.permrow .checkline small{ font-size:11.5px; color:var(--ink-muted); line-height:1.35; }

/* inline permission toggles in the user table */
.perms{ display:flex; align-items:center; gap:9px; flex-wrap:wrap; margin:0; }
.perms label{
  display:flex; align-items:center; gap:4px; font-size:11.5px;
  color:var(--ink-muted); cursor:pointer; margin:0;
  text-transform:none; letter-spacing:0; font-weight:400;
}
.perms input{ width:15px; height:15px; margin:0; accent-color:var(--navy); }

/* ------------------------------------------------- add-user disclosure */
.adduser{ margin-bottom:8px; }
.adduser summary{
  display:inline-flex; align-items:center; gap:8px; cursor:pointer;
  padding:9px 16px; border-radius:var(--radius-sm);
  background:var(--navy); color:#fff; font-size:14px; font-weight:600;
  border-bottom:3px solid var(--gold); list-style:none;
}
.adduser summary::-webkit-details-marker{ display:none; }
.adduser summary::before{ content:"+"; font-size:16px; line-height:1; }
.adduser[open] summary::before{ content:"\2212"; }
.adduser summary:hover{ background:var(--navy-700); }

table.tbl .chip{ margin-top:4px; display:inline-block; }
