/* ARUNODAYA - Secure Authentication Terminal theme.
   Dark green / gold military-terminal aesthetic per the approved reference. */
:root {
  --bg: #0b1409;
  --bg2: #0e1a0b;
  --panel: #101f0e;
  --panel2: #14260f;
  --line: #3a4420;
  --gold: #e6c854;
  --gold-dim: #a8923c;
  --gold-dark: #6b6128;
  --green: #4be07a;
  --red: #e05353;
  --text: #d5dcc3;
  --dim: #7d8a68;
  --mono: 'DejaVu Sans Mono', 'Courier New', monospace;
  --serif: 'Noto Serif Devanagari', 'DejaVu Serif', serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--mono); font-size: 14px;
  background-image: radial-gradient(ellipse at 50% -20%, #16270f 0%, transparent 60%);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; max-width: 1080px; width: 100%; margin: 0 auto; padding: 26px 20px 60px; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-family: var(--serif); font-size: 22px; letter-spacing: 3px; margin: 0 0 4px; color: var(--gold); }
h1.h-sm { font-size: 16px; }
h2 { font-size: 13px; letter-spacing: 3px; color: var(--gold); margin: 28px 0 12px;
     border-bottom: 1px solid var(--line); padding-bottom: 6px; text-transform: uppercase; }
code { color: var(--green); }
.dim { color: var(--dim); }
.small { font-size: 12px; }

/* header */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 34px 10px; border-bottom: 1px solid var(--gold-dark);
  background: linear-gradient(180deg, #0f1c0a, #0b1409);
}
.insignia { height: 62px; width: auto; }
.insignia.shield { height: 66px; }
.brand { text-align: center; }
.brand-name {
  font-family: var(--serif); font-size: 30px; letter-spacing: 10px;
  color: var(--gold); text-shadow: 0 0 18px rgba(230,200,84,.35);
}
.brand-sub { color: var(--gold-dim); letter-spacing: 6px; font-size: 11px; margin: 4px 0 8px; }
.brand-slogan {
  display: inline-block; font-family: var(--serif); color: var(--gold);
  border: 1px solid var(--gold-dark); border-radius: 999px; padding: 4px 18px;
  font-size: 13px; background: rgba(230,200,84,.05);
}
.topnav {
  display: flex; gap: 20px; align-items: center; justify-content: center;
  font-size: 12px; letter-spacing: 2px; padding: 10px; border-bottom: 1px solid var(--line);
  background: var(--bg2);
}
.topnav .who { color: var(--dim); }
.topnav .logout { color: var(--red); }
.node { color: var(--green); font-size: 11px; letter-spacing: 2px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%;
       background: var(--green); margin-right: 6px; box-shadow: 0 0 8px var(--green); }
.foot {
  display: flex; justify-content: space-between; padding: 14px 34px;
  color: var(--dim); font-size: 11px; border-top: 1px solid var(--line);
  background: var(--bg2);
}
.foot-right { color: var(--gold-dim); }

/* login */
.login-wrap { display: flex; justify-content: center; padding-top: 42px; }
.login-box {
  width: 620px; max-width: 94vw; background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--gold-dark); border-radius: 6px; padding: 26px 30px 30px;
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 0 50px rgba(0,0,0,.6), inset 0 0 40px rgba(230,200,84,.03);
}
.login-box-head {
  display: flex; justify-content: space-between; align-items: center;
  color: var(--gold); letter-spacing: 3px; font-size: 13px;
  border-bottom: 1px solid var(--line); padding-bottom: 12px;
}
.alert {
  background: #2a1214; border: 1px solid var(--red); color: #ffb0b0;
  padding: 9px 12px; border-radius: 3px; font-size: 12px;
}
label { display: flex; flex-direction: column; gap: 7px; font-size: 11px;
        letter-spacing: 2px; color: var(--gold-dim); }
