/* ===================================================================
   MCS Portal — "Modern Light & Vibrant" theme
   Indigo → Violet → Teal accents · futuristic glowing tabs ·
   glassy cards · photographic tinted banners · full-page layout
   =================================================================== */
:root {
  --indigo: #4f46e5;
  --violet: #7c3aed;
  --teal:   #06b6d4;
  --sky:    #0ea5e9;
  --grad:   linear-gradient(120deg, #4f46e5 0%, #7c3aed 45%, #06b6d4 100%);
  --grad-soft: linear-gradient(120deg, #6366f1 0%, #22d3ee 100%);
  --gold:   #d99a1c;               /* accent used by app inline styles */
  --gold-2: #f59e0b;
  --navy:   #0f172a;               /* legacy var kept for inline refs */
  --navy-2: #4f46e5;

  --bg:     #eef1f8;
  --bg-2:   #f7f9fd;
  --card:   #ffffff;
  --ink:    #0f172a;
  --muted:  #64748b;
  --line:   #e6e9f2;
  --green:  #059669;
  --red:    #e11d48;
  --amber:  #d97706;

  --radius: 16px;
  --radius-sm: 11px;
  --shadow:   0 10px 30px -12px rgba(30, 41, 99, .18);
  --shadow-lg:0 24px 60px -20px rgba(30, 41, 99, .30);
  --glow:     0 8px 24px -6px rgba(79, 70, 229, .45);

  /* photographic banner (tinted heavily so subject stays subordinate) */
  --hero-photo: url("https://images.unsplash.com/photo-1589829545856-d10d557cf95f?w=1600&q=70&auto=format&fit=crop");
  --band-photo: url("https://images.unsplash.com/photo-1521587760476-6c12a4b040da?w=1600&q=65&auto=format&fit=crop");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(99,102,241,.14), transparent 60%),
    radial-gradient(1000px 520px at 98% 0%, rgba(6,182,212,.14), transparent 55%),
    radial-gradient(circle at 1px 1px, rgba(79,70,229,.06) 1px, transparent 0) 0 0 / 26px 26px,
    var(--bg);
  min-height: 100vh;
}
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
::selection { background: rgba(79,70,229,.18); }

/* Scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--indigo), var(--teal)); border-radius: 20px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ============================ HEADER ============================ */
header.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 0 clamp(16px, 4vw, 40px); height: 70px;
  color: #fff;
  background:
    linear-gradient(115deg, rgba(20,16,60,.92), rgba(37,20,85,.86) 45%, rgba(6,110,140,.82)),
    var(--band-photo) center/cover no-repeat, #201455;
  box-shadow: 0 10px 30px -14px rgba(15,23,42,.55);
  backdrop-filter: saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand .mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #201455; font-weight: 800; display: grid; place-items: center; font-size: 15px;
  box-shadow: 0 6px 18px -4px rgba(245,158,11,.6), inset 0 0 0 1px rgba(255,255,255,.3);
  letter-spacing: .5px;
}
.logo-badge {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  background: #fff; object-fit: contain; padding: 4px;
  box-shadow: 0 6px 18px -6px rgba(24,18,66,.35), inset 0 0 0 1px rgba(0,0,0,.05);
}
.logo-badge.lg {
  width: 96px; height: 96px; border-radius: 22px; padding: 8px; margin: 0 auto 16px; display: block;
  box-shadow: 0 16px 34px -10px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.5);
}
.brand h1 { font-size: 16px; margin: 0; line-height: 1.15; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
.brand h1 small { display: block; font-weight: 400; opacity: .78; font-size: 11.5px; letter-spacing: .2px; }
.navspace { flex: 1; }
.userchip { display: flex; align-items: center; gap: 11px; font-size: 14px; white-space: nowrap; }
.userchip > span:nth-child(2) { opacity: .95; }
.userchip .role {
  background: rgba(255,255,255,.16); color: #fff; padding: 3px 11px; border-radius: 20px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  border: 1px solid rgba(255,255,255,.24);
}

/* ============================ LAYOUT ============================ */
.wrap { width: min(1440px, 94vw); margin: 26px auto 48px; padding: 0; }
.tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px;
  padding: 8px; border-radius: 20px;
  background: rgba(255,255,255,.7);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.tabs button {
  border: 1px solid transparent; background: transparent;
  padding: 9px 17px; border-radius: 14px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: #475569;
  position: relative; transition: all .18s ease; letter-spacing: .1px;
}
.tabs button:hover { color: var(--indigo); background: rgba(79,70,229,.08); transform: translateY(-1px); }
.tabs button.active {
  color: #fff; background: var(--grad);
  box-shadow: var(--glow); border-color: transparent;
}
.tabs button.active::after {
  content: ""; position: absolute; inset: 0; border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); pointer-events: none;
}

