/* LPS Desk – V3 Fresh style */
:root {
  --bg: #FBF8F3;
  --card: #FFFFFF;
  --ink: #1F2937;
  --muted: #6B7280;
  --line: #E5E7EB;
  --blue: #1D4ED8;
  --blue-dark: #1E3A8A;
  --blue-soft: #DBEAFE;
  --mint: #D1FAE5;   --mint-ink: #064E3B;
  --peach: #FFE4D6;  --peach-ink: #7C2D12;
  --lav: #EDE9FE;    --lav-ink: #4C1D95;
  --sun: #FEF3C7;    --sun-ink: #78350F;
  --sky: #DBEAFE;    --sky-ink: #1E3A8A;
  --pink: #FCE7F3;   --pink-ink: #831843;
  --danger: #B91C1C;
  --radius: 24px;
  --shadow: 0 1px 3px rgba(31, 41, 55, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, 'Noto Sans Devanagari', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand { font-family: 'Plus Jakarta Sans', 'Noto Sans Devanagari', Inter, sans-serif; }

/* ---------- Language toggle (EN | हिं) ---------- */
.lang { display: inline-flex; background: #fff; border-radius: 99px; padding: 4px; box-shadow: var(--shadow); flex: none; }
.lang button {
  border: 0; background: transparent; color: #374151; border-radius: 99px;
  min-height: 40px; min-width: 44px; padding: 0 12px; font-size: 13px; font-weight: 600;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }
a { color: var(--blue); }
button { font: inherit; cursor: pointer; }
.hidden { display: none !important; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
.rise { animation: rise .55s cubic-bezier(.2,.8,.2,1) both; }
.shake { animation: shake .45s ease; }
@media (prefers-reduced-motion: reduce) { .rise, .shake { animation: none; } }

/* ---------- Logo ---------- */
.logo {
  width: 42px; height: 42px; border-radius: 14px; flex: none;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800;
}
.logo img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; background: #fff; }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth-art {
  flex: 1 1 420px; position: relative; overflow: hidden;
  padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
}
.auth-art .tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 460px; }
.tile {
  border-radius: var(--radius); padding: 20px; min-height: 120px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
}
.tile b { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; }
.tile span { font-size: 13px; }
.t-mint { background: var(--mint); color: var(--mint-ink); }
.t-peach { background: var(--peach); color: var(--peach-ink); }
.t-lav { background: var(--lav); color: var(--lav-ink); }
.t-sky { background: var(--sky); color: var(--sky-ink); }
.t-sun { background: var(--sun); color: var(--sun-ink); }
.t-pink { background: var(--pink); color: var(--pink-ink); }
.auth-art h1 { font-size: 44px; line-height: 1.05; letter-spacing: -1px; margin: 0; }
.auth-art p { color: var(--muted); margin: 10px 0 0; max-width: 420px; }

.auth-panel { flex: 1 1 380px; display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.card {
  background: var(--card); border-radius: 28px; box-shadow: 0 10px 40px rgba(31,41,55,.08);
  padding: 32px; width: 100%; max-width: 420px;
}
.card h2 { margin: 0 0 6px; font-size: 26px; }
.card .sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; }
.field input {
  font: inherit; font-size: 15px; min-height: 48px; padding: 0 14px;
  border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); outline: none;
  transition: border-color .15s;
}
.field input:focus { border-color: var(--blue); }
.pw { position: relative; }
.pw input { width: 100%; padding-right: 64px; }
.pw button {
  position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 10px;
  border: 0; border-radius: 10px; background: var(--bg); color: var(--ink); font-size: 12px; font-weight: 600;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 18px; border-radius: 14px; border: 0;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 15px; width: 100%;
  transition: transform .1s, background .15s;
}
.btn:hover { background: #1E40AF; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .7; cursor: wait; }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { background: var(--bg); }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }

.link-btn { background: none; border: 0; color: var(--blue); font-weight: 600; font-size: 14px; padding: 8px 0; }
.msg { font-size: 14px; font-weight: 600; border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.msg.err { background: #FEE2E2; color: var(--danger); }
.msg.ok { background: var(--mint); color: var(--mint-ink); }

/* ---------- App shell ---------- */
.app { display: flex; flex-wrap: wrap; gap: 24px; padding: 24px; min-height: 100vh; }
.side {
  flex: 1 1 230px; max-width: 100%; background: var(--card); border-radius: 28px; box-shadow: var(--shadow);
  padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; align-self: flex-start;
}
.side .head { display: flex; align-items: center; gap: 12px; padding: 4px 10px 20px; }
.side .head small { display: block; color: var(--muted); font-size: 12px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 0 14px; min-height: 46px; border-radius: 14px;
  color: #374151; text-decoration: none; font-size: 14px;
}
.nav a:hover { background: var(--bg); }
.nav a.active { background: #EFF6FF; color: var(--blue); font-weight: 700; }
.nav svg { width: 18px; height: 18px; flex: none; }
.side .foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.search {
  flex: 1 1 280px; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 99px;
  padding: 0 20px; min-height: 52px; box-shadow: var(--shadow);
}
.search input { flex: 1; border: 0; outline: none; font: inherit; font-size: 14px; background: transparent; min-width: 0; color: var(--ink); }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; background: var(--peach); color: var(--peach-ink);
  display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none;
}
.who { display: flex; align-items: center; gap: 10px; }
.who small { display: block; color: var(--muted); font-size: 12px; text-transform: capitalize; }
.who b { font-size: 14px; }

.hello { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.hello h1 { margin: 0; font-size: 38px; letter-spacing: -1px; }
.hello .date { color: var(--muted); font-size: 14px; }
.pill { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 99px; background: var(--blue-soft); color: var(--blue-dark); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.mod {
  border-radius: 28px; padding: 22px; min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  text-decoration: none; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
}
.mod:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(31,41,55,.10); }
.mod h3 { margin: 0; font-size: 18px; }
.mod p { margin: 0; font-size: 13px; opacity: .9; }
.mod .soon { align-self: flex-start; font-size: 11px; font-weight: 700; background: rgba(255,255,255,.7); padding: 4px 10px; border-radius: 99px; }

.notice { background: #fff; border-radius: 24px; padding: 28px; box-shadow: var(--shadow); max-width: 560px; }
.notice h2 { margin: 0 0 8px; }
.notice p { margin: 0; color: var(--muted); }

.loading { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.loading .spinner { width: 36px; height: 36px; border-color: var(--blue-soft); border-top-color: var(--blue); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; align-items: center; gap: 10px;
  background: #1F2937; color: #fff; border-radius: 16px; padding: 14px 18px; font-size: 14px; font-weight: 600;
  box-shadow: 0 14px 34px rgba(31,41,55,.25); animation: toastIn .3s cubic-bezier(.2,.9,.3,1.2) both; max-width: calc(100vw - 40px);
}

.top-logout { width: auto !important; min-height: 48px !important; }

/* ---------- Mobile ---------- */
@media (min-width: 761px) {
  .top-logout { display: none !important; }
}
@media (max-width: 760px) {
  .auth-art { padding: 28px 20px 0; }
  .auth-art h1 { font-size: 32px; }
  .auth-art .tiles { display: none; }
  .app { padding: 14px 14px 96px; gap: 14px; }
  .side { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; flex-direction: row; padding: 6px; border-radius: 99px; box-shadow: 0 6px 20px rgba(31,41,55,.12); }
  .side .head, .side .foot { display: none; }
  .nav { display: flex; width: 100%; justify-content: space-around; overflow-x: auto; }
  .nav a { flex-direction: column; gap: 2px; min-height: 52px; padding: 4px 10px; font-size: 10px; border-radius: 99px; }
  .nav a span.lbl { white-space: nowrap; }
  .hello h1 { font-size: 30px; }
  .who div { display: none; }
}
