:root{
  --bg:#f6f7f9;
  --bg-accent:#f1f5ff;
  --surface:#ffffff;
  --surface-2:#f9fafb;
  --surface-3:#f3f4f6;
  --surface-4:#e5e7eb;
  --line:#edf0f5;
  --line-strong:#d9e0ea;
  --text:#1f2937;
  --heading:#0f172a;
  --muted:#6b7280;
  --muted-2:#9ca3af;

  --primary:#3b82f6;
  --primary-strong:#2563eb;
  --primary-soft:#eff6ff;
  --success:#10b981;
  --success-soft:#ecfdf5;
  --warning:#f59e0b;
  --warning-soft:#fffbeb;
  --danger:#ef4444;
  --danger-soft:#fef2f2;
  --violet:#8b5cf6;
  --violet-soft:#f5f3ff;

  --shadow-soft:0 1px 2px rgba(15,23,42,.035), 0 8px 22px rgba(15,23,42,.04);
  --shadow-card:0 1px 2px rgba(15,23,42,.04), 0 14px 34px rgba(15,23,42,.055);
  --shadow-lift:0 18px 44px rgba(15,23,42,.095);
  --radius-xl:16px;
  --radius-lg:14px;
  --radius-md:12px;
  --radius-sm:8px;
  --max:1280px;
}

html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#151d2e;
  --bg-accent:#1b263a;
  --surface:#202b3f;
  --surface-2:#253148;
  --surface-3:#2d3a52;
  --surface-4:#3a4a64;
  --line:rgba(166,180,203,.20);
  --line-strong:rgba(166,180,203,.32);
  --text:#e8eef8;
  --heading:#f8fafc;
  --muted:#94a3b8;
  --muted-2:#64748b;
  --primary:#60a5fa;
  --primary-strong:#3b82f6;
  --primary-soft:rgba(59,130,246,.16);
  --success:#34d399;
  --success-soft:rgba(16,185,129,.16);
  --warning:#fbbf24;
  --warning-soft:rgba(245,158,11,.16);
  --danger:#f87171;
  --danger-soft:rgba(239,68,68,.16);
  --violet:#a78bfa;
  --violet-soft:rgba(139,92,246,.16);
  --shadow-soft:0 20px 40px rgba(2,6,23,.28);
  --shadow-card:0 26px 60px rgba(2,6,23,.36);
  --shadow-lift:0 30px 70px rgba(2,6,23,.42);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}

body{
  min-height:100vh;
  overflow-x:hidden;
  color:var(--text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-size:14px;
  line-height:1.55;
  letter-spacing:0;
  background:linear-gradient(180deg, #fafbfc 0%, var(--bg) 100%);
}

body::before{
  display:none;
}

html[data-theme="dark"] body::before{
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), transparent 18%),
    radial-gradient(circle at 20% 18%, rgba(96,165,250,.08), transparent 18%),
    radial-gradient(circle at 80% 82%, rgba(167,139,250,.08), transparent 22%);
}

a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}

.bg-scene{
  position:fixed;
  inset:0;
  overflow:hidden;
  pointer-events:none;
  z-index:0;
  display:none;
}

.bg-sticker{
  position:absolute;
  border-radius:30px;
  border:1px solid rgba(148,163,184,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.40), rgba(255,255,255,.12));
  box-shadow:var(--shadow-soft);
  opacity:.06;
  backdrop-filter:blur(16px);
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:14px;
  color:var(--muted);
  text-align:center;
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
}

.bg-sticker span{
  padding:5px 10px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.16);
  background:rgba(255,255,255,.78);
  font-size:11px;
  font-weight:600;
}

html[data-theme="dark"] .bg-sticker{
  opacity:.08;
}

html[data-theme="dark"] .bg-sticker span{
  background:rgba(15,23,42,.72);
  color:var(--muted);
}

.bg-scooby{
  left:-36px;
  bottom:88px;
  width:220px;
  height:310px;
  background-image:url('/static/decor/scooby-left.svg');
}

.bg-team{
  top:96px;
  right:-14px;
  width:252px;
  height:352px;
  background-image:url('/static/decor/team-right.svg');
}

.bg-van{
  right:54px;
  bottom:-20px;
  width:290px;
  height:160px;
  background-image:url('/static/decor/van-bottom.svg');
}

.topbar{
  position:sticky;
  top:0;
  z-index:40;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.82);
  backdrop-filter:blur(20px);
}

html[data-theme="dark"] .topbar{
  background:rgba(11,17,32,.86);
}

.topbar-inner{
  max-width:var(--max);
  margin:0 auto;
  padding:14px 16px;
  display:flex;
  align-items:center;
  gap:16px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  flex-shrink:0;
}

.brand-mark{
  width:48px;
  height:48px;
  border-radius:14px;
  display:grid;
  place-items:center;
  font-size:26px;
  color:#fff;
  background:linear-gradient(135deg, #fde047 0%, #84cc16 32%, #fb923c 68%, #8b5cf6 100%);
  box-shadow:0 14px 30px rgba(59,130,246,.18);
}

.brand-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.brand-title{
  color:var(--heading);
  font-family:"Bungee",Inter,sans-serif;
  font-size:18px;
  line-height:1;
  letter-spacing:0;
}

.brand-subtitle{
  color:var(--muted);
  font-size:11px;
  line-height:1.2;
}

.topbar-nav-wrap{
  min-width:0;
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:12px;
  flex:1;
  justify-content:flex-end;
}

.nav{
  min-width:0;
  display:flex;
  align-items:center;
  gap:4px;
  flex-wrap:wrap;
}

.nav-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}

.nav-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:8px 14px;
  border-radius:12px;
  border:1px solid transparent;
  color:var(--muted);
  font-size:14px;
  font-weight:700;
  transition:background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.nav-link:hover{
  color:var(--heading);
  background:var(--surface-2);
  border-color:var(--line);
}

.nav-link.is-current{
  color:var(--heading);
  background:var(--surface-2);
  border-color:var(--line);
  box-shadow:inset 0 0 0 1px rgba(59,130,246,.05);
}

html[data-theme="dark"] .nav-link.is-current{
  background:rgba(255,255,255,.05);
}

.nav-link--logout{
  background:transparent;
}

.page-shell{
  position:relative;
  z-index:1;
  max-width:var(--max);
  margin:0 auto;
  padding:28px 16px 44px;
}

.page-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:22px;
}

.page-header h1{
  margin:0;
  color:var(--heading);
  font-size:30px;
  line-height:1.18;
  font-weight:560;
}

.page-header p{
  max-width:820px;
  margin:8px 0 0;
  color:var(--muted);
  font-size:14px;
}

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

.card,
.details-card,
.stat-card{
  position:relative;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--text);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-card);
}

.card,
.details-card{
  padding:20px;
  margin-bottom:20px;
}

.card::before,
.details-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:1px;
  background:linear-gradient(90deg, rgba(59,130,246,.24), rgba(139,92,246,.18), transparent 75%);
}

.subcard{
  border:1px solid var(--line);
  background:var(--surface-2);
  border-radius:var(--radius-md);
  padding:16px;
  box-shadow:var(--shadow-soft);
}

.status-shell{
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow-soft);
}

.utility-card{
  padding:18px 18px 20px;
}

.grid{display:grid;gap:16px}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.stack{display:flex;flex-direction:column;gap:16px}

.stat-card{
  padding:18px;
  overflow:hidden;
}

.stat-card::after{
  content:"";
  position:absolute;
  right:-24px;
  bottom:-30px;
  width:94px;
  height:94px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(59,130,246,.10), transparent 68%);
}

.stat-label{
  color:var(--muted);
  font-size:12px;
  font-weight:500;
  letter-spacing:0;
}

.stat-value{
  margin-top:10px;
  color:var(--heading);
  font-size:28px;
  line-height:1;
  font-weight:560;
}

.stat-note{
  margin-top:10px;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

.hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  flex-wrap:wrap;
}

.hero-main{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
}

.hero h1{
  margin:0;
  color:var(--heading);
  font-size:30px;
  line-height:1.16;
  font-weight:560;
}

.hero-subtitle{
  margin-top:4px;
  color:var(--muted);
  font-size:14px;
}

.avatar-xl,
.avatar-lg,
.avatar-sm,
.avatar-fallback{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:999px;
  background:linear-gradient(135deg, var(--primary), var(--violet));
  color:#fff;
  border:2px solid rgba(255,255,255,.9);
  box-shadow:0 10px 26px rgba(15,23,42,.12);
}

.avatar-xl{width:88px;height:88px;font-size:34px}
.avatar-lg{width:54px;height:54px;font-size:22px}
.avatar-sm{width:40px;height:40px;font-size:15px}
.avatar-fallback{font-weight:600}

.tech-tag{
  display:inline-flex;
  align-items:center;
  margin-top:10px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--surface-2);
  color:var(--muted);
  font-size:12px;
  font-weight:500;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:28px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid transparent;
  font-size:12px;
  font-weight:500;
  line-height:1.2;
}

.pill.success{background:var(--success-soft);border-color:rgba(16,185,129,.18);color:var(--success)}
.pill.warn{background:var(--warning-soft);border-color:rgba(245,158,11,.18);color:#b45309}
.pill.danger{background:var(--danger-soft);border-color:rgba(239,68,68,.18);color:var(--danger)}
.pill.info{background:var(--primary-soft);border-color:rgba(59,130,246,.18);color:var(--primary-strong)}
.pill.neutral{background:var(--surface-2);border-color:var(--line);color:var(--muted)}

.kv{
  display:grid;
  grid-template-columns:160px 1fr;
  gap:8px 12px;
}

.muted{color:var(--muted)}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}

form{margin:0}

label{
  display:block;
  margin-bottom:7px;
  color:var(--muted);
  font-size:13px;
  font-weight:500;
}

input,
textarea,
select{
  width:100%;
  margin:0;
  padding:11px 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background:var(--surface-2);
  color:var(--text);
  font:inherit;
  font-weight:400;
  transition:border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

input::placeholder,
textarea::placeholder{
  color:var(--muted-2);
}

input:focus,
textarea:focus,
select:focus{
  outline:none;
  border-color:rgba(59,130,246,.45);
  background:var(--surface);
  box-shadow:0 0 0 4px rgba(59,130,246,.12);
}

textarea{
  min-height:120px;
  resize:vertical;
}

input[type="checkbox"]{
  width:16px;
  height:16px;
  padding:0;
  border-radius:5px;
  accent-color:var(--primary-strong);
  background:var(--surface);
}

input[type="color"]{
  width:48px;
  min-width:48px;
  padding:4px;
  overflow:hidden;
}

input[type="file"]{
  padding:10px 12px;
}

button,
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:10px 16px;
  border-radius:12px;
  border:1px solid transparent;
  background:var(--primary);
  color:#fff;
  box-shadow:0 10px 24px rgba(59,130,246,.18);
  font:inherit;
  font-weight:500;
  font-size:14px;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

button:hover,
.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(59,130,246,.22);
}

.btn-secondary{
  background:var(--surface);
  color:var(--heading);
  border-color:var(--line);
  box-shadow:none;
}

.btn-secondary:hover{
  box-shadow:var(--shadow-soft);
}

.btn-ghost{
  background:var(--surface-2);
  color:var(--muted);
  border-color:var(--line);
  box-shadow:none;
}

.btn-ghost:hover{
  color:var(--heading);
  background:var(--surface);
  box-shadow:none;
}

.btn-danger{
  background:var(--danger);
  color:#fff;
  border-color:transparent;
}

.btn-small{
  min-height:36px;
  padding:8px 12px;
  border-radius:10px;
  font-size:13px;
}

.folder-pills .btn.is-active,
.btn.is-active{
  background:var(--primary-soft);
  color:var(--primary-strong);
  border-color:rgba(59,130,246,.20);
  box-shadow:none;
}

.action-row,
.toolbar,
.quick-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.toolbar{
  gap:6px;
  margin-bottom:12px;
}

.toolbar button{
  min-height:34px;
  padding:7px 11px;
  background:var(--surface);
  color:var(--muted);
  border-color:var(--line);
  box-shadow:none;
  font-size:13px;
}

.toolbar button:hover{
  color:var(--heading);
  box-shadow:none;
}

.help-text{
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

.section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

.section-title h3{
  margin:0;
  color:var(--heading);
  font-size:18px;
}

.cell-title{
  color:var(--heading);
  font-weight:700;
}

.cell-subtitle{
  color:var(--muted);
  font-size:12px;
}

.inline-error{
  margin-top:8px;
  color:var(--danger);
  font-size:12px;
  white-space:pre-wrap;
}

.table-wrap{
  overflow:auto;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--surface);
}

.data-table{
  width:100%;
  min-width:860px;
  border-collapse:separate;
  border-spacing:0;
}

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

.data-table th{
  position:sticky;
  top:0;
  z-index:1;
  background:var(--surface-2);
  color:var(--muted);
  font-size:11px;
  font-weight:500;
  letter-spacing:0;
  text-transform:none;
}

.data-table tr:last-child td{
  border-bottom:0;
}

.data-table tbody tr:hover td{
  background:rgba(59,130,246,.03);
}

.preview-box,
.code-box{
  border:1px solid var(--line);
  background:var(--surface-2);
  border-radius:16px;
  padding:16px;
  color:var(--text);
}

.preview-box{
  white-space:pre-wrap;
  word-break:break-word;
}

.code-box{
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-word;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

.empty-state{
  color:var(--muted);
  padding:10px 0 2px;
}

.divider{
  height:1px;
  margin:10px 0;
  background:linear-gradient(90deg, transparent, var(--line), transparent);
}

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

.searchbar input{
  max-width:360px;
}

.tab-bar{
  position:sticky;
  top:76px;
  z-index:20;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:16px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(255,255,255,.78);
  backdrop-filter:blur(16px);
}

html[data-theme="dark"] .tab-bar{
  background:rgba(17,24,39,.78);
}

.tab-btn{
  min-height:40px;
  padding:8px 14px;
  border-radius:12px;
  background:transparent;
  color:var(--muted);
  border:1px solid transparent;
  box-shadow:none;
}

.tab-btn:hover{
  color:var(--heading);
  background:var(--surface);
  border-color:var(--line);
  box-shadow:none;
}

.tab-btn.is-active{
  color:var(--primary-strong);
  background:var(--primary-soft);
  border-color:rgba(59,130,246,.18);
  box-shadow:none;
}

.tab-panel{display:none}
.tab-panel.is-active{display:block}

.details-card summary{
  list-style:none;
  cursor:pointer;
  color:var(--heading);
  font-size:18px;
  font-weight:560;
}

.details-card summary::-webkit-details-marker{
  display:none;
}

.details-card[open] summary{
  margin-bottom:14px;
}

.theme-toggle-btn{
  min-width:40px;
  width:40px;
  height:40px;
  padding:0;
  border-radius:12px;
  background:var(--surface);
  color:var(--heading);
  border:1px solid var(--line);
  box-shadow:none;
  font-size:18px;
}

.theme-toggle-btn:hover{
  background:var(--surface-2);
  box-shadow:none;
}

.server-toast{display:none}

#toast-root{
  position:fixed;
  top:84px;
  right:18px;
  z-index:90;
  display:flex;
  flex-direction:column;
  gap:10px;
  pointer-events:none;
}

.toast{
  min-width:280px;
  max-width:420px;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--text);
  box-shadow:var(--shadow-card);
  pointer-events:auto;
  animation:toastIn .22s ease;
}

.toast.success{border-left:4px solid var(--success)}
.toast.warn{border-left:4px solid var(--warning)}
.toast.error{border-left:4px solid var(--danger)}
.toast.danger{border-left:4px solid var(--danger)}
.toast.info{border-left:4px solid var(--primary)}

.toast-title{
  margin-bottom:4px;
  color:var(--heading);
  font-weight:560;
}

.toast-close{
  float:right;
  min-height:auto;
  padding:0;
  border:0;
  background:transparent;
  color:var(--muted);
  box-shadow:none;
  font-size:18px;
}

button.is-loading,
.btn.is-loading{
  opacity:.82;
  cursor:wait;
  pointer-events:none;
}

.action-spinner{
  display:inline-block;
  width:14px;
  height:14px;
  margin-right:8px;
  vertical-align:-2px;
  border:2px solid currentColor;
  border-right-color:transparent;
  border-radius:999px;
  animation:actionSpin .72s linear infinite;
}

.account-action-status{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:4px 10px;
  border-radius:999px;
  background:var(--primary-soft);
  color:var(--primary-strong);
  border:1px solid rgba(59,130,246,.18);
  font-size:12px;
  font-weight:700;
}

.account-action-status.is-error{
  background:var(--danger-soft);
  color:var(--danger);
  border-color:rgba(239,68,68,.18);
}

[data-tip]{
  position:relative;
}

[data-tip]:hover::after{
  content:attr(data-tip);
  position:absolute;
  left:50%;
  bottom:calc(100% + 10px);
  transform:translateX(-50%);
  min-width:180px;
  max-width:260px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--text);
  box-shadow:var(--shadow-card);
  font-size:12px;
  font-weight:600;
  line-height:1.4;
  white-space:normal;
  z-index:120;
}

[data-tip]:hover::before{
  content:"";
  position:absolute;
  left:50%;
  bottom:calc(100% + 4px);
  transform:translateX(-50%);
  border:6px solid transparent;
  border-top-color:var(--surface);
  z-index:121;
}

.folder-directory summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.folder-pills{
  gap:8px;
}

.folder-pills .btn{
  min-height:36px;
  padding:8px 12px;
  border-radius:10px;
}

.folder-create-form input[type="text"]{
  flex:1 1 240px;
}

.folder-manager-list{
  gap:12px;
}

.folder-manager-item{
  background:var(--surface);
}

.accounts-stats{
  margin-bottom:20px;
}

.utility-card-form input{
  flex:1 1 240px;
}

.utility-card-form select{
  flex:0 0 220px;
}

.utility-results .stats-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.accounts-workspace{
  padding:20px;
}

.accounts-filters-card{
  background:var(--surface);
}

.accounts-filters-toolbar{
  gap:10px;
}

.accounts-filters-toolbar input{
  flex:1 1 280px;
  max-width:none;
  min-width:220px;
}

.accounts-filters-toolbar select{
  flex:0 0 220px;
}

#selected-accounts-count,
#visible-accounts-count{
  background:var(--surface);
}

.accounts-bulk-details{
  margin-bottom:16px;
}

.accounts-bulk-details > summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.accounts-bulk-card{
  background:var(--surface);
}

.accounts-empty-card{
  background:var(--surface-2);
}

.account-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}

