:root{--navy:#102740;--navy2:#173957;--teal:#087f86;--teal2:#0c9ca1;--bg:#f3f6f9;--surface:#fff;--line:#dae3ea;--text:#173047;--muted:#728297;--red:#bb3446;--shadow:0 10px 30px rgba(28,48,69,.055)}*{box-sizing:border-box}body{margin:0;background:var(--bg);font-family:Inter,Segoe UI,Arial,sans-serif;color:var(--text);font-size:14px;line-height:1.5}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}.site-header{background:var(--navy);color:white;box-shadow:0 2px 12px #11263e26}.header-inner{max-width:1240px;margin:auto;min-height:78px;display:flex;justify-content:space-between;align-items:center;padding:12px 24px;gap:12px}.brand{display:flex;gap:13px;align-items:center}.brand-mark{width:45px;height:45px;border:1px solid #77c8ca77;display:grid;place-items:center;border-radius:12px;font-size:28px;color:#7dd9db;background:#ffffff10}.brand strong{font-size:13px;letter-spacing:1.6px}.brand small{display:block;color:#b3ced4;font-size:11px;margin-top:3px}nav{display:flex;gap:28px;align-items:center}nav a{color:#c6d7e3;font-size:13px}nav a:hover{color:white}.container{max-width:1240px;min-height:75vh;margin:auto;padding:34px 24px 65px}.footer{text-align:center;padding:26px;font-size:11px;color:#8292a2;letter-spacing:.8px}.hero{background:linear-gradient(116deg,#122b46,#17616b);color:white;border-radius:18px;display:flex;justify-content:space-between;align-items:center;padding:64px 66px;box-shadow:var(--shadow);overflow:hidden}.eyebrow{letter-spacing:2px;font-size:11px;font-weight:750;color:#168d96}.hero .eyebrow{color:#85dce0}.hero h1{font-size:44px;letter-spacing:-1.8px;line-height:1.17;margin:14px 0 15px}.hero h1 em{font-style:normal;color:#95e0e1}.hero p{color:#d1e2eb;max-width:560px;font-size:15px}.hero-symbol{font-size:160px;font-weight:100;opacity:.11}.section-head{display:flex;justify-content:space-between;align-items:center;margin:32px 0 17px}.section-head h2,.panel h2{margin:0;font-size:19px}.section-head span{color:var(--muted)}.module-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}.module-card{display:block;padding:28px;border-radius:15px;background:white;border:1px solid var(--line);box-shadow:var(--shadow);transition:transform .15s}.module-card:not(.future):hover{transform:translateY(-3px);border-color:#a9d7d6}.module-icon{width:50px;height:50px;background:#e4f5f4;border-radius:12px;display:grid;place-items:center;color:var(--teal);font-size:24px}.module-card h3{font-size:20px;margin:20px 0 7px}.module-card p{color:var(--muted);min-height:44px}.module-card span{color:var(--teal);font-weight:650}.module-card.future{background:#f9fafb;border-style:dashed}.module-card.future span{color:#95a0ad}.page-top{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}.page-top h1{font-size:32px;letter-spacing:-.8px;margin:7px 0 5px}.page-top p{margin:0;color:var(--muted)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:9px;padding:11px 17px;border:1px solid transparent;font-weight:700;font-size:13px;white-space:nowrap}.btn.primary{background:var(--teal);color:#fff}.btn.primary:hover{background:#07686e}.btn.secondary{color:var(--navy2);background:#fff;border-color:var(--line)}.btn.secondary:hover{border-color:var(--teal)}.btn.ghost{color:var(--teal);background:transparent}.btn.danger{color:#a72e3f;background:#fff5f6;border-color:#f2d5d9}.btn.tiny{font-size:11px;padding:6px 10px}.btn:disabled{opacity:.45;cursor:not-allowed}.toolbar{display:flex;gap:15px;align-items:end;background:#fff;border:1px solid var(--line);border-radius:12px;padding:17px 22px;margin-bottom:19px;flex-wrap:wrap}.toolbar label{color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.4px}.toolbar input,.toolbar select{display:block;margin-top:5px;min-width:120px}.stats{display:grid;grid-template-columns:1fr 1fr 2fr;gap:16px;margin-bottom:20px}.stats>div{padding:21px 24px;background:white;border:1px solid var(--line);border-radius:12px}.stats small{display:block;color:var(--muted);font-size:12px}.stats strong{display:block;font-size:28px;margin-top:5px}.stats strong.small-stat{font-size:21px}.stats span{font-size:11px;color:var(--muted)}.panel{border:1px solid var(--line);border-radius:13px;background:white;box-shadow:var(--shadow);margin-bottom:20px;overflow:hidden}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line);padding:19px 23px}.muted{color:var(--muted);font-size:12px}.search{max-width:270px}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;min-width:750px}th{background:#f6f9fb;color:#6e8090;text-align:left;font-size:11px;letter-spacing:.35px;font-weight:750}th,td{padding:13px 16px;border-bottom:1px solid #e8eef2}tbody tr:hover{background:#f8fbfc}.clip-text{max-width:420px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.actions{display:flex;gap:6px}.empty{text-align:center;padding:45px;color:var(--muted)}.export-bar{display:flex;justify-content:space-between;align-items:center;gap:22px;background:#e9f4f5;border:1px solid #c9e8e7;padding:24px;border-radius:12px}.export-bar h3{margin:0;font-size:17px}.export-bar p{color:#5a7980;margin:4px 0}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;padding:24px}.field{display:flex;flex-direction:column;font-weight:650;color:#425669;font-size:12px;gap:8px}.field.full{grid-column:1/-1}input,textarea,select{width:100%;padding:11px 12px;background:white;color:var(--text);border:1px solid #cfdae3;border-radius:8px;outline:none}input:focus,textarea:focus,select:focus{border-color:#0d9198;box-shadow:0 0 0 3px #0d91981c}textarea{resize:vertical}.required{color:#bd3445}.validation-hint{color:#728397;font-size:11px;font-weight:400}.validation-hint.invalid{color:#b33043}.input-error{border-color:#ba3343!important;background:#fff3f4!important}.signers{padding:10px 24px 20px}.signer{display:grid;grid-template-columns:110px minmax(160px,1fr) 2fr;gap:15px;align-items:center;border-bottom:1px solid #e5edf1;padding:15px 0}.signer:last-child{border-bottom:0}.signer>strong{font-size:12px}.signer label{font-size:12px;color:#586b7c}.signer input{display:block;margin-top:5px}.sticky-save{display:flex;align-items:center;justify-content:space-between;gap:20px;background:white;border:1px solid var(--line);border-radius:12px;padding:16px 22px;position:sticky;bottom:12px;box-shadow:0 10px 30px #1631491c}.sticky-save span{color:var(--muted);font-size:12px}.alert{padding:14px 18px;border-radius:9px;margin-bottom:18px}.alert.error{background:#fff0f2;color:#9e2738;border:1px solid #edc5cb}.alert.success{background:#e9f7f3;color:#146b55;border:1px solid #bfe4d8}.alert ul{margin-bottom:0}.alert a{text-decoration:underline;font-weight:700}.hash{display:block;font-size:10px;color:#8c99a3;margin-top:4px}.pill{display:inline-block;border-radius:99px;padding:4px 9px;font-size:11px;font-weight:700}.pill.sent{color:#116d51;background:#ddf5eb}.pill.draft{color:#927022;background:#fff2cb}.inline-confirm{display:flex;gap:5px;align-items:center;margin-top:7px}.inline-confirm input{font-size:11px;min-width:150px;padding:6px}.login-box{margin:50px auto 0;max-width:430px;background:white;padding:38px;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}.login-icon{font-size:38px;color:var(--teal)}.login-box h1{font-size:27px;margin:16px 0 9px}.login-box p{color:var(--muted);margin-bottom:26px}.login-box label{display:block;margin-bottom:17px;font-weight:650;font-size:12px}.login-box input{display:block;margin-top:7px}.btn.wide{width:100%}@media(max-width:750px){.container{padding:20px 15px 50px}.header-inner{flex-wrap:wrap}.header-inner nav{width:100%;justify-content:space-between;gap:8px}.hero{padding:37px 27px}.hero h1{font-size:30px}.hero-symbol{display:none}.module-grid,.stats,.field-grid{grid-template-columns:1fr}.page-top,.export-bar{align-items:stretch;flex-direction:column}.field.full{grid-column:auto}.signer{grid-template-columns:1fr}.signer>strong{margin-top:8px}.sticky-save{flex-direction:column;align-items:stretch}}

.year-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.year-card{padding:18px 20px;background:#fff;border:1px solid var(--line);border-radius:12px}.year-card>strong{font-size:24px}.year-card>span{display:block;color:var(--muted);font-size:12px;margin:2px 0 18px}.year-card>div{display:flex;gap:18px}.year-card a{color:var(--teal);font-size:12px;font-weight:700}.year-empty{padding:22px;background:#fff;border:1px dashed var(--line);border-radius:12px;color:var(--muted)}@media(max-width:750px){.year-grid{grid-template-columns:1fr}}


/* Histórico 2026: misma rejilla vertical para estado, justificante y descarga. */
.history-table{table-layout:fixed;min-width:1090px;width:100%;border-collapse:collapse}
.history-table th:nth-child(1){width:19%}
.history-table th:nth-child(2){width:20%}
.history-table th:nth-child(3){width:8%;text-align:center}
.history-table th:nth-child(4){width:38%}
.history-table th:nth-child(5){width:15%}
.history-table tbody td{vertical-align:middle}
.history-table td.history-status,.history-table td.history-download{vertical-align:top;padding-top:14px;padding-bottom:14px}
.history-table .history-state-line{height:27px;display:flex;align-items:flex-start;justify-content:flex-start;white-space:nowrap}
.history-table .history-control-line{height:36px;min-height:36px;margin:4px 0 0}
.history-table .inline-confirm{display:flex;align-items:stretch;gap:8px;width:100%;min-width:0}
.history-table .inline-confirm input{flex:1 1 auto;min-width:0;width:100%;padding:7px 9px;font-size:12px;height:36px}
.history-table .inline-confirm button,.history-table .history-download .btn{height:36px;min-height:36px;box-sizing:border-box;padding:7px 10px;font-size:11px;line-height:1.2;white-space:nowrap}
.history-table .inline-confirm button{flex:0 0 auto}
.history-table .history-download-spacer{height:27px}
.history-table .history-download-controls{display:flex;align-items:stretch;justify-content:center}
.history-table .history-download-controls .btn{width:100%}
.history-table .history-sent-info{display:flex;align-items:center;font-size:11px;color:#607888;overflow-wrap:anywhere}
.history-table .history-count{text-align:center;font-variant-numeric:tabular-nums}
.history-table .history-version,.history-table .history-date{overflow-wrap:anywhere}
.history-table .history-date .hash{overflow-wrap:anywhere}
@media(max-width:1138px){.history-table{min-width:1090px}.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}}

/* UI 3: historial — misma linea inferior para ambos botones, sin espaciadores ficticios */
.history-table{table-layout:fixed;min-width:1060px}
.history-table th:nth-child(1){width:18%}
.history-table th:nth-child(2){width:20%}
.history-table th:nth-child(3){width:8%}
.history-table th:nth-child(4){width:40%}
.history-table th:nth-child(5){width:14%}
.history-table tbody td.history-status,.history-table tbody td.history-download{vertical-align:bottom!important;padding-top:14px;padding-bottom:16px}
.history-table .history-status-stack{display:flex;flex-direction:column;align-items:flex-start;gap:10px;width:100%;min-width:0}
.history-table .history-status-stack .pill{align-self:flex-start}
.history-table .inline-confirm{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;margin:0!important;width:100%;min-height:36px}
.history-table .inline-confirm input{min-width:0;flex:1;width:0;height:36px!important;margin:0!important;padding:7px 9px}
.history-table .inline-confirm .btn,.history-table .history-download>a.btn{height:36px!important;min-height:36px!important;display:inline-flex;align-items:center;justify-content:center;margin:0!important;line-height:1.2;padding:7px 10px;white-space:nowrap}
.history-table .history-download>a.btn{width:100%}
.history-table .history-sent-info{min-height:36px;align-items:center}
/* Formulario compacto y agrupado por categorías */
.form-section{margin-bottom:13px}
.form-section .section-title{padding:14px 18px}
.section-heading{display:flex;align-items:center;gap:12px}
.section-number{width:32px;height:32px;flex:0 0 32px;display:grid;place-items:center;border-radius:9px;background:#e4f4f4;color:#087f86;font-size:12px;font-weight:800}
.section-heading h2{font-size:15px;line-height:1.25;margin:0 0 3px}
.section-heading p{font-size:11px;color:var(--muted);margin:0}
.field-grid.compact-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 16px;padding:17px 19px 19px}
.compact-grid .field{font-size:11px;gap:5px;min-width:0}
.compact-grid input,.compact-grid select,.compact-grid textarea{height:35px;min-height:35px;padding:7px 10px;font-size:12px}
.compact-grid textarea{height:auto;min-height:57px}
.compact-grid .validation-hint{font-size:10px}
.form-section .signers{padding:5px 19px 14px}
.form-section .signer{grid-template-columns:93px minmax(130px,1fr) minmax(220px,2.4fr);gap:13px;padding:9px 0}
.form-section .signer label{font-size:11px}
.form-section .signer input{height:35px;padding:7px 10px;font-size:12px;margin-top:4px}
@media(max-width:850px){.field-grid.compact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:580px){.field-grid.compact-grid{grid-template-columns:1fr}.form-section .signer{grid-template-columns:1fr;gap:7px}}


/* UI 4 — etiquetas y controles alineados de forma estable */
.edit-form .compact-grid .field{align-self:start;min-width:0;gap:5px}
.edit-form .compact-grid .field-caption{display:block;min-height:34px;line-height:16px;font-weight:700;overflow-wrap:normal}
.edit-form .compact-grid .field-caption .required{display:inline;vertical-align:baseline;white-space:nowrap;margin-left:3px;font-size:12px;line-height:inherit}
.edit-form .compact-grid .field input,
.edit-form .compact-grid .field select{margin:0;max-width:100%;height:35px;min-height:35px;box-sizing:border-box}
.edit-form .compact-grid .field-yesno select{width:125px;max-width:100%;padding-right:25px}
.edit-form .compact-grid .field-money input{width:170px;max-width:100%;font-variant-numeric:tabular-nums;text-align:right}
.edit-form .compact-grid .field-months input{width:135px;max-width:100%;font-variant-numeric:tabular-nums}
.edit-form .compact-grid .field.full textarea{width:100%}
.edit-form .compact-grid .validation-hint{margin:0;line-height:14px}
@media(max-width:580px){.edit-form .compact-grid .field-caption{min-height:auto}.edit-form .compact-grid .field-yesno select{width:145px}}


/* UI 5 — Fechas y economía en paralelo, formularios densos */
.edit-form .paired-sections{display:grid;grid-template-columns:minmax(0,0.88fr) minmax(0,1.12fr);gap:14px;align-items:stretch;margin-bottom:13px}
.edit-form .paired-sections>.form-section{min-width:0;margin-bottom:0;display:flex;flex-direction:column}
.edit-form .paired-sections .section-title{padding:12px 15px;min-height:70px}
.edit-form .paired-sections .section-heading{min-width:0;gap:9px}
.edit-form .paired-sections .section-heading h2{font-size:14px}
.edit-form .paired-sections .section-heading p{font-size:10px}
.edit-form .paired-sections .section-number{width:29px;height:29px;flex-basis:29px}
.edit-form .paired-sections .compact-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 11px;padding:14px 15px 16px;align-content:start}
.edit-form .paired-sections .field{min-width:0;gap:4px}
.edit-form .paired-sections .field-caption{min-height:32px;line-height:15px;font-size:10.5px}
.edit-form .paired-sections .field input,.edit-form .paired-sections .field select{height:32px;min-height:32px;font-size:11.5px;padding:5px 8px}
.edit-form .paired-sections .field-yesno select{width:103px;max-width:100%;padding-right:20px}
.edit-form .paired-sections .field-money input{width:146px;max-width:100%}
.edit-form .paired-sections .field-months input{width:109px;max-width:100%}
.edit-form .paired-sections .field input[type=date]{width:155px;max-width:100%}
.edit-form .paired-sections .field-caption .required{margin-left:2px}
.module-grid{grid-template-columns:minmax(0,1fr)}
.module-grid .module-card{max-width:560px}
@media(max-width:900px){.edit-form .paired-sections{grid-template-columns:1fr}.edit-form .paired-sections .section-title{min-height:0}}
@media(max-width:480px){.edit-form .paired-sections .compact-grid{grid-template-columns:1fr}.edit-form .paired-sections .field-caption{min-height:0}}


/* UI 6: fechas en 4 filas alineadas, economía a su derecha */
@media(min-width:901px){
 .edit-form .paired-sections{grid-template-columns:minmax(285px,0.34fr) minmax(0,0.66fr);gap:12px}
}
.edit-form .paired-sections .section-dates .compact-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:9px;padding:12px 15px 16px}
.edit-form .paired-sections .section-dates .field{display:grid;grid-template-columns:minmax(125px,1fr) minmax(0,155px);gap:9px;align-items:center;justify-items:start}
.edit-form .paired-sections .section-dates .field-caption{min-height:0;line-height:1.3}
.edit-form .paired-sections .section-dates .field input,.edit-form .paired-sections .section-dates .field select{width:100%;max-width:155px}
.edit-form .paired-sections .section-dates .field-months input{max-width:105px}
.edit-form .paired-sections .section-dates .field-yesno select{max-width:105px}
.edit-form .paired-sections .section-economy .compact-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 10px;padding:12px 14px 16px}
.edit-form .paired-sections .section-economy .field-caption{min-height:32px;line-height:15px}
.edit-form .paired-sections .section-economy .field-money input{width:100%;max-width:150px}
.edit-form .paired-sections .section-economy .field-yesno select{width:96px}
@media(max-width:1150px) and (min-width:901px){
 .edit-form .paired-sections{grid-template-columns:minmax(280px,0.4fr) minmax(0,0.6fr)}
 .edit-form .paired-sections .section-economy .compact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:580px){
 .edit-form .paired-sections .section-dates .field{grid-template-columns:minmax(0,1fr) minmax(0,135px)}
 .edit-form .paired-sections .section-economy .compact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:390px){.edit-form .paired-sections .section-economy .compact-grid{grid-template-columns:1fr}}

