/* KLLC AV Checklist 2026 Core Styling Sheets */

/* --- CSS VARIABLES & TOKENS --- */
:root {
  --font-title: 'Outfit', 'Sarabun', sans-serif;
  --font-body: 'Sarabun', 'Outfit', sans-serif;
  
  /* HSL Color System */
  --bg-app: hsl(222, 28%, 10%);
  --bg-card: rgba(20, 25, 40, 0.6);
  --bg-card-hover: rgba(25, 32, 53, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-glow: rgba(50, 100, 255, 0.4);
  
  --color-primary: hsl(210, 100%, 55%);
  --color-primary-glow: hsla(210, 100%, 55%, 0.2);
  --color-secondary: hsl(225, 12%, 25%);
  --color-secondary-hover: hsl(225, 12%, 35%);
  
  --color-success: hsl(145, 80%, 48%);
  --color-success-bg: hsla(145, 80%, 48%, 0.15);
  --color-danger: hsl(355, 90%, 62%);
  --color-danger-bg: hsla(355, 90%, 62%, 0.15);
  --color-warn: hsl(38, 95%, 55%);
  --color-warn-bg: hsla(38, 95%, 55%, 0.15);
  --color-info: hsl(190, 90%, 50%);
  
  --text-main: hsl(210, 20%, 94%);
  --text-muted: hsl(210, 12%, 70%);
  --text-active: hsl(0, 0%, 100%);
  
  --glass-shadow: 0 12px 32px 0 rgba(0, 0, 0, 0.37);
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --border-radius-m: 16px;
  --border-radius-s: 10px;
}

/* --- RESET & FOUNDATION --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* --- GRADIENT DYNAMIC BACKDROP --- */
.glass-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: 
    radial-gradient(circle at 10% 20%, hsla(210, 100%, 50%, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, hsla(280, 100%, 50%, 0.08) 0%, transparent 40%);
  filter: blur(80px);
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* --- HEADER DESIGN --- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-m);
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-icon {
  font-size: 32px;
  background: linear-gradient(135deg, hsl(210, 100%, 65%), hsl(280, 100%, 65%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: float 4s ease-in-out infinite;
}

#app-title {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-active);
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- NAVIGATION TABS --- */
.app-nav {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  padding: 5px;
  border-radius: var(--border-radius-s);
  gap: 5px;
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-tab.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 12px var(--color-primary-glow);
}

.nav-tab:hover:not(.active) {
  color: var(--text-active);
  background: rgba(255, 255, 255, 0.05);
}

/* --- TAB CONTENT SWITCHING --- */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--border-radius-s);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, hsl(210, 100%, 55%), hsl(220, 100%, 45%));
  color: #fff;
  box-shadow: 0 4px 15px rgba(50, 100, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(50, 100, 255, 0.45);
}

.btn-secondary {
  background: var(--color-secondary);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--color-secondary-hover);
  color: var(--text-active);
  transform: translateY(-1px);
}

.btn-icon-only {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 15px;
}

.btn-icon-only:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-active);
}

/* --- SECTIONS --- */
.view-section {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.view-section.active {
  display: block;
}

.section-title {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-active);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.section-header .section-title {
  margin-bottom: 0;
}

/* --- 1. TWO BIG BUILDING CARDS --- */
.building-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
}

.building-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-m);
  padding: 35px 30px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.building-card:hover {
  transform: translateY(-8px);
  background: var(--bg-card-hover);
  border-color: var(--border-color-glow);
  box-shadow: 0 16px 40px rgba(50, 100, 255, 0.15);
}

.card-icon-wrapper {
  font-size: 48px;
  margin-bottom: 20px;
  display: inline-block;
  transition: var(--transition-smooth);
}

.building-card:hover .card-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
}

.building-name {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-active);
  margin-bottom: 10px;
}

.building-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 25px;
  height: 48px;
  overflow: hidden;
}

/* Badges */
.badge {
  display: inline-flex;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
}

.badge-info {
  background: rgba(50, 150, 255, 0.15);
  color: var(--color-info);
  border: 1px solid rgba(50, 150, 255, 0.25);
}

.badge-success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(0, 230, 118, 0.25);
}

.badge-danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid rgba(255, 82, 82, 0.25);
}

.card-glowing-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  opacity: 0;
  transition: var(--transition-smooth);
}

.building-card:hover .card-glowing-border {
  opacity: 1;
}

/* --- 2. ROOM LIST GRID --- */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.room-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-m);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
  position: relative;
}

.room-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: rgba(255,255,255,0.15);
}

.room-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.room-id {
  font-family: var(--font-title);
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 4px;
}

.room-title {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-active);
}

.room-detail {
  font-size: 13px;
  color: var(--text-muted);
  min-height: 40px;
}

.room-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

/* --- 3. EXECUTIVE DASHBOARD --- */
.executive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.print-title-area {
  display: none; /* Only visible when printing */
}

