/* ==========================================================
   theme.css — shared design tokens & primitives for the
   EPC Connect mock (cover page, member app, admin portal).
   Brand colours taken from epcindia.org (navy + gold).
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+Tamil:wght@400;500;600;700&display=swap');

:root {
  --navy-900: #0F1430;
  --navy-800: #1C2241;
  --navy-700: #26305C;
  --blue-700: #003A96;
  --blue-600: #1450B4;
  --blue-50:  #E5F0FE;
  --gold-500: #EAC433;
  --gold-600: #C9A21A;
  --gold-50:  #FDF6DC;

  --ink-900: #1A1D29;
  --ink-700: #3B4054;
  --ink-500: #6B7085;
  --ink-300: #B5B9C8;
  --line:    #E4E6EE;
  --paper:   #F5F6FA;
  --white:   #FFFFFF;

  --ok:      #1F8A5B;
  --ok-50:   #E3F5EC;
  --warn:    #B7791F;
  --warn-50: #FDF1DC;
  --bad:     #C0362C;
  --bad-50:  #FBE6E4;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 20, 48, .06), 0 1px 3px rgba(15, 20, 48, .05);
  --shadow:    0 6px 20px rgba(15, 20, 48, .08);
  --shadow-lg: 0 24px 60px rgba(15, 20, 48, .22);

  --font-ui: 'Manrope', 'Noto Sans Tamil', system-ui, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-ui);
  color: var(--ink-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.45;
}
body.lang-ta { font-family: 'Noto Sans Tamil', 'Manrope', sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px;
  font-weight: 700; font-size: 14px; transition: transform .12s, background .15s, box-shadow .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--blue-700); color: var(--white); }
.btn-primary:hover { background: var(--blue-600); }
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: #F2D04E; }
.btn-ghost { background: var(--white); color: var(--ink-900); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink-300); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }

/* ---------- Pills / chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  white-space: nowrap;
}
.pill-ok   { background: var(--ok-50); color: var(--ok); }
.pill-warn { background: var(--warn-50); color: var(--warn); }
.pill-bad  { background: var(--bad-50); color: var(--bad); }
.pill-blue { background: var(--blue-50); color: var(--blue-700); }
.pill-gold { background: var(--gold-50); color: #8A6C00; }
.pill-grey { background: #EEF0F5; color: var(--ink-700); }
.pill-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--white);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--ink-700);
}
.chip.on { background: var(--navy-800); border-color: var(--navy-800); color: var(--white); }

/* ---------- Avatars ---------- */
.avatar {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 12px;
  font-weight: 800; font-size: 14px; color: var(--white);
}
.avatar.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; }
.avatar.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }

/* ---------- Form fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; color: var(--ink-500); }
.input {
  height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--white); outline: none; width: 100%;
}
.input:focus { border-color: var(--blue-700); box-shadow: 0 0 0 3px rgba(0, 58, 150, .12); }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }

/* ---------- Toggle ---------- */
.toggle { position: relative; width: 38px; height: 22px; border-radius: 999px;
  background: var(--ink-300); transition: background .15s; flex: none; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--white); transition: transform .15s; box-shadow: var(--shadow-sm); }
.toggle.on { background: var(--ok); }
.toggle.on::after { transform: translateX(16px); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--navy-900); color: var(--white); padding: 12px 18px; border-radius: 12px;
  font-weight: 600; font-size: 13px; box-shadow: var(--shadow-lg); opacity: 0;
  pointer-events: none; transition: opacity .2s, transform .2s; z-index: 999;
  display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg.i { color: var(--gold-500); }

/* ---------- Mock watermark ---------- */
.mock-tag {
  font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-500); border: 1px solid rgba(234, 196, 51, .45);
  padding: 3px 8px; border-radius: 6px;
}
