/* ============================================================
   BioPure — Sistema de Gestión de Arriendos — Demo Styles
   Basado en guía de estilo de www.biopure.cl
   ============================================================ */

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

/* ----- CSS Variables ----- */
:root {
  --navy: #041027;
  --navy-light: #0a1a3a;
  --navy-lighter: #0f2347;
  --blue-primary: #1177B8;
  --blue-hover: #0e619a;
  --orange: #FB9440;
  --orange-hover: #e8832f;
  --orange-light: rgba(251, 148, 64, 0.1);
  --yellow: #F9B91C;
  --cyan: #00B5DB;
  --bg-light: #F4F7FA;
  --bg-page: #eef2f7;
  --white: #FFFFFF;
  --text-primary: #041027;
  --text-secondary: #616477;
  --text-gray: #787A89;
  --text-muted: #9ca3af;
  --border: #e2e8f0;
  --border-light: #f0f0f5;
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --info: #1177B8;
  --info-bg: rgba(17, 119, 184, 0.08);
  --sidebar-width: 260px;
  --header-height: 60px;
  --shadow-sm: 0 1px 3px rgba(4, 16, 39, 0.06);
  --shadow-md: 0 4px 12px rgba(4, 16, 39, 0.08);
  --shadow-lg: 0 10px 30px rgba(4, 16, 39, 0.1);
  --shadow-card: 0 2px 8px rgba(4, 16, 39, 0.06);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 15px;
  --radius-xl: 20px;
  --radius-pill: 36px;
  --transition: 0.25s ease;
}

/* ----- Reset & Base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Lato', sans-serif;
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--orange); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
h1, h2, h3, h4, h5, h6 { font-family: 'Montserrat', sans-serif; font-weight: 600; line-height: 1.3; color: var(--text-primary); }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; font-weight: 700; }

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

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg, var(--navy));
  color: var(--white);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), background .3s ease;
  overflow-y: auto;
}
.sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-header img { height: 32px; width: auto; }
.sidebar-header .app-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.sidebar-nav { flex: 1; padding: 16px 0; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  color: rgba(255,255,255,0.6);
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.04);
}
.sidebar-nav a.active {
  color: var(--white);
  background: var(--module-accent-bg, rgba(251, 148, 64, 0.1));
  border-left-color: var(--module-accent, var(--orange));
  font-weight: 600;
}
.sidebar-nav a i { width: 20px; text-align: center; font-size: 1rem; }
.sidebar-nav .nav-section {
  font-family: 'Poppins', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.3);
  padding: 20px 24px 8px;
}
.sidebar-user {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-user .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--white);
}
.sidebar-user .user-info { flex: 1; min-width: 0; }
.sidebar-user .user-name { font-size: 0.85rem; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .user-role { font-size: 0.7rem; color: rgba(255,255,255,0.45); }

/* Main content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Header Bar */
.top-bar {
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.top-bar-left { display: flex; align-items: center; gap: 16px; }
.top-bar-left h1 { font-size: 1.15rem; font-weight: 600; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-gray); }
.breadcrumb a { color: var(--text-gray); }
.breadcrumb a:hover { color: var(--blue-primary); }
.breadcrumb .sep { color: var(--text-muted); }
.top-bar-right { display: flex; align-items: center; gap: 16px; }
.top-bar-right .icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--bg-light);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--transition);
}
.top-bar-right .icon-btn:hover { background: var(--border); color: var(--text-primary); }
.icon-btn .badge-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--white);
}
.uf-badge {
  background: var(--info-bg);
  color: var(--blue-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.hamburger { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.3rem; cursor: pointer; }

/* Page Content */
.page-content { padding: 28px 32px; flex: 1; }

/* ----- Cards ----- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h2 { font-size: 1rem; font-weight: 700; }
.card-header h3 { font-size: 0.95rem; font-weight: 600; }
.card-body { padding: 24px; }
.card-footer { padding: 14px 24px; border-top: 1px solid var(--border-light); background: var(--bg-light); }

/* ----- Stat Cards ----- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.stat-icon.blue { background: var(--info-bg); color: var(--blue-primary); }
.stat-icon.orange { background: var(--orange-light); color: var(--orange); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.yellow { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-icon.cyan { background: rgba(0,181,219,0.1); color: var(--cyan); }
.stat-info { flex: 1; }
.stat-label { font-size: 0.78rem; color: var(--text-gray); font-weight: 400; margin-bottom: 4px; }
.stat-value { font-family: 'Montserrat', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.stat-change { font-size: 0.75rem; margin-top: 4px; font-weight: 600; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ----- Tables ----- */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-gray);
  background: var(--bg-light);
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
}
tbody td {
  padding: 14px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: rgba(17, 119, 184, 0.03); }
