:root{color-scheme:light;--nav:#ffffff;--ink:#33383f;--muted:#677079;--blue:#18836d;--blue-dark:#126b59;--line:#e4e7ea;--surface:#fff;--page:#f5fafa;--green:#087354;--orange:#985619;--red:#ad354a;font-family:"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",system-ui,sans-serif;color:var(--ink);background:var(--page);font-size:14px}
*{box-sizing:border-box}body{margin:0}a{color:var(--blue);text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #24b280;outline-offset:3px}h1,h2,h3,p{margin:0}h1{font-size:29px;letter-spacing:.02em}h2{font-size:18px}h3{font-size:15px}.muted{color:var(--muted)}small{font-size:12px}.sidebar{position:fixed;inset:0 auto 0 0;width:226px;background:var(--nav);color:#343648;display:flex;flex-direction:column;padding:25px 15px 18px;border-right:1px solid var(--line);z-index:2}.brand{color:var(--ink);display:flex;align-items:center;gap:12px;margin:0 7px 29px}.brand strong{font-size:21px;letter-spacing:.11em}.brand small small{display:block;color:#606477;margin-top:3px}.brand-icon{width:40px;height:40px;flex:none;border-radius:11px;background:#18836d;display:flex;align-items:center;justify-content:center;gap:3px}.brand-icon i{width:4px;height:15px;background:white;transform:skew(-22deg);border-radius:2px}.brand-icon i:nth-child(2){height:20px}.nav-label{color:#666a7c;font-size:11px;letter-spacing:.1em;padding:11px 12px 7px}.sidebar nav a{display:flex;align-items:center;gap:12px;color:#383c50;padding:10px 12px;border-radius:8px;margin-bottom:3px;min-height:42px}.nav-icon{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.sidebar nav a:hover,.sidebar nav a[aria-current]{background:#e3f5f0;color:#126b59}.sidebar nav a[aria-current]{box-shadow:inset 3px 0 #24b280}.avatar{display:grid;place-items:center;width:33px;height:33px;border-radius:50%;background:#efefff;color:var(--blue);font-weight:700}.shell{margin-left:226px}.topbar{min-height:62px;padding:12px clamp(18px,3vw,42px);display:flex;justify-content:space-between;align-items:center;gap:10px;background:white;border-bottom:1px solid var(--line);color:var(--muted)}.topbar b{margin:0 8px;color:#a0a0b1}.topbar strong{color:var(--ink)}.mode,.badge{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:600;padding:5px 9px;border-radius:6px;white-space:nowrap;background:#eaf6f3;color:#126b59}.mode:before{content:"";width:7px;height:7px;border-radius:50%;background:#308665}.mode.live{background:#fff1dc;color:#884907}main{max-width:1560px;margin:auto;padding:27px clamp(18px,3vw,42px) 42px}.page-head,.panel-head,.actions,.toolbar,.pager,.step-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.page-head{margin-bottom:22px}.page-head p{margin-top:6px;line-height:1.5}.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:37px;padding:7px 13px;border-radius:7px;border:1px solid #e4e7ea;background:white;color:var(--ink);font-weight:600;white-space:nowrap}.button:hover{border-color:#91beaf}.primary{border-color:#18836d;background:#18836d;color:white}.primary:hover{border-color:#126b59;background:#126b59}.plain{padding:0;border:0;background:transparent;color:var(--blue);font-weight:600}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:19px}.metric,.panel{background:white;border:1px solid var(--line);border-radius:8px}.metric{padding:15px 16px;min-width:0}.metric-title{color:var(--muted);display:flex;align-items:center;gap:8px;font-size:13px}.metric-dot{display:inline-grid;place-items:center;background:#eaf6f3;color:#126b59;border-radius:7px;width:26px;height:26px;flex:none}.metric strong{display:block;font-size:26px;margin:5px 0 2px;font-variant-numeric:tabular-nums}.metric small{color:var(--muted)}.panel{margin-bottom:17px;min-width:0}.panel-head{padding:16px 17px;border-bottom:1px solid var(--line)}.panel-head p{margin-top:4px;color:var(--muted);font-size:13px}.panel-body{padding:16px 17px}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;text-align:left;white-space:nowrap}th,td{padding:11px 13px;border-bottom:1px solid #eeeef0}th:first-child,td:first-child{padding-left:17px}th{background:#f2f6f6;font-size:12px;color:var(--muted);font-weight:600}td{font-size:13px}tr:last-child td{border-bottom:0}tbody tr:hover{background:#f5fafa}.badge.success{background:#e2f5eb;color:var(--green)}.badge.failed{background:#fcebee;color:var(--red)}.badge.pending,.badge.sending{background:#fff1df;color:var(--orange)}.empty{padding:29px 17px;text-align:center;color:var(--muted)}.pager{border-top:1px solid var(--line);padding:10px 17px;color:var(--muted);font-size:13px}.pager .button{min-height:30px;padding:4px 9px}.toolbar{flex-wrap:wrap;padding:12px 17px;border-bottom:1px solid var(--line)}.filters{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.filters label{min-width:110px}.filters .search{flex:1;min-width:180px}.form-grid{display:grid;gap:14px}.form-grid label,.filters label{display:grid;gap:5px;font-weight:600}.form-grid input,.form-grid select,.form-grid textarea,.filters input,.filters select,.condition-row select,.condition-trigger{width:100%;min-height:36px;border:1px solid #e4e7ea;border-radius:7px;padding:7px 9px;background:white;color:var(--ink);font-weight:400}.form-grid textarea{resize:vertical;min-height:105px}.actions{justify-content:flex-end;flex-wrap:wrap}.stack{display:grid;gap:10px}.preview{display:grid;gap:9px;margin:12px 0}.preview article{border-radius:7px;background:#f5fafa;padding:11px;line-height:1.6;overflow-wrap:anywhere}.preview strong{display:block}.template-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:13px}.template-card{margin:0;overflow-wrap:anywhere}.template-card p{line-height:1.7}.chips{display:flex;gap:5px;flex-wrap:wrap}.charts{display:grid;grid-template-columns:1fr 1fr;gap:14px}.charts .panel-body{min-height:98px}.progress{display:flex;overflow:hidden;min-height:12px;border-radius:9px;background:#edf2f9;margin:10px 0}.progress span{background:#36a27a}.progress .failed{background:#d26372}.progress .outstanding{background:#e1a249}.legend{display:flex;gap:12px;flex-wrap:wrap}.reason-row{display:flex;justify-content:space-between;gap:8px;padding:5px 0}.notice{color:var(--muted);line-height:1.55}.details{display:grid;grid-template-columns:1fr 1fr;gap:13px;overflow-wrap:anywhere}.details div{display:grid;gap:4px}.details span{color:var(--muted);font-size:12px}dialog{border:1px solid var(--line);border-radius:13px;color:var(--ink);padding:25px;width:min(535px,calc(100% - 32px));max-height:calc(100% - 30px);box-shadow:0 18px 70px #132f2b44}dialog::backdrop{background:#102b2a77}dialog h2{margin:0 30px 15px 0}.close{position:absolute;top:12px;right:15px;font-size:25px}#notice{position:fixed;bottom:18px;right:18px;z-index:4;max-width:min(450px,calc(100% - 36px));padding:0;color:white;border-radius:8px;background:#204c42}#notice:not(:empty){padding:11px 15px}#notice.error{background:#a3263d}.error-text{color:var(--red);overflow-wrap:anywhere}.error-text:empty{display:none}[hidden]{display:none!important}input[type=checkbox]{accent-color:var(--blue);width:15px;height:15px;vertical-align:middle}
@media(max-width:1050px){.sidebar{width:190px}.shell{margin-left:190px}.stats{gap:8px}.metric{padding:12px}}
@media(max-width:700px){.sidebar{position:static;width:auto;padding:12px}.brand{margin:0 0 7px}.brand-icon{width:33px;height:33px}.brand strong{font-size:17px}.brand small,.nav-label{display:none}.sidebar nav{display:flex;overflow:auto;gap:3px}.sidebar nav a{white-space:nowrap;padding:6px 8px;min-height:32px;font-size:12px}.sidebar nav a{gap:5px}.nav-icon{width:14px;height:14px}.shell{margin:0}.topbar{min-height:42px;font-size:12px}main{padding-top:17px}h1{font-size:23px}.page-head{align-items:flex-start}.stats,.charts{grid-template-columns:1fr 1fr}.actions .button{white-space:normal}.panel-head{align-items:flex-start}.details{grid-template-columns:1fr}}

.campaign-source{display:block;margin-top:4px;color:var(--muted)}
.login-page .login {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 28px 16px;
  background:
    radial-gradient(ellipse at 87% 90%, #1a8c6e29, transparent 62%),
    linear-gradient(135deg, #f5fafa 10%, #eaf6f3 80%);
}
.login .login-artwork {
  position: absolute;
  z-index: -1;
  right: clamp(0px, 4vw, 72px);
  bottom: clamp(0px, 6vh, 64px);
  width: min(56vw, 720px);
  color: #1a8c6e;
  opacity: .26;
  pointer-events: none;
}
.login .login-card {
  width: min(100%, 416px);
  margin: 0;
  padding: clamp(24px, 5vw, 44px);
  border-color: #d7e7e2;
  border-radius: 18px;
  box-shadow: 0 18px 52px #126b591a, 0 2px 8px #126b590d;
}
.login .brand {
  gap: 14px;
  margin: 0 0 30px;
}
.login .brand-icon {
  width: 46px;
  height: 46px;
}
.login .brand h1 {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: .06em;
}
.login .brand p {
  margin-top: 5px;
  color: var(--muted);
}
.login .form-grid {
  gap: 18px;
}
.login .form-grid label {
  gap: 8px;
}
.login .form-grid input {
  min-height: 46px;
  padding: 9px 12px;
  border-color: #a5bcb5;
  border-radius: 8px;
  font-size: 16px;
}
.login .button.primary {
  min-height: 46px;
  margin-top: 4px;
  border-radius: 8px;
}
.login .error-text:not(:empty) {
  padding: 9px 12px;
  border-radius: 8px;
  background: #fcebee;
  line-height: 1.5;
}
@media (max-width: 700px) {
  .login .login-artwork {
    right: 0;
    bottom: 0;
    width: min(90vw, 520px);
    opacity: .18;
  }
}
.campaign-progress .progress{min-height:8px;margin:0 0 5px}
.campaign-progress small{color:var(--muted)}
.progress .cancelled{background:#858a9b}
.badge.cancelled{background:#edf0f5;color:#4d5568}

:root{--nav:#f5f9f9;--top-height:52px;--side-width:184px}
.topbar{position:relative;z-index:3;min-height:var(--top-height);padding:8px 22px;background:#1a8c6e;border:0;color:white}
.topbar-title{display:flex;align-items:center;gap:18px}
.topbar .brand{margin:0;color:white;gap:9px}
.topbar .brand strong{font-size:18px;color:white}
.topbar .brand-icon{width:29px;height:29px;border-radius:6px;background:#ffffff26}
.topbar .brand-icon i{width:3px;height:11px}
.topbar .brand-icon i:nth-child(2){height:15px}
.topbar-divider{height:19px;width:1px;background:#ffffff55}
.topbar strong{color:white}
.topbar .button{min-height:30px;padding:3px 10px;background:#ffffff17;border-color:#ffffff66;color:white}
.topbar .mode{padding:4px 8px}
#account-name{max-width:min(20ch,32vw);overflow:hidden;text-overflow:ellipsis}
.sidebar{inset:var(--top-height) auto 0 0;width:var(--side-width);padding:15px 10px}
.sidebar nav a{border-radius:4px;min-height:38px}
.shell{margin-left:var(--side-width);background:white;min-height:calc(100vh - var(--top-height))}
main{max-width:none;padding:22px 24px 36px}
h1{font-size:21px;letter-spacing:0}
h2{font-size:16px}
.button,.form-grid input,.form-grid select,.form-grid textarea,.filters input,.filters select,.condition-row select,.condition-trigger{border-radius:4px}
.plan-tabs{display:flex;gap:22px;border-bottom:1px solid var(--line);overflow:auto}
.plan-tabs button{background:none;border:0;border-bottom:2px solid transparent;padding:9px 1px 11px;color:var(--muted);white-space:nowrap}
.plan-tabs button[aria-pressed=true]{color:var(--blue);border-color:#24b280;font-weight:600}
.plan-tabs span{font-variant-numeric:tabular-nums}
.plan-filters{margin:15px 0;gap:9px;font-size:12px}
.plan-filters label{min-width:95px}
.plan-filters fieldset{border:0;padding:0;margin:0;min-width:0}
.plan-filters legend{font-weight:600;margin:0 0 5px;padding:0}
.date-range{display:flex;align-items:center;gap:5px}
.plan-list{border-radius:5px}
.plan-list th,.plan-list td{padding:11px 10px}
.plan-list td:last-child{min-width:108px}
.plan-actions{display:flex;flex-wrap:wrap;gap:5px 10px;max-width:205px}
.plan-actions a,.plan-actions button{font-size:12px}
.plan-state{display:inline-flex;align-items:center;gap:6px}
.plan-state::before{content:"";width:7px;height:7px;border-radius:50%;background:#99a3a9}
.plan-state.running::before{background:#24b280}
.plan-state.pending_approval::before{background:#e4a029}
.plan-state.paused::before{background:#879caf}
.plan-issue{display:block;white-space:normal;max-width:180px;margin-top:4px;color:var(--orange)}
.channel-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.channel{display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:5px;min-height:62px;padding:13px;background:white;color:var(--ink);text-align:left}
.channel.selected{background:#eaf6f3;border-color:#24a784;font-weight:600;cursor:pointer}
.channel small{margin-left:auto;color:var(--muted)}
.channel input{accent-color:var(--blue)}
.dialog-footer,.wizard-footer{display:flex;justify-content:flex-end;gap:9px}
.customer-row-actions{display:flex;gap:12px}
.customer-edit-grid{grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));margin-bottom:12px}
.dialog-footer{border-top:1px solid var(--line);margin-top:20px;padding-top:13px}
dialog:has(#template-form) {
  overflow-y: auto;
  padding-bottom: 0;
  scroll-padding-bottom: 50px;
}
#template-form .chips {
  min-width: 0;
}
#template-form .actions {
  position: sticky;
  bottom: 0;
  padding: 6px 0;
  background: white;
}
.wizard-page{padding:0}
.wizard-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:12px 18px;background:var(--page);border-bottom:1px solid var(--line)}
.wizard-toolbar input{width:clamp(140px,25vw,290px);padding:8px 10px;border:1px solid var(--line);border-radius:4px}
.wizard-layout{display:grid;grid-template-columns:148px minmax(0,1fr);min-height:calc(100vh - 115px)}
#wizard-steps{border-right:1px solid var(--line);padding:14px 10px}
.wizard-step{display:flex;align-items:center;gap:8px;width:100%;padding:11px 6px;border:0;border-radius:4px;background:none;color:var(--muted);text-align:left}
.wizard-step span{display:grid;place-items:center;width:23px;height:23px;border-radius:50%;background:#eef3f3;font-size:12px}
.wizard-step[aria-current]{background:#e3f5f0;color:#126b59;font-weight:600}
.wizard-step[aria-current] span{background:#18836d;color:white}
.wizard-workspace{padding:19px 22px}
.wizard-workspace h2{border-left:3px solid #24b280;padding-left:9px;margin-bottom:13px}
.wizard-card{border:1px solid var(--line);border-radius:5px;padding:16px;align-items:start}
.wizard-card>label{max-width:540px}
.wizard-card .chips{align-items:center}
.wizard-card .muted{font-size:13px}
.wizard-workspace>.wizard-footer,.wizard-workspace>.error-text{margin-top:14px}
.audience-toolbar{display:flex;align-items:end;gap:12px}
.condition-row{display:grid;grid-template-columns:minmax(100px,1fr) minmax(85px,.65fr) minmax(110px,2fr) auto;gap:10px;align-items:center;max-width:780px;background:var(--page);padding:8px;border-radius:4px}
.condition-value{position:relative;min-width:0}
.condition-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left}
.condition-trigger span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.condition-trigger::after{content:"";width:6px;height:6px;flex:none;margin-right:2px;border-right:1px solid;border-bottom:1px solid;transform:translateY(-2px) rotate(45deg)}
.condition-trigger[aria-expanded="true"]{border-color:var(--blue)}
.condition-options{position:absolute;inset:calc(100% + 4px) 0 auto;z-index:3;border:1px solid var(--line);border-radius:6px;background:var(--surface);box-shadow:0 8px 22px #204c4226;padding:4px}
.condition-options label{display:flex;align-items:center;gap:8px;padding:6px;border-radius:4px;font-weight:400;cursor:pointer}
.condition-options label:hover,.condition-options label:focus-within{background:#eaf6f3}
.condition-options label span{overflow-wrap:anywhere}
.condition-options input[type="checkbox"]{width:15px;height:15px;min-height:0;flex:none;margin:0}
.condition-options .condition-select-all{border-bottom:1px solid var(--line);font-weight:600}
.condition-option-list{max-height:220px;overflow:auto}
.audience-summary,.template-body:not(:empty){padding:10px 12px;background:#eaf6f3;border-radius:4px;overflow-wrap:anywhere}
@media(max-width:950px){:root{--side-width:150px}.wizard-layout{grid-template-columns:123px minmax(0,1fr)}}
@media(max-width:700px){
  .topbar{padding:8px 12px}.topbar-title{gap:9px}.sidebar{width:auto;padding:6px 8px}.sidebar nav a{min-height:32px}
  .shell{min-height:0}main{padding:16px 13px}.plan-tabs{gap:14px}
  .wizard-layout{grid-template-columns:1fr}#wizard-steps{display:flex;overflow:auto;border-right:0;border-bottom:1px solid var(--line);padding:5px}
  .wizard-step{flex:none;width:auto;white-space:nowrap}.wizard-workspace{padding:14px 12px}
  .wizard-toolbar{padding:9px 12px}.wizard-toolbar .actions{gap:6px}
  .condition-row{grid-template-columns:1fr 1fr}.channel-grid{gap:8px}.channel{padding:8px}
}

body.plan-editing .sidebar{display:none}
body.plan-editing .shell{margin-left:0}
.plan-list .empty{padding:24px 12px}

.heading-with-icon{display:flex;align-items:center;gap:8px}
.heading-icon{width:1em;height:1em;flex:none;color:#18836d;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
