/* ============================================================================
   Pod Reservation System - Modern Professional Stylesheet
   ============================================================================ */

/* ─────────────────────────────────────────────────────────────────────────
   1. ROOT & BODY STYLES
   ───────────────────────────────────────────────────────────────────────── */

:root {
  --primary-color: #2b6cb0;
  --primary-hover: #1e4d7b;
  --secondary-color: #4a5568;
  --danger-color: #dc3545;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --light-bg: rgba(255, 255, 255, 0.95);
  --border-color: #e6e6e6;
  --text-primary: #000000;
  --text-secondary: #666666;
  --text-light: #999999;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

body {
  background-image: url("images/background.png");
  background-attachment: fixed;
  background-size: cover;
  background-color: #ffffff;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
}

/* ─────────────────────────────────────────────────────────────────────────
   2. LAYOUT CONTAINERS
   ───────────────────────────────────────────────────────────────────────── */

#container {
  width: 100%;
  margin: 0 auto;
  padding: 10px;
  min-height: 600px;
}

#content {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 200px;
  padding: 20px;
}

.page {
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.static-container {
  position: relative;
  width: 100%;
  max-width: 1600px;
  height: auto;
  min-height: 300px;
  margin: 20px auto;
  padding: 30px 20px;
  text-align: center;
  background-color: var(--light-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Wider container for Device Inventory table */
body.inventory-list .static-container {
  max-width: 1600px;
}

/* Poll/presentation sub-pages keep the centered page framing from static-container. */
body.poll-page .static-container {
  text-align: center;
}

/* Poll pages use Bootstrap-style utility classes; define a scoped subset here. */
body.poll-page .card {
  border: 1px solid #d9dee6;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

body.poll-page .card-header {
  padding: 10px 14px;
  border-bottom: 1px solid #e7ebf1;
}

body.poll-page .card-body {
  padding: 16px;
}

body.poll-page .d-flex { display: flex; }
body.poll-page .align-items-center { align-items: center; }
body.poll-page .align-items-end { align-items: flex-end; }
body.poll-page .justify-content-between { justify-content: space-between; }
body.poll-page .justify-content-end { justify-content: flex-end; }
body.poll-page .flex-wrap { flex-wrap: wrap; }
body.poll-page .flex-column { flex-direction: column; }
body.poll-page .me-auto { margin-right: auto; }
body.poll-page .mt-auto { margin-top: auto; }
body.poll-page .w-100 { width: 100%; }
body.poll-page .h-100 { height: 100%; }
body.poll-page .text-center { text-align: center !important; }

body.poll-page .gap-2 { gap: 0.5rem; }
body.poll-page .gap-3 { gap: 1rem; }
body.poll-page .gap-4 { gap: 1.5rem; }
body.poll-page .mb-0 { margin-bottom: 0; }
body.poll-page .mb-2 { margin-bottom: 0.5rem; }
body.poll-page .mb-3 { margin-bottom: 1rem; }
body.poll-page .mb-4 { margin-bottom: 1.5rem; }
body.poll-page .mt-2 { margin-top: 0.5rem; }
body.poll-page .mt-3 { margin-top: 1rem; }
body.poll-page .py-5 { padding-top: 3rem; padding-bottom: 3rem; }

body.poll-page .row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-left: -8px;
  margin-right: -8px;
}

body.poll-page .row > [class^="col-"] {
  padding-left: 8px;
  padding-right: 8px;
  margin-bottom: 10px;
}

body.poll-page .col-md-2 { width: 16.6667%; }
body.poll-page .col-md-4 { width: 33.3333%; }
body.poll-page .col-md-5 { width: 41.6667%; }

body.poll-page .form-label { margin-bottom: 6px; font-weight: 700; }
body.poll-page .text-muted { color: #6c757d; }
body.poll-page .small { font-size: 0.875rem; }
body.poll-page .form-check { display: inline-flex; align-items: center; gap: 0.45rem; }
body.poll-page .form-switch .form-check-input { width: 40px; }
body.poll-page .form-check-input { margin: 0; }

body.poll-page .btn-sm { padding: 6px 12px; font-size: 13px; }
body.poll-page .btn-outline-primary {
  background: #ffffff;
  color: #0d6efd;
  border: 1px solid #0d6efd;
}
body.poll-page .btn-outline-primary:hover {
  background: #0d6efd;
  color: #ffffff;
}
body.poll-page .btn-outline-secondary {
  background: #ffffff;
  color: #6c757d;
  border: 1px solid #6c757d;
}
body.poll-page .btn-outline-secondary:hover {
  background: #6c757d;
  color: #ffffff;
}
body.poll-page .btn-success {
  background: #198754;
  border: 1px solid #198754;
  color: #ffffff;
}

@media (max-width: 900px) {
  body.poll-page .col-md-2,
  body.poll-page .col-md-4,
  body.poll-page .col-md-5 {
    width: 100%;
  }
}

/* ─────────────────────────────────────────────────────────────────────────
   3. HEADER & LOGO
   ───────────────────────────────────────────────────────────────────────── */

#logo {
  width: 100%;
  max-width: 600px;
  height: 182px;
  margin: 0 auto;
  display: block;
  background-color: #ffffff;
  opacity: 0.95;
  border-radius: var(--radius-md);
}

#title {
  width: 100%;
  max-width: 900px;
  margin: 20px auto 0;
  padding: 0;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

#title h1 {
  font-size: 32px;
  font-weight: 900;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 2px;
  color: #8b0000;
  -webkit-text-stroke: 0.5px rgba(255,255,255,0.75);
  text-shadow:
    0 0 18px rgba(139,0,0,0.95),
    0 4px 10px rgba(0,0,0,1),
    3px 4px 20px rgba(0,0,0,1),
    -2px -2px 16px rgba(0,0,0,0.95),
    0 0 40px rgba(80,0,0,0.7);
  margin-bottom: 4px;
  line-height: 1.2;
}

#title h1 .title-remotelab {
  display: block;
  font-size: 96px;
  line-height: 1.0;
  letter-spacing: 4px;
  -webkit-text-stroke: 1px rgba(255,255,255,0.75);
}

@media (max-width: 650px) {
  #title h1 { font-size: 22px; }
  #title h1 .title-remotelab { font-size: 56px; }
}

hr {
  height: 100px;
  background-color: #ffffff;
  width: 50%;
  margin: auto;
  opacity: 0.8;
  border: none;
}

/* ─────────────────────────────────────────────────────────────────────────
   4. TYPOGRAPHY
   ───────────────────────────────────────────────────────────────────────── */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 16px 0;
  font-weight: 700;
  color: var(--text-primary);
}

