/* =====================================================================
   Montero Campo — capa de diseño del panel (app.serviciosmontero.tech)
   Se carga DESPUÉS de app.css y lo alinea con montero-ui.css de Laravel:
   mismos colores, barra superior blanca, menú lateral oscuro con foto,
   encabezados con el degradado de la marca, tarjetas, botones y campos.
   ===================================================================== */

:root {
  /* tokens del panel (montero-ui.css) */
  --mu-marca: #0567A1; --mu-marca-2: #0B7BC0; --mu-marca-osc: #034A75; --mu-marca-suave: #EAF4FB;
  --mu-marca-anillo: rgba(5, 103, 161, .16);
  --mu-hero: radial-gradient(120% 140% at 0% 0%, #0B7BC0 0%, #0567A1 30%, #2563EB 70%, #4F46E5 100%);
  --mu-texto: #0F172A; --mu-texto-2: #334155; --mu-suave: #64748B; --mu-borde: #E2E8F0; --mu-borde-2: #F1F5F9;
  --mu-lateral: #0B1220; --mu-lateral-2: #131C2E; --mu-lateral-texto: #94A3B8;

  /* las variables propias de Campo pasan a los colores del panel */
  --primary: #0567A1; --primary-light: #0B7BC0; --primary-dark: #034A75; --primary-50: #EAF4FB;
  --success: #16A34A; --success-light: #ECFDF5;
  --danger: #DC2626;  --danger-light: #FEF2F2;
  --warning: #F59E0B; --warning-light: #FFFBEB;
  --info: #0EA5E9;
  --bg: #F4F6FA; --card: #FFFFFF; --text: #0F172A; --text-muted: #64748B; --text-light: #94A3B8;
  --border: #E2E8F0; --border-light: #F1F5F9;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, .08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .14);
  --radius: 14px; --radius-sm: 10px; --radius-xs: 8px;
  --header-height: 56px;
}

body { background: var(--bg); font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--mu-texto); }

/* ── Barra superior: blanca, como el panel ──────────────────────────── */
.app-header {
  background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--mu-borde); box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.hamburger-btn { background: var(--mu-borde-2); color: var(--mu-texto-2); border-radius: 10px; }
.hamburger-btn:active { background: var(--mu-borde); }
.header-logo img { height: 30px; border-radius: 8px; }
.header-title { color: var(--mu-texto); font-weight: 800; letter-spacing: -.01em; }
.ultimo-sync-text, .header-user { color: var(--mu-suave); }
.header-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; overflow: hidden; display: grid; place-items: center;
                 background: var(--mu-hero); color: #fff; font-weight: 700; font-size: .78rem; text-decoration: none;
                 box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(15, 23, 42, .18); }
