:root {
  --bg: #030604;
  --bg-grid: rgba(111, 201, 132, 0.035);

  --panel: #09100b;
  --panel-soft: #0d1610;
  --panel-raised: #111c14;
  --panel-hover: #162219;

  --line: #25392a;
  --line-strong: #3b5e43;

  --green: #91f2aa;
  --green-bright: #b8ffc7;
  --green-dim: #6f9778;
  --green-dark: #16311d;

  --gold: #d1ad5c;
  --gold-soft: rgba(209, 173, 92, 0.15);

  --text: #eef8f0;
  --text-muted: #9aaa9e;
  --text-faint: #68786d;

  --danger: #ff8585;
  --danger-dark: #3b1515;
  --warning: #e4bd62;
  --success: #91f2aa;

  --shadow:
    0 18px 45px rgba(0, 0, 0, 0.45);

  --shadow-heavy:
    0 28px 90px rgba(0, 0, 0, 0.72);

  --radius-sm: 5px;
  --radius-md: 9px;
  --radius-lg: 14px;

  --sidebar-width: 270px;
  --topbar-height: 82px;

  --font-mono:
    Consolas,
    "Courier New",
    monospace;

  --font-display:
    Arial,
    Helvetica,
    sans-serif;
}


/* =========================================================
   BASE
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;

  background:
    radial-gradient(
      circle at 50% -10%,
      rgba(50, 125, 68, 0.12),
      transparent 40%
    ),
    linear-gradient(
      rgba(3, 6, 4, 0.97),
      rgba(3, 6, 4, 0.99)
    ),
    repeating-linear-gradient(
      90deg,
      var(--bg-grid) 0 1px,
      transparent 1px 54px
    ),
    repeating-linear-gradient(
      0deg,
      var(--bg-grid) 0 1px,
      transparent 1px 54px
    );

  color: var(--text);
  font-family: var(--font-mono);
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border-radius: var(--radius-sm);
}

input,
select,
textarea {
  border-radius: var(--radius-sm);
}

a {
  color: var(--green);
}

.hidden {
  display: none !important;
}

::selection {
  background: rgba(145, 242, 170, 0.22);
  color: var(--green-bright);
}


/* =========================================================
   GLOBAL TYPE
   ========================================================= */

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--text);
}

h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
}

h3 {
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.15;
}

h4 {
  font-size: 18px;
  line-height: 1.2;
}

p {
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 8px;

  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.subtitle,
.muted,
.module-description {
  color: var(--text-muted);
}

.module-description {
  max-width: 760px;
  margin: 10px 0 0;
}


/* =========================================================
   SCANLINE EFFECT
   ========================================================= */

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1000;

  pointer-events: none;

  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.018) 0 1px,
      transparent 1px 4px
    );

  mix-blend-mode: screen;
  opacity: 0.55;
}


/* =========================================================
   LOGIN
   ========================================================= */

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;

  padding: 28px;

  background:
    radial-gradient(
      circle at 50% 30%,
      rgba(49, 133, 71, 0.17),
      transparent 42%
    ),
    linear-gradient(
      rgba(2, 7, 4, 0.91),
      rgba(2, 7, 4, 0.97)
    ),
    repeating-linear-gradient(
      90deg,
      rgba(145, 242, 170, 0.04) 0 1px,
      transparent 1px 52px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(145, 242, 170, 0.04) 0 1px,
      transparent 1px 52px
    );
}

.login-shell {
  width: min(1080px, 100%);

  background:
    linear-gradient(
      145deg,
      rgba(12, 22, 15, 0.98),
      rgba(5, 10, 7, 0.98)
    );

  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);

  box-shadow:
    var(--shadow-heavy),
    inset 0 0 70px rgba(77, 145, 91, 0.045);

  overflow: hidden;
}

.system-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;

  padding: 12px 18px;

  background: rgba(0, 0, 0, 0.26);
  border-bottom: 1px solid var(--line);

  color: var(--green-dim);
  font-size: 11px;
  letter-spacing: 0.09em;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;

  margin-right: 8px;

  border-radius: 50%;

  background: var(--green);

  box-shadow:
    0 0 8px var(--green),
    0 0 18px rgba(145, 242, 170, 0.8);
}

