:root{--red:#b42318;--bg:#f5f6f8;--line:#e5e7eb;--muted:#6b7280}.cf-app{display:flex;min-height:calc(100vh - 32px);margin-left:-20px;background:var(--bg);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;color:#171717}.cf-sidebar{width:235px;background:#fff;border-right:1px solid var(--line);padding:22px 14px}.cf-brand{font-size:17px;padding:0 10px 25px;display:flex;gap:8px;align-items:center}.cf-brand .dashicons{color:var(--red)}.cf-nav{display:block;width:100%;text-align:left;border:0;background:none;padding:11px 12px;border-radius:8px;margin:2px 0;cursor:pointer}.cf-nav.active{background:#f8e8e7;color:var(--red);font-weight:700}.cf-main{flex:1;padding:28px 32px;min-width:0}.cf-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}.cf-header h1{margin:0;font-size:28px}.cf-header p{margin:4px 0 0;color:var(--muted)}.cf-grid{display:grid;gap:18px}.cf-grid.four{grid-template-columns:repeat(4,1fr)}.cf-grid.two{grid-template-columns:repeat(2,1fr);margin-top:18px}.cf-stat,.cf-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px}.cf-stat span{font-size:13px;color:var(--muted)}.cf-stat b{display:block;font-size:30px;margin-top:7px}.cf-card{margin-bottom:18px}.cf-card h2{margin:0 0 15px;font-size:18px}.cf-row{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:13px 0;border-bottom:1px solid #f0f1f3}.cf-row:last-child{border:0}.cf-row small{display:block;color:var(--muted);margin-top:3px}.cf-row-right{display:flex;align-items:center;gap:10px}.cf-badge{background:#f1f5f9;padding:5px 9px;border-radius:999px;font-size:12px}.cf-toolbar{display:flex;align-items:end;gap:10px;justify-content:space-between;margin-bottom:15px}.cf-toolbar input,.cf-toolbar select{min-width:180px}.cf-primary{background:var(--red);color:#fff;border:0;border-radius:7px;padding:10px 15px;font-weight:700;cursor:pointer}.cf-secondary{background:#fff;border:1px solid #d6d9dd;border-radius:7px;padding:10px 15px;cursor:pointer}.cf-danger{background:#fff0ef;color:var(--red);border:0;border-radius:6px;padding:7px 10px;cursor:pointer}.cf-link{background:none;border:0;color:var(--red);font-weight:700;cursor:pointer}.cf-actions{display:flex;gap:10px;flex-wrap:wrap}.cf-mini{display:grid;grid-template-columns:1fr auto;gap:9px;color:var(--muted)}.cf-mini b{color:#111}.cf-date{display:flex;gap:10px}.cf-date label{font-size:12px;font-weight:600}.cf-date input{display:block;margin-top:5px}.att-person{display:flex;align-items:center;gap:12px;padding:10px 8px;border-bottom:1px solid #f0f1f3;cursor:pointer}.att-person input{width:auto}.att-person span{flex:1}.att-person small{display:block;color:var(--muted)}.att-person em{font-style:normal;color:var(--muted);font-size:12px}.cf-savebar{position:sticky;bottom:10px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px 15px;margin-top:14px;display:flex;justify-content:space-between;align-items:center}.cf-form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:13px}.cf-modal-card label{display:block;font-size:13px;font-weight:600;margin-bottom:12px}.cf-modal-card input,.cf-modal-card select{display:block;width:100%;box-sizing:border-box;margin-top:5px;padding:10px;border:1px solid #d7dbe0;border-radius:7px;background:#fff}.cf-checks{display:flex;gap:20px;margin:4px 0 16px}.cf-checks input{display:inline;width:auto}.cf-modal{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;justify-content:center;align-items:center;z-index:99999;padding:20px}.cf-modal-card{position:relative;background:#fff;border-radius:12px;padding:25px;max-width:780px;width:100%;max-height:90vh;overflow:auto}.cf-close{position:absolute;right:10px;top:6px;border:0;background:none;font-size:28px;cursor:pointer}.profile-head{display:flex;justify-content:space-between;align-items:start}.profile-head h2{margin:0}.profile-head p{color:var(--muted)}.profile-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin:18px 0}.profile-grid>div{background:#f8f9fa;padding:13px;border-radius:8px}.profile-grid b,.profile-grid span{display:block}.profile-grid span{margin-top:5px}.progress{height:8px;background:#e5e7eb;border-radius:99px;overflow:hidden}.progress i{display:block;height:100%;background:var(--red)}.week-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}.week-grid div{padding:10px;background:#f3f4f6;border-radius:7px;text-align:center;font-size:12px}.week-grid div.hit{background:#e9f7ef;color:#16734a}.week-grid b{display:block;margin-top:4px}.profile-actions{display:flex;gap:10px;margin-top:18px}.cf-map{color:var(--red);font-weight:700}.muted{color:var(--muted)}hr{border:0;border-top:1px solid var(--line);margin:18px 0}.cf-loading{text-align:center;padding:50px;color:var(--muted)}
@media(max-width:900px){.cf-grid.four{grid-template-columns:repeat(2,1fr)}.cf-grid.two{grid-template-columns:1fr}.cf-sidebar{width:190px}.cf-main{padding:22px}.cf-form-grid,.profile-grid{grid-template-columns:1fr}.week-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:650px){.cf-sidebar{display:none}.cf-main{padding:15px;margin:0}.cf-header{align-items:flex-start;gap:8px}.cf-header h1{font-size:22px}.cf-grid.four{grid-template-columns:1fr 1fr}.cf-toolbar{flex-wrap:wrap;align-items:stretch}.cf-toolbar input,.cf-toolbar select{min-width:100%}.cf-date{width:100%;flex-wrap:wrap}.cf-date label{flex:1;min-width:140px}}

/* V1.2 frontend mode */
.cf-modal[hidden]{display:none !important}
.cf-frontend{width:100%;min-height:100vh;background:#f5f6f8;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;color:#171717}
.cf-frontend-topbar{height:64px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px;box-sizing:border-box}
.cf-frontend-brand{display:flex;align-items:center;gap:9px;font-size:18px}.cf-frontend-brand .dashicons{color:var(--red)}
.cf-user-area{display:flex;align-items:center;gap:15px;font-size:14px}.cf-user-area a{color:var(--red);font-weight:700;text-decoration:none}
.cf-frontend-layout{display:flex;min-height:calc(100vh - 64px)}.cf-frontend .cf-sidebar{width:235px;flex:0 0 235px;box-sizing:border-box}.cf-frontend .cf-main{flex:1;min-width:0}
.cf-login-box{max-width:520px;margin:80px auto;padding:35px;background:#fff;border:1px solid #e5e7eb;border-radius:14px;text-align:center;box-shadow:0 5px 20px rgba(0,0,0,.05)}
.cf-login-box h2{margin-top:0}.cf-login-box .cf-primary{display:inline-block;text-decoration:none;margin-top:10px}
@media(max-width:700px){.cf-frontend-topbar{padding:0 15px}.cf-user-area span{display:none}.cf-frontend-layout{display:block}.cf-frontend .cf-sidebar{width:100%;display:flex;overflow-x:auto;padding:8px;background:#fff;border-right:0;border-bottom:1px solid var(--line);gap:4px}.cf-frontend .cf-nav{white-space:nowrap;width:auto}.cf-frontend .cf-main{padding:16px}}

/* V1.3 Sunday attendance and user management */
.attendance-summary{display:flex;align-items:center;gap:18px;padding:12px 14px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:9px;margin:12px 0}.attendance-summary span{color:#64748b}.attendance-summary b{color:#111;font-size:16px}.attendance-summary button{margin-left:auto}.attendance-summary button+button{margin-left:0}.att-person{transition:background .15s}.att-person:hover{background:#fafafa}.att-person:has(.att-check:checked){background:#fff7f6}.cf-savebar small{display:block;color:#64748b;margin-top:3px}.cf-danger{margin-left:5px}
@media(max-width:650px){.attendance-summary{flex-wrap:wrap;gap:9px}.attendance-summary button{margin-left:0}.cf-savebar{bottom:4px}.cf-savebar small{max-width:190px}}

/* V1.4 follow-up queue, charts and school profile */
.queue-row{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:15px 0;border-bottom:1px solid #f0f1f3}.queue-row small{display:block;color:#64748b;margin-top:4px}.queue-progress{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.queue-progress span{font-size:12px;color:#64748b}.queue-progress b{font-size:12px}.queue-progress em{font-style:normal;background:#fff1f0;color:#b42318;padding:4px 7px;border-radius:99px;font-size:11px}.cf-bars{display:flex;flex-direction:column;gap:12px}.bar-row{display:grid;grid-template-columns:150px 1fr 35px;gap:10px;align-items:center;font-size:13px}.bar-row>div{height:10px;background:#eef0f2;border-radius:99px;overflow:hidden}.bar-row i{display:block;height:100%;background:var(--red);border-radius:99px}.bar-row b{text-align:right}.profile-location{display:flex;gap:10px;align-items:center;margin:12px 0}.profile-schools{display:flex;flex-wrap:wrap;gap:8px}.school-pill{display:flex;align-items:center;gap:8px;background:#f3f4f6;border-radius:8px;padding:7px 9px}.school-pill small{color:#64748b}.school-pill button{border:0;background:none;cursor:pointer;font-size:17px}.school-add{display:flex;gap:8px;margin-top:10px}.school-add select{max-width:300px}
@media(max-width:700px){.queue-row{align-items:flex-start;flex-direction:column}.queue-progress{justify-content:flex-start}.bar-row{grid-template-columns:105px 1fr 28px}.profile-location,.school-add{flex-wrap:wrap}}

/* V1.5 production polish */
.cf-standalone-app{min-height:100vh;background:#f5f6f8}.report-filterbar{align-items:flex-end}.report-filters{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap}.report-filters label{font-size:11px;font-weight:700;color:#64748b;display:flex;flex-direction:column;gap:4px}.report-filters input,.report-filters select{min-height:38px}.cf-table-wrap{overflow:auto;border:1px solid #e5e7eb;border-radius:10px}.cf-table{width:100%;border-collapse:collapse;min-width:760px;background:#fff}.cf-table th,.cf-table td{padding:11px 12px;border-bottom:1px solid #edf0f2;text-align:left;font-size:13px}.cf-table th{background:#f8fafc;font-size:11px;text-transform:uppercase;color:#64748b}.cf-report-actions{display:flex;justify-content:flex-end;margin:12px 0}.audit-row{padding:12px 0;border-bottom:1px solid #edf0f2}.audit-row small{display:block;color:#64748b;margin-top:4px}.audit-row p{margin:5px 0 0;color:#475569;font-size:12px}.production-tools{margin-top:16px}
@media(max-width:800px){.report-filterbar{align-items:flex-start}.report-filters{width:100%}.report-filters label{flex:1;min-width:120px}.report-filters .cf-primary{width:100%}.cf-table{min-width:700px}}

/* V1.6 frontend login */
.cf-auth-page{min-height:calc(100vh - 40px);display:flex;align-items:center;justify-content:center;padding:30px 16px;background:#f5f6f8;box-sizing:border-box}.cf-auth-card{width:100%;max-width:430px;background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:34px;box-sizing:border-box;box-shadow:0 10px 35px rgba(0,0,0,.06)}.cf-auth-logo{font-weight:800;font-size:20px;margin-bottom:30px}.cf-auth-card h1{margin:0 0 8px;font-size:28px}.cf-auth-card>p{color:#64748b;margin:0 0 25px}.cf-auth-card form label{display:block;font-size:13px;font-weight:700;margin:0 0 16px}.cf-auth-card input[type=text],.cf-auth-card input[type=password]{width:100%;box-sizing:border-box;margin-top:7px;min-height:44px;border:1px solid #d8dce1;border-radius:8px;padding:10px 12px;font-size:15px}.cf-password-wrap{position:relative}.cf-password-wrap input{padding-right:62px!important}.cf-password-wrap button{position:absolute;right:7px;top:14px;border:0;background:transparent;font-size:12px;font-weight:700;cursor:pointer;color:#b42318}.cf-remember{display:flex!important;align-items:center;gap:8px;font-weight:500!important}.cf-remember input{width:auto!important;margin:0}.cf-login-button{width:100%;min-height:46px}.cf-login-error{margin:0 0 15px;padding:10px 12px;border-radius:8px;background:#fff1f0;color:#b42318;font-size:13px}.cf-forgot{display:block;text-align:center;margin-top:18px;color:#64748b;text-decoration:none;font-size:13px}.cf-forgot:hover{color:var(--red)}
@media(max-width:500px){.cf-auth-card{padding:25px}.cf-auth-page{padding:15px}}