.header-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Menú lateral: oscuro, con logo, foto, nombre y rol ─────────────── */
.sidebar { background: var(--mu-lateral); color: var(--mu-lateral-texto); border-right: 0; box-shadow: none; }
.sidebar.open { box-shadow: 8px 0 32px rgba(2, 6, 23, .35); }   /* sin sombra cuando está cerrado (se veía en el borde) */
.sidebar-header { background: transparent; border-bottom: 1px solid rgba(255, 255, 255, .06); padding: calc(16px + env(safe-area-inset-top)) 16px 14px; flex-direction: column; align-items: stretch; gap: 14px; }
.sidebar-marca { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1rem; letter-spacing: -.01em; }
.sidebar-marca img { width: 34px; height: 34px; border-radius: 9px; background: #fff; padding: 3px; object-fit: contain; }
.sidebar-logo { display: none; }
.sidebar-close-btn { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 12px; background: rgba(255, 255, 255, .08); color: #CBD5E1; border-radius: 10px; }
.sidebar-perfil { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.sidebar-perfil:active { background: rgba(255, 255, 255, .08); }
.sidebar-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: grid; place-items: center;
                  background: var(--mu-hero); color: #fff; font-weight: 800; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-username { color: #fff; font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sidebar-role { color: var(--mu-lateral-texto); font-size: .76rem; display: block; }
.sidebar-section-title { color: #64748B; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; padding: 14px 18px 6px; }
.sidebar-modules { padding: 4px 10px; }
.sidebar-item { color: var(--mu-lateral-texto); border-radius: 10px; margin: 2px 0; padding: 11px 12px; font-weight: 500; font-size: .92rem; background: transparent; }
.sidebar-item i { color: #64748B; width: 22px; text-align: center; }
.sidebar-item:active { background: var(--mu-lateral-2); }
.sidebar-item.active { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 3px 0 0 var(--mu-marca-2); }
.sidebar-item.active::before { display: none; }
.sidebar-item.active i { color: #fff; }
.sidebar-badge { background: #DC2626; color: #fff; }
.sidebar-divider { background: rgba(255, 255, 255, .06); }
.sidebar-footer { border-top: 1px solid rgba(255, 255, 255, .06); background: transparent; }
.sidebar-logout-btn { background: rgba(220, 38, 38, .12); color: #FCA5A5; border: 0; border-radius: 10px; }
.sidebar-overlay { background: rgba(15, 23, 42, .5); }

/* ── Encabezado de cada página: tarjeta con el degradado de la marca ─ */
.page-header {
  position: relative; top: auto; z-index: 1; margin: 14px 14px 10px; padding: 16px 18px; border-radius: 20px; overflow: hidden;
  background: var(--mu-hero); box-shadow: 0 18px 40px -18px rgba(5, 103, 161, .55);
}
.page-header::after { content: ''; position: absolute; right: -70px; top: -80px; width: 240px; height: 240px; border-radius: 50%;
                      background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 70%); pointer-events: none; }
.page-header > * { position: relative; z-index: 1; }
.page-header h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.page-header .btn-icon { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); color: #fff; border-radius: 12px; width: 40px; height: 40px; }

/* buscador y pestañas dentro del encabezado: caja blanca como en el panel */
.page-header .search-box { background: #fff; border: 0; border-radius: 12px; height: 46px; padding: 0 14px; backdrop-filter: none; box-shadow: 0 4px 14px -6px rgba(15, 23, 42, .35); }
.page-header .search-box input { color: var(--mu-texto); font-size: 16px; height: 100%; box-shadow: none !important; }
.page-header .search-box input::placeholder { color: #94A3B8; }
.page-header .search-box i { color: #94A3B8; }
.filter-tabs { gap: 6px; }
.filter-tab { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); color: #fff; border-radius: 999px; font-weight: 700; }
.filter-tab.active { background: #fff; color: var(--mu-marca); border-color: #fff; box-shadow: 0 4px 12px -4px rgba(15, 23, 42, .35); }

/* ── Tarjetas, botones, campos y avisos ─────────────────────────────── */
.card, .orden-card, .dir-card, .tarea-card, .pendiente-card, .galeria-card, .seccion-card, .accordion-item {
  border-radius: 14px; border: 1px solid #EAEFF5; box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
.btn { border-radius: 10px; font-weight: 700; font-family: inherit; }
.btn-primary { background: var(--mu-marca); border-color: var(--mu-marca); box-shadow: 0 8px 20px -10px rgba(5, 103, 161, .8); }
.btn-primary:active { background: var(--mu-marca-osc); }
.btn-success { background: var(--success); border-color: var(--success); }
input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--mu-marca) !important; box-shadow: 0 0 0 4px var(--mu-marca-anillo) !important; }
.toast { border-radius: 12px; background: #0F172A; box-shadow: 0 12px 30px rgba(15, 23, 42, .35); font-family: inherit; }
.empty-state i { color: #CBD5E1; }
.badge { border-radius: 999px; font-weight: 700; }
.badge-pendiente  { background: #FEF3C7; color: #92400E; }
.badge-iniciado, .badge-proceso { background: #DBEAFE; color: #1D4ED8; }
.badge-finalizado { background: #DCFCE7; color: #166534; }
.badge-cancelado  { background: #F1F5F9; color: #64748B; }
