.admin-site main{min-height:65vh;padding-bottom:64px}.admin-site .primary-nav{gap:6px}.admin-site .primary-nav a{padding:12px}.admin-site .primary-nav svg{width:18px;height:18px}.admin-site [hidden]{display:none!important}.admin-site svg{flex-shrink:0}.public-site-link{white-space:nowrap}.admin-site .brand{min-width:0}.admin-site .brand>span{min-width:0}.admin-site [data-site-name]{overflow-wrap:anywhere}.admin-eyebrow{color:#64748b;font-size:12px;letter-spacing:.1em;text-transform:uppercase;font-weight:750;margin-bottom:12px;display:flex;gap:8px;align-items:center}.admin-eyebrow svg{width:17px;height:17px}.admin-heading{align-items:center;margin-bottom:28px}.admin-heading h1{font-size:32px;letter-spacing:-1px}.admin-heading p{max-width:640px}.admin-overview{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:16px 20px;display:flex;gap:12px;align-items:center;margin:0 0 26px;color:#64748b;font-size:13px}.admin-overview svg{width:20px;height:20px;color:#475569}.admin-overview strong{color:#334155}.admin-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.admin-card{border:1px solid #e2e8f0;border-radius:14px;background:#fff;overflow:hidden;min-width:0;transition:border-color .15s}.admin-card:hover{border-color:#94a3b8}.admin-card-link{display:block;padding:24px;text-decoration:none;color:inherit;min-height:168px}.admin-card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.admin-card-icon{display:grid;place-items:center;width:46px;height:46px;background:#f1f5f9;border-radius:12px;color:#475569}.admin-card-icon svg{width:24px;height:24px}.admin-card-top>svg{width:20px;height:20px;color:#94a3b8}.admin-card h2{font-size:20px;line-height:1.35;margin:0 0 8px;overflow-wrap:anywhere}.admin-card p{font-size:13px;color:#64748b;margin:0}.admin-card-actions{display:flex;border-top:1px solid #f1f5f9;padding:8px 14px;gap:8px}.admin-card-actions button{display:flex;align-items:center;gap:7px;font:inherit;font-size:12px;font-weight:650;border:0;background:transparent;cursor:pointer;min-height:44px;padding:8px 10px;color:#475569;border-radius:7px}.admin-card-actions button:hover{background:#f1f5f9}.admin-card-actions button:last-child{margin-left:auto}.admin-card-actions svg{width:16px;height:16px}.admin-card-actions .danger{color:#b91c1c}.admin-add-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;min-height:234px;background:#fafcfe;color:#475569;border:1px dashed #cbd5e1;border-radius:14px;cursor:pointer;font:inherit;font-size:14px;font-weight:650;padding:24px}.admin-add-card:hover{background:#f1f5f9;border-color:#94a3b8}.admin-add-card>svg{width:26px;height:26px}.admin-auth{max-width:440px;margin:62px auto 40px}.auth-emblem{width:64px;height:64px;margin-bottom:24px}.admin-auth h1{font-size:30px;letter-spacing:-1px;line-height:1.2;margin-bottom:12px}.admin-auth>p{font-size:14px;color:#64748b;line-height:1.7}.admin-form{display:grid;gap:20px}.auth-panel,.settings-panel{margin-top:26px;padding:26px;border:1px solid #e2e8f0;border-radius:14px;background:#fff}.admin-form label{display:block;font-weight:650;font-size:13px;margin-bottom:8px}.admin-form input{box-sizing:border-box;width:100%;min-height:48px;border:1px solid #cbd5e1;border-radius:8px;font:inherit;font-size:14px;padding:11px 13px;background:white;color:#0f172a}.admin-form input:focus{outline:2px solid #64748b;outline-offset:2px}.admin-form small{display:block;color:#64748b;font-size:12px;line-height:1.6;margin-top:8px}.password-field{position:relative}.password-field input{padding-right:48px}.password-field button{position:absolute;right:4px;top:4px;min-width:40px;min-height:40px;background:transparent;border:0;display:grid;place-items:center;color:#64748b;cursor:pointer;border-radius:6px}.password-field svg{width:19px;height:19px}.admin-form .button{justify-content:center}.form-error{background:#fff1f2;border:1px solid #fecdd3;border-radius:8px;padding:12px 14px;font-size:13px;color:#9f1239;line-height:1.6;margin:0}.admin-dialog{padding:30px;max-width:500px;width:calc(100% - 32px);box-sizing:border-box}.admin-dialog h2{font-size:23px;letter-spacing:-.6px;margin:0 0 10px;padding-right:32px}.admin-dialog>p,.admin-dialog form>p{font-size:14px;line-height:1.7;color:#64748b}.admin-dialog form{margin-top:24px}.admin-dialog-close{position:absolute;top:18px;right:18px;min-width:44px;min-height:44px;display:grid;place-items:center;border:0;background:transparent;color:#64748b;border-radius:8px;cursor:pointer}.admin-dialog-close svg{width:20px;height:20px}.form-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:6px;flex-wrap:wrap}.button.danger-button{background:#b91c1c;border-color:#b91c1c;color:white}.delete-note{background:#fff7ed;border:1px solid #fed7aa;border-radius:9px;padding:16px;color:#9a3412;font-size:13px;line-height:1.8}.delete-note svg{width:19px;height:19px;vertical-align:middle;margin-right:5px}.delete-detail{font-weight:650}.admin-toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:5;max-width:min(600px,calc(100% - 36px));box-sizing:border-box;background:#334155;color:white;border:1px solid #64748b;padding:15px 22px;border-radius:10px;box-shadow:0 5px 24px #0f172a20;font-size:14px;line-height:1.6}.admin-toast[data-error=true]{background:#9f1239}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start}.settings-panel{margin-top:0;padding:28px;min-width:0}.settings-panel h2{font-size:19px;margin:0 0 8px;display:flex;align-items:center;gap:10px}.settings-panel h2 svg{width:21px;height:21px;color:#64748b}.settings-panel>p{font-size:13px;line-height:1.7;color:#64748b;margin:0 0 26px}.settings-panel .button{justify-self:start}.trash-list{display:grid;gap:14px}.trash-row{display:flex;align-items:center;gap:20px;padding:20px 24px;border:1px solid #e2e8f0;border-radius:12px}.trash-row>div{flex:1;min-width:0}.trash-row h2{margin:0 0 6px;font-size:17px;overflow-wrap:anywhere}.trash-row p{font-size:12px;color:#64748b;margin:5px 0;line-height:1.6}.trash-row .button{white-space:nowrap}.trash-count{display:inline-flex;border-radius:20px;background:#e2e8f0;padding:2px 7px;font-size:11px;min-width:20px;justify-content:center}.admin-empty{padding:46px 20px;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:12px;text-align:center}.admin-empty>svg{width:30px;height:30px;color:#94a3b8}.admin-empty h2{font-size:20px}.admin-empty p{font-size:14px;color:#64748b}.admin-document{padding:20px 24px;display:flex;gap:20px;align-items:center;border:1px solid #e2e8f0;border-radius:12px;margin-bottom:12px}.admin-document>svg{width:25px;height:25px;color:#64748b}.admin-document>div{flex:1;min-width:0}.admin-document h2{font-size:16px;margin:0 0 7px;overflow-wrap:anywhere}.admin-document p{font-size:12px;color:#64748b;margin:0}.admin-document .button{white-space:nowrap}.admin-offline{margin:50px auto;max-width:600px}
@media(min-width:1200px){.admin-grid.levels{grid-template-columns:repeat(4,minmax(0,1fr))}.admin-grid.levels .admin-add-card{min-height:200px}}
@media(max-width:1000px){.admin-site .header-inner{flex-wrap:wrap;gap:12px;padding-top:16px;padding-bottom:12px}.admin-site .primary-nav{order:3;width:100%;justify-content:center}.admin-site .public-site-link{margin-left:auto}.admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-grid.levels{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.admin-heading{align-items:flex-start}.admin-heading h1{font-size:27px}.admin-heading .heading-action{width:100%;justify-content:center}.admin-heading{flex-direction:column;gap:18px}.admin-grid,.admin-grid.levels{gap:12px}.admin-card-link{padding:18px;min-height:166px}.admin-card h2{font-size:17px}.admin-card-top{margin-bottom:18px}.admin-card-actions{padding:5px;gap:0}.admin-card-actions button{font-size:11px;padding:8px 6px;gap:4px}.admin-card-actions svg{width:14px;height:14px}.admin-add-card{padding:14px;font-size:13px;min-height:230px;text-align:center}.admin-overview{padding:14px;font-size:12px;align-items:flex-start}.admin-site .primary-nav a{font-size:12px;padding:10px 8px;gap:5px}.admin-site .primary-nav{gap:3px}.admin-site .public-site-link{font-size:12px;padding:10px;gap:6px}.admin-site .brand>span{font-size:17px}.admin-site .brand-symbol{width:44px;height:44px}.admin-site .brand small{font-size:10px}.admin-auth{margin:36px auto}.admin-auth h1{font-size:28px}.auth-panel,.settings-panel{padding:22px}.settings-grid{grid-template-columns:1fr}.admin-dialog{padding:25px 20px}.trash-row{padding:18px;gap:12px;align-items:flex-start;flex-wrap:wrap}.trash-row .button{width:100%;justify-content:center}.admin-document{padding:18px;gap:12px;flex-wrap:wrap}.admin-document .button{width:100%;justify-content:center}.admin-toast{bottom:14px;font-size:13px;width:calc(100% - 28px)}.admin-eyebrow{font-size:10px}.admin-site .breadcrumb{flex-wrap:wrap}.admin-site .footer-inner{align-items:flex-start}}
@media(max-width:360px){.admin-grid,.admin-grid.levels{grid-template-columns:1fr}.admin-site .brand{gap:4px}.admin-site .brand>span{font-size:15px}.admin-site .primary-nav a{padding:10px 5px}}
@media(prefers-reduced-motion:reduce){.admin-card{transition:none}}
/* The document editor follows the same simple cards and slate form controls. */
.admin-site :is(a,button,input,select,summary):focus-visible{outline:2px solid #334155;outline-offset:3px}.admin-site :is(button,input,select):disabled{opacity:.55;cursor:wait}.admin-site .button{min-height:44px}.admin-form select{box-sizing:border-box;width:100%;max-width:100%;min-height:48px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#0f172a;font:inherit;font-size:14px;padding:11px 13px}.admin-form input[type=file]{height:auto;white-space:normal;overflow:hidden;padding:10px}.admin-form input[type=file]::file-selector-button{border:0;background:#f1f5f9;color:#334155;min-height:36px;padding:8px 12px;border-radius:5px;margin-right:10px;font:inherit;font-size:12px;cursor:pointer}.admin-documents{display:grid;gap:14px}.admin-documents .admin-document{margin-bottom:0}.document-thumb{width:64px;height:84px;display:grid;place-items:center;flex:none;background:#f1f5f9;border-radius:5px;overflow:hidden;color:#64748b}.document-thumb img{width:100%;height:100%;object-fit:contain}.document-thumb svg{width:28px;height:28px}.document-information h2 a{color:#0f172a;text-decoration:none}.document-information h2 a:hover{text-decoration:underline}.admin-document .document-information p+p{margin-top:8px}.document-status{color:#64748b}.document-status.published{color:#334155;font-weight:700}.admin-document .document-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;flex:0 1 380px}.admin-document .document-actions .button{font-size:12px;padding:10px 13px;white-space:normal;text-align:center}.admin-document .document-actions svg{width:16px;height:16px}.danger-text{color:#b91c1c!important}.lesson-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px;padding-top:24px;border-top:1px solid #e2e8f0}.document-form{gap:28px;align-items:start}.document-form-main,.document-form-side{display:grid;gap:24px;min-width:0}.document-placement{display:grid;gap:20px;background:#f1f5f9;border-radius:12px;padding:24px}.document-placement h2,.document-optional h2{font-size:17px;margin:0}.document-optional{display:grid;gap:24px;border-top:1px solid #e2e8f0;padding-top:28px}.document-optional>p{font-size:13px;line-height:1.7;color:#64748b;margin:-12px 0 0}.file-selection{font-size:13px;line-height:1.7;color:#64748b;overflow-wrap:anywhere;margin:8px 0}.file-clear{border:0;border-radius:5px;background:#f1f5f9;color:#334155;min-height:44px;padding:10px 12px;font:inherit;font-size:12px;cursor:pointer;margin-top:8px}.document-preview{border:1px solid #e2e8f0;border-radius:10px;overflow:hidden}.document-preview summary{cursor:pointer;font-weight:650;font-size:14px;min-height:48px;box-sizing:border-box;padding:16px}.document-preview iframe{display:block;width:100%;height:min(65vh,640px);border:0;background:#f1f5f9}.document-preview a{display:inline-flex;align-items:center;min-height:44px;padding:8px 16px;color:#334155;font-size:13px}.cover-sample{width:110px;max-height:160px;object-fit:contain;display:block;margin-top:12px;background:#f1f5f9;border:1px solid #e2e8f0}.document-image-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:12px;margin-top:12px}.document-image-item{min-width:0;display:flex;flex-direction:column;align-items:flex-start}.document-image-item>img{height:110px;width:100%;object-fit:contain;background:#f1f5f9;border-radius:6px}.document-image-item small{overflow-wrap:anywhere;width:100%}.document-image-item .file-clear{width:100%}.document-image-item.pending-removal img{opacity:.35}.document-image-item.pending-removal .file-clear{background:#334155;color:#fff}.document-save-actions{display:grid;gap:12px}.document-save-actions .button{white-space:normal;text-align:center}.document-warning{background:#fff7ed;border:1px solid #fed7aa;border-radius:8px;padding:14px;color:#9a3412;font-size:13px;line-height:1.7;margin:0}.upload-progress{background:#f1f5f9;border-radius:10px;padding:18px;min-width:0}.upload-progress label{line-height:1.6;overflow-wrap:anywhere}.upload-progress progress{width:100%;height:12px;accent-color:#334155}.upload-progress p{font-size:12px;line-height:1.7;color:#64748b;margin:10px 0 0}.document-form .form-error .button{margin-top:12px;white-space:normal;font-size:12px}.document-form .document-form-side>small{margin:0}.document-form .form-error{overflow-wrap:anywhere}.admin-site .admin-grid.levels .admin-card-link{min-height:205px}
@media(min-width:900px){.document-form{grid-template-columns:minmax(0,1fr) minmax(280px,360px);gap:40px}.document-form-side{position:sticky;top:24px}}
@media(max-width:640px){.admin-document .document-information{flex:1;min-width:0}.admin-document .document-actions{flex:1 0 100%;display:grid;grid-template-columns:1fr 1fr;gap:8px}.admin-document .document-actions .button{width:100%}.document-placement{padding:20px}.lesson-actions .button{flex:1 0 100%;justify-content:center;font-size:13px}.document-form .document-form-side{gap:20px}.document-form input[type=file]{font-size:12px}.document-form .document-optional{gap:20px}.admin-site .admin-grid.levels .admin-card-link{min-height:180px}}
@media(max-width:420px){.admin-grid,.admin-grid.levels{grid-template-columns:1fr}.admin-card-actions{padding:8px 14px}.admin-card-actions button{font-size:12px;padding:8px 10px}.admin-site .primary-nav{flex-wrap:wrap}.admin-site .primary-nav a{min-height:44px}.admin-site .header-inner{column-gap:8px}.admin-document .document-actions{grid-template-columns:1fr}.document-thumb{width:48px;height:64px}.admin-document{padding:16px}.admin-site .admin-grid.levels .admin-card-link{min-height:160px}.document-placement{padding:18px}}
.archive-preview{background:#f1f5f9;padding:12px;display:grid;gap:12px;max-height:70vh;overflow:auto}.archive-preview img{display:block;width:100%;height:auto;background:#fff}.document-preview[open] summary{border-bottom:1px solid #e2e8f0}

.password-field button{min-width:44px;min-height:44px;right:2px;top:2px}
