:root{--navy:#19354b;--green:#126b55;--mint:#e9f5ed;--text:#284b3e;--line:#dfe9e2;--muted:#73877a}*{box-sizing:border-box}html{font-family:-apple-system,BlinkMacSystemFont,"PingFang TC","Noto Sans TC",sans-serif}body{margin:0;background:#f7faf8;color:var(--text);font-size:13px;line-height:1.6}button,input,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #6fbea1;outline-offset:2px}a{color:var(--green)}[hidden]{display:none!important}.topbar{height:70px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:10px max(16px,calc((100vw - 1180px)/2));gap:20px}.brand img{max-width:160px;width:160px;height:46px;object-fit:contain;object-position:left}.top-actions{display:flex;align-items:center;gap:15px}.top-actions a{font-size:12px;font-weight:750;text-decoration:none}main{max-width:1200px;margin:24px auto;padding:0 15px;min-height:75vh}.login-card{margin:75px auto;background:white;border-radius:16px;border:1px solid var(--line);padding:30px;max-width:430px;box-shadow:0 10px 30px #163e2212}.login-card h1{margin:0 0 8px}.login-card p{color:var(--muted);font-size:13px}.login-card label{display:block;margin:20px 0 7px;font-weight:800}.shell{display:grid;grid-template-columns:195px minmax(0,1fr);border:1px solid var(--line);border-radius:15px;overflow:hidden;min-height:570px;background:#f7faf8}.sidebar{background:white;border-right:1px solid var(--line);display:flex;flex-direction:column;padding:20px 12px}.sidebar-title{font-size:10px;letter-spacing:1px;color:#6b9884;font-weight:850;padding:0 10px;margin-bottom:16px}.side-items{display:grid;gap:5px}.side-btn{display:flex;align-items:center;justify-content:space-between;gap:9px;width:100%;text-align:left;border:0;border-radius:9px;background:transparent;color:#557667;padding:12px 10px;font-weight:800}.side-btn.active{background:#e5f3eb;color:#096d56}.new-count{border-radius:100px;background:#ce5e43;color:white;font-size:10px;min-width:20px;padding:2px 6px;text-align:center}.aside-foot{margin-top:auto;border-top:1px solid var(--line);font-size:10px;line-height:1.8;color:#8aa093;padding:16px 10px 0}.content{min-width:0;padding:21px}.view{display:none}.view.active{display:block}.private-tip{background:#fff7e8;border:1px solid #f0dfbc;color:#8b6e39;padding:10px 12px;border-radius:9px;font-size:11px;margin-bottom:20px}.eyebrow{color:#258269;letter-spacing:1.5px;font-size:10px;font-weight:850;margin-bottom:4px}h1{font-size:25px;line-height:1.4;margin:0 0 6px;color:#214539}h2{font-size:16px;margin:20px 0 10px;color:#224739}.lead{font-size:12px;color:var(--muted);margin:0 0 15px;line-height:1.8}.stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:15px 0}.stat{border:1px solid var(--line);border-radius:12px;background:white;padding:15px;text-align:left}.stat .label{font-size:11px;font-weight:800;color:#627c6e}.stat .number{display:block;color:#136f55;font-size:31px;font-weight:900;margin:8px 0;line-height:1.2}.stat .number.red{color:#ca6248}.stat small{display:block;color:#8b9d8f}.list{display:grid;gap:10px}.item{background:white;border:1px solid var(--line);border-radius:12px;padding:15px}.item-head{display:flex;align-items:start;justify-content:space-between;gap:10px}.item-head strong{font-size:13px}.meta{margin:6px 0;color:#75897c;font-size:11px;line-height:1.85;overflow-wrap:anywhere}.item-bottom{border-top:1px solid #edf1ec;margin-top:12px;padding-top:12px;display:flex;gap:10px;justify-content:space-between;align-items:center;flex-wrap:wrap}.tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}.tag{border-radius:100px;background:#e8f4ed;color:#1c7558;font-size:10px;font-weight:850;padding:6px 10px;white-space:nowrap}.tag.warn{background:#fff0d8;color:#976a2c}.tag.grey{background:#f0f2f0;color:#6b7c70}.tag.blue{background:#e8efff;color:#43669c}.unread-dot{display:inline-block;background:#d9694c;border-radius:50%;width:8px;height:8px;margin-right:5px}.btn{background:#eaf5ed;border:1px solid #c3decc;color:var(--green);border-radius:9px;font-weight:800;font-size:11px;padding:9px 12px}.btn.primary{background:var(--green);border-color:var(--green);color:white}.btn.ghost{background:white;border-color:#dce9e0;color:#567364}.btn.wide{display:block;width:100%;margin-top:15px}.btn:disabled{opacity:.4;cursor:not-allowed}.actions{display:flex;flex-wrap:wrap;gap:7px;align-items:center}.toolbar{display:grid;grid-template-columns:1fr 200px;gap:9px;margin:12px 0}.toolbar input,.toolbar select, .login-card input,.modal input,.modal textarea,.modal select{display:block;width:100%;padding:10px 12px;border:1px solid #d4e4da;background:#fff;border-radius:9px;color:#2b493c;min-width:0}.filter-row{display:flex;gap:7px;flex-wrap:wrap;margin:13px 0}.filter-row button{border:1px solid #d7e6dc;background:white;border-radius:99px;padding:8px 12px;font-size:11px;color:#507463;font-weight:850}.filter-row button.active{border-color:var(--green);background:var(--green);color:white}.empty{background:#fff;border:1px dashed #cfddd2;border-radius:11px;padding:25px;text-align:center;color:#789082}.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:120;background:#176e56;color:white;padding:13px 19px;border-radius:12px;box-shadow:0 12px 35px #233a2b33;max-width:min(560px,90vw)}.toast.error{background:#aa4835}.modal-shade{position:fixed;inset:0;background:#17352b9c;z-index:90;display:flex;align-items:center;justify-content:center;padding:18px}.modal{width:min(570px,100%);max-height:90vh;overflow-y:auto;background:white;border-radius:15px;padding:23px;box-shadow:0 18px 52px #061b1155}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding-bottom:11px;margin-bottom:17px}.modal-head h2{margin:0}.detailgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:13px}.detail{background:#f4f8f5;border-radius:9px;padding:10px;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}.detail small{display:block;font-size:10px;color:#788d7e;margin-bottom:4px}.modal label{display:block;margin:13px 0 6px;font-weight:800;font-size:11px;color:#406451}.modal textarea{min-height:84px;resize:vertical}.modal-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:19px}.warning{background:#fff4dd;color:#87652f;border:1px solid #eedeaf;font-size:11px;padding:12px;border-radius:9px;line-height:1.75;margin:12px 0}.info{background:#eef7ef;color:#376d54;border-radius:9px;padding:12px;font-size:11px;margin:12px 0;line-height:1.75}.section-title{font-size:13px;font-weight:850;margin:18px 0 8px}footer{text-align:center;color:#819488;font-size:11px;padding:25px 12px}.nowrap{white-space:nowrap}@media(max-width:670px){.shell{display:block}.sidebar{border-bottom:1px solid var(--line);border-right:0;padding:12px}.side-items{display:flex;flex-wrap:wrap}.side-btn{width:auto;font-size:11px;padding:9px 11px}.sidebar-title,.aside-foot{display:none}.content{padding:13px}.toolbar{grid-template-columns:1fr}.stats{gap:8px}.stat{padding:12px}.stat .number{font-size:26px}.modal{padding:15px}.detailgrid{grid-template-columns:1fr}.topbar{height:auto;min-height:66px}}

/* Admin brand + real-time refresh: public site CSS is not changed. */
.topbar .brand{display:inline-flex;align-items:center;gap:10px;min-width:0;text-decoration:none}
.topbar .brand img{max-width:162px;flex:none}
.brand-admin{display:inline-flex;align-items:center;border-radius:8px;background:#e5f3eb;border:1px solid #d0e6d8;padding:5px 9px;color:#136b53;font-size:13px;font-weight:850;line-height:1.2;white-space:nowrap}
.refresh-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap}
.refresh-icon{height:16px;width:16px;flex:none}
.refresh-btn.is-loading .refresh-icon{animation:tg-admin-refresh-spin .8s linear infinite}
@keyframes tg-admin-refresh-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.refresh-btn.is-loading .refresh-icon{animation:none}}
@media(max-width:670px){
  .topbar{flex-wrap:wrap;justify-content:space-between;row-gap:5px;padding:9px 14px}
  .topbar .brand img{width:131px;max-width:131px;height:36px}
  .brand-admin{font-size:11px;padding:5px 7px}
  .top-actions{gap:8px;flex-wrap:wrap;justify-content:flex-end;margin-left:auto}
  .top-actions a{font-size:11px}
  .refresh-btn{padding:8px 9px}
}


