/**
 * ICU IV INFUSION CALCULATOR — CLINICAL INTERFACE
 * v1.0.0 - Production Release
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-blue: #0066cc;
  --purple: #9b59b6;
  --blue-analgesia: #3498db;
  --orange: #e67e22;
  --teal: #16a085;
  --success-green: #28a745;
  --warning-orange: #ff9800;
  --danger-red: #dc3545;
  --vasopressor-red: #d32f2f;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --text-dark: #212529;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  
  /* Input styling variables */
  --input-border: #0066cc;
  --input-bg: #f5f5f5;
  --input-hover-bg: #ffffff;
  --input-focus-shadow: rgba(0, 102, 204, 0.15);
}

/* NIGHT MODE COLOR SCHEME */
body.night-mode {
  --bg-light: #1a1a1a;
  --bg-white: #2d2d2d;
  --text-dark: #e0e0e0;
  --text-muted: #a0a0a0;
  --border-color: #404040;
  --shadow: 0 2px 8px rgba(0,0,0,0.4);
  
  /* Input styling for night mode */
  --input-border: #4a90e2;
  --input-bg: #3a3a3a;
  --input-hover-bg: #454545;
  --input-focus-shadow: rgba(74, 144, 226, 0.3);
  
  background: #121212;
  color: #e0e0e0;
}

body.night-mode .card {
  background: #2d2d2d;
  border: 1px solid #404040;
}

body.night-mode header {
  background: #2d2d2d;
  border: 1px solid #404040;
}

body.night-mode input[type="text"],
body.night-mode input[type="number"],
body.night-mode input[type="date"],
body.night-mode input[type="time"],
body.night-mode select {
  border-color: var(--input-border);
  background: var(--input-bg);
  color: #e0e0e0;
}

body.night-mode input[type="text"]:hover,
body.night-mode input[type="number"]:hover,
body.night-mode input[type="date"]:hover,
body.night-mode input[type="time"]:hover,
body.night-mode select:hover {
  background: var(--input-hover-bg);
  border-color: #5a9fe8;
}

body.night-mode input[type="text"]:focus,
body.night-mode input[type="number"]:focus,
body.night-mode input[type="date"]:focus,
body.night-mode input[type="time"]:focus,
body.night-mode select:focus {
  background: #454545;
  border-color: #4a90e2;
  box-shadow: 0 0 0 4px var(--input-focus-shadow), 0 3px 8px rgba(74, 144, 226, 0.3);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #fafafa;
  color: var(--text-dark);
  line-height: 1.6;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

header {
  background: var(--bg-white);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  text-align: center;
}

/* AUTHORITATIVE MAIN TITLE */
.header-main-title {
  color: var(--primary-blue);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 5px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

h1 {
  color: var(--primary-blue);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 5px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 8px;
}

/* END SHIFT BUTTON (WHITE WITH RED ACCENT) */
.btn-end-shift {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: #dc3545;
  border: 2px solid #dc3545;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.15);
}

.btn-end-shift:hover {
  background: #dc3545;
  color: white;
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.25);
  transform: translateY(-1px);
}

.btn-end-shift:active {
  transform: translateY(0);
}

.end-shift-icon {
  font-size: 14px;
  display: flex;
  align-items: center;
}

/* NIGHT MODE TOGGLE BUTTON - ELEGANT CIRCULAR DESIGN */
.btn-night-mode {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-night-mode::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-night-mode:hover::before {
  opacity: 1;
}

.btn-night-mode:hover {
  transform: scale(1.08) rotate(15deg);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-night-mode:active {
  transform: scale(0.95);
}

.night-icon {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  transition: transform 0.3s ease;
}

/* Night mode active state */
body.night-mode .btn-night-mode {
  background: linear-gradient(135deg, #ffd89b 0%, #ff6b6b 100%);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

body.night-mode .btn-night-mode:hover {
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

body.night-mode .night-icon::after {
  content: '☀️';
  position: absolute;
}

body.night-mode .night-icon {
  opacity: 0;
}

/* Smooth theme transition */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.card, header {
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

input, select {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* HEADER LOGO */
.header-logo {
  height: 50px;
  width: auto;
  display: block;
}

/* ELEGANT ABOUT BUTTON (AVBG STYLE) */
.about-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0d6efd 0%, #0052cc 100%);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
  transition: all 0.3s ease;
}

.about-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 110, 253, 0.4);
}

.about-button:active {
  transform: translateY(0);
}

.about-button-icon {
  font-size: 16px;
  display: flex;
  align-items: center;
}

/* ELEGANT ABOUT MODAL OVERLAY */
.about-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ELEGANT ABOUT MODAL CONTENT */
.about-modal-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  animation: slideUp 0.3s ease;
}

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

/* CLOSE BUTTON */
.about-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f0f0f0;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.about-modal-close:hover {
  background: #e0e0e0;
  color: #333;
  transform: rotate(90deg);
}

/* MODAL TITLE */
.about-modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #0d6efd;
  margin: 0 0 24px 0;
  padding-right: 40px;
}

/* MODAL SECTIONS */
.about-modal-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e0e0e0;
}

.about-modal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.about-modal-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 12px 0;
}

.about-modal-section ul {
  list-style-type: disc;
  color: #444;
}

.about-modal-section li {
  margin-bottom: 4px;
}

.phase-badge {
  display: inline-block;
  background: var(--vasopressor-red);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 10px;
}

.card {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  border: 1px solid #f0f0f0;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-dark);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 20px 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

#messagesArea {
  margin-bottom: 0;
}

.preparation-box {
  background: #e3f2fd;
  border-left: 4px solid var(--primary-blue);
  padding: 16px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.prep-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
}

.preset-section {
  margin: 20px 0;
  padding: 16px;
  background: #f1f8ff;
  border-radius: 4px;
  border: 1px dashed var(--primary-blue);
}

.preset-section label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-dark);
}