tbody tr:last-child td { border-bottom: none; }

/* ----- Badges / Pills ----- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-neutral { background: var(--bg-light); color: var(--text-gray); }
.badge-orange { background: var(--orange-light); color: var(--orange); }
.badge i { font-size: 0.6rem; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(251,148,64,0.3); }
.btn-secondary { background: transparent; color: var(--orange); border: 2px solid var(--orange); }
.btn-secondary:hover { background: var(--orange); color: var(--white); }
.btn-ghost { background: var(--bg-light); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border); color: var(--text-primary); }
.btn-sm { padding: 6px 14px; font-size: 0.75rem; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 50%; justify-content: center; }
.btn-blue { background: var(--blue-primary); color: var(--white); }
.btn-blue:hover { background: var(--blue-hover); }

/* ----- Forms ----- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus { outline: none; border-color: var(--blue-primary); box-shadow: 0 0 0 3px rgba(17,119,184,0.1); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
.search-box {
  position: relative;
  max-width: 320px;
}
.search-box input { padding-left: 38px; }
.search-box i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.85rem; }

/* ----- Filters Bar ----- */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--white);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-chip:hover, .filter-chip.active { background: var(--blue-primary); color: var(--white); border-color: var(--blue-primary); }

/* ----- Grid Layouts ----- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-sidebar { display: grid; grid-template-columns: 340px 1fr; gap: 24px; }

/* ----- Detail panel ----- */
.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}
.detail-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-primary), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
  flex-shrink: 0;
}
.detail-title { font-size: 1.15rem; font-weight: 700; }
.detail-subtitle { font-size: 0.82rem; color: var(--text-gray); margin-top: 2px; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.info-item {}
.info-label { font-size: 0.72rem; color: var(--text-gray); text-transform: uppercase; letter-spacing: 0.5px; font-family: 'Poppins', sans-serif; font-weight: 600; }
.info-value { font-size: 0.9rem; font-weight: 500; margin-top: 2px; }

/* ----- Tabs ----- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  padding: 10px 20px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-gray);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--blue-primary); border-bottom-color: var(--blue-primary); font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ----- Timeline ----- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 24px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 3px solid var(--blue-primary);
  background: var(--white);
}
.timeline-dot.completed { background: var(--success); border-color: var(--success); }
.timeline-dot.warning { background: var(--warning); border-color: var(--warning); }
.timeline-date { font-size: 0.72rem; color: var(--text-gray); font-weight: 600; }
.timeline-text { font-size: 0.85rem; margin-top: 4px; }

/* ----- Calendar mini ----- */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.calendar-grid .day-header { font-size: 0.7rem; font-weight: 600; color: var(--text-gray); padding: 8px 4px; }
.calendar-grid .day {
  padding: 8px 4px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.calendar-grid .day:hover { background: var(--bg-light); }
.calendar-grid .day.today { background: var(--blue-primary); color: var(--white); font-weight: 700; }
.calendar-grid .day.has-event { position: relative; }
.calendar-grid .day.has-event::after { content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.calendar-grid .day.other-month { color: var(--text-muted); }

/* ----- Modal ----- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(4, 16, 39, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h2 { font-size: 1.1rem; }
.modal-close { background: none; border: none; font-size: 1.3rem; color: var(--text-gray); cursor: pointer; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 12px; }

/* ----- Alert Banners ----- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.alert-warning { background: var(--warning-bg); color: #92400e; border-left: 3px solid var(--warning); }
.alert-info { background: var(--info-bg); color: var(--blue-primary); border-left: 3px solid var(--blue-primary); }
.alert-success { background: var(--success-bg); color: #065f46; border-left: 3px solid var(--success); }
.alert i { margin-top: 2px; }

/* ----- Empty State ----- */
.empty-state { text-align: center; padding: 60px 24px; }
.empty-state i { font-size: 3rem; color: var(--text-muted); margin-bottom: 16px; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { color: var(--text-gray); font-size: 0.875rem; }

/* ----- Progress bar ----- */
.progress { height: 6px; background: var(--bg-light); border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.progress-bar.blue { background: var(--blue-primary); }
.progress-bar.orange { background: var(--orange); }
.progress-bar.green { background: var(--success); }

/* ----- Pagination ----- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 20px; }
.pagination button {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition);
}
.pagination button:hover { background: var(--bg-light); }
.pagination button.active { background: var(--blue-primary); color: var(--white); border-color: var(--blue-primary); }

/* ----- Utility ----- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.72rem; }
.text-muted { color: var(--text-gray); }
.text-right { text-align: right; }
.font-mono { font-family: 'SF Mono', 'Consolas', monospace; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clickable { cursor: pointer; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ----- Login Page ----- */
.login-page {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-lighter) 50%, var(--blue-primary) 100%);
}
.login-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-left img { height: 48px; margin-bottom: 32px; }
.login-left h1 { color: var(--white); font-size: 2rem; text-align: center; margin-bottom: 8px; }
.login-left p { color: rgba(255,255,255,0.6); text-align: center; font-size: 0.95rem; }
.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  margin-top: 32px;
}
.login-card h2 { text-align: center; margin-bottom: 28px; }
.login-card .btn { width: 100%; justify-content: center; padding: 13px; font-size: 0.95rem; }

/* ----- Responsive ----- */
@media (max-width: 1024px) {
  .grid-sidebar { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .hamburger { display: block; }
  .top-bar { padding: 0 16px; }
  .page-content { padding: 20px 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .uf-badge { display: none; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-left { padding: 24px; }
  .login-card { padding: 28px; }
}

/* ============================================================
   V2 — New Components
   ============================================================ */

/* Toast notifications */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 20px; border-radius: 8px; color: #fff; font-size: 13px; font-family: var(--font-body); box-shadow: 0 4px 12px rgba(0,0,0,.15); transform: translateX(120%); transition: transform .3s ease; display: flex; align-items: center; gap: 8px; max-width: 420px; }
.toast.show { transform: translateX(0); }
.toast-success { background: var(--success); }
.toast-warning { background: var(--warning); }
.toast-info { background: var(--primary); }
.toast-error { background: var(--danger); }

/* Workflow stepper */
.workflow-stepper { display: flex; align-items: flex-start; gap: 0; margin: 16px 0; }
.workflow-step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.workflow-step .step-circle { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: #fff; background: var(--border); z-index: 1; }
.workflow-step.active .step-circle { background: var(--primary); }
.workflow-step.done .step-circle { background: var(--success); }
.workflow-step .step-label { font-size: 11px; margin-top: 4px; color: var(--text-muted); text-align: center; }
.workflow-step .step-date { font-size: 10px; color: var(--text-muted); }
.workflow-step:not(:last-child)::after { content: ''; position: absolute; top: 16px; left: calc(50% + 16px); width: calc(100% - 32px); height: 2px; background: var(--border); z-index: 0; }
.workflow-step.done:not(:last-child)::after { background: var(--success); }

/* Simulation / Fase 2 badge */
.badge-simulated { background: rgba(251,148,64,.12); color: var(--accent); font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; display: inline-block; margin-left: 6px; }

/* Config panel rows */
.config-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.config-row:last-child { border-bottom: none; }
.config-row label { flex: 1; font-size: 13px; color: var(--text-primary); }
.config-row input[type="number"] { width: 60px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; text-align: center; background: var(--bg); color: var(--text-primary); }
.config-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }

/* Integration cards */
.integration-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.integration-card .int-header { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.integration-card .int-detail { font-size: 12px; color: var(--text-muted); }
.integration-card .int-value { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.online { background: var(--success); }
.status-dot.offline { background: var(--danger); }
.status-dot.warning { background: var(--warning); }

/* Phone frame mockup */
.phone-frame { max-width: 375px; margin: 0 auto; border: 3px solid #555; border-radius: 28px; padding: 16px 12px; background: var(--bg); box-shadow: 0 8px 32px rgba(0,0,0,.2); }
.phone-frame .phone-notch { width: 100px; height: 5px; background: #555; border-radius: 4px; margin: 0 auto 16px; }

/* Alert banners */
.alert-banner { padding: 12px 16px; border-radius: 8px; font-size: 13px; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.alert-banner.alert-warning { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); color: var(--warning); }
.alert-banner.alert-info { background: rgba(17,119,184,.08); border: 1px solid rgba(17,119,184,.2); color: var(--primary); }
.alert-banner.alert-danger { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2); color: var(--danger); }
.alert-banner a { color: inherit; font-weight: 600; text-decoration: underline; }

/* Inline sub-form */
.sub-form { background: rgba(17,119,184,.04); border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-top: 12px; }
.sub-form .form-title { font-size: 13px; font-weight: 600; margin-bottom: 12px; color: var(--text-primary); }

/* Hint text */
.hint-text { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Section divider */
.section-divider { border-top: 1px solid var(--border); margin: 20px 0; padding-top: 16px; }
.section-divider h4 { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
