:root{--ink:#15231b;--forest:#20382a;--moss:#607760;--cream:#f3efe4;--paper:#fbf9f2;--gold:#c89f55;--line:#d8d1c0;--serif:"DM Serif Display",Georgia,serif;--sans:"DM Sans",Arial,sans-serif}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:16px}.site-header{height:86px;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(24px,6vw,92px);position:absolute;z-index:5;width:100%;color:#fff}.brand{display:flex;align-items:center;gap:11px;color:inherit;text-decoration:none;font-weight:700;letter-spacing:-.02em}.brand-mark{width:34px;height:34px;border:1px solid currentColor;border-radius:50%;display:grid;place-items:center;font-family:var(--serif);font-size:22px}.site-header nav{display:flex;align-items:center;gap:30px}.site-header nav a,.text-button{font:600 14px var(--sans);color:inherit;text-decoration:none;background:none;border:0;cursor:pointer;padding:8px}.hero{min-height:780px;padding:150px clamp(24px,6vw,92px) 90px;display:grid;grid-template-columns:minmax(0,1.02fr) minmax(420px,.98fr);gap:7vw;align-items:center;color:#fff;background:radial-gradient(circle at 78% 30%,#47604c 0,transparent 28%),linear-gradient(135deg,#102219 0%,#1d3427 55%,#2b4934 100%);overflow:hidden}.eyebrow{text-transform:uppercase;letter-spacing:.18em;font-size:11px;font-weight:700;color:var(--gold);margin:0 0 22px}.hero h1{font:400 clamp(58px,7vw,104px)/.92 var(--serif);letter-spacing:-.045em;margin:0}.hero h1 em{font-weight:400;color:#d8c18e}.hero-lede{max-width:650px;color:#d5ded6;font-size:18px;line-height:1.7;margin:32px 0}.hero-actions{display:flex;gap:14px;flex-wrap:wrap}.button{border:0;border-radius:999px;padding:15px 23px;font:700 14px var(--sans);cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:16px}.button-primary{background:var(--gold);color:#16241c}.button-quiet{background:transparent;color:#fff;border:1px solid #ffffff42}.trust-row{display:flex;gap:28px;margin-top:54px;color:#aebdaf;font-size:12px}.trust-row span:before{content:"•";color:var(--gold);margin-right:9px}.hero-scene{min-height:520px;position:relative;display:grid;place-items:center}.orbit{position:absolute;border:1px solid #ffffff18;border-radius:50%}.orbit-one{width:520px;height:520px}.orbit-two{width:380px;height:380px}.hero-card{background:#fbf9f2;color:var(--ink);box-shadow:0 30px 80px #06100a55;border:1px solid #fff;border-radius:20px}.hero-card-main{position:relative;z-index:2;width:min(440px,90%);padding:30px;transform:rotate(-2deg)}.card-kicker{font-size:11px;text-transform:uppercase;letter-spacing:.16em;color:#8b6e37;font-weight:700}.hero-card h2{font:38px/1.05 var(--serif);margin:13px 0 28px}.event-preview{display:flex;align-items:center;gap:17px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:20px 0}.event-preview div:last-child{display:grid;gap:5px}.event-preview span{font-size:12px;color:var(--moss)}.event-badge{background:var(--ink);color:#fff;border-radius:14px;width:62px;height:62px;display:grid;place-items:center;font:24px/ .65 var(--serif);text-align:center}.event-badge small{font:8px var(--sans);letter-spacing:.12em}.send-line{display:flex;justify-content:space-between;font-size:12px;padding-top:20px}.send-line strong{color:#52715a}.mini-card{position:absolute;padding:15px 18px;display:flex;align-items:center;gap:12px;z-index:3}.mini-card strong,.mini-card small{display:block}.mini-card small{color:#718075;margin-top:3px}.mini-one{right:-10px;top:70px}.mini-two{left:-20px;bottom:74px}.pulse{width:10px;height:10px;background:#65a978;border-radius:50%;box-shadow:0 0 0 6px #65a97822}.mini-icon{font-size:26px}.manifesto{padding:120px clamp(24px,11vw,170px);background:var(--cream);display:grid;grid-template-columns:1fr 2.2fr;gap:7vw}.manifesto p{font-weight:700;color:#7b816f}.manifesto h2{font:400 clamp(38px,4vw,62px)/1.08 var(--serif);margin:0;letter-spacing:-.025em}.services{padding:120px clamp(24px,6vw,92px)}.section-heading{display:flex;justify-content:space-between;gap:40px;align-items:end;margin-bottom:58px}.section-heading h2{font:400 clamp(42px,5vw,70px)/1 var(--serif);margin:0}.section-heading>p{max-width:440px;color:#687269;line-height:1.7}.service-grid{display:grid;grid-template-columns:repeat(2,1fr);border-top:1px solid var(--line);border-left:1px solid var(--line)}.service-card{min-height:390px;padding:38px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);position:relative}.service-card.featured{background:var(--ink);color:#fff}.service-number{font:34px var(--serif);color:var(--gold)}.service-status{position:absolute;right:34px;top:42px;font-size:10px;text-transform:uppercase;letter-spacing:.14em;color:#d7c58f}.service-status.muted{color:#8a9288}.service-card h3{font:48px var(--serif);margin:50px 0 16px}.service-card p{line-height:1.65;color:#69746c;max-width:540px}.service-card.featured p{color:#c6d0c8}.service-card ul{list-style:none;padding:0;display:flex;gap:17px;flex-wrap:wrap;color:#bcc8bf;font-size:11px}.service-card li:before{content:"✓";color:var(--gold);margin-right:6px}.service-link{position:absolute;left:38px;bottom:34px;border:0;background:none;color:#fff;font-weight:700;padding:0;cursor:pointer}.service-link span{margin-left:18px}.coming{position:absolute;left:38px;bottom:34px;text-transform:uppercase;letter-spacing:.13em;font-size:10px;color:#8a9288}.closing{margin:0 clamp(24px,6vw,92px) 70px;padding:80px;background:linear-gradient(120deg,#8c6938,#c39b55);color:#fff;border-radius:28px;display:flex;justify-content:space-between;align-items:end;gap:30px}.closing h2{font:400 clamp(42px,5vw,70px)/1 var(--serif);margin:0}.button-light{background:#fff;color:var(--ink)}footer{padding:30px clamp(24px,6vw,92px);display:flex;align-items:center;gap:30px;border-top:1px solid var(--line);font-size:12px;color:#677168}footer p{flex:1}.brand-footer{color:var(--ink)}.login-dialog{width:min(480px,calc(100% - 32px));border:0;border-radius:24px;padding:48px;background:var(--paper);color:var(--ink);box-shadow:0 30px 100px #0008}.login-dialog::backdrop{background:#0b1510d9;backdrop-filter:blur(8px)}.dialog-close{position:absolute;right:18px;top:12px;border:0;background:none;font-size:30px;cursor:pointer}.login-brand{margin-bottom:30px}.login-dialog h2{font:46px var(--serif);margin:0 0 12px}.login-dialog>p:not(.eyebrow){color:#687269;line-height:1.55}.login-dialog form{display:grid;gap:12px;margin-top:28px}.login-dialog label{font-size:12px;font-weight:700}.login-dialog input{height:52px;border:1px solid var(--line);border-radius:12px;padding:0 15px;font:16px var(--sans);background:#fff}.login-status{min-height:24px;font-size:13px}.login-note{font-size:11px}.portal{position:fixed;inset:0;z-index:20;background:var(--paper);overflow:auto}.portal-bar{height:82px;padding:0 clamp(24px,6vw,92px);display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.portal-inner{padding:80px clamp(24px,9vw,140px)}.portal-inner h1{font:60px var(--serif);margin:0 0 45px}.tenant-list{display:grid;gap:24px}.tenant-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:30px}.tenant-card h2{font:36px var(--serif);margin:0 0 20px}.portal-services{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px}.portal-service{padding:20px;border-radius:14px;background:var(--cream)}.portal-service strong,.portal-service span{display:block}.portal-service span{font-size:12px;color:#718075;margin-top:7px}@media(max-width:900px){.site-header nav a{display:none}.hero{grid-template-columns:1fr;padding-top:140px}.hero-scene{min-height:430px}.manifesto{grid-template-columns:1fr}.section-heading{display:block}.service-grid{grid-template-columns:1fr}.closing{padding:52px 30px;display:block}.closing .button{margin-top:30px}.trust-row{flex-wrap:wrap}.mini-one{right:0}.mini-two{left:0}}@media(max-width:560px){.site-header{height:70px}.hero{padding-left:20px;padding-right:20px}.hero h1{font-size:56px}.hero-scene{min-height:370px}.hero-card-main{padding:23px}.mini-card{display:none}.manifesto,.services{padding:80px 20px}.service-card{padding:28px;min-height:410px}.service-card h3{font-size:40px}.closing{margin:0 20px 40px}.section-heading h2,.closing h2{font-size:44px}footer{align-items:flex-start;flex-direction:column}.login-dialog{padding:38px 24px}}
#mailerWorkspace {
  display: grid;
  gap: 24px;
}

