/* ==============================================================================
   MEDINTERNA LITE - DESIGN SYSTEM & STYLESHEET
   Paleta extraída de logo.png:
   - Primario (Deep Blue): #0e4d75
   - Secundario (Teal/Aqua): #2a8f89 / #38b2ac
   - Fondo: #f6f9fc
   ============================================================================== */

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

:root {
  --primary: #0e4d75;
  --primary-hover: #0a3a59;
  --primary-light: #e8f3fa;
  --primary-glow: rgba(14, 77, 117, 0.2);

  --secondary: #2a8f89;
  --secondary-hover: #227570;
  --secondary-light: #e6f6f5;

  --accent: #38b2ac;
  --accent-gradient: linear-gradient(135deg, #0e4d75 0%, #2a8f89 100%);
  --accent-gradient-hover: linear-gradient(135deg, #093755 0%, #21736e 100%);

  --bg-main: #f4f7fb;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --border: #e2e8f0;
  --border-focus: #2a8f89;

  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-white: #ffffff;

  --success: #10b981;
  --success-bg: #d1fae5;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --danger: #ef4444;
  --danger-bg: #fee2e2;
  --info: #0284c7;
  --info-bg: #e0f2fe;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
  --shadow-xl: 0 20px 25px -5px rgba(14, 77, 117, 0.12), 0 10px 10px -5px rgba(14, 77, 117, 0.04);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --sidebar-w: 270px;
  --header-h: 70px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-main: #0b1320;
  --surface: #131f33;
  --surface-alt: #1a2942;
  --border: #233554;
  --border-focus: #38b2ac;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --primary-light: #162c45;
  --secondary-light: #133a38;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Glassmorphism Classes */
.glass {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .glass {
  background: rgba(19, 31, 51, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

/* Layout App Shell */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background-color: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(14, 77, 117, 0.15));
}

.sidebar-brand h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  letter-spacing: -0.3px;
}

.sidebar-brand p {
  font-size: 0.7rem;
  color: var(--secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 0.75rem 0.75rem 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.nav-item:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

.nav-item.active {
  background: var(--accent-gradient);
  color: var(--text-white);
  box-shadow: 0 4px 12px var(--primary-glow);
  font-weight: 600;
}

.nav-item i {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.25);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.72rem;
  color: var(--secondary);
  font-weight: 600;
}

/* Main Content Area */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

/* Header */
.topbar {
  height: var(--header-h);
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.toggle-sidebar-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-primary);
  cursor: pointer;
}

.page-title-box h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}

.page-title-box span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Connection Status Badge */
.sync-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.sync-indicator.online {
  background-color: var(--success-bg);
  color: #065f46;
}

.sync-indicator.local {
  background-color: var(--info-bg);
  color: var(--info);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse {
  to {
    box-shadow: 0 0 0 8px rgba(0,0,0,0);
  }
}

/* Page Content Viewport */
.content-area {
  padding: 2rem;
  flex: 1;
}

/* Dashboard Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--secondary);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-gradient);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-icon.teal {
  background: var(--secondary-light);
  color: var(--secondary);
}

.stat-icon.amber {
  background: var(--warning-bg);
  color: var(--warning);
}

.stat-icon.purple {
  background: #f3e8ff;
  color: #9333ea;
}

.stat-details h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-details p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Content Panel Box */
.card-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  overflow: hidden;
}

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

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

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Custom Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 2px 6px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 4px 12px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface-alt);
  color: var(--text-primary);
  border-color: var(--border);
}

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

.btn-teal {
  background: var(--secondary);
  color: white;
}

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

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

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.btn-danger-outline {
  color: var(--danger);
  border-color: var(--danger-bg);
  background: transparent;
}
.btn-danger-outline:hover {
  background: var(--danger-bg);
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.custom-table th {
  background-color: var(--surface-alt);
  padding: 0.85rem 1.25rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.custom-table td {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

.custom-table tbody tr {
  transition: var(--transition);
}

.custom-table tbody tr:hover {
  background-color: var(--primary-light);
}

/* Badges & Tags */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
}

.status-active, .status-internado, .status-vigente {
  background: var(--success-bg);
  color: #065f46;
}

.status-programado, .status-pendiente {
  background: var(--warning-bg);
  color: #92400e;
}

.status-en-camino {
  background: var(--info-bg);
  color: #0369a1;
}

.status-alta, .status-finalizado, .status-inactivo {
  background: #f1f5f9;
  color: #475569;
}

/* Mobile Driver Card Experience */
.driver-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.driver-trip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: var(--transition);
}

.driver-trip-card.priority-active {
  border-left: 5px solid var(--accent);
  box-shadow: var(--shadow-md);
}

.driver-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.patient-driver-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.patient-driver-info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.address-box {
  background: var(--surface-alt);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--primary);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.address-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
}