/* UI7: identificación y fechas en paralelo; economía en bloque independiente. */
.edit-form .top-form-sections{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);gap:14px;align-items:stretch;margin-bottom:14px}
.edit-form .top-form-sections>.form-section{min-width:0;min-height:0;margin:0}
.edit-form .top-form-sections .section-title{min-height:70px;padding:12px 16px}
.edit-form .top-form-sections .section-heading h2{font-size:14px}
.edit-form .top-form-sections .section-heading p{font-size:11px}
.edit-form .section-identification .compact-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:15px 17px}
.edit-form .section-identification .field.full{grid-column:auto}
.edit-form .section-identification .field-caption{min-height:0}
.edit-form .section-identification input[name="Referencia"]{max-width:270px}
.edit-form .section-identification textarea[name="Objeto"]{min-height:90px;height:90px}
.edit-form .section-dates .compact-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:9px;padding:13px 16px}
.edit-form .section-dates .field{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,145px);align-items:center;gap:10px;min-width:0}
.edit-form .section-dates .field-caption{min-height:0;line-height:1.25;font-size:11px}
.edit-form .section-dates .field input,.edit-form .section-dates .field select{width:100%;max-width:145px;height:34px;min-height:34px}
.edit-form .section-dates .field-months input,.edit-form .section-dates .field-yesno select{max-width:104px}
.edit-form>.section-economy .compact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 22px;padding:17px 19px}
.edit-form>.section-economy .field-caption{min-height:18px;line-height:1.4}
.edit-form>.section-economy .field-yesno select{width:105px}
.edit-form>.section-economy .field-money input{width:165px}
@media(max-width:900px){.edit-form .top-form-sections{grid-template-columns:1fr}.edit-form .top-form-sections .section-title{min-height:0}}
@media(max-width:620px){.edit-form>.section-economy .compact-grid{grid-template-columns:1fr}.edit-form .section-dates .field{grid-template-columns:minmax(0,1fr) minmax(0,135px)}}