/* Stats Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-m);
  padding: 25px 20px;
  text-align: center;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
}

.stat-num {
  font-family: var(--font-title);
  font-size: 42px;
  font-weight: 700;
  color: var(--text-active);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Themes for stats */
.stat-success .stat-num { color: var(--color-success); }
.stat-danger .stat-num { color: var(--color-danger); }
.stat-warn .stat-num { color: var(--color-warn); }

/* Dashboard Layout split */
.exec-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 25px;
  margin-bottom: 30px;
}

.exec-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-m);
  padding: 25px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.exec-card h3 {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-active);
  border-left: 3px solid var(--color-primary);
  padding-left: 10px;
}

/* SVG Circular Chart */
.chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.progress-ring-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 10px 0;
}

.circular-chart {
  display: block;
  margin: 10px auto;
  max-width: 100%;
  max-height: 100%;
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 2.8;
}

.circle {
  fill: none;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke: var(--color-success);
  transition: stroke-dasharray 0.8s ease-in-out;
}

.circle-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-active);
}

/* Urgent Issues List UI */
.urgent-issues-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 5px;
}

.urgent-issue-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 82, 82, 0.05);
  border: 1px solid rgba(255, 82, 82, 0.15);
  border-radius: var(--border-radius-s);
  padding: 15px;
  gap: 15px;
  transition: var(--transition-smooth);
}

.urgent-issue-item:hover {
  background: rgba(255, 82, 82, 0.08);
  border-color: rgba(255, 82, 82, 0.25);
}

.issue-info-left {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-grow: 1;
}

.issue-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.issue-room-name {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-active);
}

.issue-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.issue-meta-row {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 15px;
}

/* Photo Thumbnail & Capture Integration */
.photo-thumbnail {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
  transition: var(--transition-smooth);
}

.photo-thumbnail:hover {
  transform: scale(1.08);
  border-color: var(--color-primary);
}

.photo-preview-container {
  margin-top: 10px;
  width: 100%;
  max-height: 180px;
  border-radius: var(--border-radius-s);
  overflow: hidden;
  border: 1px dashed var(--border-color);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

#photo-preview {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
}

.photo-input-wrapper {
  position: relative;
}

/* Zoom Image Overlay modal */
.zoom-content {
  position: relative;
  max-width: 80%;
  max-height: 80%;
}

.zoom-content img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--border-radius-s);
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.zoom-content .close-btn {
  position: absolute;
  top: -40px;
  right: 0px;
  color: #fff;
}

/* --- MODAL DIALOG --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 25, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color-glow);
  border-radius: var(--border-radius-m);
  width: 95%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  transform: translateY(30px) scale(0.95);
  transition: var(--transition-smooth);
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

#modal-room-title {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-active);
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 28px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.close-btn:hover {
  color: var(--text-active);
}

.room-meta-info {
  display: flex;
  gap: 20px;
  background: rgba(255,255,255,0.03);
  padding: 12px 18px;
  border-radius: var(--border-radius-s);
  border: 1px solid var(--border-color);
  margin-bottom: 25px;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 11px;
  color: var(--text-muted);
}

.meta-value {
  font-weight: 600;
  font-size: 14px;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-s);
  padding: 12px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: var(--transition-smooth);
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

/* Radio button toggles */
.status-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.status-toggle-group input[type="radio"] {
  display: none;
}

.toggle-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-s);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition-smooth);
  background: rgba(255, 255, 255, 0.02);
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
  transition: var(--transition-smooth);
}

/* Active states for radio button label triggers */
#status-ok:checked + .ok-label {
  background: var(--color-success-bg);
  border-color: var(--color-success);
  color: var(--color-success);
}

#status-ok:checked + .ok-label .indicator {
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

#status-issue:checked + .issue-label {
  background: var(--color-danger-bg);
  border-color: var(--color-danger);
  color: var(--color-danger);
}

#status-issue:checked + .issue-label .indicator {
  background: var(--color-danger);
  box-shadow: 0 0 8px var(--color-danger);
}

/* Symptom Group Expand Animation */
.symptom-container {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-bottom: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.symptom-container.expanded {
  max-height: 380px;
  opacity: 1;
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 30px;
}

/* --- LOGS TABLE SECTION --- */
.logs-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-m);
  padding: 25px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.logs-title {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-active);
  margin-bottom: 15px;
}

.table-container {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

th {
  color: var(--text-muted);
  font-weight: 600;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-title);
}

td {
  padding: 14px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0px); }
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 800px) {
  .exec-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .app-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
    align-items: center;
  }
  .logo-area {
    flex-direction: column;
    gap: 5px;
  }
  .app-nav {
    width: 100%;
    justify-content: center;
  }
  .nav-tab {
    flex-grow: 1;
    justify-content: center;
  }
  .action-bar {
    width: 100%;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .status-toggle-group {
    grid-template-columns: 1fr;
  }
}