/* view fade-in */
#view { animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============================ CARDS ============================ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px; margin-bottom: 18px;
  position: relative; overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: var(--grad); opacity: .9;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: .2px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }

/* stat tiles used on overview render as small cards — give them punch */
.card .card { box-shadow: none; border-color: var(--line); background: linear-gradient(160deg, #fff, #f5f7fe); }
.card .card::before { opacity: .55; }

/* ============================ BADGES ============================ */
.badge { display: inline-block; padding: 3px 11px; border-radius: 20px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.badge.open, .badge.selected, .badge.done { background: #d1fae5; color: var(--green); }
.badge.closed, .badge.rejected { background: #ffe4e6; color: var(--red); }
.badge.pending, .badge.todo, .badge.shortlisted { background: #fef3c7; color: var(--amber); }
.badge.in_progress { background: #e0e7ff; color: var(--indigo); }
.badge.high { background:#ffe4e6;color:var(--red);} .badge.medium{background:#fef3c7;color:var(--amber);} .badge.low{background:#eef2f7;color:var(--muted);}

/* ======================= FORMS & BUTTONS ======================= */
label { display: block; font-size: 12.5px; font-weight: 600; margin: 12px 0 5px; color: #334155; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(79,70,229,.16);
}
textarea { min-height: 84px; resize: vertical; }

.btn {
  border: none; background: var(--grad); background-size: 140% 140%;
  color: #fff; padding: 10px 18px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 14px; font-weight: 600; letter-spacing: .2px;
  box-shadow: var(--glow); transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.btn:hover { transform: translateY(-1.5px); filter: brightness(1.05); box-shadow: 0 12px 28px -8px rgba(79,70,229,.55); }
.btn:active { transform: translateY(0); }
.btn.gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #3a2a05; box-shadow: 0 8px 22px -6px rgba(245,158,11,.5); }
.btn.ghost { background: #fff; color: var(--indigo); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--indigo); background: rgba(79,70,229,.06); filter: none; }
.btn.danger { background: linear-gradient(135deg, #fb7185, #e11d48); box-shadow: 0 8px 22px -6px rgba(225,29,72,.45); }
.btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; filter: none; }

/* ============================ TABLE ============================ */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(79,70,229,.045); }

/* ========================= AUTH SCREEN ========================= */
.authwrap { max-width: 460px; margin: min(9vh, 72px) auto; padding: 0 16px; }
.hero { text-align: center; margin-bottom: 24px; position: relative; padding: 34px 20px 30px; border-radius: 22px; overflow: hidden; color: #fff; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(120deg, rgba(24,18,66,.86), rgba(46,22,96,.78) 45%, rgba(6,120,150,.72)),
    var(--hero-photo) center/cover no-repeat, #201455;
}
.hero .mark {
  width: 64px; height: 64px; border-radius: 18px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #201455; font-weight: 800; display: grid; place-items: center; font-size: 24px;
  margin: 0 auto 14px; box-shadow: 0 12px 30px -8px rgba(245,158,11,.7), inset 0 0 0 1px rgba(255,255,255,.35);
}
.hero h2 { margin: 0 0 6px; font-size: 25px; letter-spacing: .2px; }
.hero .muted, .hero p { color: rgba(255,255,255,.86); }
.authwrap .card { box-shadow: var(--shadow-lg); }
.switchline { text-align: center; font-size: 14px; margin-top: 12px; color: var(--muted); }
.linkbtn { background: none; border: none; color: var(--indigo); cursor: pointer; font-weight: 700; font-size: 14px; padding: 0; }
.linkbtn:hover { text-decoration: underline; }

/* ============================ MODAL ============================ */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: grid; place-items: center; z-index: 60; padding: 16px; backdrop-filter: blur(4px); animation: fade .2s ease; }
.modal { background: #fff; border-radius: 18px; max-width: 560px; width: 100%; padding: 24px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.modal h3 { margin-top: 0; }
.form label { margin-top: 10px; }

/* ============================ TOAST ============================ */
#toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: linear-gradient(135deg, #1e293b, #0f172a); color: #fff; padding: 12px 20px;
  border-radius: 12px; font-size: 14px; font-weight: 500; z-index: 120;
  opacity: 0; transition: opacity .25s, transform .25s;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.08);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: linear-gradient(135deg, #fb7185, #e11d48); }

.empty { text-align: center; color: var(--muted); padding: 30px; font-size: 14px; }

/* ============================ MOBILE ============================ */
@media (max-width: 720px) {
  header.topbar { height: auto; padding: 12px clamp(14px, 4vw, 20px); flex-wrap: wrap; gap: 10px; }
  .brand h1 { font-size: 14px; white-space: normal; }
  .userchip { font-size: 13px; }
  .wrap { width: 94vw; margin-top: 18px; }
  .tabs { padding: 6px; gap: 6px; }
  .tabs button { padding: 8px 13px; font-size: 12.5px; }
  .card { padding: 16px; }
}

/* premium-auth-desktop — full-width, two-column auth on PC */
@media (min-width: 900px) {
  .authwrap { max-width: 1060px; display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 30px; align-items: stretch; margin: min(7vh, 60px) auto; }
  .authwrap .hero { margin-bottom: 0; text-align: left; display: flex; flex-direction: column; justify-content: center; padding: 52px 44px; }
  .authwrap .hero .logo-badge.lg { margin: 0 0 20px; }
  .authwrap .hero h2 { font-size: 32px; line-height: 1.15; }
  .authwrap .hero .muted, .authwrap .hero p { font-size: 15px; max-width: 34ch; }
  .authwrap .card { align-self: stretch; padding: 30px 34px; }
  .authwrap .card h3 { font-size: 20px; }
}

/* premium-auth-v2 — editorial premium styling for auth screens */
.authwrap .hero { border-radius: 24px; box-shadow: 0 34px 80px -34px rgba(20,16,60,.6); }
.authwrap .hero::before { background: radial-gradient(130% 120% at 18% -10%, rgba(251,191,36,.18), transparent 46%), linear-gradient(145deg, rgba(22,16,62,.92), rgba(48,22,100,.84) 48%, rgba(6,116,146,.80)), var(--hero-photo) center/cover no-repeat, #201455; }
.authwrap .hero .logo-badge.lg { box-shadow: 0 20px 44px -16px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.65); }
.authwrap .hero h2 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: clamp(30px, 4vw, 44px); line-height: 1.06; letter-spacing: .2px; margin: 6px 0 0; }
.authwrap .hero h2::after { content: ''; display: block; width: 56px; height: 3px; margin: 16px 0 14px; background: linear-gradient(90deg, #fbbf24, #f59e0b); border-radius: 3px; }
.authwrap .hero .muted, .authwrap .hero p { color: rgba(255,255,255,.88); font-size: 15px; letter-spacing: .2px; }
.authwrap .card { border-radius: 22px; border: 1px solid rgba(15,23,42,.06); box-shadow: 0 34px 80px -38px rgba(20,16,60,.55); }
.authwrap .card h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: 25px; letter-spacing: .2px; }
.authwrap label { text-transform: uppercase; font-size: 10.5px; letter-spacing: .08em; font-weight: 700; color: #64748b; }
.authwrap label span { text-transform: none; letter-spacing: normal; font-weight: 400; }
.authwrap input, .authwrap select, .authwrap textarea { border-radius: 12px; padding: 12px 14px; border-color: #e7eaf3; background: #fbfcfe; transition: border-color .15s, box-shadow .15s, background .15s; }
.authwrap input:focus, .authwrap select:focus, .authwrap textarea:focus { background: #fff; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.authwrap .btn { padding: 13px 18px; border-radius: 12px; letter-spacing: .4px; box-shadow: 0 14px 32px -12px rgba(79,70,229,.6); }
.authwrap .btn:hover { box-shadow: 0 18px 40px -12px rgba(79,70,229,.72); }
.authwrap .switchline { font-size: 14px; }

/* premium-v3 — hero watermark, trust points, consistent serif headings */
.authwrap .hero::after { content:''; position:absolute; z-index:-1; right:-46px; bottom:-46px; width:300px; height:300px; background:url('assets/mcs-logo.png') center/contain no-repeat; filter:brightness(0) invert(1); opacity:.07; pointer-events:none; }
.herofeatures { list-style:none; padding:0; margin:20px 0 0; display:none; }
.herofeatures li { position:relative; padding-left:26px; margin:10px 0; color:rgba(255,255,255,.92); font-size:14px; letter-spacing:.1px; }
.herofeatures li::before { content:'\2713'; position:absolute; left:0; top:-1px; color:#fbbf24; font-weight:700; font-size:15px; }
@media (min-width:900px){ .herofeatures{ display:block; } }
.brand h1 { font-family:'Playfair Display', Georgia, serif; font-weight:600; font-size:18px; letter-spacing:.2px; }
.brand h1 small { font-family:'Inter','Segoe UI',system-ui,sans-serif; font-weight:400; font-size:11.5px; letter-spacing:.2px; opacity:.82; }
#view > .row > h3 { font-family:'Playfair Display', Georgia, serif; font-weight:600; font-size:22px; letter-spacing:.2px; }
.modal h3 { font-family:'Playfair Display', Georgia, serif; font-weight:600; letter-spacing:.2px; }

/* premium-v4 — password toggle, aligned row, judge CTA */
.pwrow { align-items: flex-end; }
.pwwrap { position: relative; }
.pwwrap input { padding-right: 62px; }
.pweye { position:absolute; right:6px; top:50%; transform:translateY(-50%); border:none; background:transparent; color:var(--indigo); font-weight:700; font-size:11px; letter-spacing:.04em; cursor:pointer; padding:4px 7px; text-transform:uppercase; }
.pweye:hover { text-decoration:underline; }
.judgecta { margin-top:16px; display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:12px 16px; border-radius:12px; background:linear-gradient(120deg, rgba(251,191,36,.16), rgba(79,70,229,.10)); border:1px solid rgba(245,158,11,.40); box-shadow:0 6px 18px -10px rgba(245,158,11,.5); }
.judgecta span { font-size:14px; font-weight:600; color:var(--ink); }
.judgecta .linkbtn { font-size:15px; font-weight:800; color:var(--indigo); white-space:nowrap; }

/* premium-v5 — stack auth form field pairs on phones for clean alignment */
@media (max-width: 600px) {
  .authwrap .row > div { flex: 1 1 100% !important; }
  .authwrap .row { gap: 0; }
}

/* premium-v6 — ICFAI Law School logo co-branding */
.heroinit { margin-top: 18px; display:flex; align-items:center; }
.heroinit-logo { height:42px; background:#fff; border-radius:10px; padding:8px 13px; box-shadow:0 10px 24px -10px rgba(0,0,0,.55); }
.topbar-inst { height:34px; background:#fff; border-radius:9px; padding:5px 10px; margin-right:6px; box-shadow:0 4px 12px -6px rgba(0,0,0,.35); }
@media (max-width:720px){ .topbar-inst{ display:none; } .authwrap .heroinit{ justify-content:center; } }
