:root {
  --bg: #0b0c10;
  --panel: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.10);
  --text: #eaeaea;
  --muted: rgba(255,255,255,0.70);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,10,12,0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand { font-weight: 800; letter-spacing: .3px; }

.links a {
  color: var(--text);
  text-decoration: none;
  margin-left: 12px;
  opacity: .9;
}
.links a:hover { opacity: 1; text-decoration: underline; }

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 18px;
}

.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 18px;
  border-top: 1px solid var(--border);
}

h1 { margin-top: 0; }
h2 { margin: 0 0 12px 0; }

.err {
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 80, 80, 0.25);
  padding: 10px 12px;
  border-radius: 10px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin: 12px 0;
}

label { display:block; margin: 10px 0 6px; color: var(--muted); font-size: 13px; }
input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.35);
  color: var(--text);
  outline: none;
}

button {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor: pointer;
}
button:hover { background: rgba(255,255,255,0.10); }

a.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  margin-right: 8px;
}
a.btn:hover { background: rgba(255,255,255,0.10); }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

th, td {
  border-bottom: 1px solid var(--border);
  padding: 10px 10px;
  vertical-align: top;
  font-size: 14px;
}

th { text-align:left; color: var(--muted); background: rgba(255,255,255,0.03); }

.grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
}

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
}

/* Combo (searchable officer picker) */
.combo { position: relative; }
.combo-pop {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  display: none;
  background: rgba(10,10,12,0.98);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  z-index: 20;
}
.combo-pop.open { display: block; }
.combo-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 10px 12px;
  margin: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.combo-item:hover { background: rgba(255,255,255,0.06); }
.combo-empty { padding: 10px 12px; color: var(--muted); }
.hint { color: var(--muted); }


.entry-grid {
  grid-template-columns: 1fr 2fr;
  align-items: start;
}

@media (max-width: 900px) {
  .entry-grid {
    grid-template-columns: 1fr;
  }
}

/* Operations picker */
.ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

@media (max-width: 900px) {
  .ops-grid { grid-template-columns: 1fr; }
}

.op-card {
  display: block;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  text-decoration: none;
  color: var(--text);
}

.op-card:hover {
  background: rgba(255,255,255,0.06);
}

.op-title {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 6px;
}

.op-sub {
  opacity: .75;
}
.row { display: flex; }

.countdown{
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  display: inline-block;
}
/* Scroll container */
.table-scroll {
  max-height: 500px;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}

/* IMPORTANT: override your global table rule that breaks sticky */
.table-scroll table {
  width: 100%;
  border-collapse: separate !important; /* sticky works better */
  border-spacing: 0 !important;
  border: 0 !important;                /* border is on wrapper */
  border-radius: 0 !important;
  overflow: visible !important;        /* THIS is the big one */
  background: transparent !important;
}

/* Sticky header (apply to both thead and th for best compatibility) */
.table-scroll thead {
  position: sticky;
  top: 0;
  z-index: 3;
}

.table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(10,10,12,0.95); /* must be solid */
}
