/* Dark Minimal theme - inspired by themewagon.com/preview/dark-minimal */
:root {
  font: 16px/1.5 system-ui, sans-serif;
  color: #f4f4f5;
  background: #09090b;
  --bg: #09090b;
  --card: rgba(19,19,22,0.45);
  --card2: rgba(26,26,31,0.4);
  --line: rgba(255,255,255,0.06);
  --line-strong: rgba(255,255,255,0.12);
  --txt: #f4f4f5;
  --muted: #a1a1aa;
  --dim: #71717a;
  --accent: #8b5cf6;
  --accent-bright: #a78bfa;
  --accent-dim: #7c3aed;
  --danger: #f87171;
  --ok: #4ade80;
  --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--txt); isolation: isolate; }

#animated-background-frame {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    display: block !important;
    overflow: hidden !important;
    pointer-events: none !important;
    z-index: -1;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    box-shadow: none !important;
    background: transparent;
}

/* App shell: icon sidebar + content area */
.app { display: flex; min-height: 100vh; position: relative; z-index: 0; align-items: stretch; }

/* --- Sidebar (icon rail, full height) ------------------------------------- */
#sidebar {
  position: sticky; top: 0; align-self: flex-start;
  display: flex; flex-direction: column; gap: 4px;
  width: 260px; flex: none;
  padding: 96px 12px 18px;   /* ~1in top margin */
  min-height: 100vh;
  background: transparent;
}
.nav-row { display: flex; align-items: center; gap: 10px; min-height: 44px; width: 100%; }
.nav-icon {
  flex: none; width: 38px; height: 38px;
  display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; border-radius: 11px;
  color: var(--accent-bright); cursor: pointer; padding: 0;
  filter: drop-shadow(0 0 8px rgba(139,92,246,.35));
  transition: background .15s ease, border-color .15s ease, color .15s ease, filter .15s ease;
}
.nav-icon svg { width: 19px; height: 19px; display: block; }
#recip-toggle svg { width: 23px; height: 23px; }   /* recipients icon a bit larger */
.nav-icon:hover:not(:disabled) {
  color: #c4b5fd; background: rgba(139,92,246,.12);
  border-color: rgba(139,92,246,.35);
  filter: drop-shadow(0 0 14px rgba(139,92,246,.55));
}
.nav-icon:disabled { color: #52525b; filter: none; cursor: default; }
.nav-icon.icon-error, .nav-icon.icon-error:hover:not(:disabled) {
  color: #f87171; border-color: transparent;   /* normal look, no border */
  filter: drop-shadow(0 0 12px rgba(248,113,113,.55));
}
.nav-icon.icon-running, .nav-icon.icon-running:hover:not(:disabled) {
  color: #4ade80; border-color: transparent;
  filter: drop-shadow(0 0 12px rgba(74,222,128,.55));
}
.nav-info {
  flex: 1; min-width: 0;
  font-size: 12.5px; color: var(--muted); line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-info.nav-error {
  color: #ffffff; white-space: normal; font-weight: 600;
  text-shadow: 0 0 12px rgba(0,0,0,.7);
}

/* --- Content area ----------------------------------------------------------- */
.content {
  flex: 1; min-width: 0;
  max-width: 940px; margin: 0 auto;
  padding: 40px 34px 60px;
  display: flex; flex-direction: column; gap: 18px;
}

/* --- Popup panels (transparent inputs, border only) -------------------------- */
.popup {
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 22px 24px 26px;
  animation: pop-in .18s ease-out;
}
.popup[hidden] { display: none; }
@keyframes pop-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.popup h2 {
  margin: 0 0 16px; font-size: 13px; font-weight: 650;
  letter-spacing: .8px; text-transform: uppercase; color: var(--dim);
}
.popup input, .popup textarea {
  width: 100%; padding: 12px 14px;
  background: transparent;
  border: 1px solid var(--line-strong); border-radius: 10px;
  color: var(--txt);
}
.popup input:focus, .popup textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,92,246,.16);
}
.popup textarea { min-height: 200px; resize: vertical; font: 15px/1.65 ui-monospace, monospace; }
#recipient { min-height: 240px; }
#subject, #html { margin-bottom: 14px; }
#delay { width: 200px; }
::placeholder { color: #52525b; }

/* --- Live workspace (email sending status) ----------------------------------- */
#workspace { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-top: 144px; }
#workspace.hidden { display: none !important; }
.batch { background: transparent; border: 0; padding: 0; }
.batch-head { display: none; }
.worker {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 6px 10px; padding: 4px 0; color: #ffffff;
}
.worker:first-of-type { border-top: 0; }
.worker.done { color: #ffffff; }
.w-name { flex: none; width: 80px; font-weight: 620; font-size: 14px; color: #ffffff; }
.w-account { flex: none; max-width: 340px; color: rgba(255,255,255,0.62); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-sent { flex: none; color: #4ade80; font-weight: 620; font-size: 13px; white-space: nowrap; }
.empty { color: rgba(255,255,255,0.45); }
.hidden { display: none !important; }
select option { background: #131316; color: var(--txt); }

/* Responsive: sidebar becomes a horizontal wrap bar on narrow screens */
@media (max-width: 820px) {
  .app { flex-direction: column; }
  #sidebar { position: static; flex-direction: row; flex-wrap: wrap; width: 100%; min-height: auto; padding: 10px 12px; }
  .content { padding: 24px 16px 44px; }
}
