/* =========================
   SmartRoute Control Panel UI
   ========================= */

:root{
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e5e7eb;

  --primary: #2563eb;
  --primary-700: #1d4ed8;

  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;

  --shadow: 0 8px 20px rgba(15,23,42,.04);
  --radius: 12px;
}

/* ==========
   Reset básico
   ========== */
*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  font-family:system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg, #f8fafc);
  color:var(--text, #0f172a);
  font-size:.72rem;
  font-weight:500;
  line-height:1.4;
}

/* ==========
   Layout
   ========== */
.layout{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.main{
  flex:1;
  display:flex;
  flex-direction:column;
  width:100%;
  padding-left:0 !important;
  padding-right:0 !important;
  background:var(--bg);
}

.cp-container{
  width:100%;
  max-width:none;
  margin:0;
  padding:0 16px;
  flex:1;
  display:flex;
  flex-direction:column;
}

/* ==========
   Top Nav
   ========== */
.topnav{
  position:sticky;
  top:0;
  z-index:50;
  background:#ffffff;
  border-bottom:1px solid var(--border, #e5e7eb);
  box-shadow:0 8px 18px rgba(15,23,42,.04);
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.topnav-left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.topnav-logo{
  width:32px;
  height:32px;
  border-radius:10px;
  display:grid;
  place-items:center;
  background:rgba(37,99,235,.12);
  color:#1d4ed8;
  font-weight:600;
  font-size:.68rem;
}

.topnav-title{
  font-weight:600;
  color:#0f172a;
  margin-right:4px;
  font-size:.74rem;
  line-height:1.3;
}

.topnav-nav{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  align-items:center;
}

.topnav-nav a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 9px;
  border-radius:999px;
  text-decoration:none;
  color:#0f172a;
  border:1px solid transparent;
  font-weight:600;
  font-size:.66rem;
  line-height:1.2;
  transition:background .15s ease, border-color .15s ease;
}

.topnav-nav a:hover{
  background:rgba(37,99,235,.06);
  border-color:rgba(37,99,235,.18);
}

.topnav-nav a.active{
  background:rgba(37,99,235,.12);
  border-color:rgba(37,99,235,.25);
  color:#1d4ed8;
}

.nav-icon{
  line-height:1;
}

.topnav-user{
  font-size:.66rem;
  color:#334155;
  white-space:nowrap;
  font-weight:500;
}

.topnav-user a{
  color:#1d4ed8;
  text-decoration:none;
  font-weight:600;
}

.topnav-user a:hover{
  text-decoration:underline;
}

/* ==========
   Header de página
   ========== */
.page-header{
  width:100%;
  max-width:none;
  margin:0 0 10px;
  padding:0 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.page-header-title{
  font-size:.78rem;
  font-weight:600;
  color:#0f172a;
  line-height:1.3;
}

/* =========================
   Page / Card
   ========================= */

.cp-page{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.cp-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:14px 16px;
}

.cp-card-title{
  font-size:.82rem;
  font-weight:600;
  color:var(--text);
  margin:0;
  line-height:1.3;
}

.cp-card-subtitle{
  font-size:.68rem;
  font-weight:500;
  color:var(--muted);
  margin-top:4px;
  line-height:1.45;
}

.cp-divider{
  height:1px;
  background:var(--border);
  margin:10px 0;
}

/* ---------- Forms ---------- */
.cp-form{
  display:grid;
  gap:10px;
}

.cp-grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

@media (max-width: 760px){
  .cp-grid-2{ grid-template-columns:1fr; }
}

.cp-field{
  display:flex;
  flex-direction:column;
  gap:5px;
}

.cp-label{
  font-size:.7rem;
  font-weight:600;
  color:#334155;
  line-height:1.3;
}

.cp-help{
  font-size:.68rem;
  font-weight:500;
  color:var(--muted);
  line-height:1.4;
}

.cp-error{
  font-size:.66rem;
  font-weight:500;
  color:var(--danger);
  margin-top:2px;
  line-height:1.4;
}

.cp-input,
.cp-select,
.cp-textarea{
  width:100%;
  border:1px solid var(--border);
  border-radius:10px;
  padding:8px 10px;
  background:#fff;
  font-size:.7rem;
  font-weight:500;
  color:var(--text);
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease, transform .05s ease;
  line-height:1.35;
  min-height:38px;
}

.cp-textarea{
  min-height:84px;
  resize:vertical;
}

.cp-input:focus,
.cp-select:focus,
.cp-textarea:focus{
  border-color:rgba(37,99,235,.7);
  box-shadow:0 0 0 3px rgba(37,99,235,.10);
}

.cp-input[disabled],
.cp-select[disabled],
.cp-textarea[disabled]{
  background:#f1f5f9;
  cursor:not-allowed;
}

/* ---------- Buttons ---------- */
.cp-actions-bar{
  display:flex;
  justify-content:flex-start;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.cp-btn{
  border:1px solid transparent;
  border-radius:999px;
  padding:7px 12px;
  min-height:32px;
  font-size:.7rem;
  font-weight:600;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:6px;
  transition:transform .05s ease, background .15s ease, border-color .15s ease;
  user-select:none;
  line-height:1.2;
}

.cp-btn:active{ transform:translateY(1px); }

.cp-btn-primary{
  background:var(--primary);
  color:#fff;
}

.cp-btn-primary:hover{
  background:var(--primary-700);
}

.cp-btn-secondary{
  background:#fff;
  border-color:var(--border);
  color:#0f172a;
}

.cp-btn-secondary:hover{
  background:#f8fafc;
}

.cp-btn-danger{
  background:#fff;
  border-color:rgba(239,68,68,.35);
  color:#b91c1c;
}

.cp-btn-danger:hover{
  background:rgba(239,68,68,.06);
  border-color:rgba(239,68,68,.55);
}

.cp-btn[disabled],
.cp-btn.disabled{
  opacity:.6;
  cursor:not-allowed;
}

/* ---------- Filters ---------- */
.cp-filters{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:flex-end;
}

.cp-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 9px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
  font-size:.66rem;
  font-weight:500;
  color:var(--muted);
  line-height:1.2;
}

/* ---------- Tables ---------- */
.cp-table-wrap{
  background:#ffffff;
  overflow-x:auto;
  border:1px solid var(--border);
  border-radius:10px;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
}

.cp-table{
  width:100%;
  border-collapse:collapse;
  min-width:860px;
  background:#fff;
}

.cp-table th{
  text-align:left;
  font-size:.66rem;
  color:#475569;
  font-weight:600;
  padding:9px 10px;
  background:#f1f5f9;
  border-bottom:1px solid var(--border);
  white-space:nowrap;
  line-height:1.3;
}

.cp-table td{
  padding:10px 10px;
  border-bottom:1px solid var(--border);
  font-size:.7rem;
  font-weight:500;
  color:#0f172a;
  vertical-align:middle;
  background:#ffffff;
  line-height:1.4;
}

.cp-table tr:hover td{
  background:rgba(37,99,235,.03);
}

/* ---------- Badges (estado) ---------- */
.cp-badge{
  display:inline-flex;
  align-items:center;
  padding:4px 9px;
  border-radius:999px;
  font-size:.64rem;
  font-weight:600;
  line-height:1.2;
  border:1px solid transparent;
}

.cp-badge-pending{
  color:#92400e;
  background:rgba(245,158,11,.14);
  border-color:rgba(245,158,11,.25);
}

.cp-badge-approved{
  color:#166534;
  background:rgba(22,163,74,.14);
  border-color:rgba(22,163,74,.22);
}

.cp-badge-rejected{
  color:#991b1b;
  background:rgba(239,68,68,.10);
  border-color:rgba(239,68,68,.22);
}

.cp-badge-canceled{
  color:#334155;
  background:rgba(100,116,139,.10);
  border-color:rgba(100,116,139,.22);
}

/* ---------- Alerts ---------- */
.cp-alert{
  border-radius:10px;
  padding:9px 10px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  font-size:.7rem;
  font-weight:500;
  line-height:1.4;
}

.cp-alert-success{
  border-color:rgba(22,163,74,.25);
  background:rgba(22,163,74,.08);
}

.cp-alert-danger{
  border-color:rgba(239,68,68,.25);
  background:rgba(239,68,68,.08);
}

/* =========================
   Dashboard
   ========================= */

.dash-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(190px, 1fr));
  gap:10px;
  margin-bottom:14px;
}

.dash-stat{
  background:#ffffff;
  border-radius:12px;
  padding:12px 14px;
  border:1px solid var(--border, #e5e7eb);
  box-shadow:0 8px 18px rgba(15,23,42,.04);
}

.dash-stat-kicker{
  font-size:.58rem;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:var(--muted, #64748b);
  margin-bottom:4px;
  font-weight:600;
  line-height:1.2;
}

.dash-stat-value{
  font-size:.9rem;
  font-weight:600;
  color:var(--text, #0f172a);
  line-height:1.15;
}

.dash-stat-sub{
  font-size:.64rem;
  font-weight:500;
  color:var(--muted, #64748b);
  margin-top:4px;
  line-height:1.35;
}

.dash-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}

/* ---- Charts ---- */

.dash-charts{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:12px;
  margin-top:8px;
}

.dash-chart-card{
  background:#ffffff;
  border-radius:12px;
  border:1px solid var(--border, #e5e7eb);
  padding:12px 14px;
  box-shadow:0 8px 18px rgba(15,23,42,.04);
}

.dash-chart-title{
  font-size:.72rem;
  font-weight:600;
  color:var(--text, #0f172a);
  margin-bottom:4px;
  line-height:1.3;
}

.dash-chart-sub{
  font-size:.64rem;
  font-weight:500;
  color:var(--muted, #64748b);
  margin-bottom:8px;
  line-height:1.4;
}

.dash-chart-card canvas{
  width:100% !important;
  height:auto !important;
}

/* ========== Reset básico ========== */
*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  min-height:100vh;
  font-family:system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  font-size:.72rem;
  font-weight:500;
  line-height:1.4;
}

/* ========== Layout full screen ========== */
.layout{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.main{
  flex:1;
  display:flex;
  flex-direction:column;
  width:100%;
  padding:12px 14px 20px;
  background:var(--bg);
}

.cp-container{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 14px !important;
}

.cp-page{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:12px;
  min-height:calc(100vh - 130px);
}

/* Sección dentro de formularios */
.cp-section{
  display:grid;
  gap:8px;
}

.cp-section-title{
  font-size:.74rem;
  font-weight:600;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:2px;
  line-height:1.3;
}

.cp-section-title::before{
  content:"";
  width:4px;
  height:14px;
  border-radius:999px;
  background:rgba(37,99,235,.9);
}

.cp-role-badge{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:3px 9px;
  font-size:.64rem;
  font-weight:600;
  line-height:1.2;
  background:rgba(37,99,235,.10);
  color:#1d4ed8;
  border:1px solid rgba(37,99,235,.22);
}

.cp-info{
  margin-top:4px;
  border-radius:10px;
  padding:9px 10px;
  border:1px dashed var(--border);
  background:#fff;
  color:#334155;
  font-size:.66rem;
  font-weight:500;
  line-height:1.4;
}

/* ====== Absence form: fallback si widgets no tienen cp-* ====== */
.cp-card input[type="text"],
.cp-card input[type="date"],
.cp-card input[type="time"],
.cp-card input[type="number"],
.cp-card input[type="email"],
.cp-card input[type="search"],
.cp-card select,
.cp-card textarea{
  width:100%;
  border:1px solid var(--border);
  border-radius:10px;
  padding:8px 10px;
  background:#fff;
  color:var(--text);
  font-size:.7rem;
  font-weight:500;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
  min-height:38px;
  line-height:1.35;
}

.cp-card textarea{
  min-height:96px;
  resize:vertical;
}

.cp-card select{
  appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 10px) 50%;
  background-size:5px 5px, 5px 5px;
  background-repeat:no-repeat;
  padding-right:30px;
}

.cp-card input:focus,
.cp-card select:focus,
.cp-card textarea:focus{
  border-color:rgba(37,99,235,.7);
  box-shadow:0 0 0 3px rgba(37,99,235,.10);
}

.cp-section{
  display:grid;
  gap:8px;
}

.cp-section-title{
  font-size:.74rem;
  font-weight:600;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:8px;
  line-height:1.3;
}

.cp-section-title::before{
  content:"";
  width:4px;
  height:14px;
  border-radius:999px;
  background:rgba(37,99,235,.9);
}

.cp-role-badge{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:3px 9px;
  font-size:.64rem;
  font-weight:600;
  background:rgba(37,99,235,.10);
  color:#1d4ed8;
  border:1px solid rgba(37,99,235,.22);
}

/* =========================
   User form (usuario_form.html)
   ========================= */

.cp-user-card .cp-user-form{
  background:#ffffff;
}

.cp-user-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px 14px;
}

@media (max-width: 768px){
  .cp-user-grid{ grid-template-columns:1fr; }
}

.cp-user-field{
  display:flex;
  flex-direction:column;
  gap:5px;
}

.cp-required{
  color:#dc2626;
  margin-left:2px;
  font-weight:600;
}

.cp-user-field input[type="text"],
.cp-user-field input[type="email"],
.cp-user-field input[type="password"],
.cp-user-field input[type="number"],
.cp-user-field select,
.cp-user-field textarea{
  border-radius:10px;
  border:1px solid var(--border);
  padding:8px 10px;
  min-height:38px;
  font-size:.7rem;
  font-weight:500;
  color:var(--text);
  background:#fff;
  transition:border-color .15s ease, box-shadow .15s ease;
  line-height:1.35;
}

.cp-user-field input:focus,
.cp-user-field select:focus,
.cp-user-field textarea:focus{
  outline:none;
  border-color:rgba(37,99,235,.7);
  box-shadow:0 0 0 3px rgba(37,99,235,.10);
}

.cp-user-checkbox .cp-checkline{
  display:flex;
  align-items:center;
  gap:8px;
}

.cp-user-checkbox input[type="checkbox"]{
  width:16px;
  height:16px;
  accent-color:var(--primary);
}

/* Helpers para la sección horarios */
.schedule-card{
  margin-top:16px;
  background:#ffffff;
  border-radius:10px;
  border:1px solid var(--border);
  padding:12px 14px;
}

.schedule-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
  gap:8px;
}

.schedule-header-title{
  font-size:.72rem;
  font-weight:600;
  color:var(--text);
  line-height:1.3;
}

.schedule-header-subtitle{
  font-size:.64rem;
  font-weight:500;
  color:var(--muted);
  line-height:1.4;
}

.schedule-table-wrapper{
  width:100%;
  overflow-x:auto;
}

.schedule-table{
  width:100%;
  border-collapse:collapse;
  font-size:.66rem;
}

.schedule-table th,
.schedule-table td{
  padding:8px 9px;
  border-bottom:1px solid var(--border);
  white-space:nowrap;
  line-height:1.35;
}

.schedule-table th{
  background-color:#f8fafc;
  color:#475569;
  font-weight:600;
  text-align:left;
  font-size:.64rem;
}

.schedule-table td{
  font-weight:500;
}

.badge-day{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-size:.64rem;
  font-weight:500;
  color:#475569;
  line-height:1.2;
}

.badge-day input[type="checkbox"]{
  width:14px;
  height:14px;
  margin:0;
  accent-color:var(--primary);
}

.btn-add-row{
  margin-top:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px dashed #9ca3af;
  background:#fff;
  font-size:.66rem;
  font-weight:500;
  color:#374151;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  line-height:1.2;
}

.btn-add-row:hover{
  border-color:var(--primary);
  color:var(--primary);
}

/* =========================
   Reportes: filtros en grid
   ========================= */
.cp-filters-5{
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:8px 10px;
}

@media (max-width: 1100px){
  .cp-filters-5{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px){
  .cp-filters-5{ grid-template-columns:1fr; }
}

/* Mensaje vacío consistente */
.cp-empty{
  margin-top:8px;
  font-size:.68rem;
  font-weight:500;
  color:var(--muted);
  line-height:1.45;
}

/* =========================
   Extra Task Assign (unificación)
   ========================= */
.extra-summary{
  background:#fff;
}

.extra-summary-title{
  font-size:.8rem;
  font-weight:600;
  color:var(--text);
  margin-bottom:8px;
  line-height:1.3;
}

.extra-summary-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(160px, 1fr));
  gap:8px 14px;
  font-size:.7rem;
  font-weight:500;
  color:#374151;
  line-height:1.4;
}

.extra-summary-label{
  font-weight:600;
  color:#4b5563;
}

.extra-summary-mini{
  font-size:.64rem;
  font-weight:500;
  color:var(--muted);
  margin-left:5px;
  line-height:1.3;
}

.extra-counters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}

.extra-users-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:8px;
}

.extra-users-title{
  font-size:.74rem;
  font-weight:600;
  color:var(--text);
  line-height:1.3;
}

.extra-users-subtitle{
  font-size:.64rem;
  font-weight:500;
  color:var(--muted);
  margin-top:2px;
  line-height:1.35;
}

.extra-time-input{
  width:110px;
  max-width:100%;
}

.extra-user-search-input{
  width:100%;
  border-radius:999px;
}

.btn-remove-row{
  border:none;
  background:transparent;
  cursor:pointer;
  font-size:.68rem;
  line-height:1;
  padding:2px 4px;
  color:#9ca3af;
}

.btn-remove-row:hover{
  color:#dc2626;
}

.extra-footer{
  margin-top:10px;
}

.cp-link{
  color:var(--primary);
  text-decoration:none;
  font-weight:600;
}

.cp-link:hover{
  text-decoration:underline;
}

/* =========================
   Extra request form
   ========================= */
.cp-card-narrow{
  max-width:none;
  margin:0 auto;
}

.cp-form-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  flex-wrap:wrap;
}

