/* ================================================================
   AC TechPro — Dashboard CSS
   HMGroup S.A. de C.V.
   Design system: ice blue + dark navy
   ================================================================ */

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

/* ── Variables ── */
:root {
  --ice:        #0ea5e9;
  --ice-dark:   #0369a1;
  --ice-pale:   #e0f2fe;
  --cold:       #38bdf8;
  --frost:      #f0f9ff;
  --dark:       #0c1a2e;
  --dark2:      #112240;
  --dark3:      #1e3a5f;
  --white:      #ffffff;
  --gray:       #64748b;
  --gray-light: #f1f5f9;
  --gray-mid:   #e2e8f0;
  --green:      #10b981;
  --green-pale: #d1fae5;
  --red:        #ef4444;
  --red-pale:   #fee2e2;
  --amber:      #f59e0b;
  --amber-pale: #fef3c7;
  --border:     #e2e8f0;
  --sidebar-w:  240px;
  --topbar-h:   60px;
  --radius:     10px;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.05);
  --shadow-md:  0 4px 24px rgba(0,0,0,.1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  background: #f8fafc;
  color: #1e293b;
  overflow-x: hidden;
  font-size: 14px;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
ul { list-style: none; }

/* ================================================================
   LAYOUT — Sidebar + Main
   ================================================================ */
.dash-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.dash-sidebar {
  width: var(--sidebar-w);
  background: var(--dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 200;
  border-right: 1px solid rgba(255,255,255,.06);
  transition: transform .25s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  height: var(--topbar-h);
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--ice);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.sidebar-logo-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  letter-spacing: -.3px;
}
.sidebar-logo-sub {
  font-size: 9px;
  color: var(--cold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 1px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.nav-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  padding: 14px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.55);
  font-size: 13px;
  font-weight: 500;
  border-radius: 0;
  transition: all .15s;
  position: relative;
  margin: 1px 8px;
  border-radius: 8px;
}
.nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,.06);
}
.nav-item.active {
  color: var(--ice);
  background: rgba(14,165,233,.12);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--ice);
  border-radius: 0 2px 2px 0;
}
.nav-item i {
  font-size: 16px;
  width: 18px;
  flex-shrink: 0;
}
.nav-badge {
  margin-left: auto;
  background: var(--ice);
  color: var(--dark);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}
.nav-badge.red { background: var(--red); color: #fff; }
.nav-badge.amber { background: var(--amber); color: var(--dark); }

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background .15s;
}
.sidebar-user:hover { background: rgba(255,255,255,.05); }
.sidebar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--dark3);
  border: 2px solid rgba(14,165,233,.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--ice);
  flex-shrink: 0;
}
.sidebar-user-name {
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,.8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 10px; color: rgba(255,255,255,.35); letter-spacing: .5px;
}
.sidebar-user-arrow { margin-left: auto; color: rgba(255,255,255,.25); font-size: 12px; }

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

