/* Signal, in the Sales Revolver look: a graphite page with light text, paper-white
   surfaces (cards, panels, the side panel, dialogs) with ink text, one mint accent for the
   main action, soft tints for status, line icons, generous radii and no drop shadows. */
:root {
  /* the page */
  --bg: #1d2025;
  --text: #e9e9e6;
  --on-text: #0e1116;
  --muted: rgba(244, 245, 247, 0.6);
  --line: rgba(255, 255, 255, 0.14);
  --panel-2: rgba(255, 255, 255, 0.09);
  --field: rgba(255, 255, 255, 0.09);
  --soft: rgba(255, 255, 255, 0.06);
  /* surfaces */
  --paper: #e9e9e6;
  --ink: #0e1116;
  /* accent and status */
  --accent: #00d68f;
  --accent-ink: #04261a;
  --good: #059669; --good-soft: #d9faec;
  --warn: #c27803; --warn-soft: #fff1d6;
  --bad: #e5484d;  --bad-soft: #ffe5e5;
  --radius: 22px;
  color-scheme: dark;
}
/* white (paper) surfaces re-scope the colours to ink-on-paper */
.surface, .card, .drawer, .dd-panel, .modal, .toast-light {
  --text: #0e1116;
  --on-text: #ffffff;
  --muted: #6b7280;
  --line: rgba(14, 17, 22, 0.09);
  --panel-2: rgba(14, 17, 22, 0.055);
  --field: #dcdddd;
  --soft: #dfe0df;
  color: var(--text);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: -0.011em; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon { flex: none; vertical-align: -0.18em; }
h3 { margin: 0; font-size: 1.2rem; font-weight: 750; letter-spacing: -0.03em; }

/* ---------------------------------------------------------------- buttons */
button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 7px 14px; border: 0; border-radius: 13px;
  background: var(--panel-2); color: var(--text); font-weight: 600; cursor: pointer;
  text-decoration: none; transition: opacity 0.15s ease, background 0.15s ease;
}
button:active:not(:disabled) { opacity: 0.6; }
button:disabled { opacity: 0.35; cursor: default; }
button.primary { background: var(--text); color: var(--on-text); }
button.accent, #search-btn { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
button.danger { color: var(--bad); }
button.link { background: none; min-height: 0; padding: 0; color: var(--text); text-decoration: underline;
              text-decoration-color: var(--line); text-underline-offset: 3px; font-weight: 600; }
button.icon { background: none; min-height: 34px; width: 34px; padding: 0; border-radius: 50%; }
button.icon:hover { background: var(--panel-2); }
a > button { width: 100%; }