h1 {
  font-size: 32px;
  text-align: center;
  margin-bottom: 8px;
}

h2 {
  font-size: 28px;
  text-align: center;
  margin: 0 0 4px 0;
}

h3 {
  font-size: 22px;
  text-align: center;
}

.text {
  width: 100%;
  max-width: 70%;
  margin: 0 auto 10px;
  padding-bottom: 10px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  font-family:
    Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", Monaco,
    "Courier New", "monospace";
  color: var(--text-primary);
}

.text-left {
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  padding: 10px;
  text-align: justify;
  font-size: 20px;
  font-weight: 400;
  font-family:
    Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", Monaco,
    "Courier New", "monospace";
  color: var(--text-primary);
  line-height: 1.8;
}

.subtext {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 8px;
}

.subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 15px;
}

.muted {
  color: var(--text-secondary);
  font-size: 14px;
}

.hint {
  color: var(--text-light);
  font-size: 13px;
  text-align: center;
  margin-top: 4px;
}

a {
  font-size: 16px;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.back {
  margin-top: -30px;
  margin-left: 5px;
  text-align: left;
  color: var(--danger-color);
  font-size: 18px;
  font-weight: 700;
  transition: font-size 0.2s ease;
}

.back:hover {
  font-size: 20px;
}

/* ─────────────────────────────────────────────────────────────────────────
   5. MESSAGES & ALERTS
   ───────────────────────────────────────────────────────────────────────── */

.messages {
  margin: 12px 0 18px;
  width: 100%;
}

.message {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  font-weight: 600;
  border: 1px solid transparent;
}

.message.error {
  color: #b00000;
  background-color: #fde8e8;
  border-color: #f5b5b5;
}

.message.success {
  color: #155724;
  background-color: #e9f7ef;
  border-color: #b7e2c7;
}

.message.warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeaa7;
}

.message.info {
  color: #004085;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

.alert {
  display: none;
  margin-top: 15px;
}

/* ─────────────────────────────────────────────────────────────────────────
   6. BUTTONS
   ───────────────────────────────────────────────────────────────────────── */

.btn,
button.btn,
input[type="button"].btn,
input[type="submit"].btn {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--primary-color);
  background-color: var(--primary-color);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  user-select: none;
  transition: all 0.2s ease;
  text-align: center;
}

.btn:hover,
button.btn:hover,
input[type="button"].btn:hover,
input[type="submit"].btn:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active,
button.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Button Variants */

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-primary-red,
.btn-primary-dark-red,
.btn-primary-blue,
.btn-primary-lite_blue,
.btn-primary-green,
.btn-primary-brown,
.btn-primary-grey,
.btn-primary-yellow,
.btn-primary-purple,
.btn-primary-teal,
.btn-primary-gold,
.btn-primary-silver,
.btn-primary-orange {
  padding: 10px 16px;
  border: 1px solid;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin: auto;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  display: inline-block;
  user-select: none;
  transition: all 0.2s ease;
}

