/* Hospital Selayang Department Attendance System - Nexcent SaaS Aesthetic Style */

/* ==========================================================================
   1. Design Tokens & CSS Variables
   ========================================================================== */
:root {
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', var(--font-sans);
  
  /* Color Palette (Nexcent-Inspired friendly SaaS palette) */
  --bg-primary: #F5F7FA;        /* Nexcent light gray canvas */
  --bg-secondary: #FFFFFF;      /* Pure white cards & blocks */
  --bg-hover: #F8F9FA;          /* Subtle hover gray */
  --bg-dark: #263238;           /* Deep Slate (Main headers & titles) */
  --bg-dark-light: #37474F;     /* Slate-800 */
  
  --text-primary: #263238;      /* Deep Slate for high-end headers */
  --text-secondary: #4D4D4D;    /* Charcoal for highly readable body text */
  --text-muted: #717171;        /* Muted gray for captions & labels */
  --text-light: #FFFFFF;        /* White text */
  
  /* Primary Highlight (Nexcent Green) */
  --primary: #4CAF50;           /* Green */
  --primary-hover: #388E3C;     /* Darker Green */
  --primary-light: #E8F5E9;     /* Light green background tint */
  --primary-glow: rgba(76, 175, 80, 0.15);
  
  /* Secondary Accent (Clinical Teal/Cyan) */
  --accent: #009688;            /* Teal */
  --accent-hover: #00796B;
  --accent-light: #E0F2F1;
  
  /* Semantic Colors */
  --success: #2E7D32;           /* Green */
  --success-light: #E8F5E9;
  
  --warning: #F57F17;           /* Yellow */
  --warning-light: #FFF8E1;
  
  --danger: #C62828;            /* Red */
  --danger-light: #FFEBEE;
  
  /* Borders & Shadows */
  --border-color: #E5E7EB;       /* Soft gray border */
  --border-color-hover: #D1D5DB;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;       /* Input & button roundness */
  --border-radius-lg: 12px;      /* Card & modal roundness */
  --border-radius-xl: 9999px;    /* Pills & circles */
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. Reset & Global Styles
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

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

.hidden {
  display: none !important;
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================================================
   3. Header & Navigation (Nexcent Premium Light Style)
   ========================================================================== */
.app-header {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  background-color: var(--primary-light);
  color: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(76, 175, 80, 0.1);
}

.logo-title {
  font-size: 1.15rem;
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Profile / Authentication widgets */
.user-auth-section {
  display: flex;
  align-items: center;
}

#google-signin-btn-wrapper {
  transition: opacity var(--transition-fast);
}

.profile-widget {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background-color: var(--bg-hover);
  padding: 0.4rem 1rem 0.4rem 0.4rem;
  border-radius: var(--border-radius-xl);
  border: 1px solid var(--border-color);
}

.avatar-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.avatar-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--primary);
}

.admin-badge {
  background-color: var(--danger-light);
  color: var(--danger);
  padding: 0.2rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--border-radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(198, 40, 40, 0.1);
}

.user-details {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.user-name-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email-text {
  font-size: 0.725rem;
  color: var(--text-muted);
  font-weight: 500;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-widget-actions {
  display: flex;
  gap: 0.2rem;
  border-left: 1px solid var(--border-color);
  padding-left: 0.5rem;
  margin-left: 0.25rem;
}

/* ==========================================================================
   4. Buttons System (Rounded & Friendly SaaS design)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--border-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

/* Nexcent Solid Green */
.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.1);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.2);
}

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