.cp-form-title{
  font-size:.78rem;
  font-weight:600;
  color:var(--text);
  line-height:1.3;
}

.cp-form-subtitle{
  font-size:.66rem;
  font-weight:500;
  color:var(--muted);
  margin-top:3px;
  line-height:1.45;
}

.cp-chip-user{
  background:rgba(37,99,235,.10);
  border:1px solid rgba(37,99,235,.18);
  color:#1d4ed8;
}

.cp-chip-emoji{
  font-size:.68rem;
}

/* =========================
   Extra requests list
   ========================= */
.extra-counts-bar{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:8px;
}

.extra-time-pill{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:3px 9px;
  font-size:.64rem;
  font-weight:600;
  background:rgba(99,102,241,.10);
  color:#4338ca;
  border:1px solid rgba(99,102,241,.20);
  white-space:nowrap;
  line-height:1.2;
}

.cp-inline-form{
  display:inline-block;
  margin:0;
}

.extra-header{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:8px;
  align-items:center;
  margin-bottom:2px;
}

.extra-header-left{
  display:flex;
  align-items:center;
}

.extra-header-center{
  display:flex;
  justify-content:flex-end;
  align-items:center;
}

.extra-header-right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-width:170px;
}

/* En móvil, apila */
@media (max-width: 760px){
  .extra-header{
    grid-template-columns:1fr;
    justify-items:stretch;
  }

  .extra-header-right{
    justify-content:flex-start;
    min-width:0;
  }
}

