/* Bulk Mailer — clean admin theme */
*,*::before,*::after{box-sizing:border-box}
body{margin:0;font-family:-apple-system,system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:#f3f4f6;color:#1f2937;line-height:1.5}
a{color:#2563eb;text-decoration:none}a:hover{text-decoration:underline}

/* Layout */
.layout{display:flex;min-height:100vh}
.sidebar{
  width:236px;flex:0 0 236px;height:100vh;position:sticky;top:0;z-index:40;
  background:linear-gradient(180deg,#0b1220 0%,#111c30 100%);color:#94a3b8;
  display:flex;flex-direction:column;border-right:1px solid #1f2a40;
}
.sidebar .brand{display:flex;align-items:center;gap:10px;padding:20px 16px 18px;border-bottom:1px solid #1f2a40}
.brand-logo{
  display:inline-grid;place-items:center;width:34px;height:34px;border-radius:10px;color:#fff;flex:0 0 auto;
  background:linear-gradient(135deg,#2563eb,#0d9488);box-shadow:0 6px 14px -6px rgba(37,99,235,.7);
}
.brand-text{font-weight:700;font-size:1.02rem;color:#fff;letter-spacing:.01em}
.sidebar-close{display:none;margin-left:auto;width:30px;height:30px;border-radius:8px;border:0;background:transparent;color:#94a3b8;cursor:pointer;place-items:center}
.sidebar-close:hover{background:#1f2a40;color:#fff}
.new-campaign{margin:16px 14px 4px}
.sidebar nav{flex:1;overflow-y:auto;overflow-x:hidden;padding:4px 0 10px}
.nav-label{display:block;padding:12px 20px 4px;font-size:.65rem;font-weight:700;letter-spacing:.13em;text-transform:uppercase;color:#64748b}
.sidebar nav a{display:flex;align-items:center;gap:11px;margin:2px 12px;padding:9px 12px;border-radius:9px;color:#94a3b8;font-size:.88rem;transition:background .15s ease,color .15s ease}
.sidebar nav a svg{flex:0 0 auto}
.sidebar nav a:hover{background:#17233b;color:#fff;text-decoration:none}
.sidebar nav a.active{background:linear-gradient(90deg,rgba(37,99,235,.35),rgba(37,99,235,.08));color:#fff;box-shadow:inset 2px 0 0 #3b82f6}
.sidebar-footer{padding:14px 20px;border-top:1px solid #1f2a40}
.logout-form{display:block}
.logout-form button{display:flex;align-items:center;gap:9px;background:transparent;border:0;color:#94a3b8;cursor:pointer;font-size:.85rem;padding:0;transition:color .15s ease}
.logout-form button:hover{color:#fff;opacity:1}
.content{flex:1;padding:32px 40px;max-width:1200px}

.sidebar-toggle{
  display:none;position:fixed;top:14px;left:14px;z-index:60;width:40px;height:40px;border-radius:10px;border:0;
  background:#111c30;color:#fff;place-items:center;cursor:pointer;box-shadow:0 6px 16px -6px rgba(2,8,26,.6);
}
.sidebar-toggle:hover{background:#1f2a40}
.sidebar-backdrop{display:none;position:fixed;inset:0;background:rgba(2,8,26,.55);z-index:45;opacity:0;transition:opacity .2s ease}

/* Auth */
.login-page{display:grid;place-items:center;min-height:100vh}
.login-box{background:#fff;padding:40px;border-radius:8px;width:100%;max-width:420px;box-shadow:0 1px 4px rgba(0,0,0,.1)}
.login-box h1{margin-top:0;text-align:center}

/* Forms */
label{display:block;margin-bottom:14px}
input[type=text],input[type=email],input[type=password],input[type=file],textarea,select{width:100%;padding:10px 12px;border:1px solid #d1d5db;border-radius:9px;font-size:.92rem;color:#0f172a;background:#fff;transition:border-color .15s ease,box-shadow .15s ease}
input[type=text]:focus,input[type=email]:focus,input[type=password]:focus,input[type=file]:focus,textarea:focus,select:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.18)}
textarea.mono{font-family:monospace;font-size:.82rem}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 18px;border:0;border-radius:10px;font-weight:600;font-size:.88rem;color:#fff;text-decoration:none;cursor:pointer;background:linear-gradient(135deg,#2563eb,#0d9488)}
.btn:hover{filter:brightness(1.08)}
.btn-gradient{
    width:100%;
    padding:12px 18px;
}
.btn-sm{padding:4px 10px;font-size:.78rem;border-radius:7px;background:#e2e8f0;color:#475569;border:none;cursor:pointer;transition:background .15s ease}
.btn-sm:hover{background:#cbd5e1}
.btn-danger{background:linear-gradient(135deg,#dc2626,#b91c1c)}
.btn-sm.txt-red{color:#dc2626}
.btn-sm.txt-red:hover{background:#fee2e2;color:#b91c1c}
.btn-row{display:flex;gap:12px;align-items:center;margin-top:16px}
.btn-row.split{flex-wrap:wrap}
.btn-row.split .btn{flex:1 1 0;min-width:200px;width:auto;justify-content:center}
.check-label{display:inline-flex;gap:6px;align-items:center;width:auto}
.flex-between{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}
.inline-form{display:inline-flex;gap:8px;align-items:center}
.advanced{margin:16px 0;border:1px solid #e5e7eb;border-radius:4px;padding:16px}.advanced summary{cursor:pointer;font-weight:600;margin-bottom:8px}

/* Grid */
.grid{display:grid;gap:16px}.cols-2{grid-template-columns:repeat(2,1fr)}.cols-3{grid-template-columns:repeat(3,1fr)}.cols-4{grid-template-columns:repeat(4,1fr)}

/* Cards */
.card{background:#fff;border:1px solid #e5e7eb;border-radius:6px;padding:16px;text-align:center}
.card .num{display:block;font-size:1.8rem;font-weight:700;line-height:1}

/* Table */
table{width:100%;border-collapse:collapse;background:#fff;border:1px solid #e5e7eb;border-radius:6px;overflow:hidden}
th,td{padding:10px 14px;border-bottom:1px solid #f3f4f6;text-align:left}
th{background:#f9fafb;font-weight:600;font-size:.85rem;color:#6b7280}
td.actions{text-align:right}

/* Badge */
.badge{display:inline-block;padding:2px 8px;border-radius:10px;font-size:.75rem;font-weight:600;text-transform:uppercase}
.badge.draft{background:#e5e7eb;color:#6b7280}.badge.queued{background:#dbeafe;color:#1d4ed8}.badge.sending{background:#fef3c7;color:#92400e}.badge.paused{background:#fef3c7;color:#92400e}.badge.completed{background:#d1fae5;color:#065f46}.badge.failed,.badge.bounced{background:#fee2e2;color:#991b1b}.badge.sent{background:#d1fae5;color:#065f46}.badge.pending,.badge.processing{background:#e0f2fe;color:#0369a1}.badge.skipped{background:#f3f4f6;color:#6b7280}.badge.complained{background:#fee2e2;color:#991b1b}.badge.unsubscribed{background:#fef3c7;color:#92400e}

/* Progress */
.progress-wrap{background:#e5e7eb;border-radius:9999px;height:22px;position:relative;margin-bottom:24px}
.progress-bar{background:#2563eb;height:100%;border-radius:9999px;transition:width .3s}
.progress-wrap span{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:.8rem;font-weight:600}

/* Alert */
.alert{padding:10px 16px;border-radius:4px;margin-bottom:16px;font-size:.9rem}.alert-success{background:#d1fae5;color:#065f46}.alert-error{background:#fee2e2;color:#991b1b}

/* Utils */
.text-success{color:#059669}.text-error{color:#dc2626}.text-muted{color:#9ca3af}.muted{color:#9ca3af;font-size:.85rem}.actions{white-space:nowrap}
ul.pagination{list-style:none;padding:0;display:flex;gap:4px;margin-top:12px}.pagination li{display:inline-block}.pagination a,.pagination span{display:inline-block;padding:4px 10px;border:1px solid #d1d5db;border-radius:4px;font-size:.85rem}
.pagination .active span{background:#2563eb;color:#fff;border-color:#2563eb}

@media(max-width:900px){.cols-4{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.cols-3,.cols-4{grid-template-columns:1fr}}
@media(max-width:900px){
  .sidebar-toggle{display:grid}
  .sidebar-backdrop.show{display:block;opacity:1}
  .sidebar{
    position:fixed;left:0;top:0;bottom:0;height:100vh;width:264px;
    transform:translateX(-100%);transition:transform .25s ease;box-shadow:0 20px 60px rgba(2,8,26,.5);
  }
  .sidebar.open{transform:translateX(0)}
  .sidebar-close{display:grid}
  .content{padding:78px 16px 16px}
  body.menu-open{overflow:hidden}
}

/* ============ Auth / Login page ============ */
.auth-page{
  display:grid;place-items:center;min-height:100vh;padding:24px;
  background:radial-gradient(1200px 600px at 15% -10%, #27458f 0%, transparent 55%),
             radial-gradient(1000px 500px at 110% 110%, #0f766e 0%, transparent 45%),
             linear-gradient(160deg,#0b1b3f 0%, #10295e 55%, #0b1b3f 100%);
}
.auth-card{
  position:relative;overflow:hidden;width:100%;max-width:400px;background:#fff;
  border-radius:16px;padding:38px 40px 28px;
  box-shadow:0 24px 60px -20px rgba(2,8,26,.55),0 8px 24px rgba(2,8,26,.25);
}
.auth-card::before{
  content:"";position:absolute;top:0;left:0;right:0;height:4px;
  background:linear-gradient(90deg,#2563eb,#0d9488);
}
.auth-brand{text-align:center;margin-bottom:26px}
.auth-logo{
  display:inline-grid;place-items:center;width:58px;height:58px;border-radius:16px;color:#fff;
  background:linear-gradient(135deg,#2563eb,#0d9488);
  box-shadow:0 10px 22px -8px rgba(37,99,235,.65);
}
.auth-brand h1{margin:16px 0 4px;font-size:1.35rem;letter-spacing:-.01em;color:#0f172a}
.auth-brand p{margin:0;font-size:.85rem;color:#64748b}

.toggle-pass{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  width:36px;height:36px;display:grid;place-items:center;color:#94a3b8;
  background:transparent;border:0;border-radius:8px;cursor:pointer;transition:color .15s ease,background .15s ease;
}
.toggle-pass:hover{color:#2563eb;background:#eff6ff}
.toggle-pass .icon-on{display:none}
.toggle-pass.on .icon-off{display:none}
.toggle-pass.on .icon-on{display:block}

.auth-form .check-label{margin:4px 0 20px;display:flex;gap:8px;align-items:center;font-size:.85rem;color:#475569;cursor:pointer}
.auth-form .check-label input{width:16px;height:16px;accent-color:#2563eb;margin:0}

.auth-footer{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:24px;font-size:.78rem;color:#94a3b8}
.auth-dot{width:7px;height:7px;border-radius:50%;background:#10b981;box-shadow:0 0 0 3px rgba(16,185,129,.18)}

@media(max-width:480px){.auth-card{padding:30px 22px 22px}}

/* ============ Dashboard ============ */
.dash-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:8px 0 22px}
.dash-head h2{margin:0}
.dash-head .muted{color:#64748b;font-size:.86rem;margin:4px 0 0}
.dash-head .btn{text-decoration:none}

.dash-stats{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin-bottom:22px}
.stat-card{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:18px 16px;box-shadow:0 2px 8px rgba(15,23,42,.04)}
.stat-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:11px;flex:0 0 auto}
.stat-icon svg{display:block}
.stat-icon.c1{background:#dbeafe;color:#1d4ed8}
.stat-icon.c2{background:#d1fae5;color:#047857}
.stat-icon.c3{background:#fef3c7;color:#b45309}
.stat-icon.c4{background:#e0f2fe;color:#0369a1}
.stat-icon.c5{background:#ede9fe;color:#6d28d9}
.stat-icon.c6{background:#fee2e2;color:#b91c1c}
.stat-card .stat-num{display:block;font-size:1.5rem;font-weight:700;line-height:1.05;color:#0f172a}
.stat-card .stat-label{font-size:.78rem;color:#64748b;white-space:nowrap}
.stat-card.highlight{background:linear-gradient(135deg,#4f46e5,#6d28d9);border:0}
.stat-card.highlight .stat-num{color:#fff}
.stat-card.highlight .stat-label{color:#c7d2fe}
.stat-card.highlight .stat-icon{background:rgba(255,255,255,.18);color:#fff}

.dash-row{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:22px}
.panel{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:20px;box-shadow:0 2px 8px rgba(15,23,42,.04)}
.panel-title{margin:0 0 14px;font-size:.92rem;font-weight:700;color:#0f172a;letter-spacing:.01em}
.panel .empty{color:#64748b;font-size:.85rem;margin:6px 0}
.panel .empty a{color:#2563eb}
.panel .hint{margin-top:14px;padding-top:12px;border-top:1px dashed #e5e7eb;font-size:.75rem;color:#94a3b8}
.panel .hint code,.queue-note code{background:#f1f5f9;color:#334155;padding:2px 6px;border-radius:5px;font-size:.75rem}

.quick-tiles{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.tile{display:flex;flex-direction:column;gap:3px;padding:16px;border:1px solid #e5e7eb;border-radius:11px;background:#fafbfc;color:#0f172a;text-decoration:none;transition:border-color .15s ease,box-shadow .15s ease,transform .12s ease}
.tile:hover{border-color:#93c5fd;box-shadow:0 8px 18px -10px rgba(37,99,235,.35);transform:translateY(-2px)}
.tile-ic{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;color:#475569;background:#fff;border:1px solid #e5e7eb;margin-bottom:8px}
.tile.primary .tile-ic{background:linear-gradient(135deg,#2563eb,#0d9488);color:#fff;border:0}
.tile-label{font-weight:600;font-size:.88rem}
.tile-hint{font-size:.75rem;color:#94a3b8}

.donut-box{display:flex;align-items:center;gap:26px;flex-wrap:wrap}
.donut{position:relative;width:132px;height:132px;border-radius:50%;flex:0 0 auto;
  -webkit-mask:radial-gradient(closest-side,transparent 70%,#000 71%);mask:radial-gradient(closest-side,transparent 70%,#000 71%)}
.donut-inner{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.donut-val{font-size:1.5rem;font-weight:700;color:#0f172a;line-height:1}
.donut-lbl{font-size:.7rem;color:#94a3b8;text-transform:uppercase;letter-spacing:.04em}
.donut-legend{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:7px;min-width:150px;flex:1}
.donut-legend li{display:flex;align-items:center;gap:8px;font-size:.8rem;color:#334155}
.donut-legend .dot{width:9px;height:9px;border-radius:3px;flex:0 0 auto}
.donut-legend strong{margin-left:auto;color:#0f172a}

.camp-row{padding:11px 0;border-bottom:1px solid #f1f5f9}
.camp-row:last-child{border-bottom:0}
.camp-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.camp-name{font-weight:600;font-size:.9rem;color:#0f172a;text-decoration:none}
.camp-name:hover{color:#2563eb}
.camp-top .badge{margin-left:8px}
.camp-count{font-size:.75rem;color:#94a3b8;white-space:nowrap}
.camp-inline{display:flex;align-items:center;gap:10px;margin-top:7px}
.mini-bar{flex:1;height:7px;background:#eef2f7;border-radius:9999px;overflow:hidden}
.mini-bar-fill{display:block;height:100%;background:linear-gradient(90deg,#2563eb,#3b82f6);border-radius:9999px}
.camp-rate{font-size:.75rem;font-weight:700}
.camp-rate.green{color:#10b981}.camp-rate.red{color:#ef4444}
.camp-fail{margin:6px 0 0;font-size:.75rem;color:#ef4444}

.barchart{display:flex;align-items:flex-end;gap:10px;height:170px;padding:10px 4px 0;border-bottom:1px solid #e5e7eb}
.bcol{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;height:100%;justify-content:flex-end;min-width:0}
.bstack{width:70%;max-width:34px;min-height:3px;display:flex;flex-direction:column;border-radius:5px 5px 1px 1px;overflow:hidden;background:#eef2f7}
.bbar.sent{background:linear-gradient(180deg,#10b981,#059669)}
.bbar.fail{background:linear-gradient(180deg,#ef4444,#dc2626)}
.bcol-lbl{font-size:.66rem;color:#94a3b8;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.chart-legend{display:flex;gap:16px;margin-top:12px;font-size:.76rem;color:#64748b}
.chart-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px}
.chart-legend .sent{background:#10b981}
.chart-legend .fail{background:#ef4444}

.list-row{display:flex;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid #f1f5f9}
.list-row:last-child{border-bottom:0}
.list-name{font-weight:500;font-size:.87rem;color:#334155;min-width:0;flex:0 0 30%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.list-img{flex:1;height:7px;background:#eef2f7;border-radius:9999px;overflow:hidden}
.list-img-fill{display:block;height:100%;background:linear-gradient(90deg,#0d9488,#14b8a6);border-radius:9999px}
.list-count{font-weight:700;font-size:.82rem;color:#0f172a;min-width:34px;text-align:right}

.att-row{display:flex;align-items:flex-start;gap:10px;padding:9px 0;border-bottom:1px solid #f1f5f9}
.att-row:last-child{border-bottom:0}
.att-row .badge{margin-top:2px;flex:0 0 auto}
.att-text{display:flex;flex-direction:column;gap:1px;min-width:0}
.att-mail{font-size:.84rem;font-weight:500;color:#0f172a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.att-camp{font-size:.73rem;color:#94a3b8}
.all-clear{display:flex;align-items:center;gap:10px;color:#065f46;background:#d1fae5;border:1px solid #a7f3d0;border-radius:10px;padding:13px;font-size:.85rem}
.all-clear-ic{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#10b981;color:#fff;flex:0 0 auto}

.dash-empty{display:flex;align-items:center;gap:14px;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:11px;padding:16px}
.dash-empty-ic{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:#eef2ff;color:#6366f1;flex:0 0 auto}
.dash-empty div{display:flex;flex-direction:column;gap:2px}
.dash-empty strong{font-size:.87rem;color:#334155}
.dash-empty div span{font-size:.78rem;color:#94a3b8}
.hint-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#10b981;vertical-align:middle;margin-right:6px;box-shadow:0 0 0 3px rgba(16,185,129,.18)}
.queue-note{margin-top:12px;font-size:.8rem;color:#92400e;background:#fffbeb;border:1px solid #fde68a;border-radius:9px;padding:11px}
.queue-note code{background:#fef3c7}
.queue-note .ok{color:#047857;font-weight:700}
.queue-note .bad{color:#b91c1c;font-weight:700}
.queue-controls{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.queue-controls .btn.btn-sm{background:linear-gradient(135deg,#2563eb,#0d9488);color:#fff;text-decoration:none}
.queue-controls .btn.btn-sm:disabled{background:#cbd5e1;color:#64748b;cursor:not-allowed;filter:none}
.queue-controls .btn-sm{background:#e2e8f0;color:#475569;border:none;padding:4px 10px;font-size:.78rem;border-radius:7px;cursor:pointer}
.queue-controls .btn-sm:hover{background:#cbd5e1}

@media(max-width:1100px){.dash-stats{grid-template-columns:repeat(3,1fr)}}
@media(max-width:900px){.dash-row{grid-template-columns:1fr}}
@media(max-width:720px){.dash-stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:480px){.dash-stats{grid-template-columns:1fr}.dash-head{flex-direction:column;align-items:stretch}.quick-tiles{grid-template-columns:1fr}}

/* ============ Lists ============ */
.back-link{display:inline-block;font-size:.8rem;color:#94a3b8;margin-bottom:4px}
.back-link:hover{color:#2563eb;text-decoration:none}
.mini-stats{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:20px}
.mini-stats .stat-card{flex:1;min-width:180px}
.panel.narrow{max-width:560px}

.form-row{display:flex;gap:14px;flex-wrap:wrap}
.form-row label{display:flex;flex-direction:column;gap:5px;margin:0;font-size:.82rem;font-weight:600;color:#334155}
.form-row .grow{flex:1;min-width:150px}
.form-row textarea{margin:0}
.form-row input[type=text],.form-row input[type=email],.form-row input[type=file],.form-row textarea,.form-row input[type=search]{
  border:1px solid #d1d5db;border-radius:9px;font-size:.9rem;transition:border-color .15s ease,box-shadow .15s ease;
}
.form-row input:focus,.form-row textarea:focus,.form-row input[type=file]:focus,.form-row input[type=search]:focus{
  outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.18);
}

.form-page{max-width:520px;margin:0 auto;text-align:center}
.form-page .back-link{margin-bottom:8px}
.form-page h2{margin:0 0 6px;text-align:center}
.form-sub{margin:0 0 20px;text-align:center;color:#94a3b8;font-size:.86rem}
.form-page .panel{text-align:left;padding:28px}
.form-page .panel .btn-row{margin-top:22px}
.form-page .center-note{text-align:center;margin-top:14px}

/* ============ Shared form fields (login style) ============ */
.form-group{margin-bottom:18px;text-align:left}
.form-group label{display:flex;align-items:baseline;gap:6px;margin:0 0 7px;font-size:.82rem;font-weight:600;color:#334155}
.form-group label.mono-label{flex-direction:column;gap:0}
.form-group .req{color:#dc2626}
.form-group .opt{color:#94a3b8;font-weight:400;font-size:.72rem;text-transform:uppercase;letter-spacing:.06em}
.input-wrap{position:relative}
.input-wrap:focus-within .input-icon{color:#2563eb}
.input-icon{
  position:absolute;left:13px;top:50%;transform:translateY(-50%);color:#94a3b8;
  display:grid;place-items:center;pointer-events:none;transition:color .15s ease;
}
.input-icon.top{top:16px;transform:none}
input.input-field,select.input-field,textarea.input-field{
  width:100%;height:44px;padding:0 46px 0 42px;border:1px solid #d1d5db;border-radius:9px;font-size:.92rem;color:#0f172a;
  background:#fff;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
textarea.input-field{height:auto;min-height:96px;resize:vertical;padding-top:12px;padding-bottom:12px;line-height:1.55}
select.input-field{appearance:none;-webkit-appearance:none;cursor:pointer;padding-right:40px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center}
input.input-field::placeholder,textarea.input-field::placeholder{color:#a4b0c1}
input.input-field:hover,select.input-field:hover,textarea.input-field:hover{border-color:#b6c2d4}
input.input-field:focus,select.input-field:focus,textarea.input-field:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.18);background:#fff}
.input-counter{position:absolute;right:12px;top:14px;font-size:.72rem;color:#b6c2d4;font-variant-numeric:tabular-nums;pointer-events:none}
.form-hint{font-size:.76rem;color:#94a3b8;margin:6px 0 0;text-align:left}
.form-error{font-size:.78rem;color:#dc2626;margin:6px 0 0;text-align:left;display:flex;align-items:center;gap:5px;font-weight:500}
.form-error::before{content:"";width:7px;height:7px;border-radius:50%;background:#dc2626;flex:0 0 auto}
.form-group.has-error .input-field{border-color:#dc2626;box-shadow:0 0 0 3px rgba(220,38,38,.12)}
.form-group.has-error .input-field:focus{border-color:#dc2626;box-shadow:0 0 0 3px rgba(220,38,38,.18)}

.tabs{display:flex;gap:4px;border-bottom:1px solid #e5e7eb;margin-bottom:16px}
.tab{background:transparent;color:#64748b;border:0;border-bottom:2px solid transparent;padding:9px 14px;font-weight:600;font-size:.86rem;cursor:pointer;border-radius:8px 8px 0 0;margin:0}
.tab:hover{background:#f8fafc;color:#0f172a}
.tab.active{color:#2563eb;border-bottom-color:#2563eb}
.tab-panel{display:none}
.tab-panel.active{display:block}

.search-box{width:210px;padding:7px 11px;border:1px solid #d1d5db;border-radius:8px;font-size:.85rem}
.search-box:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.15)}
.flex-between .panel-title{margin:0}
.flex-between .btn-row{margin:0}

.list-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}
.list-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:18px;box-shadow:0 2px 8px rgba(15,23,42,.04);display:flex;flex-direction:column;gap:14px;transition:box-shadow .15s ease,transform .15s ease}
.list-card:hover{box-shadow:0 10px 22px -12px rgba(15,23,42,.18);transform:translateY(-2px)}
.list-card-head{display:flex;gap:12px;align-items:flex-start}
.list-card-ic{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#e0f2fe;color:#0369a1;flex:0 0 auto}
.list-card-title{display:flex;flex-direction:column;min-width:0}
.list-card-title a{font-weight:600;color:#0f172a;font-size:.95rem}
.list-card-title a:hover{color:#2563eb}
.list-card-desc{font-size:.78rem;color:#94a3b8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.list-card-meta{display:flex;gap:6px;flex-wrap:wrap}
.list-card-actions{display:flex;gap:8px;align-items:center;border-top:1px solid #f1f5f9;padding-top:12px}
.list-card-actions form{margin:0}

/* ============ Campaigns ============ */
.camp-card .list-card-head .badge{margin-left:auto;align-self:center}
.camp-card .list-card-title{flex:1;min-width:0}
.camp-card-ic{background:#e2e8f0;color:#475569}
.camp-card-ic.draft{background:#f1f5f9;color:#64748b}
.camp-card-ic.queued,.camp-card-ic.sending{background:#fef3c7;color:#b45309}
.camp-card-ic.paused{background:#fef3c7;color:#92400e}
.camp-card-ic.completed{background:#d1fae5;color:#047857}
.camp-card-ic.failed{background:#fee2e2;color:#b91c1c}
.camp-card-progress{display:flex;align-items:center;gap:10px}
.camp-card-progress .mini-bar{flex:1}
.camp-card-pct{font-size:.78rem;font-weight:700;color:#0f172a;min-width:36px;text-align:right}
.camp-card-meta{display:flex;gap:14px;flex-wrap:wrap;font-size:.76rem;color:#64748b}
.camp-card-meta .ok{color:#059669;font-weight:600}
.camp-card-meta .txt-red{color:#dc2626;font-weight:600}
.camp-card .list-card-actions{justify-content:space-between;align-items:center}
.camp-card .list-card-actions .muted{font-size:.75rem}

/* ============ Campaign create: delivery & pace ============ */
.form-sep{border:0;border-top:1px solid #e5e7eb;margin:4px 0 20px}
.is-hidden{display:none!important}
.check-send{font-weight:500;font-size:.88rem;color:#334155}
.check-label input{accent-color:#2563eb;width:16px;height:16px;margin:0}
.schedule-wrap{margin-top:10px}
.pace-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pace-row .input-field{padding:0 12px;text-align:left}
.pace-row .input-field.pace-count{width:110px;flex:0 0 auto}
.pace-row .input-field.pace-window{width:88px;flex:0 0 auto}
.pace-x{font-size:.8rem;color:#64748b;white-space:nowrap}
.pace-presets{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.pace-presets .btn-sm{border:1px solid #d1d5db;background:#f8fafc;line-height:1}
.delivery-bar{display:flex;gap:8px;flex-wrap:wrap;margin:-6px 0 18px}
.delivery-chip{display:inline-flex;align-items:center;gap:6px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:9999px;padding:5px 11px;font-size:.76rem;color:#475569}
.delivery-chip svg{color:#2563eb}

.empty-block{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:40px 20px;grid-column:1/-1}
.empty-illus{color:#94a3b8;background:#f8fafc;border-radius:14px;width:72px;height:72px;display:grid;place-items:center;border:1px dashed #d1d5db}
.empty-block p{color:#94a3b8;max-width:380px;margin:0;font-size:.88rem}
.empty-block strong{font-size:1rem;color:#334155}
.empty-block .btn{margin-top:4px}

@media(max-width:600px){.tabs{flex-wrap:wrap}}
@media(max-width:560px){.form-row{flex-direction:column}.form-row .grow{min-width:0}.flex-between{flex-wrap:wrap;gap:10px}.search-box{width:100%}}

.editor-wrap{border:1px solid #d1d5db;border-radius:10px;overflow:hidden;background:#fff}
.editor-wrap textarea{border:0;border-radius:0;min-height:340px;resize:vertical;padding:14px 16px}
.editor-wrap textarea:focus{box-shadow:none;outline:none}
.editor-wrap .input-icon{display:none}
.toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:8px;border-bottom:1px solid #e5e7eb;background:#f8fafc}
.toolbar .tb-btn{border:0;background:transparent;color:#475569;height:32px;min-width:32px;padding:0 8px;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;gap:5px;cursor:pointer;font-family:inherit;font-size:.82rem}
.toolbar .tb-btn:hover{background:#e2e8f0;color:#0f172a}
.toolbar .tb-sep{width:1px;height:20px;background:#e2e8f0;margin:0 6px}
.editor-wrap .layout-bar{display:flex;align-items:center;gap:8px;padding:8px;border-bottom:1px solid #e5e7eb;background:#eef2f7;font-size:.8rem;font-weight:600;color:#475569}
.editor-wrap .layout-bar .input-field{height:32px;width:auto;min-width:220px;padding:0 36px 0 12px;font-size:.85rem;font-weight:400}
.toolbar .tb-btn-file{position:relative;overflow:hidden;display:inline-flex;align-items:center;justify-content:center}
.toolbar .tb-btn-file input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer}
.img-panel{padding:12px;border-bottom:1px solid #e5e7eb;background:#f8fafc}
.img-upload-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:6px}
.img-upload-row .input-field{flex:1;min-width:220px}
.img-upload-row .img-or{color:#94a3b8;font-size:.8rem}
.editor-preview{border-bottom:1px solid #e5e7eb;background:#fff}
.editor-preview iframe{width:100%;border:0;display:block;background:#fff}

.settings-card{margin-bottom:18px}
.settings-card:last-child{margin-bottom:0}
.settings-title{display:flex;align-items:center;gap:9px;margin:0 0 18px;padding-bottom:14px;border-bottom:1px solid #eef2f6;font-size:1.05rem;color:#0f172a}
.settings-title svg{color:#2563eb}
.settings-card .form-hint{max-width:560px}
.settings-card form{margin:0}
.alert-error{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}
/* === mobile-drawer fix (appended override, wins over earlier rules) === */
@media(min-width:900px){
  .sidebar{ position:sticky; width:236px; transform:none }
}
@media(max-width:899px){
  .sidebar{ position:fixed; top:0; left:0; bottom:0; width:264px;
            transform:translateX(-100%); transition:transform .25s ease; z-index:50 }
  .sidebar.open{ transform:translateX(0) }
  .sidebar-backdrop{ z-index:40 }
  .sidebar-footer{ display:block }
}

/* === mobile-drawer fix (appended override, wins over earlier rules) === */
@media(min-width:900px){
  .sidebar{ position:sticky; width:236px; transform:none }
}
@media(max-width:899px){
  .sidebar{ position:fixed; top:0; left:0; bottom:0; width:264px;
            transform:translateX(-100%); transition:transform .25s ease; z-index:50 }
  .sidebar.open{ transform:translateX(0) }
  .sidebar-backdrop{ z-index:40 }
  .sidebar-footer{ display:block }
}