.btn-primary:disabled,
.btn-primary.disabled {
  background-color: var(--border-color);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Outline Green */
.btn-outline {
  background-color: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary-light);
  color: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Ghost text */
.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.btn-small {
  padding: 0.4rem 0.875rem;
  font-size: 0.8rem;
  border-radius: var(--border-radius-md);
}

.btn-large {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
}

.btn-icon svg {
  flex-shrink: 0;
}

/* ==========================================================================
   5. Dashboard Layout Grid & General Structure
   ========================================================================== */
.main-content {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Dashboard Welcoming Controls */
.dashboard-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 0.875rem;
}

.welcome-banner h2 {
  font-size: 1.85rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.welcome-banner p {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

/* The Columns Grid */
.dashboard-layout-grid {
  display: grid;
  grid-template-columns: 1.85fr 1.15fr;
  gap: 2rem;
  align-items: start;
}

.dashboard-main-column,
.dashboard-sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

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

/* Section headers (Clean text line dividers) */
.section-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.35rem;
  font-family: var(--font-display);
  color: var(--text-primary);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  top: 0;
  left: 0;
  animation: beacon 1.5s infinite ease-out;
}

/* ==========================================================================
   6. Banners (QR Scan Banner)
   ========================================================================== */
.scan-banner {
  background-color: var(--primary-light);
  border: 1px solid rgba(76, 175, 80, 0.15);
  color: var(--text-primary);
  padding: 1.25rem 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  animation: slideDown var(--transition-normal);
}

.banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.banner-icon-pulse {
  background-color: var(--primary);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-ring 2s infinite;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

.banner-text-details {
  flex: 1;
  min-width: 250px;
}

.banner-text-details h3 {
  color: var(--primary-hover);
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.15rem;
}

.banner-text-details p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.banner-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

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

.banner-actions .btn-primary:hover {
  background-color: var(--primary-hover);
}

.banner-actions .btn-ghost {
  color: var(--text-muted);
}

.banner-actions .btn-ghost:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   7. Card Lists & Activities Grid (Nexcent Premium Cards)
   ========================================================================== */
.ongoing-grid,
.activities-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

/* Activity Card Base Styling */
.activity-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all var(--transition-normal);
}

.activity-card:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Side highlights */
.activity-card.ongoing { border-left: 4px solid var(--primary); }
.activity-card.upcoming { border-left: 4px solid var(--accent); }
.activity-card.past { border-left: 4px solid var(--text-muted); opacity: 0.85; }

/* Category Border Overrides */
.activity-card[class*="Morning Passover"] { border-left-color: var(--primary); }
.activity-card[class*="Grandward"] { border-left-color: var(--accent); }
.activity-card[class*="Talk"], .activity-card[class*="CME"] { border-left-color: var(--warning); }
.activity-card[class*="Meeting"] { border-left-color: var(--danger); }

.card-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

/* Friendly Rounded Filled Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius-xl);
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: capitalize;
}

.badge-morning {
  background-color: var(--primary-light);
  color: var(--primary-hover);
}

.badge-grandround {
  background-color: var(--accent-light);
  color: var(--accent-hover);
}

.badge-talk {
  background-color: var(--warning-light);
  color: var(--warning);
}

.badge-meeting {
  background-color: var(--danger-light);
  color: var(--danger);
}

.badge-other {
  background-color: #ECEFF1;
  color: #37474F;
}

.badge-status {
  font-size: 0.75rem;
  font-weight: 700;
}

.card-body {
  margin-bottom: 1.25rem;
}

.activity-title-h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  line-height: 1.35;
}

.activity-meta-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem 1.25rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.875rem;
}

.activity-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.activity-meta-item svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Card Actions */
.card-actions {
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  margin-top: 0.5rem;
  justify-content: flex-end;
}

.card-actions .btn {
  padding: 0.45rem 1rem;
  font-size: 0.775rem;
}

.card-actions .checkin-btn {
  font-weight: 700;
}

/* Empty states */
.no-activities-card,
.loading-state {
  grid-column: 1 / -1;
  background-color: var(--bg-secondary);
  border: 1px dashed var(--border-color-hover);
  border-radius: var(--border-radius-lg);
  padding: 3rem;
  text-align: center;
  color: var(--text-muted);
}

.no-activities-card p,
.loading-state p {
  font-size: 0.9rem;
  font-weight: 600;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3.5px solid var(--border-color);
  border-top: 3.5px solid var(--primary);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}

/* Filter Tab Bar (Rounded Pill Style) */
.filter-bar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.filter-tab {
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.45rem 1.15rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--border-radius-xl);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.filter-tab:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-color-hover);
}

.filter-tab.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.1);
}

/* ==========================================================================
   8. Sidebar Components
   ========================================================================== */
/* Quick Routine Card (Light Green Container) */
.quick-checkin-card {
  background-color: var(--primary-light);
  border: 1px solid rgba(76, 175, 80, 0.15);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all var(--transition-normal);
}

.quick-checkin-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.quick-checkin-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-hover);
  margin-top: 0.25rem;
}

.quick-checkin-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.quick-card-actions {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.quick-card-actions .btn {
  flex: 1;
  min-width: 120px;
}

.quick-card-actions .btn-primary {
  background-color: var(--primary);
  color: white;
}

.quick-card-actions .btn-primary:hover {
  background-color: var(--primary-hover);
}

.quick-card-actions .btn-outline {
  border-color: var(--primary);
  color: var(--primary);
}

.quick-card-actions .btn-outline:hover {
  background-color: rgba(76, 175, 80, 0.1);
}

/* Department Info Guidelines Card */
.department-info-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.info-card-header {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-hover);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text-primary);
}

.info-card-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.info-card-header svg {
  color: var(--primary);
  flex-shrink: 0;
}

.info-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.info-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--primary);
  margin-top: 0.55rem;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.info-item p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.info-item strong {
  color: var(--text-primary);
  font-weight: 700;
}

