/* Nevora Operations — unified dark interface */
:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --page: #0e1520;
  --sidebar: #0a1019;
  --surface: #172332;
  --surface-raised: #1c2a3b;
  --surface-hover: #24354b;
  --table-head: #14202e;
  --border: #304257;
  --border-soft: #29394a;
  --text: #edf3fc;
  --secondary: #b5c4d7;
  --muted: #93a6bc;
  --accent: #398bfa;
  --accent-hover: #2779e5;
  --accent-soft: #1b3455;
  color: var(--text);
  background: var(--page);
}
* { box-sizing: border-box }
html { min-height: 100%; background: var(--page) }
body { margin: 0; min-height: 100vh; background: var(--page); color: var(--text) }
button, input, textarea, select { font: inherit }
button { cursor: pointer }
button:disabled { opacity: .55; cursor: not-allowed }
a { color: #74b1ff; text-decoration: none }
a:hover { text-decoration: underline }
::selection { background: #295fa0; color: white }

.shell { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0,1fr) }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--border-soft); color: var(--text); padding: 27px 17px; display: flex; flex-direction: column; gap: 32px }
.brand { padding: 4px 10px }
.brand-name { font-size: 23px; letter-spacing: .14em; font-weight: 800; color: #73acff }
.brand-sub { font-size: 10px; letter-spacing: .22em; color: var(--muted); margin-top: 6px }
.nav { display: grid; gap: 6px }
.nav button { display: flex; align-items: center; gap: 10px; color: var(--secondary); border: 0; background: transparent; padding: 12px 14px; border-radius: 9px; text-align: left; font-size: 14px }
.nav button:hover, .nav button.active { background: #1b2d43; color: var(--text) }
.nav button.active { box-shadow: inset 3px 0 var(--accent) }
.side-bottom { margin-top: auto; padding: 12px; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere }

.main { min-width: 0; padding: 27px clamp(18px,4vw,55px) 42px; max-width: 1500px; width: 100%; margin: auto }
.topline { display: flex; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 30px }
.crumb { color: var(--muted); font-size: 13px }
.pill { font-size: 11px; background: var(--accent-soft); border: 1px solid #2b5281; color: #9cc7ff; padding: 7px 11px; border-radius: 99px; font-weight: 700; letter-spacing: .04em }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 15px; flex-wrap: wrap; margin: 0 0 28px }
h1 { font-size: 30px; letter-spacing: -.035em; margin: 0 0 6px; color: var(--text) }
h2 { font-size: 17px; margin: 0; color: var(--text) }
p { line-height: 1.55 }
.muted { font-size: 13px; color: var(--muted); margin: 0 }
.actions { display: flex; gap: 8px; flex-wrap: wrap }

.btn { border: 1px solid var(--border); border-radius: 8px; background: var(--surface-raised); color: var(--text); font-weight: 650; font-size: 13px; padding: 10px 14px; transition: background-color .15s, border-color .15s }
.btn:hover { background: var(--surface-hover); border-color: #47617c }
.btn.primary { border-color: #398bfa; background: #286fcb; color: #fff }
.btn.primary:hover { background: var(--accent-hover) }
.btn.subtle { border-color: transparent; background: transparent }
.btn.danger { color: #ffaaaa }
.btn.small { padding: 6px 9px; font-size: 12px }
:where(.btn, .nav button, input, select, textarea, .password-toggle):focus-visible { outline: 2px solid #93c2ff; outline-offset: 2px }

.stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 22px }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 19px 20px }
.stat-label { font-size: 12px; color: var(--secondary); font-weight: 600; margin-bottom: 10px }
.stat-number { font-size: 28px; line-height: 1.1; font-weight: 760; letter-spacing: -.05em; color: var(--text) }
.panel { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; overflow: hidden; margin: 16px 0 }
.panel-head { padding: 19px 21px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap }
.panel-foot { padding: 11px 21px; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: 12px }
.table-wrap { overflow-x: auto }
table { border-collapse: collapse; width: 100%; min-width: 730px }
th { font-size: 11px; text-align: left; letter-spacing: .04em; text-transform: uppercase; color: var(--secondary); background: var(--table-head); font-weight: 750 }
th, td { padding: 15px 19px; border-top: 1px solid var(--border-soft); vertical-align: top }
td { font-size: 13px; color: var(--secondary) }
td strong { font-weight: 700; color: var(--text) }
tbody tr:hover { background: #1c2b3d }
.link-button { border: 0; background: transparent; color: #80b7ff; font-weight: 700; padding: 0; text-align: left }
.link-button:hover { text-decoration: underline }
.inline-note { display: block; font-size: 11px; color: var(--muted); margin-top: 4px }
.tag { border-radius: 6px; background: #2a3c50; color: #c7d5e5; font-size: 11px; font-weight: 650; padding: 4px 7px; display: inline-block }
.tag.hold { background: #443224; color: #ffcd92 }
.tag.done { background: #1d4437; color: #96e0b8 }
.empty { padding: 36px 22px; color: var(--muted); text-align: center }
.notice { background: #352b1a; border: 1px solid #755929; border-radius: 10px; padding: 12px 16px; font-size: 12px; color: #ffe1a1; margin-bottom: 18px }
.secondary-title { font-size: 14px; font-weight: 700; margin: 28px 0 9px }
.footer { margin-top: 34px; padding: 20px 0; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: 12px }

dialog { border: 1px solid #42576c; background: var(--surface); box-shadow: 0 24px 80px #000a; width: min(620px,calc(100vw - 26px)); max-height: 85vh; border-radius: 14px; padding: 0; color: var(--text) }
dialog::backdrop { background: #040913d9 }
.modal-head { padding: 21px 23px; border-bottom: 1px solid var(--border-soft); display: flex; justify-content: space-between; align-items: center; gap: 12px }
.modal-body { padding: 21px 23px; overflow: auto; max-height: 65vh }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 15px }
.field { display: grid; gap: 6px; min-width: 0 }
.field.full { grid-column: 1/-1 }
.field label { font-size: 12px; font-weight: 700; color: var(--secondary) }
.field input, .field select, .field textarea, .doc-editor { width: 100%; padding: 10px; border: 1px solid #486079; border-radius: 8px; background: #101b29; color: var(--text); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted) }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #7192b4 }
.field input:autofill, .field input:-webkit-autofill { -webkit-text-fill-color: #eef3fc; -webkit-box-shadow: 0 0 0 1000px #101b29 inset; transition: background-color 5000s ease-in-out 0s }
.field select option { color: var(--text); background: #101b29 }
.field textarea { resize: vertical; min-height: 85px }
.doc-editor { min-height: 400px; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 12px; line-height: 1.6; resize: vertical }
.meta-list { margin: 4px 0 18px; display: grid; grid-template-columns: 140px minmax(0,1fr); gap: 9px; font-size: 13px }
.meta-list dt { color: var(--muted) }
.meta-list dd { margin: 0; overflow-wrap: anywhere }
.modal-section { margin-top: 22px }
.modal-section h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--secondary) }
.item-list { padding: 0; list-style: none }
.item-list li { padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px }
.quiet { color: var(--muted); font-size: 12px }
.checkbox-list { border: 1px solid var(--border); border-radius: 8px; padding: 10px; display: grid; gap: 8px; max-height: 125px; overflow: auto; font-size: 12px }
.checkbox-list label { display: flex; gap: 7px; align-items: center }
.procedure-item { padding: 12px 0; border-top: 1px solid var(--border-soft) }

/* Password visibility: the eye is a button, not part of the input value. */
.password-control { position: relative; width: 100% }
.password-control input { padding-right: 52px }
.password-toggle { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); width: 38px; height: 38px; padding: 8px; display: grid; place-items: center; border: 0; border-radius: 7px; color: var(--secondary); background: transparent; cursor: pointer }
.password-toggle:hover { color: #fff; background: var(--surface-hover) }
.password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none }
.password-toggle .eye-off { display: none }
.password-toggle[aria-pressed="true"] .eye-on { display: none }
.password-toggle[aria-pressed="true"] .eye-off { display: block }

@media(max-width:870px){
  .shell { grid-template-columns: 1fr }
  .sidebar { gap: 10px; padding: 16px; border-right: 0; border-bottom: 1px solid var(--border-soft) }
  .brand { padding: 0 }
  .brand-name { font-size: 20px }
  .nav { display: flex; overflow-x: auto }
  .nav button { white-space: nowrap }
  .side-bottom { display: none }
  .main { padding: 20px }
  .stats { grid-template-columns: repeat(3,minmax(0,1fr)) }
}
@media(max-width:600px){
  h1 { font-size: 25px }
  .stats { grid-template-columns: 1fr }
  .fields { grid-template-columns: 1fr }
  .field.full { grid-column: 1 }
  .topline { margin-bottom: 20px }
}
