/* Master ToolsWala — Secret Panel — original stylesheet.
   Light, calm workspace: navy #0B1E3A for structure, gold #F5C451 for
   action, white rounded cards, wide spacing, large readable type.
   Status colours everywhere: green healthy, amber needs update,
   red failed, grey never checked. */

* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --navy: #0B1E3A; --navy2: #14305c; --gold: #F5C451; --gold-dark: #a87c14;
  --ink: #22314a; --muted: #66788f; --line: #e3e9f2; --bg: #f4f6fa;
  --ok-bg: #e2f6e9; --ok: #177245; --warn-bg: #fdf0d3; --warn: #8a5a00;
  --bad-bg: #fde3e3; --bad: #a11d1d; --mut-bg: #e8edf4; --mut: #5a6b82;
}
body { font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif; background: var(--bg); color: var(--ink); font-size: 15.5px; line-height: 1.55; min-height: 100vh; }
a { color: #1753b8; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.topbar { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 20px; padding: 12px 22px; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(11,30,58,.28); flex-wrap: wrap; }
.tbrand { display: flex; align-items: center; gap: 12px; }
.tbrand .mono { width: 42px; height: 42px; border-radius: 11px; background: var(--gold); color: var(--navy); font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.tname { font-size: 18px; font-weight: 700; line-height: 1.2; }
.tname small { display: block; font-size: 11px; font-weight: 500; color: #a9bed8; letter-spacing: 1.4px; text-transform: uppercase; }
.globalsearch { flex: 1; max-width: 560px; display: flex; gap: 8px; position: relative; }
.globalsearch .in { flex: 1; border: 0; }
.tright { display: flex; align-items: center; gap: 14px; margin-left: auto; font-size: 14px; }
.tright .who { color: #d7e2f0; }
.tright .muted { color: #93a9c6; }

/* ---------- layout ---------- */
.shell { display: flex; align-items: flex-start; max-width: 1560px; margin: 0 auto; }
.side { width: 238px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--line); min-height: calc(100vh - 66px); position: sticky; top: 66px; padding: 18px 14px 26px; display: flex; flex-direction: column; gap: 3px; }
.side .grp { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); padding: 18px 12px 6px; font-weight: 700; }
.side a { color: var(--ink); text-decoration: none; font-size: 15px; padding: 9px 12px; border-radius: 9px; border-left: 3px solid transparent; }
.side a:hover { background: #f2f6fc; }
.side a.on { background: #fdf6e0; border-left-color: var(--gold); color: var(--navy); font-weight: 700; }
.main { flex: 1; min-width: 0; padding: 28px 30px 40px; }
.foot { font-size: 12.5px; color: var(--muted); text-align: center; padding: 4px 16px 26px; }

/* ---------- headings, sections, cards ---------- */
.head h2 { font-size: 27px; color: var(--navy); letter-spacing: -.2px; }
.sub { font-size: 14.5px; color: var(--muted); margin: 5px 0 20px; max-width: 860px; }
section { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px 14px; margin-bottom: 22px; box-shadow: 0 1px 3px rgba(15,35,70,.05); }
section h3 { font-size: 16px; color: var(--navy); padding-bottom: 12px; border-bottom: 1px solid #eef2f8; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
section h3 .sp { margin-left: auto; }
.muted { color: var(--muted); font-size: 13.5px; }
.notice { background: var(--warn-bg); border: 1px solid #f0d48a; color: var(--warn); border-radius: 11px; padding: 13px 17px; font-size: 14.5px; margin-bottom: 18px; }
.notice.ok { background: var(--ok-bg); border-color: #a9dfc0; color: var(--ok); }
.notice.err { background: var(--bad-bg); border-color: #f3b8b8; color: var(--bad); }

/* ---------- stat cards ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 1px 3px rgba(15,35,70,.05); }
.stat .sl { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.stat .sv { font-size: 30px; font-weight: 800; color: var(--navy); margin-top: 5px; line-height: 1.15; }
.stat .ss { font-size: 13px; color: var(--muted); margin-top: 3px; }
.stat.gold { border-top: 4px solid var(--gold); }
.stat.ok { border-top: 4px solid #2da464; }
.stat.warn { border-top: 4px solid #e0a92e; }
.stat.bad { border-top: 4px solid #d64545; }
.healthbar { height: 12px; background: #e8edf4; border-radius: 99px; overflow: hidden; margin-top: 10px; }
.healthbar i { display: block; height: 100%; background: linear-gradient(90deg, #2da464, #7cc79a); }

/* ---------- badges & buttons ---------- */
.badge { display: inline-block; padding: 3px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad { background: var(--bad-bg); color: var(--bad); }
.b-mut { background: var(--mut-bg); color: var(--mut); }
.btn { display: inline-block; background: var(--navy); color: #fff !important; text-decoration: none; padding: 7px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600; border: 1px solid var(--navy); cursor: pointer; font-family: inherit; }
.btn:hover { background: var(--navy2); }
.btn.big { padding: 10px 18px; font-size: 14.5px; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--navy) !important; }
.btn.gold:hover { background: #eebd3e; }
.btn.ghost { background: #fff; color: var(--navy) !important; border: 1px solid #c3d0e0; }
.btn.ghost:hover { background: #f2f6fc; }
.btn.ghostlight { background: transparent; color: #fff !important; border: 1px solid #5d779c; }
.btn.danger { background: #b32626; border-color: #b32626; }
.btn.danger:hover { background: #931d1d; }
.bigbtn { background: var(--gold); color: var(--navy); border: 0; padding: 13px 24px; border-radius: 10px; font-size: 16px; font-weight: 800; cursor: pointer; width: 100%; font-family: inherit; }
.bigbtn:hover { background: #eebd3e; }
td.acts, .acts { white-space: nowrap; }
td.acts form { display: inline; }

/* ---------- tables ---------- */
table.grid { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-bottom: 12px; }
table.grid th { text-align: left; color: var(--muted); font-weight: 700; padding: 11px 9px; border-bottom: 2px solid var(--line); font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; }
table.grid td { padding: 11px 9px; border-bottom: 1px solid #eef2f8; vertical-align: top; }
table.grid tr:hover td { background: #fbfcfe; }
.pager { color: var(--muted); font-size: 13.5px; padding: 6px 0 10px; }

/* ---------- forms ---------- */
form.f { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 18px; padding: 14px 0 8px; }
form.f .full { grid-column: 1 / -1; }
form.f .actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
label.fl { display: block; font-size: 13px; font-weight: 700; color: #41546e; margin-bottom: 6px; }
input.in, select.in, textarea.in { width: 100%; padding: 10px 12px; border: 1px solid #c3d0e0; border-radius: 9px; font-size: 15px; background: #fff; color: var(--ink); font-family: inherit; }
input.in:focus, select.in:focus, textarea.in:focus { outline: 2px solid var(--gold); border-color: var(--gold-dark); }
input[type="color"].in { padding: 4px; height: 44px; }
.checkline { display: flex; align-items: center; gap: 9px; font-size: 14.5px; padding-top: 26px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
.searchbox { display: flex; gap: 8px; flex-wrap: wrap; }
.searchbox .in { width: 250px; }
.searchbox select.in { width: auto; }
.hint { font-size: 13px; color: var(--muted); margin-top: 5px; }

/* ---------- attention queue ---------- */
.queue { list-style: none; }
.queue li { display: flex; gap: 14px; align-items: flex-start; padding: 13px 4px; border-bottom: 1px solid #eef2f8; }
.queue li:last-child { border-bottom: 0; }
.queue .dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.dot.bad { background: #d64545; } .dot.warn { background: #e0a92e; } .dot.mut { background: #a7b4c6; }
.queue .qt { font-weight: 700; color: var(--navy); font-size: 15px; }
.queue .qd { color: var(--muted); font-size: 13.5px; }
.queue .qa { margin-left: auto; flex-shrink: 0; }

/* ---------- cards grid / preview ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 22px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 1px 3px rgba(15,35,70,.05); }
.pcard h4 { font-size: 16.5px; color: var(--navy); margin-bottom: 4px; }
.pcard dl { margin-top: 8px; }
.pcard dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 9px; }
.pcard dd { font-size: 14.5px; font-weight: 600; }
.extpreview { border-radius: 14px; padding: 22px; color: #fff; min-height: 170px; display: flex; flex-direction: column; gap: 8px; justify-content: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.extpreview .ep-name { font-size: 22px; font-weight: 800; }
.extpreview .ep-slogan { font-size: 14.5px; opacity: .92; }
.extpreview .ep-meta { font-size: 12.5px; opacity: .75; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a { padding: 8px 16px; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.tabs a.on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- login ---------- */
.loginwrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy); padding: 22px; }
.logincard { background: #fff; border-radius: 18px; padding: 38px 40px; width: 410px; max-width: 100%; box-shadow: 0 20px 55px rgba(0,0,0,.35); }
.logincard .mono { width: 56px; height: 56px; border-radius: 13px; background: var(--gold); color: var(--navy); font-weight: 800; font-size: 21px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.logincard h1 { font-size: 23px; color: var(--navy); }
.logincard p { font-size: 14px; color: var(--muted); margin: 5px 0 18px; }
.logincard .fld { margin-bottom: 14px; }
.logincard .tz { margin: 16px 0 0; font-size: 12.5px; text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { width: 100%; min-height: 0; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; }
  .side .grp { width: 100%; padding: 8px 6px 2px; }
  .main { padding: 20px 14px 32px; width: 100%; }
  .globalsearch { order: 3; max-width: none; flex-basis: 100%; }
  table.grid { font-size: 13.5px; }
  .queue .qa { margin-left: 0; }
  .queue li { flex-wrap: wrap; }
}
