.formacion-cover{height:100%;padding:24px 12px;text-align:center;font-size:32px;font-weight:800;letter-spacing:3px;color:white;background:radial-gradient(circle at 90% 10%,#b1cba3,transparent 60%),linear-gradient(130deg,#124b4b,#397a72)}
#formacionView{max-width:1500px;margin:auto;padding:28px;width:100%;color:#174b48}
.fm-heading,.fm-toolbar,.fm-tabs,.fm-actions,.fm-related{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.fm-heading{justify-content:space-between;margin-bottom:24px}.fm-heading h2{font-size:30px;margin:4px 0}.fm-heading p{margin:6px 0;color:#587778}
.fm-tabs{margin-bottom:20px}.fm-tabs button{flex:1;min-width:130px}.fm-tabs [aria-selected=true]{background:#076650;color:white;border-color:#076650}
#formacionView button,.fm-dialog button{padding:10px 14px;border:1px solid #bad1cc;border-radius:10px;background:white;color:#075653;cursor:pointer;font:inherit}
#formacionView .fm-primary,.fm-dialog .fm-primary{background:#096651;color:white;border-color:#096651}
#formacionView button:disabled,.fm-dialog button:disabled{opacity:.5;cursor:wait}
.fm-toolbar{margin-bottom:14px}.fm-toolbar input{flex:1;min-width:180px}.fm-toolbar select{max-width:350px}.fm-toolbar input,.fm-toolbar select,.fm-dialog input,.fm-dialog select,.fm-dialog textarea{font:inherit;color:#174b48;background:white;padding:10px;border:1px solid #b5cec8;border-radius:8px;min-width:0}
.fm-note{background:#e5f2ec;border-radius:10px;padding:12px 16px;margin:14px 0}.fm-note.fm-warning{background:#fff2d7;color:#735210}.fm-error{color:#a32525}
.fm-scroll{overflow:auto;background:white;border:1px solid #d5e4df;border-radius:14px}.fm-table{width:100%;border-collapse:collapse;font-size:14px}.fm-table th{background:#edf5f1;text-align:left;font-size:12px;text-transform:uppercase;letter-spacing:.04em}.fm-table th,.fm-table td{padding:12px 14px;border-bottom:1px solid #e1ebe7;vertical-align:middle}.fm-table td:first-child{min-width:170px}.fm-table small{display:block;color:#68837e;margin-top:4px}.fm-table .fm-actions{min-width:190px}.fm-table a,.fm-dialog a{color:#05695c}.fm-empty{padding:40px;text-align:center;color:#667e78}.fm-pager{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:14px}
.fm-dialog{width:min(900px,94vw);max-height:90vh;border:1px solid #b6ccc6;border-radius:18px;padding:24px;color:#174b48;box-shadow:0 20px 70px #123c4630}.fm-dialog::backdrop{background:#183e4380}.fm-dialog h3{margin:0 0 8px}.fm-dialog form{margin-top:18px}.fm-formgrid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.fm-formgrid label{display:flex;flex-direction:column;gap:6px;font-size:14px}.fm-formgrid textarea{min-height:72px}.fm-formgrid .fm-wide{grid-column:1/-1}.fm-dialog footer{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:24px}.fm-related{margin:15px 0}.fm-id{overflow-wrap:anywhere;font-size:12px;color:#647e77}.fm-dialog .fm-delete{margin-right:auto;color:#a22}.fm-field-link{font-size:12px;overflow-wrap:anywhere}
#formacionView .fm-tabs [aria-selected=true]{background:#076650;color:white;border-color:#076650}
.fm-formgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.fm-formgrid label{min-width:0}.fm-dialog input,.fm-dialog select,.fm-dialog textarea{width:100%;box-sizing:border-box}.fm-dialog{overflow:auto}
.fm-student-photos{padding:16px;margin-bottom:22px;border:1px solid #c7ddd3;background:#f0f7f3;border-radius:12px}.fm-student-photos h4{margin:0 0 12px}.fm-photo-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:12px}.fm-photo-card{display:flex;flex-direction:column;gap:8px;padding:12px;background:white;border-radius:10px;min-width:0}.fm-photo-card img{width:100%;height:140px;object-fit:contain}.fm-photo-symbol{font-size:32px;color:#417d69}.fm-photo-preview img{max-height:240px;max-width:100%;object-fit:contain;display:block;margin:10px 0}.fm-photo-status{font-size:14px;overflow-wrap:anywhere}
@media(max-width:650px){#formacionView{padding:16px 10px}.fm-formgrid{grid-template-columns:minmax(0,1fr)}.fm-heading h2{font-size:25px}.fm-toolbar>*{width:100%;max-width:none!important}.fm-tabs{gap:6px}.fm-tabs button{min-width:40%;font-size:13px!important}.fm-dialog{padding:18px}.formacion-cover{font-size:24px;letter-spacing:1px}}

.fm-photo-open{padding:0!important;width:76px;height:88px;overflow:hidden;border-radius:10px!important;display:block}.fm-student-thumb{width:100%;height:100%;object-fit:cover;display:block}.fm-student-thumb[hidden],.fm-student-placeholder[hidden]{display:none}.fm-student-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;background:#e5f0eb;font-weight:bold;font-size:24px}.fm-student-placeholder small{font-size:10px;font-weight:normal;text-align:center;margin:4px}.fm-table:has(.fm-photo-open) td:first-child{min-width:90px;width:90px}.fm-signature-context{display:flex;justify-content:space-between;align-items:center;margin:12px 0}

.fm-photo-kind-label{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}.fm-photo-gallery{display:block}.fm-photo-group{margin-top:14px}.fm-photo-group h5{font-size:15px;margin:8px 0}.fm-photo-group-items{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:12px}

.fm-student-images{display:flex;gap:8px;align-items:flex-start}.fm-image-slot{flex:none}.fm-image-label{display:block;font-size:10px;font-weight:600;margin-bottom:5px;white-space:nowrap}.fm-dni-thumb{width:108px!important}.fm-dni-thumb .fm-student-thumb{object-fit:contain;background:#f6faf8}.fm-photo-open{border:1px solid #bad1cc;text-decoration:none}.fm-table:has(.fm-student-images) td:first-child{min-width:330px;width:330px}

.fm-certificates{display:flex;flex-wrap:wrap;gap:10px;min-width:160px}.fm-certificate{width:142px;display:flex;flex-direction:column;gap:6px;border:1px solid #c8dcd3;border-radius:9px;padding:8px;text-decoration:none;background:#fafdfb;font-size:11px}.fm-certificate-thumb{width:124px;height:160px;object-fit:contain;background:white}.fm-certificate-fallback{height:160px;display:flex;flex-direction:column;justify-content:center;align-items:center;background:#e8f0ec;font-size:25px;color:#427165}.fm-certificate-fallback span{font-size:11px;text-align:center;padding:8px}.fm-certificate-fallback[hidden],.fm-certificate-thumb[hidden]{display:none}.fm-signature-link{margin-top:10px}

#formacionView .fm-course-edit{text-align:left;border:0;background:transparent;padding:0;color:#08675b;text-decoration:underline;text-underline-offset:3px}

.fm-table:has(.fm-course-portrait) td:first-child{min-width:92px;width:92px}.fm-course-portrait .fm-photo-open{display:block}

.fm-pending-photos{min-width:190px;max-width:260px}.fm-pending-images{display:flex;gap:6px;flex-wrap:wrap}.fm-pending-images .fm-photo-open{width:72px;height:90px}.fm-pending-images img{object-fit:contain}.fm-table:has(.fm-pending-photos) td:first-child{min-width:240px;width:240px}

.fm-course-photo-slots{display:flex;gap:8px;width:330px}.fm-course-photo-slot{width:104px;display:flex;flex-direction:column;gap:6px;font-size:11px}.fm-course-photo-image{height:96px;border:1px solid #c5dcd4;border-radius:8px;overflow:hidden}.fm-course-photo-image a{display:block;height:100%}.fm-course-photo-image img{object-fit:contain}.fm-course-photo-slot button{font-size:11px!important;padding:7px 4px!important}.fm-table:has(.fm-course-photo-slots) td:first-child{min-width:350px;width:350px}.fm-course-pending{font-size:11px;margin-top:12px}
.fm-edition-sheets{margin:16px 0 24px;padding:16px;background:#eaf4ee;border:1px solid #c9dfd4;border-radius:12px}.fm-edition-sheets h4{margin:0 0 14px}.fm-file-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.fm-file-card{padding:14px;background:white;border:1px solid #cfdfd8;border-radius:12px;min-width:0}.fm-file-card h5{margin:0 0 12px;font-size:15px}.fm-file-list{max-height:240px;overflow:auto;margin-bottom:12px}.fm-file-list>div{padding:8px 0;border-bottom:1px solid #e8efeb;overflow-wrap:anywhere}.fm-file-list small{display:block;color:#698179;font-size:11px;margin-top:4px}.fm-file-card a{color:#086953}.fm-upload-label{display:flex;flex-direction:column;gap:6px;font-size:12px}.fm-file-card input[type=file]{max-width:100%;width:100%;font-size:12px;border:1px solid #bcd1c6;border-radius:6px;padding:6px;box-sizing:border-box}.fm-file-status{font-size:12px;overflow-wrap:anywhere}.fm-library-types{display:flex;gap:10px;margin:18px 0}.fm-library-types button{min-width:140px}.fm-dialog .fm-file-grid{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:700px){.fm-file-grid,.fm-dialog .fm-file-grid{grid-template-columns:1fr}.fm-library-types button{min-width:0;flex:1}}

.fm-edition-file{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:end;padding:12px 0;border-bottom:1px solid #bdd6ce;margin-bottom:12px}.fm-edition-file label{margin:0}@media(max-width:650px){.fm-edition-file{grid-template-columns:1fr}}

.fm-file-actions{grid-column:1/-1;display:flex;gap:8px;flex-wrap:wrap}.fm-file-actions [data-delete-file]{color:#a31d16}

#fmLibraryFiles{background:#fff;border:1px solid #bdd6ce;border-radius:12px;padding:20px}#fmLibraryFiles label{display:block}#fmLibraryFiles input:not([hidden]){display:block;box-sizing:border-box;width:100%;padding:10px;border:1px solid #bdd6ce;border-radius:7px;background:white;color:inherit;font:inherit;margin-top:6px}#fmLibraryFiles a{color:inherit}


.fm-cert-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;max-width:230px}.fm-cert-actions [role=status]{flex-basis:100%}

.fm-edition-file{grid-template-columns:minmax(100px,1fr) minmax(140px,1fr) 155px auto}@media(max-width:750px){.fm-edition-file{grid-template-columns:1fr}}

.fm-document-with-date{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin:3px 0}.fm-document-date{white-space:nowrap;font-size:12px;color:#53746e}

.fm-table tr.fm-collected>td{background:#e0f3e5}.fm-table tr.fm-not-collected>td{background:#fbe4e3}.fm-collected-label{display:flex;align-items:center;gap:7px}.fm-collected-label input[type=checkbox]{width:20px;height:20px;accent-color:#087753}.fm-collected-label span{font-size:11px}

.fm-dialog textarea{box-sizing:border-box;width:100%;padding:10px;border:1px solid #bdd6ce;border-radius:7px;font:inherit;color:inherit;resize:vertical}

/* Añadir alumnos desde la edición del curso. */
.fm-roster-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:16px 0 12px}.fm-roster-head .fm-note{flex:1;margin:0;min-width:200px}.fm-roster-head>button{min-height:48px;font-weight:700!important}
.fm-enroll-dialog{box-sizing:border-box;width:min(920px,calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);padding:24px;font-size:17px;line-height:1.45;overflow:auto}.fm-enroll-dialog h3{font-size:24px;line-height:1.25;margin-bottom:10px}.fm-enroll-course{padding:12px 16px;margin:0;background:#eaf4ee;border:1px solid #c9dfd4;border-radius:10px;font-size:17px;font-weight:600;overflow-wrap:anywhere}.fm-enroll-dialog .fm-enroll-form{display:flex;flex-direction:column;min-height:0;margin-top:18px}.fm-enroll-body{min-height:0}.fm-enroll-dialog [hidden]{display:none!important}.fm-enroll-date{display:flex;flex-direction:column;gap:6px;max-width:240px;margin-bottom:18px}.fm-enroll-modes{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}.fm-enroll-modes>button{flex:1;min-height:46px}.fm-enroll-search{display:flex;flex-direction:column;gap:6px;font-weight:600}.fm-enroll-count,.fm-enroll-help{font-size:15px;color:#4b6a62;margin:12px 0}.fm-enroll-list{border:1px solid #c6dcd3;border-radius:12px;max-height:330px;max-height:min(330px,32vh);overflow:auto;overscroll-behavior:contain;background:white}.fm-enroll-student{display:flex;align-items:center;gap:14px;padding:13px 16px;border-bottom:1px solid #e1ebe7;cursor:pointer;min-height:54px;box-sizing:border-box}.fm-enroll-student:last-child{border-bottom:0}.fm-enroll-student:hover{background:#f0f7f3}.fm-enroll-student:has(input:checked){background:#e5f4ea}.fm-enroll-dialog .fm-enroll-student input[type=checkbox]{width:22px;height:22px;flex:0 0 22px;accent-color:#096651;cursor:pointer}.fm-enroll-student>span:nth-child(2){min-width:0;flex:1}.fm-enroll-student strong{display:block;font-size:17px;overflow-wrap:anywhere}.fm-enroll-student small{display:block;font-size:14px;color:#59746c;margin-top:2px}.fm-enroll-linked{background:#f5f8f6;cursor:default}.fm-enroll-badge{font-size:12px;color:#42695c;background:#e8f0eb;border-radius:6px;padding:5px 8px;max-width:125px}.fm-enroll-dialog .fm-formgrid label{font-size:17px;gap:7px}.fm-enroll-dialog input{font-size:17px;min-height:46px}.fm-enroll-feedback:empty{display:none}.fm-enroll-feedback p{margin:10px 0 0;overflow-wrap:anywhere;font-size:15px}.fm-enroll-feedback p:empty{display:none}.fm-enroll-feedback>button{margin-top:12px}.fm-enroll-dialog footer{position:sticky;bottom:-24px;background:white;padding:16px 0 0;margin-top:18px;border-top:1px solid #d5e4df}.fm-enroll-dialog footer button{min-height:48px;font-weight:600}.fm-enroll-dialog button:disabled{cursor:default}.fm-enroll-dialog :focus-visible{outline:3px solid #4b9b80;outline-offset:3px}
@media(max-width:650px){.fm-roster-head>button{width:100%}.fm-enroll-dialog{width:calc(100vw - 20px);padding:16px;max-height:calc(100dvh - 20px)}.fm-enroll-dialog h3{font-size:22px}.fm-enroll-course{font-size:16px}.fm-enroll-student{gap:10px;padding:12px}.fm-enroll-badge{max-width:85px}.fm-enroll-modes{gap:8px}.fm-enroll-modes>button{padding:10px;font-size:15px}.fm-enroll-dialog footer{bottom:-16px}.fm-enroll-dialog footer button{flex:1}.fm-enroll-list{max-height:30vh}.fm-enroll-dialog .fm-formgrid{grid-template-columns:minmax(0,1fr)}}