/* ── Topbar ── */
.dash-topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-hamburger {
  display: none;
  background: none; border: none;
  font-size: 20px; color: var(--gray);
  padding: 4px 6px;
}
.topbar-breadcrumb {
  font-size: 13px;
  color: var(--gray);
  display: flex; align-items: center; gap: 6px;
}
.topbar-breadcrumb span { color: #1e293b; font-weight: 600; }
.topbar-breadcrumb i { font-size: 10px; }
.topbar-spacer { flex: 1; }
.topbar-search {
  position: relative;
}
.topbar-search input {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px 7px 36px;
  font-size: 13px;
  color: #1e293b;
  outline: none;
  width: 220px;
  transition: all .2s;
}
.topbar-search input::placeholder { color: #94a3b8; }
.topbar-search input:focus { border-color: var(--ice); background: #fff; width: 260px; }
.topbar-search i {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: #94a3b8; font-size: 14px; pointer-events: none;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray);
  font-size: 16px;
  transition: all .15s;
  position: relative;
}
.topbar-btn:hover { border-color: var(--ice); color: var(--ice); }
.topbar-notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--red);
  border-radius: 50%;
  border: 1.5px solid #fff;
}
.topbar-divider { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.topbar-user-mini {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.topbar-user-mini:hover { background: #f8fafc; }
.topbar-user-mini .mini-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--dark2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--ice);
}
.topbar-user-mini .mini-name { font-size: 13px; font-weight: 600; color: #1e293b; }
.topbar-user-mini .mini-role { font-size: 10px; color: var(--gray); }

/* ── Page content ── */
.dash-content {
  padding: 28px;
  flex: 1;
}

/* ── Page header ── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.page-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px; font-weight: 700;
  color: var(--dark); letter-spacing: -.3px;
}
.page-subtitle {
  font-size: 13px; color: var(--gray); font-weight: 400; margin-top: 2px;
}
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  border: none; cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn i { font-size: 15px; }
.btn-primary {
  background: var(--ice);
  color: #fff;
}
.btn-primary:hover { background: var(--ice-dark); transform: translateY(-1px); }
.btn-secondary {
  background: #fff;
  color: #1e293b;
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--ice); color: var(--ice-dark); }
.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-danger:hover { background: #dc2626; }
.btn-ghost {
  background: transparent;
  color: var(--gray);
  border: 1.5px solid transparent;
}
.btn-ghost:hover { background: #f8fafc; border-color: var(--border); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-sm i { font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: 6px; }

/* ================================================================
   CARDS
   ================================================================ */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px; font-weight: 700; color: var(--dark);
}
.card-subtitle { font-size: 12px; color: var(--gray); margin-top: 2px; }
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ================================================================
   KPI CARDS
   ================================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
  width: 100%;
}
.kpi-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all .2s;
  overflow: hidden;
  min-width: 0;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.kpi-icon.blue  { background: var(--ice-pale); }
.kpi-icon.green { background: var(--green-pale); }
.kpi-icon.amber { background: var(--amber-pale); }
.kpi-icon.red   { background: var(--red-pale); }
.kpi-body { flex: 1; min-width: 0; }
.kpi-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: .8px; text-transform: uppercase;
  color: var(--gray); margin-bottom: 4px;
}
.kpi-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 26px; font-weight: 700;
  color: var(--dark); line-height: 1;
}
.kpi-trend {
  font-size: 11px; margin-top: 4px;
  display: flex; align-items: center; gap: 4px;
}
.kpi-trend.up   { color: var(--green); }
.kpi-trend.down { color: var(--red); }
.kpi-trend.neutral { color: var(--gray); }

/* ================================================================
   GRID LAYOUTS
   ================================================================ */
.dash-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.dash-row-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.dash-row-main-side {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-bottom: 20px;
}

