:root {
  --bg: #0f1216;
  --panel: #171b21;
  --panel-2: #1e242c;
  --line: #2a323c;
  --text: #e6e9ee;
  --muted: #8a94a2;
  --amber: #ffb000;        /* the old SQL*Plus glow */
  --amber-dim: #b97d10;
  --green: #3ddc84;
  --red: #ff5c5c;
  --blue: #4aa3ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- top bar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: linear-gradient(180deg, #12161b, #0f1216);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.brand .prompt {
  font-family: "Consolas", "Courier New", monospace;
  color: var(--amber);
  font-size: 22px;
  text-shadow: 0 0 8px rgba(255,176,0,.35);
}
.brand h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 3px;
  color: var(--amber);
  font-family: "Consolas", "Courier New", monospace;
}
.brand .sub { color: var(--muted); font-size: 12.5px; letter-spacing: .3px; }

/* ---- layout ---- */
main { flex: 1; padding: 24px 28px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .5px; }
.pill {
  background: #0f1216; border: 1px solid var(--line); color: var(--muted);
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  font-family: "Consolas", monospace;
}

/* ---- table ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left; padding: 10px 14px; color: var(--amber-dim);
  font-family: "Consolas", monospace; font-weight: 600; letter-spacing: .5px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
  position: sticky; top: 0; background: var(--panel-2);
}
tbody td {
  padding: 9px 14px; border-bottom: 1px solid #202832; white-space: nowrap;
}
tbody tr:hover { background: #1b222b; }
td.num, th.num { text-align: right; font-family: "Consolas", monospace; }
.empno { color: var(--amber); font-family: "Consolas", monospace; }
.dept-tag {
  font-size: 11.5px; color: var(--blue); border: 1px solid #274058;
  padding: 1px 7px; border-radius: 5px; background: #10202e;
}
td.actions, th.actions { text-align: right; }

/* ---- buttons ---- */
.btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 7px; cursor: pointer; font-size: 13px;
  transition: .12s;
}
.btn:hover { border-color: #3a4653; }
.btn-primary {
  background: var(--amber); color: #221a00; border-color: var(--amber);
  font-weight: 600;
}
.btn-primary:hover { background: #ffbf2e; }
.row-btn {
  background: transparent; border: 1px solid transparent; color: var(--muted);
  padding: 4px 9px; border-radius: 6px; cursor: pointer; font-size: 12.5px;
}
.row-btn.edit:hover { color: var(--blue); border-color: #274058; }
.row-btn.del:hover  { color: var(--red);  border-color: #5a2626; }
.icon-btn {
  background: none; border: none; color: var(--muted); font-size: 22px;
  cursor: pointer; line-height: 1;
}

/* ---- modal ---- */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  z-index: 50;
}
.modal.hidden { display: none; }
.modal-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  width: 100%; max-width: 560px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 16px; color: var(--amber); font-family: "Consolas", monospace; }
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 20px;
}
.form-grid label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 12px; color: var(--muted); font-family: "Consolas", monospace;
  letter-spacing: .5px;
}
.form-grid input, .form-grid select {
  background: #0f1216; border: 1px solid var(--line); color: var(--text);
  padding: 8px 10px; border-radius: 6px; font-size: 13.5px;
}
.form-grid input:focus, .form-grid select:focus {
  outline: none; border-color: var(--amber-dim);
}
.form-error {
  margin: 0 20px 8px; color: var(--red); font-size: 12.5px;
}
.form-error.hidden { display: none; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 20px; border-top: 1px solid var(--line);
}

/* ---- footer ---- */
.foot {
  padding: 14px 28px; color: var(--muted); font-size: 12px;
  border-top: 1px solid var(--line); text-align: center;
  font-family: "Consolas", monospace;
}

@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
}
