/* ETA4 — green / lime / orange / teal on cream, after the "hr." reference design. */
:root {
  --green-900: #1c3829;
  --green-800: #234332;
  --green-700: #2d5340;
  --lime: #c9ef3a;
  --orange: #f27a1a;
  --orange-d: #d9650b;
  --teal: #38c0ad;
  --cream: #f1ede1;
  --cream-2: #e9e4d4;
  --card: #ffffff;
  --ink: #1d2a22;
  --muted: #6f7a72;
  --line: #e6e1d3;
  --bad: #d64545;
  --warn: #e3a019;
  --ok: #1f9d6b;
  --info: #2f7fd1;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(28, 56, 41, .06), 0 6px 18px rgba(28, 56, 41, .05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; color: var(--ink); background: var(--cream); }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
.muted { color: var(--muted); }
.ic { flex: none; }

/* ---- shell ---- */
.shell { display: flex; min-height: 100vh; }
.side { width: 236px; flex: none; background: var(--green-900); color: #e8efe9; display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { font-size: 19px; font-weight: 700; color: var(--lime); text-decoration: none; letter-spacing: 0; padding: 4px 12px 20px; line-height: 1.1; white-space: nowrap; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8fa797; padding: 14px 12px 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: #dfe8e1; font-size: 13.5px; }
.nav-item:hover { background: var(--green-800); }
.nav-item.on { background: var(--green-700); color: #fff; box-shadow: inset 3px 0 0 var(--lime); }
.side-help { margin-top: 18px; background: var(--green-800); border-radius: 14px; padding: 26px 14px 14px; text-align: center; position: relative; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.help-dot { position: absolute; top: -16px; width: 32px; height: 32px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-weight: 700; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { background: var(--green-900); color: #fff; display: flex; align-items: center; gap: 18px; padding: 12px 24px; position: sticky; top: 0; z-index: 20; }
.welcome { color: var(--lime); font-weight: 700; font-size: 18px; white-space: nowrap; }
.top-search { flex: 1; max-width: 360px; margin: 0 auto; display: flex; align-items: center; gap: 8px; border: 1.5px solid #cfe0d4; border-radius: 10px; padding: 6px 12px; }
.top-search input { background: transparent; border: 0; color: #fff; outline: none; font: inherit; width: 100%; }
.top-search input::placeholder { color: #b9cbbf; }
.top-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.me { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-left: 1px solid #3c5d4a; }
.me-txt { display: flex; flex-direction: column; line-height: 1.25; }
.me-txt small { color: #b9cbbf; font-size: 11.5px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.icon-btn { background: transparent; border: 0; color: inherit; cursor: pointer; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; text-decoration: none; }
.icon-btn:hover { background: var(--green-800); }
.only-m { display: none; }
.content { padding: 24px; flex: 1; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.foot { color: var(--muted); font-size: 12px; text-align: center; padding: 28px 0 6px; }

/* ---- cards & grid ---- */
.card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h3 { font-size: 15.5px; }
.grid { display: grid; gap: 16px; }
.grid > .card + .card { margin-top: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash { grid-template-columns: 1fr 1fr 1fr; }
.dash .tall { grid-row: span 2; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat b { font-size: 30px; font-weight: 700; letter-spacing: -.5px; }
.stat .lbl { color: var(--muted); font-size: 12.5px; }
.big-time { font-size: 34px; font-weight: 700; text-align: center; letter-spacing: 1px; margin: 4px 0 12px; font-variant-numeric: tabular-nums; }
.soft { background: var(--cream); border-radius: 12px; padding: 12px 14px; }
.kv { display: flex; justify-content: space-between; font-size: 12.5px; padding: 3px 0; }
.kv span { color: var(--muted); }

/* ---- buttons, pills, forms ---- */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 10px; padding: 9px 15px; font: 500 13px Poppins, sans-serif; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-d); }
.btn-green { background: var(--green-900); color: #fff; }
.btn-green:hover { background: var(--green-700); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-ghost { background: var(--cream); color: var(--ink); }
.btn-ghost:hover { background: var(--cream-2); }
.btn-danger { background: #fbe5e5; color: var(--bad); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn:disabled { opacity: .55; cursor: default; }
form.inline { display: inline; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 500; background: var(--cream); color: var(--ink); white-space: nowrap; }
.pill.ok { background: #dcf5ea; color: #137a52; }
.pill.bad { background: #fbe1e1; color: #b33232; }
.pill.warn { background: #fdf0d2; color: #94650a; }
.pill.info { background: #dfeefc; color: #23609d; }
.pill.muted { background: #eeece6; color: var(--muted); }
.pill.lime { background: var(--lime); color: var(--green-900); }
.fld { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
.fld > span { font-weight: 500; color: var(--ink); }
.fld small { color: var(--muted); font-size: 11.5px; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], input[type=email], input[type=search], input[type=month], select, textarea {
  font: 13.5px Poppins, sans-serif; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 11px; width: 100%; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(56, 192, 173, .15); }
.chk { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink); cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.form-grid .span2 { grid-column: span 2; }
.form-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters .fld { min-width: 150px; }
.flash { padding: 11px 15px; border-radius: 12px; margin-bottom: 14px; font-size: 13.5px; }
.flash.ok { background: #dcf5ea; color: #116a47; }
.flash.err { background: #fbe1e1; color: #a12b2b; }
.flash.warn { background: #fdf0d2; color: #7d5508; }
ul.msgs { margin: 6px 0 0; padding-left: 18px; }

/* ---- tables ---- */
.tbl-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 9px 10px; border-bottom: 1.5px solid var(--line); white-space: nowrap; background: #fff; position: sticky; top: 0; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid #f0ece2; vertical-align: middle; }
.tbl tr:hover td { background: #fbfaf6; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .c { text-align: center; }
.tbl .act { white-space: nowrap; text-align: right; }
.tbl td.t { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 600; border-top: 1.5px solid var(--line); }
.tbl input[type=time], .tbl input[type=text] { padding: 4px 6px; font-size: 12.5px; border-radius: 7px; min-width: 70px; }
.cell-unused { color: var(--muted); font-style: italic; }
.cell-late { color: var(--bad); font-weight: 600; }
.pager { display: flex; gap: 6px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.pager a { padding: 4px 10px; border-radius: 8px; text-decoration: none; background: var(--cream); font-size: 12.5px; }
.pager a.on { background: var(--green-900); color: #fff; }
.pager .muted { margin-right: auto; font-size: 12.5px; }
.empty { text-align: center; color: var(--muted); padding: 34px 10px; }
.empty .ic { color: #b8b19e; }

/* ---- dashboard widgets ---- */
.donut-wrap { display: flex; align-items: center; gap: 18px; justify-content: center; flex-wrap: wrap; }
.legend { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.feed { display: flex; flex-direction: column; gap: 10px; }
.feed-item { display: flex; align-items: center; gap: 12px; }
.feed-item .avatar { width: 34px; height: 34px; font-size: 12px; background: var(--green-700); }
.feed-item .ft { flex: 1; min-width: 0; line-height: 1.3; }
.feed-item .ft small { color: var(--muted); display: block; font-size: 11.5px; }
.feed-item .tm { font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-day { color: var(--muted); font-size: 12.5px; margin: 6px 0; }
.cal-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.cal-item .bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--teal); }
.cal-item .bar.o { background: var(--orange); }
.cal-item .ct { font-size: 12.5px; line-height: 1.35; }
.cal-item .cd { font-size: 20px; font-weight: 600; min-width: 64px; }
.dev { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0ece2; }
.dev:last-child { border-bottom: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #bbb; flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(31, 157, 107, .18); }
.dot.off { background: var(--bad); }
.progress { height: 8px; background: var(--cream); border-radius: 8px; overflow: hidden; }
.progress > div { height: 100%; background: var(--teal); width: 0; transition: width .3s; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 7px 14px; border-radius: 10px; background: #fff; text-decoration: none; font-size: 13px; box-shadow: var(--shadow); }
.tabs a.on { background: var(--green-900); color: #fff; }
details.sect { border: 1.5px solid var(--line); border-radius: 12px; padding: 0 14px; margin-bottom: 10px; background: #fff; }
details.sect > summary { cursor: pointer; padding: 11px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
details.sect > summary::after { content: "+"; color: var(--muted); }
details.sect[open] > summary::after { content: "–"; }
details.sect > .form-grid { padding-bottom: 14px; }
.help-txt { font-size: 11.5px; color: var(--muted); }
code.k { background: var(--cream); padding: 1px 6px; border-radius: 6px; font-size: 12px; }

/* ---- login ---- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-art { background: var(--green-900); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art .brand { font-size: 46px; padding: 0; letter-spacing: 1px; }
.login-art h2 { font-size: 30px; line-height: 1.25; max-width: 420px; }
.login-art h2 em { color: var(--lime); font-style: normal; }
.login-form { display: grid; place-items: center; padding: 32px 16px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h3 { font-size: 22px; margin-bottom: 4px; }
.login-card .fld { margin-top: 14px; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 20px; padding: 12px; }

/* ---- small screens ---- */
@media (max-width: 1100px) {
  .dash { grid-template-columns: 1fr 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; }
  .nav-scrim { display: none; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 40; }
  .only-m { display: inline-grid; }
  .top { padding: 10px 16px; gap: 10px; }
  .top-search, .me-txt { display: none; }
  .me { border: 0; padding: 0; }
  .welcome { font-size: 16px; }
  .content { padding: 16px; }
  .dash, .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .dash .tall { grid-row: auto; }
  .form-grid .span2 { grid-column: auto; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { padding: 28px 16px; }
  .login-art h2 { font-size: 22px; }
  .login-art .brand { font-size: 30px; }
}

/* ---- print (reports) ---- */
@media print {
  .side, .top, .page-actions, .filters, .no-print, .foot, .nav-scrim { display: none !important; }
  body { background: #fff; font-size: 11px; }
  .content { padding: 0; }
  .card { box-shadow: none; padding: 0; border-radius: 0; }
  .tbl th { position: static; }
  .rpt-group { break-inside: avoid; }
  .rpt-page-break { break-after: page; }
}

/* ---- ETA3 classic desktop screens (lib/Classic.php) ---- */
.view-switch { display: flex; background: var(--green-800); border-radius: 9px; padding: 2px; }
.view-switch a { color: #cfe0d4; text-decoration: none; font-size: 12px; padding: 5px 10px; border-radius: 7px; white-space: nowrap; }
.view-switch a.on { background: var(--lime); color: var(--green-900); font-weight: 600; }
body.is-classic .page-head { display: none; }
.cl-screen { background: #f0f0f0; border: 1px solid #a0a0a0; box-shadow: 0 6px 22px rgba(0, 0, 0, .12); display: inline-block; max-width: 100%; }
.cl-titlebar { background: linear-gradient(#fff, #e9edf2); border-bottom: 1px solid #b9c2cc; font: 600 12px 'Segoe UI', Arial, sans-serif; padding: 6px 10px; display: flex; gap: 8px; align-items: center; }
.cl-new { margin-left: auto; font: 12px 'Segoe UI', Arial, sans-serif; padding: 2px 12px; border: 1px solid #adadad; background: #e1e1e1; border-radius: 2px; cursor: pointer; }
.cl-new:hover { background: #e5f1fb; border-color: #0078d7; }
.cl-wrap { overflow: hidden; }
.cl-form { position: relative; font: 11px Arial, sans-serif; color: #000; transform-origin: 0 0; }
.cl-form > * { position: absolute; box-sizing: border-box; margin: 0; }
.cl-frame { pointer-events: none; }
.cl-frame.cl-border { border: 1px solid #c8c8c8; }
.cl-legend { position: absolute; top: -8px; left: 8px; background: inherit; padding: 0 3px; font: 11px Arial, sans-serif; }
.cl-label { line-height: 1.25; white-space: normal; overflow: hidden; }
.cl-form input.cl-text, .cl-form input.cl-combo, .cl-form select.cl-combo { font: inherit; font-size: 11px; color: #000; background: #fff; border: 1px solid #7a7a7a; border-radius: 0; padding: 1px 3px; box-shadow: none; outline: none; width: auto; }
.cl-form input.cl-text:focus, .cl-form .cl-combo:focus { border-color: #0078d7; box-shadow: none; }
.cl-form input[readonly] { background: #f0f0f0; }
.cl-form select.cl-combo { padding: 0 1px; }
.cl-btn { font: 11px Arial, sans-serif; color: #000; background: #e1e1e1; border: 1px solid #adadad; border-radius: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 4px; line-height: 1.1; }
.cl-btn:hover:not(:disabled) { background: #e5f1fb; border-color: #0078d7; }
.cl-btn:active:not(:disabled) { background: #cce4f7; border-color: #005499; }
.cl-btn:disabled { color: #8d8d8d; cursor: default; }
.cl-btn.cl-graph { flex-direction: column; gap: 1px; }
.cl-btn.cl-icon { padding: 0; }
.cl-btn img { max-height: 70%; max-width: 90%; pointer-events: none; }
.cl-btn.cl-graph:not(.cl-icon) img { max-height: 18px; }
.cl-check { display: flex; align-items: center; gap: 4px; font: 11px Arial, sans-serif; }
.cl-pic { overflow: hidden; display: grid; place-items: center; }
.cl-pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cl-list { border: 1px solid #828790; background: #fff; overflow: auto; }
.cl-list table { border-collapse: collapse; table-layout: fixed; font: 11px Arial, sans-serif; }
.cl-list th { position: sticky; top: 0; background: #fff; font-weight: 400; text-align: left; padding: 3px 5px; border-right: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-list td { padding: 1px 5px; border-right: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 17px; cursor: default; }
.cl-list tr.sel td { background: #0078d7; color: #fff; }
.cl-list tbody tr:hover:not(.sel) td { background: #e5f3ff; }
.cl-msg { font: 12px 'Segoe UI', Arial, sans-serif; padding: 0 10px; min-height: 0; }
.cl-msg.show { padding: 7px 10px; border-top: 1px solid #c8c8c8; }
.cl-msg.err { background: #fde7e7; color: #a01d1d; }
.cl-msg.ok { background: #e3f6ea; color: #13663d; }
.cl-dialog { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .25); z-index: 60; align-items: center; justify-content: center; }
.cl-dialog.show { display: flex; }
.cl-dlg-box { background: #f0f0f0; border: 1px solid #888; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); padding: 0 14px 12px; width: 340px; font: 12px 'Segoe UI', Arial, sans-serif; }
.cl-dlg-title { margin: 0 -14px 10px; padding: 6px 10px; background: linear-gradient(#fff, #e9edf2); border-bottom: 1px solid #b9c2cc; font-weight: 600; }
.cl-dlg-box .fld { margin-bottom: 8px; }
/* VB6 draws labels (windowless) behind text boxes, combos and buttons: same here */
.cl-form > .cl-label, .cl-form > .cl-frame, .cl-form > .cl-pic { z-index: 0; }
.cl-form > input, .cl-form > select, .cl-form > button, .cl-form > .cl-list, .cl-form > .cl-check { z-index: 1; }
/* drop-down combo (type or pick) shows the arrow like a Windows combo box */
.cl-form input.cl-combo[list] { padding-right: 16px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='5'%3E%3Cpath d='M0 0h9L4.5 5z' fill='%23333'/%3E%3C/svg%3E") no-repeat right 4px center; }
.cl-form input.cl-combo[list]::-webkit-calendar-picker-indicator { opacity: 0; width: 14px; cursor: pointer; }