#mailerWorkspace[hidden] {
  display: none;
}

#mailerStatus {
  min-height: 24px;
}

#canonicalTemplates,
#tenantTemplates,
#mailerEvents {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.6 monospace;
}

.mailer-actions {
  display: flex;
  gap: 12px;
}

/* =========================================================
   GULP PORTAL + MAILER WORKSPACE
   ========================================================= */

.portal {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: auto;
  background:
    radial-gradient(circle at 88% 8%, rgba(200, 159, 85, 0.14), transparent 28rem),
    var(--paper);
}

.portal[hidden],
#portalHome[hidden],
#mailerWorkspace[hidden] {
  display: none;
}

.portal-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 76px;
  padding: 0 clamp(22px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: rgba(21, 35, 27, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

.portal-bar .brand-mark {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.portal-bar .text-button {
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.portal-inner {
  width: min(1380px, 100%);
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: clamp(52px, 7vw, 100px) clamp(22px, 5vw, 72px);
}

.portal-inner > div > h1,
#mailerWorkspace > h1 {
  max-width: 920px;
  margin: 0 0 42px;
  font: 400 clamp(48px, 6vw, 82px)/0.98 var(--serif);
  letter-spacing: -0.035em;
}

.tenant-list {
  display: grid;
  gap: 22px;
}

.tenant-card {
  overflow: hidden;
  padding: clamp(26px, 3vw, 42px);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(21, 35, 27, 0.06);
}

.tenant-card h2 {
  margin: 0 0 22px;
  font: 400 clamp(30px, 3vw, 42px)/1.05 var(--serif);
  letter-spacing: -0.02em;
}

.portal-services {
  display: grid;
  gap: 14px;
}

.portal-service {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 20px 22px;
  background: var(--cream);
  border: 1px solid rgba(216, 209, 192, 0.72);
  border-radius: 16px;
}

.portal-service strong,
.portal-service span {
  display: block;
}

.portal-service strong {
  font-size: 17px;
}

.portal-service span {
  margin-top: 5px;
  color: #718075;
  font-size: 12px;
}

.button-small {
  flex: 0 0 auto;
  padding: 12px 18px;
  font-size: 12px;
}

.module-workspace{display:grid;gap:22px}.module-workspace[hidden]{display:none}.module-workspace>h1{max-width:920px;margin:0 0 12px;font:400 clamp(48px,6vw,82px)/.98 var(--serif);letter-spacing:-.035em}.module-workspace>[data-close-module]{justify-self:start;padding:0;color:var(--moss)}.module-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}.module-metric{padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--cream)}.module-metric strong,.module-metric span{display:block}.module-metric strong{font:34px var(--serif)}.module-metric span{margin-top:6px;color:var(--moss);font-size:12px}.module-list{display:grid;gap:10px}.module-list>div{display:flex;justify-content:space-between;gap:20px;padding:14px 0;border-bottom:1px solid var(--line)}
.module-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;align-items:end;margin:18px 0 28px}.module-form[hidden]{display:none}.module-form label{display:grid;gap:7px;font-size:12px;font-weight:700}.module-form input,.module-form select{height:48px;padding:0 12px;border:1px solid var(--line);border-radius:11px;background:#fff;font:14px var(--sans)}.module-form .module-check{display:flex;align-items:center;gap:8px;height:48px}.module-form .module-check input{width:18px;height:18px}.calendar-first-run{border-color:var(--gold)}.setup-steps{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 22px}.setup-steps strong{padding:9px 13px;border-radius:999px;background:var(--cream);font-size:12px}
.calendar-hours-card{border-color:#d7c39c}.calendar-hours-heading{display:flex;align-items:end;justify-content:space-between;gap:28px;margin-bottom:24px}.calendar-hours-heading h2{margin:0 0 8px}.calendar-hours-heading p{margin:0;color:#687269}.calendar-hours-heading>label{display:grid;min-width:240px;gap:7px;font-size:12px;font-weight:700}.calendar-hours-heading select{height:48px;padding:0 12px;border:1px solid var(--line);border-radius:11px;background:#fff}.weekly-hours-grid{overflow:hidden;border:1px solid var(--line);border-radius:15px}.weekly-hours-row{display:grid;grid-template-columns:minmax(110px,1fr) 100px minmax(130px,1fr) minmax(130px,1fr);gap:16px;align-items:center;padding:14px 18px;background:#fff}.weekly-hours-row+ .weekly-hours-row{border-top:1px solid var(--line)}.weekly-hours-row>strong{font:20px var(--serif)}.weekly-hours-row label{display:grid;gap:6px;color:#667268;font-size:11px;font-weight:700}.weekly-hours-row input[type=time]{height:42px;padding:0 10px;border:1px solid var(--line);border-radius:9px;background:#fff}.weekly-hours-row input[type=time]:disabled{background:#f2f0e9;color:#9aa097}.weekly-hours-toggle{display:flex!important;grid-auto-flow:column;justify-content:start;align-items:center}.weekly-hours-toggle input{width:18px;height:18px}.calendar-hours-card .mailer-actions{align-items:center;margin-top:20px}.calendar-hours-card [role=status]{color:#5f6b62;font-size:13px}.calendar-hours-card[hidden]{display:none}@media(max-width:760px){.calendar-hours-heading{align-items:stretch;flex-direction:column}.calendar-hours-heading>label{min-width:0}.weekly-hours-row{grid-template-columns:1fr 90px}.weekly-hours-row label:not(.weekly-hours-toggle){grid-column:span 1}}

.shared-calendar-card{border-color:#ccb276}.shared-calendar-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:24px}.shared-calendar-heading h2{margin:0}.shared-calendar-heading .eyebrow{margin-bottom:8px}.calendar-legend{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.calendar-legend span{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border:1px solid var(--line);border-radius:999px;background:#fff;font-size:11px;font-weight:700}.calendar-legend span:before{width:9px;height:9px;border-radius:50%;content:""}.calendar-legend .public-event:before{background:#b88724}.calendar-legend .employee-activity:before{background:#315f47}.calendar-legend .customer-visit:before{background:#73518c}.calendar-legend .blackout:before{background:#9d3d36}#employeeCalendarVisual{padding:18px;border:1px solid var(--line);border-radius:16px;background:#fff}#employeeCalendarVisual .fc{--fc-border-color:#e2dccf;--fc-button-bg-color:#20382a;--fc-button-border-color:#20382a;--fc-button-hover-bg-color:#315f47;--fc-button-hover-border-color:#315f47;--fc-button-active-bg-color:#b88724;--fc-button-active-border-color:#b88724;--fc-today-bg-color:#f5edd9;font-family:var(--sans)}#employeeCalendarVisual .fc-toolbar-title{font:30px var(--serif);color:var(--ink)}#employeeCalendarVisual .fc-col-header-cell-cushion,#employeeCalendarVisual .fc-daygrid-day-number{color:var(--ink);text-decoration:none}#employeeCalendarVisual .fc-event{border-radius:6px;padding:2px 4px;font-weight:700}.calendar-list-fallback{margin-top:18px}.calendar-list-fallback summary{cursor:pointer;color:var(--moss);font-weight:700}@media(max-width:760px){.shared-calendar-heading{align-items:flex-start;flex-direction:column}.calendar-legend{justify-content:flex-start}#employeeCalendarVisual{padding:8px}#employeeCalendarVisual .fc-header-toolbar{align-items:stretch;flex-direction:column;gap:10px}#employeeCalendarVisual .fc-toolbar-title{font-size:25px}}
.calendar-view-summary{margin:8px 0 0;color:var(--muted)}.calendar-legend{margin:0 0 22px;padding:0;border:0;justify-content:flex-start}.calendar-legend label{display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border:1px solid var(--line);border-radius:999px;background:#fff;font-size:11px;font-weight:800;cursor:pointer}.calendar-legend label:before{width:9px;height:9px;border-radius:50%;content:""}.calendar-legend label:has(input:not(:checked)){opacity:.42}.calendar-legend input{width:14px;height:14px;margin:0;accent-color:var(--moss)}.calendar-legend .public-event:before{background:#b88724;clip-path:polygon(100% 0,100% 100%,0 0);border-radius:0}.calendar-legend .employee-activity:before{background:#315f47}.calendar-legend .customer-visit:before{background:#73518c}.calendar-legend .blackout:before{background:#9d3d36}.calendar-legend .shipping-window:before{background:#476b78}.calendar-legend .operational-window:before{background:#646961}#employeeCalendarVisual .fc-multimonth{gap:20px;border:0;background:transparent}#employeeCalendarVisual .fc-multimonth-month{overflow:hidden;border:1px solid var(--line);border-radius:15px;background:#fff}#employeeCalendarVisual .fc-multimonth-title{padding:18px 12px;font:26px var(--serif);color:var(--ink);background:#fbfaf7}#employeeCalendarVisual .fc-event{cursor:pointer}.employee-calendar-event-marker{flex:none;font-size:10px;line-height:1}.employee-calendar-event-copy{display:flex;min-width:0;flex-direction:column}.employee-calendar-event-copy small{font-size:9px;line-height:1.15;opacity:.86}.employee-calendar-event-copy strong{overflow:hidden;font-size:10px;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}.calendar-type-public-event .employee-calendar-event-marker{color:#fff}.employee-calendar-hover-card{position:fixed;z-index:10000;display:grid;gap:5px;width:min(300px,calc(100vw - 32px));padding:15px 17px;border:1px solid #d2b56e;border-radius:12px;background:#173124;color:#fff;box-shadow:0 16px 42px #14281e40;pointer-events:none}.employee-calendar-hover-card span{color:#e3bd57;font-size:10px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}.employee-calendar-hover-card strong{font:20px var(--serif)}.employee-calendar-hover-card small{color:#e8eee9}.employee-calendar-hover-card em{margin-top:3px;color:#e3bd57;font-size:11px;font-style:normal;font-weight:800}@media(max-width:900px){#employeeCalendarVisual .fc-multimonth{display:block}#employeeCalendarVisual .fc-multimonth-month+ .fc-multimonth-month{margin-top:18px}}@media(max-width:760px){.calendar-legend{justify-content:flex-start}.calendar-legend label{padding:7px 9px}#employeeCalendarVisual .fc-multimonth-title{font-size:23px}.employee-calendar-hover-card{display:none}}
.calendar-event-dialog{width:min(680px,calc(100% - 32px));padding:clamp(34px,5vw,58px);border:1px solid #c7ad76;border-radius:24px;background:var(--paper);color:var(--ink);box-shadow:0 30px 100px #0007}.calendar-event-dialog::backdrop{background:#0b1510d9;backdrop-filter:blur(8px)}.calendar-event-dialog h2{margin:0 50px 28px 0;font:42px/1.05 var(--serif)}.calendar-event-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}.calendar-event-facts>div{padding:16px;border:1px solid var(--line);border-radius:13px;background:#fff}.calendar-event-facts dt{color:var(--moss);font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.calendar-event-facts dd{margin:7px 0 0;font-weight:700}.calendar-event-description{margin:24px 0 0;padding:20px;border-radius:14px;background:var(--cream);line-height:1.65}@media(max-width:560px){.calendar-event-facts{grid-template-columns:1fr}.calendar-event-dialog h2{font-size:34px}}

/* Gulp-owned FullCalendar presentation layer. FullCalendar v7 hashes its
   internal classes, so these rules intentionally use stable roles and data. */
.shared-calendar-card{overflow:hidden;padding:clamp(24px,3vw,42px);border:1px solid #d7bd82;background:linear-gradient(145deg,#fff 0%,#fcfaf4 58%,#f5ecd8 100%);box-shadow:0 24px 70px #18332612}.shared-calendar-heading{margin-bottom:18px}.shared-calendar-heading h2{font-size:clamp(38px,4.5vw,64px);letter-spacing:-.035em}.calendar-view-summary{font-size:15px}.calendar-legend{padding:14px;border:1px solid #e4d8bd;border-radius:18px;background:#ffffffb8;box-shadow:0 8px 24px #20382a0a}.calendar-legend label{transition:transform .18s ease,box-shadow .18s ease,opacity .18s ease}.calendar-legend label:hover{transform:translateY(-1px);box-shadow:0 7px 16px #20382a14}#employeeCalendarVisual{padding:clamp(15px,2vw,28px);border-color:#d9c99f;border-radius:24px;background:#fffdf9;box-shadow:inset 0 0 0 1px #fff,0 18px 50px #1c362817}
#employeeCalendarVisual>div>div:first-child{display:grid;grid-template-columns:1fr auto 1fr;gap:16px;align-items:center;margin:0 0 24px;padding:14px;border:1px solid #e4d8bd;border-radius:18px;background:#f6f0e2}#employeeCalendarVisual>div>div:first-child>div:first-child{display:flex;gap:7px}#employeeCalendarVisual>div>div:first-child>div:last-child{justify-self:end}#employeeCalendarVisual [role=heading][aria-level="2"]{font:600 clamp(23px,2.2vw,34px)/1 var(--serif);color:#173124;white-space:nowrap}#employeeCalendarVisual button{min-height:40px;padding:9px 14px;border:1px solid #284735;border-radius:999px;background:#fff;color:#173124;font:800 12px/1 var(--sans);cursor:pointer;transition:background .16s ease,color .16s ease,transform .16s ease,box-shadow .16s ease}#employeeCalendarVisual button:hover:not(:disabled){transform:translateY(-1px);background:#20382a;color:#fff;box-shadow:0 8px 18px #17312424}#employeeCalendarVisual button:disabled{opacity:.42;cursor:not-allowed}#employeeCalendarVisual [role=tablist]{display:flex;gap:5px;padding:4px;border:1px solid #d9c99f;border-radius:999px;background:#fff}#employeeCalendarVisual [role=tab]{border:0}#employeeCalendarVisual [role=tab][aria-selected="true"]{background:#c99c3b;color:#10261a;box-shadow:0 3px 10px #8f681b26}
#employeeCalendarVisual [role=list]{display:flex!important;gap:22px!important}#employeeCalendarVisual [role=listitem]{min-width:0;padding:0!important;border:1px solid #ddd1b6;border-radius:20px;background:#fff;box-shadow:0 12px 35px #1731240d;overflow:hidden}#employeeCalendarVisual [role=grid]>div:nth-child(2){padding:19px 18px 15px;background:linear-gradient(135deg,#183326,#294b38);color:#fff;text-align:center}#employeeCalendarVisual [role=grid]>div:nth-child(2)>div{font:600 29px/1 var(--serif)}#employeeCalendarVisual [role=columnheader]{padding:10px 4px!important;border-top:1px solid #d9c99f;border-bottom:1px solid #d9c99f;background:#f4eddd;color:#665f52;font-size:10px;font-weight:900;letter-spacing:.13em;text-align:center;text-transform:uppercase}#employeeCalendarVisual [role=gridcell]{position:relative;min-width:0!important;padding:7px!important;border-right:1px solid #ebe4d5;border-bottom:1px solid #ebe4d5;background:#fff;transition:background .15s ease}#employeeCalendarVisual [role=gridcell]:hover{background:#fbf5e8}#employeeCalendarVisual [role=gridcell][aria-current=date]{background:#f7edcf;box-shadow:inset 0 0 0 2px #c99c3b}#employeeCalendarVisual [role=gridcell]>div:first-child{font-size:12px;font-weight:850;color:#253a2c}#employeeCalendarVisual [role=gridcell] [role=button]{display:flex!important;align-items:flex-start;gap:5px;min-height:0;margin-top:3px;padding:5px 6px;border:0;border-radius:7px;background:#315f47;color:#fff;box-shadow:none}#employeeCalendarVisual [role=gridcell] [role=button]:hover{transform:none;background:#20382a;box-shadow:0 5px 12px #1731242b}#employeeCalendarVisual [role=button][data-entry-type="PUBLIC_EVENT"]{background:#9f312d}#employeeCalendarVisual [role=button][data-entry-type="CUSTOMER_VISIT"]{background:#6b4a82}#employeeCalendarVisual [role=button][data-entry-type="EMPLOYEE_ACTIVITY"]{background:#315f47}#employeeCalendarVisual [role=button][data-entry-type="BLACKOUT"]{background:#a43e36}#employeeCalendarVisual [role=button][data-entry-type="SHIPPING_WINDOW"]{background:#476b78}#employeeCalendarVisual [role=button][data-entry-type="OPERATIONAL_WINDOW"]{background:#626860}.employee-calendar-event-copy small{color:#ffffffd9;font-size:8px;font-weight:800}.employee-calendar-event-copy strong{color:#fff;font-size:9px}.employee-calendar-event-marker{margin-top:1px;color:#f5d674}
@media(max-width:1050px){#employeeCalendarVisual [role=list]{display:block!important}#employeeCalendarVisual [role=listitem]{width:100%!important}#employeeCalendarVisual [role=listitem]+[role=listitem]{margin-top:20px}}
@media(max-width:760px){.shared-calendar-card{padding:20px 14px}#employeeCalendarVisual>div>div:first-child{grid-template-columns:1fr;align-items:start}#employeeCalendarVisual>div>div:first-child>div:last-child{justify-self:start}#employeeCalendarVisual [role=heading][aria-level="2"]{white-space:normal}#employeeCalendarVisual{padding:10px}#employeeCalendarVisual [role=gridcell]{padding:4px!important}.employee-calendar-event-copy strong{max-width:58px}}
.calendar-day-hover-card{pointer-events:auto}.calendar-day-hover-card>div{display:grid;gap:7px;margin:4px 0}.calendar-day-hover-card button{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;padding:9px 10px;border:1px solid #ffffff24;border-radius:9px;background:#ffffff10;color:#fff;text-align:left;cursor:pointer}.calendar-day-hover-card button:hover,.calendar-day-hover-card button:focus{background:#ffffff20;border-color:#e3bd57}.calendar-day-hover-card button small{grid-row:span 2;color:#e3bd57;font-weight:900}.calendar-day-hover-card button b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.calendar-day-hover-card button em{color:#cdd9d0;font-size:9px;font-style:normal;letter-spacing:.08em;text-transform:uppercase}.calendar-entry-list{display:grid}.calendar-entry-row{padding:15px 0;border-bottom:1px solid var(--line)}.calendar-entry-display{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:18px;align-items:center}.calendar-entry-display>div:first-child{display:grid;gap:5px}.calendar-entry-display strong{font-size:15px}.calendar-entry-display small{color:#687269;font-size:10px;font-weight:800;letter-spacing:.06em}.calendar-entry-display time{color:#39473e;font-size:13px}.calendar-entry-actions,.calendar-entry-edit-actions{display:flex;align-items:center;gap:8px}.calendar-entry-actions button,.calendar-entry-edit-actions button{padding:8px 12px;border:1px solid #315f47;border-radius:999px;background:#fff;color:#20382a;font-size:11px;font-weight:850;cursor:pointer}.calendar-entry-actions .danger{border-color:#ac554d;color:#91352f}.calendar-entry-actions button:hover,.calendar-entry-edit-actions button:hover{background:#20382a;color:#fff}.calendar-entry-actions .danger:hover{background:#9d3d36}.calendar-entry-edit{display:grid;grid-template-columns:2fr 1fr 1fr 1.25fr;gap:12px;padding:18px;border:1px solid #d9c99f;border-radius:15px;background:#f9f4e8}.calendar-entry-edit label{display:grid;gap:6px;color:#516056;font-size:10px;font-weight:850;letter-spacing:.05em;text-transform:uppercase}.calendar-entry-edit input,.calendar-entry-edit select,.calendar-entry-edit textarea{width:100%;padding:10px;border:1px solid #d2c4a7;border-radius:9px;background:#fff;color:#17251d;font:13px var(--sans);text-transform:none}.calendar-entry-edit .wide{grid-column:1/-1}.calendar-entry-edit-actions{grid-column:1/-1}.calendar-entry-edit-actions [role=status]{color:#9d3d36;font-size:11px;font-weight:800}@media(max-width:900px){.calendar-entry-display{grid-template-columns:1fr auto}.calendar-entry-display time{grid-column:1}.calendar-entry-actions{grid-column:2;grid-row:1/3}.calendar-entry-edit{grid-template-columns:1fr 1fr}}@media(max-width:560px){.calendar-entry-display{grid-template-columns:1fr}.calendar-entry-actions{grid-column:1;grid-row:auto}.calendar-entry-edit{grid-template-columns:1fr}.calendar-entry-edit .wide{grid-column:auto}}

/* Mailer workspace */

#mailerWorkspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

#closeMailer {
  justify-self: start;
  margin-bottom: 18px;
  padding: 0;
  color: var(--moss);
}

#closeMailer:hover {
  color: var(--ink);
}

#mailerWorkspace > .eyebrow {
  margin-bottom: -10px;
}

#mailerWorkspace > h1 {
  margin-bottom: 8px;
}

#mailerStatus {
  min-height: 24px;
  margin: 0;
  padding: 14px 18px;
  color: #365743;
  font-size: 14px;
  font-weight: 600;
  background: #e9f0e8;
  border: 1px solid #ccddce;
  border-radius: 12px;
}

#mailerStatus:empty {
  display: none;
}

.mailer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 10px;
}

.mailer-actions .button {
  box-shadow: 0 10px 26px rgba(140, 105, 56, 0.18);
}

.mailer-actions .button:hover,
.button-small:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.mailer-actions .button:disabled,
.button-small:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

/* Data panels */

#mailerWorkspace .tenant-card {
  position: relative;
  padding-top: 34px;
}

#mailerWorkspace .tenant-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  content: "";
  background: linear-gradient(90deg, var(--gold), #e2c989);
}

#mailerWorkspace .tenant-card h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}

#mailerWorkspace .tenant-card h2::before {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  content: "";
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(200, 159, 85, 0.15);
}