/* UI8 — alineación definitiva de los cuatro controles de Fechas y vigencia.
   Reglas específicas al final para que no prevalezcan estilos de UI6/UI7. */
.edit-form .top-form-sections .section-dates .compact-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  row-gap:10px;
  padding:15px 16px 18px;
}
.edit-form .top-form-sections .section-dates .compact-grid > .field{
  display:grid;
  grid-template-columns:minmax(0,1fr) 145px;
  column-gap:12px;
  align-items:center;
  justify-items:stretch;
  min-height:35px;
  margin:0;
}
.edit-form .top-form-sections .section-dates .field-caption{
  display:block;
  min-height:0;
  margin:0;
  line-height:1.35;
  font-size:11px;
  font-weight:700;
}
.edit-form .top-form-sections .section-dates .field input,
.edit-form .top-form-sections .section-dates .field select,
.edit-form .top-form-sections .section-dates .field-months input,
.edit-form .top-form-sections .section-dates .field-yesno select{
  display:block;
  width:145px;
  max-width:100%;
  height:35px;
  min-height:35px;
  margin:0;
  padding:7px 10px;
  box-sizing:border-box;
  justify-self:start;
  font-size:12px;
}
@media(max-width:480px){
 .edit-form .top-form-sections .section-dates .compact-grid > .field{
    grid-template-columns:minmax(0,1fr) 125px;
    column-gap:8px;
 }
 .edit-form .top-form-sections .section-dates .field input,
 .edit-form .top-form-sections .section-dates .field select,
 .edit-form .top-form-sections .section-dates .field-months input,
 .edit-form .top-form-sections .section-dates .field-yesno select{width:125px}
}

