/* CSS Design System - Sistema de Registro de Pagos Residenciales */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', var(--font-primary);

  /* Color Palette - Premium Slate & Indigo */
  --bg-main: #0b0f19;
  --bg-card: #151c2c;
  --bg-card-hover: #1e293b;
  --bg-input: #0f172a;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.4);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #4f46e5;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  --accent-hover: #4338ca;
  --accent-light: rgba(99, 102, 241, 0.15);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.18);
  --info: #3b82f6;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.4);

  --bottom-nav-height: 68px;
  --header-height: 70px;
}

/* Light Theme Variables Toggle */
[data-theme="light"] {
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #ffffff;
  
  --border-color: #e2e8f0;
  --border-highlight: #6366f1;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent-primary: #4f46e5;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  --accent-light: rgba(79, 70, 229, 0.1);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

/* Reset & Core Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-nav-height) + 20px);
}

@media (min-width: 992px) {
  body {
    padding-bottom: 30px;
  }
}

/* Layout Elements */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
}

[data-theme="light"] .app-header {
  background: rgba(255, 255, 255, 0.85);
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.4);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
}

/* Desktop Header Navigation */
.desktop-nav {
  display: none;
  gap: 0.5rem;
}

@media (min-width: 992px) {
  .desktop-nav {
    display: flex;
  }
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: transparent;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: #ffffff;
  background: var(--accent-gradient);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Main Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
}

/* Tab Views Switcher */
.tab-content {
  display: none;
}

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

/* Sub-Tabs Navigation (Segmented Pill Bar matching Form Width) */
.sub-nav-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-width: 650px;
  margin: 0 auto 1.5rem auto;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.sub-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 0.6rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.sub-tab-btn i {
  font-size: 1.15rem;
  transition: transform 0.2s ease;
}

.sub-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .sub-tab-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.sub-tab-btn.active {
  color: #ffffff !important;
  background: var(--accent-gradient) !important;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.sub-tab-btn.active i {
  transform: scale(1.1);
}

@media (max-width: 640px) {
  .sub-nav-tabs {
    gap: 4px;
    padding: 4px;
  }
  .sub-tab-btn {
    padding: 0.65rem 0.35rem;
    font-size: 0.8rem;
    gap: 0.35rem;
  }
  .sub-tab-btn i {
    font-size: 1rem;
  }
}

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

/* Page Section Cards & Headers */
.section-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .section-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Form Styling */
.card-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  max-width: 650px;
  margin: 0 auto;
}

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

@media (min-width: 640px) {
  .form-grid.two-cols {
    grid-template-columns: 1fr 1fr;
  }
}

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

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

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.form-control, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.input-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Suggestions Dropdown for Real-time Searchable Mz y Lote */
.suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 220px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 4px;
}

.suggestion-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s ease;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover, .suggestion-item.selected {
  background: var(--accent-light);
  color: var(--accent-primary);
}

.badge-info {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--success-bg);
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.5);
  transform: translateY(-1px);
}

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

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

/* Filter Chips & Segmented Controls (Matrix & Morosos) */
.filter-chips {
  display: inline-flex;
  gap: 0.25rem;
  background: var(--bg-card);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  align-items: center;
}

button.filter-chip, .filter-chip {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
  outline: none;
  line-height: 1.4;
}

button.filter-chip:hover, .filter-chip:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

button.filter-chip.active, .filter-chip.active {
  background: var(--accent-gradient) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35) !important;
}

button.filter-chip[data-debt-cat="moroso_total"].active, .filter-chip[data-debt-cat="moroso_total"].active {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4) !important;
}

button.filter-chip[data-debt-cat="deudor_parcial"].active, .filter-chip[data-debt-cat="deudor_parcial"].active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4) !important;
}

button.filter-chip[data-debt-type="conductores"].active, .filter-chip[data-debt-type="conductores"].active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4) !important;
}