.preset-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.btn-preset {
  background: var(--bg-white);
  border: 1px solid var(--primary-blue);
  color: var(--primary-blue);
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-preset:hover {
  background: var(--primary-blue);
  color: white;
}

.calculated-field {
  padding: 10px 12px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  min-height: 42px;
  display: flex;
  align-items: center;
}

.calculated-field.active {
  background: #d4edda;
  border-color: var(--success-green);
  color: var(--success-green);
}

.calculated-field.error {
  background: #f8d7da;
  border-color: var(--danger-red);
  color: var(--danger-red);
}

/* MODERN FORM LAYOUT */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

/* 3-COLUMN LAYOUT FOR PATIENT INFO */
.form-row-3col {
  grid-template-columns: 1fr 1fr 1fr;
}

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

.form-group.full-width {
  grid-column: 1 / -1;
}

/* MODERN LABEL STYLING */
label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
  letter-spacing: 0.01em;
}

/* MODERN INPUT STYLING */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
select {
  padding: 12px 14px;
  border: 2px solid #0066cc; /* Hospital blue border */
  border-radius: 8px;
  font-size: 14px;
  background: #f5f5f5; /* Elegant grey background */
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  color: var(--text-dark);
}

input[type="text"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="time"]:hover,
select:hover {
  border-color: #0052a3; /* Darker hospital blue on hover */
  background: #ffffff;
  box-shadow: 0 3px 6px rgba(0, 102, 204, 0.15);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus {
  outline: none;
  border-color: #0066cc;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15), 0 3px 8px rgba(0, 102, 204, 0.2);
}

.input-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 400;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.btn-primary {
  background: var(--primary-blue);
  color: white;
}

.btn-primary:hover {
  background: #0052a3;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--text-muted);
  color: white;
  margin-top: 8px;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-danger {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.btn-danger:hover {
  background: #c82333;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.results-section {
  display: none;
}

.results-section.visible {
  display: block;
}

.alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

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

/* PHASE 6 STEP 3: Active Infusions Dashboard */
#activeInfusionsDashboard {
  margin-bottom: 20px;
}

.infusion-card {
  border: 2px solid #e0e0e0;
  border-left: 4px solid #4caf50;
  padding: 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  background: #f9f9f9;
  transition: all 0.3s ease;
}

.infusion-card:last-child {
  margin-bottom: 0;
}

.infusion-card.status-running {
  border-left-color: #4caf50;
  background: #f1f8f4;
}

.infusion-card.status-alert {
  border-left-color: #ff9800;
  background: #fff8e1;
  border: 2px solid #ff9800;
  animation: pulse-alert 2s ease-in-out infinite;
}

.infusion-card.status-completed {
  border-left-color: #9e9e9e;
  background: #f5f5f5;
  opacity: 0.7;
}

@keyframes pulse-alert {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(255, 152, 0, 0); }
}

.infusion-patient-label {
  font-weight: 600;
  font-size: 14px;
  color: #1976d2;
  margin-bottom: 6px;
}

.infusion-drug-name {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.infusion-details {
  font-size: 12px;
  color: #666;
  line-height: 1.6;
}

.infusion-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
}

.infusion-status.running {
  background: #4caf50;
  color: white;
}

.infusion-status.alert {
  background: #ff9800;
  color: white;
  animation: blink 1s ease-in-out infinite;
}

.infusion-status.completed {
  background: #9e9e9e;
  color: white;
}

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

/* PHASE 6: END SHIFT MODAL */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: white;
  border-radius: 8px;
  padding: 30px;
  max-width: 90%;
  width: 450px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

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

.end-shift-modal h2 {
  border-bottom: 2px solid #dc3545;
  padding-bottom: 12px;
}

.modal-info {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
}

.math-verification {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  padding: 20px;
  border-radius: 6px;
  margin: 20px 0;
}

.math-equation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-size: 28px;
  font-weight: 600;
  margin-top: 15px;
}