.login-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  min-height: 590px;
}

.brand-panel,
.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 58px;
}

.brand-panel {
  align-items: center;
  text-align: center;

  border-right: 1px solid var(--line);

  background:
    radial-gradient(
      circle,
      rgba(84, 155, 98, 0.12),
      transparent 66%
    );
}

.logo {
  width: min(320px, 82%);
  max-height: 310px;

  object-fit: contain;

  filter:
    drop-shadow(0 0 24px rgba(145, 242, 170, 0.12));
}

.auth-panel {
  background:
    linear-gradient(
      180deg,
      rgba(17, 28, 20, 0.46),
      rgba(5, 10, 7, 0.2)
    );
}

.auth-panel label,
.admin-personnel-form label {
  display: block;

  margin: 18px 0 7px;

  color: var(--green-dim);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-panel input,
.admin-personnel-form input,
.admin-personnel-form select,
.admin-personnel-form textarea,
.personnel-toolbar input {
  width: 100%;

  padding: 13px 14px;

  background: #030604;
  color: var(--green-bright);

  border: 1px solid var(--line);

  outline: none;

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.auth-panel input:focus,
.admin-personnel-form input:focus,
.admin-personnel-form select:focus,
.admin-personnel-form textarea:focus,
.personnel-toolbar input:focus {
  border-color: var(--green);
  background: #050906;

  box-shadow:
    0 0 0 3px rgba(145, 242, 170, 0.08),
    0 0 24px rgba(145, 242, 170, 0.06);
}

.auth-panel button {
  width: 100%;
  margin-top: 18px;
  padding: 13px 15px;

  cursor: pointer;
}

#login-button {
  background:
    linear-gradient(
      180deg,
      var(--green-bright),
      var(--green)
    );

  color: #041007;

  border: 1px solid var(--green);

  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;

  box-shadow:
    0 10px 24px rgba(81, 183, 105, 0.18);
}

#login-button:hover:not(:disabled) {
  transform: translateY(-1px);

  box-shadow:
    0 14px 28px rgba(81, 183, 105, 0.28);
}

#login-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.secondary {
  background: transparent;
  color: var(--green);

  border: 1px solid var(--line);
}

.secondary:hover {
  background: var(--panel-raised);
  border-color: var(--green-dim);
}

.security-note {
  margin-top: 22px;

  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.5;
}


/* =========================================================
   STATUS MESSAGES
   ========================================================= */

.status {
  min-height: 24px;
  margin-top: 14px;

  color: var(--text-muted);
  font-size: 12px;
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--danger);
}

.status.warning {
  color: var(--warning);
}


/* =========================================================
   MAIN APP LAYOUT
   ========================================================= */

.dashboard {
  min-height: 100vh;

  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);

  background:
    linear-gradient(
      90deg,
      rgba(5, 8, 6, 0.96),
      rgba(3, 6, 4, 0.98)
    );
}

.sidebar {
  position: sticky;
  top: 0;

  height: 100vh;

  display: flex;
  flex-direction: column;

  background:
    linear-gradient(
      180deg,
      #0a100c,
      #060a07
    );

  border-right: 1px solid var(--line);

  box-shadow:
    10px 0 36px rgba(0, 0, 0, 0.28);

  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 13px;

  padding: 19px;

  border-bottom: 1px solid var(--line);

  background:
    radial-gradient(
      circle at 10% 20%,
      rgba(145, 242, 170, 0.08),
      transparent 58%
    );
}

.sidebar-logo {
  width: 54px;
  height: 54px;

  object-fit: contain;

  filter:
    drop-shadow(0 0 10px rgba(145, 242, 170, 0.12));
}

.sidebar-brand strong {
  display: block;

  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.07em;
}

