/* IGDI Portal — self-contained styles (does not depend on styles.css) */
:root {
  --ink: #0d1330;
  --ink-2: #161f4a;
  --ink-3: #232c63;
  --ink-soft: #2e3a72;
  --gold: #c8a45c;
  --gold-dark: #a8873f;
  --gold-soft: #f0e4c8;
  --peri: #6b8afd;
  --peri-soft: #dfe6ff;
  --paper: #ffffff;
  --mist: #f4f6fb;
  --mist-2: #eaeefa;
  --line: #e0e5f1;
  --text: #1b2140;
  --muted: #5b6484;
  --on-ink: #eef1fb;
  --on-ink-mut: #a8b0cc;
  --ok: #1f9d6b;
  --warn: #c8862a;
  --err: #d04a4a;
  --sans: "Outfit", "Segoe UI", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(13, 19, 48, .06), 0 10px 30px -12px rgba(13, 19, 48, .18);
  --side-w: 264px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.p-body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--mist);
  font-size: 15.5px;
  line-height: 1.55;
}
a { color: var(--ink-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--ink); margin: 0 0 .4em; line-height: 1.2; }
p { margin: 0 0 1em; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.p-icon { width: 20px; height: 20px; flex: none; }

/* ---- Auth (centered) ---------------------------------------------------- */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 32px 20px;
  background:
    radial-gradient(1200px 600px at 15% -10%, #1b2559 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 0%, #2a1f4d 0%, transparent 55%),
    var(--ink);
}
.auth-card {
  width: min(460px, 100%); background: var(--paper); border-radius: var(--radius);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.55); padding: 34px 34px 28px;
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; color: var(--ink); }
.auth-brand b { font-family: var(--serif); font-size: 22px; letter-spacing: .04em; }
.auth-brand .dot { width: 12px; height: 12px; border-radius: 3px; background: var(--gold); transform: rotate(45deg); }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); margin-bottom: 24px; font-size: 14.5px; }
.auth-foot { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); text-align: center; }
.auth-aside { color: var(--on-ink-mut); text-align: center; margin-top: 22px; font-size: 13.5px; }
.auth-aside a { color: var(--gold-soft); }

/* ---- App shell ---------------------------------------------------------- */
.p-shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.p-side {
  background: var(--ink); color: var(--on-ink); padding: 22px 16px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.p-brand { display: flex; align-items: center; gap: 11px; padding: 6px 10px 20px; color: #fff; }
.p-brand .dot { width: 12px; height: 12px; border-radius: 3px; background: var(--gold); transform: rotate(45deg); flex: none; }
.p-brand b { font-family: var(--serif); font-size: 18px; letter-spacing: .05em; }
.p-brand small { display: block; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--on-ink-mut); font-family: var(--sans); }
.p-navgroup { margin-top: 14px; }
.p-navgroup__label { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--on-ink-mut); padding: 0 12px 8px; }
.p-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.p-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--on-ink-mut); font-size: 14.5px; font-weight: 400;
}
.p-nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.p-nav a[aria-current="page"] { background: var(--ink-3); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.p-nav a .p-icon { width: 18px; height: 18px; }
.p-side__foot { margin-top: auto; padding-top: 16px; }
.p-side__user { display: flex; gap: 11px; align-items: center; padding: 12px; border-radius: var(--radius-sm); background: rgba(255,255,255,.05); }
.p-side__user .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none; }
.p-side__user b { display: block; font-size: 13.5px; color: #fff; font-weight: 500; }
.p-side__user span { font-size: 12px; color: var(--on-ink-mut); }

.p-main { display: flex; flex-direction: column; min-width: 0; }
.p-top {
  background: var(--paper); border-bottom: 1px solid var(--line); padding: 0 28px;
  height: 66px; display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 20;
}
.p-top h1 { font-size: 20px; margin: 0; font-family: var(--sans); font-weight: 600; }
.p-top .crumb { color: var(--muted); font-size: 13px; }
.p-top .spacer { flex: 1; }
.p-content { padding: 28px; max-width: 1120px; width: 100%; }

/* ---- Cards / grid ------------------------------------------------------- */
.p-grid { display: grid; gap: 20px; }
.p-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.p-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.p-card__title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.p-card__title h2 { font-size: 18px; margin: 0; }
.p-card--flush { padding: 0; overflow: hidden; }
.p-muted { color: var(--muted); }
.p-small { font-size: 13px; }

.p-stat { display: flex; flex-direction: column; gap: 6px; }
.p-stat__label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.p-stat__value { font-family: var(--serif); font-size: 32px; color: var(--ink); line-height: 1; }
.p-stat__icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--mist-2); color: var(--ink-2); }
.p-stat__icon--gold { background: var(--gold-soft); color: var(--gold-dark); }