.math-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.math-operator {
  color: #495057;
  font-weight: 700;
}

.math-input {
  width: 80px;
  height: 50px;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  border: 3px solid #007bff;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s;
}

.math-input:focus {
  border-color: #0056b3;
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
  transform: scale(1.05);
}

.math-input.incorrect {
  border-color: #dc3545;
  animation: shake 0.3s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 25px;
  justify-content: flex-end;
}

.modal-actions button {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  min-width: 120px;
}

.infusion-time-remaining {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin: 6px 0;
}

.infusion-time-remaining.alert {
  color: #e65100;
  font-size: 15px;
}

.result-grid {
  display: grid;
  gap: 12px;
}

.result-item {
  background: var(--bg-light);
  padding: 12px;
  border-radius: 4px;
  border-left: 4px solid var(--primary-blue);
}

.result-item.highlight {
  border-left-color: var(--success-green);
  background: #d4edda;
}

.result-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.result-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
}

.result-unit {
  font-size: 14px;
  color: var(--text-muted);
  margin-left: 4px;
}

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

footer {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 12px;
}

/* ============================================
   DRUG SELECTOR (GROUPED BY CATEGORY)
   ============================================ */

.drug-category {
  margin-bottom: 24px;
}

.drug-category:last-child {
  margin-bottom: 0;
}

.category-header {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 4px;
  border-left: 4px solid;
}

.vasopressor-header {
  background: #ffebee;
  border-left-color: var(--vasopressor-red);
  color: var(--vasopressor-red);
}

.sedation-header {
  background: #f3e5f5;
  border-left-color: var(--purple);
  color: var(--purple);
}

.antiarrhythmic-header {
  background: #fef5e7;
  border-left-color: var(--orange);
  color: var(--orange);
}

.metabolic-header {
  background: #e8f6f3;
  border-left-color: var(--teal);
  color: var(--teal);
}

.endocrine-header {
  background: #fef5e7;
  border-left-color: var(--orange);
  color: var(--orange);
}

.anticoagulation-header {
  background: #f3e5f5;
  border-left-color: var(--purple);
  color: var(--purple);
}

.antihypertensives-header {
  background: #e0f2f1;
  border-left-color: #009688;
  color: #009688;
}