.sidebar-brand span {
  display: block;
  margin-top: 4px;

  color: var(--green-dim);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar nav {
  flex: 1;

  padding: 18px 11px;
}

.nav-item {
  position: relative;

  width: 100%;

  padding: 12px 13px;
  margin: 3px 0;

  text-align: left;

  background: transparent;
  color: #a8b8ac;

  border: 1px solid transparent;

  cursor: pointer;

  transition:
    color 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.nav-item::before {
  content: "";

  position: absolute;
  left: -1px;
  top: 7px;
  bottom: 7px;

  width: 3px;

  background: transparent;

  border-radius: 2px;
}

.nav-item:hover {
  color: var(--green);

  background: rgba(17, 28, 20, 0.68);

  border-color: rgba(59, 94, 67, 0.6);

  transform: translateX(2px);
}

.nav-item.active {
  color: var(--green-bright);

  background:
    linear-gradient(
      90deg,
      rgba(42, 77, 49, 0.48),
      rgba(17, 28, 20, 0.74)
    );

  border-color: var(--line-strong);

  box-shadow:
    inset 0 0 22px rgba(145, 242, 170, 0.03);
}

.nav-item.active::before {
  background: var(--green);

  box-shadow:
    0 0 10px rgba(145, 242, 170, 0.55);
}

.logout {
  width: calc(100% - 28px);

  margin: 14px;
  padding: 11px;

  background: transparent;
  color: var(--danger);

  border: 1px solid rgba(255, 133, 133, 0.35);

  cursor: pointer;
}

.logout:hover {
  background: rgba(92, 24, 24, 0.28);
  border-color: var(--danger);
}

.workspace {
  min-width: 0;
}

.topbar {
  min-height: var(--topbar-height);

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;

  padding: 17px 26px;

  background:
    rgba(6, 11, 8, 0.92);

  border-bottom: 1px solid var(--line);

  backdrop-filter: blur(10px);
}

.operator {
  min-width: 190px;

  padding: 10px 14px;

  text-align: right;

  background:
    rgba(17, 28, 20, 0.7);

  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.operator span {
  display: block;

  color: var(--green-bright);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.operator small {
  display: block;
  margin-top: 3px;

  color: var(--green-dim);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.content {
  padding: 26px;

  animation:
    content-enter 0.24s ease both;
}

@keyframes content-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================================================
   PANELS / CARDS
   ========================================================= */

.welcome,
.card,
.module-panel,
.admin-card,
.dialog-card,
.migration-upload-panel,
.migration-warning {
  background:
    linear-gradient(
      145deg,
      rgba(14, 24, 17, 0.98),
      rgba(8, 15, 10, 0.98)
    );

  border: 1px solid var(--line);

  box-shadow:
    var(--shadow),
    inset 0 0 35px rgba(145, 242, 170, 0.018);
}

.welcome {
  position: relative;

  padding: 25px;

  border-radius: var(--radius-md);

  overflow: hidden;
}

.welcome::after {
  content: "";

  position: absolute;
  top: 0;
  right: 0;

  width: 160px;
  height: 100%;

  background:
    linear-gradient(
      135deg,
      transparent,
      rgba(145, 242, 170, 0.035)
    );

  pointer-events: none;
}

.card-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 15px;

  margin-top: 17px;
}

.card {
  position: relative;

  min-height: 110px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: 19px;

  border-radius: var(--radius-md);

  overflow: hidden;

  transition:
    transform 0.17s ease,
    border-color 0.17s ease,
    background 0.17s ease;
}

.card::before {
  content: "";

  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 2px;

  background:
    linear-gradient(
      90deg,
      var(--green-dim),
      transparent
    );
}

.card:hover {
  transform: translateY(-2px);

  border-color: var(--line-strong);

  background:
    linear-gradient(
      145deg,
      rgba(20, 33, 23, 0.99),
      rgba(10, 18, 12, 0.99)
    );
}

.card span {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.card strong {
  margin-top: 16px;

  color: var(--green-bright);
  font-family: var(--font-display);
  font-size: 26px;
}

.module-panel {
  padding: 24px;

  border-radius: var(--radius-md);

  animation:
    panel-enter 0.2s ease both;
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;

  padding-bottom: 20px;
  margin-bottom: 22px;

  border-bottom: 1px solid var(--line);
}

.module-header > div:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.module-empty-state {
  padding: 55px 24px;

  text-align: center;

  background:
    rgba(4, 8, 5, 0.52);

  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
}

.module-empty-state h3 {
  color: var(--green-bright);
}

.module-empty-state p {
  max-width: 650px;
  margin: 12px auto 0;

  color: var(--text-muted);
}


/* =========================================================
   ADMIN CARDS
   ========================================================= */

.admin-card-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 16px;
}

.admin-card {
  position: relative;

  min-height: 220px;

  display: flex;
  flex-direction: column;

  padding: 20px;

  border-radius: var(--radius-md);

  overflow: hidden;

  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.admin-card::after {
  content: "";

  position: absolute;
  right: -35px;
  bottom: -35px;

  width: 100px;
  height: 100px;

  border: 1px solid rgba(145, 242, 170, 0.04);
  border-radius: 50%;
}

.admin-card:hover {
  transform: translateY(-3px);

  border-color: var(--line-strong);

  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.36);
}

.admin-card h4 {
  margin-bottom: 8px;

  color: var(--green-bright);
}

.admin-card p:not(.eyebrow) {
  flex: 1;

  color: var(--text-muted);
  font-size: 13px;
}

.admin-card-disabled {
  opacity: 0.48;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.module-primary-button,
.personnel-action-button {
  border: 1px solid var(--line-strong);

  cursor: pointer;

  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.module-primary-button {
  padding: 11px 15px;

  background:
    linear-gradient(
      180deg,
      rgba(39, 74, 47, 0.96),
      rgba(24, 48, 30, 0.96)
    );

  color: var(--green-bright);

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.module-primary-button:hover:not(:disabled) {
  transform: translateY(-1px);

  background:
    linear-gradient(
      180deg,
      rgba(52, 96, 61, 0.99),
      rgba(29, 58, 36, 0.99)
    );

  border-color: var(--green-dim);
}

.module-primary-button:disabled,
.personnel-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.personnel-action-button {
  padding: 8px 10px;
  margin: 2px;

  background: rgba(17, 28, 20, 0.78);
  color: var(--green);

  font-size: 11px;
}

.personnel-action-button:hover:not(:disabled) {
  color: var(--green-bright);
  background: var(--panel-hover);
  border-color: var(--green-dim);
}


/* =========================================================
   TABLES
   ========================================================= */

.personnel-toolbar {
  display: grid;
  grid-template-columns:
    minmax(150px, auto)
    minmax(220px, 1fr)
    auto;

  align-items: center;
  gap: 12px;

  padding: 14px;

  margin-bottom: 15px;

  background:
    rgba(4, 8, 5, 0.68);

  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.personnel-toolbar label {
  color: var(--green-dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.personnel-toolbar span {
  color: var(--text-muted);
  font-size: 12px;
}

.personnel-table-wrapper {
  width: 100%;

  overflow-x: auto;

  border: 1px solid var(--line);
  border-radius: var(--radius-sm);

  background:
    rgba(4, 8, 5, 0.62);
}

.personnel-table {
  width: 100%;

  border-collapse: collapse;

  min-width: 760px;
}

.personnel-table thead {
  background:
    linear-gradient(
      180deg,
      rgba(24, 42, 29, 0.96),
      rgba(14, 25, 17, 0.96)
    );
}

.personnel-table th {
  position: sticky;
  top: 0;
  z-index: 2;

  padding: 13px 14px;

  text-align: left;

  color: var(--gold);

  border-bottom: 1px solid var(--line-strong);

  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.personnel-table td {
  padding: 13px 14px;

  color: #c9d6cc;

  border-bottom: 1px solid rgba(37, 57, 42, 0.7);

  font-size: 12px;
}

.personnel-table tbody tr {
  transition:
    background 0.14s ease;
}

.personnel-table tbody tr:hover {
  background:
    rgba(40, 69, 47, 0.22);
}

.personnel-table tbody tr:last-child td {
  border-bottom: 0;
}

.personnel-table strong {
  color: var(--green-bright);
}


/* =========================================================
   STATUS BADGES
   ========================================================= */

.personnel-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 5px 8px;

  border-radius: 999px;

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.personnel-status::before {
  content: "";

  width: 6px;
  height: 6px;

  border-radius: 50%;
}

.status-active {
  color: var(--green-bright);
  background: rgba(34, 89, 46, 0.3);
  border: 1px solid rgba(145, 242, 170, 0.25);
}

.status-active::before {
  background: var(--green);

  box-shadow:
    0 0 7px rgba(145, 242, 170, 0.7);
}

.status-inactive {
  color: #d4a4a4;
  background: rgba(92, 24, 24, 0.25);
  border: 1px solid rgba(255, 133, 133, 0.24);
}

.status-inactive::before {
  background: var(--danger);
}


/* =========================================================
   PERSONNEL PROFILE
   ========================================================= */

.personnel-profile-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 15px;
}


/* =========================================================
   FORMS
   ========================================================= */

.admin-personnel-form {
  max-width: 850px;

  display: grid;
  grid-template-columns:
    minmax(170px, 230px)
    minmax(0, 1fr);

  gap: 12px 18px;

  padding: 22px;

  background:
    rgba(4, 8, 5, 0.58);

  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.admin-personnel-form label {
  align-self: center;
  margin: 0;
}

.admin-personnel-form textarea {
  resize: vertical;
}

.admin-personnel-form .status,
.admin-personnel-form .module-description,
.admin-personnel-form button[type="submit"] {
  grid-column: 1 / -1;
}

.admin-personnel-form button[type="submit"] {
  justify-self: start;

  min-width: 220px;

  margin-top: 6px;
}


/* =========================================================
   MIGRATION WIZARD
   ========================================================= */

.migration-wizard {
  display: grid;
  gap: 17px;
}

.migration-warning {
  padding: 16px 18px;

  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);

  background:
    linear-gradient(
      90deg,
      var(--gold-soft),
      rgba(9, 16, 11, 0.92)
    );
}

.migration-warning strong {
  color: var(--gold);
}

.migration-warning p {
  margin: 7px 0 0;

  color: var(--text-muted);
  font-size: 12px;
}

.migration-upload-panel {
  padding: 20px;

  border-radius: var(--radius-md);
}

.migration-file-label {
  display: inline-block;

  margin-bottom: 10px;

  color: var(--green-bright);
  font-weight: 700;
}

#migration-file-input {
  display: block;

  width: 100%;

  padding: 12px;

  background: rgba(3, 6, 4, 0.8);
  color: var(--text-muted);

  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}

.migration-error-list,
.migration-warning-list {
  padding: 16px 18px;

  border-radius: var(--radius-sm);
}

.migration-error-list {
  background: rgba(74, 20, 20, 0.25);
  border: 1px solid rgba(255, 133, 133, 0.22);
}

.migration-warning-list {
  background: rgba(91, 72, 22, 0.2);
  border: 1px solid rgba(228, 189, 98, 0.25);
}

.migration-error-list h4 {
  color: var(--danger);
}

.migration-warning-list h4 {
  color: var(--warning);
}

.migration-error-list li,
.migration-warning-list li {
  margin: 6px 0;

  color: var(--text-muted);
  font-size: 12px;
}


/* =========================================================
   DIALOGS
   ========================================================= */

dialog {
  max-width: 520px;

  padding: 0;

  background: transparent;

  border: 0;
}

dialog::backdrop {
  background:
    rgba(0, 0, 0, 0.8);

  backdrop-filter: blur(4px);
}

.dialog-card {
  padding: 24px;

  color: var(--text);

  border-radius: var(--radius-md);
}

.dialog-card button {
  margin-top: 14px;
  padding: 10px 14px;

  background: var(--panel-raised);
  color: var(--green);

  border: 1px solid var(--line-strong);

  cursor: pointer;
}


/* =========================================================
   OPERATION WORKSPACE
   ========================================================= */

.operation-workspace {
  overflow: hidden;
}

.operation-workspace-header {
  align-items: center;
}

.operation-workspace-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.operation-workspace-summary {
  display: grid;
  grid-template-columns:
    repeat(5, minmax(0, 1fr));

  gap: 12px;

  margin-bottom: 18px;
}

.operation-workspace-summary-item {
  min-width: 0;

  padding: 14px 15px;

  background:
    linear-gradient(
      145deg,
      rgba(12, 21, 15, 0.96),
      rgba(6, 12, 8, 0.96)
    );

  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.operation-workspace-summary-item span {
  display: block;

  color: var(--text-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.operation-workspace-summary-item strong {
  display: block;

  margin-top: 8px;

  color: var(--green-bright);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.25;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-workspace-summary-item progress {
  width: 100%;
  height: 8px;

  margin-top: 9px;

  accent-color: var(--green);
}

.operation-workspace-tabs {
  position: sticky;
  top: 0;
  z-index: 12;

  display: flex;
  gap: 8px;

  padding: 10px;

  margin: 0 0 18px;

  overflow-x: auto;

  background:
    linear-gradient(
      180deg,
      rgba(5, 10, 7, 0.98),
      rgba(8, 15, 10, 0.98)
    );

  border: 1px solid var(--line);
  border-radius: var(--radius-md);

  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.28);
}

.operation-workspace-tab {
  min-width: 138px;

  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;

  padding: 10px 11px;

  background:
    rgba(13, 22, 16, 0.92);

  color: var(--text-muted);

  border: 1px solid var(--line);
  border-radius: var(--radius-sm);

  cursor: pointer;

  white-space: nowrap;

  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.operation-workspace-tab:hover:not(:disabled) {
  color: var(--green-bright);

  background:
    rgba(22, 34, 25, 0.98);

  border-color: var(--line-strong);

  transform: translateY(-1px);
}

.operation-workspace-tab-active {
  color: var(--green-bright);

  background:
    linear-gradient(
      180deg,
      rgba(38, 70, 45, 0.98),
      rgba(22, 43, 27, 0.98)
    );

  border-color: var(--green-dim);

  box-shadow:
    inset 0 0 18px rgba(145, 242, 170, 0.05),
    0 0 0 1px rgba(145, 242, 170, 0.06);
}

.operation-workspace-tab:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.operation-workspace-tab > span:first-child {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.operation-workspace-tab > strong {
  color: var(--gold);
  font-size: 11px;
}

.operation-workspace-tab .personnel-status {
  flex: 0 0 auto;

  padding: 3px 6px;

  font-size: 8px;
}

.operation-workspace-content {
  min-height: 420px;
}

.operation-overview-text-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 15px;

  margin-top: 18px;
}


/* =========================================================
   DARK TACTICAL FORM CONTROLS
   ========================================================= */

#operations-command-center input,
#operations-command-center select,
#operations-command-center textarea,
.operation-workspace input,
.operation-workspace select,
.operation-workspace textarea {
  width: 100%;

  padding: 12px 13px;

  background:
    linear-gradient(
      180deg,
      #060b07,
      #030604
    );

  color: var(--green-bright);
  caret-color: var(--green);

  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);

  outline: none;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.015),
    inset 0 0 18px rgba(0, 0, 0, 0.3);

  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

#operations-command-center input:hover:not(:disabled),
#operations-command-center select:hover:not(:disabled),
#operations-command-center textarea:hover:not(:disabled),
.operation-workspace input:hover:not(:disabled),
.operation-workspace select:hover:not(:disabled),
.operation-workspace textarea:hover:not(:disabled) {
  border-color: var(--green-dim);
}

#operations-command-center input:focus,
#operations-command-center select:focus,
#operations-command-center textarea:focus,
.operation-workspace input:focus,
.operation-workspace select:focus,
.operation-workspace textarea:focus {
  background:
    linear-gradient(
      180deg,
      #08100a,
      #040805
    );

  border-color: var(--green);

  box-shadow:
    0 0 0 3px rgba(145, 242, 170, 0.08),
    0 0 22px rgba(145, 242, 170, 0.05),
    inset 0 0 18px rgba(0, 0, 0, 0.32);
}

#operations-command-center input::placeholder,
#operations-command-center textarea::placeholder,
.operation-workspace input::placeholder,
.operation-workspace textarea::placeholder {
  color: #5e6e62;
}

#operations-command-center select,
.operation-workspace select {
  color-scheme: dark;
  background-color: #050906;
}

#operations-command-center select option,
.operation-workspace select option {
  background: #071009;
  color: var(--text);
}

#operations-command-center textarea,
.operation-workspace textarea {
  min-height: 110px;
  resize: vertical;
}

#operations-command-center input:disabled,
#operations-command-center select:disabled,
#operations-command-center textarea:disabled,
.operation-workspace input:disabled,
.operation-workspace select:disabled,
.operation-workspace textarea:disabled {
  cursor: not-allowed;

  color: var(--text-faint);

  background: #050806;

  border-color: rgba(37, 57, 42, 0.62);

  opacity: 0.58;
}

#operations-command-center label.card,
.operation-workspace label.card {
  min-height: auto;

  justify-content: flex-start;

  gap: 10px;
}

#operations-command-center label.card > span,
.operation-workspace label.card > span {
  color: var(--green-dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

#operations-command-center label.card:focus-within,
.operation-workspace label.card:focus-within {
  border-color: var(--green-dim);

  background:
    linear-gradient(
      145deg,
      rgba(18, 31, 21, 0.99),
      rgba(8, 15, 10, 0.99)
    );

  box-shadow:
    var(--shadow),
    inset 0 0 26px rgba(145, 242, 170, 0.025);
}


/* =========================================================
   SCROLLBARS
   ========================================================= */

* {
  scrollbar-width: thin;
  scrollbar-color:
    var(--line-strong)
    #050806;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: #050806;
}

*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 2px solid #050806;
  border-radius: 8px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--green-dim);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 235px;
  }

  .admin-card-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .card-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .personnel-profile-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .operation-workspace-summary {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .operation-overview-text-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}


@media (max-width: 860px) {
  .login-grid {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: 320px;

    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand-panel,
  .auth-panel {
    padding: 38px 30px;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;

    height: auto;

    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar nav {
    display: grid;
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 4px;
  }

  .logout {
    max-width: 250px;
  }

  .topbar {
    position: relative;

    align-items: flex-start;

    padding: 16px 18px;
  }

  .content {
    padding: 18px;
  }

  .module-header {
    flex-direction: column;
  }

  .module-header > div:last-child {
    justify-content: flex-start;
  }

  .admin-personnel-form {
    grid-template-columns: 1fr;
  }

  .admin-personnel-form .status,
  .admin-personnel-form .module-description,
  .admin-personnel-form button[type="submit"] {
    grid-column: auto;
  }

  .personnel-toolbar {
    grid-template-columns: 1fr;
  }

  .operation-workspace-header-actions {
    justify-content: flex-start;
  }

  .operation-workspace-summary {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .operation-overview-text-grid {
    grid-template-columns: 1fr;
  }

  .operation-workspace-tabs {
    position: relative;
    top: auto;
  }
}


@media (max-width: 620px) {
  .login-screen {
    padding: 0;
  }

  .login-shell {
    min-height: 100vh;

    border-radius: 0;
  }

  .system-bar {
    flex-direction: column;
  }

  .brand-panel {
    min-height: 270px;
  }

  .logo {
    max-height: 190px;
  }

  .sidebar nav {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }

  .operator {
    width: 100%;
    text-align: left;
  }

  .card-grid,
  .admin-card-grid,
  .personnel-profile-grid {
    grid-template-columns: 1fr;
  }

  .module-panel {
    padding: 17px;
  }

  .module-primary-button {
    width: 100%;
  }

  .module-header > div:last-child {
    width: 100%;
  }

  .module-header > div:last-child button {
    width: 100%;
  }

  .operation-workspace-summary {
    grid-template-columns: 1fr;
  }

  .operation-workspace-tab {
    min-width: 124px;
  }

  .operation-workspace-content {
    min-height: 320px;
  }
}