.btn-primary,
.btn-primary-blue {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.btn-primary:hover,
.btn-primary-blue:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-secondary:hover {
  background-color: #5c636a;
  border-color: #565e64;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-danger,
.btn-primary-red {
  background-color: #dc3545;
  border-color: #dc3545;
}

.btn-danger:hover,
.btn-primary-red:hover {
  background-color: #bb2d3b;
  border-color: #b02a37;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary-green {
  background-color: #198754;
  border-color: #198754;
}

.btn-primary-green:hover {
  background-color: #157347;
  border-color: #146c43;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary-teal {
  background-color: #00897b;
  border-color: #00897b;
}

.btn-primary-teal:hover {
  background-color: #00695c;
  border-color: #005f52;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary-yellow {
  background-color: #ffc107;
  border-color: #ffc107;
  color: #000000;
}

.btn-primary-yellow:hover {
  background-color: #ffca2c;
  border-color: #ffc720;
  color: #000000;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary-orange {
  background-color: #fd7e14;
  border-color: #fd7e14;
}

.btn-primary-orange:hover {
  background-color: #e66a00;
  border-color: #dc6502;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary-dark-red {
  background-color: #a50000;
  border-color: #a50000;
}

.btn-primary-dark-red:hover {
  background-color: #8b0000;
  border-color: #7a0000;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary-purple {
  background-color: #6f42c1;
  border-color: #6f42c1;
}

.btn-primary-purple:hover {
  background-color: #5c35a3;
  border-color: #4e2d8a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary-gold {
  background-color: #ffd700;
  border-color: #ffd700;
  color: #000000;
}

.btn-primary-gold:hover {
  background-color: #e6c200;
  border-color: #ccac00;
  color: #000000;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary-silver {
  background-color: #c0c0c0;
  border-color: #c0c0c0;
  color: #000000;
}

.btn-primary-silver:hover {
  background-color: #a8a8a8;
  border-color: #969696;
  color: #000000;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary-brown {
  background-color: #8b4513;
  border-color: #8b4513;
}

.btn-primary-brown:hover {
  background-color: #6f3710;
  border-color: #5a2d0d;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary-grey {
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-primary-grey:hover {
  background-color: #5c636a;
  border-color: #565e64;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary-lite_blue {
  background-color: #87ceeb;
  border-color: #87ceeb;
  color: #000000;
}

.btn-primary-lite_blue:hover {
  background-color: #6bb6d9;
  border-color: #5aa8cc;
  color: #000000;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn.secondary,
.btn.gray {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn.secondary:hover,
.btn.gray:hover {
  background-color: #3a4553;
  border-color: #3a4553;
}

.btn.danger {
  background-color: var(--danger-color);
  border-color: var(--danger-color);
}

.btn.danger:hover {
  background-color: #bd2130;
  border-color: #bd2130;
}

.btn.success {
  background-color: var(--success-color);
  border-color: var(--success-color);
}

.btn.success:hover {
  background-color: #218838;
  border-color: #218838;
}

.btn.warning {
  background-color: var(--warning-color);
  border-color: var(--warning-color);
  color: var(--text-primary);
}

.btn.warning:hover {
  background-color: #e0a800;
  border-color: #e0a800;
}

.btn.small {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn.large {
  padding: 14px 20px;
  font-size: 16px;
}

/* Standardized button classes for consistency */
.btn-small,
button.btn-small {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  background-color: #6c757d;
  border-color: #6c757d;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

.btn-small:hover,
button.btn-small:hover {
  background-color: #5c636a;
  border-color: #565e64;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-apply-filter {
  background-color: #0d6efd !important;
  border-color: #0d6efd !important;
}

.btn-apply-filter:hover {
  background-color: #0b5ed7 !important;
  border-color: #0a58ca !important;
}

.btn-clear {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
}

.btn-clear:hover {
  background-color: #bb2d3b !important;
  border-color: #b02a37 !important;
}

.btn-logout {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
}

.btn-logout:hover {
  background-color: #bb2d3b !important;
  border-color: #b02a37 !important;
}

.btn-link {
  color: var(--primary-color);
  background-color: transparent;
  border: none;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 400;
  font-size: 16px;
}

.btn-link:hover {
  color: var(--primary-hover);
}

/* ─────────────────────────────────────────────────────────────────────────
   7. FORMS & INPUT CONTROLS
   ───────────────────────────────────────────────────────────────────────── */

.form-group {
  width: 100%;
  max-width: 600px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  margin: auto;
  font-size: 28px;
  font-weight: 400;
  font-family:
    Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", Monaco,
    "Courier New", "monospace";
  color: #000000;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background-color: #ffffff;
  height: 42px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

textarea {
  height: auto;
  min-height: 100px;
  resize: vertical;
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 14px;
}

/* ─────────────────────────────────────────────────────────────────────────
   8. TABLES
   ───────────────────────────────────────────────────────────────────────── */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--light-bg);
  box-shadow: var(--shadow-sm);
}

table.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

table.table th {
  background-color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  padding: 12px;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-primary);
}

table.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

table.table tbody tr:hover {
  background-color: rgba(43, 108, 176, 0.03);
}

table.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.5);
}

/* ─────────────────────────────────────────────────────────────────────────
   9. BADGES & BADGES
   ───────────────────────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-default {
  background-color: #e9ecef;
  color: var(--text-primary);
  border: 1px solid #dee2e6;
}

.badge-danger {
  background-color: #fde8e8;
  color: #b00000;
  border: 1px solid #f5b5b5;
}

.badge-success {
  background-color: #e9f7ef;
  color: #155724;
  border: 1px solid #b7e2c7;
}

.badge-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.pending-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fde8e8;
  border: 1px solid #f5b5b5;
  color: #b00000;
  font-weight: 800;
  font-size: 0.82em;
  letter-spacing: 0.4px;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85em;
  border: 1px solid #ddd;
  background: #f5f5f5;
  color: var(--text-primary);
}

.status-active {
  border-color: #b7e2c7;
  background: #e9f7ef;
  color: #155724;
}

.status-cancelled {
  border-color: #f5b5b5;
  background: #fde8e8;
  color: #b00000;
}

/* ─────────────────────────────────────────────────────────────────────────
   10. FILTER & ACTION BARS
   ───────────────────────────────────────────────────────────────────────── */

.filters {
  margin: 16px 0 20px;
  padding: 16px;
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.filters-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  align-items: flex-end;
}

.filters label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  text-align: left;
  font-size: 14px;
}

.actions-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 16px 0 20px;
  justify-content: center;
}

.actions-bar .btn {
  margin: 4px 0;
}

/* ─────────────────────────────────────────────────────────────────────────
   11. EDIT PANELS
   ───────────────────────────────────────────────────────────────────────── */

.edit-panel {
  margin-top: 24px;
  padding: 20px;
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.edit-title {
  font-weight: 700;
  font-size: 18px;
  margin: 0 0 16px 0;
  color: var(--text-primary);
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
  align-items: start;
}

.field {
  display: flex;
  flex-direction: column;
}

.field label {
  font-weight: 700;
  margin-bottom: 8px;
  text-align: left;
}

.field input,
.field select,
.field textarea {
  height: 42px;
}

.field textarea {
  height: auto;
  min-height: 100px;
}

.edit-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────────────────────────────────────
   12. PAGINATION
   ───────────────────────────────────────────────────────────────────────── */

.pager-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin: 16px 0 0;
  flex-wrap: wrap;
}

.pager-row .muted {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ─────────────────────────────────────────────────────────────────────────
   13. SPECIAL SECTIONS
   ───────────────────────────────────────────────────────────────────────── */

.pending-box {
  text-align: center;
  margin: 12px 0 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-md);
}

.pending-box .title {
  font-weight: 700;
  font-size: 18px;
  margin: 0;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.pending-box .title.has-pending {
  color: var(--danger-color);
  font-weight: 900;
}

.pending-box .muted {
  color: var(--text-light);
  font-size: 13px;
  display: none;
}

/* ─────────────────────────────────────────────────────────────────────────
   14. CONTAINER SECTIONS
   ───────────────────────────────────────────────────────────────────────── */

.registration-container,
.confirmation-container,
.admin-container,
.privacy-container,
.terms-container,
.tmux-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 30px 20px;
  background-color: var(--light-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.registration-container,
.confirmation-container,
.privacy-container,
.terms-container {
  max-width: 800px;
}

.conf-title {
  color: var(--primary-color);
  text-align: center;
  margin: 0 0 20px 0;
  font-size: 28px;
  font-weight: 700;
}

.section-title {
  color: var(--primary-color);
  font-size: 22px;
  font-weight: 700;
  margin: 20px 0 12px 0;
}

.section {
  color: var(--text-primary);
  padding: 0;
  font-size: 15px;
  line-height: 1.8;
  text-align: justify;
}

.res-details {
  color: var(--text-primary);
  margin-left: 25px;
  padding: 8px 0;
  font-size: 16px;
}

.list-group {
  margin-top: 15px;
  list-style: none;
  padding: 0;
}

.list-group-item {
  font-size: 16px;
  padding: 8px 0;
  text-align: left;
  color: var(--text-primary);
}

/* ─────────────────────────────────────────────────────────────────────────
   15. TMUX & COUNTDOWN
   ───────────────────────────────────────────────────────────────────────── */

.tmux-header {
  text-align: center;
  position: relative;
  color: var(--primary-color);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
}

.countdown-timer {
  font-size: 48px;
  font-weight: 900;
  color: var(--danger-color);
  text-align: center;
  margin: 20px 0;
  font-family: "Courier New", monospace;
}

#pod-management {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

#scroll-container {
  width: 100%;
  max-width: 800px;
  height: 35px;
  margin: 10px auto;
  padding: 0px;
  border: 0px;
  border-radius: var(--radius-md);
  background-color: #ffffff;
  opacity: 0.95;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
  top: 10px;
  display: block;
}

#scroll-text {
  display: inline-block;
  width: max-content;
  white-space: nowrap;
  padding: 0px;
  font-size: 24px;
  font-weight: 300;
  color: var(--danger-color);
  margin: auto;
  font-family:
    Rubicon, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", Monaco,
    "Courier New", "monospace";
  -moz-animation: scroll-animation 24s linear infinite;
  -webkit-animation: scroll-animation 24s linear infinite;
  animation: scroll-animation 24s linear infinite;
}

@keyframes scroll-animation {
  from { transform: translateX(820px); }
  to   { transform: translateX(-100%); }
}

/* ─────────────────────────────────────────────────────────────────────────
   16. RESPONSIVE DESIGN
   ───────────────────────────────────────────────────────────────────────── */

@media (max-width: 1200px) {
  .filters-row {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .edit-grid {
    grid-template-columns: 1fr 1fr;
  }

  table.table {
    min-width: 900px;
  }
}

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

  .edit-grid {
    grid-template-columns: 1fr;
  }

  .actions-bar {
    flex-direction: column;
    width: 100%;
  }

  .actions-bar .btn {
    width: 100%;
  }

  table.table {
    font-size: 13px;
  }

  table.table th,
  table.table td {
    padding: 8px;
  }

  .pager-row {
    justify-content: center;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 22px;
  }

  .page {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .static-container,
  .registration-container,
  .confirmation-container,
  .admin-container,
  .privacy-container,
  .terms-container,
  .tmux-container {
    padding: 15px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .filters {
    padding: 12px;
  }
}

#footer-text {
  width: 70%;
  margin: auto;
  text-align: center;
  position: relative;
  top: -10px;
  vertical-align: text-bottom;
  color: #ffffff;
  font-size: 24px;
  font-weight: 400;
  font-family:
    Orbitron, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", Monaco,
    "Courier New", "monospace";
}

/* ============================================================================
   PAGE-SPECIFIC STYLES (Extracted from inline <style> blocks)
   ============================================================================ */

/* ─────────────────────────────────────────────────────────────────────────
   DASHBOARD PAGES (admin.htm, super_admin.htm, teacher.htm)
   ───────────────────────────────────────────────────────────────────────── */

.dash-wrap {
  margin-top: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
  align-items: stretch;
}

.teacher.htm .stats-grid {
  grid-template-columns: repeat(3, minmax(200px, 1fr));
}

.stat-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.admin.htm .stat-card,
.teacher.htm .stat-card {
  width: 275px;
}

.stat-title {
  font-size: 0.95em;
  color: #555;
  margin-bottom: 6px;
  font-weight: 600;
}

.stat-value {
  font-size: 2em;
  font-weight: 800;
  line-height: 1.1;
}

.stat-sub {
  margin-top: 6px;
  color: #666;
  font-size: 0.9em;
}

.pending {
  color: red;
  font-weight: bold;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

/* ─────────────────────────────────────────────────────────────────────────
   TEACHING MATERIALS — CARD GRIDS (global, centered)
   ───────────────────────────────────────────────────────────────────────── */

/* Built-in resource cards (e.g. Subnetting workbooks / curriculum guide) */
.sn-builtin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  justify-content: center;
  gap: 18px;
  margin-bottom: 24px;
}
.sn-builtin-card {
  border-radius: 12px;
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 14px rgba(0,0,0,.08);
}
.sn-builtin-card.sn-blue   { background:#f0f9ff; border:2px solid #3b82f6; }
.sn-builtin-card.sn-green  { background:#f0fdf4; border:2px solid #16a34a; }
.sn-builtin-card.sn-purple { background:#f5f3ff; border:2px solid #7c3aed; }
.sn-builtin-icon { font-size:30px; margin-bottom:8px; }
.sn-builtin-card h3 { font-size:16px; font-weight:700; margin:0 0 6px; }
.sn-builtin-card.sn-blue h3   { color:#1e3a8a; }
.sn-builtin-card.sn-green h3  { color:#166534; }
.sn-builtin-card.sn-purple h3 { color:#4c1d95; }
.sn-builtin-card p { font-size:13px; color:#374151; line-height:1.55; flex:1; margin:0 0 14px; }
.sn-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: filter .15s;
  white-space: nowrap;
  color: #fff;
}
.sn-btn:hover { filter:brightness(.9); color:#fff; }

/* File cards (main course folder listings) */
.fc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
}
.fc-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  transition: box-shadow .15s;
}
.fc-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.fc-icon { font-size:26px; line-height:1; }
.fc-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  word-break: break-word;
}
.fc-meta { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.fc-notes {
  font-size: 12px;
  color: #9ca3af;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fc-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.fc-download {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: #2563eb;
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: filter .15s;
  white-space: nowrap;
}
.fc-download:hover { filter:brightness(.9); color:#fff; }

.bar {
  height: 8px;
  border-radius: 999px;
  background: #eee;
  margin-top: 10px;
  overflow: hidden;
}

.bar > div {
  height: 100%;
  background: #2b6cb0;
  width: var(--w, 50%);
}

/* ─────────────────────────────────────────────────────────────────────────
   GENERATE REPORTS PAGE
   ───────────────────────────────────────────────────────────────────────── */

.report-page,
.report-page * {
  font-family: Arial, sans-serif;
}

.report-title {
  font-weight: 700;
  font-size: 20pt;
  margin: 0 0 10px 0;
}

.ai-agent-container {
  margin: 15px 0;
  padding: 20px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  background: #f9f9f9;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-style: italic;
}

.ai-agent-container:empty::before {
  content: "AI Agent Dialog Placeholder";
}

.report-body {
  font-size: 14pt;
  padding-left: 4px;
}

.report-intro {
  font-size: 16pt;
}

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 12px;
}

.cards .card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.cards .card form {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.cards .card .report-buttons {
  margin-top: 20px;
  padding-top: 12px;
  display: flex;
  gap: 12px;
}

.btn-compact {
  display: inline-block;
  padding: 8px 16px;
  font-size: 11pt;
  min-width: 80px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 8px;
  flex-wrap: nowrap;
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #f6f6f6;
  font-size: 12pt;
}

.range-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
  align-items: end;
}

@media (max-width: 1050px) {
  .cards {
    grid-template-columns: 1fr;
  }
  .row {
    grid-template-columns: 1fr;
  }
  .range-grid {
    grid-template-columns: 1fr;
  }
}

/* ─────────────────────────────────────────────────────────────────────────
   MANAGE RESERVATIONS PAGE
   ───────────────────────────────────────────────────────────────────────── */

.manage-reservations #container,
.manage-reservations .static-container {
  width: 100%;
  max-width: none;
  margin: 0;
}

.messages {
  margin: 12px 0 18px;
}

.message {
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.message.error {
  color: red;
  font-weight: bold;
  background: #fde8e8;
  border: 1px solid #f5b5b5;
}

.message.success {
  color: #155724;
  font-weight: bold;
  background: #e9f7ef;
  border: 1px solid #b7e2c7;
}

.filters {
  margin: 10px 0 16px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.filters .grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.filters label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

/* ─────────────────────────────────────────────────────────────────────────
   MANAGE SCHOOLS PAGE
   ───────────────────────────────────────────────────────────────────────── */

.manage-schools #container,
body.manage-schools .static-container {
  min-height: 0;
  padding: 20px;
  padding-bottom: 60px;
}

body.manage-schools #footer-text {
  margin-top: 40px;
  position: relative;
  top: 0;
}

.manage-users .static-container {
  min-height: 0;
  padding-bottom: 20px;
}

.manage-users #footer-text {
  margin-top: 20px;
}

.page-card {
  width: min(1200px, 96vw);
  margin: 16px auto;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 16px 18px;
  box-sizing: border-box;
}

/* ─────────────────────────────────────────────────────────────────────────
   MANAGE USERS PAGE
   ───────────────────────────────────────────────────────────────────────── */

.manage-users html,
.manage-users body {
  height: 100%;
}

.manage-users #container,
.manage-users .static-container {
  width: 100%;
  max-width: none;
  margin: 0;
}

.manage-users .page {
  width: 100%;
  padding: 18px 18px 28px;
  box-sizing: border-box;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 10px;
  font-size: 16px;
}

.pending-box {
  text-align: center;
  margin: 20px 0 20px;
  color: #111;
}

.pending-box .title {
  font-weight: 900;
  font-size: 18px;
}

.pending-box .title.has-pending {
  color: #d9534f;
  font-size: 20px;
}

.pending-box .muted {
  color: #666;
  font-size: 0.95em;
  display: none;
}

/* ─────────────────────────────────────────────────────────────────────────
   PROFILE PAGE
   ───────────────────────────────────────────────────────────────────────── */

.danger-box {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid #f5b5b5;
  background: #fde8e8;
  border-radius: 8px;
}

/* ─────────────────────────────────────────────────────────────────────────
   REGISTRATION PAGE
   ───────────────────────────────────────────────────────────────────────── */

.registration .page {
  width: 100%;
  padding: 18px;
  box-sizing: border-box;
}

.registration .card {
  width: min(820px, 96vw);
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-sizing: border-box;
}

.registration .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ─────────────────────────────────────────────────────────────────────────
   TEACHER RESERVATIONS REPORT PAGE
   ───────────────────────────────────────────────────────────────────────── */

.wrap {
  margin-top: 10px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

.nowrap {
  white-space: nowrap;
}

.teacher-report .filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(160px, 1fr));
  gap: 10px;
  align-items: end;
}

.teacher-report .filters label {
  display: block;
  font-size: 0.9em;
  color: #444;
  margin-bottom: 4px;
  font-weight: 700;
}

.teacher-report .filters input,
.teacher-report .filters select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.teacher-report .btn {
  display: inline-block;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #bbb;
  background: #efefef;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}

.teacher-report .btn-primary {
  border: 1px solid #2f6feb;
  background: #eef4ff;
}

.table-wrap {
  overflow-x: auto;
}

/* School form styling */
.school-form-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* Two-column form layout */
.two-column-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field label {
  margin-bottom: 4px;
  font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────────────────
   AI AGENT CHAT INTERFACE
   ───────────────────────────────────────────────────────────────────────── */

.ai-agent-chat {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  max-height: 500px;
  margin: 20px auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ai-chat-header {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 8px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.ai-chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 18px;
}

.ai-icon {
  font-size: 24px;
}

.ai-chat-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 14px;
}

.ai-clear-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin-left: 8px;
  transition: all 0.2s ease;
}

.ai-clear-btn:hover {
  background: rgba(220, 53, 69, 0.2);
  border-color: #dc3545;
  transform: scale(1.1);
}

.ai-clear-btn:active {
  transform: scale(0.95);
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #28a745;
  animation: pulse 2s infinite;
}

.status-indicator.status-online {
  background: #28a745;
}

.status-indicator.status-recording {
  background: #ff6b6b;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.status-indicator.status-loading {
  background: #ffc107;
}

.status-indicator.status-offline {
  background: #dc3545;
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.ai-chat-messages {
  background: white;
  min-height: 80px;
  max-height: 400px;
  overflow-y: auto;
  padding: 8px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.ai-message {
  padding: 6px 10px;
  border-radius: var(--radius-md);
  max-width: 85%;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-message-user {
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
  align-self: flex-end;
}

.ai-message-assistant {
  background: #f3e5f5;
  border-left: 4px solid #9c27b0;
  align-self: flex-start;
}

.ai-message-system {
  background: #fff3e0;
  border-left: 4px solid #ff9800;
  align-self: center;
  max-width: 95%;
}

.ai-message-error {
  background: #ffebee;
  border-left: 4px solid #f44336;
  align-self: flex-start;
}

.message-content {
  font-size: 14px;
  line-height: 1.6;
}

.message-content strong {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.message-content ul {
  margin: 8px 0;
  padding-left: 20px;
}

.message-content li {
  margin: 4px 0;
}

/* Download buttons in AI chat */
.ai-download-btn {
  display: inline-block;
  margin: 10px 5px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ai-download-pdf {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
}

.ai-download-pdf:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(231, 76, 60, 0.4);
}

.ai-download-csv {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  color: white;
}

.ai-download-csv:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(39, 174, 96, 0.4);
}

.typing-indicator {
  display: flex;
  gap: 6px;
  padding: 8px 0;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9c27b0;
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

.ai-chat-input-container {
  background: white;
  padding: 8px 20px;
  border-top: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.ai-quick-questions {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.quick-question-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.quick-question-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.ai-input-wrapper {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.ai-dictate-btn {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 20px;
  min-width: 50px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-dictate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(245, 87, 108, 0.4);
}

.ai-dictate-btn.recording {
  background: linear-gradient(135deg, #ff6b6b 0%, #c92a2a 100%);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
  }
}

.ai-chat-input {
  flex: 1;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  transition: border-color 0.2s;
  min-height: 44px;
  max-height: 120px;
}

.ai-chat-input:focus {
  outline: none;
  border-color: #667eea;
}

.ai-send-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 18px;
  min-width: 50px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.ai-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Topology download button */
.download-topology-btn {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  margin: 10px 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.download-topology-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(39, 174, 96, 0.4);
}

.topology-pod1-btn,
.topology-pod2-btn {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
}

.topology-pod1-btn:hover,
.topology-pod2-btn:hover {
  background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
  box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

.download-topology-btn:active {
  transform: none;
}

.ai-send-btn-prominent {
  min-width: 80px;
  font-weight: bold;
  font-size: 16px;
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.ai-send-btn-prominent:hover {
  box-shadow: 0 8px 16px rgba(102, 126, 234, 0.5);
}

/* AI Reservation Form Modal */
.ai-reservation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.ai-reservation-form {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
}

.ai-reservation-form h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #2d3748;
  font-size: 24px;
  text-align: center;
}

.ai-reservation-form label {
  display: block;
  margin-bottom: 8px;
  color: #4a5568;
  font-weight: 600;
  font-size: 14px;
}

.res-input {
  width: 100%;
  padding: 12px;
  margin-bottom: 18px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.res-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.res-btn {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.res-btn button {
  flex: 1;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.res-btn-submit {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.res-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.res-btn-cancel {
  background: #cbd5e0;
  color: #2d3748;
}

.res-btn-cancel:hover {
  background: #a0aec0;
}

/* Responsive design for AI chat */
@media (max-width: 768px) {
  .ai-chat-messages {
    height: 300px;
  }
  
  .ai-message {
    max-width: 90%;
  }
  
  .quick-question-btn {
    font-size: 11px;
    padding: 5px 10px;
  }
}


/* ─────────────────────────────────────────────────────────────────────────
   GLOBAL UTILITY CLASSES
   Provides Bootstrap-compatible utility classes for templates that use them
   without loading Bootstrap CDN. Scoped to avoid conflicts with custom rules.
   ───────────────────────────────────────────────────────────────────────── */

/* Display */
.d-flex        { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-inline      { display: inline; }
.d-block       { display: block; }
.d-grid        { display: grid; }
.d-none        { display: none; }

/* Flex helpers */
.flex-wrap     { flex-wrap: wrap; }
.flex-column   { flex-direction: column; }
.flex-nowrap   { flex-wrap: nowrap; }

/* Align / justify */
.align-items-center  { align-items: center; }
.align-items-start   { align-items: flex-start; }
.align-items-end     { align-items: flex-end; }
.justify-content-center  { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-end     { justify-content: flex-end; }
.justify-content-start   { justify-content: flex-start; }

/* Auto margins */
.me-auto { margin-right: auto; }
.ms-auto { margin-left: auto; }
.me-1    { margin-right: 0.25rem; }
.me-2    { margin-right: 0.5rem; }
.me-3    { margin-right: 1rem; }
.ms-1    { margin-left: 0.25rem; }
.ms-2    { margin-left: 0.5rem; }

/* Gap */
.gap-1  { gap: 0.25rem; }
.gap-2  { gap: 0.5rem; }
.gap-3  { gap: 1rem; }
.gap-4  { gap: 1.5rem; }
.gap-5  { gap: 3rem; }

/* Margin-bottom */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

/* Margin-top */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

/* Padding */
.p-3  { padding: 1rem; }
.p-4  { padding: 1.5rem; }
.py-3 { padding-top: 1rem;   padding-bottom: 1rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 3rem;   padding-bottom: 3rem; }
.px-3 { padding-left: 1rem;  padding-right: 1rem; }

/* Width / height */
.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* Typography */
.fw-bold     { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.fw-normal   { font-weight: 400; }
.text-muted  { color: #6c757d; }
.text-white  { color: #ffffff; }
.text-end    { text-align: right; }
.text-danger { color: #dc3545; }
.text-success { color: #198754; }
.small       { font-size: 0.875rem; }
.fs-5        { font-size: 1.25rem; }
.fs-6        { font-size: 1rem; }

/* Shadow */
.shadow-sm { box-shadow: 0 1px 4px rgba(0,0,0,0.1); }

/* Alert — override the hidden default so Django messages show */
.alert {
  display: block;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}
.alert-info    { background: #d1ecf1; color: #0c5460; border-color: #bee5eb; }
.alert-success { background: #d4edda; color: #155724; border-color: #c3e6cb; }
.alert-warning { background: #fff3cd; color: #856404; border-color: #ffeeba; }
.alert-danger  { background: #f8d7da; color: #721c24; border-color: #f5c6cb; }

/* form-text helper */
.form-text { display: block; font-size: 0.8rem; color: #6c757d; margin-top: 4px; }

/* Card — global base (Bootstrap pages override with their own full implementation) */
.card {
  border: 1px solid #d9dee6;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  margin-bottom: 1rem;
}
.card-header {
  padding: 10px 16px;
  border-bottom: 1px solid #e7ebf1;
  border-radius: 10px 10px 0 0;
  background: #f8f9fa;
}
.card-body {
  padding: 16px;
}
.card-footer {
  padding: 10px 16px;
  border-top: 1px solid #e7ebf1;
  border-radius: 0 0 10px 10px;
  background: #f8f9fa;
}

/* btn-sm global */
.btn-sm { padding: 5px 12px !important; font-size: 13px !important; }

/* Outline button variants */
.btn-outline-primary  { background:#fff; color:#0d6efd; border:1px solid #0d6efd; }
.btn-outline-primary:hover  { background:#0d6efd; color:#fff; }
.btn-outline-secondary { background:#fff; color:#6c757d; border:1px solid #6c757d; }
.btn-outline-secondary:hover { background:#6c757d; color:#fff; }
.btn-outline-danger   { background:#fff; color:#dc3545; border:1px solid #dc3545; }
.btn-outline-danger:hover   { background:#dc3545; color:#fff; }
.btn-outline-success  { background:#fff; color:#198754; border:1px solid #198754; }
.btn-outline-success:hover  { background:#198754; color:#fff; }
.btn-outline-info     { background:#fff; color:#0dcaf0; border:1px solid #0dcaf0; }

/* Badge base */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: #6c757d;
}
.bg-success  { background-color: #198754 !important; color:#fff; }
.bg-danger   { background-color: #dc3545 !important; color:#fff; }
.bg-warning  { background-color: #ffc107 !important; color:#212529; }
.bg-info     { background-color: #0dcaf0 !important; color:#212529; }
.bg-primary  { background-color: #0d6efd !important; color:#fff; }
.bg-secondary{ background-color: #6c757d !important; color:#fff; }
.bg-dark     { background-color: #212529 !important; color:#fff; }
.bg-light    { background-color: #f8f9fa !important; color:#212529; }
.text-dark   { color: #212529; }

/* Table utilities */
.table     { width: 100%; border-collapse: collapse; }
.table th,
.table td  { padding: 8px 12px; border-bottom: 1px solid #dee2e6; text-align: left; }
.table th  { background: #f8f9fa; font-weight: 700; }
.table-hover tbody tr:hover { background: #f5f5f5; }
.table-light { background: #f8f9fa; }
.table-sm th, .table-sm td { padding: 5px 8px; }

/* Container helpers */
.container-fluid { width: 100%; padding-left: 1rem; padding-right: 1rem; }
.mt-auto { margin-top: auto; }
.text-nowrap { white-space: nowrap; }

/* ─── GLOBAL MISSING UTILITIES ─────────────────────────────────────────────── */

/* form-select (Bootstrap class on <select>) */
.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text-primary, #1a202c);
  height: 42px;
}
.form-select:focus { outline: none; border-color: var(--primary-color, #2b6cb0); box-shadow: 0 0 0 3px rgba(43,108,176,0.1); }

/* form-label */
.form-label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 14px; }

/* form-check */
.form-check { display: flex; align-items: center; gap: 0.45rem; }
.form-check-input { margin: 0; width: 16px; height: 16px; cursor: pointer; }
.form-check-label { cursor: pointer; font-size: 14px; }

/* input-group */
.input-group { display: flex; align-items: stretch; }
.input-group .form-control { flex: 1 1 auto; min-width: 0; border-radius: 6px 0 0 6px; }
.input-group .btn { border-radius: 0 6px 6px 0; }
.input-group-text { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--border-color, #d1d5db); background: #f8f9fa; font-size: 14px; }

/* Spinner (Bootstrap-like) */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 0.25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  vertical-align: text-bottom;
}
.spinner-border-sm { width: 1rem; height: 1rem; border-width: 0.2em; }
.spinner-grow {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  background-color: currentColor;
  border-radius: 50%;
  opacity: 0;
  animation: spinner-grow 0.75s linear infinite;
}
@keyframes spinner-grow { 0%{transform:scale(0)} 50%{opacity:1;transform:none} to{opacity:0;transform:none} }

/* Progress bar */
.progress {
  height: 1rem;
  overflow: hidden;
  background: #e9ecef;
  border-radius: 6px;
}
.progress-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  background-color: #0d6efd;
  height: 100%;
  transition: width 0.6s ease;
}
.progress-bar-striped { background-image: repeating-linear-gradient(45deg,rgba(255,255,255,.15) 0,rgba(255,255,255,.15) 1px,transparent 0,transparent 50%); background-size: 1rem 1rem; }
@keyframes progress-bar-stripes { 0%{background-position-x:1rem} to{background-position-x:0} }
.progress-bar-animated { animation: progress-bar-stripes 1s linear infinite; }

/* Visually hidden (screen-reader text) */
.visually-hidden, .sr-only {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0,0,0,0) !important;
  white-space: nowrap !important; border: 0 !important;
}

/* Bootstrap responsive col-md-* (simplified, no breakpoints) */
[class*="col-"] { box-sizing: border-box; padding: 0 8px; }
[class*="col-md-"] { display: inline-block; vertical-align: top; }
.col-md-1  { width: 8.3333%;  }
.col-md-2  { width: 16.6667%; }
.col-md-3  { width: 25%;      }
.col-md-4  { width: 33.3333%; }
.col-md-5  { width: 41.6667%; }
.col-md-6  { width: 50%;      }
.col-md-7  { width: 58.3333%; }
.col-md-8  { width: 66.6667%; }
.col-md-9  { width: 75%;      }
.col-md-10 { width: 83.3333%; }
.col-md-11 { width: 91.6667%; }
.col-md-12 { width: 100%;     }
@media (max-width: 768px) { [class*="col-md-"] { width: 100%; display: block; } }

/* Additional spacing */
.pb-0{padding-bottom:0!important} .pb-1{padding-bottom:.25rem!important} .pb-2{padding-bottom:.5rem!important} .pb-3{padding-bottom:1rem!important} .pb-4{padding-bottom:1.5rem!important} .pb-5{padding-bottom:3rem!important}
.pt-0{padding-top:0!important} .pt-1{padding-top:.25rem!important} .pt-2{padding-top:.5rem!important} .pt-3{padding-top:1rem!important} .pt-4{padding-top:1.5rem!important} .pt-5{padding-top:3rem!important}
.ps-2{padding-left:.5rem!important} .ps-3{padding-left:1rem!important} .pe-2{padding-right:.5rem!important} .pe-3{padding-right:1rem!important}
.rounded{border-radius:.375rem!important} .rounded-3{border-radius:.5rem!important} .rounded-circle{border-radius:50%!important}
.border{border:1px solid #dee2e6!important} .border-0{border:0!important}
.text-center{text-align:center!important} .text-start{text-align:left!important}
.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.float-end{float:right!important} .float-start{float:left!important}
.overflow-auto{overflow:auto!important} .overflow-hidden{overflow:hidden!important}
.position-relative{position:relative!important} .position-absolute{position:absolute!important}
.opacity-75{opacity:.75!important} .opacity-50{opacity:.5!important} .opacity-25{opacity:.25!important}
.cursor-pointer{cursor:pointer}

/* Tab pane (Bootstrap-like, for pages without Bootstrap CDN) */
.tab-pane { display: none; }
.tab-pane.active, .tab-pane.show.active { display: block; }


/* ─────────────────────────────────────────────────────────────────────────
   DARK MODE  (html[data-theme="dark"])
   Activated by the 🌙 toggle button in the top-right nav area.
   Uses filter: invert + hue-rotate so inline-styled elements also go dark.
   White → near-black, dark text → white, colors approximately preserved.
   ───────────────────────────────────────────────────────────────────────── */

/* Body gutter (area outside .static-container) */
[data-theme="dark"] body {
  background-color: #0f172a !important;
  background-image: none !important;
}

/* Main content — invert so white → dark, black text → white.
   background must be #fff so after inversion it becomes dark. */
[data-theme="dark"] .static-container {
  filter: invert(1) hue-rotate(180deg);
  background: #ffffff !important;
}

/* Un-invert media so images/videos/iframes display their natural colors
   (double invert = original appearance). */
[data-theme="dark"] .static-container img,
[data-theme="dark"] .static-container video,
[data-theme="dark"] .static-container iframe {
  filter: invert(1) hue-rotate(180deg);
}

/* Modals live outside .static-container — apply the same filter. */
[data-theme="dark"] .modal-content {
  filter: invert(1) hue-rotate(180deg);
  background: #ffffff !important;
}

[data-theme="dark"] .modal-content img,
[data-theme="dark"] .modal-content video {
  filter: invert(1) hue-rotate(180deg);
}

/* ==========================================================================
   Help Balloon Tooltip System
   Triggered by [data-help] attribute on any element.
   JS in default_template.htm handles positioning and show/hide.
   ========================================================================== */

#help-balloon {
  position: fixed;
  z-index: 99998;
  max-width: 280px;
  min-width: 160px;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 13px;
  line-height: 1.5;
  padding: 9px 13px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  word-wrap: break-word;
  border: 1px solid #334155;
}

#help-balloon.visible {
  opacity: 1;
}

/* Arrow — rendered as a pseudo-element appended by JS via a sibling div */
#help-balloon-arrow {
  position: fixed;
  z-index: 99997;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

#help-balloon-arrow.visible {
  opacity: 1;
}

/* Arrow pointing downward (balloon above the target) */
#help-balloon-arrow.arrow-down {
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid #1e293b;
}

/* Arrow pointing upward (balloon below the target) */
#help-balloon-arrow.arrow-up {
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 8px solid #1e293b;
}

/* Dark mode adjustments */
[data-theme="dark"] #help-balloon {
  background: #0f172a;
  border-color: #475569;
  color: #e2e8f0;
}

[data-theme="dark"] #help-balloon-arrow.arrow-down {
  border-top-color: #0f172a;
}

[data-theme="dark"] #help-balloon-arrow.arrow-up {
  border-bottom-color: #0f172a;
}