.account-card{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:18px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow:var(--shadow-soft);
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.account-card:hover{
  transform:translateY(-2px);
  border-color:var(--line-strong);
  box-shadow:var(--shadow-card);
}

.account-card:has(input[name="account_names"]:checked){
  border-color:rgba(59,130,246,.34);
  box-shadow:0 18px 40px rgba(59,130,246,.12);
}

.account-tile-head{
  display:flex;
  align-items:flex-start;
  gap:12px;
  min-width:0;
}

.account-tile-select{
  flex:0 0 auto;
  margin-top:2px;
}

.account-tile-identity{
  min-width:0;
  flex:1 1 auto;
}

.account-tile-identity .cell-title{
  font-size:17px;
  line-height:1.25;
}

.account-tile-identity .cell-subtitle{
  margin-top:2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.account-tile-folder{
  margin-top:8px;
}

.account-tile-badges{
  gap:6px;
}

.account-tile-notes{
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--surface-2);
}

.account-tile-notes strong{
  color:var(--heading);
}

.account-tile-meta{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.meta-chip{
  min-width:0;
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface-2);
}

.meta-chip .cell-title{
  margin-top:4px;
  margin-bottom:0;
  font-size:13px;
  line-height:1.4;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.account-tile-worker-note{
  margin-top:auto;
}

.account-tile-footer{
  margin-top:auto;
}

.account-tile-footer .btn{
  width:100%;
}

/* Prototype shell + accounts page */
body{
  background:#f6f7f9;
}

body::before,
.bg-scene{
  display:none;
}

html[data-theme="dark"] body{
  background:#151d2e;
}

.topbar{
  min-height:56px;
  border-bottom:1px solid #f3f4f6;
  background:#fff;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
  backdrop-filter:none;
}

html[data-theme="dark"] .topbar{
  border-bottom-color:#273449;
  background:#1b263a;
}

.topbar-inner{
  max-width:1280px;
  min-height:56px;
  padding:0 16px;
  gap:16px;
}

.brand{
  gap:10px;
  margin-right:8px;
}

.brand-mark{
  width:30px;
  height:30px;
  border-radius:8px;
  overflow:hidden;
  background:#2563eb;
  box-shadow:none;
  font-size:0;
}

.brand-mark svg{
  width:30px;
  height:30px;
  display:block;
}

.brand-title{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-size:16px;
  font-weight:520;
  letter-spacing:0;
}

.brand-copy{
  gap:0;
}

.topbar-nav-wrap{
  gap:14px;
}

.nav{
  gap:2px;
}

.nav-link{
  min-height:34px;
  padding:6px 12px;
  border-radius:8px;
  color:#6b7280;
  font-size:14px;
  font-weight:450;
}

.nav-link:hover{
  color:#1f2937;
  background:#f9fafb;
  border-color:transparent;
}

.nav-link.is-current{
  color:#111827;
  background:#f3f4f6;
  border-color:transparent;
  box-shadow:none;
}

html[data-theme="dark"] .nav-link{
  color:#9ca3af;
}

html[data-theme="dark"] .nav-link:hover{
  color:#e5e7eb;
  background:rgba(31,41,55,.72);
}

html[data-theme="dark"] .nav-link.is-current{
  color:#fff;
  background:#1f2937;
}

.nav-actions{
  gap:8px;
}

.theme-toggle-btn{
  width:36px;
  height:36px;
  min-width:36px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#6b7280;
}

.theme-toggle-btn:hover{
  background:#f3f4f6;
  color:#1f2937;
}

html[data-theme="dark"] .theme-toggle-btn:hover{
  background:#1f2937;
  color:#e5e7eb;
}

.page-shell{
  max-width:1280px;
  padding:24px 16px 44px;
}

button,
.btn{
  min-height:36px;
  padding:8px 12px;
  border-radius:8px;
  box-shadow:none;
  font-size:14px;
  font-weight:520;
}

button:hover,
.btn:hover{
  transform:none;
  box-shadow:none;
}

.btn{
  background:#3b82f6;
}

.btn:hover{
  background:#2563eb;
}

.btn-secondary{
  background:#fff;
  color:#4b5563;
  border-color:#e5e7eb;
}

.btn-secondary:hover{
  background:#f9fafb;
  color:#374151;
}

.btn-ghost{
  background:#f3f4f6;
  color:#4b5563;
  border-color:transparent;
}

.btn-ghost:hover{
  background:#e5e7eb;
  color:#374151;
}

.btn-danger{
  background:#ef4444;
  color:#fff;
  border-color:#ef4444;
}

.btn-danger:hover{
  background:#dc2626;
  color:#fff;
}

.btn-small{
  min-height:30px;
  padding:6px 10px;
  border-radius:8px;
  font-size:12px;
}

html[data-theme="dark"] .btn-secondary{
  background:var(--surface-2);
  color:#d8e2f0;
  border-color:var(--line);
}

html[data-theme="dark"] .btn-secondary:hover{
  background:var(--surface-3);
}

html[data-theme="dark"] .btn-ghost{
  background:var(--surface-2);
  color:#d8e2f0;
}

.pill{
  min-height:22px;
  padding:3px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:500;
}

.accounts-page{
  display:flex;
  flex-direction:column;
  gap:24px;
}

.accounts-page-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.accounts-title-block h1{
  margin:0;
  color:#111827;
  font-size:24px;
  line-height:1.5;
  font-weight:560;
}

.accounts-title-block p{
  margin:2px 0 0;
  color:#6b7280;
  font-size:14px;
  line-height:1.5;
}

html[data-theme="dark"] .accounts-title-block h1{
  color:#fff;
}

html[data-theme="dark"] .accounts-title-block p{
  color:#9ca3af;
}

.accounts-header-actions,
.accounts-check-form{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.accounts-header-btn{
  white-space:nowrap;
}

.accounts-header-btn--primary{
  color:#fff;
  background:#3b82f6;
  border-color:#3b82f6;
}

.accounts-status-shell,
.channel-check-status-box{
  padding:14px 16px;
  border-radius:12px;
  border-color:#e5e7eb;
  background:#fff;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}

.accounts-status-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.accounts-status-title{
  color:#111827;
  font-size:15px;
  font-weight:500;
}

.accounts-status-progress,
.accounts-status-detail{
  margin-top:6px;
  color:#6b7280;
  font-size:13px;
}

.accounts-result-groups{
  margin-top:14px;
  gap:12px;
}

.accounts-folder-shell,
.accounts-utility-card,
.accounts-filters-card,
.accounts-bulk-details{
  border:1px solid #f3f4f6;
  border-radius:12px;
  background:#fff;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}

html[data-theme="dark"] .accounts-folder-shell,
html[data-theme="dark"] .accounts-utility-card,
html[data-theme="dark"] .accounts-filters-card,
html[data-theme="dark"] .accounts-bulk-details,
html[data-theme="dark"] .accounts-status-shell,
html[data-theme="dark"] .channel-check-status-box{
  border-color:#1f2937;
  background:#111827;
}

.accounts-folder-tabs{
  display:flex;
  align-items:center;
  gap:6px;
  padding:12px;
  overflow-x:auto;
}

.folder-tab{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:38px;
  padding:8px 12px;
  border:1px solid transparent;
  border-radius:12px;
  color:#6b7280;
  font-size:14px;
  font-weight:500;
  transition:background .15s ease, color .15s ease, border-color .15s ease;
  white-space:nowrap;
}

.folder-tab:hover{
  color:#374151;
  background:#f9fafb;
}

.folder-tab.is-active{
  color:var(--folder-color, #475569);
  border-color:color-mix(in srgb, var(--folder-color, #e2e8f0) 28%, #e2e8f0);
  background:color-mix(in srgb, var(--folder-color, #f1f5f9) 8%, #f8fafc);
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}

.folder-tab--muted{
  --folder-color:#94a3b8;
}

.folder-tab-dot,
.folder-tab-icon{
  width:8px;
  height:8px;
  flex:0 0 auto;
  border-radius:999px;
  background:color-mix(in srgb, var(--folder-color, #64748b) 70%, transparent);
}

.folder-tab-icon{
  width:13px;
  height:13px;
  border-radius:4px;
  background:#64748b;
}

.folder-tab.is-active .folder-tab-dot{
  background:var(--folder-color, #64748b);
}

.folder-tab-count{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:20px;
  padding:2px 6px;
  border-radius:6px;
  background:#f3f4f6;
  color:#9ca3af;
  font-size:12px;
}

.folder-tab.is-active .folder-tab-count{
  background:rgba(255,255,255,.66);
  color:inherit;
}

.folder-tab-online{
  display:inline-flex;
  align-items:center;
  gap:3px;
  color:#10b981;
}

.folder-tab-online::before{
  content:"";
  width:4px;
  height:4px;
  border-radius:999px;
  background:#34d399;
}

.folder-manage-details{
  position:relative;
  flex:0 0 auto;
  margin-left:auto;
}

.folder-manage-summary{
  list-style:none;
  cursor:pointer;
  min-height:38px;
  padding:8px 12px;
  border-radius:10px;
  color:#9ca3af;
  font-size:14px;
  font-weight:500;
}

.folder-manage-summary::-webkit-details-marker{
  display:none;
}

.folder-manage-details[open] .folder-manage-summary,
.folder-manage-summary:hover{
  color:#4b5563;
  background:#f9fafb;
}

.folder-manage-panel{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:30;
  width:min(720px, calc(100vw - 32px));
  padding:16px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#fff;
  box-shadow:0 18px 45px rgba(15,23,42,.14);
}

html[data-theme="dark"] .folder-manage-panel{
  border-color:#374151;
  background:#111827;
}

.folder-panel-label{
  margin-bottom:8px;
  color:#9ca3af;
  font-size:12px;
  font-weight:500;
}

.folder-create-form,
.folder-edit-form{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.folder-create-form input[type="text"],
.folder-edit-form input[type="text"]{
  flex:1 1 180px;
}

.folder-create-form input[type="color"],
.folder-edit-form input[type="color"]{
  width:38px;
  min-width:38px;
  height:38px;
}

.folder-edit-list{
  margin-top:16px;
}

.folder-edit-row{
  padding:10px;
  border:1px solid #f3f4f6;
  border-radius:10px;
  background:#f9fafb;
}

.folder-edit-row + .folder-edit-row{
  margin-top:8px;
}

.folder-edit-dot{
  width:12px;
  height:12px;
  border-radius:999px;
  flex:0 0 auto;
}

.folder-edit-count{
  color:#9ca3af;
  font-size:12px;
}

.accounts-utility-grid{
  display:grid;
  gap:12px;
}

.accounts-utility-card{
  padding:18px;
}

.utility-card-head h3{
  margin:0;
  color:#374151;
  font-size:15px;
  font-weight:500;
}

.utility-card-head p{
  margin:2px 0 0;
  color:#9ca3af;
  font-size:13px;
}

.channel-check-form{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}

.channel-check-form input{
  flex:1 1 240px;
}

.channel-check-form select{
  flex:0 1 220px;
}

.utility-results{
  margin-top:14px;
}

.channel-result-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.channel-result-stat{
  padding:12px;
  border:1px solid #f3f4f6;
  border-radius:10px;
  background:#f9fafb;
}

.channel-result-stat span{
  display:block;
  color:#111827;
  font-size:22px;
  font-weight:500;
}

.channel-result-stat small{
  color:#9ca3af;
  font-size:12px;
}

.channel-result-groups{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}

.channel-result-item + .channel-result-item{
  margin-top:8px;
}

.accounts-folder-workbench{
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);
  gap:14px;
  align-items:start;
}

.accounts-folder-summary-card,
.accounts-folder-empty-hint{
  border:1px solid #e8edf5;
  border-radius:14px;
  background:#fff;
  box-shadow:0 11px 28px rgba(15,23,42,.055);
  padding:18px;
}

.accounts-folder-empty-hint{
  grid-column:1 / -1;
}

.accounts-folder-empty-hint h2,
.folder-summary-head h2{
  margin:2px 0 0;
  color:#111827;
  font-size:20px;
  line-height:1.2;
  font-weight:560;
}

.accounts-folder-empty-hint p{
  margin:6px 0 0;
  color:#8b95a1;
}

.folder-summary-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.folder-summary-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.folder-summary-metric{
  min-width:0;
  padding:12px;
  border:1px solid #edf0f5;
  border-radius:12px;
  background:#fbfcfd;
}

.folder-summary-metric--wide{
  grid-column:span 3;
}

.folder-summary-metric > span:first-child{
  display:block;
  margin-bottom:6px;
  color:#8b95a1;
  font-size:12px;
  font-weight:500;
}

.folder-summary-metric strong{
  display:block;
  min-width:0;
  color:#111827;
  font-size:18px;
  line-height:1.2;
  font-weight:560;
  word-break:break-word;
}

.folder-summary-metric small{
  display:block;
  margin-top:8px;
  color:#6b7280;
  font-size:12px;
  line-height:1.45;
  white-space:pre-wrap;
  word-break:break-word;
}

.folder-task-strip{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid #edf0f5;
}

.folder-task-line{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin-top:8px;
  padding:8px 10px;
  border:1px solid #edf0f5;
  border-radius:10px;
  background:#fbfcfd;
}

.folder-task-line span{
  color:#374151;
  font-size:13px;
  font-weight:560;
}

.folder-task-line small{
  color:#8b95a1;
  font-size:12px;
}

.accounts-folder-actions{
  margin:0;
}

.folder-actions-panel{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  padding:0 18px 18px;
  border-top:1px solid #f3f4f6;
}

.folder-action-card{
  padding:14px;
  border:1px solid #edf0f5;
  border-radius:12px;
  background:#fbfdff;
}

.folder-action-card .btn{
  margin-top:12px;
}

.folder-action-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.folder-action-grid--channel{
  grid-template-columns:minmax(220px,1fr) minmax(100px,.45fr) minmax(100px,.45fr) minmax(160px,.65fr);
}

.activity-log-layout{
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
  gap:16px;
  align-items:start;
}

.activity-log-filter-card{
  position:sticky;
  top:86px;
}

.activity-log-form{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.activity-log-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.activity-log-row{
  display:grid;
  grid-template-columns:minmax(160px,.35fr) minmax(0,1fr);
  gap:14px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
  box-shadow:var(--shadow-soft);
}

.activity-log-meta{
  display:flex;
  flex-direction:column;
  gap:5px;
  color:var(--muted);
  font-size:12px;
}

.activity-log-message{
  color:var(--heading);
  font-size:14px;
  line-height:1.45;
  font-weight:500;
  word-break:break-word;
}

.activity-log-detail{
  margin-top:6px;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
  white-space:pre-wrap;
  word-break:break-word;
}

.accounts-stats-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.accounts-stat-card{
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px;
  border:1px solid #f3f4f6;
  border-radius:12px;
  background:#fff;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}

html[data-theme="dark"] .accounts-stat-card{
  border-color:#1f2937;
  background:#111827;
}

.accounts-stat-icon{
  width:36px;
  height:36px;
  border-radius:10px;
  flex:0 0 auto;
}

.accounts-stat-card--blue .accounts-stat-icon{background:#eff6ff}
.accounts-stat-card--green .accounts-stat-icon{background:#ecfdf5}
.accounts-stat-card--violet .accounts-stat-icon{background:#f5f3ff}
.accounts-stat-card--amber .accounts-stat-icon{background:#fffbeb}

.accounts-stat-value{
  color:#111827;
  font-size:20px;
  line-height:1.2;
  font-weight:500;
}

.accounts-stat-label{
  color:#9ca3af;
  font-size:12px;
}

html[data-theme="dark"] .accounts-stat-value{
  color:#fff;
}

.accounts-working-form{
  margin:0;
}

.accounts-working-area{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.accounts-filters-card{
  padding:16px;
}

.accounts-filter-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.accounts-search-field{
  position:relative;
  flex:1 1 280px;
  min-width:220px;
}

.accounts-search-icon{
  position:absolute;
  left:12px;
  top:50%;
  width:14px;
  height:14px;
  transform:translateY(-50%);
  border:2px solid #9ca3af;
  border-radius:999px;
  pointer-events:none;
}

.accounts-search-icon::after{
  content:"";
  position:absolute;
  right:-5px;
  bottom:-4px;
  width:6px;
  height:2px;
  border-radius:2px;
  background:#9ca3af;
  transform:rotate(45deg);
}

.accounts-search-field input{
  padding-left:36px;
}

.accounts-filter-row select{
  flex:0 1 190px;
}

.accounts-filter-actions{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  margin-top:12px;
}

.filter-action-btn{
  min-height:30px;
  padding:6px 10px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#6b7280;
  font-size:12px;
  box-shadow:none;
}

.filter-action-btn:hover{
  background:#f3f4f6;
  color:#374151;
}

.filter-divider{
  width:1px;
  height:18px;
  background:#e5e7eb;
}

.accounts-count-pills{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
}

.accounts-bulk-details{
  overflow:hidden;
}

.accounts-bulk-details summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 18px;
  color:#374151;
  font-size:14px;
  font-weight:500;
}

.accounts-bulk-details summary::-webkit-details-marker{
  display:none;
}

.accounts-bulk-details summary:hover{
  background:#f9fafb;
}

.bulk-summary-badge{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:2px 8px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:12px;
}

.accounts-bulk-panel{
  padding:16px 18px 18px;
  border-top:1px solid #f3f4f6;
}

.accounts-bulk-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.accounts-bulk-grid textarea{
  min-height:42px;
}

.accounts-bulk-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}

.accounts-bulk-note{
  margin:10px 0 0;
  color:#9ca3af;
  font-size:12px;
  line-height:1.45;
}

.accounts-empty-state{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:220px;
  color:#9ca3af;
  text-align:center;
}

.accounts-empty-icon{
  width:56px;
  height:56px;
  margin-bottom:14px;
  border-radius:999px;
  background:#f3f4f6;
}

.accounts-empty-state p{
  margin:0;
  color:#4b5563;
}

.accounts-empty-state span{
  margin-top:4px;
  font-size:14px;
}

.account-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.account-card{
  gap:0;
  padding:0;
  border:1px solid #f3f4f6;
  border-radius:12px;
  background:#fff;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
  overflow:hidden;
  transition:border-color .15s ease, box-shadow .15s ease;
}

.account-card:hover{
  transform:none;
  border-color:#e5e7eb;
  box-shadow:0 6px 18px rgba(15,23,42,.08);
}

.account-card:has(input[name="account_names"]:checked){
  border-color:#60a5fa;
  box-shadow:0 10px 26px rgba(59,130,246,.12);
  outline:1px solid rgba(147,197,253,.75);
}

.account-card-head{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:16px 16px 12px;
  min-width:0;
}

.account-card-checkbox{
  flex:0 0 auto;
  margin-top:4px;
}

.account-card-avatar{
  width:40px;
  height:40px;
  flex:0 0 auto;
  border-radius:999px;
  object-fit:cover;
  display:grid;
  place-items:center;
  background:#dbeafe;
  color:#1d4ed8;
  font-size:14px;
  font-weight:500;
  border:0;
  box-shadow:none;
}

.account-card-identity{
  min-width:0;
  flex:1 1 auto;
}

.account-card-name-row{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex-wrap:wrap;
}

.account-card-name{
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  color:#374151;
  font-size:14px;
  font-weight:500;
  white-space:nowrap;
}

.account-card-username{
  margin-top:1px;
  overflow:hidden;
  color:#9ca3af;
  font-size:12px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.account-online-badge{
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-height:20px;
  padding:2px 6px;
  border-radius:999px;
  background:#f3f4f6;
  color:#6b7280;
  font-size:12px;
  white-space:nowrap;
}

.account-online-badge span{
  width:6px;
  height:6px;
  border-radius:999px;
  background:#9ca3af;
}

.account-online-badge.is-online{
  background:#ecfdf5;
  color:#047857;
}

.account-online-badge.is-online span{
  background:#10b981;
}

.account-card-status-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding:0 16px 12px;
}

.account-folder-chip,
.account-autopost-chip{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:22px;
  padding:3px 8px;
  border-radius:999px;
  color:var(--folder-color, #64748b);
  border:1px solid color-mix(in srgb, var(--folder-color, #cbd5e1) 25%, transparent);
  background:color-mix(in srgb, var(--folder-color, #f8fafc) 8%, #fff);
  font-size:12px;
}

.account-folder-chip span{
  width:6px;
  height:6px;
  border-radius:999px;
  background:currentColor;
}

.account-folder-chip--empty{
  color:#9ca3af;
  border-color:#e5e7eb;
  background:#f9fafb;
}

.account-autopost-chip{
  color:#2563eb;
  border-color:transparent;
  background:#eff6ff;
}

.account-autopost-chip--paused{
  color:#d97706;
  background:#fffbeb;
}

.account-card-divider{
  height:1px;
  margin:0 16px;
  background:#f3f4f6;
}

.account-card-meta{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  padding:12px 16px;
}

.account-meta-chip{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}

.account-meta-icon{
  flex:0 0 auto;
  width:12px;
  height:12px;
  border-radius:4px;
  background:#d1d5db;
}

.account-meta-label{
  flex:0 0 auto;
  color:#9ca3af;
  font-size:12px;
}

.account-meta-value{
  min-width:0;
  overflow:hidden;
  color:#374151;
  font-size:12px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.account-card-note{
  padding:0 16px 12px;
}

.account-card-note span{
  display:-webkit-box;
  overflow:hidden;
  padding:10px 12px;
  border-radius:8px;
  background:#f9fafb;
  color:#6b7280;
  font-size:12px;
  line-height:1.45;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}

.account-card-footer{
  margin-top:auto;
  padding:0 16px 16px;
}

.account-open-btn{
  width:100%;
  color:#4b5563;
  background:#f9fafb;
  border-color:#f3f4f6;
}

.account-open-btn:hover{
  color:#1d4ed8;
  background:#eff6ff;
  border-color:#bfdbfe;
}

.accounts-more-details{
  position:relative;
  flex:0 0 auto;
}

.accounts-more-details summary{
  list-style:none;
  cursor:pointer;
}

.accounts-more-details summary::-webkit-details-marker{
  display:none;
}

.accounts-more-menu{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:70;
  width:240px;
  padding:8px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#fff;
  box-shadow:0 18px 45px rgba(15,23,42,.14);
}

.accounts-more-item{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:10px 12px;
  border-radius:9px;
  color:#374151;
  font-size:13px;
}

.accounts-more-item:hover{
  background:#f9fafb;
}

.accounts-more-item span{
  font-weight:500;
}

.accounts-more-item small{
  color:#9ca3af;
  font-size:11px;
}

.accounts-section-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  padding:22px 22px 6px;
}

.accounts-section-kicker,
.disclosure-kicker{
  display:block;
  margin-bottom:2px;
  color:#3b82f6;
  font-size:11px;
  font-weight:500;
  letter-spacing:0;
  text-transform:none;
}

.accounts-section-heading h2{
  margin:0;
  color:#111827;
  font-size:20px;
  line-height:1.25;
  font-weight:560;
}

.accounts-section-heading p{
  max-width:410px;
  margin:0;
  color:#6b7280;
  font-size:13px;
  text-align:right;
}

.accounts-folder-shell--featured{
  border-color:#dbeafe;
  background:
    radial-gradient(circle at 8% 0%, rgba(59,130,246,.10), transparent 34%),
    linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  box-shadow:0 14px 34px rgba(37,99,235,.08);
}

.accounts-folder-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:22px;
  align-items:stretch;
  padding:16px 18px 20px;
}

.accounts-folder-strip{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  overflow-x:auto;
  padding:4px 2px 8px;
  scrollbar-width:thin;
}

.accounts-folder-strip::-webkit-scrollbar{
  height:8px;
}

.accounts-folder-strip::-webkit-scrollbar-thumb{
  border-radius:999px;
  background:#dbeafe;
}

.accounts-folder-controls{
  display:flex;
  align-items:flex-start;
  gap:10px;
  position:relative;
  z-index:5;
  padding-left:18px;
  border-left:1px solid #dbeafe;
}

.folder-add-details,
.folder-manage-details{
  position:relative;
  flex:0 0 auto;
}

.accounts-folder-controls .folder-manage-details{
  margin-left:0;
}

.folder-add-details summary,
.folder-manage-summary{
  list-style:none;
  cursor:pointer;
}

.folder-add-details summary::-webkit-details-marker,
.folder-manage-summary::-webkit-details-marker{
  display:none;
}

.folder-add-summary{
  min-height:48px;
  padding:11px 18px;
  white-space:nowrap;
  background:#2563eb;
  border-color:#2563eb;
  color:#fff;
  box-shadow:0 10px 22px rgba(37,99,235,.18);
}

.folder-add-summary:hover{
  background:#1d4ed8;
}

.folder-add-panel{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  z-index:40;
  width:min(420px, calc(100vw - 32px));
  padding:16px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#fff;
  box-shadow:0 18px 45px rgba(15,23,42,.14);
}

.folder-manage-summary{
  display:inline-flex;
  align-items:center;
  min-height:48px;
  padding:11px 14px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fff;
  color:#6b7280;
  font-size:14px;
  font-weight:500;
  white-space:nowrap;
}

.folder-manage-details[open] .folder-manage-summary,
.folder-manage-summary:hover{
  color:#374151;
  background:#f9fafb;
}

.folder-empty-panel{
  color:#6b7280;
  font-size:13px;
}

.folder-manage-panel .folder-edit-list{
  margin-top:0;
}

.folder-tab{
  min-height:54px;
  padding:12px 16px;
  border-radius:16px;
  background:rgba(255,255,255,.72);
  border-color:rgba(226,232,240,.9);
  box-shadow:0 1px 2px rgba(15,23,42,.04);
  font-weight:500;
}

.folder-tab:hover{
  background:#fff;
  border-color:#dbeafe;
}

.folder-tab.is-active{
  background:linear-gradient(180deg, color-mix(in srgb, var(--folder-color, #3b82f6) 12%, #fff), #fff);
  border-color:color-mix(in srgb, var(--folder-color, #3b82f6) 34%, #dbeafe);
  box-shadow:0 10px 24px rgba(37,99,235,.10);
}

.folder-tab-icon{
  width:18px;
  height:14px;
  border-radius:4px 4px 3px 3px;
  background:var(--folder-color, #3b82f6);
  position:relative;
}

.folder-tab-icon::before{
  content:"";
  position:absolute;
  top:-4px;
  left:1px;
  width:9px;
  height:5px;
  border-radius:4px 4px 0 0;
  background:inherit;
}

.folder-tab-dot{
  width:10px;
  height:10px;
}

.folder-tab-label{
  max-width:180px;
  overflow:hidden;
  text-overflow:ellipsis;
}

.folder-tab-count{
  min-height:24px;
  padding:3px 8px;
  border-radius:8px;
  background:#f8fafc;
}

.accounts-stat-card{
  min-height:98px;
  padding:18px 19px;
  border-color:#e8edf5;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.86)),
    radial-gradient(circle at 100% 0%, rgba(59,130,246,.14), transparent 42%);
  box-shadow:0 12px 30px rgba(15,23,42,.055);
}

.accounts-stat-icon{
  position:relative;
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  border-radius:14px;
  overflow:hidden;
}

.accounts-stat-icon::before,
.accounts-stat-icon::after{
  content:"";
  position:absolute;
  display:block;
}

.accounts-stat-icon--accounts::before{
  width:22px;
  height:22px;
  border-radius:999px;
  background:#3b82f6;
  box-shadow:13px 4px 0 -4px rgba(59,130,246,.65), -13px 4px 0 -4px rgba(59,130,246,.65);
}

.accounts-stat-icon--accounts::after{
  bottom:9px;
  width:30px;
  height:11px;
  border-radius:999px 999px 8px 8px;
  background:rgba(59,130,246,.28);
}

.accounts-stat-icon--online::before{
  width:22px;
  height:22px;
  border-radius:999px;
  background:#10b981;
  box-shadow:0 0 0 8px rgba(16,185,129,.16);
}

.accounts-stat-icon--online::after{
  width:8px;
  height:8px;
  border-radius:999px;
  background:#fff;
}

.accounts-stat-icon--channels::before{
  width:28px;
  height:22px;
  border-radius:8px;
  background:#8b5cf6;
}

.accounts-stat-icon--channels::after{
  right:9px;
  bottom:10px;
  width:10px;
  height:10px;
  border-radius:3px;
  background:#c4b5fd;
}

.accounts-stat-icon--posting::before{
  width:27px;
  height:27px;
  border-radius:10px;
  background:#f59e0b;
  clip-path:polygon(10% 8%, 92% 50%, 10% 92%, 24% 55%, 24% 45%);
}

.accounts-stat-icon--posting::after{
  width:14px;
  height:2px;
  border-radius:999px;
  background:rgba(255,255,255,.78);
  transform:translateX(-2px);
}

.accounts-stat-value{
  font-size:24px;
  font-weight:560;
}

.accounts-stat-label{
  margin-top:2px;
  color:#6b7280;
  font-size:13px;
}

.accounts-disclosure-details,
.accounts-bulk-details{
  overflow:hidden;
  border:1px solid #e8edf5;
  border-radius:14px;
  background:#fff;
  box-shadow:0 11px 28px rgba(15,23,42,.055);
}

.accounts-disclosure-details summary,
.accounts-bulk-details summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px 18px;
  color:#374151;
  background:linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}

.accounts-disclosure-details summary::-webkit-details-marker,
.accounts-bulk-details summary::-webkit-details-marker{
  display:none;
}

.accounts-disclosure-details summary:hover,
.accounts-bulk-details summary:hover{
  background:#f8fbff;
}

.disclosure-title-wrap{
  display:flex;
  flex-direction:column;
  min-width:0;
}

.disclosure-title{
  color:#111827;
  font-size:15px;
  font-weight:500;
}

.accounts-filter-row select,
.accounts-search-field input,
.channel-check-form input,
.channel-check-form select,
.accounts-bulk-grid input,
.accounts-bulk-grid select,
.accounts-bulk-grid textarea{
  font-size:14px;
  font-weight:400;
}

.utility-card-head h3,
.bulk-summary-badge,
.filter-action-btn{
  font-weight:500;
}

.disclosure-meta{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.disclosure-chevron{
  width:30px;
  height:30px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fff;
  position:relative;
  flex:0 0 auto;
}

.disclosure-chevron::before{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:8px;
  height:8px;
  border-right:2px solid #6b7280;
  border-bottom:2px solid #6b7280;
  transform:translate(-50%, -60%) rotate(45deg);
  transition:transform .16s ease;
}

.accounts-disclosure-details[open] .disclosure-chevron::before,
.accounts-bulk-details[open] .disclosure-chevron::before{
  transform:translate(-50%, -38%) rotate(225deg);
}

.accounts-checks-panel{
  display:grid;
  grid-template-columns:1fr 1.35fr;
  gap:12px;
  padding:0 18px 18px;
  border-top:1px solid #f3f4f6;
}

.accounts-check-card{
  padding:16px;
  border:1px solid #f3f4f6;
  border-radius:12px;
  background:#fbfdff;
}

.accounts-check-card .accounts-check-form{
  margin-top:12px;
}

.accounts-check-card .accounts-status-shell,
.accounts-check-card .channel-check-status-box{
  margin-top:12px;
  box-shadow:none;
}

.accounts-bulk-panel{
  border-top-color:#f3f4f6;
}

.bulk-summary-badge{
  min-height:26px;
  padding:3px 10px;
  border-radius:8px;
}

.accounts-header-actions [data-tip]:hover::after,
.topbar [data-tip]:hover::after{
  top:calc(100% + 10px);
  right:0;
  bottom:auto;
  left:auto;
  transform:none;
  z-index:220;
}

.accounts-header-actions [data-tip]:hover::before,
.topbar [data-tip]:hover::before{
  top:calc(100% + 4px);
  right:16px;
  bottom:auto;
  left:auto;
  transform:none;
  border-top-color:transparent;
  border-bottom-color:var(--surface);
  z-index:221;
}

html[data-theme="dark"] .accounts-more-menu,
html[data-theme="dark"] .folder-add-panel,
html[data-theme="dark"] .folder-manage-panel{
  border-color:#31415c;
  background:#1a2234;
  box-shadow:0 22px 48px rgba(7,12,22,.34);
}

html[data-theme="dark"] .accounts-more-item{
  color:#e5e7eb;
}

html[data-theme="dark"] .accounts-more-item:hover{
  background:#273449;
}

html[data-theme="dark"] .accounts-more-item small{
  color:#94a3b8;
}

html[data-theme="dark"] .accounts-folder-shell--featured{
  border-color:#31415c;
  background:
    radial-gradient(circle at 8% 0%, rgba(96,165,250,.14), transparent 34%),
    linear-gradient(180deg, #1a2437 0%, #172033 100%);
  box-shadow:0 18px 42px rgba(7,12,22,.26);
}

html[data-theme="dark"] .accounts-section-heading h2,
html[data-theme="dark"] .disclosure-title,
html[data-theme="dark"] .folder-summary-head h2,
html[data-theme="dark"] .accounts-folder-empty-hint h2,
html[data-theme="dark"] .folder-summary-metric strong,
html[data-theme="dark"] .folder-task-line span{
  color:#f8fafc;
}

html[data-theme="dark"] .accounts-section-heading p,
html[data-theme="dark"] .folder-empty-panel,
html[data-theme="dark"] .accounts-folder-empty-hint p,
html[data-theme="dark"] .folder-summary-metric > span:first-child,
html[data-theme="dark"] .folder-summary-metric small,
html[data-theme="dark"] .folder-task-line small{
  color:#94a3b8;
}

html[data-theme="dark"] .folder-tab{
  color:#cbd5e1;
  border-color:#31415c;
  background:rgba(32,43,63,.74);
}

html[data-theme="dark"] .folder-tab:hover{
  background:#273449;
  border-color:#43536b;
}

html[data-theme="dark"] .folder-tab.is-active{
  background:linear-gradient(180deg, color-mix(in srgb, var(--folder-color, #60a5fa) 18%, #202b3f), #1a2234);
  border-color:color-mix(in srgb, var(--folder-color, #60a5fa) 44%, #43536b);
  box-shadow:0 14px 30px rgba(7,12,22,.24);
}

html[data-theme="dark"] .folder-tab-count{
  background:#273449;
  color:#94a3b8;
}

html[data-theme="dark"] .folder-tab.is-active .folder-tab-count{
  background:rgba(15,23,42,.72);
}

html[data-theme="dark"] .folder-manage-summary{
  border-color:#43536b;
  background:#1a2234;
  color:#cbd5e1;
}

html[data-theme="dark"] .folder-manage-details[open] .folder-manage-summary,
html[data-theme="dark"] .folder-manage-summary:hover{
  background:#273449;
  color:#f8fafc;
}

html[data-theme="dark"] .accounts-folder-controls{
  border-left-color:#31415c;
}

html[data-theme="dark"] .folder-edit-row,
html[data-theme="dark"] .channel-result-stat,
html[data-theme="dark"] .accounts-check-card,
html[data-theme="dark"] .folder-summary-metric,
html[data-theme="dark"] .folder-task-line,
html[data-theme="dark"] .folder-action-card{
  border-color:#31415c;
  background:#202b3f;
}

html[data-theme="dark"] .accounts-disclosure-details,
html[data-theme="dark"] .accounts-bulk-details,
html[data-theme="dark"] .accounts-stat-card,
html[data-theme="dark"] .account-card,
html[data-theme="dark"] .accounts-filters-card,
html[data-theme="dark"] .accounts-folder-summary-card,
html[data-theme="dark"] .accounts-folder-empty-hint,
html[data-theme="dark"] .accounts-status-shell,
html[data-theme="dark"] .channel-check-status-box{
  border-color:#31415c;
  background:#1a2234;
  box-shadow:0 16px 36px rgba(7,12,22,.26);
}

html[data-theme="dark"] .accounts-stat-card{
  background:
    linear-gradient(180deg, rgba(32,43,63,.96), rgba(26,34,52,.92)),
    radial-gradient(circle at 100% 0%, rgba(96,165,250,.16), transparent 42%);
}

html[data-theme="dark"] .accounts-stat-card--blue .accounts-stat-icon{background:rgba(59,130,246,.16)}
html[data-theme="dark"] .accounts-stat-card--green .accounts-stat-icon{background:rgba(16,185,129,.16)}
html[data-theme="dark"] .accounts-stat-card--violet .accounts-stat-icon{background:rgba(139,92,246,.16)}
html[data-theme="dark"] .accounts-stat-card--amber .accounts-stat-icon{background:rgba(245,158,11,.16)}

html[data-theme="dark"] .accounts-disclosure-details summary,
html[data-theme="dark"] .accounts-bulk-details summary{
  color:#cbd5e1;
  background:linear-gradient(180deg, #1a2234 0%, #202b3f 100%);
}

html[data-theme="dark"] .accounts-disclosure-details summary:hover,
html[data-theme="dark"] .accounts-bulk-details summary:hover{
  background:#273449;
}

html[data-theme="dark"] .accounts-checks-panel,
html[data-theme="dark"] .accounts-bulk-panel,
html[data-theme="dark"] .folder-actions-panel,
html[data-theme="dark"] .folder-task-strip{
  border-top-color:#31415c;
}

html[data-theme="dark"] .disclosure-chevron{
  border-color:#43536b;
  background:#202b3f;
}

html[data-theme="dark"] .disclosure-chevron::before{
  border-color:#cbd5e1;
  border-left-color:transparent;
  border-top-color:transparent;
}

html[data-theme="dark"] .accounts-stat-label,
html[data-theme="dark"] .account-card-username,
html[data-theme="dark"] .account-meta-label,
html[data-theme="dark"] .accounts-status-progress,
html[data-theme="dark"] .accounts-status-detail,
html[data-theme="dark"] .utility-card-head p,
html[data-theme="dark"] .accounts-bulk-note{
  color:#94a3b8;
}

html[data-theme="dark"] .utility-card-head h3,
html[data-theme="dark"] .accounts-status-title,
html[data-theme="dark"] .channel-result-stat span,
html[data-theme="dark"] .account-card-name,
html[data-theme="dark"] .account-meta-value,
html[data-theme="dark"] .accounts-empty-state p{
  color:#f8fafc;
}

html[data-theme="dark"] .filter-action-btn{
  color:#94a3b8;
}

html[data-theme="dark"] .filter-action-btn:hover{
  background:#2d3a52;
  color:#f8fafc;
}

html[data-theme="dark"] .filter-divider,
html[data-theme="dark"] .account-card-divider{
  background:#31415c;
}

html[data-theme="dark"] .accounts-search-icon{
  border-color:#64748b;
}

html[data-theme="dark"] .accounts-search-icon::after{
  background:#64748b;
}

html[data-theme="dark"] .bulk-summary-badge{
  background:rgba(59,130,246,.16);
  color:#bfdbfe;
}

html[data-theme="dark"] .account-online-badge{
  background:#2d3a52;
  color:#cbd5e1;
}

html[data-theme="dark"] .account-online-badge.is-online{
  background:rgba(16,185,129,.16);
  color:#34d399;
}

html[data-theme="dark"] .account-folder-chip{
  background:color-mix(in srgb, var(--folder-color, #60a5fa) 12%, #0f172a);
  border-color:color-mix(in srgb, var(--folder-color, #60a5fa) 34%, #1e293b);
}

html[data-theme="dark"] .account-folder-chip--empty,
html[data-theme="dark"] .account-card-note span,
html[data-theme="dark"] .accounts-empty-icon{
  background:#253148;
  border-color:#31415c;
  color:#94a3b8;
}

html[data-theme="dark"] .account-autopost-chip{
  background:rgba(59,130,246,.16);
  color:#93c5fd;
}

html[data-theme="dark"] .account-autopost-chip--paused{
  background:rgba(245,158,11,.16);
  color:#fbbf24;
}

html[data-theme="dark"] .account-open-btn{
  background:#253148;
  border-color:#31415c;
  color:#cbd5e1;
}

html[data-theme="dark"] .account-open-btn:hover{
  background:rgba(59,130,246,.16);
  border-color:rgba(96,165,250,.35);
  color:#bfdbfe;
}

.templates-page,
.add-account-page{
  display:flex;
  flex-direction:column;
  gap:24px;
}

.templates-page-header,
.add-account-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.templates-title-block h1,
.add-account-header h1{
  margin:0;
  color:#111827;
  font-size:24px;
  line-height:1.35;
  font-weight:560;
}

.templates-title-block p,
.add-account-header p{
  margin:3px 0 0;
  color:#6b7280;
  font-size:14px;
  line-height:1.5;
}

.templates-header-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.templates-primary-action{
  background:#2563eb;
  border-color:#2563eb;
  color:#fff;
}

.templates-stats-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.template-stat-card{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:96px;
  padding:18px;
  border:1px solid #e8edf5;
  border-radius:14px;
  background:#fff;
  box-shadow:0 12px 30px rgba(15,23,42,.055);
}

.template-stat-card strong{
  display:block;
  color:#111827;
  font-size:24px;
  line-height:1.15;
  font-weight:560;
}

.template-stat-card span:last-child{
  color:#6b7280;
  font-size:13px;
}

.template-stat-icon{
  position:relative;
  width:46px;
  height:46px;
  flex:0 0 auto;
  border-radius:14px;
  background:#eff6ff;
}

.template-stat-card--green .template-stat-icon{background:#ecfdf5}
.template-stat-card--violet .template-stat-icon{background:#f5f3ff}
.template-stat-card--amber .template-stat-icon{background:#fffbeb}

.template-stat-icon::before,
.template-stat-icon::after{
  content:"";
  position:absolute;
  display:block;
}

.template-stat-icon--library::before{
  left:13px;
  top:10px;
  width:20px;
  height:26px;
  border-radius:5px;
  background:#3b82f6;
}

.template-stat-icon--library::after{
  left:17px;
  top:16px;
  width:12px;
  height:2px;
  border-radius:999px;
  background:#bfdbfe;
  box-shadow:0 6px 0 #bfdbfe, 0 12px 0 #bfdbfe;
}

.template-stat-icon--active::before{
  left:11px;
  top:11px;
  width:24px;
  height:24px;
  border-radius:999px;
  background:#10b981;
}

.template-stat-icon--active::after{
  left:18px;
  top:20px;
  width:11px;
  height:6px;
  border-left:2px solid #fff;
  border-bottom:2px solid #fff;
  transform:rotate(-45deg);
}

.template-stat-icon--usage::before{
  left:10px;
  top:12px;
  width:26px;
  height:18px;
  border-radius:9px;
  background:#8b5cf6;
  box-shadow:0 7px 0 -2px rgba(139,92,246,.42);
}

.template-stat-icon--history::before{
  left:12px;
  top:12px;
  width:22px;
  height:22px;
  border-radius:999px;
  border:4px solid #f59e0b;
  border-left-color:rgba(245,158,11,.28);
}

.template-create-card,
.templates-library-section,
.templates-assignment-section,
.add-account-card,
.add-requests-section{
  border:1px solid #e8edf5;
  border-radius:16px;
  background:#fff;
  box-shadow:0 12px 30px rgba(15,23,42,.055);
}

.template-create-card{
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
  gap:18px;
  padding:20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(59,130,246,.09), transparent 34%),
    #fff;
}

.template-create-copy h2,
.templates-section-head h2{
  margin:0;
  color:#111827;
  font-size:20px;
  line-height:1.3;
  font-weight:560;
}

.template-create-copy p,
.templates-section-head p{
  margin:4px 0 0;
  color:#6b7280;
  font-size:13px;
  line-height:1.5;
}

.template-create-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:16px;
}

.template-create-form label,
.add-phone-form label,
.add-request-form label{
  color:#6b7280;
  font-weight:520;
}

.template-form-main{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.template-form-main textarea{
  min-height:220px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:13px;
  line-height:1.55;
}

.template-preview-aside{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.template-preview-label{
  color:#9ca3af;
  font-size:12px;
}

.template-format-card{
  padding:16px;
  border:1px solid #dbeafe;
  border-radius:14px;
  background:#eff6ff;
}

.template-format-card strong{
  display:block;
  color:#1d4ed8;
  font-size:14px;
  font-weight:560;
}

.template-format-card span{
  display:block;
  margin-top:8px;
  color:#64748b;
  font-size:13px;
  line-height:1.55;
}

.template-telegram-create{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:12px;
  border:1px solid #dbeafe;
  border-radius:12px;
  background:#f8fbff;
}

.template-telegram-copy strong{
  display:block;
  color:#1d4ed8;
  font-size:14px;
  font-weight:560;
}

.template-telegram-copy span{
  display:block;
  margin-top:5px;
  color:#64748b;
  font-size:12px;
  line-height:1.45;
}

.template-telegram-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:end;
}

.template-telegram-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}

.template-telegram-actions .btn{
  width:100%;
  min-width:0;
  white-space:normal;
  text-align:center;
}

.template-telegram-row--single{
  grid-template-columns:1fr;
}

.template-telegram-row--single .btn{
  justify-self:start;
}

.template-live-preview{
  min-height:118px;
  max-height:260px;
  overflow:auto;
  padding:13px;
  border:1px solid #edf1f7;
  border-radius:12px;
  background:#fff;
  color:#374151;
  font-size:13px;
  line-height:1.55;
  white-space:pre-wrap;
}

.template-live-preview.is-empty{
  color:#9ca3af;
}

.template-telegram-create label{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
  color:#6b7280;
  font-size:12px;
}

.template-telegram-create select{
  min-height:34px;
  padding:7px 10px;
  border-radius:8px;
  font-size:13px;
  font-weight:400;
}

.template-telegram-row .btn{
  min-height:34px;
  white-space:nowrap;
}

.templates-library-section,
.templates-assignment-section,
.add-requests-section{
  padding:20px;
}

.templates-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}

.templates-search-field{
  position:relative;
  width:min(320px, 100%);
}

.templates-search-field input{
  padding-left:36px;
}

.templates-section-head--library{
  align-items:flex-start;
}

.templates-library-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  min-width:0;
}

.template-filter-tabs{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#f8fafc;
}

.template-filter-tab{
  min-height:30px;
  padding:6px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#6b7280;
  font:inherit;
  font-size:12px;
  font-weight:520;
  cursor:pointer;
}

.template-filter-tab:hover,
.template-filter-tab.is-active{
  background:#fff;
  color:#1d4ed8;
  box-shadow:0 1px 3px rgba(15,23,42,.08);
}

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

.template-library-card{
  display:flex;
  flex-direction:column;
  gap:12px;
  min-width:0;
  padding:16px;
  border:1px solid #edf1f7;
  border-radius:14px;
  background:#fbfdff;
}

.template-card-head{
  display:flex;
  align-items:flex-start;
  gap:12px;
}

.template-card-icon{
  width:38px;
  height:38px;
  flex:0 0 auto;
  border-radius:12px;
  background:#eff6ff;
  position:relative;
}

.template-card-icon::before{
  content:"";
  position:absolute;
  left:11px;
  top:8px;
  width:16px;
  height:22px;
  border-radius:4px;
  background:#3b82f6;
}

.template-card-title-block{
  min-width:0;
  flex:1 1 auto;
}

.template-card-title-block h3{
  margin:0;
  overflow:hidden;
  color:#111827;
  font-size:15px;
  font-weight:560;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.template-card-meta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:2px;
  color:#9ca3af;
  font-size:12px;
}

.template-usage-pill{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 8px;
  border-radius:999px;
  background:#eff6ff;
  color:#2563eb;
  font-size:12px;
  white-space:nowrap;
}

.template-usage-row{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.template-usage-pill--folder{
  background:#f5f3ff;
  color:#6d28d9;
}

.template-usage-pill--neutral{
  background:#f3f4f6;
  color:#6b7280;
}

.template-usage-detail{
  display:flex;
  flex-direction:column;
  gap:3px;
  color:#6b7280;
  font-size:12px;
  line-height:1.45;
}

.template-card-preview{
  display:-webkit-box;
  min-height:104px;
  overflow:hidden;
  padding:13px;
  border:1px solid #edf1f7;
  border-radius:12px;
  background:#fff;
  color:#4b5563;
  font-size:13px;
  line-height:1.55;
  white-space:pre-wrap;
  -webkit-line-clamp:5;
  -webkit-box-orient:vertical;
}

.template-source-details summary{
  list-style:none;
  cursor:pointer;
  color:#6b7280;
  font-size:12px;
}

.template-source-details summary::-webkit-details-marker{
  display:none;
}

.template-source-details pre{
  margin:8px 0 0;
  max-height:260px;
  overflow:auto;
  padding:12px;
  border-radius:10px;
  background:#111827;
  color:#a7f3d0;
  font-size:12px;
  line-height:1.55;
  white-space:pre-wrap;
}

.template-edit-details{
  min-width:0;
}

.template-edit-details summary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:7px 11px;
  border:1px solid #d8e1ee;
  border-radius:8px;
  background:#fff;
  color:#374151;
  font-size:13px;
  font-weight:520;
  line-height:1.2;
  list-style:none;
  cursor:pointer;
}

.template-edit-details summary::-webkit-details-marker{
  display:none;
}

.template-edit-details summary:hover{
  border-color:#bfdbfe;
  background:#eff6ff;
  color:#1d4ed8;
}

.template-edit-details[open]{
  padding:12px;
  border:1px solid #dbeafe;
  border-radius:12px;
  background:#f8fbff;
}

.template-edit-details[open] summary{
  margin-bottom:12px;
}

.template-edit-form{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.template-edit-form label{
  display:flex;
  flex-direction:column;
  gap:6px;
  color:#6b7280;
  font-size:12px;
  font-weight:520;
}

.template-edit-form textarea{
  min-height:150px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:13px;
  line-height:1.55;
}

.template-edit-form p{
  margin:0;
  color:#9ca3af;
  font-size:12px;
  line-height:1.45;
}

.template-edit-actions{
  display:flex;
  justify-content:flex-end;
}

.template-card-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:auto;
  padding-top:4px;
}

.template-card-hint{
  color:#9ca3af;
  font-size:12px;
  line-height:1.4;
}

.template-recent-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.template-recent-row{
  display:grid;
  grid-template-columns:70px 160px minmax(0,1fr) auto 150px;
  gap:12px;
  align-items:center;
  min-height:48px;
  padding:10px 12px;
  border:1px solid #edf1f7;
  border-radius:12px;
  background:#fbfdff;
  color:#4b5563;
  font-size:13px;
}

.template-recent-row:hover{
  background:#f8fbff;
  border-color:#dbeafe;
}

.template-recent-id,
.template-recent-date{
  color:#9ca3af;
  font-size:12px;
}

.template-recent-account{
  color:#2563eb;
  font-weight:520;
}

.template-recent-title{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.templates-empty-state{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:220px;
  color:#9ca3af;
  text-align:center;
}

.templates-empty-state--compact{
  min-height:120px;
}

.templates-empty-state p{
  margin:0;
  color:#4b5563;
}

.templates-empty-state span{
  margin-top:4px;
  font-size:13px;
}

.add-account-page{
  max-width:980px;
  margin:0 auto;
}

.add-account-back{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:6px 10px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fff;
  color:#6b7280;
  font-size:13px;
}

.add-account-back:hover{
  background:#f9fafb;
  color:#374151;
}

.add-stepper{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
}

.add-step{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  padding:10px 12px;
  border:1px solid #e8edf5;
  border-radius:14px;
  background:#fff;
  color:#9ca3af;
  box-shadow:0 8px 20px rgba(15,23,42,.045);
}

.add-step.is-active{
  border-color:#bfdbfe;
  background:#eff6ff;
  color:#1d4ed8;
}

.add-step.is-done{
  border-color:#bbf7d0;
  background:#ecfdf5;
  color:#047857;
}

.add-step strong{
  display:block;
  color:inherit;
  font-size:13px;
  font-weight:560;
  white-space:nowrap;
}

.add-step small{
  display:block;
  margin-top:1px;
  font-size:11px;
  opacity:.72;
  white-space:nowrap;
}

.add-step-line{
  width:46px;
  height:1px;
  background:#dbe1ea;
}

.add-step-line.is-done{
  background:#86efac;
}

.add-step-icon,
.add-hero-icon{
  position:relative;
  display:inline-block;
  width:30px;
  height:30px;
  flex:0 0 auto;
  border-radius:10px;
  background:currentColor;
  opacity:.9;
}

.add-step-icon::before,
.add-hero-icon::before{
  content:"";
  position:absolute;
  display:block;
}

.add-step-icon--phone::before,
.add-hero-icon--phone::before{
  left:10px;
  top:6px;
  width:10px;
  height:18px;
  border:2px solid #fff;
  border-radius:4px;
}

.add-step-icon--code::before{
  left:7px;
  top:8px;
  width:16px;
  height:14px;
  border-radius:5px;
  background:#fff;
}

.add-step-icon--setup::before{
  left:8px;
  top:8px;
  width:14px;
  height:14px;
  border:3px solid #fff;
  border-radius:999px;
}

.add-account-alert{
  padding:12px 14px;
  border-radius:12px;
  font-size:13px;
  font-weight:520;
}

.add-account-alert--success{
  border:1px solid rgba(16,185,129,.22);
  background:#ecfdf5;
  color:#047857;
}

.add-account-alert--danger{
  border:1px solid rgba(239,68,68,.22);
  background:#fef2f2;
  color:#dc2626;
}

.add-account-layout{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(260px,.75fr);
  gap:16px;
}

.add-account-card{
  overflow:hidden;
}

.add-card-hero{
  padding:30px 24px;
  background:linear-gradient(135deg, #3b82f6, #2563eb);
  color:#fff;
  text-align:center;
}

.add-hero-icon{
  width:58px;
  height:58px;
  margin:0 auto 12px;
  border-radius:18px;
  background:rgba(255,255,255,.22);
}

.add-hero-icon--phone::before{
  left:20px;
  top:14px;
  width:18px;
  height:30px;
  border-width:3px;
  border-radius:8px;
}

.add-card-hero h2{
  margin:0;
  color:#fff;
  font-size:22px;
  font-weight:560;
}

.add-card-hero p{
  max-width:460px;
  margin:6px auto 0;
  color:#dbeafe;
  font-size:14px;
}

.add-phone-form{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:22px;
}

.add-form-note{
  padding:12px 13px;
  border:1px solid #dbeafe;
  border-radius:12px;
  background:#eff6ff;
  color:#64748b;
  font-size:13px;
}

.add-form-note span{
  color:#2563eb;
  font-weight:560;
}

.add-main-submit{
  min-height:46px;
}

.add-account-info-card{
  padding:20px;
}

.add-guide-list{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin:12px 0 0;
  padding:0;
  list-style:none;
}

.add-guide-list li{
  display:flex;
  gap:12px;
  align-items:flex-start;
}

.add-guide-list li > span{
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
  flex:0 0 auto;
  border-radius:999px;
  background:#eff6ff;
  color:#2563eb;
  font-size:12px;
  font-weight:560;
}

.add-guide-list strong{
  display:block;
  color:#374151;
  font-size:13px;
  font-weight:560;
}

.add-guide-list small{
  display:block;
  margin-top:2px;
  color:#6b7280;
  font-size:12px;
  line-height:1.45;
}

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

.add-request-card{
  padding:16px;
  border:1px solid #edf1f7;
  border-radius:14px;
  background:#fbfdff;
}

.add-request-card.needs-password{
  border-color:#fde68a;
  background:#fffbeb;
}

.add-request-card.is-complete{
  border-color:#bbf7d0;
  background:#ecfdf5;
}

.add-request-head{
  display:flex;
  align-items:center;
  gap:10px;
}

.add-request-avatar{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  flex:0 0 auto;
  border-radius:14px;
  background:#dbeafe;
  color:#1d4ed8;
  font-weight:560;
}

.add-request-head h3{
  margin:0;
  color:#111827;
  font-size:14px;
  font-weight:560;
}

.add-request-head p{
  margin:1px 0 0;
  color:#9ca3af;
  font-size:12px;
}

.add-request-head .pill{
  margin-left:auto;
}

.add-request-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
  color:#6b7280;
  font-size:12px;
}

.add-request-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:end;
  margin-top:14px;
}

.add-request-done{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:14px;
  color:#047857;
  font-size:13px;
}

.add-empty-state{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:180px;
  color:#9ca3af;
  text-align:center;
}

.add-empty-state p{
  margin:0;
  color:#4b5563;
}

.add-empty-state span{
  margin-top:4px;
  font-size:13px;
}

html[data-theme="dark"] .templates-title-block h1,
html[data-theme="dark"] .add-account-header h1,
html[data-theme="dark"] .template-create-copy h2,
html[data-theme="dark"] .templates-section-head h2,
html[data-theme="dark"] .template-stat-card strong,
html[data-theme="dark"] .template-card-title-block h3,
html[data-theme="dark"] .add-guide-list strong,
html[data-theme="dark"] .add-request-head h3,
html[data-theme="dark"] .templates-empty-state p,
html[data-theme="dark"] .add-empty-state p{
  color:#f8fafc;
}

html[data-theme="dark"] .templates-title-block p,
html[data-theme="dark"] .add-account-header p,
html[data-theme="dark"] .template-create-copy p,
html[data-theme="dark"] .templates-section-head p,
html[data-theme="dark"] .template-stat-card span:last-child,
html[data-theme="dark"] .template-card-meta,
html[data-theme="dark"] .template-card-hint,
html[data-theme="dark"] .add-guide-list small,
html[data-theme="dark"] .add-request-head p,
html[data-theme="dark"] .add-request-meta{
  color:#a6b4cb;
}

html[data-theme="dark"] .template-stat-card,
html[data-theme="dark"] .template-create-card,
html[data-theme="dark"] .templates-library-section,
html[data-theme="dark"] .templates-assignment-section,
html[data-theme="dark"] .add-account-card,
html[data-theme="dark"] .add-requests-section,
html[data-theme="dark"] .add-step{
  border-color:#31415c;
  background:#1a2234;
  box-shadow:0 16px 36px rgba(7,12,22,.26);
}

html[data-theme="dark"] .template-create-card{
  background:
    radial-gradient(circle at 0% 0%, rgba(96,165,250,.12), transparent 34%),
    #1a2234;
}

html[data-theme="dark"] .template-library-card,
html[data-theme="dark"] .template-recent-row,
html[data-theme="dark"] .add-request-card{
  border-color:#31415c;
  background:#202b3f;
}

html[data-theme="dark"] .template-card-preview,
html[data-theme="dark"] .template-live-preview,
html[data-theme="dark"] .template-format-card,
html[data-theme="dark"] .template-telegram-create,
html[data-theme="dark"] .template-action-details[open],
html[data-theme="dark"] .template-filter-tabs,
html[data-theme="dark"] .template-edit-details[open],
html[data-theme="dark"] .add-form-note{
  border-color:#31415c;
  background:#172033;
  color:#cbd5e1;
}

html[data-theme="dark"] .template-format-card strong,
html[data-theme="dark"] .template-recent-account,
html[data-theme="dark"] .template-telegram-copy strong,
html[data-theme="dark"] .add-form-note span{
  color:#93c5fd;
}

html[data-theme="dark"] .template-telegram-copy span,
html[data-theme="dark"] .template-telegram-create label,
html[data-theme="dark"] .template-usage-detail,
html[data-theme="dark"] .template-edit-form label,
html[data-theme="dark"] .template-edit-form p{
  color:#a6b4cb;
}

html[data-theme="dark"] .template-edit-details summary,
html[data-theme="dark"] .template-action-details summary{
  border-color:#31415c;
  background:#202b3f;
  color:#cbd5e1;
}

html[data-theme="dark"] .template-edit-details summary:hover,
html[data-theme="dark"] .template-action-details summary:hover{
  border-color:rgba(96,165,250,.35);
  background:rgba(59,130,246,.16);
  color:#bfdbfe;
}

html[data-theme="dark"] .template-usage-pill,
html[data-theme="dark"] .add-guide-list li > span{
  background:rgba(59,130,246,.16);
  color:#bfdbfe;
}

html[data-theme="dark"] .template-usage-pill--folder{
  background:rgba(139,92,246,.18);
  color:#ddd6fe;
}

html[data-theme="dark"] .template-usage-pill--neutral,
html[data-theme="dark"] .template-live-preview.is-empty{
  background:rgba(148,163,184,.12);
  color:#94a3b8;
}

html[data-theme="dark"] .template-filter-tab{
  color:#a6b4cb;
}

html[data-theme="dark"] .template-filter-tab:hover,
html[data-theme="dark"] .template-filter-tab.is-active{
  background:#253148;
  color:#bfdbfe;
}

html[data-theme="dark"] .add-account-back{
  border-color:#31415c;
  background:#1a2234;
  color:#cbd5e1;
}

html[data-theme="dark"] .add-account-back:hover,
html[data-theme="dark"] .template-recent-row:hover{
  background:#273449;
}

html[data-theme="dark"] .add-step.is-active{
  border-color:rgba(96,165,250,.45);
  background:rgba(59,130,246,.16);
  color:#bfdbfe;
}

html[data-theme="dark"] .add-step.is-done{
  border-color:rgba(52,211,153,.38);
  background:rgba(16,185,129,.14);
  color:#86efac;
}

html[data-theme="dark"] .add-step-line{
  background:#43536b;
}

html[data-theme="dark"] .add-step-line.is-done{
  background:#34d399;
}

html[data-theme="dark"] .add-account-alert--success{
  border-color:rgba(52,211,153,.28);
  background:rgba(16,185,129,.14);
  color:#86efac;
}

html[data-theme="dark"] .add-account-alert--danger{
  border-color:rgba(248,113,113,.28);
  background:rgba(239,68,68,.14);
  color:#fca5a5;
}

html[data-theme="dark"] .add-request-card.needs-password{
  border-color:rgba(251,191,36,.32);
  background:rgba(245,158,11,.12);
}

html[data-theme="dark"] .add-request-card.is-complete{
  border-color:rgba(52,211,153,.32);
  background:rgba(16,185,129,.12);
}

.templates-workbench-section{
  padding:20px;
  border:1px solid #e8edf5;
  border-radius:16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(16,185,129,.08), transparent 34%),
    #fff;
  box-shadow:0 12px 30px rgba(15,23,42,.055);
}

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

.template-workbench-grid--single{
  grid-template-columns:1fr;
}

.template-workbench-card{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:16px;
  border:1px solid #edf1f7;
  border-radius:14px;
  background:#fbfdff;
}

.template-workbench-copy strong{
  display:block;
  color:#111827;
  font-size:15px;
  font-weight:500;
}

.template-workbench-copy span{
  display:block;
  margin-top:3px;
  color:#6b7280;
  font-size:13px;
  line-height:1.5;
}

.template-workbench-fields{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
}

.template-workbench-note{
  margin-top:12px;
  color:#9ca3af;
  font-size:13px;
}

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

.template-card-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
}

.template-card-form select,
.template-icon-form select,
.template-workbench-fields select{
  min-height:34px;
  padding:7px 10px;
  border-radius:8px;
  font-size:13px;
  font-weight:400;
}

.template-card-actions{
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  gap:8px;
  flex-wrap:wrap;
  margin-top:auto;
  padding-top:2px;
}

.template-card-actions--end{
  justify-content:flex-end;
}

.template-action-details{
  min-width:0;
}

.template-action-details summary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:7px 11px;
  border:1px solid #d8e1ee;
  border-radius:8px;
  background:#fff;
  color:#374151;
  font-size:13px;
  font-weight:520;
  line-height:1.2;
  list-style:none;
  cursor:pointer;
}

.template-action-details summary::-webkit-details-marker{
  display:none;
}

.template-action-details summary:hover{
  border-color:#bfdbfe;
  background:#eff6ff;
  color:#1d4ed8;
}

.template-action-details[open]{
  flex:1 1 100%;
  padding:12px;
  border:1px solid #dbeafe;
  border-radius:12px;
  background:#f8fbff;
}

.template-action-details[open] summary{
  margin-bottom:12px;
}

.template-action-details pre{
  margin:0;
  max-height:320px;
  overflow:auto;
  padding:12px;
  border-radius:10px;
  background:#111827;
  color:#d1fae5;
  font-size:12px;
  line-height:1.55;
  white-space:pre-wrap;
}

.template-inline-assign-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
}

.template-inline-assign-form select{
  min-height:34px;
  padding:7px 10px;
  border-radius:8px;
  font-size:13px;
  font-weight:400;
}

.template-delete-form{
  display:inline-flex;
}

.template-icon-form{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}

.template-icon-form select{
  width:150px;
}

.template-account-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-bottom:14px;
}

.template-account-pill{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  padding:10px;
  border:1px solid #edf1f7;
  border-radius:12px;
  background:#fbfdff;
  color:#4b5563;
}

.template-account-pill:hover{
  border-color:#dbeafe;
  background:#f8fbff;
}

.template-account-avatar{
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  flex:0 0 auto;
  border-radius:11px;
  background:#eff6ff;
  color:#2563eb;
  font-size:13px;
  font-weight:500;
}

.template-account-pill span:nth-child(2){
  min-width:0;
}

.template-account-pill strong,
.template-account-pill small{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.template-account-pill strong{
  color:#374151;
  font-size:13px;
  font-weight:500;
}

.template-account-pill small{
  color:#9ca3af;
  font-size:11px;
}

.template-account-pill i{
  width:7px;
  height:7px;
  flex:0 0 auto;
  margin-left:auto;
  border-radius:999px;
  background:#10b981;
}

.add-account-page--wizard{
  max-width:760px;
}

.add-account-header--centered{
  justify-content:center;
  text-align:center;
  position:relative;
}

.add-account-header--centered .add-account-back{
  position:absolute;
  left:0;
  top:4px;
}

.add-stepper--hero{
  margin-top:-4px;
}

.add-wizard-card{
  overflow:hidden;
}

.add-card-hero--code{
  background:linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.add-card-hero--code p{
  color:#ede9fe;
}

.add-card-hero--setup{
  background:linear-gradient(135deg, #f59e0b, #d97706);
}

.add-card-hero--setup p{
  color:#fef3c7;
}

.add-card-hero--done{
  background:linear-gradient(135deg, #10b981, #059669);
}

.add-card-hero--done p{
  color:#d1fae5;
}

.add-hero-icon--code::before{
  left:17px;
  top:19px;
  width:24px;
  height:18px;
  border-radius:7px;
  background:#fff;
}

.add-hero-icon--setup::before{
  left:18px;
  top:18px;
  width:22px;
  height:22px;
  border:4px solid #fff;
  border-radius:999px;
}

.add-hero-icon--done::before{
  left:18px;
  top:24px;
  width:24px;
  height:12px;
  border-left:4px solid #fff;
  border-bottom:4px solid #fff;
  transform:rotate(-45deg);
}

.add-code-form,
.add-success-panel{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:22px;
}

.add-account-chip{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px;
  border:1px solid #edf1f7;
  border-radius:14px;
  background:#fbfdff;
}

.add-account-chip > span{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  flex:0 0 auto;
  border-radius:14px;
  background:#dbeafe;
  color:#1d4ed8;
  font-weight:500;
}

.add-account-chip strong{
  display:block;
  color:#111827;
  font-size:14px;
  font-weight:500;
}

.add-account-chip small{
  display:block;
  margin-top:1px;
  color:#9ca3af;
  font-size:12px;
}

.add-new-phone-details{
  border-top:1px solid #edf1f7;
  padding-top:14px;
}

.add-new-phone-details summary,
.add-inline-action summary{
  list-style:none;
  cursor:pointer;
  color:#2563eb;
  font-size:13px;
  font-weight:500;
}

.add-new-phone-details summary::-webkit-details-marker,
.add-inline-action summary::-webkit-details-marker{
  display:none;
}

.add-phone-form--compact{
  padding:12px 0 0;
}

.add-account-guide-strip{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.add-guide-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:13px;
  border:1px solid #e8edf5;
  border-radius:14px;
  background:#fff;
  box-shadow:0 8px 20px rgba(15,23,42,.045);
}

.add-guide-item > span{
  display:grid;
  place-items:center;
  width:24px;
  height:24px;
  flex:0 0 auto;
  border-radius:999px;
  background:#eff6ff;
  color:#2563eb;
  font-size:12px;
  font-weight:500;
}

.add-guide-item strong{
  display:block;
  color:#374151;
  font-size:13px;
  font-weight:500;
}

.add-guide-item small{
  display:block;
  margin-top:2px;
  color:#6b7280;
  font-size:12px;
  line-height:1.4;
}

.add-recent-section{
  padding:16px;
  border:1px solid #e8edf5;
  border-radius:16px;
  background:#fff;
  box-shadow:0 10px 26px rgba(15,23,42,.05);
}

.add-recent-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.add-recent-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  gap:10px;
  align-items:center;
  min-height:56px;
  padding:10px;
  border:1px solid #edf1f7;
  border-radius:12px;
  background:#fbfdff;
}

.add-recent-main{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.add-recent-main strong,
.add-recent-main small{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.add-recent-main strong{
  color:#111827;
  font-size:13px;
  font-weight:500;
}

.add-recent-main small{
  color:#9ca3af;
  font-size:12px;
}

.add-inline-action{
  position:relative;
}

.add-inline-form{
  position:absolute;
  right:0;
  top:calc(100% + 8px);
  z-index:20;
  display:flex;
  align-items:center;
  gap:8px;
  width:260px;
  padding:10px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#fff;
  box-shadow:0 18px 45px rgba(15,23,42,.14);
}

.add-inline-form input{
  min-height:32px;
  padding:7px 9px;
  border-radius:8px;
  font-size:13px;
}

.add-empty-state--compact{
  min-height:120px;
}

html[data-theme="dark"] .templates-workbench-section,
html[data-theme="dark"] .add-recent-section,
html[data-theme="dark"] .add-guide-item{
  border-color:#31415c;
  background:#202b3f;
  box-shadow:0 16px 36px rgba(7,12,22,.24);
}

html[data-theme="dark"] .templates-workbench-section{
  background:
    radial-gradient(circle at 100% 0%, rgba(52,211,153,.10), transparent 34%),
    #202b3f;
}

html[data-theme="dark"] .template-workbench-card,
html[data-theme="dark"] .template-account-pill,
html[data-theme="dark"] .add-account-chip,
html[data-theme="dark"] .add-recent-row{
  border-color:#31415c;
  background:#253148;
}

html[data-theme="dark"] .template-workbench-copy strong,
html[data-theme="dark"] .template-account-pill strong,
html[data-theme="dark"] .add-account-chip strong,
html[data-theme="dark"] .add-guide-item strong,
html[data-theme="dark"] .add-recent-main strong{
  color:#f8fafc;
}

html[data-theme="dark"] .template-workbench-copy span,
html[data-theme="dark"] .template-account-pill small,
html[data-theme="dark"] .add-account-chip small,
html[data-theme="dark"] .add-guide-item small,
html[data-theme="dark"] .add-recent-main small{
  color:#a6b4cb;
}

html[data-theme="dark"] .add-new-phone-details{
  border-top-color:#31415c;
}

html[data-theme="dark"] .add-inline-form{
  border-color:#31415c;
  background:#202b3f;
  box-shadow:0 22px 48px rgba(7,12,22,.34);
}

.account-detail-page{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.account-detail-page .card,
.account-detail-page .details-card{
  margin-bottom:0;
}

.account-detail-hero{
  align-items:stretch;
  padding:18px;
  border-color:#e8edf5;
  border-radius:16px;
  box-shadow:0 10px 28px rgba(15,23,42,.06);
  overflow:hidden;
}

.account-hero-main{
  align-items:flex-start;
  flex:1 1 520px;
  position:relative;
  z-index:1;
}

.account-detail-hero .avatar-xl{
  width:64px;
  height:64px;
  border-radius:16px;
  font-size:22px;
  box-shadow:0 8px 20px rgba(15,23,42,.10);
}

.account-hero-copy{
  min-width:0;
  flex:1 1 auto;
}

.account-hero-kicker{
  margin-bottom:5px;
  color:var(--muted-2);
  font-size:11px;
  font-weight:600;
  letter-spacing:0;
  text-transform:uppercase;
}

.account-hero-title-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.account-hero-title-row h1{
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  color:var(--heading);
  font-size:26px;
  line-height:1.12;
  font-weight:650;
}

.account-status-pill{
  min-height:25px;
}

.status-dot,
.folder-dot{
  display:inline-block;
  width:7px;
  height:7px;
  border-radius:999px;
  background:currentColor;
}

.pill.account-folder-pill{
  color:var(--folder-color, var(--muted));
  border-color:color-mix(in srgb, var(--folder-color, var(--line)) 34%, transparent);
  background:color-mix(in srgb, var(--folder-color, var(--surface-2)) 10%, var(--surface));
}

.account-hero-subtitle{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:6px;
}

.account-hero-subtitle .tech-tag{
  margin-top:0;
  min-height:26px;
  padding:4px 8px;
  border-radius:8px;
  font-size:11px;
}

.subline-dot{
  display:inline-block;
  width:4px;
  height:4px;
  border-radius:999px;
  background:var(--muted-2);
}

.account-quick-stats{
  margin-top:12px;
  gap:8px;
}

.quick-stat{
  display:inline-flex;
  align-items:baseline;
  gap:6px;
  min-height:28px;
  padding:5px 9px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface-2);
  color:var(--muted);
}

.quick-stat-value{
  color:var(--heading);
  font-size:14px;
  font-weight:650;
}

.quick-stat-label{
  font-size:12px;
  font-weight:520;
}

.quick-stat--blue .quick-stat-value{color:var(--primary-strong)}
.quick-stat--green .quick-stat-value{color:var(--success)}

.account-hero-healthline{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}

.account-health-chip{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:4px 8px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface);
  color:var(--muted);
  font-size:12px;
  font-weight:520;
}

.account-health-chip--ok{
  border-color:rgba(16,185,129,.2);
  background:var(--success-soft);
  color:var(--success);
}

.account-health-chip--warn{
  border-color:rgba(245,158,11,.24);
  background:var(--warning-soft);
  color:#b45309;
}

.account-health-chip--danger{
  border-color:rgba(239,68,68,.22);
  background:var(--danger-soft);
  color:var(--danger);
}

.account-hero-actions{
  position:relative;
  z-index:1;
  align-content:flex-start;
  justify-content:flex-end;
  max-width:430px;
}

.account-guide-card{
  display:block;
  padding:0;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
  box-shadow:0 7px 20px rgba(15,23,42,.045);
  overflow:hidden;
}

.account-guide-card > summary{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:42px;
  padding:10px 12px;
  color:var(--muted);
  font-size:13px;
  font-weight:620;
  list-style:none;
  cursor:pointer;
}

.account-guide-card > summary::-webkit-details-marker{
  display:none;
}

.account-guide-card[open] > summary{
  border-bottom:1px solid var(--line);
}

.account-guide-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  padding:12px;
  background:color-mix(in srgb, var(--surface) 78%, var(--primary-soft));
}

.guide-item{
  padding:10px 12px;
  border-radius:14px;
  background:var(--surface);
  border:1px solid var(--line);
}

.guide-label{
  margin-bottom:4px;
  color:var(--heading);
  font-size:13px;
  font-weight:600;
}

.account-detail-tabs{
  padding:0;
  border-color:#e8edf5;
  border-radius:16px;
  box-shadow:0 11px 28px rgba(15,23,42,.055);
  overflow:visible;
}

.account-detail-tabs::before{
  display:none;
}

.account-tab-bar{
  top:57px;
  margin:0;
  padding:6px;
  border-width:0 0 1px;
  border-radius:0;
  overflow-x:auto;
  flex-wrap:nowrap;
  background:rgba(255,255,255,.94);
}

html[data-theme="dark"] .account-tab-bar{
  background:rgba(17,24,39,.88);
}

.account-tab-bar .tab-btn{
  flex:0 0 auto;
  gap:7px;
  min-height:36px;
  padding:7px 11px;
  font-weight:520;
  white-space:nowrap;
}

.tab-icon{
  position:relative;
  display:inline-flex;
  width:16px;
  height:16px;
  flex:0 0 auto;
  border-radius:5px;
  background:rgba(148,163,184,.16);
  color:currentColor;
}

.tab-icon::before,
.tab-icon::after{
  content:"";
  position:absolute;
  display:block;
}

.tab-icon::after{display:none}

.tab-icon--settings::before,
.tab-icon--overview::before{
  inset:4px;
  border-radius:3px;
  background:currentColor;
  opacity:.72;
}

.tab-icon--channels::before{
  left:3px;
  top:5px;
  width:10px;
  height:2px;
  border-radius:999px;
  background:currentColor;
  box-shadow:0 4px 0 currentColor;
  opacity:.75;
}

.tab-icon--template::before{
  left:5px;
  top:3px;
  width:7px;
  height:10px;
  border-radius:2px;
  background:currentColor;
  opacity:.75;
}

.tab-icon--tasks::before{
  left:4px;
  top:4px;
  width:8px;
  height:8px;
  border:2px solid currentColor;
  border-radius:3px;
  opacity:.75;
}

.tab-icon--health::before{
  left:4px;
  top:7px;
  width:8px;
  height:2px;
  border-radius:999px;
  background:currentColor;
  box-shadow:0 -4px 0 currentColor, 0 4px 0 currentColor;
  opacity:.75;
}

.tab-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  min-height:20px;
  padding:2px 6px;
  border-radius:999px;
  background:var(--surface-3);
  color:var(--muted);
  font-size:11px;
  font-weight:560;
}

.tab-btn.is-active .tab-count{
  background:rgba(59,130,246,.14);
  color:var(--primary-strong);
}

.account-detail-tabs .tab-panel{
  padding:18px;
}

.account-tab-stack{
  gap:16px;
}

.account-summary-grid,
.account-metric-grid{
  gap:12px;
}

.account-detail-page .stat-card::after{
  display:none;
}

.account-detail-page .stat-label{
  font-weight:500;
  letter-spacing:0;
}

.account-summary-card{
  display:flex;
  align-items:flex-start;
  gap:12px;
  min-width:0;
  padding:16px;
  background:var(--surface-2);
  box-shadow:none;
}

.account-summary-card > div:last-child{
  min-width:0;
}

.stat-icon{
  flex:0 0 auto;
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid var(--line);
  background:var(--surface);
  box-shadow:var(--shadow-soft);
}

.stat-icon--blue{background:linear-gradient(135deg, var(--surface), var(--primary-soft))}
.stat-icon--violet{background:linear-gradient(135deg, var(--surface), var(--violet-soft))}
.stat-icon--green{background:linear-gradient(135deg, var(--surface), var(--success-soft))}

.stat-value-compact{
  margin-top:6px;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  color:var(--heading);
  font-size:18px;
  line-height:1.2;
  white-space:nowrap;
}

.account-settings-grid{
  margin-top:14px;
}

.account-block{
  background:var(--surface);
  border-radius:12px;
  border-color:#e8edf5;
  box-shadow:0 7px 20px rgba(15,23,42,.045);
}

.account-block .section-title{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-bottom:12px;
}

.account-block--profile,
.account-block--photo,
.account-block--wide{
  grid-column:1 / -1;
}

.account-block .section-title h3{
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--muted);
  font-size:14px;
  font-weight:620;
}

.block-icon{
  position:relative;
  display:inline-grid;
  place-items:center;
  width:20px;
  height:20px;
  flex:0 0 auto;
  border-radius:7px;
  border:1px solid var(--line);
  background:linear-gradient(135deg, var(--surface), var(--surface-3));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.24);
  color:var(--muted);
}

.block-icon::before,
.block-icon::after{
  content:"";
  position:absolute;
  display:block;
}

.block-icon::before{
  left:50%;
  top:50%;
  width:8px;
  height:8px;
  border:0;
  border-radius:999px;
  background:currentColor;
  opacity:.75;
  transform:translate(-50%, -50%);
}

.block-icon::after{display:none}

.block-icon--folder{background:linear-gradient(135deg, var(--primary-soft), var(--surface))}
.block-icon--redirect{background:linear-gradient(135deg, var(--violet-soft), var(--surface))}
.block-icon--profile{background:linear-gradient(135deg, var(--success-soft), var(--surface))}
.block-icon--photo{background:linear-gradient(135deg, var(--warning-soft), var(--surface))}
.block-icon--plus{background:linear-gradient(135deg, var(--success-soft), var(--surface))}
.block-icon--bulk{background:linear-gradient(135deg, var(--primary-soft), var(--surface))}
.block-icon--template{background:linear-gradient(135deg, var(--violet-soft), var(--surface))}
.block-icon--editor{background:linear-gradient(135deg, var(--primary-soft), var(--surface))}
.block-icon--health{background:linear-gradient(135deg, var(--success-soft), var(--surface))}
.block-icon--live{background:linear-gradient(135deg, var(--primary-soft), var(--surface))}
.block-icon--commands{background:linear-gradient(135deg, var(--warning-soft), var(--surface))}
.block-icon--events{background:linear-gradient(135deg, var(--violet-soft), var(--surface))}
.block-icon--history{background:linear-gradient(135deg, var(--warning-soft), var(--surface))}
.block-icon--inbox{background:linear-gradient(135deg, var(--success-soft), var(--surface))}
.block-icon--jobs{background:linear-gradient(135deg, var(--primary-soft), var(--surface))}
.block-icon--tasks{background:linear-gradient(135deg, var(--primary-soft), var(--surface))}
.block-icon--danger{background:linear-gradient(135deg, var(--danger-soft), var(--surface))}

.block-icon--plus::before{
  left:9px;
  top:4px;
  width:2px;
  height:12px;
  border:0;
  border-radius:999px;
  background:currentColor;
  opacity:.75;
  transform:none;
}

.block-icon--plus::after{
  display:block;
  left:4px;
  top:9px;
  width:12px;
  height:2px;
  border-radius:999px;
  background:currentColor;
  opacity:.75;
}

.block-icon--danger::before{
  left:50%;
  top:50%;
  width:0;
  height:0;
  border:0;
  border-left:5px solid transparent;
  border-right:5px solid transparent;
  border-bottom:10px solid currentColor;
  border-radius:0;
  background:transparent;
  transform:translate(-50%, -55%);
}

.account-disclosure-card{
  overflow:hidden;
}

.account-detail-page .account-disclosure-card > summary{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:48px;
  margin:0;
  padding:0;
  color:var(--muted);
  font-size:14px;
  font-weight:600;
  list-style:none;
  cursor:pointer;
}

.account-detail-page .subcard.account-disclosure-card > summary{
  margin:-16px -16px 0;
  padding:13px 16px;
}

.account-detail-page .details-card.account-disclosure-card > summary,
.account-detail-page .card.account-disclosure-card > summary{
  margin:-20px -20px 0;
  padding:14px 20px;
}

.account-detail-page .account-disclosure-card > summary::-webkit-details-marker{
  display:none;
}

.account-detail-page .account-disclosure-card > summary:hover,
.account-guide-card > summary:hover{
  background:var(--surface-2);
  color:var(--heading);
}

.account-detail-page .account-disclosure-card > summary::after{
  content:"";
  width:8px;
  height:8px;
  margin-left:auto;
  border-right:2px solid var(--muted-2);
  border-bottom:2px solid var(--muted-2);
  transform:rotate(45deg);
  transition:transform .16s ease;
}

.account-detail-page .account-disclosure-card[open] > summary{
  border-bottom:1px solid var(--line);
}

.account-detail-page .account-disclosure-card[open] > summary::after{
  transform:rotate(225deg);
}

.account-disclosure-hint{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:3px 8px;
  border-radius:999px;
  background:var(--surface-3);
  color:var(--muted-2);
  font-size:11px;
  font-weight:600;
}

.account-disclosure-body{
  padding-top:14px;
}

.subcard.account-disclosure-card .account-disclosure-body{
  padding-top:14px;
}

.details-card.account-disclosure-card .account-disclosure-body,
.card.account-disclosure-card .account-disclosure-body{
  padding-top:16px;
}

.details-card--nested{
  padding:14px;
  border-radius:12px;
  box-shadow:none;
}

.details-card--nested summary{
  font-size:13px;
}

.account-photo-form{
  display:flex;
  align-items:flex-start;
  gap:16px;
}

.account-photo-fields{
  min-width:0;
  flex:1 1 auto;
}

.account-form-grid{
  gap:12px;
}

.account-metric-card{
  min-height:104px;
  padding:13px 14px;
  border-color:#e8edf5;
  background:var(--surface);
  box-shadow:0 7px 20px rgba(15,23,42,.045);
}

.account-metric-card .stat-value{
  margin-top:7px;
  font-size:26px;
  font-weight:650;
}

.account-metric-card--warn .stat-value{
  color:var(--danger);
}

.account-filter-card{
  background:var(--surface);
  border-color:#e8edf5;
  box-shadow:0 7px 20px rgba(15,23,42,.045);
}

.account-filter-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.account-filter-toolbar input{
  flex:1 1 280px;
  max-width:none;
  min-width:220px;
}

.account-filter-toolbar select{
  flex:0 1 220px;
}

.account-bulk-actions{
  align-items:center;
}

.account-table-wrap{
  border-color:#e8edf5;
  border-radius:12px;
  box-shadow:0 7px 20px rgba(15,23,42,.04);
}

.account-detail-page .data-table th,
.account-detail-page .data-table td{
  padding:11px 10px;
  font-size:13px;
}

.account-targets-table th,
.account-health-table th,
.account-command-table th,
.account-events-table th{
  background:var(--surface-2);
}

.target-schedule-details{
  margin-top:6px;
}

.target-schedule-details summary{
  color:var(--primary-strong);
  font-size:12px;
  font-weight:600;
  list-style:none;
  cursor:pointer;
}

.target-schedule-details summary::-webkit-details-marker{
  display:none;
}

.target-schedule-list{
  display:flex;
  flex-direction:column;
  gap:3px;
  margin-top:6px;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}

.account-empty-card{
  background:var(--surface);
}

.account-toggle-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:0 0 12px;
  padding:10px 12px;
  border:1px solid #e8edf5;
  border-radius:12px;
  background:var(--surface-2);
}

.account-toggle-row input{
  margin-top:3px;
  flex:0 0 auto;
}

.account-toggle-row strong{
  display:block;
  color:var(--heading);
  font-size:13px;
  font-weight:620;
}

.account-toggle-row small{
  display:block;
  margin-top:2px;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}

.account-inline-status{
  min-height:40px;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding:8px 10px;
  border:1px solid #e8edf5;
  border-radius:10px;
  background:var(--surface-2);
}

.account-template-editor{
  padding:18px;
}

.template-editor-grid{
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr);
  gap:16px;
}

.template-editor-pane,
.template-preview-pane{
  min-width:0;
}

.template-toolbar{
  padding:6px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface-2);
}

.template-editor-status{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}

.template-editor-form #template_textarea{
  min-height:420px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:13px;
  line-height:1.55;
}

.preview-heading{
  margin-bottom:7px;
  color:var(--muted);
  font-size:13px;
  font-weight:600;
}

.template-preview-pane .preview-box{
  min-height:468px;
  max-height:620px;
  overflow:auto;
  background:var(--surface-2);
}

.template-actions{
  align-items:center;
}

.live-worker-card{
  padding:16px;
  border-radius:16px;
  box-shadow:none;
}

.task-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.task-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:11px 12px;
  border:1px solid #e8edf5;
  border-radius:12px;
  background:var(--surface-2);
}

.task-row-meta{
  display:flex;
  align-items:flex-end;
  flex-direction:column;
  gap:5px;
  text-align:right;
  flex:0 0 auto;
}

.account-check-result-card{
  background:var(--surface);
}

.account-diagnostics-actions{
  align-items:center;
  margin-bottom:2px;
}

.account-danger-zone{
  background:var(--danger-soft);
}

.account-danger-zone > summary{
  color:var(--danger) !important;
}

.account-danger-card{
  background:var(--surface);
}

html[data-theme="dark"] .account-health-chip--warn{
  color:#fbbf24;
}

html[data-theme="dark"] .account-guide-grid{
  background:rgba(59,130,246,.08);
}

html[data-theme="dark"] .account-detail-hero,
html[data-theme="dark"] .account-detail-tabs,
html[data-theme="dark"] .account-block,
html[data-theme="dark"] .account-metric-card,
html[data-theme="dark"] .account-filter-card,
html[data-theme="dark"] .account-table-wrap,
html[data-theme="dark"] .account-toggle-row,
html[data-theme="dark"] .account-inline-status,
html[data-theme="dark"] .task-row{
  border-color:var(--line);
}

html[data-theme="dark"] .account-toggle-row,
html[data-theme="dark"] .account-inline-status,
html[data-theme="dark"] .task-row{
  background:var(--surface-2);
}

@keyframes toastIn{
  from{opacity:0;transform:translateY(-8px) scale(.98)}
  to{opacity:1;transform:translateY(0) scale(1)}
}

@keyframes actionSpin{
  to{transform:rotate(360deg)}
}

@media (max-width: 1279px){
  .grid-4,
  .stats-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .account-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .accounts-stats-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

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

  .template-preview-pane .preview-box{
    min-height:280px;
  }
}

@media (max-width: 1023px){
  .grid-3,
  .utility-results .stats-grid,
  .account-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .topbar-inner{
    flex-wrap:wrap;
  }

  .topbar-nav-wrap{
    width:100%;
    justify-content:space-between;
  }

  .account-detail-hero{
    flex-direction:column;
  }

  .account-hero-actions{
    justify-content:flex-start;
    max-width:none;
  }

  .account-guide-grid{
    grid-template-columns:1fr;
  }

  .accounts-bulk-grid,
  .channel-result-groups{
    grid-template-columns:1fr;
  }

  .channel-result-stats{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media (max-width: 760px){
  .page-shell{
    padding:22px 14px 34px;
  }

  .page-header h1,
  .hero h1{
    font-size:28px;
  }

  .account-detail-page{
    gap:12px;
  }

  .accounts-page{
    gap:14px;
  }

  .accounts-page-header{
    gap:12px;
  }

  .accounts-header-actions,
  .accounts-check-form{
    width:100%;
  }

  .accounts-header-actions .btn,
  .accounts-header-actions button{
    flex:1 1 150px;
  }

  .folder-manage-details{
    margin-left:0;
  }

  .folder-manage-panel{
    position:fixed;
    left:12px;
    right:12px;
    top:126px;
    width:auto;
    max-height:calc(100vh - 150px);
    overflow:auto;
  }

  .accounts-stats-grid,
  .channel-result-stats{
    grid-template-columns:1fr;
  }

  .accounts-filter-row{
    align-items:stretch;
  }

  .accounts-filter-row select,
  .accounts-search-field,
  .channel-check-form input,
  .channel-check-form select{
    flex:1 1 100%;
  }

  .accounts-count-pills{
    width:100%;
    margin-left:0;
  }

  .accounts-bulk-actions .btn{
    flex:1 1 150px;
  }

  .account-detail-hero{
    padding:16px;
  }

  .account-hero-main{
    flex:1 1 auto;
    gap:12px;
  }

  .account-detail-hero .avatar-xl{
    width:62px;
    height:62px;
    border-radius:16px;
    font-size:22px;
  }

  .account-hero-title-row h1{
    font-size:24px;
  }

  .account-hero-actions .btn,
  .account-hero-actions button{
    flex:1 1 150px;
  }

  .account-hero-healthline,
  .account-filter-head{
    align-items:stretch;
    flex-direction:column;
  }

  .account-detail-tabs .tab-panel{
    padding:14px;
  }

  .account-tab-bar{
    top:72px;
  }

  .account-photo-form{
    flex-direction:column;
  }

  .account-detail-page .details-card.account-disclosure-card > summary,
  .account-detail-page .card.account-disclosure-card > summary{
    margin:-14px -14px 0;
    padding:13px 14px;
  }

  .account-disclosure-hint{
    max-width:100%;
    white-space:normal;
  }

  .template-editor-form #template_textarea{
    min-height:320px;
  }

  .topbar-inner{
    padding:12px 14px;
  }

  .topbar-nav-wrap{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }

  .nav{
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:2px;
  }

  .nav-actions{
    justify-content:flex-end;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .stats-grid,
  .account-grid,
  .utility-results .stats-grid{
    grid-template-columns:1fr;
  }

  .searchbar,
  .accounts-filters-toolbar{
    align-items:stretch;
  }

  .searchbar input,
  .accounts-filters-toolbar input,
  .account-filter-toolbar input{
    max-width:none;
  }

  .accounts-filters-toolbar select,
  .utility-card-form select,
  .account-filter-toolbar select{
    flex:1 1 100%;
  }

  .account-tile-meta,
  .kv{
    grid-template-columns:1fr;
  }

  #toast-root{
    top:76px;
    left:12px;
    right:12px;
  }

  .toast{
    min-width:0;
    max-width:none;
  }

  .bg-team,
  .bg-scooby,
  .bg-van{
    display:none;
  }
}

@media (max-width: 1023px){
  .accounts-folder-layout{
    grid-template-columns:1fr;
  }

  .accounts-folder-controls{
    justify-content:flex-start;
  }

  .accounts-checks-panel{
    grid-template-columns:1fr;
  }

  .template-create-card,
  .template-create-form,
  .add-account-layout,
  .template-workbench-grid{
    grid-template-columns:1fr;
  }

  .templates-stats-grid,
  .template-account-strip{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .template-recent-row{
    grid-template-columns:60px minmax(0,1fr) auto;
  }

  .template-recent-account,
  .template-recent-date{
    display:none;
  }
}

@media (max-width: 760px){
  .accounts-section-heading{
    align-items:flex-start;
    flex-direction:column;
    padding:16px 16px 0;
  }

  .accounts-section-heading p{
    max-width:none;
    text-align:left;
  }

  .accounts-folder-layout{
    padding:12px 12px 14px;
  }

  .accounts-folder-controls{
    width:100%;
    padding-left:0;
    border-left:0;
  }

  .folder-add-details,
  .folder-manage-details{
    flex:1 1 0;
  }

  .folder-add-summary,
  .folder-manage-summary{
    width:100%;
    justify-content:center;
  }

  .folder-add-panel,
  .folder-manage-panel,
  .accounts-more-menu{
    position:fixed;
    left:12px;
    right:12px;
    top:126px;
    width:auto;
    max-height:calc(100vh - 150px);
    overflow:auto;
  }

  .accounts-more-details{
    flex:1 1 150px;
  }

  .accounts-more-details summary{
    width:100%;
    justify-content:center;
  }

  .accounts-disclosure-details summary,
  .accounts-bulk-details summary{
    align-items:flex-start;
    flex-direction:column;
  }

  .disclosure-meta{
    width:100%;
    justify-content:space-between;
  }

  .accounts-checks-panel{
    padding:0 12px 12px;
  }

  .templates-page,
  .add-account-page{
    gap:16px;
  }

  .templates-page-header,
  .add-account-header,
  .templates-section-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .templates-header-actions,
  .templates-header-actions .btn,
  .templates-library-tools,
  .templates-search-field{
    width:100%;
  }

  .templates-library-tools{
    justify-content:flex-start;
  }

  .template-filter-tabs{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    width:100%;
  }

  .templates-stats-grid,
  .template-library-grid,
  .add-request-grid{
    grid-template-columns:1fr;
  }

  .template-create-card,
  .templates-workbench-section,
  .templates-library-section,
  .templates-assignment-section,
  .add-requests-section{
    padding:14px;
  }

  .template-create-form{
    gap:12px;
  }

  .template-workbench-fields,
  .template-inline-assign-form,
  .template-card-form,
  .template-telegram-row,
  .add-account-guide-strip{
    grid-template-columns:1fr;
  }

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

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

  .template-action-details summary,
  .template-delete-form,
  .template-delete-form .btn{
    width:100%;
  }

  .template-icon-form select{
    width:100%;
  }

  .add-stepper{
    align-items:stretch;
    flex-direction:column;
  }

  .add-step{
    width:100%;
  }

  .add-step-line{
    width:1px;
    height:18px;
    margin-left:25px;
  }

  .add-request-form{
    grid-template-columns:1fr;
  }

  .add-account-header--centered{
    text-align:left;
  }

  .add-account-header--centered .add-account-back{
    position:static;
  }

  .add-recent-row{
    grid-template-columns:1fr;
    align-items:stretch;
  }

  .add-inline-form{
    position:static;
    width:100%;
    margin-top:8px;
  }
}

/* Polished shared UI + account detail pass */
:root{
  --focus-ring:0 0 0 3px rgba(59,130,246,.14);
  --icon-list:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E");
  --icon-sliders:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M2 14h4M10 8h4M18 16h4'/%3E%3C/svg%3E");
  --icon-file:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zM14 2v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E");
  --icon-calendar:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4M16 2v4M3 10h18M5 4h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zM9 16l2 2 4-5'/%3E%3C/svg%3E");
  --icon-activity:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-4l-3 8-6-16-3 8H2'/%3E%3C/svg%3E");
  --icon-folder:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6a2 2 0 0 1 2-2h5l2 2h7a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");
  --icon-redirect:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 1l4 4-4 4M3 11V9a4 4 0 0 1 4-4h14M7 23l-4-4 4-4M21 13v2a4 4 0 0 1-4 4H3'/%3E%3C/svg%3E");
  --icon-user:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21a8 8 0 0 0-16 0M12 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z'/%3E%3C/svg%3E");
  --icon-camera:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2zM12 17a4 4 0 1 0 0-8 4 4 0 0 0 0 8z'/%3E%3C/svg%3E");
  --icon-plus:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  --icon-layers:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2l9 5-9 5-9-5 9-5zM3 12l9 5 9-5M3 17l9 5 9-5'/%3E%3C/svg%3E");
  --icon-pen:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 3l5 5L8 21H3v-5L16 3z'/%3E%3C/svg%3E");
  --icon-history:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7M3 4v6h6M12 7v5l3 3'/%3E%3C/svg%3E");
  --icon-inbox:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2M5 5h14l3 7v5a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5z'/%3E%3C/svg%3E");
  --icon-send:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z'/%3E%3C/svg%3E");
  --icon-alert:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9L1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0zM12 9v4M12 17h.01'/%3E%3C/svg%3E");
  --icon-copy:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 8h12v12H8zM4 16V4h12'/%3E%3C/svg%3E");
  --icon-eye:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12zM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'/%3E%3C/svg%3E");
  --icon-clock:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM12 6v6l4 2'/%3E%3C/svg%3E");
  --icon-check:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  --icon-shield:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
  --icon-back:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M12 19l-7-7 7-7'/%3E%3C/svg%3E");
  --icon-refresh:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 0 0-15-6.7L3 8M3 3v5h5M3 12a9 9 0 0 0 15 6.7l3-2.7M21 21v-5h-5'/%3E%3C/svg%3E");
}

body{
  font-weight:400;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

.card,
.details-card,
.subcard,
.stat-card,
.status-shell{
  border-color:var(--line);
  box-shadow:var(--shadow-soft);
}

.card::before,
.details-card::before{
  display:none;
}

.section-title h3,
.cell-title,
.toast-title{
  font-weight:560;
}

label{
  color:var(--muted);
  font-size:12px;
  font-weight:500;
  line-height:1.35;
}

input,
textarea,
select{
  min-height:38px;
  padding:9px 11px;
  border-radius:9px;
  border-color:var(--line);
  background:var(--surface-2);
  color:var(--text);
}

input:hover,
textarea:hover,
select:hover{
  border-color:var(--line-strong);
}

input:focus,
textarea:focus,
select:focus{
  border-color:rgba(59,130,246,.42);
  box-shadow:var(--focus-ring);
}

button,
.btn{
  min-height:36px;
  padding:8px 12px;
  border-radius:9px;
  font-weight:500;
  letter-spacing:0;
}

.btn-secondary{
  background:var(--surface);
  border-color:var(--line);
  color:#4b5563;
}

.btn-ghost{
  background:var(--surface-2);
  border-color:transparent;
  color:#5f6b7a;
}

.toolbar button{
  min-height:32px;
  padding:6px 9px;
  border-radius:8px;
  font-size:13px;
  font-weight:500;
}

.pill{
  min-height:22px;
  padding:3px 8px;
  font-weight:500;
  letter-spacing:0;
}

.account-detail-page{
  gap:16px;
}

.account-detail-page .card,
.account-detail-page .details-card,
.account-detail-page .subcard{
  border-radius:12px;
}

.account-detail-hero{
  padding:16px;
  border-color:#edf0f5;
  border-radius:12px;
  background:#fff;
  box-shadow:var(--shadow-card);
}

.account-hero-main{
  gap:14px;
  align-items:flex-start;
}

.account-detail-hero .avatar-xl{
  width:58px;
  height:58px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.92);
  box-shadow:0 1px 2px rgba(15,23,42,.04), 0 10px 22px rgba(37,99,235,.12);
  font-size:20px;
}

.account-hero-kicker{
  margin-bottom:4px;
  color:var(--muted-2);
  font-size:11px;
  font-weight:500;
  text-transform:none;
}

.account-hero-title-row{
  gap:8px;
}

.account-hero-title-row h1{
  font-size:24px;
  line-height:1.2;
  font-weight:560;
  letter-spacing:0;
}

.account-status-pill{
  min-height:23px;
}

.account-hero-subtitle{
  margin-top:4px;
  gap:7px;
  color:var(--muted);
  font-size:13px;
}

.account-hero-subtitle .tech-tag{
  min-height:22px;
  padding:3px 7px;
  border-radius:7px;
  background:var(--surface-2);
  font-size:11px;
  font-weight:500;
}

.account-quick-stats{
  margin-top:10px;
  gap:7px;
}

.quick-stat{
  align-items:center;
  gap:5px;
  min-height:26px;
  padding:4px 8px;
  border-color:#eef1f5;
  border-radius:8px;
  background:#fbfcfd;
}

.quick-stat-icon,
.btn-icon,
.metric-icon,
.tab-icon,
.block-icon{
  --icon-mask:var(--icon-list);
}

.quick-stat-icon,
.btn-icon{
  display:inline-block;
  width:13px;
  height:13px;
  flex:0 0 auto;
  background:currentColor;
  -webkit-mask:var(--icon-mask) center / contain no-repeat;
  mask:var(--icon-mask) center / contain no-repeat;
}

.quick-stat-icon--channels,
.btn-icon--channels,
.metric-icon--channels,
.tab-icon--channels,
.block-icon--channels{--icon-mask:var(--icon-list)}
.quick-stat-icon--send,
.btn-icon--send,
.metric-icon--send,
.block-icon--jobs{--icon-mask:var(--icon-send)}
.quick-stat-icon--shield,
.metric-icon--shield{--icon-mask:var(--icon-shield)}
.quick-stat-icon--eye,
.metric-icon--eye{--icon-mask:var(--icon-eye)}
.btn-icon--back{--icon-mask:var(--icon-back)}
.btn-icon--template,
.metric-icon--template,
.tab-icon--template,
.block-icon--template{--icon-mask:var(--icon-file)}
.btn-icon--health,
.metric-icon--activity,
.tab-icon--health,
.block-icon--health,
.block-icon--live{--icon-mask:var(--icon-activity)}
.btn-icon--refresh{--icon-mask:var(--icon-refresh)}
.metric-icon--copy{--icon-mask:var(--icon-copy)}
.metric-icon--history,
.block-icon--history{--icon-mask:var(--icon-history)}
.metric-icon--calendar,
.tab-icon--tasks,
.block-icon--tasks{--icon-mask:var(--icon-calendar)}
.metric-icon--clock{--icon-mask:var(--icon-clock)}
.metric-icon--check{--icon-mask:var(--icon-check)}
.metric-icon--alert,
.block-icon--danger{--icon-mask:var(--icon-alert)}
.metric-icon--inbox,
.block-icon--inbox{--icon-mask:var(--icon-inbox)}
.tab-icon--settings{--icon-mask:var(--icon-sliders)}
.block-icon--folder{--icon-mask:var(--icon-folder)}
.block-icon--redirect{--icon-mask:var(--icon-redirect)}
.block-icon--profile{--icon-mask:var(--icon-user)}
.block-icon--photo{--icon-mask:var(--icon-camera)}
.block-icon--plus{--icon-mask:var(--icon-plus)}
.block-icon--bulk{--icon-mask:var(--icon-layers)}
.block-icon--editor{--icon-mask:var(--icon-pen)}
.block-icon--commands{--icon-mask:var(--icon-sliders)}
.block-icon--events{--icon-mask:var(--icon-activity)}

.quick-stat-value{
  font-size:13px;
  font-weight:560;
}

.quick-stat--blue .quick-stat-icon{
  color:#2563eb;
}

.quick-stat--green .quick-stat-icon{
  color:#059669;
}

.quick-stat-label{
  color:var(--muted);
  font-size:12px;
  font-weight:500;
}

.account-hero-healthline{
  margin-top:9px;
  gap:6px;
}

.account-health-chip{
  min-height:22px;
  padding:3px 8px;
  border-color:#edf0f5;
  background:#fff;
  font-size:11px;
  font-weight:500;
}

.account-hero-actions{
  gap:7px;
}

.account-hero-actions form{
  display:inline-flex;
}

.account-guide-card{
  border-color:#edf0f5;
  border-radius:12px;
  box-shadow:var(--shadow-soft);
}

.account-guide-card > summary{
  min-height:38px;
  padding:9px 12px;
  font-weight:500;
}

.account-guide-grid{
  gap:10px;
  padding:12px;
}

.guide-item{
  padding:10px;
  border-radius:10px;
}

.account-detail-tabs{
  border-color:#edf0f5;
  border-radius:12px;
  background:#fff;
  box-shadow:var(--shadow-card);
  overflow:hidden;
}

.account-tab-bar{
  top:57px;
  gap:0;
  padding:0;
  border:0;
  border-bottom:1px solid var(--line);
  border-radius:0;
  background:rgba(255,255,255,.96);
}

.account-tab-bar .tab-btn{
  gap:7px;
  min-height:42px;
  padding:11px 16px 10px;
  border:0;
  border-bottom:2px solid transparent;
  border-radius:0;
  background:transparent;
  color:var(--muted);
  font-size:14px;
  font-weight:500;
}

.account-tab-bar .tab-btn:hover{
  background:#f9fafb;
  color:#374151;
}

.account-tab-bar .tab-btn.is-active{
  border-bottom-color:#3b82f6;
  background:#eff6ff;
  color:#2563eb;
}

.tab-icon{
  width:15px;
  height:15px;
  border:0;
  border-radius:0;
  background:currentColor;
  opacity:.82;
  -webkit-mask:var(--icon-mask) center / contain no-repeat;
  mask:var(--icon-mask) center / contain no-repeat;
}

.tab-icon::before,
.tab-icon::after{
  display:none;
}

.tab-count{
  min-width:21px;
  min-height:19px;
  padding:2px 6px;
  border-radius:999px;
  background:#f3f4f6;
  color:#8b95a1;
  font-size:11px;
  font-weight:500;
}

.tab-btn.is-active .tab-count{
  background:#dbeafe;
  color:#1d4ed8;
}

.account-detail-tabs .tab-panel{
  padding:16px;
}

.account-tab-stack{
  gap:14px;
}

.account-detail-tabs .tab-panel > .account-metric-grid + .account-tab-stack{
  margin-top:18px;
}

.account-settings-grid{
  gap:14px;
  margin-top:0;
}

.account-block,
.account-filter-card,
.account-table-wrap,
.account-empty-card,
.account-check-result-card{
  border-color:#edf0f5;
  background:#fff;
  box-shadow:var(--shadow-soft);
}

.account-block{
  padding:16px;
}

.account-block .section-title{
  gap:3px;
  margin-bottom:12px;
}

.account-block .section-title h3,
.account-detail-page .account-disclosure-card > summary{
  color:#4b5563;
  font-size:14px;
  font-weight:500;
}

.block-icon,
.metric-icon{
  display:inline-grid;
  place-items:center;
  width:22px;
  height:22px;
  flex:0 0 auto;
  border:0;
  border-radius:7px;
  color:#2563eb;
  background:#eff6ff;
  box-shadow:none;
}

.block-icon::before,
.metric-icon::before{
  content:"";
  display:block;
  width:14px;
  height:14px;
  background:currentColor;
  opacity:1;
  -webkit-mask:var(--icon-mask) center / contain no-repeat;
  mask:var(--icon-mask) center / contain no-repeat;
  transform:none;
}

.block-icon::after,
.metric-icon::after{
  display:none;
}

.block-icon--folder,
.metric-icon--channels{color:#2563eb;background:#eff6ff}
.block-icon--redirect,
.block-icon--template,
.block-icon--editor,
.block-icon--history,
.metric-icon--template,
.metric-icon--copy,
.metric-icon--history,
.metric-icon--eye{color:#7c3aed;background:#f5f3ff}
.block-icon--profile,
.block-icon--health,
.block-icon--live,
.block-icon--inbox,
.metric-icon--shield,
.metric-icon--check,
.metric-icon--inbox{color:#059669;background:#ecfdf5}
.block-icon--photo,
.block-icon--commands,
.metric-icon--clock,
.metric-icon--calendar{color:#d97706;background:#fffbeb}
.block-icon--plus,
.metric-icon--send{color:#0d9488;background:#f0fdfa}
.block-icon--bulk,
.block-icon--tasks,
.block-icon--jobs,
.metric-icon--activity{color:#2563eb;background:#eff6ff}
.block-icon--events{color:#7c3aed;background:#f5f3ff}
.block-icon--danger,
.metric-icon--alert{color:#dc2626;background:#fef2f2}

.account-detail-page .subcard.account-disclosure-card > summary{
  margin:-16px -16px 0;
  padding:12px 16px;
}

.account-detail-page .details-card.account-disclosure-card > summary,
.account-detail-page .card.account-disclosure-card > summary{
  margin:-20px -20px 0;
  padding:13px 20px;
}

.account-detail-page .account-disclosure-card > summary::after{
  width:7px;
  height:7px;
  border-width:1.5px;
}

.account-disclosure-hint{
  min-height:20px;
  padding:2px 7px;
  background:#f3f4f6;
  color:#8b95a1;
  font-size:11px;
  font-weight:500;
}

.account-disclosure-body{
  padding-top:12px;
}

.account-metric-grid{
  gap:10px;
}

.account-metric-card{
  min-height:86px;
  padding:12px;
  border-color:#edf0f5;
  border-radius:12px;
  background:#fff;
  box-shadow:var(--shadow-soft);
}

.metric-card-head{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.account-metric-card .stat-label{
  min-width:0;
  color:#6b7280;
  font-size:12px;
  font-weight:500;
  line-height:1.25;
}

.account-metric-card .stat-value{
  margin-top:8px;
  color:#111827;
  font-size:22px;
  line-height:1.15;
  font-weight:560;
  letter-spacing:0;
  word-break:break-word;
}

.account-metric-card .stat-note{
  margin-top:5px;
  color:#9ca3af;
  font-size:12px;
  line-height:1.35;
}

.account-metric-card--warn .stat-value{
  color:#dc2626;
}

.account-filter-card{
  padding:14px;
  margin-bottom:12px !important;
}

.account-filter-head{
  margin-bottom:10px;
}

.account-filter-toolbar{
  gap:8px !important;
}

.account-filter-toolbar input,
.account-filter-toolbar select{
  min-height:36px;
}

.account-table-wrap{
  border-radius:12px;
  overflow:auto;
}

.account-detail-page .data-table{
  min-width:820px;
}

.account-detail-page .data-table th,
.account-detail-page .data-table td{
  padding:10px 11px;
  font-size:13px;
  line-height:1.4;
}

.account-detail-page .data-table th{
  color:#8b95a1;
  font-size:11px;
  font-weight:500;
  letter-spacing:0;
  text-transform:none;
  background:#fbfcfd;
}

.account-detail-page .data-table td{
  border-color:#f1f3f7;
}

.account-detail-page .data-table tbody tr:hover td{
  background:#f9fbff;
}

.cell-title{
  color:#374151;
  font-size:13px;
  font-weight:560;
}

.cell-subtitle,
.help-text,
.empty-state{
  color:#8b95a1;
}

.account-toggle-row,
.account-inline-status{
  border-color:#edf0f5;
  border-radius:10px;
  background:#fbfcfd;
}

.account-toggle-row{
  padding:10px;
}

.account-toggle-row strong{
  font-weight:560;
}

.account-form-grid{
  gap:10px;
}

.template-editor-grid{
  gap:14px;
}

.account-template-editor{
  padding:16px;
}

.template-toolbar{
  gap:4px;
  padding:5px;
  border-color:#edf0f5;
  border-radius:10px;
  background:#f9fafb;
}

.template-toolbar button{
  min-height:30px;
  padding:5px 8px;
  border-radius:7px;
  font-size:12px;
  font-weight:500;
}

.template-editor-form #template_textarea{
  min-height:360px;
  border-radius:10px;
  font-size:13px;
  line-height:1.55;
}

.template-preview-pane .preview-box{
  min-height:408px;
  border-radius:10px;
  background:#fbfcfd;
}

.preview-box,
.code-box{
  border-color:#edf0f5;
  border-radius:10px;
  background:#fbfcfd;
}

.task-row{
  padding:10px 11px;
  border-color:#edf0f5;
  border-radius:10px;
  background:#fbfcfd;
}

.target-schedule-details summary{
  color:#2563eb;
  font-weight:500;
}

.live-worker-card{
  padding:14px;
  border-radius:12px;
  background:#fff;
}

.account-danger-zone{
  border-color:#fee2e2 !important;
  background:#fff;
}

.account-danger-card{
  border-color:#fee2e2;
  background:#fffafa;
}

html[data-theme="dark"] body{
  background:#151d2e;
}

html[data-theme="dark"] .account-detail-hero,
html[data-theme="dark"] .account-detail-tabs,
html[data-theme="dark"] .account-guide-card,
html[data-theme="dark"] .account-block,
html[data-theme="dark"] .account-filter-card,
html[data-theme="dark"] .account-metric-card,
html[data-theme="dark"] .account-table-wrap,
html[data-theme="dark"] .live-worker-card{
  border-color:rgba(166,180,203,.20);
  background:#1b263a;
}

html[data-theme="dark"] .account-tab-bar{
  border-color:rgba(166,180,203,.20);
  background:rgba(27,38,58,.96);
}

html[data-theme="dark"] .account-tab-bar .tab-btn:hover{
  background:rgba(255,255,255,.04);
  color:#e5e7eb;
}

html[data-theme="dark"] .account-tab-bar .tab-btn.is-active{
  background:rgba(59,130,246,.16);
  color:#93c5fd;
}

html[data-theme="dark"] .quick-stat,
html[data-theme="dark"] .account-toggle-row,
html[data-theme="dark"] .account-inline-status,
html[data-theme="dark"] .preview-box,
html[data-theme="dark"] .code-box,
html[data-theme="dark"] .task-row,
html[data-theme="dark"] .template-toolbar{
  border-color:rgba(166,180,203,.20);
  background:#253148;
}

html[data-theme="dark"] .account-metric-card .stat-value,
html[data-theme="dark"] .account-hero-title-row h1,
html[data-theme="dark"] .cell-title{
  color:#f8fafc;
}

html[data-theme="dark"] .account-detail-page .data-table th{
  background:#253148;
  color:#94a3b8;
}

html[data-theme="dark"] .account-detail-page .data-table td{
  border-color:rgba(166,180,203,.16);
}

html[data-theme="dark"] .account-detail-page .details-card,
html[data-theme="dark"] .account-detail-page .subcard,
html[data-theme="dark"] .account-detail-page .table-wrap,
html[data-theme="dark"] .account-empty-card,
html[data-theme="dark"] .account-check-result-card,
html[data-theme="dark"] .details-card--nested,
html[data-theme="dark"] .guide-item{
  border-color:var(--line);
  background:var(--surface);
  color:var(--text);
}

html[data-theme="dark"] .account-detail-page input,
html[data-theme="dark"] .account-detail-page textarea,
html[data-theme="dark"] .account-detail-page select{
  border-color:var(--line);
  background:var(--surface-2);
  color:var(--text);
}

html[data-theme="dark"] .account-detail-page input:focus,
html[data-theme="dark"] .account-detail-page textarea:focus,
html[data-theme="dark"] .account-detail-page select:focus{
  background:var(--surface-3);
}

html[data-theme="dark"] .account-detail-page .data-table tbody tr:hover td{
  background:rgba(96,165,250,.08);
}

html[data-theme="dark"] .account-health-chip,
html[data-theme="dark"] .account-disclosure-hint,
html[data-theme="dark"] .tab-count{
  border-color:var(--line);
  background:var(--surface-3);
  color:var(--muted);
}

html[data-theme="dark"] .account-health-chip--ok{
  border-color:rgba(52,211,153,.24);
  background:var(--success-soft);
  color:var(--success);
}

html[data-theme="dark"] .account-health-chip--danger{
  border-color:rgba(248,113,113,.26);
  background:var(--danger-soft);
  color:var(--danger);
}

html[data-theme="dark"] .tab-btn.is-active .tab-count{
  background:rgba(96,165,250,.18);
  color:#93c5fd;
}

html[data-theme="dark"] .account-metric-card .stat-label,
html[data-theme="dark"] .account-metric-card .stat-note,
html[data-theme="dark"] .account-detail-page .cell-subtitle,
html[data-theme="dark"] .account-detail-page .help-text,
html[data-theme="dark"] .account-detail-page .empty-state,
html[data-theme="dark"] .account-detail-page label{
  color:var(--muted);
}

html[data-theme="dark"] .block-icon,
html[data-theme="dark"] .metric-icon{
  background:var(--primary-soft);
  color:var(--primary);
}

html[data-theme="dark"] .block-icon--redirect,
html[data-theme="dark"] .block-icon--template,
html[data-theme="dark"] .block-icon--editor,
html[data-theme="dark"] .block-icon--history,
html[data-theme="dark"] .block-icon--events,
html[data-theme="dark"] .metric-icon--template,
html[data-theme="dark"] .metric-icon--copy,
html[data-theme="dark"] .metric-icon--history,
html[data-theme="dark"] .metric-icon--eye{
  background:var(--violet-soft);
  color:var(--violet);
}

html[data-theme="dark"] .block-icon--profile,
html[data-theme="dark"] .block-icon--health,
html[data-theme="dark"] .block-icon--live,
html[data-theme="dark"] .block-icon--inbox,
html[data-theme="dark"] .metric-icon--shield,
html[data-theme="dark"] .metric-icon--check,
html[data-theme="dark"] .metric-icon--inbox{
  background:var(--success-soft);
  color:var(--success);
}

html[data-theme="dark"] .block-icon--photo,
html[data-theme="dark"] .block-icon--commands,
html[data-theme="dark"] .metric-icon--clock,
html[data-theme="dark"] .metric-icon--calendar{
  background:var(--warning-soft);
  color:var(--warning);
}

html[data-theme="dark"] .block-icon--danger,
html[data-theme="dark"] .metric-icon--alert{
  border-color:rgba(248,113,113,.28);
  background:var(--danger-soft);
  color:var(--danger);
}

html[data-theme="dark"] .account-danger-zone,
html[data-theme="dark"] .account-danger-card{
  border-color:rgba(248,113,113,.28);
  background:var(--danger-soft);
  color:var(--text);
}

@media (max-width: 1279px){
  .account-metric-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 1023px){
  .accounts-folder-workbench,
  .activity-log-layout{
    grid-template-columns:1fr;
  }

  .activity-log-filter-card{
    position:static;
  }

  .folder-action-grid--channel{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .account-detail-hero{
    flex-direction:column;
  }

  .account-hero-actions{
    justify-content:flex-start;
    max-width:none;
  }
}

@media (max-width: 760px){
  .account-detail-page{
    gap:12px;
  }

  .account-detail-hero{
    padding:14px;
  }

  .account-hero-main{
    gap:12px;
  }

  .account-detail-hero .avatar-xl{
    width:54px;
    height:54px;
    border-radius:14px;
  }

  .account-hero-title-row h1{
    font-size:22px;
  }

  .account-hero-actions .btn,
  .account-hero-actions button{
    flex:1 1 150px;
  }

  .account-detail-tabs .tab-panel{
    padding:14px;
  }

  .account-tab-bar{
    top:72px;
  }

  .account-tab-bar .tab-btn{
    min-height:40px;
    padding:10px 13px 9px;
  }

  .account-metric-grid{
    grid-template-columns:1fr;
  }

  .account-metric-card{
    min-height:auto;
  }

  .task-row,
  .task-row-meta{
    align-items:flex-start;
    flex-direction:column;
    text-align:left;
  }

  .template-editor-form #template_textarea{
    min-height:300px;
  }

  .template-preview-pane .preview-box{
    min-height:240px;
  }
}

/* Account detail alignment micro-fixes */
.account-guide-card > summary,
.account-block .section-title h3,
.account-detail-page .account-disclosure-card > summary{
  align-items:center;
  line-height:1.2;
}

.account-block .section-title h3{
  display:flex;
  min-height:22px;
}

.account-detail-page .account-disclosure-card > summary > span:not(.block-icon):not(.account-disclosure-hint),
.account-guide-card > summary > span:not(.block-icon){
  display:inline-flex;
  align-items:center;
  min-height:22px;
}

.block-icon,
.metric-icon{
  position:relative;
  line-height:0;
  vertical-align:middle;
}

.block-icon::before,
.metric-icon::before{
  position:static;
  inset:auto;
  left:auto;
  top:auto;
  border:0;
  border-radius:0;
  box-shadow:none;
  transform:none;
}

.account-disclosure-hint{
  align-self:center;
  line-height:1;
}

.account-detail-tabs{
  overflow:hidden;
}

.account-tab-bar{
  position:relative;
  top:auto;
  z-index:1;
  align-items:stretch;
  min-height:44px;
  overflow-x:auto;
  overflow-y:hidden;
}

.account-tab-bar .tab-btn{
  position:relative;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 16px;
  border-bottom:0;
  line-height:1.2;
}

.account-tab-bar .tab-btn::after{
  content:"";
  position:absolute;
  left:12px;
  right:12px;
  bottom:0;
  height:2px;
  border-radius:999px 999px 0 0;
  background:transparent;
}

.account-tab-bar .tab-btn.is-active{
  border-bottom:0;
}

.account-tab-bar .tab-btn.is-active::after{
  background:#3b82f6;
}

.account-detail-tabs .tab-panel{
  padding-top:18px;
}

@media (max-width: 760px){
  .folder-summary-grid,
  .folder-task-strip,
  .folder-action-grid,
  .folder-action-grid--channel,
  .activity-log-row{
    grid-template-columns:1fr;
  }

  .folder-summary-metric--wide{
    grid-column:auto;
  }

  .folder-summary-head{
    flex-direction:column;
  }

  .account-tab-bar{
    top:auto;
    min-height:42px;
  }

  .account-tab-bar .tab-btn{
    min-height:42px;
    padding:0 13px;
  }
}

body.login-body{
  min-height:100vh;
  overflow:hidden;
  background:
    linear-gradient(135deg, rgba(59,130,246,.10) 0%, transparent 32%),
    linear-gradient(225deg, rgba(139,92,246,.08) 0%, transparent 34%),
    linear-gradient(180deg, #fbfcff 0%, #eef4ff 48%, #f6f7f9 100%);
}

body.login-body::before{
  content:"";
  display:block;
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.56), transparent 22%, transparent 78%, rgba(255,255,255,.44)),
    linear-gradient(180deg, rgba(255,255,255,.70), rgba(255,255,255,0));
}

.login-page{
  position:relative;
  z-index:1;
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:32px 16px;
}

.login-card{
  position:relative;
  width:min(100%, 440px);
  padding:28px;
  overflow:hidden;
  border:1px solid rgba(217,224,234,.86);
  border-radius:18px;
  background:rgba(255,255,255,.92);
  color:var(--text);
  box-shadow:0 1px 2px rgba(15,23,42,.04), 0 26px 70px rgba(37,99,235,.12);
  backdrop-filter:blur(18px);
}

.login-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:3px;
  background:linear-gradient(90deg, #3b82f6, #8b5cf6, #10b981);
}

.login-brand{
  display:flex;
  align-items:center;
  gap:13px;
  min-width:0;
}

.login-brand-mark{
  display:grid;
  place-items:center;
  width:52px;
  height:52px;
  flex:0 0 auto;
  border-radius:14px;
  background:linear-gradient(135deg, #2563eb 0%, #8b5cf6 58%, #10b981 100%);
  color:#fff;
  box-shadow:0 14px 32px rgba(59,130,246,.20);
  font-family:"Bungee",Inter,sans-serif;
  font-size:17px;
  line-height:1;
  letter-spacing:0;
}

.login-brand-copy{
  min-width:0;
}

.login-brand-name{
  color:var(--heading);
  font-family:"Bungee",Inter,sans-serif;
  font-size:20px;
  line-height:1;
  letter-spacing:0;
}

.login-brand-caption{
  margin-top:5px;
  color:var(--muted);
  font-size:12px;
  line-height:1.25;
}

.login-heading{
  margin-top:28px;
}

.login-heading h1{
  margin:0;
  color:var(--heading);
  font-size:26px;
  line-height:1.16;
  font-weight:650;
  letter-spacing:0;
}

.login-heading p{
  margin:8px 0 0;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}

.login-form{
  display:flex;
  flex-direction:column;
  gap:16px;
  margin-top:22px;
}

.login-field label{
  margin-bottom:8px;
  color:var(--muted);
}

.login-field input{
  min-height:46px;
  border-radius:11px;
  background:#f8fafc;
}

.login-submit{
  width:100%;
  min-height:44px;
  border-radius:11px;
  background:#2563eb;
  box-shadow:0 14px 30px rgba(37,99,235,.22);
  font-weight:600;
}

.login-submit:hover{
  background:#1d4ed8;
}

.login-error{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-top:18px;
  padding:11px 12px;
  border:1px solid rgba(239,68,68,.22);
  border-radius:12px;
  background:var(--danger-soft);
  color:#b91c1c;
  font-size:13px;
  line-height:1.4;
}

.login-error-icon{
  position:relative;
  width:18px;
  height:18px;
  flex:0 0 auto;
  margin-top:1px;
  border-radius:999px;
  background:rgba(239,68,68,.14);
  color:var(--danger);
}

.login-error-icon::before,
.login-error-icon::after{
  content:"";
  position:absolute;
  left:8px;
  width:2px;
  border-radius:999px;
  background:currentColor;
}

.login-error-icon::before{
  top:4px;
  height:7px;
}

.login-error-icon::after{
  bottom:4px;
  height:2px;
}

.login-footer{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid var(--line);
  color:var(--muted-2);
  font-size:12px;
  line-height:1.45;
  text-align:center;
}

html[data-theme="dark"] body.login-body{
  background:
    linear-gradient(135deg, rgba(96,165,250,.12) 0%, transparent 34%),
    linear-gradient(225deg, rgba(167,139,250,.10) 0%, transparent 34%),
    linear-gradient(180deg, #111827 0%, #151d2e 52%, #101827 100%);
}

html[data-theme="dark"] body.login-body::before{
  background:
    linear-gradient(90deg, rgba(255,255,255,.05), transparent 24%, transparent 76%, rgba(255,255,255,.04)),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0));
}

html[data-theme="dark"] .login-card{
  border-color:rgba(166,180,203,.20);
  background:rgba(27,38,58,.92);
  box-shadow:0 30px 80px rgba(2,6,23,.44);
}

html[data-theme="dark"] .login-field input{
  border-color:var(--line);
  background:var(--surface-2);
  color:var(--text);
}

html[data-theme="dark"] .login-error{
  border-color:rgba(248,113,113,.26);
  background:var(--danger-soft);
  color:#fecaca;
}

html[data-theme="dark"] .login-footer{
  border-top-color:var(--line);
}

@media (max-width: 520px){
  body.login-body{
    overflow:auto;
  }

  .login-page{
    align-items:start;
    padding:22px 14px;
  }

  .login-card{
    padding:22px;
    border-radius:14px;
  }

  .login-brand-mark{
    width:46px;
    height:46px;
    border-radius:12px;
    font-size:15px;
  }

  .login-brand-name{
    font-size:18px;
  }

  .login-heading{
    margin-top:24px;
  }

  .login-heading h1{
    font-size:23px;
  }
}

/* Accounts folder cleanup */
.accounts-folder-workbench--compact{
  display:block;
}

.folder-summary-card--compact,
.folder-empty-hint--compact{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height:72px;
  padding:14px 16px;
  border-radius:12px;
  box-shadow:0 8px 22px rgba(15,23,42,.045);
}

.folder-empty-hint--compact{
  justify-content:flex-start;
}

.folder-summary-title{
  display:flex;
  align-items:center;
  gap:11px;
  min-width:210px;
}

.folder-summary-title h2,
.folder-empty-hint--compact h2{
  margin:0;
  color:#111827;
  font-size:18px;
  line-height:1.2;
  font-weight:560;
}

.folder-summary-dot{
  width:12px;
  height:12px;
  flex:0 0 auto;
  border-radius:999px;
  background:var(--folder-color, #3b82f6);
  box-shadow:0 0 0 5px color-mix(in srgb, var(--folder-color, #3b82f6) 12%, transparent);
}

.folder-summary-chips{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  flex:1 1 auto;
  flex-wrap:wrap;
  min-width:0;
}

.folder-summary-chip{
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-height:26px;
  max-width:260px;
  overflow:hidden;
  padding:4px 9px;
  border:1px solid #edf0f5;
  border-radius:999px;
  background:#fbfcfd;
  color:#5f6b7a;
  font-size:12px;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.folder-summary-chip strong{
  color:#111827;
  font-weight:560;
}

.folder-summary-chip--success{
  border-color:rgba(16,185,129,.20);
  background:#ecfdf5;
  color:#047857;
}

.folder-summary-chip--warn{
  border-color:rgba(245,158,11,.24);
  background:#fffbeb;
  color:#b45309;
}

.folder-summary-chip--neutral{
  color:#6b7280;
}

.folder-workbench-main{
  display:flex;
  align-items:center;
  gap:14px;
  flex:1 1 auto;
  min-width:0;
}

.folder-workbench-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  flex:0 1 auto;
  flex-wrap:wrap;
  min-width:260px;
}

.folder-action-popover{
  position:relative;
  flex:0 0 auto;
}

.folder-pause-form{
  margin:0;
  display:inline-flex;
  flex:0 0 auto;
}

.folder-action-trigger{
  list-style:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:7px 10px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fff;
  color:#374151;
  font-size:13px;
  line-height:1.2;
  font-weight:500;
  white-space:nowrap;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}

.folder-action-trigger::-webkit-details-marker{
  display:none;
}

.folder-action-trigger:hover,
.folder-action-popover[open] .folder-action-trigger{
  border-color:color-mix(in srgb, var(--folder-color, #3b82f6) 28%, #dbeafe);
  background:color-mix(in srgb, var(--folder-color, #3b82f6) 8%, #f8fbff);
  color:#1d4ed8;
}

.folder-action-trigger--primary{
  border-color:#2563eb;
  background:#2563eb;
  color:#fff;
}

.folder-action-trigger--primary:hover,
.folder-action-popover[open] .folder-action-trigger--primary{
  border-color:#1d4ed8;
  background:#1d4ed8;
  color:#fff;
}

.folder-action-trigger--danger{
  border-color:rgba(220,38,38,.26);
  background:#fef2f2;
  color:#b91c1c;
}

.folder-action-trigger--danger:hover{
  border-color:rgba(220,38,38,.38);
  background:#fee2e2;
  color:#991b1b;
}

.folder-action-trigger--resume{
  border-color:rgba(16,185,129,.28);
  background:#ecfdf5;
  color:#047857;
}

.folder-action-trigger--resume:hover{
  border-color:rgba(16,185,129,.40);
  background:#d1fae5;
  color:#065f46;
}

.folder-action-panel{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:60;
  width:min(360px, calc(100vw - 32px));
  padding:12px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#fff;
  box-shadow:0 18px 45px rgba(15,23,42,.14);
}

.folder-action-popover--wide .folder-action-panel{
  width:min(720px, calc(100vw - 32px));
}

.folder-action-form{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
}

.folder-action-form--channel{
  display:grid;
  grid-template-columns:minmax(220px,1fr) minmax(104px,.34fr) minmax(104px,.34fr) minmax(190px,.62fr) auto;
  align-items:end;
  gap:8px;
}

.folder-action-note{
  margin:0;
  color:#6b7280;
  font-size:12px;
  line-height:1.45;
}

.accounts-quick-filters{
  display:flex;
  align-items:center;
  gap:6px;
  flex:1 1 auto;
  flex-wrap:wrap;
  min-width:240px;
}

.account-quick-filter{
  min-height:32px;
  padding:6px 10px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fff;
  color:#6b7280;
  font-size:12px;
  line-height:1.2;
  font-weight:500;
  box-shadow:none;
}

.account-quick-filter:hover{
  background:#f8fafc;
  color:#374151;
}

.account-quick-filter.is-active{
  border-color:#bfdbfe;
  background:#eff6ff;
  color:#1d4ed8;
}

.accounts-advanced-filter{
  position:relative;
  flex:0 0 auto;
}

.accounts-advanced-filter > summary{
  list-style:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
}

.accounts-advanced-filter > summary::-webkit-details-marker{
  display:none;
}

.accounts-advanced-filter-panel{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:55;
  display:flex;
  align-items:end;
  gap:8px;
  width:min(360px, calc(100vw - 32px));
  padding:12px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#fff;
  box-shadow:0 18px 45px rgba(15,23,42,.14);
}

.accounts-advanced-filter-panel .selected-action-field{
  flex:1 1 auto;
}

.accounts-actions-workbench{
  overflow:visible;
}

.accounts-actions-workbench > summary{
  min-height:54px;
  padding:13px 16px;
}

.accounts-actions-panel{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  padding:12px;
  border-top:1px solid #f1f3f7;
  background:#fbfcfd;
}

.accounts-action-scope{
  min-width:0;
  padding:12px;
  border:1px solid #edf0f5;
  border-radius:12px;
  background:#fff;
}

.accounts-action-scope--muted{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height:116px;
  background:#fbfcfd;
}

.accounts-action-scope-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.accounts-action-scope-head h3,
.folder-action-card-head h3{
  margin:0;
  color:#374151;
  font-size:14px;
  line-height:1.25;
  font-weight:560;
}

.accounts-action-scope-kicker{
  display:block;
  margin-bottom:2px;
  color:#3b82f6;
  font-size:11px;
  font-weight:500;
}

.accounts-action-muted-text{
  margin:0;
  color:#8b95a1;
  font-size:13px;
  line-height:1.45;
}

.folder-actions-compact{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.folder-action-card{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
  padding:10px;
  border:1px solid #edf0f5;
  border-radius:10px;
  background:#fbfdff;
}

.folder-action-card--channel{
  grid-column:1 / -1;
}

.folder-action-card .btn{
  margin-top:0;
}

.folder-action-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-width:0;
}

.folder-action-card-head > span{
  min-width:0;
  overflow:hidden;
  color:#8b95a1;
  font-size:12px;
  line-height:1.3;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.folder-action-card-head .pill{
  margin-left:4px;
}

.folder-channel-row{
  display:grid;
  grid-template-columns:minmax(220px,1fr) minmax(104px,.34fr) minmax(104px,.34fr) minmax(210px,.62fr) auto;
  gap:8px;
  align-items:end;
}

.folder-field{
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
}

.folder-field > span,
.redirect-current{
  color:#8b95a1;
  font-size:12px;
  font-weight:500;
  line-height:1.35;
}

.folder-field-hint{
  color:#8b95a1;
  font-size:12px;
  line-height:1.4;
}

.folder-field input,
.folder-field select,
.folder-field textarea{
  width:100%;
  min-width:0;
}

.folder-field--first-run,
.folder-first-run-input{
  min-width:200px;
}

.folder-action-card textarea,
.accounts-selected-grid textarea{
  min-height:62px;
  resize:vertical;
}

.redirect-control-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.redirect-segmented{
  display:inline-flex;
  align-items:center;
  gap:3px;
  min-width:0;
  padding:3px;
  border:1px solid #e5e7eb;
  border-radius:9px;
  background:#f3f4f6;
}

.redirect-choice{
  position:relative;
  display:inline-flex;
  min-width:0;
}

.redirect-choice input{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  min-height:0;
  margin:0;
  opacity:0;
}

.redirect-choice span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:5px 9px;
  border-radius:7px;
  color:#6b7280;
  font-size:12px;
  font-weight:500;
  line-height:1.2;
  cursor:pointer;
  white-space:nowrap;
}

.redirect-choice input:checked + span{
  background:#fff;
  color:#1d4ed8;
  box-shadow:0 1px 2px rgba(15,23,42,.08);
}

.redirect-choice--muted input:not(:checked) + span{
  color:#9ca3af;
}

.accounts-selected-bulk-form{
  margin:0;
}

.accounts-selected-grid{
  display:grid;
  grid-template-columns:minmax(140px,.7fr) minmax(170px,.78fr) minmax(250px,1fr) minmax(240px,1.1fr);
  gap:10px;
  align-items:start;
}

.selected-template-field{
  grid-column:auto;
}

.accounts-actions-panel .accounts-bulk-actions{
  margin-top:10px;
}

.accounts-actions-panel .accounts-bulk-note{
  margin-top:8px;
}

.accounts-folder-action-badge{
  background:color-mix(in srgb, var(--primary-soft) 58%, #fff);
}

.account-card-note span{
  padding:8px 10px;
}

html[data-theme="dark"] .folder-summary-card--compact,
html[data-theme="dark"] .folder-empty-hint--compact,
html[data-theme="dark"] .accounts-action-scope{
  border-color:#31415c;
  background:#1a2234;
  box-shadow:0 14px 30px rgba(7,12,22,.22);
}

html[data-theme="dark"] .folder-summary-title h2,
html[data-theme="dark"] .folder-empty-hint--compact h2,
html[data-theme="dark"] .accounts-action-scope-head h3,
html[data-theme="dark"] .folder-action-card-head h3,
html[data-theme="dark"] .folder-summary-chip strong{
  color:#f8fafc;
}

html[data-theme="dark"] .folder-summary-chip,
html[data-theme="dark"] .folder-action-card,
html[data-theme="dark"] .redirect-segmented,
html[data-theme="dark"] .accounts-actions-panel{
  border-color:#31415c;
  background:#202b3f;
}

html[data-theme="dark"] .folder-action-trigger,
html[data-theme="dark"] .account-quick-filter,
html[data-theme="dark"] .folder-action-panel,
html[data-theme="dark"] .accounts-advanced-filter-panel{
  border-color:#31415c;
  background:#202b3f;
  color:#cbd5e1;
}

html[data-theme="dark"] .folder-action-trigger:hover,
html[data-theme="dark"] .folder-action-popover[open] .folder-action-trigger,
html[data-theme="dark"] .account-quick-filter:hover,
html[data-theme="dark"] .account-quick-filter.is-active{
  border-color:#3b82f6;
  background:rgba(59,130,246,.16);
  color:#bfdbfe;
}

html[data-theme="dark"] .folder-action-trigger--primary,
html[data-theme="dark"] .folder-action-trigger--primary:hover,
html[data-theme="dark"] .folder-action-popover[open] .folder-action-trigger--primary{
  border-color:#3b82f6;
  background:#2563eb;
  color:#fff;
}

html[data-theme="dark"] .folder-action-trigger--danger{
  border-color:rgba(248,113,113,.32);
  background:rgba(239,68,68,.14);
  color:#fca5a5;
}

html[data-theme="dark"] .folder-action-trigger--danger:hover{
  border-color:rgba(248,113,113,.48);
  background:rgba(239,68,68,.22);
  color:#fecaca;
}

html[data-theme="dark"] .folder-action-trigger--resume{
  border-color:rgba(52,211,153,.30);
  background:rgba(16,185,129,.14);
  color:#6ee7b7;
}

html[data-theme="dark"] .folder-action-trigger--resume:hover{
  border-color:rgba(52,211,153,.48);
  background:rgba(16,185,129,.22);
  color:#a7f3d0;
}

html[data-theme="dark"] .accounts-actions-panel{
  border-top-color:#31415c;
}

html[data-theme="dark"] .accounts-action-scope--muted{
  background:#202b3f;
}

html[data-theme="dark"] .folder-action-card{
  background:#253148;
}

html[data-theme="dark"] .folder-summary-chip{
  color:#cbd5e1;
}

html[data-theme="dark"] .folder-summary-chip--success{
  border-color:rgba(52,211,153,.24);
  background:rgba(16,185,129,.14);
  color:#34d399;
}

html[data-theme="dark"] .folder-summary-chip--warn{
  border-color:rgba(251,191,36,.24);
  background:rgba(245,158,11,.14);
  color:#fbbf24;
}

html[data-theme="dark"] .folder-field > span,
html[data-theme="dark"] .folder-field-hint,
html[data-theme="dark"] .redirect-current,
html[data-theme="dark"] .folder-action-card-head > span,
html[data-theme="dark"] .accounts-action-muted-text,
html[data-theme="dark"] .folder-action-note{
  color:#94a3b8;
}

html[data-theme="dark"] .redirect-choice span{
  color:#cbd5e1;
}

html[data-theme="dark"] .redirect-choice input:checked + span{
  background:#1a2234;
  color:#bfdbfe;
}

html[data-theme="dark"] .accounts-folder-action-badge{
  background:rgba(59,130,246,.16);
}

@media (max-width: 1180px){
  .accounts-actions-panel{
    grid-template-columns:1fr;
  }

  .accounts-selected-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 900px){
  .folder-summary-card--compact,
  .folder-empty-hint--compact{
    align-items:flex-start;
    flex-direction:column;
  }

  .folder-workbench-main{
    align-items:flex-start;
    flex-direction:column;
    width:100%;
  }

  .folder-workbench-actions{
    justify-content:flex-start;
    width:100%;
    min-width:0;
  }

  .folder-summary-title{
    min-width:0;
  }

  .folder-summary-chips{
    justify-content:flex-start;
  }

  .folder-channel-row{
    grid-template-columns:minmax(0,1fr) repeat(2,minmax(96px,.45fr)) minmax(200px,.9fr) auto;
  }

  .folder-action-form--channel{
    grid-template-columns:minmax(0,1fr) repeat(2,minmax(96px,.45fr)) minmax(200px,.9fr) auto;
  }

  .folder-actions-compact{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  .accounts-actions-workbench > summary{
    align-items:flex-start;
    flex-direction:column;
  }

  .accounts-actions-panel{
    padding:10px;
  }

  .accounts-action-scope,
  .folder-action-card{
    padding:10px;
  }

  .folder-channel-row,
  .folder-action-form--channel,
  .accounts-selected-grid{
    grid-template-columns:1fr;
  }

  .folder-field--first-run,
  .folder-first-run-input{
    min-width:0;
  }

  .redirect-control-row{
    align-items:flex-start;
    flex-direction:column;
  }

  .redirect-segmented{
    width:100%;
    overflow-x:auto;
  }

  .redirect-choice{
    flex:1 0 auto;
  }

  .accounts-actions-panel .accounts-bulk-actions .btn{
    flex:1 1 150px;
  }

  .folder-action-popover,
  .folder-action-trigger{
    width:100%;
  }

  .folder-action-panel,
  .folder-action-popover--wide .folder-action-panel,
  .accounts-advanced-filter-panel{
    position:static;
    width:100%;
    margin-top:8px;
  }

  .accounts-quick-filters,
  .accounts-advanced-filter,
  .accounts-count-pills{
    width:100%;
  }

  .accounts-advanced-filter > summary{
    width:100%;
    justify-content:center;
  }

  .accounts-advanced-filter-panel{
    align-items:stretch;
    flex-direction:column;
  }
}

.selected-actions-bar[hidden]{
  display:none !important;
}

.selected-actions-bar{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  padding:10px 12px;
  border:1px solid #dbeafe;
  border-radius:12px;
  background:linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  box-shadow:0 10px 24px rgba(37,99,235,.08);
}

.selected-actions-summary{
  display:flex;
  align-items:flex-start;
  flex-direction:column;
  gap:1px;
  flex:0 0 auto;
  min-width:136px;
}

.selected-actions-summary strong{
  color:#1d4ed8;
  font-size:14px;
  line-height:1.2;
  font-weight:560;
}

.selected-actions-summary span{
  color:#6b7280;
  font-size:12px;
  line-height:1.25;
  white-space:nowrap;
}

.selected-actions-controls{
  display:flex;
  align-items:end;
  gap:8px;
  flex:1 1 auto;
  flex-wrap:wrap;
  min-width:0;
}

.selected-action-field{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}

.selected-action-field > span{
  color:#8b95a1;
  font-size:11px;
  font-weight:500;
  line-height:1.25;
}

.selected-inline-label{
  align-self:center;
  color:#8b95a1;
  font-size:11px;
  font-weight:500;
  line-height:1.25;
}

.selected-action-field input,
.selected-action-field select{
  min-height:34px;
  padding:7px 9px;
  border-radius:8px;
  font-size:13px;
}

.selected-action-field--redirect{
  flex:1 1 150px;
  max-width:190px;
}

.selected-action-field--folder{
  flex:1 1 180px;
  max-width:240px;
}

.selected-action-field--template{
  flex:1 1 220px;
  max-width:300px;
}

.selected-redirect-segmented{
  min-height:34px;
  margin-bottom:0;
}

.selected-actions-controls .btn,
.selected-actions-controls button{
  min-height:34px;
  padding:7px 10px;
  white-space:nowrap;
}

html[data-theme="dark"] .selected-actions-bar{
  border-color:#31415c;
  background:linear-gradient(180deg, #1a2234 0%, #202b3f 100%);
  box-shadow:0 16px 34px rgba(7,12,22,.26);
}

html[data-theme="dark"] .selected-actions-summary strong{
  color:#bfdbfe;
}

html[data-theme="dark"] .selected-actions-summary span,
html[data-theme="dark"] .selected-action-field > span,
html[data-theme="dark"] .selected-inline-label{
  color:#94a3b8;
}

@media (max-width: 980px){
  .selected-actions-bar{
    align-items:flex-start;
    flex-direction:column;
  }

  .selected-actions-summary{
    min-width:0;
  }

  .selected-actions-controls{
    width:100%;
  }
}

@media (max-width: 760px){
  .selected-actions-controls{
    align-items:stretch;
  }

  .selected-action-field--redirect,
  .selected-action-field--folder,
  .selected-action-field--template,
  .selected-redirect-segmented,
  .selected-actions-controls .btn,
  .selected-actions-controls button{
    flex:1 1 100%;
    max-width:none;
    width:100%;
  }
}

.send-now-preview-card{
  display:grid;
  gap:16px;
}

.send-now-preview-grid{
  margin:0;
}

.send-now-reason-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

.send-now-warning{
  border-color:rgba(245,158,11,.28);
  background:var(--warning-soft);
}

.send-now-confirm-form{
  margin:0;
}

.jobs-stats-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
}

.jobs-quick-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:16px 0;
}

.jobs-filter-card,
.jobs-list-card{
  margin-top:16px;
}

.jobs-filter-form{
  display:grid;
  gap:12px;
}

.jobs-filter-card input[type="date"]{
  flex:0 1 170px;
}

.jobs-table th,
.jobs-table td{
  vertical-align:top;
}

.jobs-table th:nth-child(1){min-width:150px}
.jobs-table th:nth-child(2){min-width:180px}
.jobs-table th:nth-child(3){min-width:190px}
.jobs-table th:nth-child(4){min-width:220px}
.jobs-table th:nth-child(6){min-width:220px}
.jobs-table th:nth-child(7){min-width:160px}

.jobs-announcement-preview{
  max-width:280px;
  white-space:normal;
}

.jobs-debug-details{
  margin-top:8px;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}

.jobs-debug-details summary{
  cursor:pointer;
  color:var(--muted);
}

.jobs-debug-details summary::-webkit-details-marker{
  display:none;
}

.jobs-debug-details[open]{
  display:grid;
  gap:4px;
}

.jobs-raw-error{
  max-width:380px;
  white-space:pre-wrap;
  word-break:break-word;
}

.jobs-row-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
}

.jobs-row-actions form{
  margin:0;
}

.jobs-table .account-folder-chip{
  margin-top:8px;
}

@media (max-width: 1100px){
  .jobs-stats-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media (max-width: 760px){
  .jobs-stats-grid{
    grid-template-columns:1fr;
  }

  .jobs-filter-card input[type="date"]{
    flex:1 1 100%;
  }

  .jobs-row-actions .btn,
  .jobs-row-actions button{
    width:100%;
  }
}

/* ─── ACCOUNTS: FOLDER TABS ROW ──────────────────────────────────────── */

.accounts-tabs-row{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 18px 18px;
}

.accounts-tabs-strip-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
  border-left:1px solid var(--line);
  padding-left:14px;
}

html[data-theme="dark"] .accounts-tabs-strip-actions{
  border-left-color:rgba(255,255,255,.10);
}

/* ─── ACCOUNTS: FOLDER SUMMARY LINE ─────────────────────────────────── */

.folder-summary-line{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:4px;
  margin-top:5px;
  color:var(--muted);
  font-size:13px;
  line-height:1.4;
}

.folder-summary-sep{
  color:var(--line-strong, #d1d5db);
  user-select:none;
}

.folder-summary-badge{
  display:inline-flex;
  align-items:center;
  padding:2px 7px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
}

.folder-summary-badge--ok{
  background:#ecfdf5;
  color:#047857;
}

.folder-summary-badge--warn{
  background:#fffbeb;
  color:#b45309;
}

.folder-summary-badge--paused{
  background:#f3f4f6;
  color:#6b7280;
}

html[data-theme="dark"] .folder-summary-badge--ok{
  background:rgba(16,185,129,.15);
  color:#34d399;
}

html[data-theme="dark"] .folder-summary-badge--warn{
  background:rgba(245,158,11,.15);
  color:#fbbf24;
}

html[data-theme="dark"] .folder-summary-badge--paused{
  background:rgba(255,255,255,.08);
  color:#9ca3af;
}

/* ─── ACCOUNTS: FOLDER "ЕЩЁ" PANEL ──────────────────────────────────── */

.folder-more-panel{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding-top:4px;
  min-width:210px;
}

.folder-more-item-form{
  margin:0;
}

.folder-more-item{
  display:flex;
  align-items:center;
  width:100%;
  padding:9px 10px;
  border-radius:8px;
  background:none;
  border:none;
  border-color:transparent;
  color:var(--text);
  font-size:13px;
  font-weight:500;
  text-align:left;
  cursor:pointer;
  box-shadow:none;
  min-height:36px;
  transition:background .14s ease;
  list-style:none;
}

.folder-more-item:hover{
  background:var(--surface-3, #f3f4f6);
  transform:none;
  filter:none;
}

.folder-more-item--warn{
  color:#b45309;
}

.folder-more-item--ok{
  color:#047857;
}

html[data-theme="dark"] .folder-more-item:hover{
  background:rgba(255,255,255,.07);
}

html[data-theme="dark"] .folder-more-item--warn{
  color:#fbbf24;
}

html[data-theme="dark"] .folder-more-item--ok{
  color:#34d399;
}

.folder-more-nested{
  position:relative;
}

.folder-more-nested > summary{
  list-style:none;
  cursor:pointer;
}

.folder-more-nested > summary::-webkit-details-marker{
  display:none;
}

.folder-more-nested-panel{
  padding:10px 6px 4px;
  border-top:1px solid var(--line, #e5e7eb);
  margin-top:4px;
}

html[data-theme="dark"] .folder-more-nested-panel{
  border-top-color:rgba(255,255,255,.10);
}

/* ─── ACCOUNTS: STATUS CHIPS ─────────────────────────────────────────── */

.account-status-chip{
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-height:20px;
  padding:2px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  white-space:nowrap;
}

.account-status-chip--ready{
  background:#ecfdf5;
  color:#047857;
}

.account-status-chip--setup{
  background:#fffbeb;
  color:#b45309;
}

.account-status-chip--paused{
  background:#f3f4f6;
  color:#6b7280;
}

.account-status-chip--offline{
  background:#fef2f2;
  color:#b91c1c;
}

html[data-theme="dark"] .account-status-chip--ready{
  background:rgba(16,185,129,.15);
  color:#34d399;
}

html[data-theme="dark"] .account-status-chip--setup{
  background:rgba(245,158,11,.15);
  color:#fbbf24;
}

html[data-theme="dark"] .account-status-chip--paused{
  background:rgba(255,255,255,.08);
  color:#9ca3af;
}

html[data-theme="dark"] .account-status-chip--offline{
  background:rgba(239,68,68,.15);
  color:#f87171;
}

.account-status-chip--muted{
  background:#f3f4f6;
  color:#9ca3af;
}

.account-status-chip--warn{
  background:#fffbeb;
  color:#b45309;
}

.account-status-chip--connecting{
  background:#eff6ff;
  color:#2563eb;
}

.account-status-chip--ok{
  background:#f0fdf4;
  color:#16a34a;
}

html[data-theme="dark"] .account-status-chip--muted{
  background:rgba(255,255,255,.06);
  color:#6b7280;
}

html[data-theme="dark"] .account-status-chip--warn{
  background:rgba(245,158,11,.15);
  color:#fbbf24;
}

html[data-theme="dark"] .account-status-chip--connecting{
  background:rgba(59,130,246,.15);
  color:#93c5fd;
}

html[data-theme="dark"] .account-status-chip--ok{
  background:rgba(16,185,129,.12);
  color:#34d399;
}

/* ─── ACCOUNTS: CHANNELS BADGE ───────────────────────────────────────── */

.account-channels-badge{
  display:inline-flex;
  align-items:center;
  min-height:20px;
  padding:2px 7px;
  border-radius:999px;
  background:#eff6ff;
  color:#2563eb;
  font-size:12px;
  font-weight:500;
  white-space:nowrap;
}

html[data-theme="dark"] .account-channels-badge{
  background:rgba(59,130,246,.15);
  color:#93c5fd;
}

/* ─── ACCOUNTS: SELECT ALL BUTTON ────────────────────────────────────── */

.accounts-select-all-btn{
  flex:0 0 auto;
  white-space:nowrap;
}

/* ─── FLOATING SELECTION BAR ─────────────────────────────────────────── */

.floating-selection-bar[hidden]{
  display:none !important;
}

.floating-selection-bar{
  position:fixed;
  bottom:22px;
  left:50%;
  transform:translateX(-50%);
  z-index:50;
  display:flex;
  align-items:center;
  gap:10px;
  max-width:min(1100px, calc(100vw - 32px));
  width:max-content;
  padding:10px 14px;
  border:1px solid #dbeafe;
  border-radius:14px;
  background:linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  box-shadow:0 14px 42px rgba(37,99,235,.18), 0 2px 8px rgba(15,23,42,.08);
}

.floating-bar-summary{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}

.floating-bar-summary strong{
  color:#1d4ed8;
  font-size:14px;
  font-weight:600;
  white-space:nowrap;
}

.floating-bar-deselect{
  width:22px;
  height:22px;
  min-height:22px;
  padding:0;
  border-radius:999px;
  background:rgba(107,114,128,.12);
  border-color:transparent;
  color:#6b7280;
  font-size:12px;
  box-shadow:none;
  cursor:pointer;
}

.floating-bar-deselect:hover{
  background:rgba(107,114,128,.2);
  transform:none;
}

.floating-bar-actions{
  display:flex;
  align-items:end;
  gap:8px;
  flex-wrap:wrap;
  min-width:0;
}

.floating-bar-more{
  position:relative;
}

.floating-bar-more > summary{
  list-style:none;
  cursor:pointer;
}

.floating-bar-more > summary::-webkit-details-marker{
  display:none;
}

.floating-bar-more-panel{
  position:absolute;
  bottom:calc(100% + 8px);
  right:0;
  z-index:60;
  width:min(320px, calc(100vw - 32px));
  padding:8px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#fff;
  box-shadow:0 10px 28px rgba(15,23,42,.12);
  display:flex;
  flex-direction:column;
  gap:6px;
}

.floating-more-group{
  display:flex;
  flex-direction:column;
  gap:5px;
  padding-bottom:6px;
  border-bottom:1px solid #f3f4f6;
}

.floating-more-group:last-child{
  padding-bottom:0;
  border-bottom:0;
}

.floating-more-btns{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.floating-more-full{
  width:100%;
}

.selected-action-hint{
  color:#8b95a1;
  font-size:11px;
  line-height:1.4;
}

html[data-theme="dark"] .selected-action-hint{
  color:#6b7280;
}

html[data-theme="dark"] .floating-selection-bar{
  border-color:#31415c;
  background:linear-gradient(180deg, #1a2234 0%, #202b3f 100%);
  box-shadow:0 18px 42px rgba(7,12,22,.4);
}

html[data-theme="dark"] .floating-bar-summary strong{
  color:#93c5fd;
}

html[data-theme="dark"] .floating-bar-more-panel{
  border-color:#2d3a52;
  background:#202b3f;
  box-shadow:0 20px 50px rgba(2,6,23,.5);
}

html[data-theme="dark"] .floating-more-group{
  border-bottom-color:#2d3a52;
}

@media (max-width:900px){
  .floating-selection-bar{
    left:16px;
    right:16px;
    transform:none;
    width:auto;
    flex-direction:column;
    align-items:stretch;
    bottom:16px;
  }

  .floating-bar-actions{
    align-items:stretch;
  }

  .floating-bar-more-panel{
    bottom:auto;
    top:calc(100% + 8px);
    right:0;
  }
}

/* ── Announcements block ──────────────────────────────────────────────── */
.folder-announce-block{
  border-top:1px solid var(--border,#e5e7eb);
  margin-top:12px;
}

.folder-announce-summary{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 16px;
  cursor:pointer;
  user-select:none;
  list-style:none;
  font-size:14px;
  font-weight:500;
}

.folder-announce-summary::-webkit-details-marker{ display:none; }

.folder-announce-summary::before{
  content:'▶';
  font-size:10px;
  color:var(--text-muted,#6b7280);
  transition:transform .18s;
}

.folder-announce-block[open] .folder-announce-summary::before{
  transform:rotate(90deg);
}

.folder-announce-badge{
  margin-left:auto;
  font-size:12px;
  font-weight:600;
  background:var(--bg-subtle,#f3f4f6);
  border-radius:10px;
  padding:1px 8px;
  color:var(--text-muted,#6b7280);
}

.folder-announce-body{
  padding:0 16px 16px;
}

.folder-announce-hint{
  margin:0 0 12px;
  font-size:13px;
  color:var(--text-muted,#6b7280);
}

.announce-status-table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
  margin-bottom:20px;
}

.announce-status-table th,
.announce-status-table td{
  padding:5px 8px;
  text-align:left;
  border-bottom:1px solid var(--border,#e5e7eb);
}

.announce-status-table th{
  font-weight:600;
  color:var(--text-muted,#6b7280);
  font-size:12px;
}

.announce-col-num{ width:36px; color:var(--text-muted,#6b7280); }
.announce-col-acc{ width:180px; font-family:monospace; font-size:12px; }
.announce-col-status{ width:80px; }
.announce-col-preview{ color:var(--text-muted,#6b7280); font-size:12px; white-space:pre-wrap; word-break:break-word; }

.announce-existing-text{
  max-width:400px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.announce-status-chip{
  display:inline-block;
  padding:1px 7px;
  border-radius:8px;
  font-size:11px;
  font-weight:600;
}

.announce-status-chip--has{
  background:#d1fae5;
  color:#065f46;
}

.announce-status-chip--empty{
  background:#f3f4f6;
  color:#9ca3af;
}

.announce-bulk-section{
  border-top:1px solid var(--border,#e5e7eb);
  padding-top:14px;
}

.announce-bulk-header{
  display:flex;
  align-items:baseline;
  gap:12px;
  margin-bottom:10px;
  flex-wrap:wrap;
}

.announce-bulk-label{
  font-size:13px;
  font-weight:600;
}

.announce-bulk-sep-hint{
  font-size:12px;
  color:var(--text-muted,#6b7280);
}

.announce-bulk-sep-hint code{
  background:var(--bg-subtle,#f3f4f6);
  padding:0 4px;
  border-radius:3px;
}

.announce-bulk-layout{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  align-items:start;
}

@media(max-width:800px){
  .announce-bulk-layout{ grid-template-columns:1fr; }
}

.announce-bulk-input-wrap{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.announce-bulk-textarea{
  width:100%;
  resize:vertical;
  font-size:13px;
  font-family:monospace;
  padding:8px 10px;
  border:1px solid var(--border,#d1d5db);
  border-radius:6px;
  background:var(--bg,#fff);
  color:var(--text,#111827);
  box-sizing:border-box;
}

.announce-bulk-counter{
  font-size:12px;
  color:var(--text-muted,#6b7280);
  min-height:16px;
}

.announce-bulk-counter--ok{ color:#059669; font-weight:600; }
.announce-bulk-counter--mismatch{ color:#dc2626; }

.announce-bulk-preview{
  min-height:80px;
  background:var(--bg-subtle,#f9fafb);
  border:1px solid var(--border,#e5e7eb);
  border-radius:6px;
  padding:10px;
  font-size:12px;
  overflow:auto;
}

.announce-preview-placeholder{
  color:var(--text-muted,#9ca3af);
  font-size:13px;
}

.announce-preview-table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
}

.announce-preview-table th,
.announce-preview-table td{
  padding:4px 6px;
  text-align:left;
  border-bottom:1px solid var(--border,#e5e7eb);
}

.announce-preview-table th{ font-weight:600; color:var(--text-muted,#6b7280); }
.announce-preview-row--empty td{ color:#dc2626; }
.announce-preview-empty{ color:#dc2626; }

.announce-bulk-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:10px;
  gap:12px;
  flex-wrap:wrap;
}

.announce-bulk-status{
  font-size:13px;
  color:var(--text-muted,#6b7280);
}

.announce-bulk-status--err{ color:#dc2626; font-weight:600; }

.announce-save-btn:disabled{ opacity:.45; cursor:not-allowed; }

/* announce table action bar */
.announce-table-actions-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:6px;
  flex-wrap:wrap;
}

.announce-select-btns{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.announce-selected-hint{
  font-size:12px;
  color:var(--text-muted,#6b7280);
}

.announce-selected-hint--warn{
  color:#d97706;
}

/* checkbox column */
.announce-col-check{
  width:28px;
  padding-right:0;
}

.announce-col-check input[type="checkbox"]{
  cursor:pointer;
}

/* AI draft inner accordion */
.announce-ai-details{
  margin-top:14px;
  border-top:1px solid var(--border,#e5e7eb);
  padding-top:2px;
}

.announce-ai-summary{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 0;
  cursor:pointer;
  user-select:none;
  list-style:none;
  font-size:13px;
  font-weight:500;
  color:var(--text-muted,#6b7280);
}

.announce-ai-summary::-webkit-details-marker{ display:none; }

.announce-ai-summary::before{
  content:'▶';
  font-size:9px;
  color:var(--text-muted,#9ca3af);
  transition:transform .15s;
}

.announce-ai-details[open] .announce-ai-summary::before{
  transform:rotate(90deg);
}

.announce-ai-body{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding-top:8px;
}

.announce-ai-label{
  font-size:13px;
  font-weight:600;
}

.announce-ai-textarea{
  width:100%;
  resize:vertical;
  font-size:13px;
  font-family:inherit;
  padding:8px 10px;
  border:1px solid var(--border,#d1d5db);
  border-radius:6px;
  background:var(--bg,#fff);
  color:var(--text,#111827);
  box-sizing:border-box;
}

.announce-ai-settings{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.announce-ai-field{
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:12px;
  color:var(--text-muted,#6b7280);
}

.announce-ai-field--wide{
  grid-column:1/-1;
}

.announce-ai-field input,
.announce-ai-field select,
.announce-ai-field textarea{
  width:100%;
  font:inherit;
  font-size:13px;
  border:1px solid var(--border,#d1d5db);
  border-radius:6px;
  background:var(--bg,#fff);
  color:var(--text,#111827);
  padding:8px 10px;
  box-sizing:border-box;
}

.announce-ai-hint{
  font-size:12px;
  color:var(--text-muted,#6b7280);
}

.announce-ai-flow-hint{
  margin-top:-2px;
}

.announce-ai-tg-btn{
  white-space:nowrap;
}

.announce-ai-preview{
  min-height:80px;
  background:var(--bg-subtle,#f9fafb);
  border:1px solid var(--border,#e5e7eb);
  border-radius:6px;
  padding:10px;
  font-size:12px;
  overflow:auto;
}

.announce-ai-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.announce-ai-admin-details{
  border:1px solid var(--border,#e5e7eb);
  border-radius:6px;
  background:var(--bg,#fff);
}

.announce-ai-admin-summary{
  padding:8px 10px;
  cursor:pointer;
  user-select:none;
  list-style:none;
  font-size:13px;
  font-weight:600;
}

.announce-ai-admin-summary::-webkit-details-marker{ display:none; }

.announce-ai-admin-body{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:0 10px 10px;
}

.announce-ai-examples-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.announce-ai-example{
  display:flex;
  gap:10px;
  justify-content:space-between;
  align-items:flex-start;
  border-top:1px solid var(--border,#e5e7eb);
  padding-top:8px;
}

.announce-ai-example-main{
  min-width:0;
}

.announce-ai-example-title{
  font-size:13px;
  font-weight:600;
}

.announce-ai-example-preview{
  margin-top:2px;
  font-size:12px;
  color:var(--text-muted,#6b7280);
  overflow-wrap:anywhere;
}

.announce-ai-example-delete{
  flex:0 0 auto;
}

.announce-ai-example-form{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  align-items:end;
  border-top:1px solid var(--border,#e5e7eb);
  padding-top:10px;
}

.announce-ai-import-form{
  display:grid;
  grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) auto;
  gap:8px;
  align-items:end;
  border-bottom:1px solid var(--border,#e5e7eb);
  padding-bottom:10px;
}

.announce-ai-manual-details{
  border-top:1px solid var(--border,#e5e7eb);
  padding-top:8px;
}

.announce-ai-manual-summary{
  cursor:pointer;
  user-select:none;
  list-style:none;
  font-size:13px;
  font-weight:600;
  color:var(--text-muted,#6b7280);
}

.announce-ai-manual-summary::-webkit-details-marker{ display:none; }

@media (max-width:700px){
  .announce-ai-settings,
  .announce-ai-import-form,
  .announce-ai-example-form{
    grid-template-columns:1fr;
  }

  .announce-ai-example{
    flex-direction:column;
    align-items:stretch;
  }
}

/* manual-paste inner accordion */
.announce-manual-details{
  margin-top:14px;
  border-top:1px solid var(--border,#e5e7eb);
  padding-top:2px;
}

.announce-manual-summary{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 0;
  cursor:pointer;
  user-select:none;
  list-style:none;
  font-size:13px;
  font-weight:500;
  color:var(--text-muted,#6b7280);
}

.announce-manual-summary::-webkit-details-marker{ display:none; }

.announce-manual-summary::before{
  content:'▶';
  font-size:9px;
  color:var(--text-muted,#9ca3af);
  transition:transform .15s;
}

.announce-manual-details[open] .announce-manual-summary::before{
  transform:rotate(90deg);
}

.announce-manual-body{
  padding-top:8px;
}

/* compact: remove bottom margin on table inside announce */
.folder-announce-body .announce-status-table{
  margin-bottom:8px;
}

/* dark theme */
html[data-theme="dark"] .folder-announce-block{
  border-top-color:#2d3a52;
}

html[data-theme="dark"] .folder-announce-badge{
  background:#1e2d44;
  color:#94a3b8;
}

html[data-theme="dark"] .announce-status-table th,
html[data-theme="dark"] .announce-status-table td,
html[data-theme="dark"] .announce-preview-table th,
html[data-theme="dark"] .announce-preview-table td{
  border-bottom-color:#2d3a52;
}

html[data-theme="dark"] .announce-status-chip--has{
  background:#064e3b;
  color:#6ee7b7;
}

html[data-theme="dark"] .announce-status-chip--empty{
  background:#1e2d44;
  color:#64748b;
}

html[data-theme="dark"] .announce-bulk-textarea{
  background:#111827;
  border-color:#2d3a52;
  color:#e2e8f0;
}

html[data-theme="dark"] .announce-ai-textarea{
  background:#111827;
  border-color:#2d3a52;
  color:#e2e8f0;
}

html[data-theme="dark"] .announce-ai-field input,
html[data-theme="dark"] .announce-ai-field select,
html[data-theme="dark"] .announce-ai-field textarea{
  background:#111827;
  border-color:#2d3a52;
  color:#e2e8f0;
}

html[data-theme="dark"] .announce-bulk-preview{
  background:#0f172a;
  border-color:#2d3a52;
}

html[data-theme="dark"] .announce-ai-preview{
  background:#0f172a;
  border-color:#2d3a52;
}

html[data-theme="dark"] .announce-bulk-sep-hint code{
  background:#1e2d44;
}

html[data-theme="dark"] .announce-ai-details{
  border-top-color:#2d3a52;
}

html[data-theme="dark"] .announce-ai-admin-details{
  background:#111827;
  border-color:#2d3a52;
}

html[data-theme="dark"] .announce-ai-example,
html[data-theme="dark"] .announce-ai-example-form,
html[data-theme="dark"] .announce-ai-import-form,
html[data-theme="dark"] .announce-ai-manual-details{
  border-top-color:#2d3a52;
  border-bottom-color:#2d3a52;
}

html[data-theme="dark"] .announce-ai-summary{
  color:#64748b;
}

html[data-theme="dark"] .announce-manual-details{
  border-top-color:#2d3a52;
}

html[data-theme="dark"] .announce-manual-summary{
  color:#64748b;
}

html[data-theme="dark"] .announce-table-actions-bar{
  border-bottom-color:#2d3a52;
}

html[data-theme="dark"] .announce-bulk-section{
  border-top-color:#2d3a52;
}

.announce-bulk-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.announce-col-actions{
  width:44px;
  text-align:center;
}

.announce-tg-edit-btn{
  padding:2px 6px;
  font-size:13px;
}

.announce-send-tg-btn{
  white-space:nowrap;
}
