/* ═══════════════════════════════════════════════════════════════════════
   IRG-GDP — Design System (v14.0-arch-1.2)
   Spec: Landing_page_specs_-_I-GDP.docx
   IPR Owner: Rohit Tidke | Exclusively assigned to: Intech Research Group
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* Page palette — strict from spec */
  --navy:           #000052;   /* page background — rich navy blue */
  --navy-deep:      #00003A;   /* deeper inset */
  --navy-card:      #0A0A4F;   /* card surface */
  --navy-elevated:  #15155F;   /* hover / active surface */

  /* Gold variants */
  --gold:           #E4B44A;   /* primary gold for titles, accents */
  --gold-bright:    #F2C95E;   /* hover / focus */
  --gold-deep:      #C8960A;   /* button base */
  --gold-soft:      rgba(228, 180, 74, 0.20);  /* subtle highlight */
  --gold-line:      rgba(228, 180, 74, 0.35);  /* divider */

  /* Whites & alphas */
  --white:          #FFFDF5;   /* warm off-white body text */
  --white-soft:     rgba(255, 253, 245, 0.85);
  --white-muted:    rgba(255, 253, 245, 0.55);
  --white-faint:    rgba(255, 253, 245, 0.30);

  /* Status accents */
  --ok:             #3CC882;
  --warn:           #FFB41E;
  --err:            #FF7A7A;

  /* Typography — single font family per spec */
  --font:           -apple-system, BlinkMacSystemFont, "Segoe UI",
                    "Roboto", "Helvetica Neue", Arial, sans-serif;
  --font-mono:      ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Spacing (8px grid) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px;
  --s-4: 16px; --s-5: 24px; --s-6: 32px;
  --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* Radii */
  --r-sm: 4px; --r-md: 8px; --r-lg: 12px;

  /* Shadow */
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.35),
                 0 0 0 1px rgba(228, 180, 74, 0.10);
  --shadow-modal: 0 12px 48px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--gold); text-decoration: none; transition: color .15s; }
a:hover { color: var(--gold-bright); }


/* ─── App shell — used on every authenticated screen ──────────────── */

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top bar: logo + wordmark left, user info right */
.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3) var(--s-5);
  background: var(--navy-deep);
  border-bottom: 1px solid var(--gold-line);
  position: sticky; top: 0; z-index: 50;
}

.brand { display: flex; align-items: center; gap: var(--s-3); }
.brand-logo {
  /* Logo is a legal image — never recolored, bordered, or filtered */
  width: 36px; height: 36px;
  object-fit: contain;
  display: block;
}
.brand-name {
  font-family: var(--font);
  font-weight: 800;
  font-size: 22px;
  color: var(--gold);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.top-right { display: flex; align-items: center; gap: var(--s-5); }
.top-right .nav-link {
  color: var(--white-soft);
  font-size: 14px;
  font-weight: 500;
  padding: var(--s-1) 0;
  border-bottom: 2px solid transparent;
}
.top-right .nav-link:hover { color: var(--gold); }
.top-right .nav-link.active {
  color: var(--gold); border-bottom-color: var(--gold);
}

.user-meta {
  text-align: right;
  font-size: 12px;
  color: var(--white-muted);
  padding-left: var(--s-4);
  border-left: 1px solid var(--gold-line);
}
.user-meta strong { color: var(--gold); display: block; font-size: 14px; font-weight: 600; }

/* Menu line (just below the logo line on inner screens) */
.menu-bar {
  background: var(--navy-card);
  border-bottom: 1px solid var(--gold-line);
  padding: var(--s-2) var(--s-5);
  display: flex; gap: var(--s-5); flex-wrap: wrap;
  font-size: 13px;
}
.menu-bar a { color: var(--white-soft); font-weight: 500; }
.menu-bar a:hover { color: var(--gold); }
.menu-bar a.active { color: var(--gold); }
.menu-bar .sep { color: var(--gold-line); user-select: none; }


/* ─── Main content area ────────────────────────────────────────────── */

.main {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--s-5) var(--s-5);
}

.page-title {
  color: var(--gold); font-size: 28px; font-weight: 700;
  margin-bottom: var(--s-1);
}
.page-subtitle {
  color: var(--white-muted); font-size: 14px;
  margin-bottom: var(--s-5);
}


/* ─── Cards / panels ───────────────────────────────────────────────── */

.card {
  background: var(--navy-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-md);
  padding: var(--s-5);
  margin-bottom: var(--s-5);
  box-shadow: var(--shadow-card);
}
.card-title {
  color: var(--gold);
  font-size: 17px;
  font-weight: 600;
  padding-bottom: var(--s-3);
  margin-bottom: var(--s-4);
  border-bottom: 1px solid var(--gold-line);
}


/* ─── Forms ────────────────────────────────────────────────────────── */

.form-group { margin-bottom: var(--s-4); }
.form-label {
  display: block;
  font-size: 12.5px;
  color: var(--white-muted);
  margin-bottom: var(--s-1);
  font-weight: 500;
}
.form-control {
  width: 100%;
  padding: 10px 12px;
  background: var(--navy-elevated);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-sm);
  color: var(--white);
  font-family: var(--font);
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.form-help {
  display: block;
  font-size: 11.5px;
  color: var(--white-muted);
  margin-top: var(--s-1);
}
.form-error {
  display: block;
  font-size: 12px;
  color: var(--err);
  margin-top: var(--s-1);
}