#canonicalTemplates,
#tenantTemplates,
#mailerEvents {
  min-height: 78px;
  max-height: 480px;
  overflow: auto;
  padding: 22px;
  color: #dce8df;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #15231b;
  border: 1px solid #2c4134;
  border-radius: 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  scrollbar-color: #607760 #15231b;
}

#canonicalTemplates:empty::before {
  content: "No canonical templates loaded.";
}

#tenantTemplates:empty::before {
  content: "No winery templates have been created yet.";
}

#mailerEvents:empty::before {
  content: "Load the next 30 days to see upcoming events.";
}

#canonicalTemplates:empty::before,
#tenantTemplates:empty::before,
#mailerEvents:empty::before {
  color: #91a397;
  font-family: var(--sans);
  font-style: italic;
}

/* Focus and interaction */

.button,
.text-button {
  transition:
    transform 160ms ease,
    filter 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.button:focus-visible,
.text-button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(200, 159, 85, 0.42);
  outline-offset: 3px;
}

/* Tablet and mobile */

@media (min-width: 1000px) {
  #mailerWorkspace {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #mailerWorkspace > #closeMailer,
  #mailerWorkspace > .eyebrow,
  #mailerWorkspace > h1,
  #mailerWorkspace > #mailerStatus,
  #mailerWorkspace > .mailer-actions {
    grid-column: 1 / -1;
  }

  #mailerWorkspace .tenant-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .portal-bar {
    height: 68px;
  }

  .portal-inner {
    padding-top: 44px;
  }

  .portal-inner > div > h1,
  #mailerWorkspace > h1 {
    font-size: 46px;
  }

  .portal-service {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-service .button {
    width: 100%;
  }

  .mailer-actions,
  .mailer-actions .button {
    width: 100%;
  }

  .tenant-card {
    padding: 24px 18px;
    border-radius: 18px;
  }

  #canonicalTemplates,
  #tenantTemplates,
  #mailerEvents {
    max-height: 390px;
    margin: 0 -2px;
    padding: 17px;
    font-size: 11px;
  }
}

