@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,sans-serif;background:#f7f7f5;color:#20211f}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0}.sidebar{position:fixed;inset:0 auto 0 0;width:232px;background:#fff;border-right:1px solid #e9e9e5;padding:24px 14px;display:flex;flex-direction:column}.brand{font-weight:700;font-size:20px;display:flex;align-items:center;gap:9px;padding:0 12px 28px}.brand-mark{width:29px;height:29px;border-radius:9px;background:#242522;color:#fff;display:grid;place-items:center;font-size:17px}.sidebar nav,.sidebar-bottom{display:grid;gap:5px}.sidebar-bottom{margin-top:auto}.sidebar button{width:100%;text-align:left;background:transparent;color:#777a73;padding:11px 12px;border-radius:10px;display:flex;gap:11px;align-items:center;font-size:14px}.sidebar button:hover,.sidebar button.active{background:#f0f0ec;color:#20211f;font-weight:600}.main{margin-left:232px;min-height:100vh;padding:0 34px 50px}.topbar{height:112px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e9e9e5}.eyebrow{font-size:12px;color:#969890;margin-bottom:4px}.topbar h1{font-size:27px;margin:0;letter-spacing:-.5px}.top-actions{display:flex;gap:10px;align-items:center}.icon-btn{width:42px;height:42px;border-radius:12px;background:#242522;color:white;font-size:25px;line-height:1}.avatar{width:40px;height:40px;border-radius:50%;background:#e8e7df;display:grid;place-items:center;font-weight:600}.content-grid{display:grid;grid-template-columns:1.4fr .8fr;gap:20px;margin-top:24px}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.stat{background:#fff;border:1px solid #e8e8e4;border-radius:15px;padding:18px}.stat .label{font-size:12px;color:#8c8e88}.stat .value{font-size:25px;font-weight:650;margin-top:10px}.stat .hint{font-size:11px;color:#9b9d97;margin-top:5px}.panel{background:#fff;border:1px solid #e8e8e4;border-radius:15px;padding:19px}.panel h3{font-size:15px;margin:0 0 15px}.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.link-btn{background:none;color:#777;font-size:12px}.event{display:flex;gap:15px;padding:14px 0;border-bottom:1px solid #efefeb}.event:last-child{border:0}.time{font-size:13px;color:#777;width:48px}.event-title{font-size:14px;font-weight:600}.event-sub{font-size:12px;color:#979992;margin-top:4px}.pill{display:inline-flex;padding:4px 8px;border-radius:99px;background:#f0f0ec;font-size:11px;color:#656761}.attention{display:flex;justify-content:space-between;gap:10px;padding:12px 0;border-bottom:1px solid #efefeb}.attention:last-child{border:0}.attention strong{font-size:13px}.attention small{display:block;color:#999;margin-top:4px}.calendar-head{display:flex;justify-content:space-between;align-items:center;margin:24px 0 12px}.calendar-head button{background:#fff;border:1px solid #e4e4df;border-radius:9px;padding:7px 10px}.week{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}.day{background:#fff;border:1px solid #e8e8e4;border-radius:13px;min-height:360px;padding:11px}.day-head{font-size:12px;color:#858781;margin-bottom:12px}.day-head b{display:block;color:#252622;font-size:16px;margin-top:3px}.slot{padding:9px;border-radius:9px;background:#f0f0ec;margin-bottom:7px;font-size:11px}.slot b{display:block;font-size:12px;margin-bottom:3px}.table-wrap{background:#fff;border:1px solid #e8e8e4;border-radius:15px;overflow:auto;margin-top:24px}.table{width:100%;border-collapse:collapse;min-width:680px}.table th,.table td{padding:15px 17px;text-align:left;border-bottom:1px solid #efefeb;font-size:13px}.table th{font-size:11px;color:#92948e;font-weight:500}.table tr:last-child td{border:0}.person{font-weight:600}.muted{color:#969891}.status{font-size:11px;padding:5px 8px;border-radius:8px;background:#efefeb}.status.good{background:#e9f0e8}.status.warn{background:#f3eee3}.toolbar{display:flex;justify-content:space-between;align-items:center;margin-top:22px;gap:10px}.search{border:1px solid #e3e3de;background:#fff;border-radius:10px;padding:10px 12px;width:260px}.primary{background:#242522;color:#fff;border-radius:10px;padding:10px 14px;font-size:13px}.secondary{background:#fff;border:1px solid #e3e3de;border-radius:10px;padding:10px 14px;font-size:13px}.empty{padding:50px;text-align:center;color:#999}.form{display:grid;gap:12px}.form label{font-size:12px;color:#777}.form input,.form select,.form textarea{margin-top:5px;width:100%;padding:11px;border:1px solid #deded8;border-radius:9px;background:#fff;outline:none}.form textarea{min-height:80px;resize:vertical}.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:5px}.modal-backdrop{display:none;position:fixed;inset:0;background:rgba(20,20,18,.25);align-items:center;justify-content:center;padding:20px}.modal-backdrop.open{display:flex}.modal{width:min(520px,100%);background:#fff;border-radius:17px;padding:20px;box-shadow:0 20px 70px rgba(0,0,0,.15)}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.modal-head h2{font-size:18px;margin:0}.modal-head button{background:#f1f1ed;border-radius:50%;width:30px;height:30px;font-size:20px;color:#777}.notice{padding:13px 15px;border-radius:11px;background:#f0f0ec;font-size:12px;color:#696b65;margin-top:14px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:24px}.setting{background:#fff;border:1px solid #e8e8e4;border-radius:15px;padding:18px}.setting h3{margin:0 0 8px;font-size:14px}.setting p{font-size:12px;color:#888;line-height:1.5}.toggle{display:flex;justify-content:space-between;align-items:center}.toggle input{width:auto}.mobile-only{display:none}@media(max-width:900px){.sidebar{width:72px}.sidebar span:not(.brand-mark){display:none}.brand{padding-left:8px}.main{margin-left:72px;padding:0 18px 40px}.cards{grid-template-columns:repeat(2,1fr)}.content-grid{grid-template-columns:1fr}.settings-grid{grid-template-columns:1fr}.week{overflow:auto;grid-template-columns:repeat(7,145px)}}@media(max-width:560px){.sidebar{display:none}.main{margin-left:0}.topbar{height:90px}.cards{grid-template-columns:1fr 1fr}.stat .value{font-size:21px}.search{width:100%}.toolbar{align-items:stretch;flex-direction:column}.week{grid-template-columns:repeat(7,125px)}}

