/* /assets/css/coach_plan_billing.css */

body.coach-billing-page{
  --cb-bg:#f4f6f9;
  --cb-panel:#ffffff;
  --cb-panel-2:#f8fafc;
  --cb-text:#111827;
  --cb-muted:#4b5563;
  --cb-soft:#64748b;
  --cb-line:rgba(17,24,39,.14);
  --cb-line-strong:rgba(17,24,39,.22);
  --cb-gold:#f2b705;
  --cb-green:#0f9f6e;
  --cb-red:#d14343;
  --cb-blue:#2563eb;
  margin:0;
  min-height:100dvh;
  background:var(--cb-bg);
  color:var(--cb-text);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  letter-spacing:0;
}

body.coach-billing-page[data-theme="dark"],
body.coach-billing-page:not([data-theme="light"]){
  --cb-bg:#090f19;
  --cb-panel:#111a27;
  --cb-panel-2:#0d1522;
  --cb-text:#f5f8ff;
  --cb-muted:#b7c3d5;
  --cb-soft:#91a0b6;
  --cb-line:rgba(148,163,184,.18);
  --cb-line-strong:rgba(148,163,184,.30);
  --cb-gold:#ffd166;
  --cb-green:#34d399;
  --cb-red:#fb7185;
  --cb-blue:#7aa7ff;
}

.cb-page{
  width:min(1480px,100%);
  margin:0 auto;
  padding:24px 18px 54px;
  box-sizing:border-box;
}

.cb-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  padding:24px;
  border:1px solid var(--cb-line);
  border-radius:8px;
  background:linear-gradient(135deg,var(--cb-panel),var(--cb-panel-2));
  box-shadow:0 18px 44px rgba(15,23,42,.08);
}

.cb-kicker{
  margin:0 0 8px;
  color:#a26d00;
  font-size:12px;
  font-weight:950;
  text-transform:uppercase;
}

body.coach-billing-page:not([data-theme="light"]) .cb-kicker{color:var(--cb-gold);}

.cb-hero h1{
  margin:0;
  color:var(--cb-text);
  font-size:clamp(28px,4vw,46px);
  line-height:1.02;
  font-weight:950;
}

.cb-hero p{
  max-width:760px;
  margin:10px 0 0;
  color:var(--cb-muted);
  line-height:1.55;
}

.cb-status{
  min-width:260px;
  padding:14px;
  border:1px solid var(--cb-line);
  border-radius:8px;
  background:var(--cb-panel);
}

.cb-status b{display:block;color:var(--cb-text);font-size:14px;}
.cb-status span{display:block;margin-top:5px;color:var(--cb-muted);font-size:12px;line-height:1.4;}

.cb-grid{
  display:grid;
  grid-template-columns:minmax(320px,420px) minmax(0,1fr);
  gap:16px;
  margin-top:16px;
}

.cb-panel{
  border:1px solid var(--cb-line);
  border-radius:8px;
  background:var(--cb-panel);
  box-shadow:0 12px 30px rgba(15,23,42,.07);
  overflow:hidden;
}

.cb-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:18px;
  border-bottom:1px solid var(--cb-line);
}

.cb-panel-head h2{
  margin:0;
  color:var(--cb-text);
  font-size:18px;
  line-height:1.2;
}

.cb-panel-head p{
  margin:5px 0 0;
  color:var(--cb-muted);
  font-size:13px;
  line-height:1.45;
}

.cb-form{
  display:grid;
  gap:14px;
  padding:18px;
}

.cb-field{display:grid;gap:7px;}
.cb-field label{color:var(--cb-muted);font-size:12px;font-weight:850;}
.cb-field input,
.cb-field select{
  width:100%;
  min-height:44px;
  box-sizing:border-box;
  border:1px solid var(--cb-line-strong);
  border-radius:8px;
  background:var(--cb-panel-2);
  color:var(--cb-text);
  padding:0 12px;
  font:inherit;
}

.cb-field input:focus,
.cb-field select:focus,
.cb-button:focus-visible{
  outline:3px solid rgba(242,183,5,.38);
  outline-offset:2px;
}

.cb-field small{
  color:var(--cb-soft);
  font-size:12px;
  line-height:1.4;
}

