:root {
  --teal: #0b8fa8; --teal-dark: #086f84; --deep: #0a3f4c; --ink: #12313a; --muted: #52707a;
  --mist: #eef7f9; --line: #d7e8ec; --white: #fff; --sun: #f2a93b; --sun-soft: #fff4df;
  --ok: #1a8a52; --ok-soft: #e3f5ea; --bad: #c0392b; --bad-soft: #fdeceb; --grey-soft: #eceff1;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 system-ui, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--mist); display: flex; }
h1 { font-size: 24px; margin: 0; } h2 { font-size: 17px; margin: 0 0 10px; } h3 { font-size: 15px; margin: 0; }
p { margin: 0; } a { color: var(--teal-dark); }
button, input, select, textarea { font: inherit; color: inherit; }

.side { width: 216px; flex: none; background: var(--deep); color: #fff; padding: 20px 12px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.brand { padding: 0 10px; } .brand b { display: block; font-size: 18px; } .brand span { font-size: 12px; color: var(--sun); letter-spacing: .08em; text-transform: uppercase; }
#nav { display: flex; flex-direction: column; gap: 2px; }
#nav a { color: #cfe6ec; text-decoration: none; padding: 9px 12px; border-radius: 8px; }
#nav a:hover { background: rgba(255,255,255,.08); }
#nav a.on { background: var(--teal); color: #fff; font-weight: 600; }

.me { margin-top: auto; padding: 0 10px; font-size: 13px; color: #cfe6ec; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.me button { background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 8px; padding: 5px 12px; cursor: pointer; }
.me button:hover { background: rgba(255,255,255,.1); }
body.out .side { display: none; }
body.out main { max-width: none; display: flex; justify-content: center; align-items: flex-start; padding-top: 9vh; }
.auth { width: min(400px, 100%); display: flex; flex-direction: column; gap: 12px; }
.auth h1 { font-size: 22px; } .auth .brandline { color: var(--teal-dark); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }
.auth label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.auth label input { font-weight: 400; color: var(--ink); }
.auth .err { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; max-width: 620px; }
.addr { font-family: ui-monospace, Consolas, monospace; background: var(--mist); padding: 2px 8px; border-radius: 6px; user-select: all; }
main { flex: 1; min-width: 0; padding: 26px 30px 60px; max-width: 1240px; }
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.sub { color: var(--muted); }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.bar input[type=search] { flex: 1 1 220px; }
input, select, textarea { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 10px; min-height: 38px; max-width: 100%; }
textarea { min-height: 84px; resize: vertical; width: 100%; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }

.btn { border: 1px solid transparent; border-radius: 8px; padding: 8px 14px; min-height: 38px; cursor: pointer; font-weight: 600; background: #fff; }
.btn.primary { background: var(--teal); color: #fff; } .btn.primary:hover { background: var(--teal-dark); }
.btn.ghost { border-color: var(--line); color: var(--teal-dark); } .btn.ghost:hover { background: var(--mist); }
.btn.danger { border-color: #f0c4bf; color: var(--bad); } .btn.danger.sure { background: var(--bad); color: #fff; }
.btn.small { min-height: 30px; padding: 3px 10px; font-size: 13px; }
.btn.wa { background: #0f7a40; color: #fff; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; } .btn.wa:hover { background: #0b6233; }
.contact { display: inline-flex; gap: 6px; flex-wrap: wrap; } a.btn { text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.pop .row { flex-wrap: wrap; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: inherit; display: block; }
.tile b { display: block; font-size: 30px; line-height: 1.1; color: var(--deep); } .tile span { color: var(--muted); font-size: 13px; }
.tile.warn b { color: #b86b00; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); align-items: center; }
.rows li:first-child { border-top: 0; }
.rows small, td small, .appt small { color: var(--muted); display: block; }
.link { background: none; border: 0; padding: 0; color: var(--teal-dark); font-weight: 600; cursor: pointer; text-align: left; }
.link:hover { text-decoration: underline; }

.tablewrap { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
tbody tr:first-child td { border-top: 0; }
tbody tr { cursor: pointer; } tbody tr:hover { background: #f7fbfc; }
td.due { color: #b86b00; font-weight: 600; }
.empty { color: var(--muted); padding: 26px; text-align: center; }

.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--grey-soft); color: #44575e; white-space: nowrap; }
.c-new, .c-booked, .c-applied { background: #e2f1fb; color: #14608f; }
.c-contacted, .c-collecting-documents, .c-visa-filed { background: var(--sun-soft); color: #8a5a00; }
.c-counselling-done, .c-offer-received, .c-fee-paid { background: #e6f6f8; color: var(--teal-dark); }
.c-converted, .c-visa-approved, .c-enrolled, .c-done { background: var(--ok-soft); color: var(--ok); }
.c-lost, .c-visa-refused, .c-no-show { background: var(--bad-soft); color: var(--bad); }
.meter { height: 6px; background: var(--grey-soft); border-radius: 99px; overflow: hidden; min-width: 80px; margin-top: 5px; }
.meter i { display: block; height: 100%; background: var(--teal); }

.finder { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.course { display: flex; flex-direction: column; gap: 6px; }
.course .where { color: var(--muted); font-size: 13px; }
.course dl { margin: 4px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 13px; } .course dt { color: var(--muted); } .course dd { margin: 0; }
.facts { margin-bottom: 16px; } .facts dl { margin: 0; display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 6px 14px; }
.facts dt { font-weight: 600; } .facts dd { margin: 0; } .facts .foot { margin-top: 10px; color: var(--muted); font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.day { display: flex; flex-direction: column; }
.slot { display: grid; grid-template-columns: 82px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.slot:first-child { border-top: 0; } .slot time { color: var(--muted); font-variant-numeric: tabular-nums; }
.slot .who { display: flex; flex-direction: column; gap: 6px; }
.appt { background: var(--mist); border-left: 3px solid var(--teal); border-radius: 6px; padding: 6px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; align-items: center; border-top: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; }
.appt.off { border-left-color: #b9c6ca; opacity: .7; }

dialog { border: 0; border-radius: 14px; padding: 0; width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 20px 60px rgba(10,63,76,.35); color: var(--ink); }
dialog::backdrop { background: rgba(10,63,76,.45); }
.form header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.form header h2 { margin: 0; } .x { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 6px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; padding: 18px 20px; }
.grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0; }
.grid label > input, .grid label > select { width: 100%; font-weight: 400; color: var(--ink); } .grid label > textarea { font-weight: 400; color: var(--ink); }
.grid .full { grid-column: 1 / -1; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 12px; border: 0; padding: 0; margin: 0; }
.checks legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 0 6px; }
.checks label { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; color: var(--ink); font-size: 14px; }
.checks input { min-height: 0; width: 17px; height: 17px; }
.err { color: var(--bad); background: var(--bad-soft); margin: 0 20px 12px; padding: 8px 12px; border-radius: 8px; }
.form footer { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; position: sticky; bottom: 0; background: #fff; }
.sp { flex: 1; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--deep); color: #fff; padding: 10px 18px; border-radius: 99px; z-index: 50; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
#pops { position: fixed; top: 16px; right: 16px; z-index: 60; display: flex; flex-direction: column; gap: 10px; width: min(340px, calc(100vw - 32px)); }
.pop { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--sun); border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(10,63,76,.28); animation: pop-in .25s ease-out; }
.pop .tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a5a00; display: flex; justify-content: space-between; align-items: center; }
.pop .tag button { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 2px; }
.pop b { display: block; font-size: 17px; margin-top: 2px; overflow-wrap: anywhere; }
.pop small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.pop .row { display: flex; gap: 8px; margin-top: 10px; }
@keyframes pop-in { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pop { animation: none; } }
.note { background: var(--sun-soft); border: 1px solid #f3d9a4; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }

@media (max-width: 760px) {
  body { flex-direction: column; }
  .side { position: fixed; inset: auto 0 0 0; width: auto; height: auto; padding: 4px 6px; flex-direction: row; z-index: 20; }
  .brand, .me span { display: none; }
  .me { margin: 0; padding: 0 4px; justify-content: center; } .me button { font-size: 12px; white-space: nowrap; }
  #nav { flex-direction: row; width: 100%; overflow-x: auto; }
  #nav a { flex: 1 0 auto; text-align: center; font-size: 12px; padding: 9px 8px; white-space: nowrap; }
  main { padding: 18px 16px 90px; }
  .grid { grid-template-columns: 1fr; }
  .slot { grid-template-columns: 66px 1fr auto; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tbody tr { padding: 10px 14px; border-top: 1px solid var(--line); } tbody tr:first-child { border-top: 0; }
  td { border: 0; padding: 2px 0; } td:empty { display: none; }
  td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: 12px; }
  #toast { bottom: 70px; }
}
