:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #0b1220;
  --border: #243043;
  --text: #e2e8f0;
  --muted: #cbd5e1;
  --accent: #60a5fa;
  --accent-2: #3b82f6;
  --heading: #93c5fd;
  --shadow: rgba(0, 0, 0, 0.25);
  --topbar: rgba(15, 23, 42, 0.9);
  /* Dark Mode Defaults for Tables */
  --table-header-bg: #1e293b;
  --table-row-bg: #111827;
  --table-row-hover: #1e293b;
  --table-border: #374151;
  --table-text-muted: #94a3b8;
}
/* Light theme */
body.light-mode {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-2: #f1f5f9;
  --border: #d8e0ea;
  --text: #0f172a;
  --muted: #334155;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --heading: #0f172a;
  --shadow: rgba(15, 23, 42, 0.08);
  --topbar: rgba(248, 250, 252, 0.92);
  /* Light Mode Overrides for Tables */
  --table-header-bg: #f1f5f9;
  --table-row-bg: #ffffff;
  --table-row-hover: #f8fafc;
  --table-border: #e2e8f0;
  --table-text-muted: #64748b;
}
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}
body {
  overflow-x: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: var(--topbar);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.8rem 0.9rem;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 0.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  justify-self: center;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.2px;
  text-decoration: none;
  min-width: 0;
}
.brand:hover {
  text-decoration: none;
}
.brand-logo {
  display: block;
  border-radius: 10px;
}
.brand-text {
  display: inline;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-text-mobile {
  display: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Buttons */
.icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 12px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.icon-btn:hover {
  background: var(--panel-2);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  transform: translateY(-1px);
}
.icon-btn span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
/* theme icon */
.theme-toggle {
  font-size: 1.05rem;
  line-height: 1;
  color: var(--text);
}
.theme-icon {
  transform: translateY(-1px);
}
/* Layout */
/* Page Top 1-Line Title */
.top-line-title {
  margin-left: 5%;
  margin-right: 5%;
  text-align: center;
  font-family: Arial, Tahoma, Verdana, sans-serif;
  font-weight: 600;
  font-size: clamp(.4rem, .8vw + .8rem, 1.6rem);
  line-height: 1.4;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}
.page-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px var(--shadow);
}
/* Side-by-Side Card Layout */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.card-grid .page-card:first-child {
  grid-column: 1 / -1;
}
/* Side-by-Side Card Layout - 1st full width, 2nd and on side-by-side */
.single-col-card-grid {
    display: grid;
    /* This creates a 3-column layout that drops to 1 column on mobile */
    grid-template-rows: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.page-wrapper {
    width: 90%;
    margin: 0 auto; /* Centers the whole container */
}
/* Center an image in a card */
.img-wrapper {
    text-align: center; /* Centers the image */
    margin-bottom: 10px;
}
@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}
.column {
  display: flex;
  flex-direction: column;
  flex-basis: 100%;
  flex: 1;
}
.hdr1column,
.hdr2column {
  display: flex;
  align-items: center;
}
.hdr1column h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}
.hdr2column img {
  display: block;
  border-radius: 12px;
  background: var(--panel-2);
  padding: 6px;
}
p, li {
  color: var(--muted);
}
hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #334155, transparent);
  margin: 1.5rem 0;
  width: 90%;
}
.info-box {
  background: rgba(59, 130, 246, 0.08);
  border-left: 4px solid var(--accent-2);
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin: 1rem 0;
}
.link-list {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
/* Nav drawer */
.sidenav {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1200;
  top: 0;
  left: 0;
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  overflow-x: hidden;
  padding-top: 25px;
  transition: width 0.35s ease;
  border-right: 1px solid var(--border);
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.sidenav a {
  display: block;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 10px;
  margin: 0 12px 8px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.sidenav a:hover {
  color: var(--accent);
  background: rgba(96, 165, 250, 0.08);
  transform: translateX(4px);
}
.backbtn {
  display: block;
  width: auto;
  margin-left: auto;
  margin-right: 25px;
  padding: 0.3rem .3rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}
/* Overlay */
#navOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1150;
  pointer-events: none;
}
#navOverlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
/* Footer */
footer {
  margin-top: 2rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.95rem;
}
/* Responsive */
@media (max-width: 700px) {
  .container {
    padding: 1rem 0.75rem 2rem;
  }
  .page-card {
    padding: 1.25rem;
    border-radius: 14px;
  }
  .hdr1column h2 {
    font-size: 1.5rem;
  }
}

@media screen and (max-width: 600px) {
  .brand-text {
    display: none;
  }
  .brand-text-mobile {
    display: inline;
  }
}

@media (max-width: 420px) {
  .brand-text-mobile {
    font-size: 0.95rem;
  }
  .topbar-inner {
    grid-template-columns: 40px 1fr 40px;
    padding: 0.7rem 0.75rem;
  }
}

/* Table Color Scheme for Light and Dark Mode and Borders. */
table {
    width: 100%;
    /* border-collapse: collapse is essential to make borders meet seamlessly */
    border-collapse: collapse; 
    margin: 2rem 0;
    /* Outer border */
    border: 1px solid var(--table-border);
}
table th,
table td {
    /* This adds the border to every cell */
    border: 1px solid var(--table-border);
    padding: 1rem;
    vertical-align: middle;
}
table th {
    background-color: var(--table-header-bg);
    color: var(--table-text-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    font-weight: bold;
}
table td {
    background-color: var(--table-row-bg);
}
/* Optional: Subtle hover effect to make rows stand out */
table tr:hover td {
    background-color: var(--table-row-hover);
}

// Specific to the SDR table grid-auto-rows
.avail-sdr {
  background-color: lightgreen;
}

.busy-sdr {
  background-color: red;
}

.unavail-sdr {
  background-color: red;
}

/* Use to center text in TD */
.text-center {
    text-align: center;
}