/* =========================================================
   MAILER TEMPLATE AND EVENT CARDS
   ========================================================= */

#canonicalTemplates,
#tenantTemplates,
#mailerEvents {
  min-height: 0;
  max-height: none;
  overflow: visible;
  padding: 0;
  color: var(--ink);
  white-space: normal;
  overflow-wrap: normal;
  font: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.template-card-grid,
.event-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.template-display-card {
  display: flex;
  min-height: 310px;
  padding: 25px;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.template-display-card:hover {
  transform: translateY(-3px);
  border-color: #c2b28c;
  box-shadow: 0 18px 38px rgba(21, 35, 27, 0.08);
}

.template-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 30px;
}

.template-type,
.template-version,
.template-code {
  color: var(--moss);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.template-display-card h3 {
  margin: 0 0 12px;
  font: 400 30px/1.08 var(--serif);
  letter-spacing: -0.02em;
}

.template-display-card > p {
  margin: 0 0 25px;
  color: #687269;
  font-size: 14px;
  line-height: 1.65;
}

.template-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: auto 0 24px;
}

.template-details > div {
  min-width: 0;
  padding: 13px;
  background: #fff;
  border: 1px solid #e5dfd0;
  border-radius: 12px;
}

.template-details dt {
  margin-bottom: 5px;
  color: #7b857c;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.template-details dd {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: #48624f;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: #e5eee6;
  border: 1px solid #ccddce;
  border-radius: 999px;
}

