/* Alpha15: Calendario Inteligente de Entregables y Alertas Operativas */
.ci-shell { display: grid; gap: 1rem; }
.ci-card, .ci-panel {
    border: 1px solid rgba(51, 65, 85, .95);
    background: linear-gradient(145deg, rgba(15, 23, 42, .95), rgba(2, 6, 23, .88));
    border-radius: 1.25rem;
    box-shadow: 0 18px 45px rgba(0,0,0,.18);
}
.ci-card { padding: 1rem; }
.ci-panel { padding: 1.25rem; }
.ci-title-icon {
    width: 3.8rem; height: 3.8rem; display: grid; place-items: center;
    border-radius: 1.2rem; background: rgba(37, 99, 235, .16);
    border: 1px solid rgba(96, 165, 250, .35); color: rgb(96 165 250);
}
.ci-metric {
    border: 1px solid rgba(51, 65, 85, .95);
    background: rgba(15, 23, 42, .7);
    border-radius: 1rem;
    padding: 1rem;
    min-height: 7rem;
}
.ci-input {
    width: 100%; border-radius: .85rem; border: 1px solid rgb(51 65 85);
    background: rgb(2 6 23); color: rgb(226 232 240); padding: .75rem .9rem;
    font-size: .875rem;
}
.ci-input:focus { outline: none; border-color: rgba(96, 165, 250, .75); box-shadow: 0 0 0 3px rgba(59, 130, 246, .15); }
.ci-btn {
    border-radius: .85rem; padding: .72rem 1rem; font-size: .875rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: .5rem; transition: .2s ease;
}
.ci-btn-primary { background: rgb(79 70 229); color: white; }
.ci-btn-primary:hover { background: rgb(99 102 241); }
.ci-btn-muted { border: 1px solid rgb(51 65 85); color: rgb(203 213 225); background: rgba(15, 23, 42, .55); }
.ci-btn-muted:hover { background: rgba(30, 41, 59, .8); }
.ci-btn-success { background: rgb(5 150 105); color: white; }
.ci-btn-danger { background: rgb(190 18 60); color: white; }
.ci-view-toggle { border: 1px solid rgb(51 65 85); border-radius: .9rem; overflow: hidden; display: inline-flex; }
.ci-view-toggle button { padding: .6rem 1rem; color: rgb(148 163 184); border-right: 1px solid rgb(51 65 85); }
.ci-view-toggle button:last-child { border-right: none; }
.ci-view-toggle button.ci-active { background: rgba(79, 70, 229, .55); color: white; }
.ci-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; border: 1px solid rgb(30 41 59); border-radius: 1rem; overflow: hidden; background: rgb(30 41 59); }
.ci-weekday { background: rgba(15, 23, 42, .98); padding: .7rem; text-align: center; font-size: .78rem; color: rgb(203 213 225); font-weight: 700; }
.ci-day {
    min-height: 7.4rem; background: rgba(15, 23, 42, .82); padding: .65rem; position: relative;
    cursor: pointer; transition: .15s ease;
}
.ci-day:hover { background: rgba(30, 41, 59, .94); }
.ci-day-muted { color: rgb(100 116 139); background: rgba(15, 23, 42, .45); }
.ci-day-number { font-weight: 800; color: rgb(226 232 240); display: inline-flex; min-width: 1.7rem; justify-content: center; }
.ci-day-today .ci-day-number { background: rgba(96, 165, 250, .16); border: 1px solid rgba(96, 165, 250, .45); border-radius: 999px; }
.ci-event-pill { margin-top: .45rem; border-radius: .55rem; padding: .25rem .45rem; font-size: .7rem; line-height: 1.1rem; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border: 1px solid transparent; }
.ci-dot { width: .55rem; height: .55rem; border-radius: 999px; display: inline-block; margin-right: .35rem; }
.ci-azul { border-color: rgba(59,130,246,.5); background: rgba(59,130,246,.16); color: rgb(147 197 253); }
.ci-verde { border-color: rgba(34,197,94,.5); background: rgba(34,197,94,.16); color: rgb(134 239 172); }
.ci-amarillo { border-color: rgba(234,179,8,.55); background: rgba(234,179,8,.16); color: rgb(253 224 71); }
.ci-naranja { border-color: rgba(249,115,22,.55); background: rgba(249,115,22,.16); color: rgb(253 186 116); }
.ci-rojo { border-color: rgba(239,68,68,.55); background: rgba(239,68,68,.18); color: rgb(252 165 165); }
.ci-gris { border-color: rgba(148,163,184,.4); background: rgba(100,116,139,.16); color: rgb(203 213 225); }
.ci-list-status { border-radius: 999px; padding: .25rem .6rem; font-size: .72rem; font-weight: 800; border: 1px solid transparent; display: inline-flex; align-items: center; gap: .35rem; }
.ci-week-grid { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: .65rem; overflow-x: auto; padding-bottom: .35rem; }
.ci-week-column { min-height: 18rem; border: 1px solid rgb(30 41 59); border-radius: .9rem; background: rgba(15,23,42,.65); overflow: hidden; }
.ci-week-today { border-color: rgba(96,165,250,.65); box-shadow: inset 0 0 0 1px rgba(96,165,250,.18); }
.ci-week-heading { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: .7rem; color: rgb(203 213 225); background: rgba(2,6,23,.65); }
.ci-week-heading span { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 999px; background: rgba(59,130,246,.18); }
.ci-week-events { display: grid; gap: .5rem; padding: .55rem; }
.ci-week-events > p { color: rgb(100 116 139); font-size: .72rem; text-align: center; padding: 1rem .2rem; }
.ci-week-event { border: 1px solid transparent; border-radius: .65rem; padding: .55rem; text-align: left; font-size: .72rem; }
.ci-week-event strong, .ci-week-event span { display: block; }
.ci-week-event span { margin-top: .2rem; opacity: .8; font-size: .66rem; }
.ci-agenda { display: grid; gap: .8rem; }
.ci-agenda-day { display: grid; grid-template-columns: 9rem 1fr; gap: .8rem; border-bottom: 1px solid rgb(30 41 59); padding-bottom: .8rem; }
.ci-agenda-date { color: rgb(125 211 252); font-weight: 700; display: flex; align-items: flex-start; gap: .45rem; padding: .7rem .2rem; }
.ci-agenda-item, .ci-personal-pending { width: 100%; display: flex; align-items: center; gap: .65rem; text-align: left; border: 1px solid rgb(30 41 59); background: rgba(2,6,23,.45); border-radius: .75rem; padding: .7rem; margin-bottom: .45rem; color: rgb(203 213 225); }
.ci-agenda-item:hover, .ci-personal-pending:hover { background: rgba(30,41,59,.72); }
.ci-agenda-item > span:nth-child(2), .ci-personal-pending > span:nth-child(2) { min-width: 0; flex: 1; }
.ci-agenda-item strong, .ci-agenda-item small, .ci-personal-pending strong, .ci-personal-pending small { display: block; }
.ci-agenda-item small, .ci-personal-pending small { color: rgb(100 116 139); margin-top: .18rem; }
.ci-agenda-item em { font-size: .7rem; color: rgb(148 163 184); font-style: normal; }
.ci-checklist-list { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.ci-checklist-card { border: 1px solid rgb(30 41 59); border-radius: 1rem; background: rgba(2,6,23,.48); padding: 1rem; }
.ci-checklist-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.ci-checklist-head small, .ci-checklist-head strong, .ci-checklist-head span { display: block; }
.ci-checklist-head small { color: rgb(52 211 153); text-transform: uppercase; font-size: .68rem; }
.ci-checklist-head strong { color: rgb(226 232 240); margin-top: .2rem; }
.ci-checklist-head div > span { color: rgb(100 116 139); font-size: .72rem; margin-top: .25rem; }
.ci-checklist-reqs { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.ci-checklist-reqs span { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid rgba(51,65,85,.9); border-radius: 999px; padding: .3rem .55rem; color: rgb(148 163 184); font-size: .7rem; }
.ci-annual-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ci-mini-month { border: 1px solid rgb(30 41 59); background: rgba(15, 23, 42, .72); border-radius: 1rem; padding: .8rem; }
.ci-mini-title { text-align: center; font-weight: 800; color: rgb(226 232 240); margin-bottom: .55rem; }
.ci-mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .18rem; font-size: .68rem; text-align: center; }
.ci-mini-day { min-height: 1.45rem; border-radius: .35rem; color: rgb(148 163 184); display: grid; place-items: center; position: relative; }
.ci-mini-day.has-event { color: white; font-weight: 800; }
.ci-mini-day.has-event::after { content: ''; position: absolute; bottom: .12rem; width: .35rem; height: .35rem; border-radius: 999px; background: currentColor; }
.ci-modal-backdrop { position: fixed; inset: 0; background: rgba(2, 6, 23, .82); backdrop-filter: blur(6px); z-index: 70; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.ci-modal { width: min(980px, 100%); max-height: 90vh; overflow: auto; border: 1px solid rgb(51 65 85); background: rgb(15 23 42); border-radius: 1.25rem; padding: 1.2rem; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.ci-dashboard-widget { border: 1px solid rgba(59, 130, 246, .25); background: linear-gradient(135deg, rgba(37,99,235,.16), rgba(15,23,42,.72)); border-radius: 1rem; padding: 1rem; }
.ci-progress { height: .55rem; border-radius: 999px; background: rgba(51,65,85,.8); overflow: hidden; }
.ci-progress-bar { height: 100%; background: rgb(34, 197, 94); border-radius: 999px; }
@media (max-width: 900px) {
    .ci-day { min-height: 5.5rem; padding: .45rem; }
    .ci-event-pill { font-size: .64rem; }
    .ci-calendar-grid { font-size: .82rem; min-width: 720px; }
    #ci-view-container { overflow-x: auto; }
    .ci-agenda-day { grid-template-columns: 1fr; gap: 0; }
    .ci-view-toggle { max-width: 100%; overflow-x: auto; }
}

/* ALPHA33: vista previa editable de cronogramas antes de guardar */
.ci-help-panel { border-color: rgba(34, 211, 238, .24); background: linear-gradient(135deg, rgba(8, 47, 73, .40), rgba(15, 23, 42, .84)); }
.ci-upload-highlight { box-shadow: 0 0 0 3px rgba(34,211,238,.28), 0 22px 55px rgba(8,145,178,.22); }
.ci-upload-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 1rem; }
.ci-upload-dropzone { min-height: 260px; border: 2px dashed rgba(34,211,238,.42); border-radius: 1.15rem; background: rgba(8,47,73,.28); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; cursor: pointer; transition: .2s ease; }
.ci-upload-dropzone:hover, .ci-upload-dropzone:focus, .ci-upload-dropzone.ci-dragging { border-color: rgb(34 211 238); background: rgba(8,145,178,.18); outline: none; transform: translateY(-1px); }
.ci-upload-icon { width: 4rem; height: 4rem; display: grid; place-items: center; border-radius: 1.1rem; color: rgb(103 232 249); background: rgba(6,182,212,.14); border: 1px solid rgba(34,211,238,.32); }
.ci-upload-icon svg { width: 2rem; height: 2rem; }
.ci-upload-dropzone h3 { margin-top: .9rem; color: rgb(241 245 249); font-size: 1.15rem; font-weight: 800; }
.ci-upload-dropzone p { max-width: 620px; margin-top: .4rem; color: rgb(148 163 184); font-size: .86rem; }
.ci-upload-dropzone small { margin-top: .9rem; color: rgb(100 116 139); }
.ci-upload-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; margin-top: 1rem; }
.ci-upload-preview { min-height: 260px; display: flex; flex-direction: column; border: 1px solid rgba(51,65,85,.95); border-radius: 1.15rem; background: rgba(2,6,23,.6); padding: 1rem; }
.ci-upload-visual { min-height: 128px; max-height: 220px; display: grid; place-items: center; overflow: hidden; border-radius: .9rem; background: rgba(15,23,42,.9); color: rgb(71 85 105); }
.ci-upload-visual img { width: 100%; height: 100%; min-height: 128px; max-height: 220px; object-fit: contain; background: rgb(2 6 23); }
.ci-file-badge { display: grid; place-items: center; gap: .45rem; color: rgb(125 211 252); font-weight: 800; }
.ci-file-badge svg { width: 2.4rem; height: 2.4rem; }
.ci-upload-file-info { margin-top: .8rem; min-width: 0; }
.ci-upload-file-info strong, .ci-upload-file-info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-upload-file-info strong { color: rgb(226 232 240); }
.ci-upload-file-info span { margin-top: .2rem; color: rgb(100 116 139); font-size: .72rem; }
.ci-upload-preview-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: auto; padding-top: .9rem; }
.ci-upload-preview-actions .ci-btn:disabled { cursor: not-allowed; opacity: .42; }
.ci-ocr-progress { margin-top: .8rem; }
.ci-ocr-progress p { margin-top: .35rem; color: rgb(165 243 252); font-size: .72rem; }
.ci-ocr-progress .ci-progress-bar { width: 4%; background: linear-gradient(90deg, rgb(6 182 212), rgb(99 102 241)); transition: width .35s ease; }
.ci-upload-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: .65rem; margin-top: 1rem; }
.ci-upload-steps span { display: flex; align-items: center; gap: .55rem; color: rgb(148 163 184); font-size: .76rem; }
.ci-upload-steps b { flex: 0 0 auto; width: 1.65rem; height: 1.65rem; display: grid; place-items: center; border-radius: 999px; background: rgba(34,211,238,.13); color: rgb(103 232 249); border: 1px solid rgba(34,211,238,.28); }
.ci-preview-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.ci-preview-summary > div { border: 1px solid rgba(51,65,85,.9); border-radius: .95rem; background: rgba(2,6,23,.55); padding: .8rem; }
.ci-preview-summary strong { display: block; font-size: 1.55rem; line-height: 1.8rem; color: rgb(103 232 249); }
.ci-preview-summary span { display: block; margin-top: .25rem; color: rgb(148 163 184); font-size: .74rem; }
.ci-preview-warning { border: 1px solid rgba(245, 158, 11, .35); background: rgba(245, 158, 11, .10); color: rgb(253 230 138); border-radius: .95rem; padding: .85rem 1rem; margin-bottom: 1rem; font-size: .84rem; }
.ci-preview-warning ul { list-style: disc; margin-left: 1.2rem; margin-top: .35rem; }
.ci-preview-table-wrap { max-height: 52vh; overflow: auto; border: 1px solid rgb(30 41 59); border-radius: 1rem; }
.ci-preview-table { width: 100%; min-width: 1100px; border-collapse: collapse; font-size: .78rem; }
.ci-preview-table th { position: sticky; top: 0; z-index: 1; background: rgb(2 6 23); color: rgb(203 213 225); text-transform: uppercase; letter-spacing: .04em; padding: .7rem; border-bottom: 1px solid rgb(51 65 85); }
.ci-preview-table td { padding: .55rem; border-bottom: 1px solid rgb(30 41 59); vertical-align: top; }
.ci-preview-table tr:hover td { background: rgba(30,41,59,.45); }
.ci-preview-table .ci-input { padding: .45rem .55rem; border-radius: .55rem; font-size: .78rem; }
@media (max-width: 900px) {
    .ci-upload-layout { grid-template-columns: 1fr; }
    .ci-upload-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
    .ci-upload-steps { grid-template-columns: 1fr; }
    .ci-upload-dropzone { min-height: 230px; padding: 1rem; }
}