.calendar-nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.calendar-nav strong{margin-left:8px;font-size:13px;color:#55584f}.day.today{background:#f1f4ed;border-radius:12px;padding:8px}.slot{display:grid;gap:4px}.slot span{font-size:12px}.slot small{font-size:10px;color:#74776e}.slot.done{background:#e8f3e9;border-color:#c6dfc8}.calendar-head{gap:12px;flex-wrap:wrap}.table-wrap{overflow-x:auto}
@media(max-width:850px){.calendar-nav{width:100%}.calendar-head{align-items:flex-start}.week{overflow-x:auto}.day{min-width:135px}}

/* Refined calm, friendly calendar inspired by modern lesson-planning apps */
:root{--ink:#292b31;--muted:#898b96;--line:#eeedf3;--accent:#7768dc;--accent-soft:#f0edff;--mint:#e4f5ed;--peach:#fff0e7}
body{background:#f8f8fc;color:var(--ink)}
.sidebar{background:#fff;border-right-color:#efeff5;padding:26px 14px}
.brand{font-size:21px;letter-spacing:-.7px;padding-bottom:34px}
.brand-mark{background:linear-gradient(145deg,#8273ed,#6254c7);border-radius:10px;box-shadow:0 5px 12px #8273ed33}
.sidebar button{border-radius:12px;padding:12px;color:#777988;transition:background .15s,color .15s}
.sidebar button:hover{background:#f7f6ff;color:#5f52c6}
.sidebar button.active{background:#f0edff;color:#6254c7;font-weight:650}
.main{padding-left:38px;padding-right:38px}
.topbar{border-bottom-color:#ecebf2}
.topbar h1{letter-spacing:-.8px;font-size:29px}
.icon-btn{background:var(--accent);border-radius:13px;box-shadow:0 5px 12px #7768dc30}
.avatar{background:#f0edff;color:#6254c7}
.stat,.panel,.setting{border-color:#eeedf4;border-radius:18px;box-shadow:0 3px 14px #292b3105}
.stat{padding:20px}
.stat .label{color:#898b96;font-size:12px}
.stat .value{letter-spacing:-1px}
.primary{background:var(--accent);border-radius:11px;box-shadow:0 4px 10px #7768dc22;transition:transform .15s,background .15s}
.primary:hover{background:#6658cb;transform:translateY(-1px)}
.secondary,.calendar-head button{border-color:#e8e6f0;border-radius:11px}
.modal{border-radius:22px;box-shadow:0 24px 80px #27203b24}
.modal-backdrop{backdrop-filter:blur(4px)}
.form input:focus,.form select:focus,.form textarea:focus{border-color:#a59aef;box-shadow:0 0 0 3px #7768dc14}
.calendar-top{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:25px 0 18px}
.calendar-kicker{font-size:10px;font-weight:700;letter-spacing:1.5px;color:#a09aaf;margin-bottom:6px}
.calendar-range{font-size:24px;letter-spacing:-.8px;margin:0;font-weight:650}
.calendar-summary{font-size:12px;color:#9293a0;margin-top:8px}
.calendar-summary span{padding:0 5px;color:#c0bdca}
.calendar-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.calendar-arrow{width:37px;height:37px;border-radius:11px;background:#fff;border:1px solid #e9e7f0;color:#67617c;font-size:24px;line-height:1}
.calendar-today{height:37px;background:#fff;border:1px solid #e9e7f0;border-radius:11px;padding:0 13px;font-size:12px;color:#575967}
.calendar-shell{background:#fff;border:1px solid #eae9f1;border-radius:17px;overflow:auto;box-shadow:0 5px 18px #292b3105}
.calendar-grid{display:grid;grid-template-columns:55px repeat(7,minmax(112px,1fr));min-width:900px}
.calendar-corner{position:sticky;left:0;background:#fff;z-index:3;border-bottom:1px solid var(--line);border-right:1px solid var(--line);height:66px}
.calendar-day-head{height:66px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border-bottom:1px solid var(--line);border-right:1px solid #f2f1f6;background:#fff}
.calendar-day-head span{font-size:10px;text-transform:uppercase;letter-spacing:.7px;color:#9293a0;font-weight:650}
.calendar-day-head b{font-size:19px;font-weight:600}
.calendar-day-head.is-today b{background:var(--accent);color:white;border-radius:50%;width:31px;height:31px;display:grid;place-items:center;font-size:15px}
.calendar-hour{height:70px;padding:9px 8px 0 0;text-align:right;font-size:10px;color:#a4a4b0;border-right:1px solid var(--line);border-bottom:1px solid #f3f2f7;background:#fff;position:sticky;left:0;z-index:2}
.calendar-cell{height:70px;position:relative;padding:3px;border-right:1px solid #f0eff5;border-bottom:1px solid #f0eff5;background:#fff;cursor:pointer;transition:background .12s}
.calendar-cell:hover{background:#faf9ff}
.calendar-cell.is-today{background:#fcfbff}
.calendar-cell.is-today:hover{background:#f8f6ff}
.calendar-event{display:flex;flex-direction:column;align-items:flex-start;gap:3px;width:100%;text-align:left;padding:6px 7px;border-radius:8px;background:#efedff;border-left:3px solid #8879e8;color:#4f45a0;overflow:hidden;margin-bottom:3px;min-height:58px}
.calendar-event strong{font-size:10px;line-height:1.25;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.calendar-event .event-time{font-size:9px;font-weight:700;color:#7768dc}
.calendar-event small{font-size:9px;color:#8075bb;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.calendar-event.event-done{background:#e5f5ec;border-color:#51b88a;color:#287b57}
.calendar-event.event-done .event-time,.calendar-event.event-done small{color:#3a906b}
.calendar-footnote{font-size:11px;color:#9a9aa5;margin:12px 2px 24px}
@media(max-width:900px){.main{padding-left:22px;padding-right:22px}.calendar-top{align-items:flex-start;flex-direction:column}.calendar-actions{width:100%}.calendar-grid{min-width:880px}}
@media(max-width:560px){.main{padding:0 13px 35px}.topbar h1{font-size:25px}.calendar-range{font-size:21px}.calendar-actions{gap:6px}.calendar-actions .primary{margin-left:auto}.calendar-grid{min-width:850px}.calendar-event{padding:5px}.calendar-event strong{font-size:9px}}

.auth-gate{position:fixed;inset:0;z-index:1000;background:radial-gradient(ellipse at top left,#f0edff 0,transparent 45%),#f8f8fc;display:grid;place-items:center;padding:20px}
.auth-gate[hidden]{display:none}
.auth-card{width:min(420px,100%);background:#fff;border:1px solid #eeedf4;border-radius:24px;padding:32px;box-shadow:0 20px 80px #35296b12}
.auth-brand{display:flex;align-items:center;gap:10px;font-size:20px;font-weight:700;margin-bottom:34px}
.auth-kicker{font-size:10px;font-weight:700;letter-spacing:1.5px;color:#8a7ce1}
.auth-card h1{font-size:27px;letter-spacing:-.8px;margin:9px 0}
.auth-card p{font-size:13px;line-height:1.6;color:#858693;margin:0 0 22px}
.auth-submit{width:100%;margin-top:5px;min-height:44px}
.auth-switch{display:block;margin:17px auto 0;background:transparent;color:#685acb;font-size:12px}
.auth-error{font-size:12px;color:#b33b55;line-height:1.5}
.auth-safe{margin-top:25px;padding-top:16px;border-top:1px solid #f0eff5;color:#9a9ba6;font-size:10px;text-align:center}
.cloud-notice{margin:12px 16px;padding:12px 16px;border-radius:12px;background:#fff4df;color:#8b6726;font-size:12px}
.cloud-notice[hidden]{display:none}
.cloud-status{font-size:12px;line-height:1.5;margin:10px 0 14px;padding:10px 12px;border-radius:10px;background:#f3f1ff;color:#6254c7;overflow-wrap:anywhere}
.cloud-status.ok{background:#e8f7ef;color:#2d805b}
.cloud-status.error{background:#fff0f0;color:#a03b48}
@media(max-width:560px){.auth-card{padding:25px 21px}.auth-card h1{font-size:24px}}

/* Practical usability and mobile navigation */
#cloudStatusGlobal{display:inline-block;margin:0;max-width:245px;padding:8px 10px;font-size:10px;white-space:normal}
.cloud-status.pending{background:#fff5df;color:#886a26}
.import-label{display:inline-flex;align-items:center;cursor:pointer;margin-top:8px}
.client-history{border-top:1px solid #eeedf4;margin-top:16px;padding-top:10px}
.client-history h3{font-size:12px;margin:14px 0 8px}
.history-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:8px 0;border-bottom:1px solid #f0eff5;font-size:12px}
.empty-start{background:#fff;border:1px solid #eeedf4;border-radius:18px;padding:28px;margin-top:22px}
.empty-start h2{font-size:21px;margin:0 0 8px}
.empty-start p{font-size:13px;line-height:1.6;color:#858693;max-width:560px}
.empty-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
@media(max-width:560px){
  .sidebar{display:block;position:fixed;inset:auto 0 0;width:100%;height:auto;padding:7px 5px calc(7px + env(safe-area-inset-bottom));background:rgba(255,255,255,.97);border-right:0;border-top:1px solid #e9e7f0;z-index:100;backdrop-filter:blur(14px)}
  .sidebar .brand,.sidebar-bottom{display:none}
  .sidebar nav{display:flex;justify-content:space-around;gap:2px}
  .sidebar nav button{display:flex;flex:1;flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:8px 2px;border-radius:10px;font-size:17px;min-width:0}
  .sidebar nav button span{display:block!important;font-size:9px;white-space:nowrap;font-weight:500}
  .main{margin-left:0;padding:0 12px calc(92px + env(safe-area-inset-bottom))}
  .topbar{height:82px}
  .top-actions{gap:6px}
  #cloudStatusGlobal{max-width:112px;padding:6px 7px;font-size:9px;line-height:1.25}
  .avatar{display:none}
  .icon-btn{width:38px;height:38px}
  .empty-start{padding:20px}
}

.auth-tools{display:flex;flex-direction:column;gap:8px;margin-top:12px;text-align:center}
.auth-tools button{background:transparent;color:#777988;font-size:11px;padding:5px}
.auth-tools button:hover{color:#6254c7}

#nav button[data-page="settings"]{display:none}
@media(max-width:560px){#nav button[data-page="settings"]{display:flex}.sidebar-bottom{display:none}}


/* Phase 1 — friendly daily dashboard, responsive for desktop and mobile */
.dash-welcome{position:relative;display:flex;align-items:center;justify-content:space-between;gap:24px;overflow:hidden;margin:22px 0 18px;padding:28px 30px;border:1px solid #e9e5ff;border-radius:22px;background:linear-gradient(115deg,#f0edff 0%,#f7f5ff 56%,#fff4ed 100%)}
.dash-welcome-copy{position:relative;z-index:1;max-width:660px}
.dash-eyebrow,.dash-section-kicker{display:block;font-size:10px;font-weight:800;letter-spacing:1.4px;color:#7869d8;margin-bottom:8px}
.dash-welcome h2{font-size:clamp(22px,2.4vw,30px);letter-spacing:-.9px;line-height:1.18;margin:0 0 10px;color:#302b50}
.dash-welcome p{font-size:13px;line-height:1.65;color:#77748e;margin:0;max-width:560px}
.dash-welcome-button{margin-top:18px;min-height:44px}
.dash-welcome-art{position:relative;display:grid;place-items:center;flex:0 0 150px;width:150px;height:130px;border-radius:38px;background:#ffffffa8;transform:rotate(-7deg);font-size:43px;box-shadow:0 12px 32px #6556b014}
.dash-welcome-art span:nth-child(2){position:absolute;right:12px;bottom:9px;font-size:27px;transform:rotate(12deg)}
.dash-welcome-art span:nth-child(3){position:absolute;left:8px;top:7px;font-size:22px}
.dash-welcome-compact{min-height:128px}
.dash-date-chip{display:flex;flex-direction:column;gap:5px;flex-shrink:0;padding:14px 17px;border:1px solid #ffffffc9;border-radius:15px;background:#ffffffb8;color:#6256b4}
.dash-date-chip span{font-size:9px;letter-spacing:1.2px;font-weight:800}
.dash-date-chip b{font-size:14px}
.dash-onboarding{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:16px}
.dash-onboarding>div{padding:20px;border:1px solid #eeedf4;border-radius:17px;background:#fff}
.onboarding-icon{display:grid;place-items:center;width:42px;height:42px;margin-bottom:15px;border-radius:14px;font-size:20px}
.onboarding-icon.lilac{background:#f0edff}.onboarding-icon.mint{background:#e5f7ee}.onboarding-icon.peach{background:#fff0e6}
.dash-onboarding b{display:block;font-size:13px;color:#333344}
.dash-onboarding p{font-size:12px;line-height:1.55;color:#898b96;margin:7px 0 0}
.dash-quick-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 18px}
.dash-action{display:grid;grid-template-columns:38px minmax(0,1fr);grid-template-rows:auto auto;column-gap:11px;align-items:center;text-align:left;min-width:0;padding:15px 14px;border:1px solid transparent;border-radius:17px;transition:transform .15s,box-shadow .15s;min-height:78px}
.dash-action:hover{transform:translateY(-2px);box-shadow:0 7px 18px #292b310b}
.dash-action>span{grid-row:1/3;display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#ffffffb8;font-size:19px}
.dash-action b{font-size:12px;line-height:1.35;color:#38364a}
.dash-action small{font-size:10px;line-height:1.4;color:#79798b;margin-top:3px}
.action-lilac{background:#f0edff;border-color:#e7e2ff}.action-mint{background:#e7f7ef;border-color:#d9f0e5}.action-peach{background:#fff0e7;border-color:#ffe6d7}.action-blue{background:#eaf3ff;border-color:#dceaff}
.dash-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}
.dash-stat{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0;min-height:145px;padding:17px 18px;border:1px solid transparent;border-radius:18px;text-align:left;overflow:hidden;transition:transform .15s,box-shadow .15s}
.dash-stat:hover{transform:translateY(-2px);box-shadow:0 7px 18px #292b310b}
.dash-stat-icon{display:grid;place-items:center;width:35px;height:35px;border-radius:12px;background:#ffffffa8;font-size:17px;margin-bottom:3px}
.dash-stat-label{font-size:11px;line-height:1.4;color:#6f7080}
.dash-stat strong{font-size:clamp(21px,2.2vw,28px);line-height:1.1;letter-spacing:-.8px;color:#333244;overflow-wrap:anywhere}
.dash-stat small{font-size:10px;color:#7d7d8c;line-height:1.4}
.stat-lilac{background:#f0edff;border-color:#e6e1ff}.stat-mint{background:#e7f7ef;border-color:#d9f0e5}.stat-peach{background:#fff0e7;border-color:#ffe6d7}.stat-blue{background:#eaf3ff;border-color:#dceaff}
.dash-main-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(290px,.9fr);gap:16px;margin-bottom:28px}
.dash-panel{min-width:0;padding:21px;border:1px solid #eeedf4;border-radius:19px;background:#fff;box-shadow:0 3px 14px #292b3105}
.dash-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:13px}
.dash-section-kicker{font-size:9px;letter-spacing:1.2px;color:#9a91c9;margin-bottom:5px}
.dash-section-head h3{font-size:17px;letter-spacing:-.35px;margin:0;color:#343443}
.dash-lesson{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #f0eff5;min-width:0}
.dash-lesson:last-child{border-bottom:0}
.dash-lesson-date{display:flex;flex-direction:column;gap:4px;flex:0 0 63px}
.dash-lesson-date b{font-size:14px;color:#6558c2}
.dash-lesson-date span{font-size:10px;color:#9999a7}
.dash-lesson-main{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.dash-lesson-main strong{font-size:12px;color:#393947;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dash-lesson-main span{font-size:10px;color:#9293a0}
.dash-lesson-state{padding:5px 7px;border-radius:8px;font-size:9px;white-space:nowrap}
.dash-lesson-state.planned{background:#f0edff;color:#6859c4}.dash-lesson-state.done{background:#e7f7ef;color:#358361}
.dash-open{display:grid;place-items:center;flex:0 0 30px;height:32px;border-radius:10px;background:#f7f6fc;color:#7e78a4;font-size:22px}
.dash-attention{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid #f0eff5}
.dash-attention:last-of-type{border-bottom:0}
.dash-attention-avatar{display:grid;place-items:center;flex:0 0 38px;height:38px;border-radius:13px;background:#fff0e7;color:#a86642;font-size:14px;font-weight:800}
.dash-attention-copy{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.dash-attention-copy strong{font-size:12px;color:#393947;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dash-attention-copy small{font-size:10px;color:#99909a}
.dash-renew{min-height:34px;padding:7px 10px;border-radius:9px;background:#f0edff;color:#6657c3;font-size:10px;font-weight:700;white-space:nowrap}
.dash-money-note{display:flex;gap:10px;margin-top:16px;padding:13px;border-radius:13px;background:#f7f6ff}
.dash-money-note>span{font-size:18px}
.dash-money-note b{font-size:11px;color:#4e486d}
.dash-money-note p{font-size:11px;line-height:1.7;color:#838295;margin:5px 0 0}
.dash-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:28px 15px;text-align:center;border-radius:14px;background:#faf9ff}
.dash-empty>span{font-size:25px}
.dash-empty b{font-size:12px;color:#55546b}
.dash-empty p{font-size:11px;line-height:1.5;color:#9292a0;margin:0 0 5px}
.dash-empty .secondary{min-height:40px}
.dash-empty-small{padding:23px 12px;background:#f3fbf6}
.dash-quick-actions button,.dash-stats button,.dash-open,.dash-renew{cursor:pointer}
@media(max-width:1100px){.dash-quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.dash-main-grid{grid-template-columns:minmax(0,1.15fr) minmax(270px,.85fr)}.dash-stat{padding:15px}.dash-stat strong{font-size:23px}}
@media(max-width:800px){.dash-main-grid{grid-template-columns:1fr}.dash-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.dash-date-chip{align-self:flex-start}.dash-welcome{padding:23px}.dash-welcome-art{flex-basis:110px;width:110px;height:105px;font-size:34px}}
@media(max-width:560px){
  .dash-welcome{margin:14px 0;padding:20px;border-radius:18px;gap:10px}
  .dash-welcome h2{font-size:23px;letter-spacing:-.6px}
  .dash-welcome p{font-size:12px}
  .dash-welcome-art{display:none}
  .dash-welcome-compact{align-items:flex-start;flex-direction:column;gap:14px}
  .dash-date-chip{padding:9px 12px;flex-direction:row;align-items:center;gap:9px}
  .dash-date-chip span{font-size:8px}
  .dash-date-chip b{font-size:12px}
  .dash-quick-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:13px}
  .dash-action{grid-template-columns:32px minmax(0,1fr);column-gap:8px;padding:12px 10px;min-height:83px;border-radius:14px}
  .dash-action>span{width:32px;height:32px;font-size:16px;border-radius:10px}
  .dash-action b{font-size:11px}
  .dash-action small{font-size:9px}
  .dash-stats{gap:8px;margin-bottom:13px}
  .dash-stat{min-height:130px;padding:13px;border-radius:15px;gap:5px}
  .dash-stat-icon{width:31px;height:31px;font-size:15px;border-radius:10px}
  .dash-stat-label{font-size:10px}
  .dash-stat strong{font-size:21px;letter-spacing:-.5px}
  .dash-stat small{font-size:9px}
  .dash-panel{padding:15px;border-radius:17px}
  .dash-section-head h3{font-size:15px}
  .dash-section-head .link-btn{font-size:10px;white-space:nowrap}
  .dash-lesson{gap:8px;padding:11px 0}
  .dash-lesson-date{flex-basis:52px}
  .dash-lesson-date b{font-size:13px}
  .dash-lesson-date span{font-size:9px}
  .dash-lesson-state{font-size:8px;padding:5px 6px}
  .dash-open{flex-basis:28px;height:32px}
  .dash-attention{gap:8px}
  .dash-attention-avatar{flex-basis:33px;height:33px}
  .dash-renew{padding:7px 8px;font-size:9px}
  .dash-onboarding{grid-template-columns:1fr;gap:9px}
  .dash-onboarding>div{display:grid;grid-template-columns:42px 1fr;column-gap:12px;padding:14px}
  .onboarding-icon{grid-row:1/3;margin:0}
  .dash-onboarding b{align-self:end}
  .dash-onboarding p{margin-top:4px}
}
@media(prefers-reduced-motion:reduce){.dash-action,.dash-stat{transition:none}.dash-action:hover,.dash-stat:hover{transform:none}}


/* Phases 2–4: finance controls, richer student profile, and in-app reminders */
.client-profile-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:4px 0 12px}
.client-profile-stat{display:flex;flex-direction:column;gap:7px;min-width:0;padding:13px;border:1px solid #eeeafc;border-radius:13px;background:#f7f5ff}
.client-profile-stat:nth-child(2){background:#fff6ef;border-color:#f9e8dc}
.client-profile-stat:nth-child(3){background:#eef9f3;border-color:#dcefe4}
.client-profile-stat small,.client-profile-next small,.client-profile-sub small{font-size:10px;color:#858497}
.client-profile-stat strong{font-size:clamp(12px,2vw,17px);overflow-wrap:anywhere;color:#38354e}
.client-profile-next,.client-profile-sub{display:flex;align-items:center;gap:11px;padding:13px;margin:10px 0;border:1px solid #efedf6;border-radius:13px;background:#fff}
.client-profile-next>span{display:grid;place-items:center;width:38px;height:38px;flex:0 0 38px;border-radius:12px;background:#eaf3ff;font-size:18px}
.client-profile-next>div,.client-profile-sub>div{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}
.client-profile-next strong,.client-profile-sub strong{font-size:12px;color:#414052}
.client-profile-next .link-btn{white-space:nowrap}
.client-profile-sub{align-items:center;background:#f7fbf8;border-color:#e0f0e6}
.client-profile-sub>div span{font-size:10px;line-height:1.5;color:#7e8a82}
.client-profile-sub .secondary{white-space:nowrap;padding:9px 11px;font-size:10px}
.client-history{margin-top:15px}
.client-history h3{font-size:13px;margin:18px 0 8px;color:#4a4860}
.dash-bottom-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(290px,.9fr);gap:16px;margin:0 0 28px}
.dash-chart{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;align-items:end;padding:15px 0 7px}
.dash-chart-col{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;height:150px}
.dash-chart-col>strong{font-size:9px;font-weight:600;color:#858197;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.dash-chart-track{display:flex;align-items:flex-end;justify-content:center;width:100%;height:95px;border-radius:9px;background:#f4f2fc;overflow:hidden}
.dash-chart-track span{display:block;width:65%;min-height:3px;border-radius:7px 7px 3px 3px;background:linear-gradient(180deg,#a99df5,#7968dc);transition:height .2s}
.dash-chart-col small{font-size:10px;color:#8a8999;text-transform:capitalize}
.dash-analytics-foot{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;padding-top:13px;border-top:1px solid #f0eff5;font-size:10px;color:#888798}
.dash-analytics-foot b{color:#514a7a}
.dash-task{display:flex;align-items:center;gap:10px;width:100%;padding:12px 0;text-align:left;background:transparent;border-bottom:1px solid #f0eff5}
.dash-task:last-of-type{border-bottom:0}
.dash-task-icon{display:grid;place-items:center;width:37px;height:37px;flex:0 0 37px;border-radius:12px;font-size:16px;font-weight:800}
.task-peach{background:#fff0e7;color:#b8754c}.task-lilac{background:#f0edff;color:#7464ce}.task-mint{background:#e6f7ed;color:#398c66}
.dash-task>span:nth-child(2){display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}
.dash-task b{font-size:11px;color:#454357}
.dash-task small{font-size:10px;line-height:1.4;color:#9291a0}
.dash-task-count{display:grid;place-items:center;min-width:26px;height:26px;padding:0 6px;border-radius:9px;background:#f4f2fc;color:#6659ba;font-size:10px;font-weight:800}
.dash-task-note{margin-top:13px;padding:11px;border-radius:11px;background:#faf8ff;color:#89869b;font-size:10px;line-height:1.5}
@media(max-width:900px){.dash-bottom-grid{grid-template-columns:1fr}}
@media(max-width:560px){
  .client-profile-summary{gap:6px}
  .client-profile-stat{padding:10px 8px;gap:6px}
  .client-profile-stat small{font-size:9px}
  .client-profile-stat strong{font-size:12px}
  .client-profile-next,.client-profile-sub{gap:8px;padding:10px}
  .client-profile-next>span{width:32px;height:32px;flex-basis:32px}
  .client-profile-next strong,.client-profile-sub strong{font-size:11px}
  .client-profile-next .link-btn,.client-profile-sub .secondary{font-size:9px;padding:8px}
  .dash-bottom-grid{gap:12px}
  .dash-chart{gap:5px;padding-top:12px}
  .dash-chart-col{height:135px;gap:7px}
  .dash-chart-track{height:82px}
  .dash-chart-col>strong{font-size:8px}
  .dash-chart-col small{font-size:9px}
  .dash-analytics-foot{font-size:9px}
}

/* Authentication form and narrow-screen overflow hardening */
.auth-gate{overflow-y:auto;overscroll-behavior:contain;align-items:safe center}
.auth-card{max-width:100%;min-width:0;overflow-wrap:anywhere}
.auth-card .form{min-width:0}
.auth-card .form label{margin-bottom:-6px}
.auth-password-wrap{position:relative;min-width:0}
.auth-password-wrap input{width:100%;min-width:0;padding:11px 85px 11px 11px;border:1px solid #deded8;border-radius:9px;background:#fff;outline:none}
.auth-password-wrap input:focus{border-color:#a59aef;box-shadow:0 0 0 3px #7768dc14}
.password-toggle{position:absolute;right:6px;top:50%;transform:translateY(-50%);padding:7px 9px;border-radius:7px;background:transparent;color:#6254c7;font-size:11px}
.auth-hint{font-size:11px;line-height:1.5;color:#7e7f8e}
.auth-error:empty{display:none}
.auth-tools button:disabled{opacity:.5;cursor:not-allowed}
#app,.main,#content,.panel,.setting,.dash-panel{min-width:0}
.topbar{gap:12px}
.topbar>div:first-child{min-width:0}
.top-actions{min-width:0}
.modal-backdrop{z-index:500;padding:12px}
.modal{max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;min-width:0}
.modal-head{gap:10px}
.modal-head h2{min-width:0;overflow-wrap:anywhere}
.form input,.form select,.form textarea{min-width:0;max-width:100%}
.dash-welcome-copy,.dash-main-grid>*,.dash-bottom-grid>*,.settings-grid>*{min-width:0}
@media(max-width:560px){
 .auth-gate{padding:12px;place-items:safe center}
 .auth-card{padding:22px 17px;border-radius:19px}
 .auth-brand{margin-bottom:21px}
 .topbar{min-width:0}
 .topbar h1{font-size:clamp(19px,5vw,25px);overflow-wrap:anywhere}
 #cloudStatusGlobal{max-width:min(112px,29vw)}
 .client-profile-next,.client-profile-sub{flex-wrap:wrap}
 .client-profile-next>div,.client-profile-sub>div{flex-basis:calc(100% - 50px)}
 .client-profile-sub>.secondary,.client-profile-next>.link-btn{margin-left:auto}
}
@media(max-width:360px){
 .auth-gate{padding:8px}
 .auth-card{padding:18px 13px}
 .top-actions{gap:4px}
 .topbar{gap:6px}
 .sidebar nav button span{font-size:8px}
 .dash-quick-actions{gap:6px}
}

/* Calendar planning controls, day mode and drag/drop */
.calendar-filters{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:0 0 14px}
.calendar-filters label{display:flex;flex-direction:column;gap:6px;min-width:165px;font-size:11px;font-weight:600;color:#79788c}
.calendar-filters select,.calendar-filters input{width:100%;max-width:100%;min-height:38px;padding:8px 11px;background:#fff;border:1px solid #e9e7f0;border-radius:10px;color:#47445a;font-size:12px}
.calendar-view-switch{display:flex;gap:3px;padding:3px;border:1px solid #e9e7f0;background:#fff;border-radius:11px}
.calendar-view-switch button{padding:8px 14px;border-radius:8px;background:transparent;color:#77768b;font-size:12px}
.calendar-view-switch button.active{background:#eeeafd;color:#5f51bc;font-weight:700}
.calendar-day-head{cursor:pointer;font-family:inherit;color:inherit;border-radius:0}
.calendar-day-head:hover{background:#f8f6ff}
.calendar-grid-day{grid-template-columns:55px minmax(245px,1fr);min-width:0}
.calendar-grid-day .calendar-event{max-width:460px}
.calendar-event[draggable="true"]{cursor:grab}
.calendar-event.dragging{opacity:.4;cursor:grabbing}
.calendar-cell.drop-target{background:#ebe7ff!important;outline:2px dashed #8273ed;outline-offset:-2px}
.calendar-cell{min-width:0}
.calendar-event{position:relative}
.calendar-footnote{line-height:1.6}
@media(max-width:700px){
 .calendar-filters{gap:8px}
 .calendar-filters label{flex:1 1 145px;min-width:0}
 .calendar-view-switch{width:100%;justify-content:stretch}
 .calendar-view-switch button{flex:1}
 .calendar-grid-day{min-width:0}
 .calendar-grid-day .calendar-event{max-width:none}
}
@media(max-width:400px){.calendar-grid-day{grid-template-columns:45px minmax(0,1fr)}.calendar-grid-day .calendar-event{min-height:48px}}

/* Quarter-hour planner: exact 00/15/30/45 targets */
.calendar-grid .calendar-hour{height:43px;padding:8px 6px 0 0}
.calendar-grid .calendar-cell{height:43px;padding:2px;overflow:visible}
.calendar-quarter-label{font-size:10px;color:#aaa6bc;background:#fcfbff}
.calendar-grid .calendar-cell:nth-child(even){border-bottom-color:#f0eff7}
.calendar-grid .calendar-event{min-height:37px;max-height:40px;padding:3px 5px;gap:1px;margin:0;z-index:1;border-radius:6px}
.calendar-grid .calendar-event .event-time{font-size:9px}
.calendar-grid .calendar-event strong{font-size:10px}
.calendar-grid .calendar-event small{display:none}
.calendar-grid .calendar-cell.drop-target{position:relative;z-index:5}
.calendar-grid .calendar-cell.drop-target:after{content:'Перенести сюда';position:absolute;z-index:8;left:2px;right:2px;bottom:1px;font-size:9px;color:#6759c8;background:#f5f2ff;text-align:center;pointer-events:none}
@media(max-width:560px){.calendar-grid .calendar-event strong{font-size:9px}.calendar-grid .calendar-hour{padding-right:3px}.calendar-grid .calendar-cell{padding:1px}}

/* Subscription and finance dashboards */
.finance-cards{margin-top:19px;grid-template-columns:repeat(4,minmax(0,1fr))}
.finance-cards .stat{min-width:0}
.finance-cards .value{font-size:clamp(18px,2vw,25px);overflow-wrap:anywhere}
.finance-filters{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:18px}
.finance-filters .search{flex:1 1 260px;max-width:480px}
.finance-filters select{min-height:39px;padding:9px 12px;background:#fff;border:1px solid #e8e6f0;border-radius:10px;font-size:12px;color:#535366}
.finance-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.finance-actions .link-btn{padding:6px 3px;white-space:nowrap}
.finance-filters + .table-wrap{margin-top:14px}
#paymentRows tr[hidden]{display:none}
@media(max-width:950px){.finance-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.finance-cards{gap:8px}.finance-cards .stat{padding:13px}.finance-cards .value{font-size:20px}.finance-filters{align-items:stretch;flex-direction:column}.finance-filters .search,.finance-filters select{width:100%;max-width:100%;flex-basis:auto}.finance-actions button{max-width:100%}}

/* Student workspace: overview, homework, private lesson notes and history */
.modal-backdrop.student-modal .modal{width:min(920px,100%);max-height:min(92dvh,960px)}
.student-profile{min-width:0}
.student-tabs{display:flex;gap:6px;overflow-x:auto;padding:2px 0 12px;margin:0 0 15px;border-bottom:1px solid #eeedf4;scrollbar-width:thin}
.student-tabs button{flex:0 0 auto;padding:9px 12px;background:transparent;color:#797589;border-radius:10px;font-size:12px;font-weight:600;white-space:nowrap}
.student-tabs button.active{background:#f0edff;color:#6051c5}
.student-pane{min-width:0}
.student-overview-grid{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);gap:16px;align-items:start}
.student-section{padding:17px;border:1px solid #eeedf5;border-radius:15px;background:#fff;min-width:0}
.student-section h3{font-size:14px;margin:4px 0 12px}
.student-section h3:not(:first-child){margin-top:23px}
.student-section p{font-size:12px;line-height:1.6;color:#7c7c8a;overflow-wrap:anywhere}
.student-section .form textarea{min-height:76px}
.student-profile .client-profile-summary{margin-bottom:16px}
.student-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px;flex-wrap:wrap}
.student-section-head p{flex:1 1 260px;max-width:620px;line-height:1.5}
.student-records{display:grid;gap:12px}
.student-record{padding:16px 17px;border:1px solid #eae8f3;border-radius:14px;background:#fff;min-width:0}
.student-record-head{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:10px}
.student-record-head strong{font-size:14px;overflow-wrap:anywhere;min-width:0}
.student-record>p{font-size:12px;color:#5d5d6e;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;margin:11px 0}
.student-record-meta{font-size:11px;line-height:1.6;color:#88849a;overflow-wrap:anywhere}
.student-record-meta a,.student-contact-link{color:#6555ca}
.student-record-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.student-record-actions button{font-size:11px}
.student-empty{background:#f7f6fc;color:#88849a;padding:28px;border-radius:14px;text-align:center;font-size:12px;line-height:1.6}
.student-profile-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:19px;border-top:1px solid #eeeef5;padding-top:14px}
.student-contact-link{display:inline-flex;margin-top:10px;font-size:12px;text-decoration:none;overflow-wrap:anywhere}
.student-profile .history-row span{min-width:0;overflow-wrap:anywhere}
@media(max-width:720px){
 .student-overview-grid{grid-template-columns:1fr}
 .modal-backdrop.student-modal .modal{width:100%;max-height:calc(100dvh - 20px);padding:16px}
 .student-section{padding:12px}
 .student-profile-footer{flex-wrap:wrap}
 .student-record{padding:13px}
 .student-tabs{margin-bottom:10px}
 .student-tabs button{padding:9px 10px;font-size:11px}
}
@media(max-width:400px){.student-profile .client-profile-stat{padding:8px 6px}.student-profile .client-profile-stat small{font-size:9px}.student-record-actions button{flex:1 1 42%}}

/* Calm hourly calendar: one visible row per hour, quarter-hour precision by pointer */
.calendar-grid .calendar-hour{height:84px;padding:10px 7px 0 0;font-size:11px;background:#fff}
.calendar-grid .calendar-cell{height:84px;min-height:84px;position:relative;padding:0;overflow:hidden;cursor:crosshair;background-image:linear-gradient(to bottom,transparent calc(50% - .5px),#efedf6 50%,transparent calc(50% + .5px));}
.calendar-grid .calendar-cell:hover{background-color:#fdfcff}
.calendar-grid .calendar-cell.drop-target{outline:0;background-color:#fdfcff!important;z-index:4}
.calendar-grid .calendar-cell:has(.calendar-event){overflow:hidden}
.calendar-grid .calendar-event{position:absolute;left:4px;right:4px;width:calc(100% - 8px);height:24px;min-height:24px;max-height:24px;margin:0;padding:3px 7px;border-radius:6px;gap:1px;z-index:2}
.calendar-grid .calendar-event strong{font-size:10px;line-height:1.15;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.calendar-grid .calendar-event .event-time{font-size:9px;line-height:1.1;white-space:nowrap}
.calendar-grid .calendar-event small{display:none}
.calendar-grid .calendar-cell.drop-target:before{content:'';position:absolute;left:0;right:0;top:var(--calendar-target-offset,0%);height:25%;background:rgba(119,104,220,.14);border-top:2px solid #7768dc;pointer-events:none;z-index:3}
.calendar-grid .calendar-cell.drop-target:after{content:attr(data-target-time);position:absolute;right:4px;top:var(--calendar-target-offset,0%);padding:3px 6px;border-radius:5px;background:#6457bf;color:white;font-size:10px;font-weight:700;pointer-events:none;z-index:4;left:auto;bottom:auto}
.calendar-grid .calendar-cell:not(.drop-target):hover:after{content:attr(data-target-time);position:absolute;right:4px;top:var(--calendar-target-offset,0%);padding:3px 6px;border-radius:5px;background:#f0edff;color:#5d4cc0;font-size:10px;font-weight:700;pointer-events:none;z-index:3}
.calendar-grid .calendar-day-head{height:66px}
@media(max-width:560px){
 .calendar-grid .calendar-hour{height:76px;font-size:10px;padding-right:3px}
 .calendar-grid .calendar-cell{height:76px;min-height:76px}
 .calendar-grid .calendar-event{left:2px;right:2px;width:calc(100% - 4px);padding:2px 4px;height:23px;min-height:23px;max-height:23px}
}

/* TeacherPro visual refresh — six accessible, calm dashboard moods */
:root{
 --app-bg:#f8f8fc;--app-bg2:#f2f0ff;--surface:#fff;--surface-raised:#fff;--ink:#292b31;
 --muted:#888b99;--line:#eceaf3;--accent:#7768dc;--accent-deep:#6051bb;--accent-soft:#f0edff;
 --shade:#7d68db19;--welcome-from:#f0edff;--welcome-to:#fff3eb;--card-shadow:0 10px 35px #45405e0a;
 color-scheme:light
}
body[data-theme="lavender"]{--app-bg:#f8f8fc;--app-bg2:#f2f0ff;--accent:#7768dc;--accent-deep:#6051bb;--accent-soft:#f0edff;--welcome-from:#f0edff;--welcome-to:#fff3eb}
body[data-theme="sage"]{--app-bg:#f6faf7;--app-bg2:#eaf4ec;--accent:#568d75;--accent-deep:#3c7158;--accent-soft:#e5f3e9;--welcome-from:#e5f3e9;--welcome-to:#f5f8e8;--shade:#568d7519}
body[data-theme="peach"]{--app-bg:#fffaf6;--app-bg2:#ffebde;--accent:#c77f60;--accent-deep:#aa6347;--accent-soft:#fff0e7;--welcome-from:#fff0e6;--welcome-to:#fff9ee;--shade:#c77f601a}
body[data-theme="ocean"]{--app-bg:#f5f9ff;--app-bg2:#e7f1ff;--accent:#5689bc;--accent-deep:#376d9e;--accent-soft:#e8f2fe;--welcome-from:#e9f3ff;--welcome-to:#f2f9fc;--shade:#5689bc16}
body[data-theme="sand"]{--app-bg:#faf9f5;--app-bg2:#f0ede4;--accent:#96816c;--accent-deep:#76634e;--accent-soft:#f0eae0;--welcome-from:#f3eee2;--welcome-to:#fbf5e9;--shade:#96816c1b}
body[data-theme="night"]{
 --app-bg:#1c1f30;--app-bg2:#282e45;--surface:#292e43;--surface-raised:#323750;
 --ink:#f1effa;--muted:#b0b5cc;--line:#444963;--accent:#a99bf9;--accent-deep:#cbc3ff;--accent-soft:#3d3c65;
 --shade:#a99bf922;--welcome-from:#373654;--welcome-to:#333d4f;--card-shadow:0 12px 32px #0d10223a;color-scheme:dark
}
body{background:radial-gradient(ellipse 70% 36% at 98% -10%,var(--app-bg2) 0%,transparent 100%),var(--app-bg);color:var(--ink);transition:background-color .22s,color .22s}
.sidebar,.panel,.setting,.stat,.dash-panel,.auth-card,.modal,.table-wrap,.calendar-shell,.calendar-cell,.calendar-hour,.calendar-day-head,.calendar-corner,.client-profile-next,.client-profile-sub,.student-section,.student-record,.calendar-view-switch{background-color:var(--surface);border-color:var(--line);color:var(--ink)}
.sidebar{box-shadow:9px 0 32px #292b3105}
.sidebar .brand{color:var(--ink)}
.brand-mark{background:linear-gradient(145deg,var(--accent),var(--accent-deep));box-shadow:0 7px 19px var(--shade)}
.sidebar button{color:var(--muted)}
.sidebar button:hover,.sidebar button.active{background:var(--accent-soft);color:var(--accent-deep)}
.nav-glyph{font-size:19px;display:inline-grid;place-items:center;min-width:22px;line-height:1;font-weight:600}
.main{max-width:1900px}
.topbar{border-bottom-color:var(--line)}
.topbar h1,.dash-section-head h3,.dash-welcome h2,.settings-intro h2,.student-section h3,.setting h3,.panel h3{color:var(--ink)}
.primary,.icon-btn{background:var(--accent);box-shadow:0 6px 16px var(--shade)}
.primary:hover{background:var(--accent-deep)}
.secondary,.calendar-today,.calendar-arrow,.calendar-head button,.search,.form input,.form textarea,.form select,.auth-password-wrap input,.calendar-filters input,.calendar-filters select,.finance-filters select{background:var(--surface-raised);border-color:var(--line);color:var(--ink)}
.secondary:hover,.calendar-today:hover,.calendar-arrow:hover{border-color:var(--accent);color:var(--accent-deep);background:var(--accent-soft)}
.dash-welcome{background:linear-gradient(125deg,var(--welcome-from),var(--welcome-to));border-color:var(--line)}
.dash-welcome h2,.dash-welcome p{color:var(--ink)}
.dash-eyebrow,.dash-section-kicker,.calendar-kicker,.calendar-range,.calendar-event .event-time,.student-contact-link{color:var(--accent-deep)}
.dash-date-chip{background:var(--surface-raised);border-color:var(--line);color:var(--accent-deep)}
.dash-stat,.dash-action,.dash-panel,.setting,.panel,.stat,.table-wrap{box-shadow:var(--card-shadow)}
.dash-stat strong,.dash-stat-label,.dash-stat small,.dash-action b,.dash-action small,.dash-lesson-main strong,.dash-task b,.dash-section-head h3{color:var(--ink)}
.dash-stat .dash-stat-label,.dash-task small,.stat .label,.stat .hint,.muted,.dash-lesson-main span,.settings-intro p{color:var(--muted)}
.calendar-day-head.is-today b{background:var(--accent)}
.calendar-event{background:var(--accent-soft);color:var(--accent-deep);border-left-color:var(--accent)}
.calendar-event .event-time{color:var(--accent-deep)}
.calendar-grid .calendar-cell.drop-target:before{border-color:var(--accent);background:var(--shade)}
.calendar-grid .calendar-cell.drop-target:after{background:var(--accent);color:#fff}
.calendar-grid .calendar-cell:not(.drop-target):hover:after{background:var(--accent-soft);color:var(--accent-deep)}
.cloud-status:not(.error):not(.ok):not(.pending){background:var(--accent-soft);color:var(--accent-deep)}
.calendar-view-switch button.active,.student-tabs button.active{background:var(--accent-soft);color:var(--accent-deep)}
.top-settings-btn{display:none;min-width:40px;height:40px;border-radius:12px;background:var(--surface);border:1px solid var(--line);color:var(--accent-deep);font-size:22px}
.top-settings-btn:hover{background:var(--accent-soft)}
/* Color surfaces stay readable in night mode */
body[data-theme="night"] .sidebar,body[data-theme="night"] .modal{background:#292e43}
body[data-theme="night"] .dash-panel,body[data-theme="night"] .student-section,body[data-theme="night"] .student-record{background:#292e43}
body[data-theme="night"] .dash-welcome-art,body[data-theme="night"] .dash-date-chip{background:#40445b}
body[data-theme="night"] .dash-lesson-state,body[data-theme="night"] .pill,body[data-theme="night"] .status,body[data-theme="night"] .dash-empty,body[data-theme="night"] .student-empty,body[data-theme="night"] .dash-task-note{background:#373c53;color:#e9e6fc}
body[data-theme="night"] .dash-action,body[data-theme="night"] .dash-stat{background:#353b53;border-color:#454a65}
body[data-theme="night"] .dash-chart-track,body[data-theme="night"] .client-profile-stat,body[data-theme="night"] .student-overview-grid .client-profile-next{background:#363b53;border-color:#454a65}
body[data-theme="night"] .dash-section-head h3,body[data-theme="night"] .dash-action b,body[data-theme="night"] .dash-stat strong,body[data-theme="night"] .client-profile-stat strong,body[data-theme="night"] .student-record-head strong,body[data-theme="night"] .person{color:#f1effa}
body[data-theme="night"] .student-record>p,body[data-theme="night"] .student-section p,body[data-theme="night"] .setting p{color:#b3b8cd}
body[data-theme="night"] .calendar-cell,body[data-theme="night"] .calendar-hour{background:#292e43}
body[data-theme="night"] .calendar-cell:hover,body[data-theme="night"] .calendar-cell.is-today{background:#323750}
body[data-theme="night"] .calendar-day-head:hover{background:#363b58}
body[data-theme="night"] .table td,body[data-theme="night"] .table th,body[data-theme="night"] .history-row{border-color:#444963}
/* Appearance picker */
.settings-intro{padding:22px 24px;border-radius:20px;border:1px solid var(--line);margin:22px 0 16px;background:linear-gradient(118deg,var(--welcome-from),var(--welcome-to))}
.settings-eyebrow{font-size:10px;font-weight:800;letter-spacing:1.4px;color:var(--accent-deep)}
.settings-intro h2{font-size:clamp(22px,3vw,31px);margin:7px 0 6px;letter-spacing:-.8px}
.settings-intro p{max-width:610px;font-size:13px;line-height:1.6;margin:0}
.theme-setting{margin-top:0}
.theme-setting-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.theme-setting-head h3{font-size:17px}
.theme-current{font-size:11px;color:var(--accent-deep);background:var(--accent-soft);padding:8px 11px;border-radius:99px}
.theme-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.theme-choice{position:relative;display:flex;flex-direction:column;align-items:stretch;text-align:left;gap:5px;padding:9px;background:var(--surface);border:2px solid var(--line);border-radius:15px;min-width:0;transition:transform .18s,border-color .18s,box-shadow .18s;color:var(--ink)}
.theme-choice:hover{transform:translateY(-2px);border-color:var(--accent);box-shadow:0 12px 24px var(--shade)}
.theme-choice.selected{border-color:var(--accent);box-shadow:0 0 0 3px var(--shade)}
.theme-choice-name{padding:5px 3px 0;font-size:12px;font-weight:700}
.theme-choice small{padding:0 3px 6px;color:var(--muted);font-size:10px}
.theme-choice-check{position:absolute;right:13px;bottom:15px;font-size:15px;font-weight:700;color:var(--accent-deep)}
.theme-preview{height:90px;position:relative;display:block;overflow:hidden;border-radius:10px;background:var(--sample-bg);border:1px solid #0000000a}
.theme-preview-sidebar{position:absolute;left:0;top:0;bottom:0;width:24%;background:var(--sample-side);border-right:1px solid #0000000d}
.theme-preview-paper{position:absolute;top:17px;left:33%;width:48%;height:15px;border-radius:5px;background:var(--sample-paper)}
.theme-preview-card{position:absolute;top:43px;left:33%;width:56%;height:32px;border-radius:7px;background:var(--sample-paper);box-shadow:0 3px 10px #0000000b;border-left:5px solid var(--sample-accent)}
.theme-preview-lavender{--sample-bg:#f2f0ff;--sample-side:#fff;--sample-paper:#fff;--sample-accent:#7768dc}
.theme-preview-sage{--sample-bg:#eaf4ec;--sample-side:#fff;--sample-paper:#fff;--sample-accent:#568d75}
.theme-preview-peach{--sample-bg:#fff0e6;--sample-side:#fffdfb;--sample-paper:#fff;--sample-accent:#c77f60}
.theme-preview-ocean{--sample-bg:#e7f1ff;--sample-side:#fff;--sample-paper:#fff;--sample-accent:#5689bc}
.theme-preview-sand{--sample-bg:#f0ede4;--sample-side:#fffdf8;--sample-paper:#fff;--sample-accent:#96816c}
.theme-preview-night{--sample-bg:#1c1f30;--sample-side:#292e43;--sample-paper:#444963;--sample-accent:#a99bf9}
.theme-save-hint{margin:14px 2px 0;font-size:11px;color:var(--accent-deep)}
.settings-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:13px}
.settings-actions>*{max-width:100%;white-space:normal;text-align:center}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
@media(max-width:1100px){.theme-choices{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Touch-first tablet and small screens */
@media(max-width:900px){
 .sidebar .nav-glyph{font-size:23px;min-width:28px}
 .main{max-width:none}
 .content-grid,.dash-main-grid,.dash-bottom-grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:560px){
 html{scroll-padding-bottom:110px}
 body{font-size:14px}
 .sidebar{bottom:0;z-index:100;background:var(--surface);border-color:var(--line);padding:7px 6px calc(7px + env(safe-area-inset-bottom));box-shadow:0 -10px 28px #292b310b}
 .sidebar nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px}
 .sidebar nav button{padding:8px 1px 7px;min-height:56px;border-radius:12px;font-size:21px;gap:5px}
 .sidebar nav button span.nav-glyph{display:grid!important;min-width:0;font-size:22px}
 .sidebar nav button span:not(.nav-glyph){display:block!important;font-size:clamp(8px,2.15vw,10px);font-weight:600;line-height:1.1;letter-spacing:-.1px;white-space:nowrap}
 #nav button[data-page="settings"]{display:none}
 .top-settings-btn{display:grid;place-items:center;flex-shrink:0}
 .main{padding:0 13px calc(96px + env(safe-area-inset-bottom));min-width:0}
 .topbar{height:auto;min-height:83px;padding:14px 0;align-items:center}
 .topbar h1{font-size:clamp(21px,6vw,27px)}
 .top-actions{gap:7px;flex-shrink:0}
 #cloudStatusGlobal{max-width:105px;max-height:40px;overflow:hidden;text-overflow:ellipsis;padding:6px 7px;font-size:9px}
 .icon-btn{width:40px;height:40px;min-width:40px;box-shadow:none}
 .cards,.dash-stats,.finance-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
 .dash-quick-actions{gap:9px}
 .dash-welcome{padding:21px}
 .toolbar{gap:12px}
 .toolbar .primary,.toolbar .secondary{min-height:43px}
 .settings-intro{margin:16px 0 12px;padding:19px}
 .theme-choices{gap:9px}
 .theme-choice{padding:6px;border-radius:12px}
 .theme-preview{height:76px}
 .theme-choice-name{font-size:11px}
 .theme-choice small{font-size:9px}
 .settings-grid{gap:12px}
 .settings-actions{flex-direction:column;align-items:stretch}
 .settings-actions>*{width:100%;min-height:40px}
 .modal-backdrop{align-items:flex-end;padding:0}
 .modal,.modal-backdrop.student-modal .modal{width:100%;max-width:100%;max-height:93dvh;min-height:0;border-radius:22px 22px 0 0;padding:19px 17px calc(19px + env(safe-area-inset-bottom));box-shadow:0 -15px 55px #21203028}
 .modal-head{position:sticky;top:-19px;z-index:10;background:var(--surface);padding:10px 0 12px;border-bottom:1px solid var(--line)}
 .modal-head button{width:38px;height:38px;flex:0 0 38px}
 .form-actions{flex-wrap:wrap}
 .form-actions button{min-height:42px}
 .table-wrap{margin-top:16px}
 .table th,.table td{padding:12px;font-size:12px}
 .table{min-width:660px}
 .calendar-top{margin-top:15px;gap:11px}
 .calendar-actions{gap:7px}
 .calendar-actions .primary{min-height:38px}
 .calendar-filters{gap:9px}
 .calendar-shell{border-radius:15px}
 .calendar-grid{min-width:790px}
 .calendar-grid-day{min-width:0;grid-template-columns:46px minmax(0,1fr)}
 .calendar-grid .calendar-event{max-width:100%}
 .calendar-footnote{margin-bottom:20px}
 .student-tabs{position:sticky;top:38px;z-index:9;background:var(--surface)}
 .student-overview-grid{grid-template-columns:1fr}
 .student-record-actions{gap:7px}
}
@media(max-width:380px){
 .main{padding-left:10px;padding-right:10px}
 .topbar h1{font-size:20px}
 #cloudStatusGlobal{max-width:75px}
 .theme-preview{height:65px}
 .sidebar nav button span:not(.nav-glyph){font-size:8px}
 .dash-action small{font-size:8px}
 .settings-intro h2{font-size:22px}
}
@media(prefers-reduced-motion:reduce){body,.theme-choice{transition:none}}

/* Tablet icon-only rail and final touch sizing */
@media(min-width:561px) and (max-width:900px){
 .sidebar nav .nav-glyph,.sidebar-bottom .nav-glyph{display:grid!important}
 .sidebar nav button,.sidebar-bottom button{justify-content:center;padding:13px 8px}
 .sidebar .brand{justify-content:center;padding-left:0;padding-right:0}
}
@media(min-width:901px){
 .sidebar .nav-glyph{min-width:24px}
 .sidebar button{min-height:43px}
}
@media(max-width:560px){
 .settings-grid .setting,.theme-setting{border-radius:16px;padding:17px 14px}
 .top-actions>.top-settings-btn{display:grid}
 #nav button[data-page="settings"]{display:none!important}
 .sidebar nav button:focus-visible{outline-offset:-2px}
}

.top-settings-btn.active{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-deep)}
@media(max-width:560px){body[data-theme="night"] .sidebar{background:var(--surface)}}

/* Editorial studio: lightweight textured backgrounds and refined typography */
/* Fonts are loaded from index.html to keep stylesheet imports standards-compliant. */
:root{--editorial-accent:#762f35;--editorial-surface:#fffdf8;--background-texture:none}
body{font-family:Manrope,Inter,system-ui,sans-serif}
body[data-theme="night"]{--editorial-surface:#292e43;--editorial-accent:#d7b0b6}
body[data-background]{background-color:#e8e6df;background-image:var(--background-texture);background-attachment:fixed;background-repeat:repeat;background-size:auto}
body[data-background="plain"]{--background-texture:linear-gradient(135deg,#f9f8f4,#f1f0eb)}
body[data-background="linen"]{--background-texture:repeating-linear-gradient(0deg,#ffffff13 0px,#ffffff13 1px,#82796c09 1px,#82796c09 3px),repeating-linear-gradient(90deg,#ffffff26 0px,#ffffff26 2px,#7769590c 2px,#7769590c 4px),linear-gradient(125deg,#eeeae1,#dad9d0)}
body[data-background="paper"]{--background-texture:radial-gradient(ellipse at 17% 21%,#fffefd9c,transparent 27%),radial-gradient(ellipse at 80% 62%,#b2a99c25,transparent 24%),repeating-linear-gradient(162deg,#fff6 0px,#fff3 2px,#b9b3ab14 3px,#fff0 14px),linear-gradient(135deg,#e9e5da,#f6f2e9)}
body[data-background="marble"]{--background-texture:repeating-linear-gradient(132deg,transparent 0 40px,#999a9630 41px,#ffffff25 43px,transparent 55px,transparent 89px,#93999524 90px,transparent 92px),radial-gradient(ellipse at 25% 35%,#ffffffaa,transparent 50%),linear-gradient(135deg,#d9dad6,#eeeae6)}
body[data-background="grid"]{--background-texture:linear-gradient(#9f9e971c 1px,transparent 1px),linear-gradient(90deg,#9f9e971c 1px,transparent 1px),linear-gradient(#f3f0e9,#faf9f5);background-size:23px 23px,23px 23px,auto}
body[data-background="dots"]{--background-texture:radial-gradient(#9e9b8a47 0.8px,transparent 1px),linear-gradient(132deg,#e2dfd5,#f4f0e8);background-size:15px 15px,auto}
body[data-background="cloud"]{--background-texture:radial-gradient(ellipse at 12% 30%,#fff9 0%,transparent 30%),radial-gradient(ellipse at 84% 70%,#fff9 0%,transparent 30%),radial-gradient(ellipse at 48% 64%,#a3a7a82b 0%,transparent 45%),linear-gradient(140deg,#d6d7d5,#efefeb)}
body[data-background="sage-texture"]{--background-texture:radial-gradient(ellipse at 18% 25%,#e1e8c8 5%,transparent 52%),radial-gradient(ellipse at 75% 70%,#bec7a26c 0%,transparent 56%),linear-gradient(120deg,#ecebe4,#d5d9c4)}
body[data-background="stone"]{--background-texture:radial-gradient(ellipse at 68% 20%,#f1f1ef55,transparent 30%),repeating-linear-gradient(21deg,#787a750c 0px,#787a750c 2px,transparent 3px,transparent 9px),linear-gradient(122deg,#c8c7c0,#e4e2dc)}
body[data-background="blush"]{--background-texture:radial-gradient(ellipse at 25% 21%,#dfc5c28a,transparent 43%),radial-gradient(ellipse at 78% 62%,#dccabb8c,transparent 43%),radial-gradient(ellipse at 55% 90%,#bfc1ba70,transparent 39%),linear-gradient(130deg,#eee9e1,#f5eee7)}
body[data-background="burgundy"]{--background-texture:repeating-linear-gradient(93deg,#00000014 0px,#00000014 2px,#ffffff07 3px,transparent 22px),repeating-linear-gradient(15deg,transparent 0px,transparent 30px,#00000015 31px,#ffffff09 33px),linear-gradient(130deg,#4e141b,#791e23)}
body[data-background="ink"]{--background-texture:repeating-linear-gradient(38deg,#ffffff04 0px,#ffffff04 1px,transparent 2px,transparent 8px),radial-gradient(ellipse at 70% 25%,#51566f66,transparent 52%),linear-gradient(140deg,#25293a,#171b28)}
/* Keep readable paper-like cards independent of desk texture */
body:not([data-theme="night"]) .sidebar,body:not([data-theme="night"]) .dash-panel,body:not([data-theme="night"]) .setting,body:not([data-theme="night"]) .stat,body:not([data-theme="night"]) .table-wrap,body:not([data-theme="night"]) .student-section,body:not([data-theme="night"]) .student-record{background:#fffdfbf7}
body:not([data-theme="night"]) .main .dash-welcome{background:linear-gradient(118deg,#fffdf8,#f6f1e9)}
.dash-welcome h2,.settings-intro h2,.editorial-feature .feature-number,.editorial-feature .feature-currency,.dash-stat strong{font-family:'Playfair Display',Georgia,serif;letter-spacing:-.035em}
.dash-welcome h2{font-weight:500}
.dashboard h3,.dash-panel h3{letter-spacing:-.02em}
.editorial-feature-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:18px 0}
.editorial-feature{position:relative;min-height:190px;display:block;text-align:left;border-radius:25px;padding:25px 28px;border:1px solid #e5ded9;overflow:hidden;box-shadow:0 12px 28px #342c2510;transition:transform .17s ease,box-shadow .17s ease}
.editorial-feature:hover{transform:translateY(-2px);box-shadow:0 17px 32px #342c2516}
.editorial-lessons{background:#fffdf7;color:#692a30}
.editorial-income{color:#fff;background:repeating-linear-gradient(10deg,#00000012 0px,#00000012 2px,transparent 3px,transparent 28px),linear-gradient(130deg,#400e15,#782126)}
.feature-eyebrow{position:relative;z-index:1;display:block;font-size:11px;letter-spacing:1.1px;font-weight:800;text-transform:uppercase}
.feature-number{font-size:75px;line-height:1.12;display:inline-block;margin:12px 5px 1px 0}
.feature-unit{font-family:'Playfair Display',Georgia,serif;font-size:25px;letter-spacing:.01em}
.feature-currency{display:block;font-size:60px;line-height:1.1;margin:23px 0 8px}
.feature-caption{display:block;font-size:12px;opacity:.78}
.birthday-widget{padding:19px 23px;border:1px solid var(--line);background:var(--editorial-surface);border-radius:22px;margin:16px 0;box-shadow:var(--card-shadow);color:var(--ink)}
.birthday-heading{display:flex;align-items:center;gap:10px;margin-bottom:9px}
.birthday-heading>span{display:grid;place-items:center;width:29px;height:29px;border-radius:50%;background:#f4e4df;color:#833c45}
.birthday-heading h3{font-size:15px;letter-spacing:-.2px;margin:0;flex:1}
.birthday-empty{font-size:12px;color:var(--muted);padding:12px 1px;margin:0}
.birthday-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.birthday-entry{min-width:0;display:flex;align-items:center;gap:10px;padding:11px;border-radius:12px;text-align:left;color:var(--ink);background:var(--accent-soft);border:1px solid var(--line)}
.birthday-avatar{width:33px;height:33px;flex:0 0 33px;background:#fff9;border-radius:50%;display:grid;place-items:center;font-weight:800;color:var(--accent-deep)}
.birthday-person{min-width:0;display:flex;flex:1;flex-direction:column;gap:3px}.birthday-person strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.birthday-person small{font-size:10px;color:var(--muted)}
.birthday-when{font-size:10px;font-weight:700;flex-shrink:0;color:var(--accent-deep)}
.background-choices{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.background-choice{min-width:0;position:relative;border:2px solid transparent;border-radius:15px;padding:5px 5px 9px;text-align:left;color:var(--ink);background:transparent}
.background-choice.selected{border-color:var(--editorial-accent);background:var(--accent-soft)}
.background-choice:focus-visible{outline-offset:3px}
.background-thumb{display:block;aspect-ratio:1.55/1;width:100%;border:1px solid #a49a8b33;border-radius:12px;background:#f0eee9;box-shadow:inset 0 1px 4px #342b1610}
.background-choice-name{display:block;padding:7px 2px 0;font-size:11px;font-weight:700;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.background-selected-check{display:grid;place-items:center;position:absolute;top:11px;right:11px;width:23px;height:23px;border-radius:50%;background:var(--editorial-accent);color:#fff;font-size:12px;opacity:0}
.background-choice.selected .background-selected-check{opacity:1}
.background-thumb-plain{background:linear-gradient(130deg,#faf9f5,#edebe4)}
.background-thumb-linen{background:repeating-linear-gradient(0deg,#ffffff33 0px,#ffffff33 1px,#77726818 2px,#fff0 3px),repeating-linear-gradient(90deg,#fff7 0px,#fff7 1px,#87806a18 2px,transparent 3px),#d9d6cd}
.background-thumb-paper{background:repeating-linear-gradient(148deg,#fff7 0px,#9f99891a 2px,transparent 7px,#fff5 13px),linear-gradient(120deg,#eee8db,#f9f7ee)}
.background-thumb-marble{background:repeating-linear-gradient(130deg,transparent 0 17px,#9b9f9b60 19px,transparent 21px,transparent 39px),linear-gradient(130deg,#d0d4d0,#f7f6f4)}
.background-thumb-grid{background:linear-gradient(#8f8a791a 1px,transparent 1px),linear-gradient(90deg,#8f8a791a 1px,transparent 1px),#f6f4ef;background-size:13px 13px}
.background-thumb-dots{background:radial-gradient(#ada18d 1px,transparent 1.5px),#ded9cd;background-size:9px 9px}
.background-thumb-cloud{background:radial-gradient(ellipse at 18% 32%,#fff,transparent 55%),radial-gradient(ellipse at 84% 65%,#fff9,transparent 50%),#c5c7c5}
.background-thumb-sage-texture{background:radial-gradient(ellipse at 30% 30%,#e0e7c6,transparent 57%),radial-gradient(ellipse at 76% 70%,#9ca980a3,transparent 50%),#e6e6d8}
.background-thumb-stone{background:repeating-linear-gradient(20deg,#00000012 0 1px,transparent 2px 8px),#d5d3cb}
.background-thumb-blush{background:radial-gradient(ellipse at 30% 20%,#d7b4b3,transparent 53%),radial-gradient(ellipse at 75% 77%,#dac5af,transparent 43%),#f2ebe5}
.background-thumb-burgundy{background:repeating-linear-gradient(15deg,#0003 0 2px,transparent 3px 15px),#66171d}
.background-thumb-ink{background:repeating-linear-gradient(42deg,#fff1 0 1px,transparent 2px 9px),#252939}
@media(max-width:1100px){.background-choices{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:700px){.background-choices{grid-template-columns:repeat(3,minmax(0,1fr))}.editorial-feature{min-height:145px;padding:19px 21px}.feature-number{font-size:55px}.feature-currency{font-size:42px}}
@media(max-width:560px){.editorial-feature-grid{gap:10px}.editorial-feature{border-radius:17px;min-height:135px;padding:14px}.feature-eyebrow{font-size:9px}.feature-number{font-size:43px}.feature-unit{font-size:17px}.feature-currency{font-size:clamp(22px,6vw,37px)}.feature-caption{font-size:10px}.birthday-widget{border-radius:16px;padding:15px;margin:12px 0}.birthday-items{grid-template-columns:1fr}.background-choices{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.background-choice-name{font-size:10px}.background-thumb{border-radius:9px}}
@media(max-width:360px){.editorial-feature-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.editorial-feature{transition:none}}

/* Warm burgundy accent palette for the editorial desk aesthetic */
body[data-theme="wine"]{--app-bg:#f8f4ef;--app-bg2:#eee2dd;--accent:#792d37;--accent-deep:#60232d;--accent-soft:#f3e6e5;--welcome-from:#f9f2ec;--welcome-to:#fffaf4;--shade:#792d371d;--editorial-accent:#792d37}
.theme-preview-wine{--sample-bg:#f6efeb;--sample-side:#fffaf6;--sample-paper:#fffdfb;--sample-accent:#792d37}
body[data-theme="wine"] .editorial-income{background:repeating-linear-gradient(13deg,#00000016 0 2px,transparent 3px 26px),linear-gradient(130deg,#420c16,#79232b)}

/* Pre-release calendar: compact quarter-hour cards without clipping at :45 */
.calendar-grid .calendar-event{display:flex;flex-direction:row;align-items:center;gap:3px;min-height:18px;max-height:18px;height:18px;padding:2px 4px;overflow:hidden;white-space:nowrap}
.calendar-grid .calendar-event .event-time{flex:0 0 auto;font-size:9px;line-height:1}
.calendar-grid .calendar-event strong{flex:1;min-width:0;font-size:10px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:560px){.calendar-grid .calendar-event{min-height:17px;max-height:17px;height:17px;padding:2px 3px;gap:2px}.calendar-grid .calendar-event strong{font-size:9px}}

/* Post-browser-audit: keep background preset labels legible on 320px screens */
@media(max-width:560px){.background-choice-name{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.25;min-height:2.5em}}

/* Session restoration: show a calm loader instead of flashing the login form. */
/* No modal, splash or auth interstitial on reload. Keep public chrome while verification runs. */
body.teacherpro-loading #content{visibility:hidden}
body.teacherpro-loading #app{pointer-events:none}
body.teacherpro-loading .top-actions .avatar{visibility:hidden}
/* Calendar duration is taken from the lesson model rather than hard-coded to 15 minutes. */
.calendar-grid .calendar-cell{height:84px;min-height:84px;overflow:visible;padding:0}
.calendar-grid .calendar-hour{height:84px;min-height:84px}
.calendar-grid .calendar-event,.calendar-grid .calendar-event[draggable]{position:absolute;left:3px;right:3px;width:calc(100% - 6px);min-height:0;max-height:none;padding:5px 7px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;gap:4px;white-space:normal;overflow:hidden;z-index:3;border-radius:8px;box-shadow:0 2px 5px #17143217}
.calendar-grid .calendar-event .event-time{flex:0 0 auto;font-size:10px;line-height:1.2}
.calendar-grid .calendar-event strong{font-size:11px;line-height:1.25;white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.calendar-grid .calendar-event small{display:block;font-size:10px;line-height:1.2}
.calendar-grid .calendar-cell:hover{z-index:6}
@media(max-width:700px){.calendar-grid .calendar-cell,.calendar-grid .calendar-hour{height:84px;min-height:84px}.calendar-grid .calendar-event{min-height:0;max-height:none;padding:4px 5px;gap:2px}.calendar-grid .calendar-event .event-time{font-size:9px}.calendar-grid .calendar-event strong{font-size:10px}.calendar-grid .calendar-event small{display:none}}
