/* Chief Command Portal — Glassmorphic Obsidian HUD Standard */

body {
  background:
    radial-gradient(ellipse 70% 340px at 50% 0%, rgba(239, 68, 68, 0.12), transparent 72%),
    #0A0D12;
  color: #ECEFF1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(198, 40, 40, 0.22);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.45);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.6px;
}

.chief-shell {
  width: 100%;
  max-width: 560px;
  margin: 28px auto 0;
  padding: 0 16px;
  flex: 1 0 auto;
}

.card {
  width: 100%;
  background: rgba(18, 22, 31, 0.94);
  backdrop-filter: blur(14px);
  border-radius: 20px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
}

.card-header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.title {
  font-family: var(--font-brand);
  font-size: 24px;
  font-weight: 400;
  color: #FFFFFF;
  letter-spacing: 0.4px;
  margin: 0 0 6px;
}

.card-subtitle {
  font-size: 13px;
  color: #94A3B8;
  line-height: 1.5;
  margin: 0;
}

.status-panel {
  background: rgba(12, 16, 24, 0.9);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.status-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.status-muted {
  color: #94A3B8;
  font-size: 13px;
}

.active-override {
  font-size: 13.5px;
  color: #FCA5A5;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.active-override:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.clear-btn {
  background: rgba(56, 189, 248, 0.12);
  color: #7DD3FC;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 6px 12px;
  min-height: 32px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.clear-btn:hover {
  background: rgba(56, 189, 248, 0.24);
  border-color: #38BDF8;
  color: #FFFFFF;
}

/* Department-Scoped Audit Log Section */
.audit-panel {
  display: none;
  background: rgba(12, 16, 24, 0.9);
  border-radius: 14px;
  padding: 16px;
  margin-top: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.audit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.audit-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: #CBD5E1;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.audit-loading {
  color: #94A3B8;
  font-size: 12px;
}

.btn-export-csv {
  background: rgba(56, 189, 248, 0.12);
  color: #7DD3FC;
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 6px 12px;
  min-height: 32px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-export-csv:hover {
  background: #0284C7;
  border-color: #38BDF8;
  color: #FFFFFF;
}

.audit-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 13px;
}

.audit-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.audit-sub {
  font-size: 11.5px;
  color: #94A3B8;
  margin-top: 2px;
}

.audit-tag-active {
  background: rgba(239, 68, 68, 0.18);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  margin-left: 6px;
}

.audit-tag-expired {
  background: rgba(148, 163, 184, 0.14);
  color: #94A3B8;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  margin-left: 6px;
}

.audit-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94A3B8;
  white-space: nowrap;
  margin-left: 10px;
}

.field {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #CBD5E1;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  margin-bottom: 6px;
}

select,
input {
  width: 100%;
  background: #0B101B;
  border: 1px solid #283548;
  border-radius: 12px;
  color: #F8FAFC;
  padding: 12px 14px;
  min-height: 46px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

select:focus,
input:focus {
  border-color: #38BDF8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.chief-badge {
  display: none;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.chief-badge.active {
  display: block;
}

.chief-name {
  font-size: 14px;
  font-weight: 800;
  color: #6EE7B7;
}

.chief-meta {
  font-size: 12px;
  color: #A7F3D0;
  margin-top: 2px;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.chip {
  background: rgba(255, 255, 255, 0.04);
  color: #CBD5E1;
  border: 1px solid rgba(148, 163, 184, 0.22);
  padding: 6px 11px;
  min-height: 32px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.chip:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.5);
  color: #FFFFFF;
}

.chip:active {
  transform: scale(0.97);
}

.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: #FFFFFF;
  border: 1px solid rgba(252, 165, 165, 0.3);
  border-radius: 12px;
  padding: 15px;
  min-height: 48px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.4px;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 8px 22px rgba(185, 28, 28, 0.35);
  transition: transform 0.12s, filter 0.15s, box-shadow 0.2s;
}

.btn-submit:hover {
  filter: brightness(1.08);
  box-shadow: 0 10px 26px rgba(220, 38, 38, 0.45);
}

.btn-submit:active {
  transform: scale(0.98);
}

.btn-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.msg {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  display: none;
}

.msg-success {
  background: rgba(16, 185, 129, 0.16);
  color: #6EE7B7;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.msg-error {
  background: rgba(239, 68, 68, 0.16);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.45);
}