.btn-drug-antihypertensives {
  background: linear-gradient(135deg, #009688 0%, #00796b 100%);
  color: white;
}

.btn-drug-antihypertensives:hover {
  background: linear-gradient(135deg, #00796b 0%, #004d40 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 150, 136, 0.3);
}

.drug-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 0;
}

.btn-drug {
  background: var(--bg-white);
  border: 2px solid var(--primary-blue);
  color: var(--primary-blue);
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-drug:hover {
  background: #e3f2fd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

/* SELECTED STATE */
.btn-drug.selected {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

/* VASOPRESSOR STYLING */
.btn-drug-vasopressor {
  border-color: var(--vasopressor-red);
  color: var(--vasopressor-red);
}

.btn-drug-vasopressor:hover {
  background: #ffebee;
}

.btn-drug-vasopressor.selected {
  background: var(--vasopressor-red);
  color: white;
  border-color: var(--vasopressor-red);
}

/* SEDATION STYLING */
.btn-drug-sedation {
  border-color: var(--purple, #9b59b6);
  color: var(--purple, #9b59b6);
}

.btn-drug-sedation:hover {
  background: #f3e5f5;
}

.btn-drug-sedation.selected {
  background: var(--purple, #9b59b6);
  color: white;
  border-color: var(--purple, #9b59b6);
}

.btn-drug-analgesia {
  border-color: var(--blue-analgesia, #3498db);
  color: var(--blue-analgesia, #3498db);
}

.btn-drug-analgesia:hover {
  background: #ebf5fb;
}

.btn-drug-analgesia.selected {
  background: var(--blue-analgesia, #3498db);
  color: white;
  border-color: var(--blue-analgesia, #3498db);
}

/* ANTIARRHYTHMIC STYLING */
.btn-drug-antiarrhythmic {
  border-color: var(--orange, #e67e22);
  color: var(--orange, #e67e22);
}

.btn-drug-antiarrhythmic:hover {
  background: #fef5e7;
}

.btn-drug-antiarrhythmic.selected {
  background: var(--orange, #e67e22);
  color: white;
  border-color: var(--orange, #e67e22);
}

/* METABOLIC STYLING */
.btn-drug-metabolic {
  border-color: var(--teal, #16a085);
  color: var(--teal, #16a085);
}

.btn-drug-metabolic:hover {
  background: #e8f6f3;
}

.btn-drug-metabolic.selected {
  background: var(--teal, #16a085);
  color: white;
  border-color: var(--teal, #16a085);
}

/* ENDOCRINE STYLING */
.btn-drug-endocrine {
  border-color: var(--orange, #e67e22);
  color: var(--orange, #e67e22);
}

.btn-drug-endocrine:hover {
  background: #fef5e7;
}

.btn-drug-endocrine.selected {
  background: var(--orange, #e67e22);
  color: white;
  border-color: var(--orange, #e67e22);
}

/* ANTICOAGULATION STYLING */
.btn-drug-anticoagulation {
  border-color: var(--purple, #9b59b6);
  color: var(--purple, #9b59b6);
}

.btn-drug-anticoagulation:hover {
  background: #f3e5f5;
}

.btn-drug-anticoagulation.selected {
  background: var(--purple, #9b59b6);
  color: white;
  border-color: var(--purple, #9b59b6);
}

.selected-drug-name {
  background: #e3f2fd;
  border-left: 4px solid var(--primary-blue);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-blue);
  border-radius: 4px;
}

/* ============================================
   QUARTER-A4 LABEL (FIX 3: 10cm × 15cm)
   ============================================ */

.a4-page {
  display: none;
}

.iv-label-quarter {
  position: relative;
  width: 10cm;
  height: 15cm;  /* FIX 3: Changed from 14cm to 15cm */
  border: 3px solid #000;
  padding: 0.5cm;
  background: white;
  font-family: Arial, sans-serif;
}

.scissor-mark {
  position: absolute;
  font-size: 20pt;
  color: #000;
  font-weight: bold;
}

.scissor-mark.top-left {
  top: -15px;
  left: -15px;
}

.scissor-mark.top-right {
  top: -15px;
  right: -15px;
}

.scissor-mark.bottom-left {
  bottom: -15px;
  left: -15px;
}

.scissor-mark.bottom-right {
  bottom: -15px;
  right: -15px;
}

.label-content {
  width: 100%;
  height: 100%;
}

.label-header {
  text-align: center;
  border-bottom: 3px solid #000;
  padding-bottom: 0.3cm;
  margin-bottom: 0.3cm;
}

.drug-name {
  font-size: 22pt;
  font-weight: bold;
  color: #000;
  margin-bottom: 0.1cm;
}

.label-date {
  font-size: 9pt;
  color: #000;
}

.label-section {
  margin-bottom: 0.3cm;
  padding: 0.2cm;
  background: #f5f5f5;
  border: 2px solid #999;
}

.label-section.critical {
  background: #fff;
  border: 3px solid #000;
  padding: 0.3cm;
}

.label-section.warning {
  background: #fff9c4;
  border: 2px solid #f57c00;
}

.field-label {
  font-size: 8pt;
  font-weight: bold;
  color: #666;
  margin-bottom: 0.05cm;
  text-transform: uppercase;
}

.field-label-large {
  font-size: 12pt;
  font-weight: bold;
  color: #000;
  margin-bottom: 0.1cm;
  text-transform: uppercase;
}

.field-value {
  font-size: 9pt;
  color: #000;
  line-height: 1.3;
}

.field-value-large {
  font-size: 18pt;
  font-weight: bold;
  color: #000;
  line-height: 1.1;
}

.field-value-small {
  font-size: 8pt;
  color: #000;
  margin-top: 0.05cm;
}

/* ============================================
   PHASE 4: DOSE RANGE VISUALIZATION
   ============================================ */

.dose-range-viz {
  margin-top: 8px;
  margin-bottom: 4px;
}

.dose-bar {
  position: relative;
  height: 8px;
  border-radius: 4px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.dose-zone {
  flex: 1;
  transition: opacity 0.3s;
}

.dose-zone-low {
  background: #e0e0e0;
}

.dose-zone-normal {
  background: #4caf50;
}

.dose-zone-high {
  background: linear-gradient(to right, #ff9800, #f44336);
}

.dose-indicator {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: white;
  border: 2px solid #1976d2;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: left 0.3s ease;
  z-index: 10;
}

/* ============================================
   PHASE 4: CLINICAL NUDGES
   ============================================ */

.clinical-nudge {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
  border-left: 3px solid;
}

.clinical-nudge.nudge-info {
  background: #e3f2fd;
  border-left-color: #2196f3;
  color: #0d47a1;
}

.clinical-nudge.nudge-caution {
  background: #fff3e0;
  border-left-color: #ff9800;
  color: #e65100;
}

.clinical-nudge-icon {
  font-weight: bold;
  margin-right: 4px;
}

/* ============================================
   PRINT STYLES
   ============================================ */

/* Hide print grid on screen */
@media screen {
  #print-grid,
  .print-grid {
    display: none !important;
  }
}

@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  /* ============================================
     STEP 1: HIDE EVERYTHING EXCEPT PRINT GRID
     ============================================ */
  body > *:not(#print-grid) {
    display: none !important;
  }
  
  .container,
  .container * {
    display: none !important;
  }

  /* ============================================
     STEP 2: ENFORCE A4 PAGE
     ============================================ */
  @page {
    size: A4 portrait;
    margin: 0;
  }

  body {
    margin: 0;
    padding: 0;
    background: white;
  }

  /* ============================================
     STEP 3: MULTI-LABEL GRID (2×2)
     ============================================ */
  #print-grid {
    display: grid !important;
    grid-template-columns: 10cm 10cm !important;
    grid-template-rows: 14cm 14cm !important;
    width: 21cm !important;
    height: 29.7cm !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  /* ============================================
     STEP 4: INDIVIDUAL LABEL SLOTS
     ============================================ */
  .print-label-slot {
    display: block !important;
    width: 10cm !important;
    height: 14cm !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    padding: 8px !important;
    border: 2px dashed #333 !important;
    background: white !important;
    position: relative !important;
  }

  /* Hide empty slots */
  .print-label-slot:empty {
    display: none !important;
  }

  /* ============================================
     STEP 5: CORNER DOTS FOR EACH LABEL
     ============================================ */
  .print-label-slot .scissor-mark {
    position: absolute !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #333 !important;
    font-size: 0 !important;
  }

  .print-label-slot .scissor-mark::before,
  .print-label-slot .scissor-mark::after {
    display: none !important;
  }

  .scissor-mark.top-left {
    top: 3px !important;
    left: 3px !important;
  }

  .scissor-mark.top-right {
    top: 3px !important;
    right: 3px !important;
  }

  .scissor-mark.bottom-left {
    bottom: 3px !important;
    left: 3px !important;
  }

  .scissor-mark.bottom-right {
    bottom: 3px !important;
    right: 3px !important;
  }

  /* ============================================
     STEP 7: ENSURE CONTENT FITS (10cm × 14cm)
     Dr. Fadhel's Updated Specifications
     ============================================ */
  .iv-label-quarter {
    max-width: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
  }

  /* 3. Section headers (PATIENT INFORMATION, PREPARATION, etc.) - 8px */
  .label-title {
    font-size: 8px !important;
    margin-bottom: 2px !important;
    font-weight: 700 !important;
  }

  /* 4. Field labels - 7px */
  .label-field {
    font-size: 7px !important;
    margin-bottom: 1px !important;
    line-height: 1.1 !important;
  }

  /* 5. Field values - 7px */
  .label-value {
    font-size: 7px !important;
    line-height: 1.1 !important;
  }

  /* 6. PUMP RATE section */
  .pump-rate {
    margin: 2px 0 !important;
  }
  
  .pump-rate .field-label-large {
    font-size: 9px !important;
    font-weight: 700 !important;
  }
  
  .pump-rate .field-value-large {
    font-size: 7px !important;
    font-weight: 700 !important;
  }
  
  .pump-rate .field-value-small {
    font-size: 5px !important;
  }

  /* 7. GRAVITY section */
  .gravity-section,
  .label-section.critical {
    margin: 2px 0 !important;
  }
  
  .gravity-section .field-label-large,
  .label-section.critical .field-label-large {
    font-size: 9px !important;
    font-weight: 700 !important;
  }
  
  .gravity-section .field-value-large,
  .label-section.critical .field-value-large {
    font-size: 10px !important;
    font-weight: 700 !important;
  }
  
  .gravity-section .field-value-small,
  .label-section.critical .field-value-small {
    font-size: 6px !important;
  }

  /* 8. Warning box - 7px */
  .warning-box,
  .label-section.warning {
    display: block !important;
    visibility: visible !important;
    font-size: 7px !important;
    padding: 2px !important;
    margin: 2px 0 !important;
    line-height: 1.1 !important;
    background: #fff3cd !important;
    border: 1px solid #ffc107 !important;
  }
  
  .label-section.warning .field-value-small {
    font-size: 7px !important;
  }

  /* 1. Drug name header - 11px BOLD */
  .print-label-slot h1,
  .print-label-slot h2 {
    font-size: 11px !important;
    margin: 0 0 2px 0 !important;
    padding: 0 !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
  }

  /* 2. Timestamp - 6px */
  .print-label-slot .timestamp {
    font-size: 6px !important;
  }

  /* Section labels - 8px to match .label-title */
  .print-label-slot h3,
  .print-label-slot h4 {
    font-size: 8px !important;
    margin: 2px 0 1px 0 !important;
    padding: 0 !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
  }

  /* Paragraphs and spans */
  .print-label-slot p,
  .print-label-slot span,
  .print-label-slot div {
    line-height: 1.1 !important;
  }

  /* Strong/bold text */
  .print-label-slot strong,
  .print-label-slot b {
    font-weight: 700 !important;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet: 3-column becomes 2-column */
@media (max-width: 768px) {
  .form-row-3col {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile: All single column */
@media (max-width: 600px) {
  .form-row,
  .form-row-3col {
    grid-template-columns: 1fr;
  }
  
  .gravity-rates {
    grid-template-columns: 1fr;
  }
  
  .preset-buttons {
    grid-template-columns: 1fr;
  }
  
  .drug-selector {
    grid-template-columns: 1fr;
  }
  
  body {
    padding: 10px;
  }
  
  .card {
    padding: 16px;
  }

  /* Responsive logo */
  .header-logo {
    height: 35px;
  }

  .header-main-title {
    font-size: 18px;
  }

  h1 {
    font-size: 18px;
  }

  .subtitle {
    font-size: 12px;
  }

  .about-button {
    font-size: 12px;
    padding: 8px 18px;
  }

  .btn-end-shift {
    font-size: 12px;
    padding: 6px 12px;
  }
}

/* ============================================
   COMPREHENSIVE NIGHT MODE STYLING
   ============================================ */

/* Drug category buttons in night mode */
body.night-mode .btn-drug {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.night-mode .btn-drug:hover {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Selected drug styling in night mode */
body.night-mode .selected-drug-name {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: #ffffff;
}

/* Alerts and warnings in night mode */
body.night-mode .alert {
  border-left-width: 4px;
}

body.night-mode .alert-danger {
  background: rgba(220, 53, 69, 0.15);
  border-color: #dc3545;
  color: #ff6b6b;
}

body.night-mode .alert-warning {
  background: rgba(255, 193, 7, 0.15);
  border-color: #ffc107;
  color: #ffd54f;
}

body.night-mode .alert-info {
  background: rgba(23, 162, 184, 0.15);
  border-color: #17a2b8;
  color: #4dd0e1;
}

/* Results section in night mode */
body.night-mode .results-grid {
  background: #2d2d2d;
}

body.night-mode .result-item {
  background: #3a3a3a;
  border: 1px solid #505050;
}

body.night-mode .result-label {
  color: #a0a0a0;
}

body.night-mode .result-value {
  color: #ffffff;
}

/* Dashboard sessions in night mode */
body.night-mode .session-card {
  background: #3a3a3a;
  border: 1px solid #505050;
}

body.night-mode .session-card.alert-active {
  background: rgba(220, 53, 69, 0.15);
  border-color: #dc3545;
}

body.night-mode .session-header {
  color: #ffffff;
}

body.night-mode .session-info {
  color: #b0b0b0;
}

/* Buttons in night mode */
body.night-mode .btn-primary {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  border-color: #4a90e2;
}

body.night-mode .btn-primary:hover {
  background: linear-gradient(135deg, #357abd 0%, #2868a8 100%);
}

body.night-mode .btn-secondary {
  background: #505050;
  border-color: #606060;
  color: #e0e0e0;
}

body.night-mode .btn-secondary:hover {
  background: #606060;
}

/* About button in night mode */
body.night-mode .about-button {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  color: white;
  border: none;
}

body.night-mode .about-button:hover {
  background: linear-gradient(135deg, #357abd 0%, #2868a8 100%);
}

/* Print label preview in night mode (don't affect actual print) */
body.night-mode .print-label {
  background: #2d2d2d;
  border: 2px solid #505050;
  color: #e0e0e0;
}

body.night-mode .label-drug-name {
  color: #ffffff;
}

/* Form labels in night mode */
body.night-mode label {
  color: #c0c0c0;
}

body.night-mode .input-hint {
  color: #808080;
}

/* Category headers in night mode */
body.night-mode .category-header {
  opacity: 1;
}

body.night-mode .vasopressor-header {
  background: rgba(211, 47, 47, 0.2);
  color: #ff6b6b;
  border-left-color: #ff6b6b;
}

body.night-mode .sedation-header {
  background: rgba(155, 89, 182, 0.2);
  color: #ce93d8;
  border-left-color: #ce93d8;
}

body.night-mode .antiarrhythmic-header {
  background: rgba(230, 126, 34, 0.2);
  color: #ffb74d;
  border-left-color: #ffb74d;
}

body.night-mode .metabolic-header {
  background: rgba(22, 160, 133, 0.2);
  color: #4dd0e1;
  border-left-color: #4dd0e1;
}

body.night-mode .endocrine-header {
  background: rgba(253, 126, 20, 0.2);
  color: #ffb74d;
  border-left-color: #ffb74d;
}

body.night-mode .anticoagulation-header {
  background: rgba(155, 89, 182, 0.2);
  color: #ce93d8;
  border-left-color: #ce93d8;
}

body.night-mode .antihypertensives-header {
  background: rgba(0, 150, 136, 0.2);
  color: #4dd0e1;
  border-left-color: #4dd0e1;
}

/* Calculated fields in night mode */
body.night-mode .calculated-field {
  background: #3a3a3a;
  border: 2px solid #4a90e2;
  color: #ffffff;
}

/* Placeholder text in night mode */
body.night-mode input::placeholder,
body.night-mode select::placeholder {
  color: #707070;
}

/* Scrollbar styling for night mode */
body.night-mode::-webkit-scrollbar {
  width: 10px;
  background: #2d2d2d;
}

body.night-mode::-webkit-scrollbar-thumb {
  background: #505050;
  border-radius: 5px;
}

body.night-mode::-webkit-scrollbar-thumb:hover {
  background: #606060;
}

/* Modal overlays in night mode */
body.night-mode .about-modal-overlay {
  background: rgba(0, 0, 0, 0.85);
}

body.night-mode .about-modal-content {
  background: #2d2d2d;
  color: #e0e0e0;
}

body.night-mode .about-modal-title {
  color: #ffffff;
}

body.night-mode .about-modal-subtitle {
  color: #4a90e2;
}

body.night-mode .about-modal-close {
  color: #a0a0a0;
  background: #404040;
}

body.night-mode .about-modal-close:hover {
  color: #ffffff;
  background: #505050;
}

/* End Shift modal in night mode */
body.night-mode .end-shift-modal-content {
  background: #2d2d2d;
  color: #e0e0e0;
}

body.night-mode .modal-title {
  color: #ffffff;
}

/* Table elements in night mode */
body.night-mode table {
  background: #2d2d2d;
  color: #e0e0e0;
}

body.night-mode th {
  background: #3a3a3a;
  color: #ffffff;
  border-bottom: 2px solid #4a90e2;
}

body.night-mode td {
  border-bottom: 1px solid #404040;
}

/* Links in night mode */
body.night-mode a {
  color: #4a90e2;
}

body.night-mode a:hover {
  color: #5a9fe8;
}


/* Footer styling for subtle appearance */
footer {
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid #e0e0e0;
}

body.night-mode footer {
  border-top-color: #404040;
}

body.night-mode footer p {
  color: #808080 !important;
}

/* ============================================ */
/* LICENSE SYSTEM STYLES */
/* ============================================ */

/* Trial Banner */
.trial-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 16px;
  z-index: 10000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.trial-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.trial-icon {
  font-size: 16px;
}

.trial-text {
  font-weight: 600;
  font-size: 13px;
}

.trial-activate-btn {
  background: white;
  color: #667eea;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.trial-activate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* License Modals */
.license-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.license-modal-content {
  background: white;
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

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

.license-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f7fafc;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  color: #4a5568;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.license-modal-close:hover {
  background: #e2e8f0;
  transform: rotate(90deg);
}

.license-modal-header {
  text-align: center;
  margin-bottom: 32px;
}

.license-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto 16px;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.license-icon.expired {
  background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
  box-shadow: 0 8px 20px rgba(252, 129, 129, 0.3);
}

.license-modal-header h2 {
  font-size: 28px;
  color: #2d3748;
  margin-bottom: 8px;
}

.license-modal-header p {
  font-size: 14px;
  color: #718096;
}

/* License Form */
.license-form {
  margin-top: 24px;
}

.form-group {
  margin-bottom: 20px;
}

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

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s;
}

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

/* Buttons */
.license-btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 16px;
}

.license-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.license-btn-secondary {
  width: 100%;
  padding: 14px;
  background: #f7fafc;
  color: #4a5568;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.license-btn-secondary:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
}

/* Divider */
.license-divider {
  text-align: center;
  margin: 24px 0;
  position: relative;
}

.license-divider::before,
.license-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #e2e8f0;
}

.license-divider::before {
  left: 0;
}

.license-divider::after {
  right: 0;
}

.license-divider span {
  background: white;
  padding: 0 16px;
  color: #a0aec0;
  font-size: 13px;
  font-weight: 600;
}

/* Messages */
.error-message {
  background: #fff5f5;
  border-left: 4px solid #fc8181;
  color: #c53030;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}

.loading-message {
  background: #fef5e7;
  border-left: 4px solid #fbbf24;
  color: #d97706;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}

/* Info Box */
.license-info-box {
  background: #f7fafc;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
  border: 2px solid #e2e8f0;
}

.license-info-box p {
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 16px;
}

.license-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
}

.license-detail-row:last-child {
  border-bottom: none;
}

.license-detail-label {
  font-weight: 600;
  color: #718096;
  font-size: 14px;
}

.license-detail-value {
  font-weight: 600;
  color: #2d3748;
  font-size: 14px;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.pricing-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s;
}

.pricing-card:hover {
  border-color: #667eea;
  transform: translateY(-2px);
}

.pricing-card.ultra {
  border-color: #764ba2;
}

.pricing-tier {
  font-weight: 700;
  font-size: 16px;
  color: #2d3748;
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 24px;
  font-weight: 800;
  color: #667eea;
  margin-bottom: 4px;
}

.pricing-card.ultra .pricing-price {
  color: #764ba2;
}

.pricing-duration {
  font-size: 12px;
  color: #718096;
}

/* Contact Options */
.contact-options {
  margin-top: 24px;
}

.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 12px;
  transition: all 0.3s;
}

.contact-btn.email {
  background: #edf2f7;
  color: #2d3748;
  border: 2px solid #cbd5e0;
}

.contact-btn.email:hover {
  background: #e2e8f0;
  transform: translateX(4px);
}

.contact-btn.whatsapp {
  background: #25d366;
  color: white;
  border: 2px solid #25d366;
}

.contact-btn.whatsapp:hover {
  background: #1eb953;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.contact-icon {
  font-size: 20px;
}

/* Night Mode Support */
body.night-mode .license-modal-content {
  background: #2d2d2d;
  color: #e0e0e0;
}

body.night-mode .license-modal-header h2,
body.night-mode .pricing-tier,
body.night-mode .license-detail-value {
  color: #e0e0e0;
}

body.night-mode .license-modal-header p,
body.night-mode .license-detail-label,
body.night-mode .pricing-duration {
  color: #a0a0a0;
}

body.night-mode .form-group input {
  background: #3a3a3a;
  border-color: #505050;
  color: #e0e0e0;
}

body.night-mode .form-group input:focus {
  border-color: #667eea;
  background: #454545;
}

body.night-mode .license-btn-secondary {
  background: #3a3a3a;
  color: #e0e0e0;
  border-color: #505050;
}

body.night-mode .license-btn-secondary:hover {
  background: #454545;
}

body.night-mode .license-info-box {
  background: #3a3a3a;
  border-color: #505050;
}

body.night-mode .pricing-card {
  background: #3a3a3a;
  border-color: #505050;
}

body.night-mode .contact-btn.email {
  background: #3a3a3a;
  color: #e0e0e0;
  border-color: #505050;
}

body.night-mode .license-modal-close {
  background: #3a3a3a;
  color: #e0e0e0;
}

body.night-mode .license-modal-close:hover {
  background: #505050;
}

/* Responsive */
@media (max-width: 600px) {
  .license-modal-content {
    padding: 24px;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  
  .trial-banner-content {
    font-size: 13px;
  }
}

/* ============================================ */
/* MOBILE RESPONSIVE FIXES */
/* ============================================ */

@media (max-width: 768px) {
  /* Header fixes */
  .header-logo {
    width: 40px !important;
    height: 40px !important;
  }
  
  .header-main-title {
    font-size: 18px !important;
    line-height: 1.2 !important;
  }
  
  .subtitle {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }
  
  /* Compact header buttons */
  .btn-night-mode {
    width: 36px !important;
    height: 36px !important;
    padding: 6px !important;
  }
  
  .night-icon {
    font-size: 18px !important;
  }
  
  .btn-end-shift {
    padding: 6px 10px !important;
    font-size: 12px !important;
  }
  
  .end-shift-icon {
    font-size: 16px !important;
  }
  
  .btn-end-shift span:last-child {
    display: none !important;
  }
  
  /* About button */
  .about-button {
    padding: 8px 16px !important;
    font-size: 12px !important;
  }
  
  .about-button-icon {
    font-size: 16px !important;
  }
  
  /* Trial banner mobile */
  .trial-banner {
    padding: 4px 8px !important;
  }
  
  .trial-text {
    font-size: 11px !important;
  }
  
  .trial-icon {
    font-size: 14px !important;
  }
  
  .trial-activate-btn {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }
  
  .trial-banner-content {
    gap: 8px !important;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .header-main-title {
    font-size: 16px !important;
  }
  
  .subtitle {
    font-size: 9px !important;
  }
  
  /* Stack header elements */
  header > div:first-child {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  
  /* Trial banner - show only essential info */
  .trial-text {
    font-size: 10px !important;
  }
}