.address-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.driver-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.btn-map {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  justify-content: center;
  font-weight: 700;
}

.btn-call {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: white;
  justify-content: center;
  font-weight: 700;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(14, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--surface-alt);
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text-primary);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(42, 143, 137, 0.15);
}

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

/* Printable Settlement Sheet / Invoice */
.printable-sheet {
  background: white;
  color: #1e293b;
  padding: 2.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-width: 800px;
  margin: 0 auto;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #0e4d75;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Search and Filters Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  min-width: 250px;
}

.search-input-wrap i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input-wrap input {
  padding-left: 2.3rem;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.show {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .toggle-sidebar-btn {
    display: block;
  }
}

@media (max-width: 768px) {
  .content-area {
    padding: 1.25rem 1rem;
  }
  .topbar {
    padding: 0 1rem;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .card-panel-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .card-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* Print Styles */
@media print {
  .sidebar, .topbar, .card-actions, .btn, .no-print, .login-wrapper {
    display: none !important;
  }
  .main-wrapper {
    margin: 0 !important;
  }
  .content-area {
    padding: 0 !important;
  }
  .printable-sheet {
    box-shadow: none !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ==============================================================================
   PANTALLA DE LOGIN
   ============================================================================== */
.login-screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: radial-gradient(circle at 10% 20%, rgba(14, 77, 117, 0.08) 0%, rgba(42, 143, 137, 0.05) 90%), #f4f7fb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px -15px rgba(14, 77, 117, 0.15);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.3s ease-out;
}

.login-brand-logo {
  width: 85px;
  height: 85px;
  object-fit: contain;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 4px 10px rgba(14, 77, 117, 0.2));
}

.login-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  text-align: center;
  line-height: 1.2;
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 1.75rem;
  text-align: center;
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.login-input-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.login-input-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.login-input-group .input-icon-wrap {
  position: relative;
}

.login-input-group .input-icon-wrap i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.login-input-group input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  background: var(--surface-alt);
  color: var(--text-primary);
  transition: var(--transition);
}

.login-input-group input:focus {
  outline: none;
  border-color: var(--secondary);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(42, 143, 137, 0.15);
}

.btn-login-submit {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-login-submit:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--primary-glow);
}

.login-error-alert {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background-color: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 0.5rem;
}

/* ==============================================================================
   BARRA DE PROGRESO DE CONEXIÓN A BASE DE DATOS
   ============================================================================== */
.db-progress-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  background: rgba(14, 30, 48, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.db-progress-card {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 2.25rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.db-progress-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  position: relative;
}

.db-progress-icon-wrap::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px dashed var(--secondary);
  animation: rotateSpinner 6s linear infinite;
}

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

.db-progress-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.db-progress-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-height: 22px;
}

.db-progress-bar-container {
  width: 100%;
  height: 12px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.db-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width 0.35s ease;
  position: relative;
}

.db-progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background-image: linear-gradient(
    -45deg, 
    rgba(255, 255, 255, 0.2) 25%, 
    transparent 25%, 
    transparent 50%, 
    rgba(255, 255, 255, 0.2) 50%, 
    rgba(255, 255, 255, 0.2) 75%, 
    transparent 75%, 
    transparent
  );
  background-size: 20px 20px;
  animation: moveStripes 1s linear infinite;
}

@keyframes moveStripes {
  0% { background-position: 0 0; }
  100% { background-position: 20px 0; }
}

.db-progress-footer {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Botón Logout en Sidebar */
.btn-logout {
  width: 100%;
  margin-top: 0.65rem;
  padding: 0.45rem 0.75rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
}

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