.initializing .wrap{visibility:hidden}
.wrap{max-width:1160px;padding:24px 24px 60px}
.account-nav{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:24px;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.account-nav a{color:var(--brand);text-decoration:none;font-size:14px}
.workspace-links,.account-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.workspace-links a{display:flex;align-items:center;min-height:44px;padding:8px 16px;border-radius:8px;font-weight:700}
.workspace-links a.active{background:var(--brand-soft);color:var(--brand-dark)}
.account-tools a,.account-tools button{font-size:12px}
.account-tools #coach-name{font-size:13px;font-weight:700;color:var(--ink);border-right:1px solid var(--line);padding-right:12px}
button,input,select,textarea{font:inherit}
.account-nav button,.pager button,#history-filter button{min-height:44px;padding:8px 14px;border:1px solid var(--brand);border-radius:10px;background:#fff;color:var(--brand);cursor:pointer}
#formView{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px}
#formView .card{margin:0;padding:24px;box-shadow:none;border:1px solid var(--line);border-radius:14px;min-width:0}
.form-options,#formView .cta-row,#formHint,#formView .deco{grid-column:1/-1}
.form-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
.form-basics .field:last-child{grid-column:1/-1}
.form-fields .field{min-width:0;margin:0}
.form-fields input{min-width:0;width:100%;font-size:14px;min-height:48px}
.form-fields .opt{min-height:48px;margin:0;padding:12px;font-size:14px;font-weight:400;border-width:1px}
.form-schedule #schedule-hint{margin:18px 0 0;font-size:13px;color:var(--sub);line-height:1.8}
.option-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.option-grid .opt{margin:0;font-size:14px;padding:14px 40px 14px 16px;min-height:54px}
.form-options .aux{margin-top:20px}
#formView .cta-row{margin:0;justify-content:flex-end}
#formView .cta-row .btn{flex:0 1 280px;min-height:52px}
#formHint{margin:0;font-size:13px}
input[readonly]{background:var(--brand-soft);color:var(--brand-dark)}
.field label{display:block}
.field select,.field textarea{display:block;width:100%;padding:12px;border:1px solid var(--line);border-radius:10px;background:#fff}
.result-cta{flex-wrap:wrap}
.result-cta .btn{min-width:140px}
.record-state{color:var(--brand);font-weight:700}
.record-state p{font-size:13px;font-weight:400;overflow-wrap:anywhere}
.tb{overflow-wrap:anywhere;table-layout:fixed}
.back{min-height:44px}
.pager{display:flex;gap:10px;align-items:center;justify-content:space-between}
.pager span{font-size:13px}
.history-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:32px 0 24px}
.history-heading h1{font-size:28px;letter-spacing:.5px;margin:0;line-height:1.4}
.history-heading p{font-size:14px;color:var(--sub);margin:8px 0 0}
.history-new{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 20px;border-radius:8px;background:var(--brand);color:#fff;text-decoration:none;font-size:14px;font-weight:700;white-space:nowrap}
.history-panel{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}
#history-filter{display:flex;gap:10px;padding:20px 24px;margin:0;border-bottom:1px solid var(--line)}
.history-search{display:block;flex:1;max-width:440px;min-width:0}
#history-filter input{display:block;width:100%;min-width:0;border:1px solid var(--line);border-radius:8px;padding:11px 14px;font-size:14px;min-height:44px;background:#fcfaf6}
#history-filter button{border-radius:8px;font-size:14px;padding:8px 22px}
.history-columns,.history-row{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(0,.7fr) minmax(0,1.65fr) minmax(0,.9fr) minmax(0,1.35fr) minmax(0,.9fr);align-items:center;gap:18px;padding:16px 24px}
.history-columns{background:#f8faf7;color:var(--sub);font-size:12px}
.history-row{min-height:104px;border-bottom:1px solid var(--line);font-size:13px}
.history-row:last-child{border-bottom:0}
.history-row:hover{background:#fcfdfb}
.history-store{min-width:0}
.history-store h3{font-size:15px;font-weight:700;margin:0 0 5px;overflow-wrap:anywhere;line-height:1.5}
.history-store>span{font-size:12px;color:var(--sub);overflow-wrap:anywhere}
.tier-label{display:inline-block;background:var(--brand-soft);color:var(--brand-dark);padding:4px 10px;border-radius:6px;font-weight:700;white-space:nowrap}
.history-dates{display:grid;gap:4px;font-variant-numeric:tabular-nums}
.history-dates>span{white-space:nowrap}
.history-dates small{display:inline-block;color:var(--sub);font-size:11px;min-width:56px}
.status-label{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font-size:12px}
.status-label:before{content:"";width:6px;height:6px;background:#ca921c;border-radius:50%}
.status-label.confirmed:before{background:var(--brand)}
.history-created{font-size:12px;color:var(--sub);font-variant-numeric:tabular-nums}
.history-action button{border:0;background:transparent;color:var(--brand);font-size:13px;min-height:44px;padding:8px 0;cursor:pointer;white-space:nowrap;font-weight:700}
.history-action button span{margin-left:8px}
.history-empty{padding:64px 24px;text-align:center;color:var(--sub);font-size:14px}
.history-empty strong{display:block;color:var(--ink);font-size:17px}
.history-empty p{margin:8px 0 0}
.history-empty button{margin-top:18px}
.history-pager{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 24px;border-top:1px solid var(--line);font-size:12px;color:var(--sub)}
.history-pager>div{display:flex;align-items:center;gap:14px}
.history-pager button{min-height:40px;padding:8px 12px;background:#fff;color:var(--brand);border:1px solid var(--line);border-radius:8px;font-size:12px;cursor:pointer}
.history-pager button:disabled{color:#a6aaa4;background:#f7f8f5;cursor:default}
.mobile-label{display:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.account-nav a:focus-visible,.history-new:focus-visible,button:focus-visible,input:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
#notice{position:fixed;z-index:20;bottom:20px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 32px);padding:12px 18px;border-radius:12px;background:var(--brand);color:#fff;box-shadow:var(--shadow)}
#notice.error{background:#a33224}
dialog{border:0;border-radius:18px;padding:0;width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 32px);box-shadow:var(--shadow);color:var(--ink)}
dialog::backdrop{background:rgba(0,0,0,.4)}
.modal-head{position:sticky;top:0;z-index:1;background:#fff;display:flex;justify-content:space-between;align-items:center;padding:16px;border-bottom:1px solid var(--line)}
.modal-head h2{font-size:18px;margin:0}
.icon-button{width:44px;height:44px;background:#fff;border:1px solid var(--line);border-radius:10px;cursor:pointer}
.icon-button img{width:20px;height:20px}
.modal-body{padding:18px;overflow-y:auto}
.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:18px;flex-wrap:wrap}
.primary,.secondary{min-height:44px;padding:10px 16px;border-radius:10px;border:1px solid var(--brand);cursor:pointer}
.primary{background:var(--brand);color:#fff}.secondary{background:#fff;color:var(--brand)}
.date-choice-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.date-choice{display:flex;flex-direction:column;align-items:center;min-height:72px;padding:8px 4px;background:#fff;border:1px solid var(--line);border-radius:10px;cursor:pointer}
.date-choice.preferred{background:var(--brand-soft);border-color:var(--brand)}
.date-choice.selected{outline:2px solid var(--brand)}
.date-choice span,.date-choice small{font-size:11px}.date-choice small{color:var(--brand)}
.plan-detail{overflow-wrap:anywhere}
@media(max-width:540px){header{gap:10px}.ht{font-size:18px}.logo{height:36px}.account-nav{gap:10px}.account-nav a{font-size:12px}.date-choice-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.tb th,.tb td{padding:8px 6px;font-size:12px}.modal-actions>*{flex:1}.pager{flex-wrap:wrap}.mat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){
  .account-tools{gap:10px}.account-nav{gap:10px}.account-tools #coach-name{display:none}
  .history-columns{display:none}.history-panel{background:transparent;border:0;overflow:visible}
  #history-filter{padding:0 0 18px;border:0}.history-search{max-width:none}
  .history-list{display:grid;gap:14px}
  .history-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"store status" "tier status" "dates dates" "created action";gap:10px 16px;background:#fff;padding:20px;border:1px solid var(--line);border-radius:12px}
  .history-row:last-child{border-bottom:1px solid var(--line)}
  .history-store{grid-area:store}.history-tier{grid-area:tier}.history-status{grid-area:status;align-self:start;padding-top:3px}
  .history-dates{grid-area:dates;grid-template-columns:repeat(2,minmax(0,1fr));padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-top:4px}
  .history-dates small{display:block;margin-bottom:4px}
  .history-created{grid-area:created}.history-action{grid-area:action}.mobile-label{display:block;font-size:11px}
  .history-empty{background:#fff;border:1px solid var(--line);border-radius:12px}
  .history-pager{padding:18px 0;border:0}
}
@media(max-width:680px){
  .wrap{padding:16px 16px 40px}header{align-items:flex-start}.hs{max-width:230px}
  .account-nav{align-items:stretch;margin-bottom:20px;gap:8px}.workspace-links,.account-tools{width:100%}
  .workspace-links a{flex:1;justify-content:center}.account-tools{justify-content:space-between;gap:6px}.account-tools button{padding:8px 10px}
  #formView{grid-template-columns:minmax(0,1fr);gap:16px}#formView .card{padding:20px 16px}
  .form-fields,.option-grid{grid-template-columns:minmax(0,1fr)}.form-basics .field:last-child{grid-column:auto}
  .form-fields{gap:14px}.form-options .aux{margin-top:16px}.option-grid .opt{font-size:14px}
  #formView .cta-row .btn{flex:1}.history-heading{align-items:flex-start;gap:12px;margin:24px 0 20px}
  .history-heading h1{font-size:22px}.history-heading p{font-size:12px;max-width:200px}
  .history-new{padding:10px 12px;font-size:12px}.history-row{padding:16px}
  .history-pager{flex-wrap:wrap;gap:12px}.history-pager>div{width:100%;justify-content:space-between}.history-pager button{min-height:44px}
}