.status-pill::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.status-active,
.status-available,
.status-published {
  color: #356044;
  background: #e3efe6;
  border-color: #c4dbc9;
}

.status-draft,
.status-coming-soon {
  color: #806428;
  background: #f5ecd8;
  border-color: #e5d19f;
}

.status-archived,
.status-sold-out {
  color: #85504d;
  background: #f3e5e3;
  border-color: #e2c8c5;
}

.template-display-card .button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

/* Empty states */

.mailer-empty {
  display: grid;
  min-height: 190px;
  padding: 34px;
  place-content: center;
  justify-items: center;
  text-align: center;
  background: var(--paper);
  border: 1px dashed #cfc6b2;
  border-radius: 16px;
}

.mailer-empty-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  place-items: center;
  color: var(--gold);
  font: 28px var(--serif);
  background: rgba(200, 159, 85, 0.11);
  border-radius: 50%;
}

.mailer-empty strong {
  font: 24px var(--serif);
}

.mailer-empty p {
  max-width: 480px;
  margin: 8px 0 0;
  color: #718075;
  font-size: 13px;
  line-height: 1.55;
}

/* Event cards */

.event-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}

.mailer-event-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 35px rgba(21, 35, 27, 0.06);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.mailer-event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 45px rgba(21, 35, 27, 0.1);
}