/* =========================
   Inbox
   ========================= */
.cp-inbox-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  flex-wrap:wrap;
}

.cp-inbox-title-row{
  display:flex;
  align-items:center;
  gap:8px;
}

.cp-inbox-icon{
  width:28px;
  height:28px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:rgba(37,99,235,.12);
  color:#1d4ed8;
  font-size:14px;
  border:1px solid rgba(37,99,235,.18);
}

.cp-inbox-search{
  display:flex;
  gap:8px;
  margin-top:10px;
}

@media (max-width: 760px){
  .cp-inbox-search{ flex-direction:column; }
}

.cp-inbox-list{
  list-style:none;
  padding:0;
  margin:12px 0 0;
  display:grid;
  gap:8px;
}

.cp-inbox-item{
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  background:#fff;
}

.cp-inbox-item.is-unread{
  border-color:rgba(37,99,235,.25);
  box-shadow:0 8px 18px rgba(15,23,42,.04);
}

.cp-inbox-item-head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:8px;
}

.cp-inbox-item-title{
  font-weight:600;
  color:var(--text);
  font-size:.7rem;
  line-height:1.3;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.cp-inbox-item-date{
  color:var(--muted);
  font-size:.62rem;
  font-weight:500;
  white-space:nowrap;
}

.cp-inbox-item-meta{
  margin-top:5px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.cp-inbox-item-body{
  margin-top:8px;
  color:#334155;
  font-size:.68rem;
  font-weight:500;
  line-height:1.45;
}

.cp-inbox-item-footer{
  margin-top:8px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:.66rem;
  font-weight:500;
  line-height:1.35;
}

.cp-link-btn{
  border:none;
  background:transparent;
  padding:0;
  cursor:pointer;
  color:var(--primary);
  font-weight:600;
  font-size:.66rem;
  line-height:1.2;
}

.cp-link-btn:hover{
  text-decoration:underline;
}

/* Overlay modal */
.cp-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:1100;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease-in-out;
}

.cp-overlay.is-open{
  opacity:1;
  pointer-events:auto;
}

.cp-overlay-card{
  background:#fff;
  border-radius:16px;
  box-shadow:0 22px 50px rgba(15,23,42,.28);
  width:min(720px, 95vw);
  padding:14px 16px;
}

.cp-overlay-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.cp-overlay-title{
  font-weight:600;
  color:var(--text);
  font-size:.78rem;
  line-height:1.3;
}

.cp-overlay-close{
  border:none;
  background:transparent;
  font-size:.84rem;
  cursor:pointer;
  color:#94a3b8;
  line-height:1;
}

.cp-overlay-close:hover{
  color:#64748b;
}

.cp-overlay-meta{
  margin-top:8px;
  color:var(--muted);
  font-size:.66rem;
  font-weight:500;
  line-height:1.4;
}

.cp-overlay-body{
  margin-top:10px;
  border-top:1px solid var(--border);
  padding-top:10px;
  max-height:360px;
  overflow-y:auto;
  color:var(--text);
  font-size:.7rem;
  font-weight:500;
  line-height:1.5;
}

/* =========================
   Inbox WhatsApp-like (2 panes)
   ========================= */
.cp-inbox-shell{
  display:grid;
  grid-template-columns:320px 1fr;
  gap:12px;
  align-items:stretch;
}

@media (max-width: 980px){
  .cp-inbox-shell{ grid-template-columns:1fr; }
}

.cp-inbox-left,
.cp-inbox-right{
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:var(--shadow);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height:68vh;
}

.cp-inbox-left-head{
  padding:12px 12px 9px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:8px;
  border-bottom:1px solid var(--border);
}

.cp-inbox-left-title{
  font-weight:600;
  color:var(--text);
  font-size:.74rem;
  line-height:1.3;
}

.cp-inbox-left-sub{
  font-size:.66rem;
  font-weight:500;
  color:var(--muted);
  margin-top:2px;
  line-height:1.35;
}

.cp-inbox-search{
  padding:8px 12px;
  display:flex;
  gap:8px;
  border-bottom:1px solid var(--border);
}

.cp-inbox-list{
  padding:8px;
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow:auto;
}

/* Row: solo titulo + fecha */
.cp-inbox-row{
  width:100%;
  text-align:left;
  border:1px solid var(--border);
  background:#fff;
  border-radius:10px;
  padding:9px 10px;
  cursor:pointer;
  transition:background .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.cp-inbox-row:hover{
  background:rgba(37,99,235,.03);
}

.cp-inbox-row.is-active{
  border-color:rgba(37,99,235,.35);
  box-shadow:0 8px 18px rgba(15,23,42,.05);
}

.cp-inbox-row.is-unread .cp-inbox-row-title{
  font-weight:600;
}

.cp-inbox-row-line{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:8px;
}

.cp-inbox-row-title{
  font-weight:600;
  color:var(--text);
  font-size:.68rem;
  line-height:1.3;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.cp-inbox-row-right{
  display:flex;
  align-items:center;
  gap:6px;
  flex-shrink:0;
}

.cp-inbox-row-date{
  font-size:.62rem;
  font-weight:500;
  color:var(--muted);
  white-space:nowrap;
}

.cp-inbox-dot{
  width:7px;
  height:7px;
  border-radius:999px;
  background:var(--primary);
  display:inline-block;
}

/* Right pane detail */
.cp-inbox-right-head{
  padding:12px 14px;
  border-bottom:1px solid var(--border);
}

.cp-inbox-right-title{
  font-weight:600;
  color:var(--text);
  font-size:.78rem;
  line-height:1.3;
}

.cp-inbox-right-meta{
  margin-top:6px;
  font-size:.68rem;
  font-weight:500;
  color:var(--muted);
  display:grid;
  gap:2px;
  line-height:1.4;
}

.cp-inbox-right-body{
  padding:12px 14px;
  overflow:auto;
  font-size:.7rem;
  font-weight:500;
  color:var(--text);
  line-height:1.5;
}

/* =========================
   TomSelect look = cp-select
   ========================= */
.ts-control{
  border-radius:10px !important;
  padding:8px 10px !important;
  border:1px solid var(--border) !important;
  font-size:.7rem !important;
  font-weight:500 !important;
  background:#fff !important;
  min-height:38px;
  line-height:1.35;
}

.ts-control.focus{
  border-color:rgba(37,99,235,.7) !important;
  box-shadow:0 0 0 3px rgba(37,99,235,.10) !important;
}

.ts-dropdown{
  border-radius:10px !important;
  border:1px solid var(--border) !important;
  overflow:hidden;
}

/* =========================
   Map / Leaflet blocks
   ========================= */
.cp-map-search{
  display:flex;
  gap:8px;
  align-items:center;
}

@media (max-width: 760px){
  .cp-map-search{ flex-direction:column; align-items:stretch; }
}

.cp-map{
  width:100%;
  height:300px;
  border-radius:10px;
  border:1px solid var(--border);
  margin-top:8px;
  overflow:hidden;
}

/* =========================
   Location form + Map layout
   ========================= */
.cp-layout-2col{
  display:grid;
  grid-template-columns:minmax(0, 2fr) minmax(0, 1.2fr);
  gap:14px;
}

@media (max-width: 900px){
  .cp-layout-2col{ grid-template-columns:1fr; }
}

.cp-map-search{
  display:flex;
  gap:8px;
  margin-top:8px;
}

.cp-map-search input{
  flex:1;
}

@media (max-width: 760px){
  .cp-map-search{ flex-direction:column; align-items:stretch; }
}

.cp-map{
  width:100%;
  height:330px;
  border-radius:10px;
  border:1px solid var(--border);
  margin-top:8px;
  overflow:hidden;
  position:relative;
}

.cp-map-fallback{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  padding:12px;
  text-align:center;
  color:var(--muted);
  background:#fff;
  font-size:.68rem;
  font-weight:500;
  line-height:1.45;
}

.cp-input-static{
  background:#f1f5f9;
  color:#475569;
}

.cp-field-hidden{
  display:none;
}

/* =========================
   Login (tema claro)
   ========================= */
.cp-login{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  background:radial-gradient(circle at top, #ffffff 0, #f1f5f9 55%, #e2e8f0 100%);
  color:var(--text);
}

.cp-login-card{
  width:100%;
  max-width:360px;
  background:#ffffff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:20px 22px;
  box-shadow:0 16px 34px rgba(15,23,42,.08);
}

.cp-login-title{
  margin:0 0 4px;
  font-size:.95rem;
  font-weight:600;
  color:var(--text);
  letter-spacing:-0.01em;
  line-height:1.25;
}

.cp-login-subtitle{
  margin:0 0 14px;
  font-size:.72rem;
  font-weight:500;
  color:var(--muted);
  line-height:1.4;
}

.cp-login-alert{
  padding:9px 10px;
  border-radius:10px;
  background:rgba(239, 68, 68, 0.08);
  border:1px solid rgba(239, 68, 68, 0.22);
  color:#991b1b;
  font-size:.68rem;
  font-weight:500;
  line-height:1.4;
  margin-bottom:10px;
}

.cp-login-form{
  display:grid;
  gap:10px;
}

.cp-login-field{
  display:flex;
  flex-direction:column;
  gap:5px;
}

.cp-login-label{
  font-size:.7rem;
  font-weight:600;
  color:#334155;
  line-height:1.3;
}

/* Soporta tanto .form-control como cp-input por si cambias */
.cp-login input.form-control,
.cp-login input.cp-input{
  width:100%;
  padding:8px 10px;
  min-height:38px;
  border-radius:10px;
  border:1px solid var(--border);
  background:#ffffff;
  color:var(--text);
  font-size:.7rem;
  font-weight:500;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
  line-height:1.35;
}

.cp-login input.form-control:focus,
.cp-login input.cp-input:focus{
  border-color:rgba(37,99,235,.7);
  box-shadow:0 0 0 3px rgba(37,99,235,.10);
}

.cp-login-btn{
  width:100%;
  padding:9px 12px;
  min-height:36px;
  border-radius:999px;
  border:none;
  background:var(--primary);
  color:#ffffff;
  font-size:.7rem;
  font-weight:600;
  cursor:pointer;
  transition:transform .05s ease, background .15s ease;
  line-height:1.2;
}

.cp-login-btn:hover{
  background:var(--primary-700);
}

.cp-login-btn:active{
  transform:translateY(1px);
}

/* =========================
   Mapa supervisores
   ========================= */
.cp-map-lg{
  height:420px;
}

.cp-map-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:flex-end;
  justify-content:space-between;
  margin-bottom:8px;
}

.cp-map-toolbar-right{
  display:flex;
  gap:8px;
  align-items:center;
}

.cp-map-info{
  margin-top:8px;
  font-size:.68rem;
  font-weight:500;
  color:#334155;
  display:grid;
  gap:6px;
  line-height:1.4;
}

.cp-map-info-row{
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
}

.cp-map-info-name{
  font-weight:600;
  color:var(--text);
}

.cp-map-info-muted{
  color:var(--muted);
}

/* =========================
   Proyecto detalle
   ========================= */
.cp-project-actions{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.cp-project-filter{
  display:flex;
  gap:8px;
  align-items:flex-end;
  flex-wrap:wrap;
}

@media (max-width: 760px){
  .cp-project-actions{ align-items:stretch; }
  .cp-project-filter{ width:100%; }
  .cp-project-filter .cp-field{ width:100%; }
}

/* Acciones en fila (no apilar) */
.cp-actions-nowrap{
  flex-wrap:nowrap !important;
  white-space:nowrap;
}

.cp-actions-nowrap .cp-btn{
  padding:6px 10px;
}

/* =========================
   List headers + pagination
   ========================= */
.cp-list-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.cp-list-filter{
  display:flex;
  gap:8px;
  align-items:flex-end;
  flex-wrap:wrap;
}

.cp-pagination{
  margin-top:12px;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.cp-page-btn{
  padding:5px 9px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  color:#334155;
  text-decoration:none;
  font-size:.66rem;
  font-weight:500;
  line-height:1.2;
}

.cp-page-btn:hover{
  border-color:rgba(37,99,235,.35);
  color:#1d4ed8;
}

.cp-page-btn.is-current{
  background:rgba(37,99,235,.12);
  border-color:rgba(37,99,235,.25);
  color:#1d4ed8;
  font-weight:600;
}

.cp-page-btn.is-disabled{
  opacity:.55;
  cursor:default;
}

.cp-page-btn.is-disabled:hover{
  border-color:var(--border);
  color:#334155;
}

.cp-table tbody tr:nth-child(even) td{
  background:#ffffff;
}

/* Modal panel style */
.cp-modal{
  border-radius:14px;
}

/* =========================
   Reporte almuerzos
   ========================= */
.cp-filters-4{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:8px 10px;
}

@media (max-width: 1100px){
  .cp-filters-4{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px){
  .cp-filters-4{ grid-template-columns:1fr; }
}

.cp-card-soft{
  background:#f8fafc;
}

/* Rango de fechas en una sola fila */
.cp-inline-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
@media (max-width: 760px){
  .cp-inline-2{ grid-template-columns:1fr; }
}

/* =========================
   Tooltips en TH
   ========================= */
.cp-th-help{
  position:relative;
  cursor:help;
  border-bottom:1px dotted #9ca3af;
}

.cp-th-help::after{
  content:attr(data-tooltip);
  position:absolute;
  bottom:calc(100% + 6px);
  left:50%;
  transform:translateX(-50%);
  background:#111827;
  color:#f9fafb;
  padding:6px 8px;
  border-radius:8px;
  font-size:.62rem;
  font-weight:500;
  max-width:240px;
  white-space:normal;
  text-align:left;
  line-height:1.4;
  box-shadow:0 10px 24px rgba(15,23,42,.35);
  opacity:0;
  pointer-events:none;
  transition:opacity .15s ease;
  z-index:40;
}

.cp-th-help::before{
  content:"";
  position:absolute;
  bottom:calc(100% + 2px);
  left:50%;
  transform:translateX(-50%);
  border-width:6px;
  border-style:solid;
  border-color:transparent transparent #111827 transparent;
  opacity:0;
  pointer-events:none;
  transition:opacity .15s ease;
  z-index:39;
}

.cp-th-help:hover::after,
.cp-th-help:hover::before{
  opacity:1;
}

/* =========================
   Reporte horas extras
   ========================= */
.text-right{ text-align:right; }
.text-center{ text-align:center; }

.cp-help-dot{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:16px;
  height:16px;
  border-radius:999px;
  background:#e5e7eb;
  color:#334155;
  font-size:.58rem;
  font-weight:600;
  cursor:help;
  margin-left:4px;
  line-height:1;
}

.cp-diff-pos{ color:#16a34a; font-weight:600; }
.cp-diff-neg{ color:#dc2626; font-weight:600; }

.cp-card-soft{ background:#f8fafc; }

.cp-btn-sm{
  padding:5px 10px;
  font-size:.66rem;
  font-weight:600;
  line-height:1.2;
}

.cp-ul{
  margin:0;
  padding-left:16px;
}

.cp-legend{
  margin-top:8px;
  padding:9px 10px;
  border-radius:10px;
  background:#f8fafc;
  border:1px dashed #d1d5db;
  font-size:.68rem;
  font-weight:500;
  color:#334155;
  line-height:1.45;
}

.cp-inline-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
@media (max-width: 760px){
  .cp-inline-2{ grid-template-columns:1fr; }
}

/* =========================
   Reporte tareas extras: modal asignados (custom)
   ========================= */
.cp-btn-sm{
  padding:5px 10px;
  font-size:.66rem;
}

.cp-modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.45);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:1100;
  padding:12px;
}

.cp-modal-backdrop.show{
  display:flex;
}

.cp-modal-box{
  background:#ffffff;
  border-radius:14px;
  padding:14px 16px;
  max-width:440px;
  width:100%;
  box-shadow:0 22px 50px rgba(15,23,42,.28);
  border:1px solid var(--border);
}

.cp-modal-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}

.cp-modal-title{
  font-size:.74rem;
  font-weight:600;
  color:var(--text);
  line-height:1.3;
}

.cp-modal-close{
  border:none;
  background:transparent;
  cursor:pointer;
  font-size:.9rem;
  color:#94a3b8;
  line-height:1;
}
.cp-modal-close:hover{ color:#64748b; }

.cp-modal-list{
  padding-left:18px;
  margin:0;
  font-size:.68rem;
  font-weight:500;
  color:#334155;
  line-height:1.45;
}

.cp-modal-list li{
  margin-bottom:4px;
}

/* =========================
   Reportes home (cards)
   ========================= */
.cp-reports-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap:12px !important;
  margin-top:10px !important;
}

.cp-report-card{
  background:#ffffff !important;
  border-radius:12px !important;
  border:1px solid var(--border) !important;
  padding:12px 14px !important;
  box-shadow:0 8px 18px rgba(15,23,42,.04) !important;
  display:grid !important;
  gap:8px !important;
}

.cp-report-badge{
  display:inline-flex !important;
  width:fit-content !important;
  font-size:.64rem !important;
  padding:3px 9px !important;
  border-radius:999px !important;
  background:rgba(37,99,235,.10) !important;
  color:#1d4ed8 !important;
  border:1px solid rgba(37,99,235,.18) !important;
  font-weight:600 !important;
  line-height:1.2;
}

.cp-report-title{
  font-size:.76rem !important;
  font-weight:600 !important;
  color:var(--text) !important;
  line-height:1.3 !important;
}

.cp-report-desc{
  font-size:.68rem !important;
  font-weight:500 !important;
  color:var(--muted) !important;
  line-height:1.45 !important;
}

/* =========================
   Topnav dropdown (Reportes)
   ========================= */
.cp-nav-dropdown{
  display:inline-flex;
  align-items:center;
}

/* El toggle debe verse como los <a> del topnav */
.cp-nav-dropdown-toggle{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 9px;
  border-radius:999px;
  text-decoration:none;
  color:#0f172a;
  border:1px solid transparent;
  font-weight:600;
  font-size:.66rem;
  line-height:1.2;
  transition:background .15s ease, border-color .15s ease;
}

.cp-nav-dropdown-toggle:hover{
  background:rgba(37,99,235,.06);
  border-color:rgba(37,99,235,.18);
}

.cp-nav-dropdown-toggle.active{
  background:rgba(37,99,235,.12);
  border-color:rgba(37,99,235,.25);
  color:#1d4ed8;
}

/* Menu */
.cp-nav-dropdown-menu{
  border-radius:12px;
  border:1px solid var(--border);
  box-shadow:0 16px 36px rgba(15,23,42,.10);
  padding:8px;
  min-width:280px;
}

.cp-nav-dropdown-menu .dropdown-header{
  font-size:.6rem;
  font-weight:600;
  color:#64748b;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.cp-nav-dropdown-menu .dropdown-item{
  border-radius:10px;
  font-size:.66rem;
  font-weight:500;
  padding:8px 10px;
  line-height:1.35;
}

.cp-nav-dropdown-menu .dropdown-item:hover{
  background:rgba(37,99,235,.08);
}

/* =========================
   User form (simple) unificado
   ========================= */
.cp-checkline{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.cp-checkline input[type="checkbox"]{
  width:16px;
  height:16px;
  accent-color:var(--primary);
}

/* =========================
   User schedules formset (sched-*)
   ========================= */
.sched-wrapper{
  margin-top:18px;
}

.sched-wrapper h4{
  margin-bottom:4px;
  font-size:.74rem;
  font-weight:600;
  color:var(--text);
  line-height:1.3;
}

.sched-wrapper p{
  font-size:.66rem;
  font-weight:500;
  color:var(--muted);
  margin-bottom:8px;
  line-height:1.4;
}

.sched-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:.68rem;
  border-radius:10px;
  overflow:hidden;
  border:1px solid var(--border);
  background:#ffffff;
}

.sched-table thead tr{
  background:#f8fafc;
}

.sched-table th,
.sched-table td{
  padding:8px 9px;
  border-bottom:1px solid var(--border);
  vertical-align:middle;
  white-space:nowrap;
  line-height:1.35;
}

.sched-table th{
  font-weight:600;
  text-align:left;
  color:#334155;
  font-size:.62rem;
}

.sched-table td{
  font-weight:500;
}

.sched-table tbody tr:nth-child(even){
  background:#f9fafb;
}

.sched-table tbody tr:hover{
  background:rgba(37,99,235,.04);
}

.sched-error{
  color:#b91c1c;
  font-size:.62rem;
  font-weight:500;
  margin-top:2px;
  line-height:1.4;
}

.sched-table select,
.sched-table input[type="time"]{
  width:100%;
  font-size:.68rem;
  font-weight:500;
  padding:6px 8px;
  border-radius:10px;
  border:1px solid var(--border);
  background:#fff;
  min-height:34px;
}

.sched-table select:focus,
.sched-table input[type="time"]:focus{
  outline:none;
  border-color:rgba(37,99,235,.7);
  box-shadow:0 0 0 3px rgba(37,99,235,.10);
}

.sched-delete-cell{
  text-align:center;
  width:70px;
}

.sched-delete-btn{
  background:transparent;
  border:none;
  cursor:pointer;
  font-size:16px;
  line-height:1;
  color:#94a3b8;
  transition:transform .08s ease, color .12s ease;
}

.sched-delete-btn:hover{
  color:#b91c1c;
  transform:scale(1.06);
}

/* Ocultar checkbox DELETE (lo manejas por JS) */
.sched-delete-cell input[type="checkbox"]{
  display:none;
}

.sched-add-btn{
  margin-top:8px;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid var(--primary);
  background:var(--primary);
  color:#ffffff;
  font-size:.68rem;
  font-weight:600;
  cursor:pointer;
  line-height:1.2;
}

.sched-add-btn:hover{
  background:var(--primary-700);
  border-color:var(--primary-700);
}

.sched-day-cell{
  text-align:center;
}

.sched-day-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#ffffff;
  font-size:.62rem;
  font-weight:500;
  color:#475569;
  line-height:1.2;
}

.sched-day-badge input[type="checkbox"]{
  width:14px;
  height:14px;
  margin:0;
  accent-color:var(--primary);
}

/* Select2 dentro de la tabla para que se vea integrado */
.sched-table .select2-container .select2-selection--single{
  height:32px;
  padding:2px 6px;
  border-radius:10px;
  border:1px solid var(--border);
}

.sched-table .select2-selection__rendered{
  font-size:.64rem;
  line-height:26px;
  font-weight:500;
}

.sched-table .select2-selection__arrow{
  height:30px;
}

/* =========================
   Fixed OT modal (fixedot-*)
   ========================= */
.fixedot-compact{
  margin-top:12px;
  border:1px solid var(--border);
  background:#fff;
  border-radius:12px;
  padding:10px 12px;
}

.fixedot-compact-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  flex-wrap:wrap;
}

.fixedot-compact-title{
  font-size:.72rem;
  font-weight:600;
  color:var(--text);
  line-height:1.3;
}

.fixedot-compact-sub{
  font-size:.66rem;
  font-weight:500;
  color:var(--muted);
  margin-top:2px;
  line-height:1.4;
}

.fixedot-compact-chips{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:8px;
}

.fixedot-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 9px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#f8fafc;
  font-size:.66rem;
  font-weight:500;
  color:#334155;
  line-height:1.2;
}

.fixedot-chip strong{ color:var(--text); font-weight:600; }
.fixedot-chip-muted{ background:#fff; color:var(--muted); }

.fixedot-table-wrap{
  border:1px solid var(--border);
  border-radius:10px;
  overflow:auto;
  background:#fff;
}

.fixedot-table{
  width:100%;
  border-collapse:collapse;
  min-width:1400px;
  font-size:.68rem;
}

.fixedot-table thead tr{ background:#f8fafc; }

.fixedot-table th,
.fixedot-table td{
  padding:8px 9px;
  border-bottom:1px solid var(--border);
  white-space:nowrap;
  vertical-align:middle;
  line-height:1.35;
}

.fixedot-table th{
  font-size:.64rem;
  font-weight:600;
  color:#475569;
}

.fixedot-table td{
  font-weight:500;
}

.fixedot-day-cell{ text-align:center; }

.fixedot-day-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-size:.62rem;
  font-weight:500;
  color:#475569;
  line-height:1.2;
}

.fixedot-day-badge input[type="checkbox"]{
  width:14px;
  height:14px;
  margin:0;
  accent-color:var(--primary);
}

.fixedot-delete-cell{ text-align:center; width:70px; }

.fixedot-delete-btn{
  border:none;
  background:transparent;
  cursor:pointer;
  color:#94a3b8;
  font-size:16px;
  line-height:1;
}

.fixedot-delete-btn:hover{ color:#b91c1c; }

.fixedot-modal-actions{
  margin-top:10px;
  display:flex;
  justify-content:flex-start;
}

.cp-settings-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
  margin-top:8px;
}

@media (max-width: 900px){
  .cp-settings-grid{ grid-template-columns:1fr; }
}

.cp-settings-card{
  border:1px solid var(--border);
  background:#fff;
  border-radius:12px;
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.cp-settings-title{
  font-size:.72rem;
  font-weight:600;
  color:var(--text);
  line-height:1.3;
}

.cp-settings-sub{
  font-size:.66rem;
  font-weight:500;
  color:var(--muted);
  line-height:1.45;
}

.cp-settings-meta{
  font-size:.66rem;
  font-weight:500;
  color:#334155;
  line-height:1.4;
}

.cp-settings-table{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:10px;
}

.cp-settings-cell{
  background:#ffffff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:12px 14px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  box-shadow:0 4px 12px rgba(15,23,42,.03);
}

.cp-settings-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-weight:500;
  color:#111827;
  margin-bottom:10px;
  gap:8px;
}

.cp-settings-header small{
  font-weight:500;
  font-size:.62rem;
  color:#6b7280;
  line-height:1.3;
}

