/* Admin panel */
@font-face { font-family: "Anek"; src: url("../fonts/anek-gujarati.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Anek"; src: url("../fonts/anek-devanagari.woff2") format("woff2"); font-weight: 100 800; font-display: swap; unicode-range: U+0900-097F, U+A8E0-A8FF; }
:root { --o: #F2580C; --od: #C9430A; --g: #FFD54A; --ink: #1C110A; --ink2: #5A4A3E; --ink3: #8A7A6E; --bg: #F7F1EA; --card: #fff; --line: #EADBCB; --night: #170C06; }
* { box-sizing: border-box; }
body { margin: 0; font: 500 15px/1.5 "Anek", system-ui, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--od); }
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--night); color: #D8C2B0; display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.side-brand { display: flex; gap: 10px; align-items: center; color: #fff; text-decoration: none; font-weight: 800; padding: 6px 10px 18px; }
.side-brand img { border-radius: 10px; }
.side-brand small { display: block; color: var(--g); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.side nav { display: grid; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: #D8C2B0; text-decoration: none; font-weight: 600; }
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a[aria-current] { background: var(--o); color: #fff; }
.badge { margin-left: auto; background: var(--g); color: var(--ink); border-radius: 999px; font-size: 12px; padding: 1px 8px; }
.side-foot { margin-top: auto; display: grid; gap: 4px; padding: 10px; }
.side-foot a { color: #A88E7B; text-decoration: none; }
.side-foot a:hover { color: var(--g); }
.main { min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; padding: 16px 26px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top h1 { font-size: 22px; margin: 0; flex: 1; }
.top .who { color: var(--ink3); font-weight: 700; }
.menu { display: none; border: 1px solid var(--line); background: #fff; border-radius: 10px; font-size: 20px; padding: 4px 10px; }
.content { padding: 24px 26px 60px; max-width: 1200px; }
.flash { background: #E3F4EA; color: #1D7A43; border: 1px solid #B7E0C7; padding: 12px 16px; border-radius: 12px; font-weight: 700; margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stats.small { grid-template-columns: repeat(3, minmax(120px, 200px)); }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; text-decoration: none; color: var(--ink); box-shadow: 0 6px 18px -12px rgba(120,48,8,.35); }
a.stat:hover { border-color: var(--o); }
.stat span { display: block; font-size: 12px; font-weight: 800; color: var(--ink3); text-transform: uppercase; letter-spacing: .06em; }
.stat b { display: block; font-size: 32px; font-weight: 800; line-height: 1.2; }
.stat small { color: var(--ink3); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; margin-bottom: 18px; box-shadow: 0 6px 18px -14px rgba(120,48,8,.35); }
.panel h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink2); margin: 0 0 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.chart { width: 100%; height: 180px; display: block; }
.axis { display: flex; justify-content: space-between; color: var(--ink3); font-size: 12px; margin-top: 4px; }
.row { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.row:hover { background: #FFF6EE; border-color: var(--line); }
.row span { color: var(--ink3); font-size: 13px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font: 700 14px "Anek", sans-serif; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--o); color: var(--od); }
.btn.primary { background: var(--o); border-color: var(--o); color: #fff; }
.btn.primary:hover { background: var(--od); color: #fff; }
.btn.danger { color: #B3261E; border-color: #F1C4C0; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline form { margin: 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; }
.tabs a[aria-current] { background: var(--ink); color: var(--g); border-color: var(--ink); }
.tabs .add { margin-left: auto; background: var(--o); color: #fff; border-color: var(--o); }
.t { width: 100%; border-collapse: collapse; }
.t th, .t td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #F2E6DA; vertical-align: top; }
.t th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink3); }
.t .num { text-align: right; white-space: nowrap; }
.t.kv th { width: 140px; }
.cellbar { position: relative; padding: 2px 6px; }
.cellbar i { position: absolute; inset: 0 auto 0 0; background: #FFE6D6; border-radius: 6px; z-index: 0; }
.cellbar span { position: relative; z-index: 1; word-break: break-all; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #EEE; text-transform: capitalize; }
.pill.new { background: #FFE6D6; color: #9A3407; } .pill.seen, .pill.read { background: #E9E4DF; color: #5A4A3E; }
.pill.fixed, .pill.replied, .pill.published { background: #DDF3EC; color: #0A5C4A; } .pill.draft { background: #FFF3C4; color: #7A5A00; }
.pill.spam { background: #F6D5D2; color: #8F1F18; } .pill.ekadashi { background: #DDF3EC; color: #0A5C4A; } .pill.festival { background: #FFE6D6; color: #9A3407; }
.stack { white-space: pre-wrap; word-break: break-word; background: #1C110A; color: #F3DCCB; padding: 14px; border-radius: 12px; font: 12.5px/1.5 ui-monospace, Menlo, Consolas, monospace; max-height: 480px; overflow: auto; }
.bigtext { font-size: 17px; white-space: normal; }
.muted { color: var(--ink3); }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 4px; font-weight: 700; font-size: 13px; color: var(--ink2); }
input, textarea, select { font: 500 15px "Anek", sans-serif; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; width: 100%; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--o); box-shadow: 0 0 0 3px rgba(242,88,12,.15); }
.check { display: flex !important; align-items: center; gap: 8px; }
.check input { width: 18px; height: 18px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
body.login { display: grid; place-items: center; min-height: 100vh; background: radial-gradient(700px 400px at 80% 0, rgba(242,88,12,.4), transparent 60%), var(--night); }
.loginbox { width: min(400px, 92vw); background: #fff; border-radius: 24px; padding: 30px; display: grid; gap: 14px; justify-items: stretch; text-align: left; }
.loginbox img { border-radius: 14px; justify-self: center; }
.loginbox h1 { font-size: 22px; text-align: center; margin: 0; }
.loginbox label { display: grid; gap: 4px; font-weight: 700; font-size: 13px; }
.loginbox .err { background: #FCE8E6; color: #B3261E; padding: 10px; border-radius: 10px; margin: 0; }
.loginbox a { text-align: center; font-size: 14px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 30% 0 0; z-index: 20; transform: translateX(-105%); transition: transform .2s; }
  .side.open { transform: none; }
  .menu { display: inline-block; }
  .grid2, .grid3, .row2, .row3 { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .t { display: block; overflow-x: auto; }
}