.info-card-footer {
  padding: 1rem 1.5rem;
  background-color: var(--bg-hover);
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

/* ==========================================================================
   9. Modals Overlay & Box
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(38, 50, 56, 0.45);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  animation: fadeIn var(--transition-fast);
}

.modal-box {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 90vh;
  animation: scaleUp var(--transition-normal);
  border: 1px solid var(--border-color);
}

.modal-box.modal-medium {
  max-width: 460px;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  padding: 0.25rem;
  border-radius: var(--border-radius-sm);
}

.modal-close-icon:hover {
  color: var(--text-primary);
  background-color: var(--bg-hover);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-footer {
  padding: 1.15rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  background-color: var(--bg-hover);
}

/* ==========================================================================
   10. Forms Styling
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"],
select {
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

input:readonly {
  background-color: var(--bg-primary);
  color: var(--text-muted);
  cursor: not-allowed;
  border-color: var(--border-color);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  font-weight: 500;
}

/* ==========================================================================
   11. QR Code Display Modal Specifics
   ========================================================================== */
.qr-modal-body {
  align-items: center;
  text-align: center;
  padding: 1.5rem 2rem;
}

.qr-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.qr-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: -0.25rem;
}

.qr-container {
  background-color: white;
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: var(--border-radius-lg);
  margin: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  width: 180px;
  height: 180px;
}

.qr-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-instruction {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 320px;
  line-height: 1.5;
}

.qr-link-copy-container {
  display: flex;
  width: 100%;
  margin-top: 1rem;
  gap: 0.35rem;
}

.qr-link-copy-container input {
  flex: 1;
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-hover);
  color: var(--text-secondary);
}

/* ==========================================================================
   12. Success Notification Overlay
   ========================================================================== */
.success-overlay {
  background-color: rgba(38, 50, 56, 0.5);
}

.success-box {
  background-color: var(--bg-secondary);
  padding: 2.5rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 420px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: scaleUp var(--transition-normal);
  border: 1px solid var(--border-color);
}

.success-box h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  margin-top: 1.25rem;
  color: var(--text-primary);
}

.success-box p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
}

.success-details-card {
  width: 100%;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.success-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  font-size: 0.825rem;
}

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

.success-detail-row .label {
  color: var(--text-muted);
  font-weight: 600;
}

.success-detail-row .val {
  color: var(--text-primary);
  font-weight: 700;
}

/* Success Checkmark animation rules */
.checkmark-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: block;
  stroke-width: 2.5;
  stroke: var(--success);
  stroke-miterlimit: 10;
  box-shadow: inset 0px 0px 0px var(--success);
  animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
  position: relative;
}

.checkmark-circle-svg {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2.5;
  stroke-miterlimit: 10;
  stroke: var(--success);
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

/* ==========================================================================
   13. Toast Notification Alerts
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2000;
}

.toast {
  background-color: var(--bg-dark);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  animation: slideInRight var(--transition-normal);
  border-left: 4px solid var(--primary);
  border: 1px solid var(--bg-dark-light);
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast.toast-info { border-left-color: var(--primary); }

.toast svg {
  flex-shrink: 0;
}

/* ==========================================================================
   14. Footer Section
   ========================================================================== */
.app-footer {
  background-color: var(--bg-secondary);
  color: var(--text-muted);
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-links a {
  color: var(--text-muted);
  margin: 0 0.5rem;
  text-decoration: underline;
}

.footer-links a:hover {
  color: var(--primary);
}

/* ==========================================================================
   15. Keyframe Animations
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { transform: scale(0.97); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes slideDown {
  from { transform: translateY(-15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes beacon {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.6); opacity: 0; }
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.2); }
  70% { box-shadow: 0 0 0 8px rgba(76, 175, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

@keyframes stroke {
  100% { stroke-dashoffset: 0; }
}

@keyframes fill {
  100% { box-shadow: inset 0px 0px 0px 40px var(--success-light); }
}

@keyframes scale {
  0%, 100% { transform: none; }
  50% { transform: scale3d(1.04, 1.04, 1); }
}

/* ==========================================================================
   16. Print Styles (QR Code Poster Printing Layout)
   ========================================================================== */
@media print {
  body * {
    visibility: hidden;
  }
  
  #qr-modal,
  #qr-modal * {
    visibility: visible;
  }
  
  #qr-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: white;
    backdrop-filter: none;
    padding: 0;
    border: none;
  }
  
  .modal-box {
    box-shadow: none;
    border: none;
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    margin: 0;
  }

  .modal-header,
  .modal-footer {
    display: none !important;
  }
  
  .qr-modal-body {
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .qr-title {
    font-size: 2.5rem !important;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: black !important;
    text-align: center;
  }

  .qr-meta {
    font-size: 1.35rem !important;
    color: #475569 !important;
    margin-bottom: 2.5rem;
  }

  .qr-container {
    width: 340px !important;
    height: 340px !important;
    border: 3px solid #000;
    padding: 1rem;
    margin-bottom: 2.5rem;
    box-shadow: none !important;
    border-radius: 0;
  }

  .qr-instruction {
    font-size: 1.2rem !important;
    color: #000 !important;
    max-width: 460px;
    line-height: 1.5;
  }

  .qr-link-copy-container {
    display: none !important;
  }
}