/* Contratos menores: módulos y formularios compactos coherentes con Convenios */
.cm-top-buttons{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.cm-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 18px;padding:20px}
.cm-field{display:flex;flex-direction:column;min-width:0;gap:5px;font-size:11px;font-weight:700;color:#4b6174}
.cm-field>span{min-height:16px;line-height:16px}
.cm-field input,.cm-field select,.cm-field textarea{min-height:35px;padding:7px 10px;font-size:12px}
.cm-field .cm-number{max-width:175px;font-variant-numeric:tabular-nums;text-align:right}
.cm-field:has(textarea){grid-column:span 2}
.cm-additional{padding:14px 19px 18px}
.cm-additional>.muted{margin:0 0 8px}
.cm-small-row{display:grid;grid-template-columns:74px repeat(5,minmax(0,1fr));gap:10px;align-items:end;padding:8px 0;border-bottom:1px solid #edf1f4}
.cm-small-row:last-child{border:0}
.cm-small-row strong{font-size:11px;padding-bottom:9px}
.cm-small-row label{display:flex;flex-direction:column;gap:4px;font-size:10px;font-weight:700;color:#556b7c}
.cm-small-row input{min-width:0;height:33px;font-size:11px;padding:5px 8px}
.cm-import-panel{max-width:750px}
.cm-import-inner{padding:22px;display:flex;flex-direction:column;align-items:flex-start;gap:15px}
.cm-import-inner label{width:100%;font-weight:700;font-size:12px}
.cm-import-inner input{margin-top:8px}
.cm-import-inner p{margin:0}
.cm-map-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 22px;padding:22px}
.cm-map-grid label{font-size:11px;font-weight:700;color:#486173}
.cm-map-grid select{display:block;margin-top:5px;font-size:12px;min-width:0;max-width:100%}
@media(max-width:900px){.cm-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.cm-small-row{grid-template-columns:repeat(2,minmax(0,1fr))}.cm-small-row strong{grid-column:1/-1}}
@media(max-width:580px){.cm-grid,.cm-map-grid{grid-template-columns:1fr}.cm-field:has(textarea){grid-column:auto}.cm-top-buttons{width:100%}}

/* UI9 · Tarjetas de módulos en la misma fila y alineadas (escritorio).
   Sobrescribe la regla antigua de una única columna. */
.module-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:stretch}
.module-grid .module-card{max-width:none;width:100%;min-width:0;display:flex;flex-direction:column;align-items:flex-start;min-height:235px;padding:26px 28px}
.module-grid .module-card h3{margin:16px 0 6px}
.module-grid .module-card p{margin:0 0 20px;min-height:0;line-height:1.5}
.module-grid .module-card span{margin-top:auto}
@media(max-width:700px){.module-grid{grid-template-columns:minmax(0,1fr)}.module-grid .module-card{min-height:215px}}


/* Portal TC — tarjetas de ejercicios compactas. Añadir AL FINAL de assets/style.css */
.year-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.year-grid > .year-card {
  min-width: 0;
  min-height: 0;
  padding: 13px 16px;
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 3px;
}
.year-grid > .year-card > strong {
  display: block;
  font-size: 21px;
  line-height: 1.12;
  margin: 0;
}
.year-grid > .year-card > span {
  display: block;
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}
.year-grid > .year-card > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 15px;
  margin-top: 6px;
}
.year-grid > .year-card a {
  display: inline-block;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 980px) {
  .year-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 690px) {
  .year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 410px) {
  .year-grid { grid-template-columns: 1fr; }
}
.cm-economy{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;padding:15px 20px 20px}
.cm-econ-pair,.cm-econ-extras{min-width:0;border:1px solid #dce6ee;background:#f8fbfd;border-radius:10px;padding:12px}
.cm-econ-pair h3,.cm-econ-extras h3{font-size:12px;color:#29465c;font-weight:750;margin:0 0 10px}
.cm-econ-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;align-items:end}
.cm-econ-row>.cm-field{min-width:0}
.cm-econ-row>.cm-field .cm-number{width:100%;max-width:180px}
.cm-econ-extras{grid-column:1/-1}
.cm-econ-extras .cm-econ-row{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:850px){.cm-economy{grid-template-columns:1fr}.cm-econ-extras .cm-econ-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.cm-econ-row,.cm-econ-extras .cm-econ-row{grid-template-columns:1fr}}