.mailer-event-media {
  position: relative;
  height: 210px;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 20%, #526b56, transparent 40%),
    var(--forest);
}

.mailer-event-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.event-image-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #fff;
}

.event-image-placeholder span {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  font: 45px var(--serif);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
}

.event-date-badge {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  width: 70px;
  min-height: 70px;
  padding: 9px;
  place-items: center;
  color: var(--ink);
  line-height: 1;
  background: var(--paper);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(6, 16, 10, 0.24);
}

.event-date-badge span {
  color: #8b6e37;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.event-date-badge strong {
  font: 32px/0.9 var(--serif);
}

.mailer-event-content {
  padding: 24px;
}

.event-meta-row {
  display: flex;
  min-height: 31px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
  color: var(--moss);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mailer-event-content h3 {
  margin: 0 0 12px;
  font: 400 30px/1.08 var(--serif);
  letter-spacing: -0.02em;
}

.event-date-line,
.event-location {
  margin: 5px 0;
  color: #526057;
  font-size: 12px;
  font-weight: 600;
}

.event-location::before {
  margin-right: 6px;
  color: var(--gold);
  content: "◇";
}

.event-summary {
  display: -webkit-box;
  margin: 18px 0;
  overflow: hidden;
  color: #687269;
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.event-card-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.event-price {
  display: grid;
  gap: 3px;
}

.event-price span {
  color: #7b857c;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.event-price strong {
  font: 22px var(--serif);
}

.event-price small {
  color: var(--moss);
  font-size: 10px;
}

/* Responsive cards */

@media (max-width: 700px) {
  #canonicalTemplates,
  #tenantTemplates,
  #mailerEvents {
    max-height: none;
    margin: 0;
    padding: 0;
    font-size: inherit;
  }

  .template-card-grid,
  .event-card-grid {
    grid-template-columns: 1fr;
  }

  .template-details {
    grid-template-columns: 1fr;
  }

  .template-card-footer,
  .event-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .template-card-footer .button,
  .event-card-footer .button {
    width: 100%;
  }

  .mailer-event-media {
    height: 190px;
  }
}


/* =========================================================
   TEMPLATE EDITOR
   ========================================================= */

.template-editor-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  padding: clamp(28px, 5vw, 52px);
  overflow-y: auto;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 24px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
}