/* ================================================================
   TABLES
   ================================================================ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead th {
  background: #f8fafc;
  padding: 11px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--gray);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #334155;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafbff; }
.td-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.td-actions { display: flex; gap: 6px; }

/* ================================================================
   BADGES / STATUS
   ================================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .3px; white-space: nowrap;
}
.badge-green  { background: var(--green-pale); color: #065f46; }
.badge-red    { background: var(--red-pale);   color: #991b1b; }
.badge-amber  { background: var(--amber-pale); color: #92400e; }
.badge-blue   { background: var(--ice-pale);   color: var(--ice-dark); }
.badge-gray   { background: #f1f5f9; color: var(--gray); }
.badge-dark   { background: var(--dark2); color: rgba(255,255,255,.8); }
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
}
.badge-green .badge-dot  { background: var(--green); }
.badge-red .badge-dot    { background: var(--red); }
.badge-amber .badge-dot  { background: var(--amber); }
.badge-blue .badge-dot   { background: var(--ice); }
.badge-gray .badge-dot   { background: var(--gray); }

/* ================================================================
   FORMS
   ================================================================ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: #475569; margin-bottom: 6px; letter-spacing: .3px;
}
.form-label span { color: var(--red); margin-left: 2px; }
.form-control {
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  color: #1e293b;
  outline: none;
  transition: all .2s;
}
.form-control:focus { border-color: var(--ice); box-shadow: 0 0 0 3px rgba(14,165,233,.1); }
.form-control::placeholder { color: #94a3b8; }
.form-control:disabled { background: #f8fafc; color: var(--gray); cursor: not-allowed; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.form-hint { font-size: 11px; color: var(--gray); margin-top: 5px; }
.form-error { font-size: 11px; color: var(--red); margin-top: 5px; }
.form-divider {
  border: none; border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ================================================================
   MODALS
   ================================================================ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(12,26,46,.55);
  backdrop-filter: blur(3px);
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: modalIn .2s ease;
}
.modal-lg { max-width: 740px; }
.modal-xl { max-width: 960px; }
@keyframes modalIn {
  from { transform: translateY(16px) scale(.98); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px; font-weight: 700; color: var(--dark);
}
.modal-close {
  width: 30px; height: 30px;
  border-radius: 7px; border: 1.5px solid var(--border);
  background: #fff; color: var(--gray);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all .15s;
}
.modal-close:hover { background: var(--red-pale); border-color: var(--red); color: var(--red); }
.modal-body { padding: 22px; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
}

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state {
  text-align: center;
  padding: 52px 24px;
  color: var(--gray);
}
.empty-state-icon {
  font-size: 40px; margin-bottom: 14px;
  opacity: .4;
}
.empty-state h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px; font-weight: 700;
  color: #475569; margin-bottom: 6px;
}
.empty-state p { font-size: 13px; max-width: 300px; margin: 0 auto 20px; }

/* ================================================================
   SEARCH / FILTER BAR
   ================================================================ */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.filter-search {
  display: flex; align-items: center; gap: 8px;
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  flex: 1; min-width: 200px;
}
.filter-search i { color: #94a3b8; font-size: 14px; }
.filter-search input {
  border: none; background: none;
  font-size: 13px; color: #1e293b; outline: none;
  width: 100%;
}
.filter-search input::placeholder { color: #94a3b8; }
.filter-select {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px; color: #475569;
  background: #fff; outline: none;
  cursor: pointer; transition: border-color .2s;
}
.filter-select:focus { border-color: var(--ice); }
.filter-spacer { flex: 1; }

/* ================================================================
   AVATAR / USER INFO
   ================================================================ */
.user-cell {
  display: flex; align-items: center; gap: 10px;
}
.user-cell-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--dark2);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--ice);
  flex-shrink: 0;
}
.user-cell-name { font-weight: 600; color: #1e293b; font-size: 13px; }
.user-cell-sub  { font-size: 11px; color: var(--gray); }

/* ================================================================
   PAGINATION
   ================================================================ */
.pagination {
  display: flex; align-items: center; gap: 4px;
  justify-content: center;
  padding: 16px;
}
.pg-btn {
  height: 32px; min-width: 32px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--gray);
  font-size: 13px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; cursor: pointer; padding: 0 10px;
}
.pg-btn:hover:not(:disabled) { border-color: var(--ice); color: var(--ice-dark); }
.pg-btn.active { background: var(--ice); border-color: var(--ice); color: #fff; font-weight: 700; }
.pg-btn:disabled { color: #cbd5e1; cursor: default; }
.pg-info { font-size: 12px; color: var(--gray); padding: 0 10px; }

/* ================================================================
   INLINE STATUS DOTS
   ================================================================ */
.status-dot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500;
}
.status-dot::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
}
.status-dot.online::before  { background: var(--green); box-shadow: 0 0 0 3px var(--green-pale); }
.status-dot.busy::before    { background: var(--amber); }
.status-dot.offline::before { background: var(--gray); }

