.affiliate-portal{max-width:860px;margin:0 auto;padding:24px 12px 48px}.affiliate-portal-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}.affiliate-primary-card,.affiliate-list-card{padding:20px;border:1px solid #ded8cd;border-radius:16px;background:#fff;margin:16px 0}.affiliate-primary-card form{display:grid;gap:16px}.affiliate-primary-card label,#affiliates-view label{display:grid;gap:8px}.affiliate-stepper{display:flex;align-items:center;gap:8px}.affiliate-stepper input{max-width:110px;text-align:center}.affiliate-stepper button,.affiliate-portal button,#affiliates-view button{min-height:44px}.affiliate-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}.affiliate-list-card dl{display:grid;grid-template-columns:1fr auto;gap:8px}.affiliate-list-card dd{margin:0;text-align:right}.affiliate-portal input,.affiliate-portal select,#affiliates-view input,#affiliates-view select{min-height:44px;max-width:100%}.affiliate-primary-card [data-url]{width:100%}#affiliates-view details{padding:16px;border:1px solid #ded8cd;border-radius:12px}#affiliates-view fieldset label{display:flex;align-items:center;gap:8px;margin:10px 0}#affiliates-view input[type=checkbox]{width:24px;height:24px}#affiliate-portal [role=alert],#affiliates-view [role=alert]{color:#9c3329}body[data-affiliate-portal=true] #app-view{display:none!important}@media(max-width:600px){.affiliate-portal{padding:16px 8px calc(32px + env(safe-area-inset-bottom))}.affiliate-primary-card,.affiliate-list-card{padding:16px}.affiliate-portal h1{font-size:24px}.affiliate-portal-header{align-items:flex-start}.affiliate-list-card dl{font-size:14px}}
.affiliate-portal button,#affiliates-open,#affiliates-nav{min-height:44px}
.affiliate-submit-button{display:inline-flex;align-items:center;justify-content:center;gap:8px}.affiliate-spinner{display:none;width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:affiliate-spinner-rotate .7s linear infinite}.affiliate-submit-button.is-loading .affiliate-spinner{display:inline-block}@keyframes affiliate-spinner-rotate{to{transform:rotate(360deg)}}
.ctv-sheet-overlay{position:fixed;inset:0;background:#181f24a6;z-index:2000;display:flex;align-items:flex-end;justify-content:center;padding:12px;overscroll-behavior:contain}
.ctv-sheet{background:#fff;color:#242b2b;width:min(640px,100%);max-height:min(92dvh,760px);overflow:hidden;border-radius:20px 20px 10px 10px;padding:16px 20px calc(20px + env(safe-area-inset-bottom));box-sizing:border-box}
.ctv-sheet [data-body]{max-height:calc(min(92dvh,760px) - 82px);overflow:auto;padding-bottom:8px;overscroll-behavior:contain}
.ctv-sheet header{display:flex;align-items:center;justify-content:space-between;gap:12px}.ctv-sheet h2{margin:8px 0 16px;font-size:22px}
.ctv-drag-handle{height:5px;width:48px;border-radius:10px;background:#bbb;margin:0 auto 12px;touch-action:none;padding-block:4px}
.ctv-sheet form,.ctv-sheet label,.ctv-bank{display:grid;gap:10px}.ctv-sheet label{margin:10px 0}.ctv-sheet input,.ctv-sheet select,.ctv-sheet button{min-height:44px;box-sizing:border-box;max-width:100%;font:inherit}
.ctv-sheet button{cursor:pointer;padding:10px 14px}.ctv-sheet [role=alert]{color:#9c3329}.ctv-sheet dl{display:grid;grid-template-columns:1fr auto;gap:8px;font-size:14px}.ctv-sheet dd{margin:0;text-align:right}
.ctv-room-option{display:flex;align-items:center;gap:12px;width:100%;background:#fff;border:1px solid #e6e6e6;border-radius:10px;margin:8px 0;text-align:left}
.ctv-room-option img,.ctv-room-current img,.ctv-room-fallback{width:64px;height:48px;object-fit:cover;border-radius:7px}.ctv-room-fallback{display:grid;place-items:center;background:#e8e9e5;font-size:25px;flex-shrink:0}
.ctv-room-current output{grid-column:2;color:#57544d;font-size:13px;line-height:1.35}
.ctv-date-field{position:relative}.ctv-date-display{position:relative;z-index:2;display:block;min-height:44px;box-sizing:border-box;padding:11px 12px;border:1px solid #d6d8d0;border-radius:8px;background:#fbfcf9;line-height:20px;cursor:pointer}.ctv-date-field:focus-within .ctv-date-display{border-color:#126e6a;box-shadow:0 0 0 2px #126e6a22}.ctv-native-datetime{position:absolute;z-index:1;inset:28px 0 0;width:100%;height:44px;opacity:.01;cursor:pointer}
.ctv-room-current{display:grid;grid-template-columns:auto 1fr;gap:6px 12px;padding:12px;background:#f4f5f0;border-radius:12px}.ctv-room-current small,.ctv-room-current button{grid-column:2}
.ctv-sheet [data-qr] img{width:240px;max-width:100%;height:auto}.ctv-sheet [data-progress]{padding:14px;background:#f2f5f0;border-radius:10px}
.ctv-balances{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.ctv-balances>div{display:grid;gap:8px;border:1px solid #ded8cd;border-radius:12px;padding:12px;background:#fff}
.ctv-bank{margin:10px 0;padding:12px;border:1px solid #ded8cd;border-radius:12px;grid-template-columns:repeat(3,1fr)}.ctv-bank p{grid-column:1/-1;margin:0}
.affiliate-portal button:disabled,.ctv-sheet button:disabled{opacity:.45;cursor:not-allowed}
.ctv-confirm-page{background:#f3f4ef;margin:0;padding:24px;font-family:system-ui,sans-serif;color:#242b2b}.ctv-confirm-page main{max-width:520px;margin:auto;background:#fff;border-radius:18px;padding:24px}
.ctv-confirm-page button{padding:12px 16px;min-height:44px;font:inherit;display:block;width:100%;margin:12px 0}.ctv-confirm-page dl{display:grid;grid-template-columns:1fr 1fr;gap:12px}.ctv-confirm-page dd{margin:0;text-align:right;overflow-wrap:anywhere}
@media(min-width:700px){.ctv-sheet-overlay{align-items:center}.ctv-sheet{border-radius:20px}.ctv-balances{grid-template-columns:repeat(4,1fr)}}
.affiliate-admin-shell{max-width:1000px;margin:0 auto;padding:12px}.affiliate-admin-shell .app-main{min-width:0}.affiliate-admin-shell nav{margin:12px 0}
.affiliate-admin-shell>nav,.affiliate-admin-shell #affiliates-open{display:none}.affiliate-admin-shell button{min-height:44px}

.affiliate-portal{box-sizing:border-box;min-width:0}
.affiliate-portal *{box-sizing:border-box}
.affiliate-portal h1,.affiliate-portal h2,.affiliate-portal p,.affiliate-portal strong{overflow-wrap:anywhere}
.affiliate-portal-header>div,.affiliate-section,.affiliate-account label{min-width:0}
.affiliate-portal-header>button{flex-shrink:0}
.affiliate-section{margin:24px 0}
.affiliate-section h2{margin:0 0 12px}
.affiliate-link-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #ded8cd;min-width:0}
.affiliate-link-row>div{display:grid;gap:4px;min-width:0}
.affiliate-link-row strong,.affiliate-link-row small{overflow-wrap:anywhere}
.affiliate-link-status,.affiliate-link-row small{font-size:13px;color:#57544d}
.affiliate-link-row button{flex-shrink:0}
.affiliate-link-token-note{max-width:160px;text-align:right}
.affiliate-portal [data-more-links]{margin-top:12px}
.affiliate-commission-note{font-size:14px;line-height:1.5;color:#57544d;margin:0 0 12px}
.affiliate-booking{border:1px solid #ded8cd;border-radius:12px;background:#fff;margin:8px 0;min-width:0}
.affiliate-booking>summary{position:relative;display:grid;gap:5px;min-height:44px;padding:12px 40px 12px 12px;cursor:pointer;list-style:none;overflow-wrap:anywhere}
.affiliate-booking>summary::-webkit-details-marker{display:none}
.affiliate-booking>summary::after{content:'⌄';position:absolute;right:15px;top:12px;font-size:20px}
.affiliate-booking[open]>summary::after{transform:rotate(180deg)}
.affiliate-booking>summary:focus-visible{outline:2px solid #456851;outline-offset:2px;border-radius:12px}
.affiliate-booking-stay,.affiliate-booking-totals{font-size:14px;line-height:1.45}
.affiliate-booking-stay{color:#57544d}
.affiliate-booking-detail{padding:0 12px 12px;border-top:1px solid #eee9df}
.affiliate-booking-detail dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 12px;font-size:14px;line-height:1.5}
.affiliate-booking-detail dt,.affiliate-booking-detail dd{overflow-wrap:anywhere}
.affiliate-booking-detail dd{margin:0;text-align:right}
.affiliate-change-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;padding-top:10px;border-top:1px solid #eee9df;font-size:13px;line-height:1.4}
.affiliate-change-summary button{min-height:36px;padding:7px 10px;white-space:nowrap}
.ctv-sheet .ctv-change-history-list details{border:1px solid #e6e6e1;border-radius:10px;padding:8px 10px;margin:8px 0}
.ctv-sheet .ctv-change-history-list summary{cursor:pointer;font-weight:600}
.ctv-sheet .ctv-change-history-list dl{grid-template-columns:minmax(0,1fr);gap:6px;margin:10px 0}
.ctv-sheet .ctv-change-history-list dd{text-align:left}
.affiliate-account{padding:16px;border:1px solid #ded8cd;border-radius:12px;background:#fff}
.affiliate-account form,.affiliate-account label{display:grid;gap:8px}
.affiliate-account input{width:100%}
.affiliate-password-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:4px}
.affiliate-password-actions p{margin:0;flex:1 1 150px;font-size:14px;font-weight:600}
.affiliate-password-actions [data-state=success]{color:#1e6b35}
.affiliate-password-actions [data-state=error],.affiliate-portal [data-destination-unavailable]{color:#9c3329}
@media(max-width:600px){
  .affiliate-section{margin:20px 0}
  .affiliate-link-row{gap:8px}
  .affiliate-link-token-note{max-width:110px;font-size:12px}
  .affiliate-booking-totals{font-size:13px}
  .affiliate-account{padding:12px}
}

/* Lovable partner dashboard, translated to vanilla components. All portal
   rules are scoped so operational/admin pages keep their own presentation. */
.affiliate-portal,.ctv-sheet-overlay{
  --ctv-bg:#faf8f3;--ctv-ink:#263c40;--ctv-muted:#637477;
  --ctv-primary:#187b75;--ctv-soft:#e4f3ef;--ctv-border:#e8e5dc;
  --ctv-shadow:0 1px 2px #263c4005,0 8px 24px -12px #263c4024;
  font-family:"Be Vietnam Pro",system-ui,sans-serif;font-size:15px;line-height:1.55;
  color:var(--ctv-ink);
}
.ctv-entry,body[data-affiliate-portal=true]{background:#faf8f3}
body[data-affiliate-portal=true]>.shell{max-width:none;padding:0}
.affiliate-portal{max-width:1160px;margin:0 auto;padding:32px 24px 48px;min-height:100dvh}
.affiliate-portal [hidden],.ctv-sheet-overlay [hidden]{display:none!important}
.affiliate-portal h1{font:600 34px/1.2 "Fraunces",Georgia,serif;letter-spacing:-.02em;margin:6px 0}
.affiliate-portal h2{font-size:23px;line-height:1.3;letter-spacing:-.025em;margin:0 0 16px}
.affiliate-portal p{margin-block:8px}
.affiliate-portal .eyebrow{color:var(--ctv-primary);font-size:12px;letter-spacing:.16em}
.affiliate-portal button,.ctv-sheet button{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border:0;border-radius:12px;min-height:44px;padding:11px 16px;
  font-size:15px;line-height:1.35;font-weight:650;background:#187b75;color:#fff;
}
.affiliate-portal button:hover:not(:disabled),.ctv-sheet button:hover:not(:disabled){filter:brightness(1.07)}
.affiliate-portal button.secondary,.ctv-sheet button.secondary{background:#f0ede5;color:var(--ctv-ink)}
.affiliate-portal :is(button,input,select,a,summary,[role=tabpanel]):focus-visible,
.ctv-sheet :is(button,input,select,a,summary):focus-visible{outline:3px solid #187b75;outline-offset:3px}
.affiliate-portal label{font-size:14px;font-weight:550;gap:8px}
.affiliate-portal input,.affiliate-portal select,.ctv-sheet input,.ctv-sheet select{
  border:1px solid #deded4;border-radius:12px;padding:12px 14px;min-width:0;
  min-height:46px;font-size:15px;background:#fff;color:#263c40;
}
.ctv-icon{display:inline-block;width:20px;height:20px;flex:0 0 20px;vertical-align:middle}
.affiliate-portal-header{margin-bottom:24px;align-items:center}
.ctv-header-subtitle{color:var(--ctv-muted);font-size:14px}
.ctv-header-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
.ctv-avatar{display:grid;place-items:center;flex-shrink:0;width:46px;height:46px;border-radius:50%;background:var(--ctv-soft);color:var(--ctv-primary);font-size:20px;font-weight:650}
.affiliate-portal .affiliate-tab-nav{
  position:static;display:inline-flex;align-items:center;gap:4px;width:auto;
  margin:0 0 26px;padding:6px;background:#fff;border:0;border-radius:18px;
  box-shadow:var(--ctv-shadow);overflow:visible;
}
.affiliate-portal .affiliate-tab-nav button{flex:none;gap:8px;padding:12px 18px;background:transparent;color:var(--ctv-muted);font-size:15px;font-weight:550;white-space:nowrap}
.affiliate-portal .affiliate-tab-nav button.active{background:var(--ctv-primary);color:#fff;box-shadow:none}
.affiliate-portal .affiliate-tab-nav button:focus-visible{outline:3px solid #b57427;outline-offset:2px}
.affiliate-portal [data-ctv-tab-panel]{min-width:0}
.affiliate-portal>.ctv-benefits-grid{display:grid;gap:28px;align-items:start}
.affiliate-portal .affiliate-primary-card{margin:0;padding:0;background:transparent;border:0;box-shadow:none}
.affiliate-portal .affiliate-primary-card form{gap:16px}
.ctv-property-choice{padding:20px 24px;background:#fff;border-radius:20px;box-shadow:var(--ctv-shadow)}
.affiliate-portal [data-open-website]{justify-self:start;color:var(--ctv-primary);font-size:14px;min-height:44px;display:inline-flex;align-items:center;padding:4px}
.ctv-offer-hero{background:linear-gradient(135deg,#16615f,#187f76 60%,#399b87);color:#fff;border-radius:26px;padding:28px;box-shadow:0 18px 40px -18px #177a7560}
.ctv-offer-hero .ctv-offer-title{font:600 28px/1.35 "Fraunces",Georgia,serif;margin:0 0 24px}
.ctv-discount-label{display:grid;text-align:center;color:#e7f6ef}
.affiliate-portal .affiliate-stepper{display:flex;justify-content:center;gap:20px;margin:6px 0 18px}
.affiliate-portal .affiliate-stepper button{width:52px;height:52px;padding:0;border-radius:16px;font-size:28px;background:#fff;color:var(--ctv-primary);flex-shrink:0}
.ctv-discount-input{display:flex;align-items:center;justify-content:center;font-size:42px;font-weight:650;color:#fff}
.affiliate-portal .affiliate-stepper input{width:2.25ch;max-width:2.25ch;padding:0;background:transparent;border:0;color:#fff;font-size:52px;line-height:1.2;font-weight:650;appearance:textfield;box-shadow:none}
.affiliate-stepper input::-webkit-inner-spin-button,.affiliate-stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.ctv-offer-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;border-top:3px solid #e8c177;padding-top:18px;margin:6px 0 24px;text-align:center}
.ctv-offer-stats>div{display:grid;align-content:start;gap:5px}
.ctv-offer-stats span{font-size:13px;color:#e0f0ed}
.ctv-offer-stats strong{font-size:27px;font-variant-numeric:tabular-nums}
.affiliate-portal .ctv-offer-hero [type=submit]{background:#fff;color:var(--ctv-primary);width:100%;min-height:48px}
.affiliate-portal .ctv-offer-hero [data-destination-unavailable]{color:#fff1ce}
.ctv-generated-link{padding:22px;margin-top:20px;border:1px solid #a2cbbb;border-radius:20px;background:#fff;box-shadow:var(--ctv-shadow)}
.ctv-generated-title{font-weight:650;color:#26764d}
.ctv-generated-link [data-expiry]{font-size:14px;color:var(--ctv-muted)}
.ctv-generated-link [data-url]{font-family:ui-monospace,monospace;font-size:14px;margin:8px 0}
.affiliate-portal .affiliate-section{margin:0 0 24px}
.ctv-recent-links{padding-top:0}
.affiliate-portal .affiliate-link-row{background:#fff;border:0;border-radius:18px;padding:18px;margin-bottom:12px;box-shadow:var(--ctv-shadow);align-items:start;flex-wrap:wrap}
.affiliate-link-row>div{flex:1 1 180px;gap:8px}
.affiliate-link-row .affiliate-link-status{justify-self:start}
.affiliate-link-row small{font-size:13px;color:var(--ctv-muted)}
.affiliate-link-row .affiliate-link-token-note{text-align:left;max-width:none;flex-basis:100%}
.ctv-chip{display:inline-flex;align-items:center;justify-content:center;gap:4px;width:fit-content;max-width:100%;border-radius:99px;padding:4px 10px;font-size:13px;font-weight:550;line-height:1.45;overflow-wrap:anywhere}
.ctv-chip-success{background:#e4f3e8;color:#237348}
.ctv-chip-warning{background:#fff1d5;color:#95601b}
.ctv-chip-info{background:#e9f1fc;color:#31659a}
.ctv-chip-muted{background:#f0eee8;color:#627376}
.ctv-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px 22px;text-align:center;background:#fff;border-radius:20px;box-shadow:var(--ctv-shadow);color:var(--ctv-muted)}
.ctv-empty>.ctv-icon{width:44px;height:44px;padding:10px;box-sizing:content-box;background:var(--ctv-soft);border-radius:18px;color:var(--ctv-primary)}
.ctv-empty strong{color:var(--ctv-ink);font-weight:600}
.ctv-empty p{font-size:14px}
.ctv-loading{padding:26px;border-radius:20px;background:#fff;color:var(--ctv-muted)}
.affiliate-portal>[data-error]:empty{display:none}
.affiliate-portal [role=alert]:not(:empty){padding:14px;border-radius:12px;background:#fff0eb}
.affiliate-portal .affiliate-commission-note{color:var(--ctv-muted);margin-bottom:20px;font-size:14px}
.affiliate-portal .affiliate-bookings{display:grid;gap:16px}
.affiliate-portal .ctv-booking-card{margin:0;background:#fff;border:0;border-radius:20px;box-shadow:var(--ctv-shadow)}
.affiliate-portal .ctv-booking-card>summary{padding:22px 44px 22px 22px;display:grid;gap:10px}
.ctv-booking-heading{display:flex;align-items:start;justify-content:space-between;flex-wrap:wrap;gap:10px}
.ctv-booking-heading>strong{font-size:17px;line-height:1.5}
.affiliate-portal .affiliate-booking-stay{display:flex;gap:8px;align-items:start;font-size:14px;color:var(--ctv-muted)}
.affiliate-portal .ctv-booking-amount{font-size:26px;font-weight:650;font-variant-numeric:tabular-nums}
.affiliate-portal .affiliate-booking-totals{font-size:14px;color:var(--ctv-primary)}
.affiliate-portal .affiliate-booking-detail{padding:16px 22px 22px;border-color:var(--ctv-border)}
.affiliate-booking-detail dt{color:var(--ctv-muted)}
.affiliate-booking-detail dd{font-weight:600}
.affiliate-portal .affiliate-change-summary{flex-wrap:wrap;border-color:var(--ctv-border);color:var(--ctv-muted)}
.affiliate-portal .affiliate-change-summary button{min-height:44px;font-size:14px}
.ctv-finance-layout{display:grid;gap:24px 28px;align-items:start}
.affiliate-portal .ctv-finance-layout>.affiliate-section{margin:0;min-width:0}
.affiliate-portal .ctv-balances{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px}
.affiliate-portal .ctv-balances>div{border:0;border-radius:18px;background:#fff;box-shadow:var(--ctv-shadow);padding:16px 12px;min-width:0;align-content:start}
.ctv-balances small{font-size:13px;color:var(--ctv-muted)}
.ctv-balances strong{font-size:clamp(16px,1.7vw,22px);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.affiliate-portal .ctv-balances>.ctv-balance-available{grid-column:1/-1;min-height:170px;align-content:center;padding:26px 28px;border-radius:26px;background:linear-gradient(140deg,#263f46,#206664);color:#fff;box-shadow:0 18px 40px -18px #177a7560}
.ctv-balance-available small{color:#d8e8e6;font-size:14px}
.ctv-balances .ctv-balance-available strong{font-size:clamp(34px,4vw,46px);letter-spacing:-.04em}
.ctv-balance-provisional strong{color:#95601b}
.ctv-balance-processing strong{color:#31659a}
.ctv-balance-paid strong{color:#237348}
.affiliate-portal [data-payout]{background:#fff;padding:22px;border-radius:20px;margin-top:18px;box-shadow:var(--ctv-shadow)}
.affiliate-portal [data-payout] select{width:100%}
.ctv-finance-note{font-size:14px;color:var(--ctv-muted)}
.ctv-surplus-section{grid-column:1/-1}
.ctv-surplus-card{padding:22px;border-left:4px solid #c48b35;border-radius:20px;background:#fff;box-shadow:var(--ctv-shadow);margin-bottom:14px}
.ctv-surplus-card>p{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}
.ctv-surplus-card>p strong{font-size:28px;color:#95601b;font-variant-numeric:tabular-nums}
.ctv-transaction{border:0;border-radius:18px;background:#fff;box-shadow:var(--ctv-shadow);margin-bottom:12px;min-width:0}
.ctv-transaction summary{display:flex;align-items:center;gap:12px;padding:18px;cursor:pointer;list-style:none;min-height:80px}
.ctv-transaction summary::-webkit-details-marker{display:none}
.ctv-transaction summary::after{content:'⌄';color:var(--ctv-muted)}
.ctv-transaction details[open]>summary::after{transform:rotate(180deg)}
.ctv-proof-action{padding:0 18px 16px}
.ctv-transaction-icon{display:grid;place-items:center;width:44px;height:44px;flex:0 0 44px;border-radius:13px;color:#237348;background:#e4f3e8}
.ctv-transaction-context{display:grid;gap:4px;min-width:0;flex:1}
.ctv-transaction-context small{font-size:13px;color:var(--ctv-muted);overflow-wrap:anywhere}
.ctv-finance-booking{display:grid;gap:3px;min-width:0;margin-top:5px;overflow-wrap:anywhere}
.ctv-finance-booking strong{font-size:14px;font-weight:550}
.ctv-finance-bookings{display:grid;gap:12px;margin-bottom:16px}
.ctv-header-email{font-size:14px;color:var(--ctv-muted)}
.ctv-booking-overview{display:flex;align-items:flex-start;gap:12px;min-width:0}
.ctv-booking-overview>.ctv-booking-heading{flex:1;min-width:0}
.ctv-room-visual{display:block;width:80px;height:60px;aspect-ratio:4/3;flex:0 0 80px;border-radius:12px;overflow:hidden;background:#e8eeea}
.ctv-room-visual>img,.ctv-room-visual>.ctv-room-fallback{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.ctv-room-visual>.ctv-room-fallback{display:grid;place-items:center;font-size:24px}
.ctv-room-option .ctv-room-visual,.ctv-room-current .ctv-room-visual{width:72px;height:54px;flex-basis:72px}
.ctv-transaction-value{display:grid;justify-items:end;gap:5px;min-width:0}
.ctv-transaction-value>strong{font-size:18px;font-variant-numeric:tabular-nums}
.ctv-transaction-detail{border-top:1px solid var(--ctv-border);padding:14px 18px;font-size:14px;overflow-wrap:anywhere}
.affiliate-portal .ctv-bank{display:block;overflow:hidden;margin:0 0 14px;padding:0;border:0;border-radius:20px;background:#fff;box-shadow:var(--ctv-shadow)}
.ctv-bank-face{padding:22px;background:#f0ede5}
.ctv-bank-default .ctv-bank-face{background:linear-gradient(140deg,#263f46,#206664);color:#fff}
.ctv-bank-title{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.ctv-bank-title>strong{flex:1;min-width:0;overflow-wrap:anywhere}
.ctv-bank-title .ctv-chip{background:#ffffff30;font-size:12px}
.affiliate-portal .ctv-bank-number{font:600 23px/1.5 ui-monospace,monospace;letter-spacing:.08em;margin-top:24px;overflow-wrap:anywhere}
.ctv-bank-holder{font-size:13px;opacity:.85}
.ctv-bank-face small{font-size:13px}
.ctv-bank-actions{display:flex;gap:4px;padding:8px}
.affiliate-portal .ctv-bank-actions button{flex:1;min-width:0;padding:10px 5px;background:transparent;color:var(--ctv-ink);font-size:14px;font-weight:550}
.affiliate-portal .ctv-bank-actions [data-delete]{color:#b94232}
.affiliate-portal [data-add-bank]{width:100%;border:2px dashed #187b7566;background:transparent;color:var(--ctv-primary)}
.ctv-account-grid{max-width:760px;margin:auto}
.ctv-profile-card{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:24px;background:#fff;border-radius:20px;margin-bottom:22px;box-shadow:var(--ctv-shadow)}
.ctv-profile-card>div{flex:1;min-width:0}
.ctv-profile-card strong{font-size:20px}
.ctv-profile-card p{font-size:14px;color:var(--ctv-muted)}
.affiliate-portal .affiliate-account{padding:24px;background:#fff;border:0;border-radius:20px;box-shadow:var(--ctv-shadow)}
.ctv-security-label{display:flex;align-items:center;gap:10px;font-weight:600;color:var(--ctv-primary);padding-bottom:12px}
.affiliate-account small{color:var(--ctv-muted)}
.ctv-sheet-overlay{background:#263c4066;backdrop-filter:blur(3px)}
.ctv-sheet{color:var(--ctv-ink);border-radius:26px 26px 12px 12px;padding:18px 24px calc(24px + env(safe-area-inset-bottom));box-shadow:0 24px 80px #163b4a40}
.ctv-sheet{display:flex;flex-direction:column}
.ctv-sheet>header,.ctv-sheet>.ctv-drag-handle,.ctv-sheet>[data-error]{flex-shrink:0}
.ctv-sheet [data-body]{min-height:0;max-height:none;overflow:auto}
.ctv-sheet h2{font-size:23px;letter-spacing:-.025em}
.ctv-sheet [data-close]{background:#f0ede5;color:#263c40;min-width:44px;font-size:24px}
.ctv-drag-handle{background:#d8ddd6;width:40px}
.ctv-sheet input[type=checkbox]{min-height:24px;width:24px;accent-color:#187b75}
.ctv-sheet label:has(input[type=checkbox]){display:flex;align-items:center}
.ctv-sheet [data-close-request]{background:#f0ede5;color:#263c40}
.ctv-sheet dd{overflow-wrap:anywhere;min-width:0}
.ctv-entry .login-card{border-radius:24px;box-shadow:0 8px 32px #263c4012}
.ctv-entry .login-card>p:not(.eyebrow){color:#637477;font-size:14px}
.ctv-entry .login-card h1{font-family:Georgia,serif}
.ctv-entry .login-card input,.ctv-entry .login-card button{min-height:46px;border-radius:12px}
@media(min-width:768px){
  .ctv-sheet-overlay{align-items:center}
  .ctv-sheet{border-radius:26px}
}
@media(min-width:1024px){
  .affiliate-portal>.ctv-benefits-grid{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)}
  .affiliate-portal .affiliate-bookings{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
  .affiliate-portal .ctv-recent-links{padding-top:0}
  .ctv-finance-layout{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ctv-finance-layout>[role=alert]{grid-column:1/-1}
  .ctv-surplus-card{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end}
  .ctv-surplus-card>p{grid-column:1/-1}
}
@media(max-width:767px){
  .affiliate-portal{padding:22px 16px calc(110px + env(safe-area-inset-bottom))}
  .affiliate-portal h1{font-size:28px}
  .affiliate-portal-header{gap:12px;margin-bottom:24px}
  .ctv-header-subtitle{display:none}
  .ctv-header-actions{gap:6px}
  .ctv-header-actions .ctv-avatar{display:none}
  .affiliate-portal .ctv-header-actions button{padding:10px;font-size:13px}
  .affiliate-portal .affiliate-tab-nav{
    position:fixed;top:auto;bottom:0;left:0;right:0;z-index:1200;display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));gap:2px;width:100%;margin:0;
    padding:8px max(8px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
    border:0;border-top:1px solid var(--ctv-border);border-radius:20px 20px 0 0;
    box-shadow:0 -8px 24px -12px #263c4030;background:#fffcf9;
  }
  .affiliate-portal .affiliate-tab-nav button{display:flex;flex-direction:column;gap:5px;min-width:0;min-height:58px;padding:6px 2px;font-size:12px;line-height:1.4;white-space:normal;border-radius:12px}
  .affiliate-portal .affiliate-tab-nav button.active{color:var(--ctv-primary);background:var(--ctv-soft)}
  .affiliate-portal h2{font-size:21px}
  .ctv-offer-hero{padding:24px 20px}
  .ctv-offer-hero .ctv-offer-title{font-size:25px}
  .ctv-offer-stats{gap:8px}
  .ctv-offer-stats strong{font-size:25px}
  .ctv-offer-stats span{font-size:13px;min-height:40px;display:flex;align-items:center;justify-content:center}
  .affiliate-portal .ctv-booking-card>summary{padding:20px 38px 20px 18px}
  .ctv-booking-heading{display:grid;gap:8px}
  .affiliate-portal .affiliate-booking-detail{padding:14px 18px 20px}
  .ctv-transaction summary{gap:10px;padding:16px 14px;flex-wrap:wrap}
  .ctv-transaction-icon{width:36px;height:40px;flex-basis:36px}
  .ctv-transaction-value>strong{font-size:17px}
  .ctv-transaction .ctv-chip{font-size:12px;padding-inline:8px}
  .ctv-profile-card{padding:20px;gap:12px}
  .ctv-sheet-overlay{padding:0}
  .ctv-sheet{padding-inline:20px;border-radius:26px 26px 0 0}
}
.affiliate-entry-switch{margin:14px 0 0;text-align:center}.link-button{padding:0;border:0;background:transparent;color:var(--ctv-primary);font-weight:700;text-decoration:underline;cursor:pointer}.affiliate-resend{margin-top:18px;padding-top:14px;border-top:1px solid var(--ctv-border)}.affiliate-resend p{margin:0 0 8px;color:var(--ctv-muted)}
.affiliate-pending-card{margin:14px 0;padding:15px 16px;border:1px solid #dfb35f;border-radius:14px;background:#fff7df;color:#674b17}.affiliate-pending-card strong{display:block;margin-bottom:5px}.affiliate-pending-card p{margin:0;line-height:1.5}
.affiliate-admin-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.affiliate-admin-tabs button{min-height:38px;padding:8px 13px}.affiliate-admin-tabs button.active{background:var(--ctv-primary);color:#fff}.affiliate-review-card dl{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 16px;margin:0 0 18px}.affiliate-review-card dt{color:var(--ctv-muted);font-size:13px}.affiliate-review-card dd{margin:0;font-weight:600;overflow-wrap:anywhere}.affiliate-review-card fieldset{display:grid;gap:8px;margin:16px 0;padding:12px;border:1px solid var(--ctv-border);border-radius:12px}.affiliate-review-card textarea{min-height:90px;resize:vertical}
@media(max-width:560px){.affiliate-review-card dl{grid-template-columns:1fr;gap:3px 0}.affiliate-review-card dd{margin-bottom:7px}.affiliate-admin-tabs{display:grid;grid-template-columns:1fr 1fr}.affiliate-admin-tabs button{width:100%}}
@media(prefers-reduced-motion:reduce){
  .affiliate-portal *,.ctv-sheet-overlay *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

/* CTV read-only room availability. The contract mirrors Bookphong's public
   presentation while keeping every action inside the authenticated portal. */
.affiliate-portal .ctv-room-availability{min-width:0}
.ctv-room-availability-header{display:flex;justify-content:space-between;align-items:start;gap:20px;margin-bottom:22px}
.ctv-room-availability-header h2{margin-bottom:6px}
.ctv-room-availability-header p:not(.eyebrow){color:var(--ctv-muted);font-size:14px}
.ctv-readonly-chip{display:inline-flex;align-items:center;padding:7px 12px;border-radius:99px;background:#f0ede5;color:var(--ctv-muted);font-size:13px;font-weight:600;white-space:nowrap}
.ctv-room-filters{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:12px;margin-bottom:16px;padding:18px;background:#fff;border-radius:20px;box-shadow:var(--ctv-shadow)}
.ctv-room-filters label{display:grid;gap:7px}
.ctv-room-message{min-height:22px;margin:4px 0 12px;font-size:14px}
.ctv-room-message[data-state=success]{color:#237348}
.ctv-room-message[data-state=error],.ctv-room-grid>[role=alert]{color:#9c3329}
.ctv-room-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start}
.ctv-room-card{min-width:0;overflow:hidden;background:#fff;border-radius:20px;box-shadow:var(--ctv-shadow)}
.affiliate-portal .ctv-room-card-main{display:block;width:100%;padding:0;text-align:left;background:transparent;color:var(--ctv-ink);border-radius:0}
.affiliate-portal .ctv-room-card-main:hover{filter:none;background:transparent;color:var(--ctv-ink)}
.ctv-room-card-image{position:relative;aspect-ratio:4/3;background:#e8eeea}
.ctv-room-card-image .ctv-room-visual{display:block;width:100%;height:100%;border-radius:0}
.ctv-room-card-image .ctv-room-visual>img,.ctv-room-card-image .ctv-room-visual>.ctv-room-fallback{width:100%;height:100%;object-fit:cover;border-radius:0}
.ctv-room-status{position:absolute;left:12px;top:12px}
.ctv-room-card-copy{display:grid;gap:4px;padding:16px 16px 4px}
.ctv-room-card-copy strong{font-size:17px;line-height:1.35}
.ctv-room-card-copy span,.ctv-room-card-main>small{color:var(--ctv-muted);font-size:13px}
.ctv-room-card-meta{display:flex;justify-content:space-between;align-items:start;gap:8px;padding:10px 16px 4px;font-size:13px}
.ctv-room-card-meta>span:first-child{display:flex;align-items:start;gap:6px;min-width:0;color:var(--ctv-primary)}
.ctv-room-card-meta .ctv-icon{width:17px;height:17px;flex-basis:17px}
.ctv-room-window-list{overflow-wrap:anywhere}
.ctv-room-window-list small{display:block;margin-top:4px;color:var(--ctv-muted)}
.ctv-room-availability-muted{color:var(--ctv-muted)}
.ctv-room-overnight{padding:4px 8px;border-radius:99px;background:#f0eee8;color:var(--ctv-muted);white-space:nowrap;font-size:12px}
.ctv-room-overnight.is-available{background:#e4f3e8;color:#237348}
.ctv-room-card-main>small{display:block;padding:4px 16px 14px}
.ctv-room-card-actions{display:flex;gap:7px;flex-wrap:nowrap;padding:12px 14px;border-top:1px solid var(--ctv-border)}
.affiliate-portal .ctv-room-card-actions button{min-width:0;min-height:38px;padding:8px 10px;font-size:13px;line-height:1.2;flex:1 1 0;white-space:nowrap}
.ctv-room-link-unavailable{align-self:center;color:var(--ctv-muted);font-size:12px}
.ctv-room-detail-overlay{position:fixed;inset:0;z-index:1400;display:flex;align-items:flex-end;justify-content:center;padding:20px;background:#263c4066;backdrop-filter:blur(3px)}
.ctv-room-detail-modal{width:min(760px,100%);max-height:min(92dvh,900px);overflow:auto;padding:20px 24px calc(24px + env(safe-area-inset-bottom));background:var(--ctv-bg);border-radius:26px 26px 12px 12px;box-shadow:0 24px 80px #163b4a40;color:var(--ctv-ink)}
.ctv-room-detail-modal>header{display:flex;align-items:start;justify-content:space-between;gap:16px;margin-bottom:14px}
.ctv-room-detail-modal>header h2{margin:4px 0 0}
.ctv-room-detail-modal>header button{min-width:44px;padding:8px 12px;font-size:24px}
.ctv-room-detail-primary{overflow:hidden;border-radius:18px;background:#e8eeea}
.ctv-room-detail-primary .ctv-room-visual{display:block;width:100%;height:auto;aspect-ratio:16/9;border-radius:0}
.ctv-room-detail-primary .ctv-room-visual>img,.ctv-room-detail-primary .ctv-room-visual>.ctv-room-fallback{width:100%;height:100%;object-fit:cover;border-radius:0}
.ctv-room-detail-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:8px}
.ctv-room-detail-thumb{display:block;min-width:0;padding:0;border:2px solid transparent;border-radius:12px;background:#e8eeea;overflow:hidden;cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.ctv-room-detail-thumb:hover{transform:translateY(-1px);border-color:#6aa9a2}
.ctv-room-detail-thumb:focus-visible{outline:3px solid #eab45b;outline-offset:2px}
.ctv-room-detail-thumb.active{border-color:var(--ctv-primary);box-shadow:0 0 0 2px #cbe7e1}
.ctv-room-detail-thumb img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;background:#e8eeea}
.ctv-room-detail-heading{margin-top:18px}
.ctv-room-detail-heading h3{font:600 28px/1.25 "Fraunces",Georgia,serif;margin:5px 0}
.ctv-room-detail-heading p:last-child{color:var(--ctv-muted);margin:0}
.ctv-room-features{display:flex;flex-wrap:wrap;gap:7px;margin:14px 0}
.ctv-room-features span{padding:5px 9px;border-radius:99px;background:#e4f3ef;color:var(--ctv-primary);font-size:12px}
.ctv-room-lookup-section{margin-top:22px;padding:18px;background:#fff;border-radius:20px;box-shadow:var(--ctv-shadow)}
.ctv-room-lookup-section h4{margin:0 0 12px;font-size:17px}
.ctv-room-rate-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:14px}
.affiliate-portal .ctv-room-rate-options button{min-height:42px;padding:8px 6px;border:1px solid #d3d9d5;background:#f0ede5;color:var(--ctv-ink);font-size:13px}
.affiliate-portal .ctv-room-rate-options button.active{border-color:#0b5a55;background:var(--ctv-primary);color:#fff;box-shadow:0 0 0 2px #eab45b,inset 0 0 0 1px #0b5a55;font-weight:700}
.affiliate-portal .ctv-room-rate-options button:focus-visible{outline:3px solid #eab45b;outline-offset:2px}
.affiliate-portal .ctv-room-rate-options button:not(.active):hover{border-color:#6aa9a2;background:#e4f3ef}
.ctv-room-package-card{min-width:0;margin-top:12px;padding:14px;border:1px solid #9ac8c0;border-radius:16px;background:#fbfdfc}
.ctv-room-package-card.active{border-color:#0b5a55;box-shadow:inset 0 0 0 1px #d3eee8}
.ctv-room-date-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.ctv-room-date-fields label{display:grid;gap:6px}
.ctv-room-date-fields input{width:100%}
.ctv-hourly-availability{display:grid;gap:10px;margin-top:14px;padding:13px;border:1px solid #d8e3df;border-radius:14px;background:#f8fbfa}
.ctv-hourly-availability h5{margin:0;font-size:14px}.ctv-hourly-availability p{margin:3px 0 0;color:var(--ctv-muted);font-size:12px}
.ctv-hourly-heatmap{display:grid;gap:9px}.ctv-hourly-row{display:grid;gap:4px}.ctv-hourly-row-label{display:flex;justify-content:space-between;color:var(--ctv-muted);font-size:11px}
.ctv-hourly-track-shell{position:relative;min-height:48px}
.ctv-hourly-track{position:relative;min-height:48px;overflow:hidden;border-radius:10px;background:#ecefed}
.ctv-hourly-segment{position:absolute;inset-block:0;left:var(--ctv-slot-left);width:var(--ctv-slot-width);display:grid;place-content:center;gap:1px;min-width:0;padding:3px;border:1px solid #569d95;border-radius:9px;background:#d9f0eb;color:#174841;cursor:pointer;font-size:10px;line-height:1.15;transition:filter .16s ease,box-shadow .16s ease}
.ctv-hourly-segment-disabled{cursor:not-allowed;background:#ecefed;color:#83918d;border-color:#d1d9d5;pointer-events:none}
.ctv-hourly-contact-fill{border-color:#bd7a27;background:#fff0c7;pointer-events:none}
.ctv-hourly-contact-action{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;width:100%;min-width:0;padding:3px 12px;border:2px solid #bd7a27;border-radius:10px;background:rgba(255,240,199,.82);color:#744415;cursor:pointer;font-size:11px;font-weight:700;line-height:1.2;text-align:center;word-break:keep-all;transition:filter .16s ease,box-shadow .16s ease}
.ctv-hourly-contact-action span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ctv-hourly-contact-action small{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;font-weight:400}
.ctv-hourly-contact-action:hover{filter:brightness(.97)}.ctv-hourly-contact-action:focus-visible{outline:3px solid #eab45b;outline-offset:-2px;box-shadow:0 0 0 2px #fff}
.ctv-hourly-segment:hover{filter:brightness(.97)}.ctv-hourly-segment:focus-visible{z-index:2;outline:3px solid #eab45b;outline-offset:-2px}.ctv-hourly-segment.active{z-index:1;border:3px solid #fff0bd;background:var(--ctv-primary);color:#fff;box-shadow:inset 0 0 0 1px #0b5a55,0 0 0 2px #eab45b}
.ctv-hourly-segment small{font-size:9px;font-weight:400;white-space:nowrap}.ctv-hourly-unavailable{position:absolute;inset:0;display:grid;place-items:center;color:#83918d;font-size:11px;font-weight:600}.ctv-hourly-policy-unknown{background:#ecefed}.ctv-hourly-policy-error{margin:0;color:#9c3329!important}.ctv-hourly-contact-fallback{margin:0;padding:8px 10px;border-radius:8px;background:#fff8e6;color:#744415;font-size:12px;line-height:1.45;white-space:pre-wrap}
.ctv-hourly-date-field{grid-template-columns:minmax(0,1fr)}
.ctv-hourly-selection{margin-top:8px;padding:10px;border:1px solid #9ac8c0;border-radius:12px;background:#fff}
.ctv-hourly-selection-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.ctv-hourly-selection-fields label{display:grid;gap:6px;color:var(--ctv-ink);font-size:12px;font-weight:600}
.ctv-hourly-selection-fields input{width:100%}
.ctv-room-package-status{display:grid;gap:3px;margin:14px 0 0;padding:11px 12px;border-radius:12px;font-size:13px}.ctv-room-package-status.is-available{background:#e4f3e8;color:#237348}.ctv-room-package-status.is-unavailable{background:#fff0eb;color:#9c3329}
.ctv-room-package-note,.ctv-room-lookup-note{grid-column:1/-1;margin:0;color:var(--ctv-muted);font-size:12px}
.affiliate-portal [data-room-quote]{width:100%;margin-top:14px}
.ctv-room-lookup-section [data-room-quote-result]{display:grid;gap:5px;margin:12px 0 0;padding:12px;border-radius:12px;background:#f0ede5;font-size:13px}
.ctv-room-lookup-section [data-room-quote-result]:empty{display:none}
.ctv-room-lookup-section [data-room-quote-result][data-state=success]{background:#e4f3e8;color:#237348}
.ctv-room-lookup-section [data-room-quote-result][data-state=error]{background:#fff0eb;color:#9c3329}
.ctv-room-lookup-section [data-room-quote-result] b{font-size:22px;font-variant-numeric:tabular-nums}
.ctv-room-detail-actions{display:flex;justify-content:flex-end;margin-top:16px}
@media(min-width:768px){.ctv-room-detail-overlay{align-items:center}.ctv-room-detail-modal{border-radius:26px}}
@media(max-width:1023px){.ctv-room-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767px){
  .ctv-room-availability-header{display:block}
  .ctv-readonly-chip{margin-top:8px}
  .ctv-room-filters{grid-template-columns:minmax(0,1fr);padding:14px}
  .ctv-room-grid{grid-template-columns:minmax(0,1fr)}
  .ctv-room-detail-modal{padding-inline:18px}
  .ctv-room-detail-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}
  .ctv-room-rate-options{grid-template-columns:1fr}
  .ctv-room-date-fields{grid-template-columns:1fr}
  .ctv-room-package-card{padding:12px}
  .ctv-hourly-availability{padding:11px}.ctv-hourly-track-shell,.ctv-hourly-track{min-height:46px}.ctv-hourly-segment small,.ctv-hourly-contact-action small{display:none}.ctv-hourly-contact-action span{white-space:normal;overflow-wrap:normal}.ctv-hourly-selection-fields{grid-template-columns:1fr}
  .affiliate-portal .ctv-room-card-actions{gap:5px;padding-inline:10px}
  .affiliate-portal .ctv-room-card-actions button{padding-inline:6px;font-size:clamp(10px,3.2vw,13px)}
  .ctv-room-package-note,.ctv-room-lookup-note{grid-column:auto}
}