.template-editor-dialog::backdrop {
  background: rgba(11, 21, 16, 0.86);
  backdrop-filter: blur(8px);
}

.template-editor-dialog h2 {
  margin: 0 0 10px;
  font: 400 clamp(38px, 5vw, 54px)/1 var(--serif);
  letter-spacing: -0.025em;
}

.template-editor-intro {
  max-width: 590px;
  margin: 0 0 30px;
  color: #687269;
  font-size: 14px;
  line-height: 1.65;
}

#templateEditorForm {
  display: grid;
  gap: 13px;
}

#templateEditorForm > label,
.template-color-fields legend,
.template-option-fields legend {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

#templateEditorForm > input,
#templateEditorForm > textarea {
  width: 100%;
  padding: 14px 15px;
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

#templateEditorForm > input {
  height: 50px;
}

#templateEditorForm > textarea {
  resize: vertical;
}

#templateEditorForm > input:focus,
#templateEditorForm > textarea:focus {
  border-color: var(--gold);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(200, 159, 85, 0.16);
}

.template-color-fields,
.template-option-fields {
  margin: 10px 0 0;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.template-color-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.template-color-fields legend,
.template-option-fields legend {
  padding: 0 8px;
}

.template-color-fields label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: var(--cream);
  border-radius: 10px;
}

