:root{--g:#17663f;--gd:#0f4a2d;--lime:#8cc80b;--ink:#1f3a2b;--muted:#6b7c72;--line:#e3ebe5;--bg:#f5f8f5;--bad:#b3261e;--warn:#a8650a;--info:#1d5f8f}
*{box-sizing:border-box}
body{margin:0;font:14px/1.5 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg)}
a{color:var(--g);text-decoration:none}a:hover{text-decoration:underline}
h1{font-size:26px;margin:0 0 4px;letter-spacing:-.5px}h2{font-size:18px;margin:0 0 12px}h3{font-size:15px;margin:18px 0 8px}
small{font-size:12px}code{background:#eef4ef;padding:1px 6px;border-radius:5px;font-size:12px}
.muted{color:var(--muted)}.r{text-align:right}.nowrap{white-space:nowrap}.pre{white-space:pre-wrap}

.app{display:flex;min-height:100vh}
.sidebar{width:236px;min-width:236px;background:linear-gradient(170deg,#0c4029,#17663f 80%);color:#e8f4ea;padding:16px 12px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column}
.brand-logo{background:#fff;border-radius:12px;padding:6px;margin-bottom:14px}.brand-logo img{display:block;width:100%;height:auto}
.sidebar nav{flex:1;overflow:auto}
.sidebar nav a{display:flex;gap:10px;align-items:center;padding:10px 12px;border-radius:9px;color:#dcefe0;margin-bottom:3px}
.sidebar nav a:hover{background:#ffffff1c;text-decoration:none}.sidebar nav a.on{background:#ffffff30;color:#fff;font-weight:600}
.ico{width:18px;text-align:center;opacity:.85}
.sidebar-foot{border-top:1px solid #ffffff30;padding-top:12px;display:grid;gap:3px;font-size:12px}.sidebar-foot b{font-size:13px;color:#fff}.sidebar-foot a{color:#cfe6d4}.sidebar-foot small{opacity:.6;margin-top:4px}
.mobile-menu{display:none}
.main{flex:1;min-width:0}.content{max-width:1280px;margin:0 auto;padding:26px 28px 60px}

.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap;margin-bottom:18px}
.page-head p{margin:0}.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.panel{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px 20px;margin:14px 0;overflow-x:auto}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;margin:14px 0}
.card{display:block;background:#fff;border:1px solid var(--line);border-top:3px solid var(--lime);border-radius:14px;padding:16px 18px;color:inherit}a.card:hover{text-decoration:none;box-shadow:0 4px 14px #17663f1a}
.card strong{display:block;font-size:30px;color:var(--g);line-height:1.2;margin:4px 0}.card small{color:var(--muted);display:block}
.cols2{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:14px}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:0 14px}
.narrow{max-width:720px}

table{border-collapse:collapse;width:100%;min-width:520px}
th,td{padding:10px 8px;text-align:left;border-bottom:1px solid #eef3ef;vertical-align:middle}
th{font-size:11px;text-transform:uppercase;letter-spacing:.4px;color:var(--muted);font-weight:700}
tr:last-child td{border-bottom:0}tr.total td{font-weight:700;border-top:2px solid var(--line);background:#f8fbf8}
td.r,th.r{text-align:right}

label{display:block;font-weight:600;margin-bottom:12px;color:#2c4637}label.check{font-weight:400}
input,select,textarea{display:block;width:100%;font:inherit;padding:9px 11px;border:1px solid #c9d6cd;border-radius:9px;background:#fff;color:var(--ink);margin-top:4px}
input:focus,select:focus,textarea:focus{outline:2px solid #acd957;border-color:var(--g)}
input[type=checkbox]{display:inline;width:auto;margin:0 6px 0 0}textarea{min-height:84px}
button,.btn{display:inline-block;font:inherit;font-weight:600;border:0;padding:9px 16px;border-radius:9px;background:var(--g);color:#fff;cursor:pointer;text-align:center}
button:hover,.btn:hover{background:var(--gd);text-decoration:none;color:#fff}
.btn.secondary,button.secondary{background:#e8f1ea;color:#1c4f33}.btn.secondary:hover,button.secondary:hover{background:#d8e8dc;color:#1c4f33}
.btn.small,button.small{padding:5px 10px;font-size:12px}button.block{width:100%}button:disabled{opacity:.6;cursor:wait}
form.inline{display:inline}form.inline button{margin:0}
.filters,.inline-form{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}
.filters label,.inline-form label{margin:0;min-width:150px;flex:1}.filters button,.filters .btn,.inline-form button{margin-bottom:1px}
.inline-form.panel{align-items:flex-end}.inline-form h2{width:100%;margin:0}
.actions-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.actions-row form{margin:0}

.notice,.alert{padding:12px 16px;border-radius:10px;margin:12px 0}.notice{background:#e6f5ea;color:#1d5a37}.alert{background:#fdeceb;color:#8c2a24;border:1px solid #f4cfcc}
.badge{display:inline-block;padding:3px 10px;border-radius:20px;font-size:11px;font-weight:700;background:#eef2ee;color:#4a5b50}
.badge.ok{background:#e1f4e6;color:#1d6a3d}.badge.warn{background:#fff1d9;color:var(--warn)}.badge.bad{background:#fdeceb;color:var(--bad)}.badge.info{background:#e3effa;color:var(--info)}
.chip{display:inline-block;background:#f0f6f1;border-radius:6px;padding:1px 8px;font-size:12px;margin:1px 0}

.av{width:40px;height:40px;border-radius:50%;object-fit:cover;vertical-align:middle;background:#eef4ef;flex:none}
.av.ph{display:inline-flex;align-items:center;justify-content:center;font-weight:700;color:#4d7a5f;font-size:14px}
.av.xl{width:132px;height:132px;font-size:38px;border-radius:18px}
.avcell{width:56px}
.mimg{display:inline-block;width:36px;height:36px;border-radius:8px;border:0;padding:0;background:#eef4ef;cursor:zoom-in;overflow:hidden;vertical-align:middle;flex:none}
.mimg img{width:100%;height:100%;object-fit:cover;display:block}
.mimg.s{width:24px;height:24px;border-radius:6px}
.mimg.lg{width:56px;height:56px}
.mimg.ph{cursor:default}
.mat{display:inline-flex;align-items:center;gap:8px}
.mat code{font-size:.9em}
.profile{display:flex;gap:20px;align-items:flex-start;background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px 20px;margin:14px 0;flex-wrap:wrap}.profile-data{flex:1;min-width:260px}
.kv{display:grid;grid-template-columns:110px 1fr;gap:6px 14px;margin:0}.kv dt{color:var(--muted);font-weight:600}.kv dd{margin:0}
details.year{border:1px solid var(--line);border-radius:10px;margin:10px 0;overflow-x:auto}details.year summary{padding:11px 14px;cursor:pointer;font-weight:700;background:#f6faf6;color:var(--g)}details.year table{margin:0 8px 8px}
.tabs{display:flex;gap:6px;margin:8px 0}.tabs a{padding:8px 16px;border-radius:9px;background:#e8f1ea;color:#1c4f33;font-weight:600}.tabs a.on{background:var(--g);color:#fff;text-decoration:none}
.pager{display:flex;gap:6px;margin:14px 0;flex-wrap:wrap}.pager a{padding:6px 12px;border-radius:8px;background:#fff;border:1px solid var(--line)}.pager a.on{background:var(--g);color:#fff;border-color:var(--g);text-decoration:none}
ul.plain{margin:8px 0;padding-left:18px;columns:2}

.login-bg{min-height:100vh;display:grid;place-items:center;background:linear-gradient(160deg,#e8f3ea,#f5f8f5)}
.login-box{background:#fff;padding:30px;border-radius:18px;width:min(94%,430px);box-shadow:0 14px 50px #17663f22}.login-logo{display:block;width:100%;max-width:300px;margin:0 auto 14px}

@media(max-width:820px){
  .app{display:block}.sidebar{position:sticky;top:0;z-index:20;width:100%;min-width:0;height:auto;padding:8px 12px}
  .brand-logo{width:130px;margin:0}.mobile-menu{display:block;position:absolute;right:12px;top:12px;background:#ffffff26;padding:8px 14px}
  .sidebar nav,.sidebar-foot{display:none}.sidebar.open nav,.sidebar.open-foot{display:block}.sidebar.open .sidebar-foot{display:grid;margin-top:8px}
  .content{padding:16px 14px 50px}.cards{grid-template-columns:repeat(2,1fr)}.card strong{font-size:24px}ul.plain{columns:1}.kv{grid-template-columns:90px 1fr}
}

/* Fichas (tarjetas) de profesores y escuelas */
.pgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:16px;margin:16px 0}
.pcard{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:0 2px 10px #17663f0d}
.pcard:hover{box-shadow:0 8px 24px #17663f1f}
.pphoto{display:block;width:100%;aspect-ratio:4/3;padding:0;border:0;border-radius:0;background:#eef4ef;cursor:zoom-in;overflow:hidden}
.pphoto:hover{background:#eef4ef}.pphoto img{width:100%;height:100%;object-fit:cover;object-position:center 20%;display:block}
.pphoto.logo{background:#fff;border-bottom:1px solid var(--line)}.pphoto.logo img{object-fit:contain;padding:14px;object-position:center}
.pphoto.ph{display:flex;align-items:center;justify-content:center;cursor:default;color:#5b8a6f;font-size:46px;font-weight:700}
.pphoto.xl{width:190px;aspect-ratio:4/5;border-radius:16px;flex:none}.pphoto.xl.logo{aspect-ratio:1/1}.pphoto.xl.ph{font-size:56px}
.pbody{padding:14px 16px 16px;display:flex;flex-direction:column;gap:8px;flex:1}
.pbody h3{margin:0;font-size:16px;line-height:1.3}.pbody h3 a{color:var(--ink)}.pbody h3 a:hover{color:var(--g)}
.spec{margin:0;color:var(--g);font-weight:600;font-size:13px}.loc{margin:0;color:var(--muted);font-size:13px}
.pstats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:4px 0}
.pstats div{background:#f3f8f4;border-radius:10px;padding:7px 8px;text-align:center}.pstats b{display:block;font-size:15px;color:var(--g)}.pstats span{font-size:11px;color:var(--muted)}
.pbadges{display:flex;gap:6px;flex-wrap:wrap}.pbadges:empty{display:none}
.clinks{display:flex;flex-direction:column;gap:4px;margin:6px 0;font-size:13px}.clink{word-break:break-all}
details.more{border-top:1px solid #eef3ef;padding-top:8px;margin-top:auto}details.more summary{cursor:pointer;font-weight:600;color:var(--g)}
.small{font-size:12px}.notice.warn{background:#fff4de;color:#7a4b06}
.profile .pphoto.xl{width:220px}
.lightbox{position:fixed;inset:0;background:#000000d9;z-index:100;display:flex;align-items:center;justify-content:center;padding:24px;cursor:zoom-out}
.lightbox figure{margin:0;max-width:min(92vw,900px);max-height:92vh;text-align:center}.lightbox img{max-width:100%;max-height:82vh;border-radius:12px;background:#fff}
.lightbox figcaption{color:#fff;margin-top:10px}.lb-x{position:absolute;top:14px;right:18px;background:transparent;font-size:34px;line-height:1;padding:4px 12px;color:#fff}.lb-x:hover{background:#ffffff33}
.toast{position:fixed;right:18px;bottom:18px;background:var(--gd);color:#fff;padding:12px 16px;border-radius:12px;z-index:90;box-shadow:0 8px 24px #0004;display:none;max-width:340px}.toast.on{display:block}.toast a{color:#cdee8a;text-decoration:underline}
@media(max-width:820px){.pgrid{grid-template-columns:1fr}.profile .pphoto.xl{width:100%;aspect-ratio:4/3}.pphoto.xl.logo{aspect-ratio:2/1}}

.up{color:#1d6a3d;font-weight:700}.down{color:var(--bad);font-weight:700}
.bar{background:#eef4ef;border-radius:6px;height:10px;overflow:hidden}.bar span{display:block;height:100%;background:linear-gradient(90deg,var(--g),var(--lime))}

/* Hoja mensual */
.sheet-panel{padding:16px 0 16px 0;overflow:visible}.sheet-head{display:flex;justify-content:space-between;align-items:center;padding:0 20px 10px;gap:12px}.sheet-head h2{margin:0}
.sheet-panel>p{padding:0 20px}.sheet-wrap{overflow:auto;max-height:70vh;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
table.sheet{min-width:980px;border-collapse:separate;border-spacing:0}
table.sheet th{position:sticky;top:0;background:#f3f8f4;z-index:3;white-space:nowrap;padding:9px 8px;border-bottom:2px solid var(--line)}table.sheet th small{display:block;text-transform:none;font-weight:400;letter-spacing:0;color:var(--muted)}
table.sheet .sticky{position:sticky;left:0;z-index:2;background:#fff;min-width:210px;max-width:260px;border-right:1px solid var(--line)}table.sheet th.sticky{z-index:4;background:#f3f8f4}
table.sheet td{padding:6px 8px}table.sheet tr:hover td{background:#fafdfb}table.sheet tr:hover td.sticky{background:#fafdfb}
table.sheet input.n,table.sheet select{margin:0;padding:7px 8px}table.sheet input.n{text-align:right}
.pair{display:flex;align-items:center;gap:4px}.pair span{color:var(--muted)}
tr.locked td{background:#f6f6f6;color:var(--muted)}tr.excluded td{opacity:.45}tr.excluded td.sticky{opacity:1}
table.sheet tfoot td{position:sticky;bottom:0;background:#eef6f0;border-top:2px solid var(--g);padding:10px 8px;font-size:15px}table.sheet tfoot td.sticky{z-index:3}
.calc,.total{color:var(--g)}

.stack>*{margin:14px 0}.stack table td:first-child input{min-width:170px}

/* Mensajes: aspecto de Gmail */
.content:has(.gm){max-width:none;padding:12px 16px 24px}
.gm{--gb:#f6f8fc;font-family:"Google Sans",Roboto,"Segoe UI",Arial,sans-serif;color:#202124;background:var(--gb);border-radius:16px;padding:0 0 8px;min-height:calc(100vh - 40px)}
.gm a{color:inherit}.gm a:hover{text-decoration:none}
.gm-ico{fill:currentColor;flex:none;vertical-align:middle}
.gm-bar{display:flex;align-items:center;gap:8px;padding:8px 16px}
.gm-logo{display:flex;align-items:center;gap:10px;width:240px;flex:none;font-size:22px;color:#5f6368!important}.gm-logo .gm-ico{fill:#d93025}
.gm-spacer{flex:1}
.gm-ib{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;border:0;background:transparent;color:#5f6368;cursor:pointer;padding:0;margin:0;list-style:none}
.gm-ib:hover{background:#e8eaed;color:#202124}.gm-ib::-webkit-details-marker{display:none}
.gm-search{position:relative;display:flex;align-items:center;flex:1;max-width:720px;height:48px;background:#eaf1fb;border-radius:24px;padding:0 6px}
.gm-search:focus-within{background:#fff;box-shadow:0 1px 1px 0 rgba(65,69,73,.3),0 1px 3px 1px rgba(65,69,73,.15)}
.gm-search input[name=q]{flex:1;border:0;background:transparent;margin:0;padding:0 8px;height:46px;font-size:16px;outline:0;border-radius:0}
.gm-search input[name=q]:focus{outline:0}
.gm-adv{position:static}
.gm-advbox{position:absolute;left:0;right:0;top:52px;background:#fff;border-radius:8px;padding:16px 20px;box-shadow:0 4px 8px 3px rgba(60,64,67,.15),0 1px 3px rgba(60,64,67,.3);z-index:30;display:grid;gap:4px}
.gm-advbox label{display:grid;grid-template-columns:150px 1fr;align-items:center;margin:4px 0;font-weight:400;color:#5f6368}.gm-advbox select{margin:0}
.gm-btn,button.gm-btn{background:#0b57d0;color:#fff;border-radius:18px;padding:8px 24px;font-weight:500;justify-self:end;border:0;cursor:pointer;display:inline-block}.gm-btn:hover{background:#0a4cb8;color:#fff}
.gm-outline{display:inline-flex;align-items:center;gap:8px;border:1px solid #747775;border-radius:18px;padding:8px 22px;background:#fff;color:#444746!important;font-weight:500;cursor:pointer}.gm-outline:hover{background:#f6f8fc}
.gm-body{display:flex;align-items:flex-start}
.gm-side{width:256px;flex:none;padding:0 12px 8px 8px}
.gm-newbtn{display:flex;align-items:center;gap:14px;background:#c2e7ff;color:#001d35!important;border-radius:16px;padding:0 24px 0 16px;height:56px;font-weight:500;margin:4px 0 16px;box-shadow:0 1px 2px rgba(60,64,67,.3),0 1px 3px 1px rgba(60,64,67,.15)}
.gm-newbtn:hover{box-shadow:0 1px 3px rgba(60,64,67,.3),0 4px 8px 3px rgba(60,64,67,.15)}
.gm-nav a{display:flex;align-items:center;gap:18px;height:32px;padding:0 12px 0 26px;border-radius:0 16px 16px 0;color:#202124;font-size:14px;margin:0}
.gm-nav a:hover{background:#e8eaed}.gm-nav a.on{background:#d3e3fd;font-weight:700;color:#001d35}
.gm-nav h4{margin:18px 0 6px 26px;font-size:14px;font-weight:500;color:#202124}
.gm-main{flex:1;min-width:0;background:#fff;border-radius:16px;margin-right:8px;overflow:hidden;min-height:calc(100vh - 130px)}
.gm-pad{padding:20px 28px}
.gm-tools{display:flex;align-items:center;gap:4px;padding:4px 12px;min-height:48px;color:#5f6368}.gm-ctx{margin-left:8px;font-size:14px}
.gm-row{display:flex;align-items:center;height:40px;padding:0 16px 0 20px;border-bottom:1px solid #f2f6fc;background:#f2f6fc;font-size:14px;white-space:nowrap;position:relative;color:#202124}
.gm-row.unread{background:#fff;font-weight:700}
.gm-row:hover{box-shadow:inset 1px 0 0 #dadce0,inset -1px 0 0 #dadce0,0 1px 2px 0 rgba(60,64,67,.3),0 1px 3px 1px rgba(60,64,67,.15);z-index:2}
.gm-from{width:200px;flex:none;overflow:hidden;text-overflow:ellipsis;margin-right:16px}
.gm-sub{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center}
.gm-s{flex:none;max-width:60%;overflow:hidden;text-overflow:ellipsis}.gm-snip{color:#5f6368;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:pre}
.gm-date{flex:none;margin-left:16px;font-size:12px;color:#5f6368;min-width:48px;text-align:right}.unread .gm-date{color:#202124}
.gm-chip{flex:none;font-size:11px;font-weight:500;border-radius:4px;padding:1px 6px;margin-right:6px;line-height:16px}.gm-chip.g{background:#c4eed0;color:#0b3d1f}.gm-chip.b{background:#d3e3fd;color:#041e49}
.gm-empty{padding:64px 20px;text-align:center;color:#5f6368}
.gm-msg{padding:0 28px 28px 72px}
.gm-subject{font-size:22px;font-weight:400;margin:8px 0 20px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.gm-mh{display:flex;align-items:flex-start;gap:14px;margin-left:-56px;margin-bottom:18px}
.gm-av{width:40px;height:40px;border-radius:50%;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:18px;flex:none}
.gm-mh-main{flex:1;min-width:0;line-height:1.4}.gm-mail{color:#5f6368;font-size:12px;font-weight:400}.gm-mh-date{font-size:12px;color:#5f6368;margin-top:4px;white-space:nowrap}
.gm-text{white-space:pre-wrap;word-wrap:break-word;font-size:14px;line-height:1.6;color:#202124;max-width:900px}
.gm-atts{margin-top:28px;border-top:1px solid #e0e0e0;padding-top:12px}.gm-atts h4{margin:0 0 10px;font-weight:500;font-size:14px}
.gm-att{display:inline-flex;align-items:center;gap:12px;border:1px solid #dadce0;border-radius:8px;padding:10px 16px;margin:0 8px 8px 0;max-width:280px}.gm-att:hover{background:#f6f8fc}
.gm-att .gm-ico{fill:#d93025}.gm-att span{display:grid;overflow:hidden}.gm-att b{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gm-att small{color:#5f6368}
.gm-replybar{display:flex;gap:10px;margin-top:32px}
.gm-compose-wrap{display:flex;justify-content:flex-end;align-items:flex-end;min-height:calc(100vh - 140px);padding:0 24px}
.gm-compose{width:min(680px,100%);background:#fff;border-radius:12px 12px 0 0;box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2);overflow:hidden;display:flex;flex-direction:column;max-height:calc(100vh - 150px)}
.gm-chead{display:flex;justify-content:space-between;align-items:center;background:#f2f6fc;padding:10px 16px;font-size:14px;font-weight:500;color:#041e49}.gm-x{font-size:24px;line-height:1;color:#444746!important}
.gm-crow{display:flex;align-items:center;border-bottom:1px solid #f1f3f4;padding:0 16px;min-height:40px}
.gm-crow>input{flex:1;border:0;margin:0;padding:8px 0;border-radius:0;font-size:14px}.gm-crow>input:focus{outline:0}
.gm-tolink{background:transparent;border:0;color:#5f6368;padding:0 12px 0 0;font-weight:400;border-radius:4px}.gm-tolink:hover{background:transparent;color:#202124;text-decoration:underline}
.gm-to{flex:1;display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:4px 0}.gm-to input{flex:1;min-width:200px;border:0;margin:0;padding:6px 0;font-size:14px;border-radius:0}.gm-to input:focus{outline:0}
.gm-rchip{background:#e8eaed;border-radius:16px;padding:2px 6px 2px 12px;font-size:13px;display:inline-flex;gap:6px;align-items:center}.gm-rchip b{cursor:pointer;color:#5f6368;font-size:16px;line-height:1}
.gm-picker{border-bottom:1px solid #e0e0e0;background:#fafafa;padding:10px 16px;max-height:280px;overflow:auto}.gm-picker[hidden]{display:none}
.gm-pickbar{display:flex;gap:10px;align-items:center;margin-bottom:8px}.gm-pickbar input{margin:0;flex:1}.gm-text{background:transparent;color:#0b57d0;border:0;padding:6px 8px;font-weight:500}.gm-text:hover{background:#e8f0fe;color:#0b57d0}
.gm-pickcols{display:grid;grid-template-columns:1fr 1fr;gap:16px}.gm-pickcols h4{margin:4px 0;font-size:13px;color:#5f6368}
.gm-pickcols label{font-weight:400;margin:2px 0;font-size:13px;color:#202124}.gm-pickcols label small{color:#5f6368}
.gm-compose textarea{border:0;margin:0;border-radius:0;min-height:260px;padding:12px 16px;resize:none;flex:1;font-size:14px;line-height:1.5}.gm-compose textarea:focus{outline:0}
.gm-cfoot{display:flex;align-items:center;gap:8px;padding:10px 16px;flex-wrap:wrap}
.gm-send,button.gm-send{background:#0b57d0;color:#fff;border-radius:18px;padding:9px 24px;font-weight:500;border:0;margin-right:8px}.gm-send:hover{background:#0a4cb8;box-shadow:0 1px 3px rgba(60,64,67,.4)}
.gm-cfoot select{width:auto;margin:0;border:0;background:#f2f6fc;border-radius:16px;padding:6px 12px}.gm-files{font-size:12px;color:#5f6368}
@media(max-width:900px){.gm-body{flex-direction:column}.gm-side{width:100%}.gm-logo{width:auto}.gm-logo span{display:none}.gm-from{width:110px}.gm-msg{padding-left:20px}.gm-mh{margin-left:0}.gm-pickcols{grid-template-columns:1fr}.gm-advbox label{grid-template-columns:1fr}}

/* Editor y selector de destinatarios */
.gm-editor{flex:1;min-height:260px;max-height:46vh;overflow:auto;padding:14px 16px;font-size:16px;line-height:1.5;outline:0;color:#202124;font-family:Arial,Helvetica,sans-serif}
.gm-editor:empty:before{content:attr(data-ph);color:#80868b;pointer-events:none}
.gm-editor a{color:#0b57d0}.gm-editor blockquote{margin:0 0 0 8px;padding-left:10px;border-left:2px solid #ccc}.gm-editor ul,.gm-editor ol{margin:6px 0;padding-left:28px}
.gm-fmt{display:flex;align-items:center;flex-wrap:wrap;gap:2px;padding:4px 12px;border-top:1px solid #e0e0e0;background:#fff}.gm-fmt[hidden]{display:none}
.gm-fb{display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;border-radius:4px;border:0;background:transparent;color:#444746;cursor:pointer;padding:0 6px;margin:0;font-size:15px;font-weight:400}
.gm-fb:hover{background:#e8eaed;color:#202124}.gm-fb b,.gm-fb i,.gm-fb u,.gm-fb s{font-size:16px}
.gm-color span{font-weight:700;font-size:16px;border-bottom:3px solid currentColor;line-height:1;color:#d93025}.gm-color input{position:absolute;width:0;height:0;opacity:0;margin:0;padding:0;border:0}.gm-color{position:relative;margin:0;font-weight:400}
.gm-sep{width:1px;height:20px;background:#dadce0;margin:0 6px}
.gm-fmt select{width:auto;margin:0;border:0;background:transparent;padding:4px 6px;color:#444746;font-size:13px;cursor:pointer}.gm-fmt select:hover{background:#e8eaed}
.gm-modal{position:fixed;inset:0;background:rgba(32,33,36,.5);z-index:1000;display:flex;align-items:center;justify-content:center;padding:20px}.gm-modal[hidden]{display:none}
.gm-dialog{background:#fff;border-radius:12px;width:min(980px,100%);max-height:calc(100vh - 40px);display:flex;flex-direction:column;box-shadow:0 12px 40px rgba(0,0,0,.35);overflow:hidden}
.gm-dhead{display:flex;justify-content:space-between;align-items:center;padding:8px 8px 8px 24px;font-size:18px;color:#202124}
.gm-dbar{display:flex;align-items:center;gap:10px;padding:4px 24px 12px;flex-wrap:wrap;border-bottom:1px solid #e0e0e0}
.gm-dsearch{display:flex;align-items:center;gap:8px;flex:1;min-width:240px;background:#eaf1fb;border-radius:24px;padding:0 14px;height:44px;color:#5f6368}.gm-dsearch input{border:0;background:transparent;margin:0;padding:0;font-size:15px;height:42px;outline:0}
.gm-count{margin-left:auto;font-size:13px;color:#5f6368}
.gm-dbody{display:grid;grid-template-columns:1fr 1fr;gap:0;overflow:auto;flex:1;min-height:200px}
.gm-dbody section{padding:8px 12px 12px 24px;border-right:1px solid #f1f3f4;overflow:visible}.gm-dbody section:last-child{border-right:0}
.gm-dbody h4{position:sticky;top:0;background:#fff;margin:0;padding:10px 0 6px;font-size:13px;font-weight:500;color:#5f6368;z-index:1;display:flex;align-items:center;gap:8px}.gm-dbody h4 span{background:#eaf1fb;border-radius:10px;padding:0 8px;color:#0b57d0}.gm-dbody h4 .gm-text{margin-left:auto;padding:2px 8px;font-size:12px}
.gm-opt{display:flex;align-items:center;gap:12px;padding:6px 8px;margin:0;border-radius:8px;font-weight:400;cursor:pointer}.gm-opt:hover{background:#f2f6fc}
.gm-opt input{margin:0;width:18px;height:18px;flex:none}.gm-opt .gm-av{width:32px;height:32px;font-size:14px}
.gm-oname{display:grid;min-width:0}.gm-oname b{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#202124}.gm-oname small{color:#5f6368;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gm-dfoot{display:flex;align-items:center;gap:12px;padding:14px 24px;border-top:1px solid #e0e0e0;flex-wrap:wrap}
.gm-modes{display:flex;gap:18px;flex:1;flex-wrap:wrap}.gm-modes label{display:flex;gap:8px;align-items:flex-start;margin:0;font-weight:400;max-width:340px;cursor:pointer}.gm-modes input{margin:4px 0 0;width:auto}.gm-modes span{display:grid}.gm-modes small{color:#5f6368;font-size:12px}
@media(max-width:760px){.gm-dbody{grid-template-columns:1fr}}

/* Marco de marca en la redacción */
.gm-brand{flex:1;min-height:0;overflow:auto;margin:12px 16px 6px;border:1.5px solid #bcd9a6;border-radius:12px;background:#f4faee;display:flex;flex-direction:column}
.gm-bhead{background:#fff;text-align:center;padding:12px 16px 10px;border-bottom:4px solid #8cc80b;border-radius:10px 10px 0 0;flex:none}.gm-bhead img{height:76px;width:auto;max-width:100%}
.gm-brand .gm-editor{flex:1;max-height:none;min-height:200px;background:transparent;padding:18px 24px;color:#1f3a2b}
.gm-bfoot{flex:none;background:#e3f1d6;border-top:1px solid #c3dcb0;padding:12px 24px;font:13px/1.5 Arial,Helvetica,sans-serif;color:#3d5a2f;border-radius:0 0 10px 10px}.gm-bfoot a{color:#17663f}

.gm-editor img{max-width:100%;height:auto;border-radius:6px;margin:4px 0}
.gm-bhead img{background:#fff}


/* Verde Mago Diapasón */
.gm-brand{border:2px solid #339c2a;background:#fbfef9}
.gm-bhead{border-bottom:5px solid #2fb125}
.gm-brand .gm-editor{background:#fbfef9;color:#1f3a2b}
.gm-bfoot{background:#339c2a;border-top:0;color:#fff}.gm-bfoot a{color:#fff;text-decoration:underline}

/* Cifras de cobros en las fichas de profesores */
.pfin{margin-top:0}.pfin div{background:#f6f8f4;padding:5px 6px}.pfin b{font-size:13px;color:#2f4a3a}.pfin span{font-size:10.5px}
.pfin .debt{background:#fdeeed}.pfin .debt b{color:#c0463d}
.pcode{margin:0;font-size:12px;color:var(--muted)}.pcode code{font-size:12px;color:var(--ink)}


/* Cabecera con menú de usuario (avisos e instalación como app) */
.topbar{display:flex;justify-content:flex-end;align-items:center;padding:12px 18px 0}
.umenu{position:relative}
.uchip{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:30px;padding:5px 12px 5px 6px;box-shadow:0 2px 8px #17663f14;cursor:pointer;font:inherit}
.uchip:hover{background:#f6faf6}
.uava{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--g);color:#fff;font-weight:700}
.uname{font-weight:600;font-size:14px;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.uchev{color:var(--muted);font-size:12px}
.upop{position:absolute;right:0;top:calc(100% + 6px);width:255px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 10px 30px #0002;padding:8px;z-index:60;display:flex;flex-direction:column;gap:2px}
.upop[hidden]{display:none}
.uhead{padding:8px 10px;border-bottom:1px solid var(--line);margin-bottom:6px}
.uhead b{display:block}.uhead small{color:var(--muted)}
.upop a,.upop button{text-align:left;padding:9px 10px;border-radius:9px;background:none;border:0;font:inherit;font-size:14px;color:var(--ink);text-decoration:none;cursor:pointer}
.upop a:hover,.upop button:hover{background:#f3f8f4}
.upushst,.uinstst{display:block;padding:0 10px 6px;color:var(--muted);font-size:12px;line-height:1.35}
.install-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#eaf6ee;border:1px solid #bfe0c9;border-radius:14px;padding:12px 14px;margin:0 0 16px}
.install-bar span{flex:1;min-width:220px;font-size:14px}
.install-bar .ib-x{background:none;border:0;font-size:22px;line-height:1;color:var(--muted);padding:2px 8px;cursor:pointer}
@media(max-width:820px){.uname{display:none}.topbar{padding-top:8px}}

/* v1.20.1: nombre de usuario legible también en móviles */
.uchip .uname{color:#143f2b!important;display:inline-block!important;max-width:210px!important;opacity:1!important;visibility:visible!important}.uchip{color:#143f2b!important;}@media(max-width:520px){.uchip .uname{max-width:120px!important;font-size:12px!important}}

/* v1.20.5 — grouped monthly ledger */
.pm-month-top{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.pm-month-top h2{margin:0 0 4px}.pm-month-sum{background:#eaf4eb;border-radius:14px;padding:12px 18px;min-width:175px;text-align:right}.pm-month-sum small{display:block;color:#597568}.pm-month-sum strong{font-size:24px;color:#12583d}
.pm-month-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:16px 0}.pm-month-controls input{flex:1;min-width:210px;max-width:420px}
.pm-teacher-block{border:1px solid #d6e5dd;border-radius:15px;background:#fff;margin:12px 0;overflow:hidden}.pm-teacher-block[hidden]{display:none}.pm-teacher-block>summary{cursor:pointer;padding:17px 18px;display:flex;justify-content:space-between;align-items:center;gap:12px;background:#f4f8f5}.pm-teacher-block>summary strong{font-size:19px;color:#14613e}.pm-block-table{overflow-x:auto}.pm-block-table table{width:100%;margin:0}.pm-block-table th,.pm-block-table td{padding:10px 14px}.pm-block-table tfoot{background:#ecf5ee}.pm-advanced-sheet{margin-top:16px}.pm-advanced-sheet>summary{cursor:pointer;background:#eaf3ed;border-radius:12px;padding:16px;margin-bottom:12px;color:#19573e}

/* v1.20.7 – jerarquía clara de cada bloque de facturación */
#pm-month-blocks .pm-teacher-block{border:1px solid #bdd6c8;border-left:6px solid #146644;box-shadow:0 4px 14px rgba(15,72,44,.065);margin:15px 0 22px;border-radius:15px;overflow:hidden}
#pm-month-blocks .pm-teacher-block:nth-of-type(even){border-left-color:#267d98}
#pm-month-blocks .pm-teacher-block > summary{background:#e4f2e8;padding:19px 22px;color:#104930;font-size:1.12rem;min-height:68px}
#pm-month-blocks .pm-teacher-block:nth-of-type(even) > summary{background:#e8f3f5}
#pm-month-blocks .pm-block-table tr:nth-child(even){background:#f5f8f6}
#pm-month-blocks .pm-block-table tfoot tr{background:#d8eadc;color:#124b31}
#pm-month-blocks .pm-teacher-block > summary strong{font-size:1.23rem}
.tabs a[href*="p=bank"]{border:2px solid #15764c;background:#e5f4ea;color:#115a36;font-weight:800}

/* v1.20.8 · Facturación: concepto principal y opciones avanzadas */
.pm-invoice-concept{border:2px solid #207446!important;border-left:7px solid #14683e!important;background:#edf7ef!important;margin-bottom:18px!important;overflow:hidden}
.pm-invoice-concept>summary{display:flex;align-items:center;gap:14px;cursor:pointer;list-style:none;padding:8px 4px;color:#104a30}
.pm-invoice-concept>summary::-webkit-details-marker,.pm-recurrent-settings>summary::-webkit-details-marker{display:none}
.pm-concept-icon{width:44px;height:44px;border-radius:12px;background:#17673d;color:white;display:grid;place-items:center;font-size:24px;flex-shrink:0}
.pm-concept-text{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}
.pm-concept-text strong{font-size:18px;letter-spacing:.035em}
.pm-concept-text small{font-size:13px;color:#355f4b;font-weight:500}
.pm-concept-arrow{font-size:25px;transition:transform .2s}
.pm-invoice-concept[open] .pm-concept-arrow{transform:rotate(180deg)}
.pm-concept-content{border-top:1px solid #c9dfcf;padding-top:16px;margin-top:8px}
.pm-invoice-concept-form{margin:12px 0}
.pm-recurrent-settings{background:#f7faf8!important}
.pm-recurrent-settings>summary{cursor:pointer;display:flex;flex-wrap:wrap;gap:10px;align-items:center;color:#14553a;padding:4px 0}
.pm-recurrent-settings>summary strong{font-size:18px}
.pm-recurrent-settings>summary small{font-size:12px}
.pm-recurrent-settings .stack{margin-top:16px}
@media(max-width:720px){.pm-concept-text strong{font-size:15px}.pm-invoice-concept>summary{gap:10px}.pm-invoice-concept .actions-row{display:block}}

/* Trabajo compartido: legible en móvil y escritorio */
.pm-work-list{display:grid;gap:12px;margin:16px 0}.pm-work-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px;border:1px solid #dce5df;border-radius:12px;background:#fff}.pm-work-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.pm-work-actions form{margin:0}.pm-work-card{border-left:5px solid #16775c}@media(max-width:750px){.pm-work-row{align-items:stretch;flex-direction:column}.pm-work-actions>*{flex:1}.pm-work-actions button,.pm-work-actions a{width:100%;text-align:center}}

/* Panel diario 1.20.17 */
.pm-home-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}.pm-home-columns>.panel{min-width:0}.pm-task-row{flex-wrap:wrap}.pm-task-row .pm-work-actions{flex-shrink:0}.pm-recent{margin:18px 0;padding:12px;border:1px solid #cce5d6;border-radius:12px}.pm-recent summary{cursor:pointer;font-weight:700}.pm-recent-item{padding:9px 0;border-bottom:1px solid #e2eae5}.pm-code-dialog{border:0;border-radius:16px;padding:0;width:min(94vw,510px);max-height:90vh;box-shadow:0 16px 70px #0004}.pm-code-dialog::backdrop{background:#0a2418a8}.pm-code-dialog-inner{padding:26px}.pm-code-dialog-inner h2{margin:0 0 18px}.pm-modal-buttons{display:flex;justify-content:flex-end;gap:10px;margin-top:24px;flex-wrap:wrap}.pm-library-button{background:#12673f!important;color:white!important;font-weight:800!important;border-radius:12px;padding:13px 17px!important;box-shadow:0 2px 10px #08503425}.pm-library-button:hover{background:#0b4e2f!important}@media(max-width:1050px){.pm-home-columns{grid-template-columns:1fr}}