input, textarea, select {
  background: #0a1207; border: 1px solid var(--gold-dark); color: var(--text);
  font-family: var(--mono); font-size: 14px; padding: 12px; border-radius: 3px;
}
input:focus, textarea:focus, select:focus { outline: 1px solid var(--gold-dim); border-color: var(--gold-dim); }
textarea { resize: vertical; line-height: 1.5; }
.captcha { border: 1px solid var(--gold-dark); border-radius: 3px; image-rendering: pixelated;
           width: 220px; }
button, .btn {
  background: linear-gradient(180deg, #d8b73c, #a8923c); color: #10160a;
  border: 1px solid var(--gold); font-family: var(--mono); font-weight: bold;
  letter-spacing: 3px; padding: 13px 18px; cursor: pointer; border-radius: 4px;
  font-size: 13px; display: inline-block;
}
button:hover:not(:disabled), .btn:hover { filter: brightness(1.1); text-decoration: none; }
button:disabled { opacity: .35; cursor: not-allowed; }
button.ok { background: linear-gradient(180deg, #d8b73c, #a8923c); }
button.pub { background: linear-gradient(180deg, #4be07a, #2a9a4e); border-color: var(--green); }
button.mini, .mini {
  padding: 4px 10px; font-size: 10px; background: transparent; font-weight: normal;
  border: 1px solid var(--line); color: var(--dim); border-radius: 3px; letter-spacing: 1px;
}

/* dashboard */
.notes { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold);
         border-radius: 3px; padding: 12px 16px; margin-bottom: 18px; }
.notes-head { display: flex; justify-content: space-between; align-items: center;
              color: var(--gold); letter-spacing: 2px; font-size: 11px; margin-bottom: 8px; }
.note { font-size: 12px; padding: 3px 0; }
.statusline { color: var(--dim); font-size: 12px; margin: 14px 0; letter-spacing: 1px; }
.cycle h2 span { font-weight: normal; letter-spacing: 0; text-transform: none; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); border-radius: 4px;
  padding: 16px; color: var(--text); display: flex; flex-direction: column; gap: 8px;
}
.card:hover { border-color: var(--gold-dim); text-decoration: none; }
.card-name { color: var(--gold); font-size: 14px; font-family: var(--serif); letter-spacing: 1px; }
.card-mag { color: var(--dim); font-size: 11px; }
.card-meta { font-size: 11px; color: var(--dim); }
.flag { color: var(--red); }
.badge {
  align-self: flex-start; font-size: 10px; letter-spacing: 2px; padding: 4px 10px;
  border-radius: 3px; border: 1px solid var(--line); color: var(--dim); text-transform: uppercase;
}
.badge.big { font-size: 12px; padding: 7px 14px; }
.s-draft { color: var(--dim); }
.s-in_review { color: var(--gold); border-color: var(--gold-dim); }
.s-approved { color: var(--green); border-color: var(--green); }
.s-published { color: #7cc7ff; border-color: #3c6c8a; background: #0c1620; }

/* issue page */
.issue-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.actions { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.actions form { margin: 0; }
.receipt { background: var(--panel); border: 1px solid var(--line); padding: 14px;
           border-radius: 3px; font-size: 11px; overflow-x: auto; }
.story-row {
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 3px;
  padding: 12px 16px; margin-bottom: 8px;
}
.story-row:hover { border-color: var(--gold-dark); }
.story-head { color: #e8eed8; font-size: 13px; }
.story-side { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.kicker { color: var(--gold); letter-spacing: 2px; font-size: 12px; margin-bottom: 4px; }
.cover-tag { color: var(--gold); letter-spacing: 1px; }
.risk { font-size: 11px; padding: 3px 8px; border-radius: 3px; border: 1px solid; }
.r-low { color: var(--green); border-color: #2a7a4e; }
.r-medium { color: var(--gold); border-color: var(--gold-dim); }
.r-high { color: var(--red); border-color: var(--red); }

/* edit form */
.edit-form { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 160px; gap: 14px; }
.check { flex-direction: row; align-items: center; gap: 10px; letter-spacing: 1px; }
.check input { width: auto; }

/* audit */
table.audit { width: 100%; border-collapse: collapse; font-size: 12px; }
table.audit th { text-align: left; color: var(--gold); letter-spacing: 2px; font-size: 10px;
                 border-bottom: 1px solid var(--line); padding: 8px; }
table.audit td { border-bottom: 1px solid var(--line); padding: 7px 8px; color: var(--dim); }

/* settings */
.settings-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
                  padding: 18px 20px; max-width: 640px; display: flex; flex-direction: column; gap: 10px; }
.ok-line { color: var(--green); }

/* credit meter */
.meter { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold);
         border-radius: 3px; padding: 12px 16px; margin: 4px 0 10px; }
.meter-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
              color: var(--gold); letter-spacing: 2px; font-size: 11px; margin-bottom: 10px; }
.meter-bar { height: 10px; background: #0a1207; border: 1px solid var(--gold-dark);
             border-radius: 999px; overflow: hidden; }
.meter-fill { height: 100%; background: linear-gradient(90deg, #2a9a4e, #4be07a); }
.m-warn .meter-fill { background: linear-gradient(90deg, #a8923c, #e6c854); }
.m-crit .meter-fill { background: linear-gradient(90deg, #a83a3a, #e05353); }
.m-crit { border-left-color: var(--red); }
.meter-line { font-size: 12px; margin-top: 8px; }
.meter-warn { margin-top: 10px; color: var(--gold); border: 1px solid var(--gold-dim);
              background: rgba(230,200,84,.06); padding: 8px 10px; border-radius: 3px;
              font-size: 12px; letter-spacing: 1px; }
.meter-warn.crit { color: #ffb0b0; border-color: var(--red); background: #2a1214; }

/* ---------------- responsive: small laptops and tablets ---------------- */
@media (max-width: 1100px) {
  main { padding: 20px 16px 50px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 12px 18px 8px; }
  .brand-name { font-size: 24px; letter-spacing: 6px; }
  .insignia { height: 50px; }
  .insignia.shield { height: 54px; }
  .foot { padding: 12px 18px; flex-direction: column; gap: 6px; }
}

/* ---------------- responsive: phones ---------------- */
@media (max-width: 640px) {
  body { font-size: 13px; }
  main { padding: 14px 10px 40px; }
  .grid { grid-template-columns: 1fr; }
  .topbar { padding: 10px 10px 8px; gap: 8px; }
  .brand-name { font-size: 18px; letter-spacing: 4px; }
  .brand-sub { letter-spacing: 3px; font-size: 10px; margin: 3px 0 6px; }
  .brand-slogan { font-size: 12px; padding: 3px 12px; }
  .insignia { height: 38px; }
  .insignia.shield { height: 41px; }
  .topnav { flex-wrap: wrap; gap: 8px 14px; font-size: 11px; padding: 8px; }
  h1 { font-size: 18px; letter-spacing: 2px; }
  h2 { letter-spacing: 2px; }
  .issue-head { flex-direction: column; gap: 8px; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions form, .actions .btn, .actions button { width: 100%; text-align: center; }
  .story-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .story-side { flex-wrap: wrap; white-space: normal; }
  .row2 { grid-template-columns: 1fr; }
  .login-box { padding: 18px 16px 22px; }
  .captcha { width: 100%; max-width: 220px; }
  .gen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .gen input { flex: 1; min-width: 120px; margin: 0 !important; }
  table.audit { display: block; overflow-x: auto; white-space: nowrap; }
  .settings-panel { padding: 14px; }
  .notes-head { flex-wrap: wrap; gap: 8px; }
  .receipt { font-size: 10px; }
}
.meter-big { font-size: 14px; color: #e8eed8; letter-spacing: 1px; }