/* ---- Buttons ------------------------------------------------------------ */
.p-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer; background: var(--ink-2);
  color: #fff; text-decoration: none; line-height: 1.2; transition: filter .15s, background .15s;
}
.p-btn:hover { filter: brightness(1.08); text-decoration: none; }
.p-btn:disabled { opacity: .55; cursor: not-allowed; }
.p-btn--gold { background: var(--gold); color: var(--ink); }
.p-btn--ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.p-btn--ghost:hover { background: var(--mist); }
.p-btn--danger { background: var(--err); }
.p-btn--ok { background: var(--ok); }
.p-btn--sm { padding: 7px 12px; font-size: 13px; }
.p-btn--block { width: 100%; }
.p-btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---- Forms -------------------------------------------------------------- */
.p-form { display: grid; gap: 18px; }
.p-form__row { display: grid; gap: 18px; }
.p-form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p-form__row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p-field { display: grid; gap: 6px; }
.p-field > label { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.p-field .req { color: var(--err); }
.p-field .hint { font-size: 12.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: 14.5px; color: var(--text); background: var(--paper);
}
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--peri); outline-offset: 1px; border-color: var(--peri); }
.textarea { min-height: 110px; resize: vertical; }
.p-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.p-check input { margin-top: 3px; }
.p-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding-top: 4px; }

/* ---- Tables ------------------------------------------------------------- */
.p-tablewrap { overflow-x: auto; }
.p-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.p-table th, .p-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.p-table th { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--mist); position: sticky; top: 0; }
.p-table tbody tr:hover { background: var(--mist); }
.p-table td.wrap { white-space: normal; }
.p-ref { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px; }

/* ---- Badges ------------------------------------------------------------- */
.p-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; background: var(--mist-2); color: var(--ink-2); white-space: nowrap;
}
.p-badge--ok { background: #e3f5ec; color: #14724c; }
.p-badge--warn { background: #fbeedb; color: #96631c; }
.p-badge--err { background: #fbe3e3; color: #a52f2f; }
.p-badge--info { background: var(--peri-soft); color: #33509e; }
.p-badge--muted { background: #eceef5; color: var(--muted); }

/* ---- Alerts ------------------------------------------------------------- */
.p-alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px; border: 1px solid transparent; }
.p-alert--success { background: #e3f5ec; color: #14724c; border-color: #bfe6d3; }
.p-alert--error { background: #fbe3e3; color: #a52f2f; border-color: #f2c4c4; }
.p-alert--info { background: var(--peri-soft); color: #33509e; border-color: #c3cfff; }
.p-alert--warn { background: #fbeedb; color: #96631c; border-color: #f0d8af; }

/* ---- Misc --------------------------------------------------------------- */
.p-empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.p-empty .p-icon { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--line); }
.p-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.p-section-head h2 { margin: 0; font-size: 22px; }
.p-section-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.p-meta { display: grid; grid-template-columns: 180px 1fr; gap: 8px 18px; font-size: 14px; }
.p-meta dt { color: var(--muted); }
.p-meta dd { margin: 0; }
.p-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.p-tabs a { padding: 9px 14px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; }
.p-tabs a[aria-current="page"] { color: var(--ink); border-color: var(--gold); font-weight: 500; }
.p-timeline { list-style: none; margin: 0; padding: 0; }
.p-timeline li { position: relative; padding: 0 0 18px 26px; border-left: 1px solid var(--line); margin-left: 6px; }
.p-timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.p-timeline li::before { content: ""; position: absolute; left: -6px; top: 3px; width: 11px; height: 11px; border-radius: 50%; background: var(--gold); border: 2px solid var(--paper); }
.p-timeline time { display: block; font-size: 12.5px; color: var(--muted); }
.p-divider { height: 1px; background: var(--line); margin: 20px 0; border: 0; }

.p-top__burger { display: none; }

@media (max-width: 980px) {
  .p-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .p-shell { grid-template-columns: 1fr; }
  .p-side {
    position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 60;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .p-side.is-open { transform: none; }
  .p-side-backdrop { position: fixed; inset: 0; background: rgba(9,12,30,.5); z-index: 50; display: none; }
  .p-side-backdrop.is-open { display: block; }
  .p-top__burger { display: inline-flex; }
  .p-grid--2, .p-grid--3, .p-grid--4 { grid-template-columns: 1fr; }
  .p-form__row--2, .p-form__row--3 { grid-template-columns: 1fr; }
  .p-content { padding: 20px 16px; }
  .p-top { padding: 0 16px; }
  .p-meta { grid-template-columns: 1fr; gap: 2px; }
  .p-meta dt { margin-top: 8px; }
}