.cb-two{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.cb-check{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:11px;
  border:1px solid var(--cb-line);
  border-radius:8px;
  background:var(--cb-panel-2);
}

.cb-check input{width:18px;height:18px;margin-top:1px;}
.cb-check span{display:block;color:var(--cb-text);font-weight:850;font-size:13px;}
.cb-check small{display:block;margin-top:3px;color:var(--cb-soft);line-height:1.35;}

.cb-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.cb-button{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid var(--cb-line-strong);
  border-radius:8px;
  background:var(--cb-panel-2);
  color:var(--cb-text);
  padding:0 14px;
  font:inherit;
  font-weight:900;
  cursor:pointer;
  text-decoration:none;
}

.cb-button.primary{
  border-color:#d99b00;
  background:linear-gradient(180deg,#ffd65a,#f2b705);
  color:#1f1600;
}

.cb-button.success{
  border-color:rgba(15,159,110,.34);
  color:#065f46;
  background:rgba(220,252,231,.92);
}

.cb-button.warn{
  border-color:rgba(242,183,5,.46);
  color:#713f12;
  background:rgba(254,243,199,.92);
}

.cb-button.danger{
  border-color:rgba(209,67,67,.35);
  color:#8b1e1e;
  background:rgba(255,241,242,.86);
}

body.coach-billing-page:not([data-theme="light"]) .cb-button.success{
  color:#bbf7d0;
  background:rgba(15,159,110,.18);
}

body.coach-billing-page:not([data-theme="light"]) .cb-button.warn{
  color:#fde68a;
  background:rgba(242,183,5,.16);
}

body.coach-billing-page:not([data-theme="light"]) .cb-button.danger{
  color:#fecdd3;
  background:rgba(127,29,29,.28);
}

.cb-button.tiny{
  min-height:34px;
  padding:0 10px;
  font-size:12px;
}

.cb-button[disabled]{
  opacity:.58;
  cursor:not-allowed;
}

.cb-notice{
  margin:0;
  padding:12px 14px;
  border:1px solid rgba(37,99,235,.22);
  border-radius:8px;
  background:rgba(37,99,235,.08);
  color:var(--cb-muted);
  font-size:13px;
  line-height:1.45;
  overflow-wrap:anywhere;
}

.cb-notice.warn{
  border-color:rgba(242,183,5,.34);
  background:rgba(242,183,5,.10);
}

.cb-table-wrap{overflow:auto;}
.cb-table{
  width:100%;
  border-collapse:collapse;
  min-width:860px;
}

.cb-table th,
.cb-table td{
  padding:12px 14px;
  border-bottom:1px solid var(--cb-line);
  text-align:left;
  vertical-align:top;
}

.cb-table th{
  color:var(--cb-soft);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
  background:var(--cb-panel-2);
}

.cb-athlete-name{font-weight:950;color:var(--cb-text);}
.cb-athlete-email{margin-top:3px;color:var(--cb-soft);font-size:12px;}

.cb-row-actions{
  min-width:250px;
}

.cb-row-actions .cb-button{
  margin:0 6px 6px 0;
}

.cb-pill{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:0 9px;
  border-radius:999px;
  border:1px solid var(--cb-line);
  background:var(--cb-panel-2);
  color:var(--cb-muted);
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}

.cb-pill.active{color:#065f46;background:#dcfce7;border-color:rgba(15,159,110,.35);}
.cb-pill.pending{color:#854d0e;background:#fef3c7;border-color:rgba(242,183,5,.38);}
.cb-pill.past_due,
.cb-pill.paused{color:#991b1b;background:#fee2e2;border-color:rgba(209,67,67,.28);}
.cb-pill.cancelled,
.cb-pill.inactive{color:#475569;background:#e2e8f0;}

body.coach-billing-page:not([data-theme="light"]) .cb-pill.active{color:#bbf7d0;background:rgba(15,159,110,.16);}
body.coach-billing-page:not([data-theme="light"]) .cb-pill.pending{color:#fde68a;background:rgba(242,183,5,.14);}
body.coach-billing-page:not([data-theme="light"]) .cb-pill.past_due,
body.coach-billing-page:not([data-theme="light"]) .cb-pill.paused{color:#fecdd3;background:rgba(209,67,67,.16);}
body.coach-billing-page:not([data-theme="light"]) .cb-pill.cancelled,
body.coach-billing-page:not([data-theme="light"]) .cb-pill.inactive{color:#cbd5e1;background:rgba(148,163,184,.12);}

.cb-empty{
  padding:28px;
  color:var(--cb-muted);
  text-align:center;
}

.cb-toast{
  position:fixed;
  right:18px;
  bottom:86px;
  z-index:12000;
  max-width:min(360px,calc(100vw - 36px));
  box-sizing:border-box;
  overflow-wrap:anywhere;
  padding:12px 14px;
  border:1px solid var(--cb-line);
  border-radius:8px;
  background:var(--cb-panel);
  color:var(--cb-text);
  box-shadow:0 20px 50px rgba(0,0,0,.20);
}

.cb-toast[hidden]{display:none;}

@media(max-width:980px){
  .cb-hero{align-items:stretch;flex-direction:column;}
  .cb-status{min-width:0;}
  .cb-grid{grid-template-columns:1fr;}
}

@media(max-width:620px){
  .cb-page{padding:16px 12px 42px;}
  .cb-hero{padding:18px;}
  .cb-hero h1{font-size:30px;}
  .cb-two{grid-template-columns:1fr;}
  .cb-actions{align-items:stretch;}
  .cb-button{width:100%;}
}