/* ─── Buttons ──────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold-deep); color: var(--navy-deep);
  border-color: var(--gold-deep);
}
.btn-primary:hover { background: var(--gold); border-color: var(--gold); }
.btn-primary:active { transform: translateY(1px); }

.btn-secondary {
  background: transparent; color: var(--white);
  border-color: var(--gold-line);
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

.btn-ghost {
  background: transparent; color: var(--gold);
  border-color: transparent; padding: 6px 10px;
}
.btn-ghost:hover { background: var(--gold-soft); }

.btn-block { display: block; width: 100%; }


/* ─── Tables ───────────────────────────────────────────────────────── */

.table-wrap {
  background: var(--navy-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-md);
  overflow-x: auto;
}
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--gold);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--gold-line);
  background: var(--navy-deep);
}
.tbl td {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--gold-line);
  color: var(--white-soft);
}
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--navy-elevated); }
.tbl .num {
  font-family: var(--font-mono);
  text-align: right;
  font-variant-numeric: tabular-nums;
}


/* ─── Pills / status ───────────────────────────────────────────────── */

.pill {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 999px;
  border: 1px solid;
}
.pill-ok      { color: var(--ok);   border-color: var(--ok);   background: rgba(60,200,130,0.10); }
.pill-warn    { color: var(--warn); border-color: var(--warn); background: rgba(255,180,30,0.10); }
.pill-err     { color: var(--err);  border-color: var(--err);  background: rgba(255,122,122,0.10); }
.pill-info    { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }
.pill-neutral { color: var(--white-muted); border-color: var(--white-faint); background: transparent; }


/* ─── Footer (IPR + Disclaimer) ────────────────────────────────────── */

.legal-footer {
  margin-top: auto;
  background: var(--navy-deep);
  border-top: 1px solid var(--gold-line);
  padding: var(--s-5) var(--s-5) var(--s-3);
  font-size: 12px;
  color: var(--white-muted);
}
.legal-footer .ipr {
  color: var(--gold);
  font-style: italic;
  margin-bottom: var(--s-2);
  font-size: 12.5px;
  line-height: 1.5;
}
.legal-footer .disclaimer {
  color: var(--white-muted);
  font-size: 11.5px;
  line-height: 1.55;
  margin-bottom: var(--s-3);
}
.legal-footer .disclaimer strong { color: var(--white-soft); }
.legal-footer .copyright {
  text-align: center;
  font-size: 11px;
  color: var(--white-faint);
  padding-top: var(--s-2);
  border-top: 1px solid rgba(228, 180, 74, 0.15);
}


/* ─── Ask Claude widget (floating bottom-right, every screen) ─────── */

.ask-fab {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 90;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--gold-deep);
  color: var(--navy-deep);
  border: none;
  cursor: pointer;
  font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4),
              0 0 0 4px rgba(228,180,74,0.20);
  transition: transform .15s, background .15s;
}
.ask-fab:hover { background: var(--gold); transform: scale(1.05); }
.ask-fab .ask-label {
  position: absolute; right: 64px; top: 50%; transform: translateY(-50%);
  background: var(--navy-elevated);
  color: var(--gold);
  padding: 6px 12px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--gold-line);
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.ask-fab:hover .ask-label { opacity: 1; }

.ask-panel {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 100;
  width: 380px; max-width: calc(100vw - 32px);
  height: 540px; max-height: calc(100vh - 48px);
  background: var(--navy-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-modal);
  display: none;
  flex-direction: column;
}
.ask-panel.open { display: flex; }
.ask-panel-header {
  padding: var(--s-3) var(--s-4);
  background: var(--navy-deep);
  border-bottom: 1px solid var(--gold-line);
  border-radius: var(--r-md) var(--r-md) 0 0;
  display: flex; align-items: center; justify-content: space-between;
}
.ask-panel-header h3 { color: var(--gold); font-size: 14px; font-weight: 600; }
.ask-panel-header .close-btn {
  background: none; border: none; color: var(--white-muted);
  font-size: 20px; cursor: pointer; line-height: 1;
}
.ask-panel-header .close-btn:hover { color: var(--gold); }
.ask-messages {
  flex: 1; overflow-y: auto;
  padding: var(--s-4);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.ask-msg {
  padding: var(--s-3); border-radius: var(--r-sm);
  font-size: 13.5px; line-height: 1.5;
  max-width: 85%;
}
.ask-msg.user {
  align-self: flex-end;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--gold-line);
}
.ask-msg.bot {
  align-self: flex-start;
  background: var(--navy-elevated);
  color: var(--white-soft);
  border: 1px solid var(--gold-line);
}
.ask-msg.bot.note {
  border-style: dashed;
  color: var(--white-muted);
  font-style: italic;
}
.ask-input-row {
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--gold-line);
  display: flex; gap: var(--s-2);
}
.ask-input-row input {
  flex: 1;
  background: var(--navy-elevated);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-sm);
  color: var(--white);
  padding: 8px 12px;
  font-family: var(--font);
  font-size: 14px;
}
.ask-input-row input:focus { outline: none; border-color: var(--gold); }
.ask-input-row button {
  background: var(--gold-deep); color: var(--navy-deep);
  border: none; border-radius: var(--r-sm);
  padding: 0 16px; font-weight: 600; cursor: pointer;
}
.ask-input-row button:hover { background: var(--gold); }


/* ─── Responsive ───────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .top-bar { padding: var(--s-2) var(--s-3); flex-wrap: wrap; gap: var(--s-2); }
  .top-right { gap: var(--s-3); }
  .top-right .nav-link { font-size: 13px; }
  .user-meta { font-size: 11px; padding-left: var(--s-2); }
  .main { padding: var(--s-4) var(--s-3); }
  .page-title { font-size: 22px; }
  .ask-panel { width: calc(100vw - 32px); }
}
