/* Blue tasks, amber Amazon and warm gold priorities on light surfaces. */
:root {
  --ink: #24364b;
  --muted: #62738a;
  --line: #dfe6ef;
  --canvas: #f5f7fc;
  --sidebar: #f1f5fd;
  --accent: #285fc7;
  --accent-strong: #2253b4;
  --surface-hover: #eaf1ff;
  --focus: #3972d2;
}
.app-header { border-bottom-color: #d6e1f3; }
.brand, .auth-brand { color: #244b85; }
.brand-mark { background: #285fc7; }
.brand-mark span { color: #b9d9ff; }
.sidebar { border-right-color: #dce5f4; }
.workspace-label, .sidebar-heading { color: #536f9a; }
.nav-main.current, .category-link.selected { background: #dfeaff; color: #214f9f; }
.nav-main:hover, .category-link:hover { background: #e6eefe; color: #214f9f; }
.category-dot { background: #8faadb; }
.category-link.selected .category-dot { background: #285fc7; }
.nav-count { background: #cbdcf9; color: #244e91; }
.add-category, .sidebar-heading a { color: #345e9f; }
.avatar { background: #e0eafd; color: #244e91; }
.profile { border-top-color: #dce5f4; }
.topbar { background: #fbfcff; }
.topbar a { color: #345e9f; }
.section-button {
  --section-color: #285fc7;
  --section-hover: #2253b4;
  --section-surface: #edf3ff;
  --section-border: #ccdafa;
  color: var(--section-color);
  background: var(--section-surface);
  border-color: var(--section-border);
}
.section-button[href="/amazon/email-automation/"] {
  --section-color: #ad580b;
  --section-hover: #914607;
  --section-surface: #fff3e3;
  --section-border: #efd3a8;
}
.section-button:hover { color: var(--section-color); background: var(--section-surface); border-color: var(--section-color); }
.section-button.current { background: var(--section-color); border-color: var(--section-color); color: #fff; }
.section-button.current:hover { background: var(--section-hover); border-color: var(--section-hover); }
.sidebar[aria-label="Navigation Amazon"] { background: #fff8ee; border-right-color: #efdfc7; }
.sidebar[aria-label="Navigation Amazon"] .workspace-label { color: #946025; }
.sidebar[aria-label="Navigation Amazon"] .nav-main.current { color: #8d480b; background: #ffead0; }
.sidebar[aria-label="Navigation Amazon"] .profile { border-top-color: #efdfc7; }
.sidebar[aria-label="Navigation Amazon"] .avatar { color: #8d480b; background: #ffead0; }
.button { color: #405c85; border-color: #d7e1f0; }
.button:hover { color: var(--accent-strong); background: var(--surface-hover); border-color: #aac3ec; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 5px #285fc716; }
.button.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.button:disabled { box-shadow: none; }
.status-tabs a.active { color: #285fc7; border-bottom-color: #285fc7; }
.task-check.checked { background: #258152; border-color: #258152; }
.task-check:hover { background: #eaf6ee; border-color: #258152; }
.status-badge { background: #eaf1ff; color: #28579e; }
.status-badge.completed { background: #eaf6ee; color: #256b44; }
.status-badge.archived { background: #f0eff7; color: #665d85; }
.metric-dot.green { background: #3975d6; }
.metric-dot.blue { background: #329665; }
.metric-dot.grey { background: #8478ab; }
.metric-dot.amber, .late-dot, .ae-dot { background: #c47a19; }
.overview { gap: 8px; }
.overview-card { padding: 5px 11px; border: 1px solid #dce7fc; border-radius: 7px; background: #edf3ff; color: #28579e; }
.overview-card .metric-label { color: inherit; }
.overview-card[href*="due=overdue"] { background: #fff3df; border-color: #f0ddbc; color: #925713; }
.overview-card[href*="status=completed"] { background: #eaf6ee; border-color: #cfe7d8; color: #256b44; }
.overview-card[href*="status=archived"] { background: #f1eff8; border-color: #e2ddef; color: #665d85; }
.overview-card:hover { border-color: currentColor; }
.task-table th { background: #f3f6fc; color: #576b89; }
.task-table tbody tr:hover { background: #f7faff; }
.category-cell a { background: #edf2fc; border-color: #dce5f5; color: #49668f; }
.note-count { background: #ececfc; color: #615597; }
.quick-add { background: #f6f9ff; }
.quick-add .button { background: #e8f0ff; border-color: #d2e1fb; color: #28579e; }
.task-table .row-details > td { background: #f1f6ff; border-bottom-color: #d5e2f8; }
.details-toggle { color: #4c73ad; }
.ae-page { --accent: #ad580b; --accent-strong: #914607; --surface-hover: #fff4e5; }
.ae-page .eyebrow { color: #946025; }
.ae-tabs a.active { color: #a5530a; border-bottom-color: #c77a25; }
.ae-metrics { background: #fffaf2; border-color: #eddfcb; }
.ae-metrics > div { border-color: #eddfcb; }
.ae-metrics > div:nth-child(1) strong { color: #a5530a; }
.ae-metrics > div:nth-child(2) strong { color: #4265b1; }
.ae-metrics > div:nth-child(3) strong { color: #258152; }
.ae-metrics > div:nth-child(4) strong { color: #776298; }
.ae-country-chips span { background: #edf2fc; color: #49668f; border-color: #dce5f5; }
.ae-automation-count { background: #f1edfa; color: #6d529c; }
.ae-dot.ready { background: #258152; }
.ae-status.active { background: #eaf6ee; color: #256b44; }
.ae-status.paused { background: #fff3df; color: #925713; }
.ae-status.draft { background: #f1edfa; color: #6d529c; }
.ae-inline-notice { background: #fff8ea; color: #80511c; border-color: #ede0c8; }
.ae-page .empty-icon, .ae-connection-icon, .ae-connection-symbol { background: #fff0dc; color: #a3651b; border-color: #ecd6b7; }
.ae-page .button:not(.primary):not(:disabled):hover { border-color: #d4ad78; }
.notice.error { background: #fff3ef; border-color: #e6c5b9; color: #a33d24; }
.errorlist, .danger-link, .ae-preview-notes.is-error { color: #a33d24; }
.danger-link:hover { color: #762814; }
.ae-error-dot { background: #a33d24; }
.auth-body { background: #eef3fc; background-image: none; }
input:focus, textarea:focus, select:focus { border-color: var(--focus); outline-color: #3972d225; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.priority-panel { margin-bottom: 20px; border-color: #eadfc8; border-top: 3px solid #d7a33e; }
.priority-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 17px; border-bottom: 1px solid #eee2ca; background: #fff8e9; }
.priority-heading h2 { display: flex; align-items: center; gap: 9px; font-size: 14px; margin: 0 0 5px; color: #77501a; }
.priority-heading h2 > span:first-child { font-size: 16px; color: #af7419; }
.priority-count { background: #f2d99e; color: #714a12; border-radius: 5px; padding: 3px 7px; font-size: 10px; font-variant-numeric: tabular-nums; }
.priority-heading p, .priority-hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.priority-hint { text-align: right; }
.priority-empty { display: flex; align-items: center; gap: 13px; padding: 18px; }
.priority-empty > span { font-size: 27px; color: #b78029; }
.priority-empty p { margin: 0; font-size: 12px; line-height: 1.8; }
.task-table .priority-column { width: 34px; padding-left: 3px; padding-right: 3px; text-align: center; }
.priority-toggle { display: inline-grid; place-items: center; vertical-align: middle; width: 27px; height: 27px; padding: 0; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #777; }
.priority-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.priority-toggle:hover { background: #fff3d7; color: #9a6415; border-color: #e9cf99; }
.priority-toggle.is-priority { color: #b0771c; }
.priority-toggle.is-priority svg { fill: currentColor; }
.task-table .task-name { overflow-wrap: anywhere; }
.row-details { scroll-margin-top: calc(var(--header-height) + 12px); }
@media (max-width: 850px) {
  .priority-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .priority-hint { text-align: left; }
}
@media (max-width: 600px) {
  .priority-heading { padding: 12px; }
  .priority-empty { padding: 14px 12px; }
  .priority-toggle { width: 32px; height: 32px; }
}

/* Task deadlines and direct theme entry. */
.deadline-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #cf2638; vertical-align: middle; flex: none; }
.theme-picker { display: flex; flex-direction: column; align-items: stretch; gap: 5px; min-width: 0; }
.theme-entry { position: relative; width: 100%; }
.theme-entry[hidden], .theme-suggestions[hidden], [data-theme-fallback][hidden] { display: none; }
.theme-token-box { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid #d7e1f0; border-radius: 6px; background: #fff; min-height: 39px; }
.theme-token-box:focus-within { border-color: var(--focus); outline: 3px solid #3972d225; }
.theme-picker .theme-selection { display: contents; }
.theme-token { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; background: #edf2fc; border: 1px solid #dce5f5; border-radius: 5px; padding: 2px 4px 2px 8px; color: #345b95; font-size: 11px; }
.theme-token > span { overflow-wrap: anywhere; }
.theme-token button { flex: none; display: grid; place-items: center; width: 23px; height: 23px; border: 0; background: transparent; color: #345b95; border-radius: 3px; padding: 0; font-size: 18px; }
.theme-token button:hover { background: #dce7fa; }
.theme-picker .theme-input, .quick-add .theme-picker .theme-input { flex: 1 1 180px; width: auto; min-width: 140px; max-width: 100%; min-height: 28px; border: 0; padding: 4px; background: transparent; font-size: 12px; box-shadow: none; outline: none; }
.theme-suggestions { position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 25; max-height: 230px; overflow-y: auto; background: #fff; border: 1px solid #cdd9ec; border-radius: 6px; box-shadow: 0 8px 24px #24364b18; padding: 4px; }
.theme-suggestions [role=option] { padding: 8px 10px; font-size: 12px; cursor: pointer; border-radius: 4px; overflow-wrap: anywhere; }
.theme-suggestions [role=option]:hover, .theme-suggestions [aria-selected=true] { background: #eaf1ff; color: #214f9f; }
.theme-subtheme-button { align-self: flex-start; border: 0; background: transparent; color: #486b9c; font-size: 10px; padding: 2px 0; text-decoration: underline; text-underline-offset: 2px; }
.theme-entry-help, .theme-feedback { margin: 0; }
.theme-feedback:empty { display: none; }
.task-panel, .form-panel { overflow: visible; }
.task-panel .table-scroll { border-radius: 0 0 9px 9px; }
.quick-add { align-items: flex-start; }
.quick-add .theme-picker { flex: 0 1 370px; min-width: 240px; max-width: 45%; }
.quick-add .theme-entry-help { display: none; }
@media (max-width: 850px) { .quick-add .theme-picker { flex: 1 1 250px; max-width: 100%; } }

/* Theme assessments stay compact in both task tables. */
.criteria-column,.criteria-cell{width:100px;max-width:130px}
.criteria-cell{font-size:11px}
.criterion{display:inline-block;line-height:1.4}
.criterion.positive{font-weight:650;color:var(--text,#24364b)}
.criterion.negative{color:#637083}
.criterion.unknown{color:#7c8695;font-style:italic}
.criteria-help{font-size:11px;color:#657590;padding:10px 16px;margin:0;border-top:1px solid var(--border,#dce5f2)}
.criteria-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:16px 0}
.criteria-grid dt{font-size:12px;color:#657590;margin-bottom:5px}
.criteria-grid dd{margin:0}
.theme-assessment+.theme-assessment{border-top:1px solid var(--border,#dce5f2);padding-top:18px;margin-top:18px}
.theme-assessment h3{font-size:14px;margin:0}
.theme-assessment .section-heading a{font-size:12px}
.task-table{min-width:1200px}
.task-table .task-name{min-width:240px;width:30%}

/* Criteria can be selected with one click, in the form and in either table. */
.criteria-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.criteria-options fieldset{border:0;padding:0;margin:0;min-width:0}
.criteria-options legend,.criterion-label{font-size:11px;font-weight:600;color:#4b5b72;padding:0;margin:0 0 8px}
.criteria-options fieldset>div{display:flex;flex-wrap:wrap;gap:5px}
.criteria-options label{position:relative;display:inline-flex;align-items:center;cursor:pointer;border:1px solid #ccd7e7;border-radius:5px;background:#fff;padding:8px 11px;font-size:11px;font-weight:500;line-height:1.35}
.criteria-options input[type=radio]{position:absolute;width:1px;height:1px;opacity:0;padding:0;margin:0;min-height:0}
.criteria-options label:has(input:checked){background:#285fc7;color:#fff;border-color:#285fc7}
.criteria-options label:has(input:focus-visible){outline:3px solid #8baff1;outline-offset:2px}
.criteria-options label:hover{border-color:#285fc7}
.quick-add{flex-wrap:wrap}
.quick-add .criteria-options{flex:1 0 100%;grid-template-columns:repeat(6,minmax(0,1fr));border-top:1px solid #e0e6f0;padding-top:9px;margin-top:4px;gap:10px}
.quick-add .criteria-options legend{margin-bottom:5px;font-size:10px}
.quick-add .criteria-options label{padding:5px 8px;font-size:10px}
.criterion-control{display:inline-flex;flex-wrap:wrap;align-items:center;gap:3px;white-space:nowrap;min-width:74px;max-width:130px}
.criterion-choice{border:1px solid #ced8e7;border-radius:4px;background:#fff;color:#52627b;font-size:10px;padding:5px 6px;min-height:28px;line-height:1.2}
.criterion-choice:hover{border-color:#285fc7;color:#214c9d}
.criterion-choice[aria-pressed=true]{border-color:#285fc7;background:#285fc7;color:#fff;font-weight:650}
.criterion-no[aria-pressed=true]{border-color:#697588;background:#e8edf4;color:#26374d}
.criterion-choice[aria-disabled=true]{cursor:wait;opacity:.6}
.criteria-save-status{position:fixed;right:24px;bottom:20px;z-index:90;max-width:min(450px,calc(100vw - 40px));padding:10px 14px;margin:0;background:#fff;border:1px solid #ccd9ec;border-radius:8px;box-shadow:0 4px 20px #26374d20;color:#284f8c;font-size:12px}
.criteria-save-status[hidden]{display:none}
.criteria-save-status.is-error{border-color:#cf8a85;color:#a0342c}
@media(max-width:850px){.quick-add .criteria-options{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.criteria-options{grid-template-columns:1fr}}

.criterion-error{font-weight:bold;color:#a0342c;padding:0 2px}
.criterion-error[hidden]{display:none}

.criterion-hint{flex-basis:100%;font-size:10px;color:#657590;white-space:normal}
.criterion-hint[hidden]{display:none}
@media(min-width:851px) and (max-width:1450px){.quick-add .criteria-options{grid-template-columns:repeat(3,minmax(0,1fr))}}
.task-table .task-name{width:auto}
.criterion-control[data-label="Impact business"]{min-width:130px;max-width:130px}
.criterion-control[data-label="Auto. possible"]{min-width:98px;max-width:98px}

/* Single-line task rows: compact toggles and choices, full text on hover. */
.task-table{table-layout:fixed;width:100%;min-width:1200px}
.task-table th{white-space:nowrap;padding:8px 4px}
.task-table tbody>tr:not(.row-details)>td{height:38px;padding:5px 4px;white-space:nowrap;vertical-align:middle}
.task-table .task-name{min-width:0;width:auto;overflow:hidden}
.task-title{display:flex;align-items:center;gap:5px;min-width:0}
.task-title>a{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.task-title>.deadline-dot,.task-title>.description-indicator{flex:none;margin:0}
.task-table .category-cell{min-width:0;overflow:hidden}
.task-table .theme-tags{flex-wrap:nowrap;overflow:hidden}
.task-table .theme-tag{flex:0 0 auto;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.task-table .criteria-column,.task-table .criteria-cell{width:auto;max-width:none}
.criterion-control{position:relative;flex-wrap:nowrap;min-width:0;max-width:none;gap:2px}
.criterion-control[data-label="Impact business"],.criterion-control[data-label="Auto. possible"]{min-width:0;max-width:none}
.criterion-choice{flex:none;min-height:26px;padding:4px 5px;white-space:nowrap}
.criteria-cell-toggle{text-align:center}
.criterion-toggle{display:inline-flex;align-items:center;justify-content:center;width:28px;height:26px;padding:0;border:1px solid transparent;background:transparent;border-radius:4px;cursor:pointer}
.criterion-toggle-check .criterion-toggle-mark{display:grid;place-items:center;width:17px;height:17px;border:1px solid #aeb9c9;border-radius:3px;background:white;color:transparent;font-size:13px;font-weight:700;line-height:1}
.criterion-toggle-check[aria-checked=true] .criterion-toggle-mark{background:#285fc7;border-color:#285fc7;color:white}
.criterion-toggle-dot .criterion-toggle-mark{width:9px;height:9px;border-radius:50%;background:transparent}
.criterion-toggle-dot[aria-checked=true] .criterion-toggle-mark{background:#d32f3b}
[data-field="compliance"] .criterion-toggle-dot[aria-checked=true] .criterion-toggle-mark{background:#285fc7}
.criterion-toggle:hover{background:#edf2fa;border-color:#cbd6e7}
.criterion-toggle:focus-visible,.criterion-choice:focus-visible{outline:2px solid #285fc7;outline-offset:2px}
.criterion-toggle[aria-disabled=true]{cursor:wait;opacity:.6}
.criterion-hint,.criterion-error{position:absolute;right:-6px;top:-5px;font-size:10px;line-height:12px;min-width:12px;text-align:center;border-radius:50%;background:white;white-space:nowrap}
.criterion-hint{color:#657590;flex-basis:auto}
.criterion-error{color:#a0342c}
.completed-row .task-title>a{color:#666666;text-decoration:line-through}

/* Business strength: one compact, keyboard-accessible indicator. */
.criterion-toggle-bolt .criterion-toggle-mark{width:25px;height:25px;border:0;background:transparent}
.impact-bolt{display:inline-block;vertical-align:middle;flex:none;color:#818894;fill:none;opacity:.25}
.criterion-toggle-bolt[aria-checked="true"] .impact-bolt,
[data-criterion-input="business_impact_strong"]:has(input[value="True"]:checked) .impact-bolt{color:#d2a600;fill:#ffd43b;opacity:1}
.criterion-toggle-bolt:disabled{opacity:.55;cursor:default}
[data-criterion-input="business_impact_strong"]:disabled{opacity:.4}
[data-criterion-input="business_impact_strong"]>div{display:inline-flex}
.criteria-options [data-criterion-input="business_impact_strong"]>div{display:inline-flex;vertical-align:middle}
@media(min-width:1451px){.quick-add .criteria-options{grid-template-columns:repeat(7,minmax(0,1fr))}}

/* Compact task creation: essentials share rows and priority is explicit. */
.form-fields-stack{display:flex;flex-direction:column;gap:19px}
.form-panel:has(.task-form-grid){max-width:1050px;padding:20px 22px}
.form-panel:has(.task-form-grid) .stack-form{gap:14px}
.task-form-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(170px,.72fr);gap:13px 16px;align-items:start}
.task-form-field-name{grid-column:1/3;grid-row:1}
.task-form-field-is_priority{grid-column:3;grid-row:1}
.task-form-field-categories{grid-column:1/3;grid-row:2}
.task-form-field-due_date{grid-column:3;grid-row:2}
.task-form-criteria{grid-column:1/-1;grid-row:3;padding-top:11px;border-top:1px solid var(--line)}
.task-form-field-description{grid-column:1/3;grid-row:4}
.task-form-field-status{grid-column:3;grid-row:4}
.task-form-grid .field{gap:6px}
.task-form-grid .field input,.task-form-grid .field select{min-height:36px;padding:8px 10px}
.task-form-grid textarea{min-height:76px;padding:8px 10px}
.task-form-grid .criteria-options{grid-template-columns:repeat(7,minmax(0,1fr));gap:9px}
.task-form-grid .criteria-options legend{margin-bottom:5px;font-size:10px}
.task-form-grid .criteria-options label{padding:6px 8px;font-size:10px}
.task-priority-choice{display:flex;align-items:center;gap:9px;min-height:36px;padding:7px 9px;border:1px solid #d7e1f0;border-radius:6px;background:#fff;cursor:pointer}
.task-priority-choice:hover{border-color:#cba55f;background:#fffaf0}
.task-priority-choice:has(input:focus-visible){outline:3px solid #3972d225;border-color:var(--focus)}
.task-priority-choice:has(input:checked){border-color:#d7b46d;background:#fff8e8}
.task-priority-checkbox{flex:none;width:15px!important;height:15px;min-height:0!important;margin:0;padding:0;accent-color:#b0771c}
.task-priority-star{flex:none;color:#b0771c;font-size:17px;line-height:1}
.task-priority-choice strong{display:block;color:#36475d;font-size:11px;line-height:1.2}
.task-priority-choice small{display:block;margin-top:2px;color:#718096;font-size:9px;line-height:1.25}
.quick-priority{flex:none;display:grid;place-items:center;width:31px;height:31px;margin-top:2px;border:1px solid #d7e1f0;border-radius:5px;background:#fff;color:#9a7a42;cursor:pointer}
.quick-priority input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.quick-priority span[aria-hidden]{font-size:16px;line-height:1}
.quick-priority:has(input:checked){border-color:#d7b46d;background:#fff3d7;color:#b0771c}
.quick-priority:has(input:focus-visible){outline:2px solid var(--focus);outline-offset:2px}
@media(max-width:1050px){
  .task-form-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .task-form-field-name{grid-column:1/-1;grid-row:1}
  .task-form-field-categories{grid-column:1/-1;grid-row:2}
  .task-form-field-is_priority{grid-column:1;grid-row:3}
  .task-form-field-due_date{grid-column:2;grid-row:3}
  .task-form-criteria{grid-row:4}
  .task-form-field-description{grid-column:1/-1;grid-row:5}
  .task-form-field-status{grid-column:1;grid-row:6}
  .task-form-grid .criteria-options{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:600px){
  .form-panel:has(.task-form-grid){padding:16px}
  .task-form-grid{display:flex;flex-direction:column;gap:13px}
  .task-form-grid>*{width:100%}
  .task-form-grid .criteria-options{grid-template-columns:repeat(2,minmax(0,1fr))}
  .task-priority-choice{min-height:42px}
}