/* --- PRINT SYSTEM STYLING --- */
@media print {
  /* Reset background and text color for clear ink printing */
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt;
  }
  
  .glass-bg {
    display: none !important;
  }

  .app-container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }
  
  /* Hide interactive/web elements */
  .no-print,
  .app-header,
  .modal-overlay,
  .logs-section,
  .btn,
  .close-btn {
    display: none !important;
  }

  /* Display Print-only title */
  .print-title-area {
    display: block !important;
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
  }
  
  .print-title-area h1 {
    font-size: 18pt;
    margin-bottom: 5px;
  }
  
  .print-title-area p {
    font-size: 10pt;
    color: #555;
  }

  /* Force tab contents to display for printing */
  #executive-tab-content {
    display: block !important;
  }
  
  .tab-content {
    display: block !important;
  }
  
  .view-section {
    display: block !important;
  }

  /* Format Stats for print */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 15px !important;
    margin-bottom: 30px !important;
  }
  
  .stat-card {
    background: #f5f5f5 !important;
    border: 1px solid #ccc !important;
    color: #000000 !important;
    padding: 15px 10px !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  
  .stat-num {
    font-size: 24pt !important;
    color: #000000 !important;
  }

  .stat-success .stat-num { color: #2e7d32 !important; }
  .stat-danger .stat-num { color: #c62828 !important; }
  .stat-warn .stat-num { color: #f57f17 !important; }
  
  .stat-label {
    font-size: 9pt !important;
    color: #333 !important;
  }

  /* Layout for print: circular chart on top or left, issues list occupying full width */
  .exec-layout {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  .exec-card {
    background: #ffffff !important;
    border: 1px solid #ccc !important;
    color: #000 !important;
    padding: 20px !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }
  
  .exec-card h3 {
    color: #000 !important;
    border-left: 4px solid #000 !important;
    font-size: 13pt !important;
    margin-bottom: 15px !important;
  }

  /* Hide progress ring on print if it doesn't print well, or keep it simple */
  .chart-container {
    display: none !important; /* Hide circular chart in print report, rely on stats cards */
  }

  /* Expand issues list full width */
  .issues-list-container {
    width: 100% !important;
  }
  
  .urgent-issues-list {
    max-height: none !important;
    overflow-y: visible !important;
  }
  
  .urgent-issue-item {
    background: #fff5f5 !important;
    border: 1px solid #ffcdd2 !important;
    color: #000 !important;
    page-break-inside: avoid;
  }

  .issue-room-name {
    color: #c62828 !important;
  }
  
  .issue-desc {
    color: #000 !important;
    font-size: 11pt !important;
  }
  
  .issue-meta-row {
    color: #555 !important;
  }

  /* Render image thumbnails cleanly in print */
  .photo-thumbnail {
    width: 80px !important;
    height: 80px !important;
    border: 1px solid #999 !important;
  }
}

/* --- KLLC OPERATIONS HUB EXTRA STYLING --- */
.pulse-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 5px;
  scrollbar-width: none;
}
.pulse-container::-webkit-scrollbar {
  display: none;
}
.pill {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-muted);
  backdrop-filter: blur(8px);
  transition: var(--transition-smooth);
}
.pill:hover {
  border-color: var(--color-primary-glow);
  transform: translateY(-1px);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}
.dot.ok {
  background: var(--color-success);
  box-shadow: 0 0 10px var(--color-success);
  animation: beat-ok 2.2s infinite;
}
.dot.warn {
  background: var(--color-warn);
  box-shadow: 0 0 10px var(--color-warn);
  animation: beat-warn 1.4s infinite;
}
.dot.bad {
  background: var(--color-danger);
  box-shadow: 0 0 10px var(--color-danger);
  animation: beat-bad 0.8s infinite;
}

@keyframes beat-ok {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}
@keyframes beat-warn {
  0% { box-shadow: 0 0 0 0 rgba(241, 196, 15, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(241, 196, 15, 0); }
  100% { box-shadow: 0 0 0 0 rgba(241, 196, 15, 0); }
}
@keyframes beat-bad {
  0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

/* Glassmorphic Tables */
.table-card-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-m);
  padding: 20px;
  backdrop-filter: blur(12px);
  margin-top: 15px;
}
.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  font-size: 14px;
}
.custom-table th {
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-active);
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
}
.custom-table td {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  transition: var(--transition-smooth);
}
.custom-table tr td:first-child {
  border-left: 1px solid var(--border-color);
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}
.custom-table tr td:last-child {
  border-right: 1px solid var(--border-color);
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}
.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Progress bar for TOR and Projects */
.progress-container {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  height: 8px;
  margin-top: 6px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-info));
  border-radius: 10px;
  transition: width 0.5s ease-in-out;
}

/* Forms layout */
.inline-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}
.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-s);
  padding: 10px 14px;
  color: var(--text-main);
  font-family: var(--font-body);
  transition: var(--transition-smooth);
}
.form-input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 8px var(--color-primary-glow);
}