/* ================================================================
   TIMELINE (historial de servicios)
   ================================================================ */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex; gap: 14px;
  padding-bottom: 20px; position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 15px; top: 32px; bottom: 0;
  width: 1px; background: var(--border);
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0; z-index: 1;
}
.timeline-dot.ice  { border-color: var(--ice); background: var(--ice-pale); }
.timeline-dot.green{ border-color: var(--green); background: var(--green-pale); }
.timeline-dot.amber{ border-color: var(--amber); background: var(--amber-pale); }
.timeline-body { flex: 1; padding-top: 4px; }
.timeline-title { font-weight: 600; font-size: 13px; color: #1e293b; }
.timeline-date  { font-size: 11px; color: var(--gray); margin-top: 2px; }
.timeline-desc  { font-size: 12px; color: #475569; margin-top: 6px; line-height: 1.6; }

/* ================================================================
   CHIPS / TAGS
   ================================================================ */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px; font-weight: 500;
  background: #f1f5f9; color: #475569;
  border: 1px solid var(--border);
}
.tag.blue { background: var(--ice-pale); color: var(--ice-dark); border-color: #bae6fd; }

/* ================================================================
   AUTH PAGE
   ================================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  background: var(--dark);
  position: relative;
  overflow: hidden;
}
.auth-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(14,165,233,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14,165,233,.05) 1px, transparent 1px);
  background-size: 48px 48px;
}
.auth-bg-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14,165,233,.12) 0%, transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  pointer-events: none;
}
.auth-card {
  position: relative; z-index: 2;
  margin: auto;
  width: 100%; max-width: 420px;
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}
.auth-logo {
  text-align: center; margin-bottom: 32px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.auth-logo-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--dark2);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.auth-logo-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px; font-weight: 800;
  color: var(--dark); letter-spacing: -.5px;
}
.auth-logo-sub {
  font-size: 10px; color: var(--gray);
  letter-spacing: 2px; text-transform: uppercase;
}
.auth-title { font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 6px; }
.auth-sub   { font-size: 13px; color: var(--gray); margin-bottom: 28px; }
.auth-footer {
  margin-top: 24px; text-align: center;
  font-size: 12px; color: var(--gray);
}

/* ================================================================
   DASHBOARD CHART PLACEHOLDER
   ================================================================ */
.chart-placeholder {
  height: 220px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray); font-size: 13px;
  border: 1.5px dashed var(--border);
}

/* ================================================================
   PROFILE / FICHA card
   ================================================================ */
.profile-hero {
  background: var(--dark2);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 28px;
  display: flex; align-items: flex-start; gap: 18px;
}
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--dark3);
  border: 3px solid rgba(14,165,233,.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: var(--ice);
  flex-shrink: 0;
}
.profile-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px; font-weight: 700; color: #fff;
  margin-bottom: 4px;
}
.profile-meta { font-size: 12px; color: rgba(255,255,255,.5); }
.profile-meta span { color: rgba(255,255,255,.7); margin-right: 14px; }
.profile-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.profile-tag {
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
  background: rgba(14,165,233,.15); color: var(--cold);
  border: 1px solid rgba(14,165,233,.3);
}

/* ================================================================
   PHOTO GRID (fotos de servicio)
   ================================================================ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.photo-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  position: relative; cursor: pointer;
  background: #f8fafc;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  padding: 8px 6px 4px;
  font-size: 9px; font-weight: 600; letter-spacing: .5px;
  text-transform: uppercase; color: rgba(255,255,255,.8);
}
.photo-add {
  aspect-ratio: 1; border-radius: 8px;
  border: 2px dashed var(--border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; cursor: pointer;
  background: #fafbfc; color: var(--gray);
  font-size: 12px; transition: all .2s;
}
.photo-add:hover { border-color: var(--ice); color: var(--ice); background: var(--ice-pale); }
.photo-add i { font-size: 22px; }

/* ================================================================
   STATS MINI
   ================================================================ */
