/* CD Recogida de Alumnos — Estilos */

.cdra-wrap,
.cdra-panel-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 680px;
    margin: 0 auto;
    color: #0f172a;
}
.cdra-panel-wrap { max-width: 900px; }

/* Avisos */
.cdra-aviso { padding: 12px 16px; border-radius: 10px; font-size: .9rem; margin-bottom: 16px; }
.cdra-aviso--error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.cdra-aviso p { margin: 2px 0; }

/* Cabecera formulario */
.cdra-header { background: linear-gradient(135deg,#0284c7,#0369a1); border-radius: 14px; padding: 28px; text-align: center; color: #fff; margin-bottom: 20px; }
.cdra-header-icon { font-size: 40px; margin-bottom: 6px; }
.cdra-titulo    { font-size: 1.4rem; font-weight: 700; margin: 0 0 4px; }
.cdra-subtitulo { font-size: .9rem; opacity: .85; margin: 0; }

/* Secciones */
.cdra-seccion { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; margin-bottom: 14px; }
.cdra-seccion-titulo { font-size: .92rem; font-weight: 700; color: #0369a1; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid #f1f5f9; }

/* Grid */
.cdra-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cdra-col-full { grid-column: 1 / -1; }
.cdra-campo { display: flex; flex-direction: column; }

/* Inputs */
.cdra-label { font-size: .82rem; font-weight: 600; color: #374151; margin-bottom: 4px; }
.cdra-req   { color: #dc2626; }
.cdra-hint  { font-size: .78rem; color: #94a3b8; margin: 4px 0 0; }
.cdra-input,
.cdra-select {
    padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 8px;
    font-size: .88rem; outline: none; background: #fff; color: #0f172a;
    transition: border-color .15s;
}
.cdra-input:focus,
.cdra-select:focus { border-color: #0284c7; box-shadow: 0 0 0 3px rgba(2,132,199,.1); }

/* Firma */
.cdra-firma-wrap { position: relative; }
.cdra-canvas {
    width: 100%; height: 160px; border: 2px dashed #cbd5e1; border-radius: 10px;
    cursor: crosshair; display: block; touch-action: none; background: #fafafa;
}
.cdra-canvas:active { border-color: #0284c7; }
.cdra-btn-limpiar {
    position: absolute; top: 8px; right: 8px;
    background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px;
    padding: 4px 10px; font-size: .78rem; cursor: pointer; color: #64748b;
}
.cdra-btn-limpiar:hover { background: #e2e8f0; }

/* Checkbox */
.cdra-checkbox-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .85rem; color: #374151; }
.cdra-checkbox-label input { margin-top: 2px; flex-shrink: 0; }

/* Submit */
.cdra-submit-wrap { text-align: center; padding: 16px 0 8px; }
.cdra-btn-submit {
    background: #0284c7; color: #fff; border: none; border-radius: 10px;
    padding: 13px 32px; font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: background .15s;
}
.cdra-btn-submit:hover    { background: #0369a1; }
.cdra-btn-submit:disabled { opacity: .6; cursor: not-allowed; }

/* OK / Límite */
.cdra-ok, .cdra-limite {
    text-align: center; padding: 48px 20px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
}
.cdra-ok-icon { font-size: 52px; margin-bottom: 10px; }
.cdra-ok h2, .cdra-limite h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.cdra-limite span { font-size: 40px; display: block; margin-bottom: 10px; }

/* Botones */
.cdra-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px; border: none; border-radius: 8px;
    font-size: .85rem; font-weight: 600; cursor: pointer;
    text-decoration: none; transition: background .15s;
}
.cdra-btn--outline { background: transparent; color: #0284c7; border: 1px solid #0284c7; }
.cdra-btn--outline:hover { background: #f0f9ff; }
.cdra-btn--ghost { background: #f1f5f9; color: #374151; border: 1px solid #e2e8f0; }
.cdra-btn--ghost:hover { background: #e2e8f0; }
.cdra-btn--sm { padding: 6px 12px; font-size: .8rem; }

/* Panel gestor */
.cdra-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-bottom: 18px;
}
.cdra-panel-titulo  { font-size: 1.25rem; font-weight: 700; color: #0369a1; margin: 0; }
.cdra-panel-empresa { font-size: .88rem; color: #64748b; margin: 2px 0 0; }

/* Uso mensual */
.cdra-uso-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 18px 20px; margin-bottom: 16px;
}
.cdra-uso-info { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.cdra-uso-n    { font-size: 2rem; font-weight: 800; line-height: 1; }
.cdra-uso-de   { font-size: .9rem; color: #64748b; }
.cdra-uso-mes  { font-size: .8rem; color: #94a3b8; }
.cdra-progreso-bar {
    height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden;
}
.cdra-progreso-fill { height: 100%; border-radius: 4px; transition: width .3s; }
.cdra-aviso-limite { font-size: .82rem; color: #d97706; margin: 8px 0 0; }

/* Filtros */
.cdra-filtros { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }

/* Tabla */
.cdra-tabla-wrap { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; overflow-x: auto; }
.cdra-tabla { width: 100%; border-collapse: collapse; font-size: .84rem; }
.cdra-tabla thead tr { background: #f8fafc; }
.cdra-tabla th { padding: 10px 14px; text-align: left; font-weight: 600; color: #64748b; border-bottom: 1px solid #e2e8f0; }
.cdra-tabla tbody tr { border-bottom: 1px solid #f1f5f9; }
.cdra-tabla tbody tr:hover { background: #f8fafc; }
.cdra-tabla td { padding: 10px 14px; vertical-align: middle; }
.cdra-nombre   { font-weight: 600; }
.cdra-relacion { color: #94a3b8; font-size: .78rem; }

.cdra-empty { text-align: center; padding: 50px 20px; color: #94a3b8; }
.cdra-empty span { font-size: 36px; display: block; margin-bottom: 8px; }

/* Detalle */
.cdra-detalle-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cdra-detalle-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 26px; }
.cdra-detalle-titulo { font-size: 1.15rem; font-weight: 700; margin: 0 0 16px; }
.cdra-detalle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cdra-detalle-seccion h3 { font-size: .88rem; font-weight: 700; color: #0369a1; margin: 0 0 8px; }
.cdra-detalle-seccion p  { font-size: .88rem; color: #374151; margin: 3px 0; }

@media (max-width: 600px) {
    .cdra-grid { grid-template-columns: 1fr; }
    .cdra-detalle-grid { grid-template-columns: 1fr; }
    .cdra-panel-header { flex-direction: column; align-items: flex-start; }
    .cdra-filtros { flex-direction: column; align-items: flex-start; }
}