/* ---------------------------------------------------------------- fields */
input, select, textarea {
  border: 0; border-radius: 12px; padding: 9px 12px; background: var(--field); color: var(--text); outline: none;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { width: 100%; resize: vertical; line-height: 1.5; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 32px; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='16' viewBox='0 0 10 16' fill='none' stroke='%238e8e93' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 6 5 2.5 8.5 6M1.5 10 5 13.5 8.5 10'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 10px 16px;
}
label { font-size: 0.78rem; font-weight: 500; color: var(--muted); }
/* checkboxes and radios: Sales Revolver's rounded box with a mint tick */
input[type='checkbox'], input[type='radio'] {
  -webkit-appearance: none; appearance: none; flex: none; width: 20px; height: 20px; padding: 0; margin: 0;
  border-radius: 7px; border: 1.5px solid var(--muted); background: transparent no-repeat center / 13px 13px; cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
input[type='radio'] { border-radius: 50%; }
input[type='checkbox']:checked, input[type='radio']:checked {
  background-color: #0e1116; border-color: #0e1116;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300d68f' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.check { display: inline-flex; gap: 9px; align-items: center; font-size: 0.88rem; font-weight: 500; color: var(--text); cursor: pointer; }

/* ---------------------------------------------------------------- top bar */
.topbar { display: flex; gap: 10px; align-items: center; padding: 14px 22px 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.03em; white-space: nowrap; }
.brand svg { width: 28px; height: 28px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); }
.brand span { color: var(--muted); font-weight: 650; }
.spacer { flex: 1; }
.dot { color: var(--muted); padding: 0 2px; }

/* ---------------------------------------------------------------- builder fields: terms, AND/OR, dropdowns */
.field { display: flex; flex-direction: column; gap: 6px; }
.field.grow { flex: 1; min-width: 240px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-radius: 14px; padding: 5px; background: var(--field); min-height: 42px; }
.tags:focus-within { outline: 2px solid var(--accent); }
.tags input { background: none; flex: 1; min-width: 130px; padding: 5px 7px; }
.tags input:focus { outline: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--text); color: var(--on-text);
        border-radius: 99px; padding: 4px 4px 4px 11px; font-size: 0.85rem; font-weight: 600; }
.chip button { min-height: 0; width: 20px; height: 20px; padding: 0; border-radius: 50%; background: none; color: inherit; opacity: 0.65; }
.chip button:hover { opacity: 1; }
/* segmented control (AND / OR, drawer tabs) */
.seg, .tabs { display: inline-grid; grid-auto-flow: column; background: var(--panel-2); border-radius: 14px; padding: 3px; gap: 2px; }
.seg button, .tabs button { min-height: 34px; border-radius: 11px; background: none; padding: 6px 14px; font-weight: 600; color: var(--muted); }
.seg button.on, .tabs button.on { background: #fff; color: #0e1116; box-shadow: 0 1px 4px rgba(14, 17, 22, 0.12); }
.dropdown { position: relative; }
.dd-btn { min-width: 170px; justify-content: space-between; background: var(--field); min-height: 42px; border-radius: 14px; }
.dd-btn::after { content: ""; width: 10px; height: 16px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='16' viewBox='0 0 10 16' fill='none' stroke='%238e8e93' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 6 5 2.5 8.5 6M1.5 10 5 13.5 8.5 10'/%3E%3C/svg%3E") no-repeat center; }
.dd-btn.narrow { min-width: 140px; }
.dd-panel { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; width: 430px; max-height: 440px; overflow: auto;
            background: var(--paper); border-radius: 20px; padding: 14px 16px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); }
.dd-panel.narrow { width: 290px; }
.dd-group { margin-bottom: 12px; }
.dd-group h4 { margin: 2px 0 8px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted);
               display: flex; gap: 6px; align-items: center; }
.dd-group h4 button { min-height: 0; padding: 2px 9px; font-size: 0.7rem; letter-spacing: 0; text-transform: none; border-radius: 99px; }
.dd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.dd-row { padding: 6px 0; }
.dd-row + .dd-row { border-top: 1px solid var(--line); }
.dd-row .note { display: block; margin: 4px 0 0 29px; }

/* ---------------------------------------------------------------- collapsible bars: search + filter */
.panel-bar { margin: 0 22px 10px; border-radius: var(--radius); background: var(--soft); }
.bar-toggle { width: 100%; justify-content: flex-start; gap: 10px; min-height: 48px; padding: 10px 16px;
              border-radius: var(--radius); background: none; text-align: left; }
.bar-toggle:hover { background: var(--soft); }
.bar-title { font-weight: 700; white-space: nowrap; }
.bar-summary { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
               font-size: 0.82rem; font-weight: 500; color: var(--muted); }
.bar-summary b { color: var(--text); font-weight: 650; }
.chev { transition: transform 0.18s ease; color: var(--muted); }
.panel-bar.collapsed .chev { transform: rotate(-90deg); }
.panel-bar.collapsed .bar-body { display: none; }
.bar-body { padding: 2px 16px 14px; }
.bar-body > .note { margin: 8px 0 0; }
.builder { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.bar-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
#estimate { white-space: nowrap; }
#search-btn { min-height: 42px; border-radius: 14px; padding: 8px 20px; }
.preview { font-size: 0.8rem; color: var(--muted); }
.preview b { color: var(--text); font-weight: 650; }
#filter-count { white-space: nowrap; }

/* saved filters: pills, the active one in mint */
.saved { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.saved-label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.pill { display: inline-flex; align-items: center; border-radius: 99px; background: var(--panel-2); }
.pill button { min-height: 32px; background: none; border-radius: 99px; }
.pill-apply { padding: 5px 4px 5px 14px; }
.pill-x { width: 30px; padding: 0; color: var(--muted); }
.pill-x:hover { color: var(--bad); }
.pill.on { background: var(--accent); }
.pill.on button { color: var(--accent-ink); }

.status { margin: 0 22px 10px; padding: 10px 14px; border-radius: 16px; background: var(--good-soft); color: #064e3b; font-size: 0.85rem; font-weight: 500; }
.status.failed { background: var(--bad-soft); color: #7a1d20; }

/* ---------------------------------------------------------------- board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 12px;
         padding: 0 22px 28px; overflow-x: auto; align-items: start; min-height: calc(100vh - 200px); }
.col { background: var(--soft); border-radius: 24px; padding: 10px; min-height: 200px; }
.col.over { outline: 2px dashed var(--accent); outline-offset: -2px; }
.col-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 8px 10px;
            font-size: 0.68rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.col-head .n { font-size: 0.9rem; font-weight: 750; letter-spacing: -0.02em; color: var(--text); text-transform: none; }
.cards { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.card { background: var(--paper); border-radius: 20px; padding: 13px 14px 11px; cursor: pointer; transition: transform 0.12s ease; }
.card:hover { transform: translateY(-1px); }
.card.dragging { opacity: 0.4; }
.card-top { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.tag { font-size: 0.66rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 99px; padding: 3px 8px;
       white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; background: var(--panel-2); color: var(--text); }
.tag.js { background: #e3ecff; color: #1e3a8a; }
.tag.ba { background: var(--warn-soft); color: var(--warn); }
.tag.an { background: var(--good-soft); color: var(--good); }
.tag.mn { background: var(--panel-2); color: var(--muted); }
.tag.fd { background: #f1e6ff; color: #5b21b6; }
.tag.az { background: #e0f2fe; color: #075985; }
.tag.jb { background: #fef3c7; color: #92400e; }
.tag.rd { background: #fce7f3; color: #9d174d; }
.tag.country { background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.tag.fit { background: var(--ink); color: var(--accent); }
.tag.flag { background: none; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); text-transform: none; letter-spacing: 0; font-weight: 600; }
.tag.flag.warn { background: var(--warn-soft); color: var(--warn); box-shadow: none; }
.card-company { font-weight: 750; font-size: 1.02rem; letter-spacing: -0.025em; line-height: 1.2; }
.card-title { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.card-summary { font-size: 0.84rem; margin-top: 7px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; gap: 10px; align-items: center; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 0.75rem; color: var(--muted); font-weight: 500; }
.card-foot .nr { margin-left: auto; white-space: nowrap; min-height: 0; padding: 3px 8px; border-radius: 99px; font-size: 0.72rem; background: none; color: var(--muted); }
.card-foot .nr:hover { background: var(--bad-soft); color: var(--bad); }
.empty { color: var(--muted); font-size: 0.85rem; padding: 14px 8px; text-align: center; }

/* ---------------------------------------------------------------- side panel */
.drawer { position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(640px, calc(100vw - 20px)); background: var(--paper);
          border-radius: 30px; box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5); z-index: 30; display: flex; flex-direction: column; overflow: hidden; }
.drawer-head { display: flex; justify-content: space-between; gap: 12px; padding: 20px 20px 12px; }
.d-company { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
.d-title { color: var(--muted); margin-top: 4px; font-size: 0.9rem; }
.d-actions { display: flex; gap: 6px; align-items: center; flex: none; }
.d-actions select { min-height: 36px; padding-top: 6px; padding-bottom: 6px; border-radius: 12px; font-weight: 600; }
.d-actions #d-not-relevant { min-height: 36px; color: var(--bad); }
.drawer .tabs { margin: 0 20px; align-self: flex-start; }
.tab { padding: 16px 20px 40px; overflow-y: auto; flex: 1; }
.meta { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; font-size: 0.88rem; margin: 0 0 14px;
        background: var(--soft); border-radius: 18px; padding: 14px 16px; }
.meta dt { color: var(--muted); font-size: 0.78rem; font-weight: 500; padding-top: 1px; }
.meta dd { margin: 0; overflow-wrap: anywhere; font-weight: 500; }
.desc { white-space: pre-wrap; line-height: 1.55; font-size: 0.88rem; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.note { font-size: 0.8rem; color: var(--muted); line-height: 1.45; }
p { line-height: 1.5; }
.section-title { margin: 18px 0 8px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.warnbox { background: var(--warn-soft); color: #7a4a00; border-radius: 16px; padding: 10px 14px; font-size: 0.85rem; margin: 10px 0; }

.contact { background: var(--soft); border-radius: 20px; padding: 14px 16px; margin-bottom: 10px; }
.contact-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.contact-name { font-weight: 750; font-size: 1.05rem; letter-spacing: -0.025em; }
.persona { font-size: 0.64rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }
.contact-lines { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 4px 10px; font-size: 0.86rem; margin-top: 8px; }
.contact-lines span:nth-child(odd) { color: var(--muted); font-size: 0.78rem; padding-top: 1px; }
.contact-lines a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.contact-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.contact-actions button { min-height: 32px; padding: 5px 11px; font-size: 0.8rem; border-radius: 11px; background: var(--paper); }
.contact-actions a > button { width: auto; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 14px; background: var(--soft); border-radius: 18px; padding: 12px; }
.form .full { grid-column: 1 / -1; }
.form .note { margin: 0; }

.activity { background: var(--soft); border-radius: 16px; padding: 10px 14px; margin-bottom: 8px; }
.activity .when { font-size: 0.72rem; color: var(--muted); }
.activity .what { font-weight: 650; font-size: 0.88rem; }
.activity pre { white-space: pre-wrap; font-family: inherit; font-size: 0.85rem; background: var(--paper); border-radius: 12px; padding: 10px 12px; margin: 8px 0 0; }

/* ---------------------------------------------------------------- toast, dialogs */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 50; max-width: 80vw;
         background: #0b0d10; color: #fff; padding: 11px 18px; border-radius: 99px; font-size: 0.88rem; font-weight: 500;
         box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.07); }
.toast::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 9px; vertical-align: 1px; }
.toast.bad::before { background: var(--bad); }
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 40; display: flex; align-items: center; justify-content: center; }
.modal { background: var(--paper); border-radius: 28px; padding: 10px 22px 20px; width: min(540px, 92vw); animation: deal 0.22s ease-out; }
.modal::before { content: ''; display: block; width: 38px; height: 4px; border-radius: 99px; background: var(--line); margin: 0 auto 14px; }
.modal h3 { margin: 0 0 8px; }
.reasons { display: flex; flex-direction: column; margin: 12px 0 14px; background: var(--soft); border-radius: 18px; overflow: hidden; }
.reasons .check { padding: 11px 14px; }
.reasons .check + .check { border-top: 1px solid var(--line); }
@keyframes deal { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal { animation: none; } .card:hover { transform: none; } }

/* automatic contact search running */
.spin { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
        animation: spin 0.8s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.card-foot .finding { color: var(--good); font-weight: 600; white-space: nowrap; }
.finding-note { margin: 10px 0 0; padding: 10px 14px; border-radius: 16px; background: var(--good-soft); color: #064e3b; font-size: 0.85rem; font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }
.col-head .col-act { margin-left: auto; margin-right: 8px; align-self: center; min-height: 0; width: 28px; height: 28px; color: var(--muted); }
.col-head .col-act:hover { color: var(--text); }

/* the card that's open in the side panel */
.card.active { box-shadow: 0 0 0 2.5px var(--accent); }
.seg.small button { min-height: 28px; padding: 3px 11px; font-size: 0.8rem; }

/* signature preview and your own notes */
pre.sig { white-space: pre-wrap; font-family: inherit; font-size: 0.85rem; color: var(--muted); background: var(--soft); border-radius: 12px; padding: 10px 12px; margin: 0; }
.note-add { margin-bottom: 14px; }
.note-add .row { margin-top: 6px; }
.activity.mine { background: var(--good-soft); }
.activity .what { display: flex; align-items: center; gap: 6px; }
.activity .del { margin-left: auto; width: 26px; min-height: 26px; height: 26px; color: var(--muted); }
.activity .del:hover { color: var(--bad); background: var(--bad-soft); }
.modal textarea { width: 100%; }

/* settings window */
.modal.wide { width: min(860px, 94vw); max-height: 90vh; overflow: auto; }
/* top-aligned dialogs (Settings): the top edge stays put when the content changes height */
.modal-back.top { align-items: flex-start; padding-top: 5vh; }
.modal-back.top .modal.wide { max-height: 90vh; overscroll-behavior: contain; }
.settings-head { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; }
.settings .tabs { margin: 6px 0 12px; }
.cycle { background: var(--soft); border-radius: 16px; padding: 10px 14px; margin-bottom: 8px; }
.cycle.off { opacity: 0.6; }
.cycle-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cycle-top select { min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
.cycle-top button { min-height: 34px; }
.cycle .del { width: 30px; min-height: 30px; height: 30px; color: var(--muted); }
.cycle .del:hover { color: var(--bad); background: var(--bad-soft); }
.cycle-sum { font-size: 0.85rem; margin: 6px 0 2px; }
.cycle-sum b { font-weight: 650; }
.cycle-new { background: var(--soft); border-radius: 16px; padding: 12px 14px; }
.cycle-new .builder { margin-top: 10px; }
.settings .tags { background: var(--field); }

/* settings: not relevant reasons */
.reason-row { display: flex; align-items: center; gap: 10px; background: var(--soft); border-radius: 14px; padding: 6px 8px; margin-bottom: 6px; }
.reason-row input[data-f="label"] { flex: 1; min-width: 0; }
.reason-row .check { white-space: nowrap; font-size: 0.8rem; }
.reason-row .del { width: 30px; min-height: 30px; height: 30px; color: var(--muted); }
.reason-row .del:hover { color: var(--bad); background: var(--bad-soft); }
.reason-row .grip { cursor: grab; color: var(--muted); display: inline-flex; padding: 6px 2px; border-radius: 8px; touch-action: none; }
.reason-row .grip:hover, .reason-row .grip:focus-visible { color: var(--text); background: var(--panel-2); }
.reason-row .grip:active { cursor: grabbing; }
.reason-row.dragging { position: relative; z-index: 2; opacity: 0.85; box-shadow: 0 6px 18px rgba(14, 17, 22, 0.18); }
.reason-row.drop-before { box-shadow: inset 0 2.5px 0 var(--accent); }
.reason-row.drop-after { box-shadow: inset 0 -2.5px 0 var(--accent); }
#rs-dirty { color: var(--warn); }

/* settings: signature and BCC per sender */
.sender-block { background: var(--soft); border-radius: 16px; padding: 2px 14px 10px; margin-bottom: 10px; }
.sender-block label { display: block; margin: 10px 0 4px; font-size: 0.82rem; font-weight: 700; color: var(--ink); }
/* the sender's address as a heading: bold and black, not the small grey uppercase section style */
.sender-block .section-title { text-transform: none; letter-spacing: -0.01em; font-size: 1rem; font-weight: 750; color: var(--ink); margin: 12px 0 2px; }
.sender-block .note { margin: 6px 0 0; }

/* settings: JSearch limits */
.usage { margin: 10px 0 14px; }
.usage-bar { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; margin-bottom: 6px; }
.usage-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.limits { display: flex; gap: 14px; flex-wrap: wrap; }
.limits label { display: flex; flex-direction: column; gap: 6px; }
.limits input { width: 180px; }

/* transjt | emit switch on cards */
.brand-switch { margin-left: auto; display: inline-flex; background: var(--panel-2); border-radius: 99px; padding: 2px; gap: 1px; }
.brand-switch button { min-height: 0; padding: 2px 8px; border-radius: 99px; font-size: 0.68rem; font-weight: 650;
                       background: none; color: var(--muted); letter-spacing: 0; }
.brand-switch button:hover { color: var(--text); }
.brand-switch button.on { background: var(--ink); color: #fff; }
/* brand colours from the websites: transjt magenta (--tj-color-magenta), emit light blue (logo) */
.brand-switch button.on.b-transjt { background: #ff00f4; color: #0e1116; }
.brand-switch button.on.b-emit { background: #06cfd5; color: #0e1116; }

/* settings: limits per tool */
.limit-card { background: var(--soft); border-radius: 16px; padding: 10px 14px; margin-bottom: 10px; }
.limit-card.off { opacity: 0.6; }
.limit-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.limit-card .usage { margin: 8px 0 10px; }
.limit-card .limits input { width: 150px; }
.limit-card > .note { margin: 8px 0 0; }
.usage-bar.high span { background: var(--warn); }

/* top bar: who is signed in */
.topbar .who { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* sign-in page */
.login-page { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.login-card { width: min(400px, 100%); background: var(--paper); border-radius: 28px; padding: 26px 26px 24px; }
.login-brand { color: var(--ink); margin-bottom: 18px; }
.login-brand span { color: #6b7280; }
.login-card h1 { margin: 0 0 14px; font-size: 1.5rem; letter-spacing: -0.03em; }
.login-card form { display: flex; flex-direction: column; gap: 6px; }
.login-card label { margin-top: 8px; font-weight: 600; color: var(--ink); }
.login-card input { width: 100%; min-height: 44px; }
.login-card button { margin-top: 16px; min-height: 46px; border-radius: 14px; }
.login-error { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--bad-soft); color: #7a1d20; font-size: 0.88rem; }

/* dropdown lists are placed by script (placePanel), above dialogs */
.dd-panel { z-index: 60; }
/* cycles: time and zone */
.cycle-top .at, .cycle-new .at { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.cycle-top input[type="time"], .cycle-new input[type="time"] { min-height: 34px; padding: 5px 8px; }
.cycle-top select[data-act="tz"], #cy-tz { max-width: 190px; }
/* long addresses wrap instead of pushing the Settings window wider than the screen */
.settings .note, .settings .cycle-sum, .settings .cycle-sum a { overflow-wrap: anywhere; }
.settings .row > input, .settings .row > select { min-width: 0; max-width: 100%; }
.modal.wide { overflow-x: hidden; }
/* Settings tabs wrap onto a second line on small screens instead of widening the window */
.settings .tabs { display: flex; flex-wrap: wrap; max-width: 100%; }
.settings .tabs button { flex: 1 1 auto; }