.template-color-fields label span {
  font-size: 12px;
  font-weight: 700;
}

.template-color-fields input[type="color"] {
  width: 44px;
  height: 34px;
  padding: 2px;
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.template-option-fields {
  display: grid;
  gap: 13px;
}

.template-option-fields label {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #526057;
  font-size: 13px;
  cursor: pointer;
}

.template-option-fields input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--forest);
}

.template-editor-actions,
.template-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.template-editor-actions {
  margin-top: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.template-cancel-button,
.template-secondary-button {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}

.template-cancel-button:hover,
.template-secondary-button:hover {
  background: var(--cream);
  border-color: #bcb29d;
}

#templateEditorStatus {
  min-height: 22px;
  margin: 3px 0 0;
  color: #85504d;
}

@media (max-width: 620px) {
  .template-editor-dialog {
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
    padding: 36px 20px 24px;
    border-radius: 18px;
  }

  .template-color-fields {
    grid-template-columns: 1fr;
  }

  .template-editor-actions,
  .template-card-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .template-editor-actions .button,
  .template-card-actions .button {
    width: 100%;
  }
}

.template-instance-name {
  margin: -4px 0 22px !important;
  color: var(--moss) !important;
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.template-preview-dialog {
  width: min(1180px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  padding: clamp(28px, 4vw, 48px);
  overflow-y: auto;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 24px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
}

.template-preview-dialog::backdrop {
  background: rgba(11, 21, 16, 0.86);
  backdrop-filter: blur(8px);
}

.template-preview-dialog > h2 {
  margin: 0;
  font: 400 clamp(34px, 4vw, 52px)/1.08 var(--serif);
}

.template-preview-preheader {
  margin: 12px 0 28px;
  color: var(--moss);
}

.template-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.75fr);
  gap: 20px;
}

.template-preview-grid section {
  min-width: 0;
}

.template-preview-grid h3 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#templatePreviewFrame,
#templatePreviewText {
  width: 100%;
  min-height: 560px;
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.template-send-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f4f1e9;
}

.template-send-panel > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

#templateAudienceChoices {
  margin: 14px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

#templateAudienceChoices legend {
  padding: 0 6px;
  font-weight: 700;
}

#templateAudienceOptions {
  display: grid;
  gap: 8px;
}

#templateAudienceOptions label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(30, 48, 37, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  line-height: 1.35;
}

#templateAudienceOptions label:hover {
  border-color: var(--gold);
  background: #fff;
}

#templateAudienceOptions input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--gold);
}

.template-send-actions {
  display: flex;
  flex: 0 0 210px;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.template-self-test {
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: #fff8e8;
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(159, 112, 27, 0.12);
  font-weight: 800;
}

.template-self-test:hover:not(:disabled) {
  background: #fff;
  transform: translateY(-1px);
}

#templateSelfTestStatus {
  color: var(--moss);
  font-size: 12px;
  line-height: 1.4;
}

.template-send-panel p {
  margin: 5px 0 0;
  color: var(--moss);
  font-size: 13px;
}

#templatePreviewFrame {
  display: block;
}

#templatePreviewText {
  padding: 20px;
  overflow: auto;
  white-space: pre-wrap;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 820px) {
  .template-preview-grid {
    grid-template-columns: 1fr;
  }

  #templatePreviewFrame,
  #templatePreviewText {
    min-height: 420px;
  }

  .template-send-panel {
    flex-direction: column;
  }

  .template-send-actions {
    width: 100%;
    flex-basis: auto;
  }
}