/* V2.4 TutorGoose Admin dashboard redesign — retain original site system font. */
:root{--navy:#19354b;--green:#116c55;--text:#213e34;--line:#e1ebe5;--muted:#71877b}
html{font-family:-apple-system,BlinkMacSystemFont,"PingFang TC","Noto Sans TC",sans-serif}
body{background:#f7fbf9;color:var(--text)}
.topbar{padding:12px 28px;height:76px;background:#fff;box-shadow:0 1px 0 #eff4f0}
.topbar .brand{gap:17px}
.topbar .brand img{height:48px;width:182px;max-width:182px}
.brand-admin,.brand-admin-d{background:none;border:0;border-radius:0;padding:0 0 0 19px;border-left:1px solid #d7e2dc;color:#17334a;font-weight:850;font-size:22px;letter-spacing:-.65px;line-height:1.08;font-family:inherit}
.top-actions{gap:10px}.top-actions a{font-size:12px;margin-right:4px}.top-actions .btn{font-size:12px;padding:10px 13px;background:#fff;border:1px solid #d9e8e0}
main{max-width:none;margin:0;padding:0;min-height:calc(100vh - 130px)}
.login-card{margin:95px auto;max-width:445px}
.shell{grid-template-columns:225px minmax(0,1fr);border:0;border-radius:0;min-height:calc(100vh - 130px);background:linear-gradient(135deg,#f6faf8 0%,#f1f8f5 100%)}
.sidebar{position:relative;overflow:hidden;background:#fff;min-height:670px;padding:24px 16px 15px}
.sidebar-title{display:none}.side-items{gap:8px}.side-btn{justify-content:flex-start;padding:15px 14px;min-height:54px;gap:13px;font-size:14px;font-weight:800;color:#405e53}
.side-btn.active{background:#e5f4ed;color:#0b7157}.side-btn:hover:not(.active){background:#f2f7f4}
.nav-icon{width:22px;height:22px;flex:none;display:inline-flex}.nav-icon svg{width:100%;height:100%}
.side-btn .new-count{margin-left:auto;background:#d75d46;min-width:21px;font-size:11px}
.sidebar-decoration{position:absolute;bottom:65px;left:0;width:100%;height:125px;pointer-events:none;overflow:hidden}
.sidebar-decoration .leaf-one,.sidebar-decoration .leaf-two{position:absolute;width:180px;height:145px;bottom:-72px;left:-59px;border-radius:70% 90% 10% 20%;background:#d9eee3;transform:rotate(22deg)}
.sidebar-decoration .leaf-two{left:50px;bottom:-112px;background:#badcc9;transform:rotate(-18deg)}
.sidebar-decoration .spark-one,.sidebar-decoration .spark-two{position:absolute;width:10px;height:36px;left:157px;top:23px;transform:rotate(28deg);border-radius:12px;background:#ffcf79}
.sidebar-decoration .spark-two{top:48px;left:184px;transform:rotate(65deg)}
.aside-foot{z-index:1;position:relative;margin-top:auto;border-top:1px solid #e9efeb;color:#8a9c92;font-size:11px;padding:16px 10px 0}
.content{padding:27px 29px;max-width:1600px;width:100%;margin:0 auto}
.private-tip{display:flex;align-items:center;gap:12px;position:relative;background:#fff9ef;border:1px solid #ffe2aa;color:#80653e;padding:13px 14px;margin-bottom:26px;font-size:12px;border-radius:9px}
.private-tip strong{font-weight:850;color:#694e2c}.notice-icon{width:24px;height:24px;color:#efa331;flex:none}.notice-icon svg{width:100%;height:100%}
.tip-close{margin-left:auto;background:none;border:0;color:#9a7c51;font-size:21px;line-height:1;padding:5px 8px;border-radius:6px}
.tip-close:hover{background:#f9e9d1}
h1{font-size:29px;letter-spacing:-.5px;font-weight:900;color:#173b34}h2{color:#193f35}.eyebrow{font-size:11px;font-weight:900;letter-spacing:2px;color:#0c8068}
.overview-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:2px 0 19px}.overview-heading h1{font-size:32px;margin:8px 0 5px}.overview-heading .lead{margin:0}.overview-heading-actions{display:flex;align-items:center;gap:15px;flex-wrap:wrap}.updated-at{color:#87988e;font-size:11px;white-space:nowrap}
.overview-heading-actions .btn{font-size:12px;padding:11px 15px;border:1px solid #7ba99b;color:#0a755e;background:#f8fcfa}
.stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin:22px 0 20px}
.stat{border:1px solid #dce9e2;border-radius:13px;padding:20px 17px 17px;box-shadow:0 5px 20px #234b3c06;display:flex;flex-direction:column;align-items:stretch;min-height:174px;transition:transform .15s,box-shadow .15s;text-align:center}
.stat:hover{transform:translateY(-2px);box-shadow:0 10px 28px #234b3c12}
.stat .stat-top{display:flex;gap:11px;align-items:center;text-align:left}
.stat .stat-icon{display:grid;place-items:center;width:46px;height:46px;flex:none;border-radius:50%;background:#e7f5ed;color:#138168}.stat .stat-icon svg{width:23px;height:23px}
.stat .label{font-size:12px;color:#455f52;font-weight:850}
.stat .number{font-size:39px;margin:6px 0 10px;color:#046c54;line-height:1.1}
.stat .stat-action{font-size:11px;font-weight:850;color:#0e765e;margin-top:auto}
.stat .stat-action span{font-size:17px;padding-left:5px}
.stat.metric-coral .stat-icon{background:#fae8e3;color:#d75d45}.stat.metric-coral .number{color:#d45a42}
.stat.metric-blue .stat-icon{background:#e3f3fc;color:#1784a3}.stat.metric-gold .stat-icon{background:#fff0d8;color:#d28e14}
.overview-sections{display:grid;grid-template-columns:minmax(0,1.32fr) minmax(310px,.98fr);gap:14px;align-items:stretch}
.overview-panel{background:#fff;border:1px solid #dfeae3;border-radius:13px;box-shadow:0 5px 22px #20452f06;padding:17px 18px}
.overview-panel-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}
.panel-heading{display:flex;gap:10px;align-items:center;min-width:0}
.panel-heading h2{font-size:17px;margin:0;color:#1d473b;font-weight:900}
.panel-icon{height:24px;width:24px;display:inline-flex;color:#0c8068;flex:none}.panel-icon svg{width:100%;height:100%}
.text-action{background:transparent;border:0;color:#087b61;font-size:11px;font-weight:850;padding:6px;white-space:nowrap}
.text-action span{margin-left:3px;font-size:17px}.text-action:hover{text-decoration:underline}
.unread-panel{min-height:417px}
.unread-queue{display:grid;gap:8px}
.unread-entry{width:100%;display:flex;align-items:center;gap:13px;text-align:left;border:1px solid #e6eee8;background:#fff;border-radius:11px;padding:16px 15px;min-height:85px}
.unread-entry:hover{background:#f9fcfa;border-color:#bbd9c9}
.unread-entry-copy{display:grid;gap:6px;min-width:0;flex:1}
.unread-entry-copy strong{font-size:13px;color:#234539}.unread-entry .meta{font-size:11px;margin:0}
.entry-arrow{font-size:23px;color:#6f8778;line-height:1;margin-left:2px}
.summary-empty{text-align:center;padding:25px 12px;color:#8a9b91;font-size:12px}
.overview-right{display:grid;gap:12px;align-content:start}
.mini-panel{padding:16px 17px}
.mini-panel .overview-panel-header{margin-bottom:7px}
.summary-list{display:grid}
.summary-row{border:0;border-bottom:1px solid #e8eee9;padding:11px 4px;background:#fff;display:flex;align-items:center;text-align:left;gap:12px;font-size:12px;color:#657c6e}
.summary-row:last-child{border-bottom:0}.summary-row:hover{background:#f8fbf9}.summary-row span:first-child{flex:1}.summary-row strong{font-size:13px;color:#08785e}
@media(min-width:1500px){.shell{grid-template-columns:250px minmax(0,1fr)}.content{padding:31px 36px}.stats{gap:17px}}
@media(max-width:1120px){.shell{grid-template-columns:195px minmax(0,1fr)}.sidebar{padding:17px 10px}.content{padding:21px 17px}.stats{gap:9px}.stat{padding:16px 10px}.stat .stat-top{gap:7px}.stat .stat-icon{width:38px;height:38px}.overview-sections{grid-template-columns:minmax(0,1.1fr) minmax(260px,1fr)}}
@media(max-width:820px){.overview-heading{align-items:flex-start;flex-direction:column}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.overview-sections{grid-template-columns:1fr}.unread-panel{min-height:unset}}
@media(max-width:670px){.topbar{padding:10px 14px;gap:10px}.topbar .brand{gap:8px}.topbar .brand img{width:121px;max-width:121px;height:32px}.brand-admin,.brand-admin-d{font-size:16px;padding-left:10px;letter-spacing:-.25px}.top-actions{gap:6px}.top-actions a{font-size:10px}.top-actions .btn{padding:7px 8px;font-size:10px}.shell{display:block}.sidebar{min-height:0;padding:9px;background:white}.side-items{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.side-btn{flex-direction:column;justify-content:center;gap:4px;padding:9px 3px;text-align:center;min-height:61px;font-size:10px}.nav-icon{width:19px;height:19px}.side-btn .new-count{position:absolute;right:4px;top:2px;min-width:16px;font-size:9px;padding:0 4px}.side-btn{position:relative}.sidebar-decoration,.aside-foot{display:none}.content{padding:15px 12px}.private-tip{padding:11px 10px;font-size:10px;margin-bottom:21px;gap:7px}.notice-icon{width:19px;height:19px}.overview-heading h1{font-size:25px}.overview-heading-actions{width:100%;justify-content:space-between}.stat{min-height:154px}.stat .number{font-size:34px}.stat .label{font-size:11px}.stat .stat-action{font-size:10px}.stat .stat-icon{width:34px;height:34px}.stat .stat-icon svg{width:20px;height:20px}.overview-panel{padding:13px 12px}.panel-heading h2{font-size:15px}.unread-entry{padding:11px 10px}.unread-entry .tag{font-size:9px;padding:4px 7px}h1{font-size:25px}}
@media(max-width:360px){.top-actions>a{display:none}.topbar .brand img{width:106px}.stats{gap:7px}.stat .stat-top{flex-direction:column;justify-content:center}.stat{padding:12px 6px}}
/* V2.5: tighter TutorGoose + Admin branding, compact single-viewport overview. */
.topbar{height:64px;padding:7px 22px;gap:14px}
.topbar .brand{gap:3px}
.topbar .brand img{width:131px;max-width:131px;height:43px;flex:none;object-fit:contain;object-position:left center}
.brand-admin,.brand-admin-d{padding:0 0 0 8px;border-left:1px solid #ceded4;font-size:21px;letter-spacing:-.7px;line-height:1.1}
.top-actions{gap:8px}
.top-actions .btn{padding:8px 11px;font-size:11px}
.top-actions a{font-size:11px}

/* Default admin sections are still scrollable. Only Overview is viewport-fitted. */
body.admin-overview{height:100dvh;overflow:hidden}
body.admin-overview main{height:calc(100dvh - 64px);min-height:0}
body.admin-overview #dashboard{height:100%;min-height:0}
body.admin-overview .shell{height:100%;min-height:0;overflow:hidden}
body.admin-overview .sidebar{min-height:0;padding:14px 11px 9px}
body.admin-overview .side-items{gap:4px}
body.admin-overview .side-btn{min-height:43px;padding:10px 11px;font-size:12px;gap:10px}
body.admin-overview .nav-icon{height:20px;width:20px}
body.admin-overview .aside-foot{font-size:10px;padding-top:9px}
body.admin-overview .sidebar-decoration{height:95px;bottom:46px}
body.admin-overview .content{height:100%;min-height:0;display:flex;flex-direction:column;padding:15px 21px 17px;overflow:hidden;gap:10px}
body.admin-overview .private-tip{margin:0 0 14px;min-height:42px;padding:8px 11px;font-size:11px;line-height:1.4;flex-shrink:0}
body.admin-overview .notice-icon{height:20px;width:20px}
body.admin-overview .tip-close{font-size:18px}
body.admin-overview .view[data-panel=overview].active{display:flex;flex:1;min-height:0;flex-direction:column}
body.admin-overview .overview-heading{margin:0 0 10px;gap:8px;flex-shrink:0}
body.admin-overview .overview-heading h1{font-size:26px;line-height:1.2;margin:4px 0 3px}
body.admin-overview .overview-heading .lead{font-size:11px;line-height:1.45}
body.admin-overview .eyebrow{font-size:10px;line-height:1.5}
body.admin-overview .overview-heading-actions .btn{padding:7px 10px;font-size:11px}
body.admin-overview .updated-at{font-size:10px}
body.admin-overview .stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 11px;flex-shrink:0}
body.admin-overview .stat{height:112px;min-height:0;padding:11px 12px 9px;border-radius:11px}
body.admin-overview .stat .stat-top{gap:8px}
body.admin-overview .stat .stat-icon{height:34px;width:34px}
body.admin-overview .stat .stat-icon svg{width:19px;height:19px}
body.admin-overview .stat .label{font-size:11px}
body.admin-overview .stat .number{font-size:29px;margin:1px 0 3px;line-height:1.1}
body.admin-overview .stat .stat-action{font-size:10px;line-height:1.25}
body.admin-overview .stat .stat-action span{font-size:13px}
body.admin-overview .overview-sections{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1.24fr) minmax(260px,1fr);gap:11px;overflow:hidden}
body.admin-overview .overview-panel{min-width:0;min-height:0;padding:12px 14px;border-radius:12px}
body.admin-overview .overview-panel-header{margin-bottom:7px;min-height:25px}
body.admin-overview .panel-heading h2{font-size:14px}
body.admin-overview .panel-icon{width:19px;height:19px}
body.admin-overview .text-action{font-size:10px;padding:3px}
body.admin-overview .unread-panel{display:flex;flex-direction:column;min-height:0;overflow:hidden}
body.admin-overview .unread-queue{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;align-content:start;overscroll-behavior:contain;padding:1px}
body.admin-overview .unread-entry{min-height:59px;padding:9px 10px;gap:7px}
body.admin-overview .unread-entry-copy{gap:2px}
body.admin-overview .unread-entry-copy strong{font-size:11px}
body.admin-overview .unread-entry .meta{font-size:10px;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.admin-overview .unread-entry .tag{padding:4px 7px;font-size:9px}
body.admin-overview .entry-arrow{font-size:17px}
body.admin-overview .overview-right{grid-template-rows:repeat(2,minmax(0,1fr));display:grid;gap:9px;min-height:0;overflow:hidden}
body.admin-overview .mini-panel{display:flex;flex-direction:column;overflow:hidden;padding:10px 13px;min-height:0}
body.admin-overview .mini-panel .overview-panel-header{margin-bottom:3px;flex-shrink:0}
body.admin-overview .summary-list{flex:1;min-height:0;grid-template-rows:repeat(3,minmax(0,1fr))}
body.admin-overview .summary-row{min-height:0;line-height:1.25;padding:4px 3px;font-size:11px}
body.admin-overview .summary-row strong{font-size:12px}
body.admin-overview footer{display:none}

/* At ordinary laptop sizes, keep all Overview sections visible at once. */
@media(min-width:821px) and (max-height:780px){
 body.admin-overview .content{padding:10px 16px 12px;gap:7px}
 body.admin-overview .private-tip{min-height:36px;padding:7px 9px}
 body.admin-overview .overview-heading{margin-bottom:7px}
 body.admin-overview .overview-heading h1{font-size:23px;margin:3px 0 2px}
 body.admin-overview .overview-heading .lead{font-size:10px}
 body.admin-overview .stats{margin-bottom:8px;gap:8px}
 body.admin-overview .stat{height:96px;padding:9px 10px 7px}
 body.admin-overview .stat .stat-icon{width:30px;height:30px}
 body.admin-overview .stat .number{font-size:25px;margin:0 0 2px}
 body.admin-overview .overview-panel{padding:9px 12px}
 body.admin-overview .overview-right{gap:7px}
 body.admin-overview .summary-row{padding:3px}
}
/* Small displays must never hide text or controls solely to prevent scrolling. */
@media(max-width:820px), (max-height:640px){
 body.admin-overview{height:auto;overflow:auto}
 body.admin-overview main,body.admin-overview #dashboard,body.admin-overview .shell{height:auto;min-height:0;overflow:visible}
 body.admin-overview .sidebar{min-height:0}
 body.admin-overview .content{height:auto;display:block;overflow:visible}
 body.admin-overview .view[data-panel=overview].active{display:block}
 body.admin-overview .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.admin-overview .overview-sections{display:grid;grid-template-columns:1fr;overflow:visible}
 body.admin-overview .unread-panel{overflow:visible}
 body.admin-overview .unread-queue{overflow:visible;max-height:none}
 body.admin-overview .overview-right{display:grid;grid-template-rows:auto auto;overflow:visible}
 body.admin-overview .summary-list{grid-template-rows:auto}
 body.admin-overview .summary-row{min-height:35px}
 body.admin-overview footer{display:block}
}
@media(max-width:670px){
 .topbar{height:auto;min-height:62px;padding:9px 12px;gap:8px}
 .topbar .brand{gap:2px}
 .topbar .brand img{width:102px;max-width:102px;height:34px}
 .brand-admin,.brand-admin-d{font-size:16px;padding-left:6px}
 .top-actions{gap:5px}
 .top-actions .btn{padding:6px 8px;font-size:10px}
 .top-actions a{font-size:10px}
}


/* V2.6 — visual adjustment only: align Admin label with TutorGoose logo. */
.topbar .brand{align-items:center}
.brand-admin,.brand-admin-d{
  color:#70877d;            /* softer muted sage-grey, not dark navy */
  position:relative;
  top:3px;                  /* lower the text slightly to share the logo baseline */
  font-weight:800;         /* keep chosen Option D bold style */
}
@media(max-width:670px){
  .brand-admin,.brand-admin-d{top:2px}
}


/* 只為指定功能補充樣式，不覆蓋原版 TutorGoose 字型、色調、版面。 */
.tg-demo-watermark{color:#668577;font-size:10px;font-weight:700;white-space:nowrap}
.tg-pending-badge{display:inline-flex;align-items:center;justify-content:center;margin-left:7px;min-width:21px;height:21px;border-radius:20px;padding:0 6px;background:#d75d46;color:#fff;font-weight:800;font-size:11px;line-height:1}
.tg-stage-picker{border:1px solid #c7ddd0;background:#f5fbf7;border-radius:9px;color:#146850;font-size:12px;font-weight:800;min-height:39px;padding:7px 11px;cursor:pointer;max-width:170px}
.tg-stage-picker:hover{border-color:#67aa87}
.tg-stage-picker:disabled{opacity:.55;cursor:wait}
.tg-case-subtitle{font-size:11px;color:#70877a;margin-top:4px}
.tg-detail-divider{height:1px;background:#e2ece5;margin:15px 0 12px}
.tg-detail-subtitle{font-size:15px;font-weight:800;margin:10px 0}
.tg-small-hint{color:#74877c;font-size:11px;margin-top:5px}
.tg-note-area{min-height:100px;resize:vertical}
#modal-shade:has(#student-note-editor) .modal{width:min(650px,100%);max-height:calc(100vh - 36px)}
#student-note-editor .modal-actions{position:sticky;bottom:-23px;background:white;padding:10px 0 9px;z-index:2}
.tg-matched-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:end;gap:10px;margin:10px 0;padding:12px;background:#f7faf8;border:1px solid #e2ece5;border-radius:10px}
.tg-matched-row label{font-size:11px;margin:0 0 5px;display:block;font-weight:800}
.tg-matched-row input{width:100%;min-width:0}
.tg-matched-row .tg-remove{white-space:nowrap;min-height:40px}
.tg-modal-wide{width:min(680px,calc(100vw - 24px))}
.tg-note-saved{background:#e7f5ed;color:#166d50;padding:6px 10px;font-size:11px;border-radius:9px;margin-left:auto}
.tg-matched-tags{font-size:11px;color:#2d6950;margin-top:4px;line-height:1.5}
.tg-compact-btn{padding:8px 12px}
@media(max-width:760px){.tg-demo-watermark{display:none}.tg-matched-row{grid-template-columns:1fr}.tg-matched-row .tg-remove{justify-self:start}.tg-stage-picker{max-width:152px}}

/* Admin V3 — arrow alignment fix only, retain all existing typography and layout. */
.toolbar select, .modal select, .tg-stage-picker{
  -webkit-appearance:none;
  appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m6 9 6 6 6-6' stroke='%23285143' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-size:15px 15px;
  background-position:right 16px center;
  padding-right:44px;
}
.tg-recruit-summary .detailgrid{margin:11px 0 0}
.tg-recruit-summary .detail{min-height:62px}
.tg-recruit-summary-title{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-bottom:8px}
.tg-recruit-summary-title strong{font-size:15px;color:#1c654d}
@media(max-width:670px){
  .toolbar select, .modal select,.tg-stage-picker{background-position:right 13px center;padding-right:37px}
}

/* V3 matched-tutor follow-up fix — scoped to details only; all original styles retained. */
.tg-matched-detail-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.tg-matched-detail-head .detail{flex:1;min-width:180px}
.tg-matched-name-list{display:grid;gap:3px;margin-top:5px}
.tg-matched-person{line-height:1.6}
.tg-add-from-detail{white-space:nowrap;align-self:center}
@media(max-width:520px){.tg-add-from-detail{width:100%;justify-content:center}}

/* V3: pending badge display only, retained all existing publish/verify controls. */
.tutor-panel-count{display:inline-block;vertical-align:middle;margin-left:6px;line-height:1.25}

/* V3: consistent dropdown chevrons on student, tutor and Admin forms. */
select:not([multiple]){
 -webkit-appearance:none!important;appearance:none!important;
 padding-right:44px!important;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233e6556' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important;
 background-repeat:no-repeat!important;
 background-position:right 15px center!important;
 background-size:16px 16px!important;
 cursor:pointer;
}
select:not([multiple]):disabled{cursor:not-allowed}

/* V3.2 scoped Admin management controls; retains V3 typography, cards and palette. */
.tg-manage-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.btn.tg-delete{color:#ad3737!important;border-color:#e7c5c5!important;background:#fff!important}
.btn.tg-delete:hover{background:#fff4f4!important;border-color:#d58d8d!important}
.btn.tg-delete-solid{background:#a93e3e!important;color:white!important;border-color:#a93e3e!important}
@media(max-width:670px){.tg-manage-actions{width:100%}}

/* Admin-only quick link to the student/parent WhatsApp chat. */
.tg-wa-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;white-space:nowrap}
.tg-wa-link:focus-visible{outline:3px solid #6fbea1;outline-offset:2px}

/* V3.2.3: keep the modal heading as the initial programmatic focus target,
   instead of highlighting the Close button on every open. */
#modal-title:focus{outline:none}
/* V3.2.3: private student WhatsApp contact in application details. */
.tg-contact-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}
.tg-contact-link{font-size:11px;color:var(--green);font-weight:800;text-decoration:underline;text-underline-offset:2px;white-space:nowrap}
.tg-contact-link:focus-visible{outline:3px solid #6fbea1;outline-offset:3px;border-radius:3px}

/* V3.6.1 Clean & Stable: controlled admin-only visual harmonization. */
.topbar .brand{display:inline-flex;align-items:center;gap:15px;text-decoration:none}
.topbar .brand img{height:45px;width:197px;max-width:197px;object-fit:contain;object-position:left center}
.topbar .brand-admin,.topbar .brand-admin-d{top:0;position:static;display:inline-flex;align-items:center;min-height:36px;margin:0;padding:0 0 0 16px;border:0;border-left:1px solid #cadbd2;background:none;letter-spacing:-.75px;color:#72897f;font-size:29px;font-weight:800;line-height:1}
.content{padding:27px 29px}.view>h1{margin-top:4px}.overview-heading{margin-bottom:17px}
.item{padding:19px;border-radius:14px;box-shadow:0 5px 18px #193b2b08}
.tg-unified-card{display:flex;flex-direction:column;min-height:153px}
.tg-unified-card .item-bottom{margin-top:auto;justify-content:space-between;gap:12px}
.tg-unified-card .tg-action-left{display:flex;align-items:center;gap:8px;min-height:33px}
.tg-unified-card .tg-manage-actions{margin-left:auto;justify-content:flex-end;width:auto}
.tg-unified-card .btn{white-space:nowrap}
.tg-inline-badges{padding:5px 0 8px}
.filter-row{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 18px}
.filter-row button{display:inline-flex;align-items:center;gap:7px;border-radius:99px;padding:8px 12px}
.tg-filter-count{font-size:10px;min-width:22px;line-height:19px;height:19px;border-radius:99px;padding:0 5px;background:#e6efe9;color:#4d7260;font-weight:900;text-align:center}
.filter-row button.active .tg-filter-count{background:#ffffff35;color:#fff}
.filter-row button[data-st-filter="unread"] .tg-filter-count{background:#fae5dd;color:#b95737}
.filter-row button.active[data-st-filter="unread"] .tg-filter-count{background:#fff;color:#bc5134}
.modal input,.modal select,.modal textarea,.toolbar select{border-radius:11px!important;min-height:41px}
.modal select,.toolbar select,.tg-stage-picker{appearance:none!important;-webkit-appearance:none!important;padding-right:45px!important;background-repeat:no-repeat!important;background-size:16px 16px!important;background-position:right 15px center!important}
.modal select,.toolbar select,.tg-stage-picker{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233e6556' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important}
.tg-edit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px;row-gap:3px}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;align-items:center}
.modal-actions .tg-left-delete{margin-right:auto}
.tg-finance-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:17px}
.tg-finance-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:15px 0 28px}
.tg-finance-stats .stat{min-height:110px;text-align:left;align-items:stretch;padding:17px}
.tg-finance-val{font-size:24px;color:#146c55;line-height:1.5;font-weight:900;margin-top:9px}
.tg-payment-row{display:flex;justify-content:space-between;align-items:center;gap:15px}
@media(max-width:1000px){.tg-finance-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:670px){.topbar .brand img{width:145px;max-width:145px;height:39px}.topbar .brand{gap:7px}.topbar .brand-admin,.topbar .brand-admin-d{font-size:19px;padding-left:8px;min-height:27px}.content{padding:15px 13px}.sidebar .side-items{grid-template-columns:repeat(4,minmax(0,1fr))}.side-btn[hidden]{display:none!important}.tg-edit-grid{grid-template-columns:1fr}.tg-finance-stats{gap:9px}.tg-finance-stats .stat{padding:12px}.tg-finance-val{font-size:19px}.tg-finance-head{align-items:flex-start;flex-direction:column}.tg-unified-card .item-bottom{flex-wrap:wrap}.tg-unified-card .tg-manage-actions{width:100%}.modal-actions .tg-left-delete{margin-right:auto}}

/* Precisely fit the original TutorGoose wordmark without its transparent top margin. */
.topbar{height:77px}
.topbar .brand{gap:13px}
.topbar .brand img{height:62px;width:224px;max-width:224px;object-fit:contain;object-position:left center}
.topbar .brand-admin,.topbar .brand-admin-d{font-size:30px;min-height:40px;padding-left:18px}
@media(max-width:670px){.topbar{height:auto;min-height:63px}.topbar .brand img{width:134px;max-width:134px;height:41px}.topbar .brand{gap:7px}.topbar .brand-admin,.topbar .brand-admin-d{font-size:19px;min-height:30px;padding-left:9px}}

/* V3.6.2 Admin preview: visually restore V3.3–V3.5 wordmark and harmonise navigation. */
.topbar{height:70px!important;min-height:70px!important;padding:9px 24px!important;box-shadow:none!important;border-bottom:1px solid #e9f0eb}
.topbar .brand{gap:12px!important;align-items:center!important}
.topbar .brand img{width:157px!important;max-width:157px!important;height:44px!important;object-fit:contain!important}
.topbar .brand-admin,.topbar .brand-admin-d{font-size:17px!important;font-weight:800!important;color:#70877d!important;border-left:1px solid #d2ded6!important;padding:0 0 0 13px!important;min-height:24px!important;letter-spacing:-.2px!important;position:relative!important;top:2px!important}
.shell,body.admin-overview .shell{grid-template-columns:242px minmax(0,1fr)!important;min-height:calc(100vh - 70px)!important;height:auto!important;overflow:visible!important}
.sidebar,body.admin-overview .sidebar{min-height:calc(100vh - 70px)!important;padding:18px 11px!important}
.sidebar .side-items,body.admin-overview .side-items{display:grid!important;gap:7px!important;grid-template-columns:1fr!important}
.sidebar .side-btn,body.admin-overview .side-btn{display:flex!important;flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;gap:14px!important;font-size:13px!important;font-weight:800!important;min-height:51px!important;padding:13px 15px!important;text-align:left!important;width:100%!important;border-radius:11px!important}
.sidebar .side-btn[hidden],body.admin-overview .side-btn[hidden]{display:none!important}
.sidebar .nav-icon,body.admin-overview .nav-icon{width:21px!important;height:21px!important}
body.admin-overview,body.admin-overview main,body.admin-overview #dashboard{height:auto!important;min-height:0!important;overflow:visible!important}
.content,body.admin-overview .content{display:block!important;height:auto!important;overflow:visible!important;padding:27px 31px!important;max-width:none!important}
body.admin-overview .view[data-panel=overview].active{display:block!important;min-height:0!important}
.overview-heading,body.admin-overview .overview-heading{margin:0 0 21px!important}
.overview-heading h1,body.admin-overview .overview-heading h1{font-size:29px!important;margin:6px 0 6px!important}
.stats,body.admin-overview .stats{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:15px!important;margin:0 0 20px!important}
.stat,body.admin-overview .stat{display:flex!important;flex-direction:column!important;align-items:stretch!important;text-align:left!important;min-height:148px!important;height:auto!important;padding:19px 19px 17px!important;border-radius:15px!important;box-shadow:0 7px 25px #1c4b3210!important}
.stat .stat-top,body.admin-overview .stat-top{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:5px!important;flex-direction:row-reverse!important}
.stat .stat-icon,body.admin-overview .stat-icon{background:transparent!important;height:26px!important;width:26px!important;color:#53776a!important;border-radius:0!important}
.stat .stat-icon svg,body.admin-overview .stat-icon svg{width:20px!important;height:20px!important}
.stat .label,body.admin-overview .stat .label{font-size:12px!important;color:#81978b!important}
.stat .number,body.admin-overview .stat .number{font-size:37px!important;margin:11px 0 7px!important;line-height:1!important;color:#086a55!important}
.stat .stat-action,body.admin-overview .stat .stat-action{font-size:11px!important;color:#9aaca1!important;font-weight:600!important}
.stat-action span{display:none!important}
.overview-sections,body.admin-overview .overview-sections{display:grid!important;grid-template-columns:minmax(0,1.25fr) minmax(280px,1fr)!important;gap:17px!important;height:auto!important;overflow:visible!important;align-items:stretch!important}
.overview-panel,body.admin-overview .overview-panel{padding:20px 22px!important;border-radius:15px!important;box-shadow:0 5px 20px #153f2d08!important;overflow:visible!important}
.overview-panel-header,body.admin-overview .overview-panel-header{margin:0 0 16px!important}
.overview-panel .panel-heading h2,body.admin-overview .panel-heading h2{font-size:17px!important}
.unread-panel,body.admin-overview .unread-panel{min-height:380px!important;display:flex!important;flex-direction:column!important}
.unread-queue,body.admin-overview .unread-queue{display:grid!important;gap:0!important;overflow:visible!important;flex:none!important}
.unread-entry,body.admin-overview .unread-entry{border:0!important;border-bottom:1px solid #eaf0eb!important;border-radius:0!important;padding:18px 0!important;min-height:76px!important;background:white!important}
.unread-entry-copy strong,body.admin-overview .unread-entry-copy strong{font-size:14px!important}
.overview-right,body.admin-overview .overview-right{display:flex!important;flex-direction:column!important;gap:16px!important;overflow:visible!important;grid-template-rows:none!important}
.overview-right .mini-panel,body.admin-overview .mini-panel{flex:1!important;min-height:150px!important;overflow:visible!important}
.tg-ov-caption{font-size:12px;color:#8ea299;margin:0 0 12px}
.tg-ov-money{font-size:34px;line-height:1.2;display:block;color:#096b53}
.tg-ov-foot{margin:10px 0 0;color:#829b8c;font-size:12px}
.tg-business-row{cursor:default!important;min-height:46px!important}
@media(max-width:1050px){.stats,body.admin-overview .stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}.overview-sections,body.admin-overview .overview-sections{grid-template-columns:1fr!important}}
@media(max-width:670px){
 .topbar{padding:8px 12px!important;height:auto!important;min-height:62px!important}
 .topbar .brand img{width:114px!important;max-width:114px!important;height:34px!important}
 .topbar .brand-admin,.topbar .brand-admin-d{font-size:13px!important;min-height:19px!important;padding-left:8px!important;top:1px!important}
 .shell,body.admin-overview .shell{display:block!important}
 .sidebar,body.admin-overview .sidebar{min-height:0!important;padding:8px!important}
 .sidebar .side-items,body.admin-overview .side-items{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important}
 .sidebar .side-btn,body.admin-overview .side-btn{display:flex!important;flex-direction:column!important;justify-content:center!important;gap:4px!important;min-height:63px!important;padding:7px 2px!important;font-size:10px!important;text-align:center!important}
 .content,body.admin-overview .content{padding:18px 13px!important}
 .overview-sections,body.admin-overview .overview-sections{gap:12px!important}
 .overview-panel,body.admin-overview .overview-panel{padding:14px!important}
 .stats,body.admin-overview .stats{gap:9px!important}
 .stat,body.admin-overview .stat{min-height:136px!important;padding:14px!important}
 .stat .number,body.admin-overview .stat .number{font-size:30px!important}
}

/* V3.6.3: Make the unread application metric noticeable without changing other cards. */
#stats .stat.metric-coral .label{color:#b74639!important;font-weight:900!important}
#stats .stat.metric-coral .number{color:#b74639!important}

/* Financial management — reference layout, scoped to Finance page only */
.tg-finance-tabs{display:flex;flex-wrap:wrap;gap:9px;margin:13px 0 22px}
.tg-finance-tab{appearance:none;border:1px solid #d8e8df;border-radius:11px;background:#fff;color:#526f60;padding:10px 17px;font-weight:850;font-size:12px;min-height:42px}
.tg-finance-tab.active{background:#126b55;color:#fff;border-color:#126b55}
.tg-finance-tab:hover:not(.active){background:#edf7f1}
.tg-finance-view .tg-finance-stats{margin:0 0 21px;gap:16px}
.tg-finance-view .tg-finance-stats .stat{min-height:153px!important;gap:9px;justify-content:flex-start;padding:19px 21px!important}
.tg-finance-stat-head{display:flex;align-items:center;justify-content:space-between;gap:9px;width:100%;color:#839d91}
.tg-finance-stat-head .label{font-size:12px;color:#7a9387;font-weight:850}
.tg-finance-stat-head svg{height:21px;width:21px;flex:none;color:#53796a}
.tg-finance-view .tg-finance-val{font-size:35px;line-height:1.15;display:block;margin:7px 0 0;color:#096d54}
.tg-finance-stat-note{font-size:11px;color:#859a90;margin-top:auto}
.tg-finance-columns{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,1fr);gap:18px;margin:17px 0 20px}
.tg-finance-panel{background:#fff;border:1px solid #dce9e1;border-radius:16px;overflow:hidden;min-width:0}
.tg-finance-panel-header{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:20px 23px;border-bottom:1px solid #e8f0ea}
.tg-finance-panel-header h2{margin:0;font-size:17px;font-weight:900;color:#22463b}
.tg-finance-panel-header span{font-size:11px;color:#82978b}
.tg-finance-chart{height:271px;margin:22px 20px 22px;padding:18px 9px 0;display:flex;gap:16px;align-items:flex-end;justify-content:space-around;border-bottom:1px solid #d9e8de;min-width:0}
.tg-finance-baritem{display:flex;flex:1;max-width:94px;min-width:0;align-items:center;flex-direction:column;justify-content:flex-end;height:100%;gap:6px}
.tg-finance-barbox{height:210px;width:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center}
.tg-finance-barvalue{font-size:11px;color:#607d6d;white-space:nowrap}
.tg-finance-bar{width:min(68px,62%);border-radius:10px 10px 0 0;background:linear-gradient(180deg,#60c0a0,#188568);min-height:3px}
.tg-finance-bar.zero{height:3px!important;background:#279376}
.tg-finance-month{font-size:11px;color:#80988a;white-space:nowrap;padding-bottom:5px}
.tg-finance-rules{padding:17px 22px}
.tg-finance-rule{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:15px 0;border-bottom:1px solid #e9eee9;font-size:13px;font-weight:750;color:#285444}
.tg-finance-rule:last-of-type{border-bottom:0}
.tg-rule-chip{font-size:10px;font-weight:850;white-space:nowrap;border-radius:99px;padding:6px 11px;background:#eaf5ee;color:#27775b}
.tg-rule-chip.orange{background:#fff0d9;color:#9a631c}
.tg-rule-chip.grey{background:#eef2ef;color:#74877b}
.tg-rule-description{font-size:11px;color:#8b9c92;margin-top:10px;line-height:1.7}
.tg-finance-table-scroll{overflow-x:auto}
.tg-finance-table{border-collapse:collapse;width:100%;font-size:12px;text-align:left;min-width:650px}
.tg-finance-table th{background:#f6faf7;color:#849f90;padding:15px 21px;font-weight:800;white-space:nowrap}
.tg-finance-table td{border-top:1px solid #e9f0eb;padding:15px 21px;white-space:nowrap;color:#31594c}
.tg-finance-table .amount{font-weight:900;color:#117158}
.tg-finance-table .btn{padding:7px 10px}
.tg-finance-empty{padding:23px;color:#789083;text-align:center}
@media(max-width:1030px){.tg-finance-columns{grid-template-columns:1fr}}
@media(max-width:670px){.tg-finance-view .tg-finance-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px}.tg-finance-view .tg-finance-stats .stat{min-height:136px!important;padding:14px!important}.tg-finance-view .tg-finance-val{font-size:24px}.tg-finance-panel-header{padding:15px}.tg-finance-rules{padding:10px 15px}.tg-finance-rule{font-size:11px}.tg-finance-chart{margin:12px 8px 15px;gap:3px;padding:10px 0 0}.tg-finance-barvalue{font-size:9px}.tg-finance-month{font-size:10px}.tg-finance-tabs{gap:7px}.tg-finance-tab{padding:9px 13px}}


/* V3.6.4 — user-approved micro-adjustments ONLY. Preserve student cards/filters,
   finance, dashboard and full-page appearance from V3.6.3. */
/* Keep original TutorGoose logo size; bring divider + Admin closer. */
.topbar .brand{gap:5px!important}
.topbar .brand-admin,.topbar .brand-admin-d{padding-left:8px!important}
/* Tutor consent badges sit away from the action divider just like student cards. */
.tg-tutor-card .tg-tutor-status-tags{margin-top:13px;margin-bottom:11px;min-height:23px}
.tg-tutor-card .item-bottom{margin-top:4px;padding-top:14px}
.tg-tutor-card .tg-manage-actions{gap:8px}
.tg-tutor-card .tg-tutor-quick-action{white-space:nowrap}
@media(max-width:670px){
 .topbar .brand{gap:3px!important}
 .topbar .brand-admin,.topbar .brand-admin-d{padding-left:6px!important}
 .tg-tutor-card .tg-tutor-status-tags{margin-top:11px;margin-bottom:10px}
 .tg-tutor-card .tg-manage-actions{gap:7px}
}

/* V3.6.5: harmonize student/tutor cards ONLY, without moving their action buttons. */
#student-list > .tg-unified-card,
#tutor-list > .tg-unified-card{min-height:238px;}
#student-list > .tg-unified-card .item-head,
#tutor-list > .tg-unified-card .item-head{min-height:66px;}
#tutor-list > .tg-unified-card .item-head .meta{max-height:3.8em;overflow:hidden;}
/* Match the placement of the read/consent badge bands without changing the buttons. */
#student-list > .tg-unified-card .tg-inline-badges,
#tutor-list > .tg-unified-card .tg-tutor-status-tags{min-height:33px;margin-top:9px;margin-bottom:9px;padding:4px 0;}
.tg-tutor-add{margin:12px 0;}
.modal label.tg-tutor-consent{display:flex;align-items:flex-start;gap:9px;margin:17px 0 10px;cursor:pointer;font-weight:700;}
.modal .tg-tutor-consent input{width:18px!important;min-height:18px!important;height:18px!important;flex:none;margin:2px 0 0;}
@media(max-width:670px){
 #student-list > .tg-unified-card,#tutor-list > .tg-unified-card{min-height:294px;}
 #student-list > .tg-unified-card .item-head,#tutor-list > .tg-unified-card .item-head{min-height:0;}
}

/* V3.6.5 precise optical alignment: equal space on both sides of the divider.
   The TutorGoose logo image, header size and navigation remain unchanged. */
.topbar .brand{gap:8px!important;align-items:center!important}
.topbar .brand-admin,.topbar .brand-admin-d{padding-left:8px!important;top:4px!important}
@media(max-width:670px){
 .topbar .brand{gap:6px!important}
 .topbar .brand-admin,.topbar .brand-admin-d{padding-left:6px!important;top:3px!important}
}
/* Preserve the visible logo height while removing unused image-box whitespace.
   The image's 3:1 aspect ratio means 44px high = about 132px displayed width. */
.topbar .brand img{width:133px!important;max-width:133px!important;height:44px!important}
@media(max-width:670px){.topbar .brand img{width:103px!important;max-width:103px!important;height:34px!important}}

/* V3.6.6 — approved micro-tweak: slightly smaller student/tutor white cards.
   All buttons, actions, filters, finance and front-end remain unchanged. */
#student-list > .tg-unified-card,
#tutor-list > .tg-unified-card{
  min-height:222px;
  padding:17px 19px;
}
#student-list > .tg-unified-card .item-head,
#tutor-list > .tg-unified-card .item-head{min-height:54px;}
/* Increase Admin word very slightly; move ONLY the word about half a character
   to the right of its divider. Do not move or redraw the TutorGoose logo. */
.topbar .brand-admin,.topbar .brand-admin-d{
  font-size:18px!important;
  padding-left:15px!important;
}
@media(max-width:670px){
  #student-list > .tg-unified-card,
  #tutor-list > .tg-unified-card{min-height:268px;padding:15px 15px;}
  #student-list > .tg-unified-card .item-head,
  #tutor-list > .tg-unified-card .item-head{min-height:0;}
  .topbar .brand-admin,.topbar .brand-admin-d{
    font-size:14px!important;
    padding-left:13px!important;
  }
}

/* V3.6.7 — mobile-only alignment: preserve approved desktop layouts and actions. */
@media (max-width:670px) {
  /* Keep the real TutorGoose logo, Admin, and working header actions in one row. */
  .topbar {
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:space-between!important;
    column-gap:7px!important;
    padding:8px 10px!important;
  }
  .topbar .brand{flex:0 1 auto;min-width:0;gap:4px!important;white-space:nowrap}
  .topbar .brand img{width:103px!important;max-width:103px!important;height:34px!important;flex:none}
  .topbar .brand-admin,.topbar .brand-admin-d{font-size:14px!important;padding-left:9px!important;min-height:21px!important;top:3px!important;flex:none}
  .top-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:4px!important;margin-left:0!important;flex:0 0 auto;flex-wrap:nowrap!important}
  /* Small-screen text labels make this row impossible to fit. Keep the original
     links and buttons fully operable; shorten only their visible labels. */
  .top-actions>a{font-size:0!important;white-space:nowrap;margin:0!important;line-height:1!important}
  .top-actions>a::after{content:"網站 ↗";font-size:10px!important;font-weight:800}
  .top-actions .refresh-label{display:none!important}
  .top-actions .refresh-btn{display:inline-flex;align-items:center;justify-content:center;padding:6px!important;min-width:31px!important;min-height:32px!important}
  .top-actions #logout{font-size:10px!important;padding:6px 7px!important;min-height:32px!important;white-space:nowrap}
  .top-actions .refresh-icon{width:15px!important;height:15px!important}

  /* One horizontal action row on tutor cards: WhatsApp left, all three controls right. */
  #tutor-list > .tg-tutor-card .item-bottom{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    justify-content:space-between!important;
    align-items:center!important;
    column-gap:4px!important;
    margin-top:auto!important;
  }
  #tutor-list > .tg-tutor-card .tg-action-left{min-width:0!important;flex:0 0 auto;gap:0!important}
  #tutor-list > .tg-tutor-card .tg-manage-actions{
    display:flex!important;
    width:auto!important;
    min-width:0!important;
    flex:0 1 auto!important;
    flex-wrap:nowrap!important;
    gap:4px!important;
    margin-left:0!important;
    justify-content:flex-end!important;
  }
  #tutor-list > .tg-tutor-card .item-bottom .btn{
    white-space:nowrap!important;
    font-size:10px!important;
    padding:7px 6px!important;
    min-height:33px!important;
    line-height:1.3!important;
    border-radius:8px!important;
  }
  /* Student cards can be shorter than tutor cards; no forced equal height. */
  #student-list > .tg-unified-card{min-height:218px!important;padding:13px 14px!important}
  #student-list > .tg-unified-card .item-head{min-height:0!important}
}
@media(max-width:355px){
  .topbar .brand img{width:92px!important;max-width:92px!important;height:31px!important}
  .topbar .brand-admin,.topbar .brand-admin-d{font-size:12px!important;padding-left:6px!important}
  .top-actions{gap:3px!important}
  .top-actions>a::after{font-size:9px!important}
  #tutor-list > .tg-tutor-card{padding:13px 11px!important}
  #tutor-list > .tg-tutor-card .item-bottom .btn{font-size:9px!important;padding:6px 4px!important}
  #tutor-list > .tg-tutor-card .tg-manage-actions{gap:3px!important}
}
/* Student cards are intentionally slightly more compact on desktop, too. */
@media(min-width:671px){
  #student-list > .tg-unified-card{min-height:203px;padding:15px 18px}
  #student-list > .tg-unified-card .item-head{min-height:48px}
}

@media(max-width:355px){.top-actions > a{display:inline-block!important}}

/* V3.6.8 — Tutor mobile card only. Remove oversized blank band beneath
   consent while retaining the single-row WhatsApp / edit / status / details.
   No student, desktop, API, logo or finance changes. */
@media (max-width:670px) {
  #tutor-list > .tg-unified-card.tg-tutor-card {
    min-height:0!important;
  }
  #tutor-list > .tg-tutor-card .item-bottom {
    margin-top:8px!important;
    padding-top:12px!important;
    flex-wrap:nowrap!important;
  }
}

/* V3.6.8.1 — Student card actions, mobile ONLY.
   Keep WhatsApp / recruitment copy / edit / details on ONE row.
   Do not modify card min-height, padding, badge spacing, tutor cards,
   desktop layout, finance, header or any behavior. */
@media(max-width:670px){
  #student-list > .tg-unified-card > .tg-inline-badges + .item-bottom{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:space-between!important;
    column-gap:3px!important;
  }
  #student-list > .tg-unified-card > .tg-inline-badges + .item-bottom .tg-action-left{
    display:flex!important;
    align-items:center!important;
    flex:0 1 auto!important;
    min-width:0!important;
    gap:0!important;
  }
  #student-list > .tg-unified-card > .tg-inline-badges + .item-bottom .tg-manage-actions{
    display:flex!important;
    flex:0 1 auto!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    width:auto!important;
    min-width:0!important;
    margin-left:0!important;
    justify-content:flex-end!important;
    gap:3px!important;
  }
  #student-list > .tg-unified-card > .tg-inline-badges + .item-bottom .btn{
    white-space:nowrap!important;
    font-size:9.5px!important;
    line-height:1.25!important;
    padding:7px 5px!important;
    min-height:33px!important;
    border-radius:8px!important;
  }
}
@media(max-width:355px){
  #student-list > .tg-unified-card > .tg-inline-badges + .item-bottom{
    column-gap:2px!important;
  }
  #student-list > .tg-unified-card > .tg-inline-badges + .item-bottom .tg-manage-actions{
    gap:2px!important;
  }
  #student-list > .tg-unified-card > .tg-inline-badges + .item-bottom .btn{
    font-size:8px!important;
    padding:6px 3px!important;
    min-height:31px!important;
  }
}
/* V3.6.9: expense recording within the former '收入計算原則' panel only. */
.tg-expense-panel .tg-finance-panel-header .btn{white-space:nowrap}
.tg-expense-inner{padding:17px 21px}
.tg-expense-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.tg-expense-summary>div{background:#f4faf6;border-radius:10px;padding:12px;min-width:0}
.tg-expense-summary small,.tg-expense-summary strong{display:block}
.tg-expense-summary small{font-size:11px;color:#789284}
.tg-expense-summary strong{font-size:21px;color:#126b55;overflow-wrap:anywhere}
.tg-expense-summary strong.tg-negative{color:#b65040}
.tg-expense-list-title{font-size:12px;font-weight:850;color:#285444;margin:18px 0 7px}
.tg-expense-list-title span{font-weight:500;color:#849b8f}
.tg-expense-list{max-height:270px;overflow:auto}
.tg-expense-row{display:flex;align-items:center;gap:7px;padding:11px 0;border-bottom:1px solid #edf1ed}
.tg-expense-row>div{min-width:0;flex:1}
.tg-expense-row b,.tg-expense-row small{display:block;overflow-wrap:anywhere}
.tg-expense-row b{font-size:12px}.tg-expense-row small{font-size:10px;color:#82978b}
.tg-expense-row>strong{font-size:12px;color:#bc764a;white-space:nowrap}
.tg-expense-row .btn{font-size:10px;padding:6px}
.tg-expense-empty,.tg-expense-local-note{font-size:11px;color:#86998e;line-height:1.7}
.tg-expense-local-note{margin:13px 0 0}
@media(max-width:670px){.tg-expense-inner{padding:12px}.tg-expense-summary{gap:7px}.tg-expense-summary>div{padding:9px}.tg-expense-summary strong{font-size:16px}.tg-expense-row{flex-wrap:wrap}.tg-expense-row>div{flex-basis:50%}}

/* Additive tutor-photo editing UI only. All existing Admin layout and finance retained. */
.tg-photo-tools{display:flex;align-items:flex-start;gap:17px;background:#f5faf7;border:1px solid #e2eee5;border-radius:11px;padding:13px;margin:8px 0 17px}
#tg-tutor-photo-preview{width:88px;height:88px;object-fit:cover;border-radius:50%;flex:none;border:2px solid #e0ede5}
.tg-photo-tools>div{flex:1;min-width:0}.tg-photo-tools input[type=file]{max-width:100%;font-size:11px;min-height:36px;padding:7px}.modal label.tg-photo-remove{display:flex;gap:9px;align-items:center;font-size:11px;font-weight:650;margin:7px 0}.tg-photo-remove input{width:16px!important;height:16px!important;min-height:0!important;flex:none}
@media(max-width:430px){.tg-photo-tools{flex-direction:column}}