/* KPI Dashboard Grid & KPI Cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.kpi-card {
  background: var(--bg-card);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-title {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.kpi-icon {
  font-size: 1.25rem;
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.kpi-subtext {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Annual Matrix Table (Responsive & Scrollable) */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.825rem;
  min-width: 1100px;
}

.matrix-table th, .matrix-table td {
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  white-space: nowrap;
}

.matrix-table th {
  background: var(--bg-input);
  color: var(--text-secondary);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

.matrix-table th.month-header {
  border-left: 1px solid var(--border-color);
}

.matrix-table .sticky-col {
  position: sticky;
  left: 0;
  background: var(--bg-card);
  z-index: 5;
  font-weight: 700;
  text-align: left;
  padding-left: 0.85rem;
  border-right: 2px solid var(--border-color);
}

.matrix-table th.sticky-col {
  background: var(--bg-input);
  z-index: 15;
}

.cell-code {
  color: #38bdf8;
  font-family: monospace;
  font-weight: 600;
  display: block;
}

.cell-amount {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.cell-empty {
  color: rgba(255, 255, 255, 0.15);
  font-weight: 300;
}

.row-total {
  font-weight: 700;
  color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}

.row-red {
  background: rgba(239, 68, 68, 0.12) !important;
}
.row-red .sticky-col {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #f87171;
}

/* Debtor Cards & Grid */
.debtors-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .debtors-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

.debtor-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

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

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

.debtor-lote {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.debtor-badge {
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 0.75rem;
  font-weight: 700;
}

.debtor-months {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.month-pill {
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  color: #fca5a5;
  font-size: 0.75rem;
  font-weight: 600;
}

.month-checkbox-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.month-checkbox-label:hover {
  border-color: var(--border-highlight);
  color: var(--text-primary);
}

.month-checkbox-label.selected {
  background: var(--accent-light);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 700;
}

/* Search Results Card */
.search-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
}

.year-accordion {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 1rem;
  overflow: hidden;
}

.year-accordion-header {
  background: var(--bg-input);
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
}

/* Bottom Navigation Bar for Mobile */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 999;
  padding: 0 0.5rem;
}

[data-theme="light"] .bottom-nav {
  background: rgba(255, 255, 255, 0.95);
}

@media (min-width: 992px) {
  .bottom-nav {
    display: none;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  width: 20%;
}

.bottom-nav-item i {
  font-size: 1.2rem;
}

.bottom-nav-item.active {
  color: var(--accent-primary);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 15px);
  right: 1.25rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 992px) {
  .toast-container {
    bottom: 1.5rem;
  }
}

.toast {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  animation: slideUp 0.3s ease-out;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--danger);
}

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

/* ========================================================
   Login Screen & Session Management Styles
   ======================================================== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 18%, rgba(79, 70, 229, 0.22) 0%, rgba(11, 15, 25, 1) 75%);
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: fadeIn 0.35s ease-out;
}

.login-brand {
  text-align: center;
}

/* Header User & Session Timer Pills */
.user-status-pill {
  display: none;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: #34d399;
}

@media (min-width: 860px) {
  .user-status-pill {
    display: inline-flex;
  }
}

.session-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  color: #fbbf24;
  font-family: monospace;
}

.session-timer-pill.timer-warning {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.6);
  color: #f59e0b;
  animation: pulseWarning 1.5s infinite;
}

.session-timer-pill.timer-danger {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.6);
  color: #ef4444;
  animation: pulseDanger 1s infinite;
}

@keyframes pulseWarning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

@keyframes pulseDanger {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.75; }
}

/* Print Styles */
@media print {
  body {
    background: #ffffff;
    color: #000000;
  }
  .app-header, .bottom-nav, .theme-toggle-btn, .btn-print-hide {
    display: none !important;
  }
  .matrix-table {
    min-width: 100%;
    font-size: 9pt;
  }
  .matrix-table th, .matrix-table td {
    border: 1px solid #ccc;
    color: #000;
  }
}
