:root{
  --bg0:#070b14;--bg1:#0b1220;--panel:rgba(16,24,40,.78);--panel-2:rgba(23,34,53,.86);
  --line:rgba(148,163,184,.16);--line-2:rgba(99,102,241,.35);--text:#e8eef9;--muted:#8fa1ba;
  --cyan:#22d3ee;--blue:#3b82f6;--violet:#8b5cf6;--green:#34d399;--amber:#fbbf24;--red:#fb7185;
  --shadow:0 28px 80px rgba(0,0,0,.42);--radius:16px;
}
html{background:var(--bg0)}
body{padding:18px!important;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;color:var(--text)!important;background:
 radial-gradient(1000px 620px at 12% -15%,rgba(34,211,238,.15),transparent 55%),
 radial-gradient(900px 650px at 86% 0%,rgba(139,92,246,.17),transparent 55%),
 linear-gradient(150deg,#070b14 0%,#0a1020 48%,#070b14 100%)!important;min-height:100vh}
body:before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.18;background-image:linear-gradient(rgba(255,255,255,.022) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.022) 1px,transparent 1px);background-size:28px 28px;mask-image:linear-gradient(to bottom,black,transparent 75%)}
.container{max-width:1800px!important;position:relative;z-index:1}

.studio-header{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 14px;padding:18px 20px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(135deg,rgba(16,24,40,.92),rgba(13,19,33,.78));box-shadow:0 16px 48px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.04);backdrop-filter:blur(16px)}
.studio-brand{display:flex;align-items:center;gap:13px;min-width:0}.studio-logo{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;font-size:25px;background:linear-gradient(145deg,rgba(34,211,238,.20),rgba(99,102,241,.25));border:1px solid rgba(103,232,249,.32);box-shadow:inset 0 0 24px rgba(34,211,238,.10),0 12px 30px rgba(37,99,235,.18)}
.studio-brand h1{margin:0;font-size:19px;letter-spacing:.01em;font-weight:800;color:#f8fbff}.studio-brand p{margin:4px 0 0;font-size:11px;color:var(--muted);letter-spacing:.08em;text-transform:uppercase;font-weight:700}
.studio-head-right{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.studio-pill{display:flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.035);font-size:11px;font-weight:750;color:#cbd5e1}.studio-pill strong{color:#f8fafc}.studio-live{width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 12px rgba(52,211,153,.85)}

.sticky-ui-stack{background:transparent!important;padding:0!important;margin:0 0 12px}.toolbar,.editor-toolbar,.progress-strip{border:1px solid var(--line)!important;background:linear-gradient(135deg,rgba(16,24,40,.90),rgba(15,23,42,.75))!important;box-shadow:0 14px 38px rgba(0,0,0,.22)!important;backdrop-filter:blur(18px);border-radius:16px!important}
.toolbar{padding:10px!important;gap:8px!important}.toolbar-group{background:rgba(255,255,255,.025)!important;border:1px solid rgba(148,163,184,.12)!important;border-radius:12px!important;padding:7px 8px!important;gap:6px!important}.toolbar-group-title{color:#7f91aa!important;font-size:9px!important;letter-spacing:.11em!important}.toolbar-label{color:#cbd5e1!important}.week-select{color:#eef6ff!important;background:#0a1220!important;border:1px solid rgba(94,234,212,.25)!important;border-radius:9px!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.015);padding:8px 10px!important}
.toolbar button,.editor-toolbar button,.selection-float-bar button,.progress-box button,.editor-box button,.log-box button{border:1px solid rgba(255,255,255,.09)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 5px 15px rgba(0,0,0,.18);font-weight:750!important;letter-spacing:.015em!important;transition:transform .16s ease,filter .16s ease,border-color .16s ease!important}.toolbar button:hover,.editor-toolbar button:hover{filter:brightness(1.12);transform:translateY(-1px)}
.btn-generate{background:linear-gradient(135deg,#2563eb,#7c3aed)!important}.btn-template{background:linear-gradient(135deg,#0f766e,#0891b2)!important}.btn-restore{background:#263247!important}.btn-progress{background:linear-gradient(135deg,#0f766e,#0e7490)!important}.btn-audit{background:linear-gradient(135deg,#b45309,#d97706)!important}.btn-recalc{background:#263247!important}.btn-pdf{background:linear-gradient(135deg,#be123c,#e11d48)!important}.btn-excel{background:linear-gradient(135deg,#047857,#16a34a)!important}.btn-sheet{background:linear-gradient(135deg,#0f766e,#059669)!important}.btn-backup{background:linear-gradient(135deg,#6d28d9,#8b5cf6)!important}.btn-import{background:linear-gradient(135deg,#c2410c,#ea580c)!important}.btn-copy{background:linear-gradient(135deg,#0e7490,#06b6d4)!important}.btn-move{background:linear-gradient(135deg,#1d4ed8,#2563eb)!important}.btn-swap{background:linear-gradient(135deg,#6d28d9,#8b5cf6)!important}.btn-lock{background:#263247!important}.btn-log{background:#7c5b11!important}.btn-ppct{background:linear-gradient(135deg,#4f46e5,#06b6d4)!important;color:#fff!important}
.pdf-option{color:#9fb0c7!important}.pdf-option input{accent-color:#22d3ee}
.tkb-version-badge,.lock-badge{background:rgba(30,41,59,.9)!important;color:#cbd5e1!important;border:1px solid rgba(148,163,184,.18)!important}.lock-badge.locked{color:#fecdd3!important;border-color:rgba(251,113,133,.32)!important;background:rgba(127,29,29,.28)!important}
.editor-toolbar{margin:0 0 8px!important;padding:8px 10px!important;color:#e5edf8!important}.editor-title{color:#f8fafc!important}.editor-hint{color:#7f91aa!important}
.progress-strip{padding:8px 10px!important}.progress-chip{background:rgba(255,255,255,.035)!important;border:1px solid rgba(148,163,184,.15)!important;color:#dbe7f5!important;box-shadow:none!important}.progress-chip.ok{color:#86efac!important}.progress-chip.delay{color:#fdba74!important}.progress-chip.ahead{color:#93c5fd!important}.progress-chip.debt{color:#fda4af!important}.progress-chip.makeup{color:#6ee7b7!important}.progress-chip.supplement{color:#fde68a!important}.progress-chip.issue{color:#fdba74!important}
.status{border-radius:12px!important;background:rgba(15,23,42,.88)!important;border:1px solid var(--line)!important;color:#dbe7f5!important;box-shadow:0 10px 28px rgba(0,0,0,.18)}.status.success{border-color:rgba(52,211,153,.27)!important;color:#a7f3d0!important}.status.warning{border-color:rgba(251,191,36,.27)!important;color:#fde68a!important}.status.error{border-color:rgba(251,113,133,.3)!important;color:#fecdd3!important}.status.info{border-color:rgba(59,130,246,.28)!important;color:#bfdbfe!important}
.export-result{background:rgba(6,78,59,.30)!important;border-color:rgba(52,211,153,.25)!important;color:#a7f3d0!important}.export-result a{color:#67e8f9!important}

.schedule-card{position:relative;background:#fff!important;color:#111827!important;border-radius:18px!important;padding:22px 22px 28px!important;border:1px solid rgba(255,255,255,.78);box-shadow:0 40px 100px rgba(0,0,0,.46),0 0 0 1px rgba(148,163,184,.14)!important;overflow:auto!important}
.schedule-card:before{content:"DOCUMENT CANVAS";position:absolute;right:20px;top:8px;font-family:Inter,system-ui,sans-serif;font-size:8px;letter-spacing:.16em;color:#94a3b8;font-weight:800}.schedule-card:after{content:"";position:absolute;inset:0;pointer-events:none;border-radius:18px;background:linear-gradient(120deg,rgba(255,255,255,.45),transparent 20%);mix-blend-mode:soft-light}
.sample-top-table,.sample-meta-table,#scheduleTable{position:relative;z-index:1}.sample-top-table td{color:#0f172a!important}.sample-meta-table td{color:#0f172a!important}.sample-teacher-name{background:linear-gradient(90deg,#e8f7df,#f4fbef)!important}
#scheduleTable th{background:linear-gradient(#f8fafc,#eef2f7)!important;color:#0f172a!important;border-color:#111827!important}#scheduleTable td{color:#0f172a!important;border-color:#334155!important}.day-cell,.session-cell{background:#f8fafc!important}.period-cell{font-variant-numeric:tabular-nums}.lesson-cell{color:#172033!important}.note-cell{background:#fff!important}
.mon-select,.class-select,.ppct-select,.status-select{background:#f8fafc!important;color:#0f172a!important;border:1px solid #d1dae6!important;border-radius:6px!important;box-shadow:inset 0 1px 2px rgba(15,23,42,.04)}.mon-select:focus,.class-select:focus,.ppct-select:focus,.status-select:focus,.prepare-input:focus{outline:2px solid rgba(59,130,246,.25)!important;border-color:#60a5fa!important}.mon-select.has-value,.class-select.has-value,.ppct-select.has-value{background:#eefbf6!important;border-color:#a7e2c4!important}.prepare-input{color:#0f172a!important;padding:4px 5px!important;border-radius:5px!important}.prepare-input:hover{background:#f8fafc!important}
#scheduleTable tr.row-selected td{outline:2px solid #38bdf8!important;outline-offset:-2px!important}.select-all-mini{background:#eef2f7!important}.row-select{accent-color:#2563eb}

.selection-float-bar{background:linear-gradient(135deg,#111827,#1e293b)!important;border:1px solid rgba(148,163,184,.22)!important;box-shadow:0 18px 48px rgba(0,0,0,.45)!important}.selection-float-text{color:#e5edf8!important}

/* Modals: unified studio look */
.editor-overlay,.log-overlay,.progress-overlay,.create-mode-overlay,.ppct-overlay{background:rgba(2,6,14,.76)!important;backdrop-filter:blur(8px)}
.editor-box,.log-box,.progress-box,.create-mode-box,.ppct-box{color:#e7eef9!important;background:linear-gradient(145deg,#101827,#0b1220)!important;border:1px solid rgba(148,163,184,.18)!important;box-shadow:0 40px 110px rgba(0,0,0,.6)!important}.editor-box h3,.log-box h3,.progress-head h3,.create-mode-box h3,.ppct-box h3{color:#f8fafc!important}.editor-box p,.log-box p,.progress-head p,.create-mode-box p,.ppct-box p{color:#8fa1ba!important}.editor-source,.progress-detail{background:#0c1423!important;border-color:rgba(148,163,184,.15)!important;color:#d9e5f4!important}.editor-field label,.ppct-field label{color:#9fb0c7!important}.editor-field select,.editor-field input,.progress-controls input,.progress-controls select,.ppct-box input,.ppct-box select,.ppct-box textarea{background:#09111e!important;color:#e5edf8!important;border:1px solid rgba(148,163,184,.22)!important}.editor-check{background:#0c1423!important;border-color:rgba(148,163,184,.16)!important}.progress-table-wrap,.log-table-wrap,.ppct-table-wrap{border-color:rgba(148,163,184,.18)!important}.progress-table th,.log-table th,.ppct-table th{background:#111b2e!important;color:#cbd5e1!important;border-color:rgba(148,163,184,.15)!important}.progress-table td,.log-table td,.ppct-table td{background:#0c1423!important;color:#dbe7f5!important;border-color:rgba(148,163,184,.12)!important}.progress-card,.detail-metric{background:#0c1423!important;border-color:rgba(148,163,184,.14)!important}.progress-card .label{color:#8fa1ba!important}.create-mode-card{background:#0c1423!important;border-color:rgba(59,130,246,.28)!important}.create-mode-card strong{color:#f8fafc!important}.create-mode-card span{color:#93a6bf!important}.create-mode-card:hover{background:#101d32!important;border-color:#38bdf8!important}

/* PPCT manager */
.ppct-overlay{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:10120;padding:18px}.ppct-overlay.show{display:flex}.ppct-box{width:min(1500px,98vw);height:min(900px,95vh);display:flex;flex-direction:column;border-radius:20px;padding:0;overflow:hidden}.ppct-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 18px;border-bottom:1px solid rgba(148,163,184,.15);background:linear-gradient(90deg,rgba(37,99,235,.11),rgba(139,92,246,.07),transparent)}.ppct-head-main{display:flex;align-items:center;gap:12px}.ppct-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(145deg,rgba(59,130,246,.2),rgba(34,211,238,.13));border:1px solid rgba(96,165,250,.25);font-size:20px}.ppct-head h3{margin:0 0 3px;font-size:20px}.ppct-head p{margin:0;font-size:11px}.ppct-close{background:#263247!important;color:#fff!important;padding:9px 12px!important}.ppct-body{padding:14px 16px 16px;overflow:auto;display:flex;flex-direction:column;gap:12px}.ppct-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.ppct-toolbar .grow{flex:1}.ppct-toolbar input[type=search]{min-width:220px;padding:10px 12px;border-radius:9px}.ppct-toolbar select{padding:10px;border-radius:9px}.ppct-action{padding:10px 13px;border-radius:9px;border:1px solid rgba(255,255,255,.10);font-weight:750;cursor:pointer;color:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}.ppct-action.import{background:linear-gradient(135deg,#2563eb,#06b6d4)}.ppct-action.add{background:linear-gradient(135deg,#059669,#10b981)}.ppct-action.danger{background:linear-gradient(135deg,#be123c,#e11d48)}.ppct-action.secondary{background:#263247}.ppct-action.save{background:linear-gradient(135deg,#4f46e5,#7c3aed)}
.ppct-dropzone{display:none;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px;border:1px dashed rgba(96,165,250,.38);border-radius:13px;background:rgba(30,64,175,.08)}.ppct-dropzone.show{display:grid}.ppct-import-title{font-weight:800;color:#dbeafe;margin-bottom:4px}.ppct-import-meta{font-size:11px;color:#93a6bf;line-height:1.5}.ppct-import-controls{display:flex;gap:7px;align-items:end;flex-wrap:wrap}.ppct-field{min-width:120px}.ppct-field label{display:block;font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;margin-bottom:4px}.ppct-field input,.ppct-field select{padding:8px 9px;border-radius:8px;min-width:110px}.ppct-preview{font-size:11px;color:#aab9cc;margin-top:7px;max-width:900px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ppct-stats{display:flex;gap:7px;flex-wrap:wrap}.ppct-stat{padding:6px 9px;border-radius:999px;background:rgba(255,255,255,.035);border:1px solid rgba(148,163,184,.12);font-size:10px;color:#aebcd0}.ppct-stat strong{color:#f8fafc}.ppct-table-wrap{overflow:auto;border-radius:13px;min-height:330px;max-height:calc(95vh - 300px)}.ppct-table{width:100%;min-width:1100px;border-collapse:collapse;table-layout:fixed}.ppct-table th{position:sticky;top:0;z-index:2;padding:9px 7px;font-size:10px;letter-spacing:.035em;text-transform:uppercase}.ppct-table td{padding:5px}.ppct-table input{width:100%;padding:7px 8px;border-radius:7px}.ppct-table .c-check{width:42px;text-align:center}.ppct-table .c-mon{width:150px}.ppct-table .c-khoi{width:75px}.ppct-table .c-tuan{width:75px}.ppct-table .c-ppct{width:90px}.ppct-table .c-lesson{width:auto}.ppct-table .c-note{width:170px}.ppct-table .c-action{width:105px}.ppct-row-actions{display:flex;gap:4px;justify-content:center}.ppct-mini{border:1px solid rgba(255,255,255,.10);border-radius:7px;padding:6px 8px;color:#fff;cursor:pointer;font-size:10px;font-weight:800}.ppct-mini.save{background:#2563eb}.ppct-mini.del{background:#9f1239}.ppct-empty{padding:32px;text-align:center;color:#8192a9}.ppct-changed{box-shadow:inset 3px 0 0 #38bdf8}

@media(max-width:950px){body{padding:9px!important}.studio-header{align-items:flex-start;flex-direction:column;padding:14px}.studio-head-right{justify-content:flex-start}.schedule-card{padding:14px 8px 20px!important}.ppct-dropzone{grid-template-columns:1fr}.ppct-toolbar .grow{flex-basis:100%}.ppct-box{height:97vh}}

/* Exact column proportions from the accepted 8-column schedule sample. */
.sample-col-day{width:5.263%!important}.sample-col-date{width:9.240%!important}.sample-col-period{width:5.965%!important}.sample-col-subject{width:15.088%!important}.sample-col-class{width:5.965%!important}.sample-col-ppct{width:8.538%!important}.sample-col-lesson{width:35.439%!important}.sample-col-note{width:14.503%!important}

/* A4 print master: overrides every screen style. */
@media print{
  @page{size:A4 portrait;margin:8mm 7mm 10mm 7mm!important}
  html,body{background:#fff!important;color:#000!important;width:auto!important;min-width:0!important;margin:0!important;padding:0!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  body:before,.studio-header,.no-print,.sticky-ui-stack,.selection-float-bar,.ppct-overlay,.schedule-card:before,.schedule-card:after{display:none!important}
  .container{max-width:none!important;width:100%!important;margin:0!important;padding:0!important}
  .schedule-card{display:block!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important;color:#000!important;background:#fff!important}
  .sample-top-table,.sample-meta-table,#scheduleTable{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important;border-collapse:collapse!important;font-family:"Times New Roman",Times,serif!important}
  .sample-top-table td{font-size:9.2pt!important;padding:.35mm .45mm!important;color:#000!important;background:#fff!important}.sample-meta-table{margin-top:.5mm!important}.sample-meta-table td{height:7mm!important;font-size:9.2pt!important;padding:.55mm .7mm!important;color:#000!important;border:.6pt solid #000!important}.sample-teacher-name{background:#E2F0D9!important}
  #scheduleTable th{font-family:"Times New Roman",Times,serif!important;font-size:8.1pt!important;line-height:1!important;font-weight:700!important;color:#000!important;background:#fff!important;border:.85pt solid #000!important;padding:.65mm .35mm!important}
  #scheduleTable td{font-family:"Times New Roman",Times,serif!important;font-size:7.75pt!important;line-height:1.08!important;color:#000!important;background:#fff!important;border:.55pt solid #000!important;padding:.5mm .42mm!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important}
  #scheduleTable .day-cell,#scheduleTable .session-cell,#scheduleTable .period-cell{font-size:8.2pt!important;line-height:1.05!important;text-align:center!important}#scheduleTable .lesson-cell{font-size:7.75pt!important;line-height:1.1!important;text-align:left!important}.note-cell{text-align:center!important}
  #scheduleTable .status-col,#scheduleTable .status-cell,#scheduleTable .select-col,#scheduleTable .row-select-cell{display:none!important;width:0!important}.mon-select,.class-select,.ppct-select,.status-select,.prepare-input{display:none!important}.print-only{display:inline!important;color:#000!important}.print-mon,.print-class,.print-ppct,.print-prepare{font-family:"Times New Roman",Times,serif!important;font-size:7.75pt!important;color:#000!important}
  .sample-col-day{width:5.263%!important}.sample-col-date{width:9.240%!important}.sample-col-period{width:5.965%!important}.sample-col-subject{width:15.088%!important}.sample-col-class{width:5.965%!important}.sample-col-ppct{width:8.538%!important}.sample-col-lesson{width:35.439%!important}.sample-col-note{width:14.503%!important}
  #scheduleTable thead{display:table-header-group!important}#scheduleTable tr{break-inside:avoid!important;page-break-inside:avoid!important}body.hide-empty-pdf tr.empty-session{display:none!important}.backend-only{display:none!important}.missing{color:#000!important}
  .sample-signature{margin-left:50.38%!important;width:35.67%!important;padding-top:1.7mm!important;text-align:center!important;font-family:"Times New Roman",Times,serif!important;font-size:9pt!important;color:#000!important;break-inside:avoid!important}.sample-signature-space{height:9mm!important}
}

/* V3.2 - Professional depth + explicit save feedback */
.btn-smartfix{background:linear-gradient(135deg,#7c3aed,#2563eb 55%,#06b6d4)!important;color:#fff!important;position:relative;overflow:hidden}
.btn-smartfix:after{content:"";position:absolute;inset:-60% auto -60% -30%;width:34%;transform:rotate(18deg);background:linear-gradient(90deg,transparent,rgba(255,255,255,.28),transparent);animation:lbgSweep 4.6s linear infinite}
@keyframes lbgSweep{0%{left:-45%}70%,100%{left:125%}}
.toolbar-group{box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 10px 28px rgba(0,0,0,.08)!important}
.schedule-card{transform:perspective(1800px) rotateX(.16deg);transform-origin:50% 0;box-shadow:0 38px 110px rgba(0,0,0,.48),0 1px 0 rgba(255,255,255,.8) inset,0 0 0 1px rgba(94,234,212,.08)!important}
.ppct-action.save-all{background:linear-gradient(135deg,#4f46e5,#7c3aed)!important;min-width:145px}.ppct-action.save-all:disabled{background:#1d293d!important;color:#64748b!important;cursor:default;box-shadow:none!important}
.ppct-save-state{display:flex;align-items:center;min-height:36px;padding:9px 12px;border-radius:10px;border:1px solid rgba(148,163,184,.16);font-size:11px;font-weight:800;letter-spacing:.01em;transition:.2s ease}.ppct-save-state.clean,.ppct-save-state.success{color:#86efac;background:rgba(6,95,70,.20);border-color:rgba(52,211,153,.26)}.ppct-save-state.dirty{color:#fde68a;background:rgba(120,53,15,.20);border-color:rgba(251,191,36,.27)}.ppct-save-state.saving,.ppct-save-state.import{color:#93c5fd;background:rgba(30,64,175,.20);border-color:rgba(96,165,250,.27)}.ppct-save-state.error{color:#fecdd3;background:rgba(127,29,29,.23);border-color:rgba(251,113,133,.30)}
.ppct-stat.warn{color:#fde68a;border-color:rgba(251,191,36,.24);background:rgba(120,53,15,.14)}
.ppct-changed td{background:rgba(56,189,248,.055)!important}.ppct-saving{box-shadow:inset 3px 0 0 #818cf8}.ppct-saved{animation:ppctSavedPulse 1.25s ease}.ppct-mini.save.is-saved{background:#14532d;color:#bbf7d0;min-width:68px}.ppct-mini.save:disabled{opacity:.6;cursor:wait}
@keyframes ppctSavedPulse{0%{box-shadow:inset 4px 0 0 #34d399,0 0 0 rgba(52,211,153,0)}35%{box-shadow:inset 4px 0 0 #34d399,0 0 22px rgba(52,211,153,.20)}100%{box-shadow:inset 4px 0 0 #34d399,0 0 0 rgba(52,211,153,0)}}

/* Dedicated official print renderer. Screen editor is never reused for PDF. */
.print-report{display:none}
@media print{
  @page{size:A4 portrait;margin:7mm 9mm 7mm 9mm!important}
  html,body{margin:0!important;padding:0!important;background:#fff!important;color:#000!important;width:auto!important;min-width:0!important}
  body>.container,.ppct-overlay,.editor-overlay,.log-overlay,.progress-overlay,.create-mode-overlay,.selection-float-bar{display:none!important}
  #printReport{display:block!important;width:100%!important;color:#000!important;background:#fff!important;font-family:"Times New Roman",Times,serif!important}
  .official-print-page{width:100%;margin:0;padding:0;background:#fff;color:#000;box-sizing:border-box;page-break-inside:avoid}
  .official-print-page.pr-page-2{break-before:page;page-break-before:always}
  .pr-title{text-align:center;font-size:13.5pt;font-weight:700;line-height:1.05;margin:0 0 .7mm}
  .pr-meta{text-align:center;font-size:10.2pt;line-height:1.05;margin:0 0 1.1mm}.pr-meta span{text-decoration:underline;text-underline-offset:1px}
  .official-print-table{width:100%;border-collapse:collapse;table-layout:fixed;border:1.25pt solid #111;font-size:9.2pt;line-height:1.02}
  .official-print-table .pr-col-day{width:12.0%}.official-print-table .pr-col-session{width:6.0%}.official-print-table .pr-col-period{width:5.6%}.official-print-table .pr-col-subject{width:11.2%}.official-print-table .pr-col-class{width:9.0%}.official-print-table .pr-col-ppct{width:7.2%}.official-print-table .pr-col-lesson{width:25.5%}.official-print-table .pr-col-note{width:23.5%}
  .official-print-table th{height:8.5mm;padding:.7mm .45mm;border:1pt solid #111;background:#fff!important;color:#000!important;font-size:9.8pt;font-weight:700;text-align:center;vertical-align:middle;line-height:1.05}
  .official-print-table td{height:4.55mm;padding:.18mm .55mm;background:#fff!important;color:#000!important;border-left:.7pt solid #111;border-right:.7pt solid #111;border-top:0;border-bottom:.55pt dotted #333;vertical-align:middle;overflow-wrap:break-word;word-break:normal}
  .official-print-table tr.pr-session-end td{border-bottom:.8pt solid #111}
  .official-print-table .pr-day,.official-print-table .pr-session{border-top:.8pt solid #111!important;border-bottom:.8pt solid #111!important;text-align:center;padding:.4mm}
  .pr-day-name{font-weight:700;font-style:italic;font-size:17pt;line-height:1;margin-bottom:1.6mm}.pr-day-date{font-style:italic;font-size:9.7pt;white-space:nowrap}
  .pr-session{font-size:10pt}.pr-period,.pr-class,.pr-ppct{text-align:center}.pr-subject,.pr-lesson,.pr-note{text-align:left}.pr-lesson,.pr-note{font-size:9pt;line-height:1.02}
  .pr-approval{display:grid;grid-template-columns:1fr 1fr;gap:10mm;margin-top:4mm;font-size:10.5pt;font-style:italic}.pr-review{text-align:left}.pr-approver{text-align:center;font-style:normal}.pr-approver strong{display:block;margin-top:1.2mm;font-size:10.5pt}
}

/* V5.3 environment badge */
.studio-pill.beta-env{border-color:#7c3aed;color:#c4b5fd;background:#25134b}.studio-pill.prod-env{border-color:#15803d;color:#bbf7d0;background:#082d20}

/* V5.4 Smart Setup + PPCT onboarding */
.ppct-action{display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none}
.ppct-action.template{background:linear-gradient(135deg,#0f766e,#0891b2)!important}
.ppct-template-hint{padding:9px 11px;border-radius:10px;border:1px solid rgba(34,211,238,.22);background:rgba(8,145,178,.08);font-size:10.5px;color:#9fb8cf;line-height:1.45}
.ppct-template-hint b{color:#d7f7ff}.ppct-template-hint a{color:#67e8f9;font-weight:850;text-decoration:none}.ppct-template-hint a:hover{text-decoration:underline}


/* V5.4.2 Mobile UI auto-detect + smartphone responsive fix */
body.mobile-layout{padding:10px!important}
body.mobile-layout .container{max-width:100%!important}
body.mobile-layout .sticky-ui-stack{position:static!important;top:auto!important;padding-top:0!important}
body.mobile-layout .toolbar,
body.mobile-layout .editor-toolbar,
body.mobile-layout .progress-strip{border-radius:14px!important}
body.mobile-layout .toolbar{display:flex!important;flex-direction:column!important;align-items:stretch!important;padding:8px!important;gap:8px!important}
body.mobile-layout .toolbar-group{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch!important;width:100%!important;padding:8px!important;gap:8px!important}
body.mobile-layout .toolbar-group-title{display:block!important;grid-column:1/-1;font-size:10px!important;letter-spacing:.08em!important;margin:0!important}
body.mobile-layout .toolbar-label{align-self:center!important;font-size:12px!important}
body.mobile-layout .week-select{width:100%!important;min-width:0!important;min-height:44px!important;font-size:15px!important}
body.mobile-layout .toolbar button,
body.mobile-layout .editor-toolbar button{width:100%!important;min-height:44px!important;padding:10px 12px!important;line-height:1.2!important;font-size:13px!important;white-space:normal!important}
body.mobile-layout .schedule-tools .toolbar-label{grid-column:1/2}
body.mobile-layout .schedule-tools .week-select{grid-column:2/3}
body.mobile-layout .schedule-tools #btnGenerate,
body.mobile-layout .schedule-tools #btnSaveCurrent,
body.mobile-layout .tkb-tools #tkbVersionInfo,
body.mobile-layout .view-tools .pdf-option{grid-column:1/-1}
body.mobile-layout .tkb-version-badge,
body.mobile-layout .lock-badge{display:block!important;width:100%!important;padding:10px 12px!important;line-height:1.35!important}
body.mobile-layout .pdf-option{display:flex!important;align-items:center!important;gap:8px!important;font-size:13px!important;padding:4px 2px!important;white-space:normal!important}
body.mobile-layout .pdf-option input{width:18px;height:18px;flex:none}
body.mobile-layout .editor-toolbar{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch!important;padding:8px!important;gap:8px!important}
body.mobile-layout .editor-title,
body.mobile-layout .editor-hint,
body.mobile-layout #weekLockBadge{grid-column:1/-1}
body.mobile-layout .editor-title{font-size:13px!important;line-height:1.35!important}
body.mobile-layout .editor-hint{font-size:11px!important;line-height:1.4!important}
body.mobile-layout .progress-strip{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));padding:8px!important;gap:8px!important}
body.mobile-layout .progress-chip{min-width:0!important;display:block!important;padding:10px 11px!important;line-height:1.35!important;font-size:12px!important;text-align:left!important}
body.mobile-layout .selection-float-bar{right:10px!important;left:10px!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;display:flex!important;flex-wrap:wrap!important;justify-content:center!important}
body.mobile-layout .selection-float-bar button{flex:1 1 140px!important;min-height:42px!important}
body.mobile-layout .schedule-card{padding:12px!important;border-radius:14px!important;overflow:auto!important;-webkit-overflow-scrolling:touch!important}
body.mobile-layout .schedule-card:before{right:12px!important}
body.mobile-layout #scheduleTable{min-width:980px!important}
body.mobile-layout .sample-signature{min-width:220px!important}
body.mobile-layout .ppct-box{width:min(100vw - 12px,1500px)!important;height:min(100dvh - 12px,900px)!important;border-radius:16px!important}
body.mobile-layout .ppct-head,
body.mobile-layout .ppct-body{padding-left:12px!important;padding-right:12px!important}
body.mobile-layout .ppct-toolbar{display:grid!important;grid-template-columns:1fr 1fr!important;align-items:stretch!important}
body.mobile-layout .ppct-toolbar .grow,
body.mobile-layout .ppct-toolbar input[type=search],
body.mobile-layout .ppct-toolbar select{grid-column:1/-1!important;min-width:0!important;width:100%!important}
body.mobile-layout .ppct-action{min-height:42px!important;text-align:center!important;white-space:normal!important}
body.mobile-layout .ppct-dropzone{grid-template-columns:1fr!important}
body.mobile-layout .ppct-import-controls{display:grid!important;grid-template-columns:1fr!important}

@media (max-width: 760px){
  .studio-header{padding:14px!important;border-radius:16px!important}
  .studio-brand h1{font-size:18px!important}
  .studio-brand p{font-size:10px!important}
  .site-nav{width:100%!important;justify-content:flex-start!important}
  .site-nav-btn,.cloud-user-btn{min-height:40px!important}
  .studio-head-right{width:100%!important;justify-content:flex-start!important}
  .workspace-overview{grid-template-columns:1fr!important}
  .workspace-card,.workspace-card.profile{grid-column:auto!important}
}


/* V5.4.4 Smart Mobile Command Center
   Keep the lesson schedule visible first; reveal advanced controls only on demand. */
.mobile-command-bar{display:none}
body.mobile-layout .mobile-command-bar{
  position:sticky;top:0;z-index:180;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;
  padding:7px;margin:0 0 8px;border:1px solid rgba(148,163,184,.18);border-radius:14px;
  background:rgba(9,17,30,.95);box-shadow:0 10px 30px rgba(0,0,0,.32);backdrop-filter:blur(14px)
}
body.mobile-layout .mobile-command{min-height:42px;padding:8px 7px;border-radius:10px!important;background:#17243a!important;color:#e8eef9!important;font-size:11px!important;line-height:1.15!important}
body.mobile-layout .mobile-command.primary{background:linear-gradient(135deg,#0e7490,#2563eb)!important}
body.mobile-layout .toolbar{margin-bottom:8px!important}
body.mobile-layout .toolbar-group.schedule-tools{display:grid!important}
body.mobile-layout:not(.mobile-tools-open) .toolbar-group.tkb-tools,
body.mobile-layout:not(.mobile-tools-open) .toolbar-group.progress-tools,
body.mobile-layout:not(.mobile-tools-open) .toolbar-group.export-tools,
body.mobile-layout:not(.mobile-tools-open) .toolbar-group.view-tools{display:none!important}
body.mobile-layout:not(.mobile-editor-open) .editor-toolbar{display:none!important}
body.mobile-layout:not(.mobile-tools-open) .progress-strip{display:none!important}
body.mobile-layout.mobile-tools-open .toolbar-group.tkb-tools,
body.mobile-layout.mobile-tools-open .toolbar-group.progress-tools,
body.mobile-layout.mobile-tools-open .toolbar-group.export-tools,
body.mobile-layout.mobile-tools-open .toolbar-group.view-tools{display:grid!important}
body.mobile-layout.mobile-tools-open .progress-strip{display:grid!important}
body.mobile-layout.mobile-editor-open .editor-toolbar{display:grid!important}
body.mobile-layout .schedule-card{margin-top:0!important;scroll-margin-top:58px!important}
body.mobile-layout .sticky-ui-stack{margin-bottom:8px!important}
@media(max-width:430px){
  body.mobile-layout .mobile-command-bar{gap:5px;padding:6px}
  body.mobile-layout .mobile-command{font-size:10.5px!important;padding:7px 4px}
  body.mobile-layout .toolbar-group{grid-template-columns:1fr 1fr!important;padding:7px!important;gap:7px!important}
  body.mobile-layout .toolbar button,body.mobile-layout .editor-toolbar button{font-size:12px!important;padding:9px 8px!important}
}