.stats-mini {
  display: flex; gap: 0;
}
.stat-mini {
  flex: 1; padding: 14px 16px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.stat-mini:last-child { border-right: none; }
.stat-mini-val {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px; font-weight: 700; color: var(--dark);
}
.stat-mini-lbl { font-size: 10px; color: var(--gray); letter-spacing: .5px; text-transform: uppercase; margin-top: 3px; }

/* ================================================================
   AJUSTES MÓVIL GLOBALES
   ================================================================ */

/* KPI card — texto siempre alineado, sin overflow */
.kpi-body { min-width: 0; overflow: hidden; }
.kpi-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-trend { white-space: nowrap; overflow: hidden; }

/* Botones primarios — texto blanco siempre */
.btn-primary,
.btn-primary:visited { color: #fff !important; }

/* Modal footer — botón primario destacado */
.modal-footer .btn-primary { min-width: 120px; }
.modal-footer .btn-secondary { color: var(--gray); }

/* ApexCharts — no desborda en móvil */
.apexcharts-canvas { max-width: 100% !important; }
.apexcharts-legend { flex-wrap: wrap !important; }
.apexcharts-legend-text { font-size: 11px !important; }

/* Card header en móvil — no se rompe */
.card-header { flex-wrap: wrap; gap: 8px; }
.card-title { min-width: 0; }

/* Tabla — min-width para no colapsar en scroll */
.table-wrap table { min-width: 560px; }

/* Badge — no parte palabras */
.badge { white-space: nowrap; }

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

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-row-main-side { grid-template-columns: 1fr; }
  .dash-row-3col { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .dash-sidebar { transform: translateX(-100%); box-shadow: none; transition: transform .25s ease, box-shadow .25s ease; }
  .dash-sidebar.open { transform: translateX(0); box-shadow: 6px 0 32px rgba(0,0,0,.45); }
  .dash-main { margin-left: 0 !important; width: 100%; }
  .topbar-hamburger { display: flex !important; }
  .topbar-search { display: none; }
  .dash-content { padding: 14px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-card { padding: 14px 12px; gap: 10px; }
  .kpi-icon { width: 38px; height: 38px; font-size: 18px; flex-shrink: 0; }
  .kpi-value { font-size: 24px; }
  .kpi-label { font-size: 10px; }
  .dash-row-2col, .dash-row-3col, .dash-row-main-side { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-actions { width: 100%; justify-content: flex-start; }
  .page-title { font-size: 20px; }
  .modal-backdrop { align-items: flex-end; padding: 0 10px 0; }
  .modal { border-radius: 18px 18px 0 0; max-width: 100%; max-height: 92vh; margin: 0 auto; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .col-hide-mobile { display: none !important; }
}

@media (max-width: 480px) {
  .dash-content { padding: 10px; }
  /* KPIs sin overflow */
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi-card { padding: 12px 10px; gap: 8px; min-width: 0; overflow: hidden; }
  .kpi-value { font-size: 22px; line-height: 1; }
  .kpi-icon { width: 32px; height: 32px; font-size: 15px; flex-shrink: 0; border-radius: 8px; }
  .kpi-label { font-size: 9px; letter-spacing: .4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kpi-trend { font-size: 9px; white-space: nowrap; overflow: hidden; }
  .kpi-trend i { display: none; }
  .topbar-divider, .topbar-user-mini .mini-name, .topbar-user-mini .mini-role { display: none; }
  .dash-topbar { padding: 0 12px; gap: 8px; }
  thead th { padding: 9px 10px; font-size: 10px; }
  tbody td { padding: 10px; font-size: 12px; }
  .user-cell-avatar { width: 28px; height: 28px; font-size: 11px; }
  .user-cell-name { font-size: 12px; }
  .user-cell-sub { font-size: 10px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-search { max-width: 100% !important; }
  .filter-select { width: 100%; }
  .btn { font-size: 12px; padding: 8px 14px; }
  .pg-btn { height: 28px; min-width: 28px; font-size: 12px; }

  /* Modal en móvil pequeño — margen lateral visible */
  .modal-backdrop { padding: 0 8px; }
  .modal { border-radius: 16px 16px 0 0; }
  .modal-header { padding: 14px 16px; }
  .modal-body { padding: 16px; }
  .modal-footer { padding: 12px 16px; gap: 8px; }
  .modal-footer .btn { flex: 1; justify-content: center; }

  /* Textos centrados en empty-states y cards de stats */
  .empty-state { padding: 28px 16px; }
  .stat-mini-val { font-size: 18px; }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 199;
}
.sidebar-overlay.show { display: block; }
