/* Riso Press — Command Center design system (single source of truth) */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f3eee2;
  --bg-deep: #e9e1cf;
  --surface: #fbf7ec;
  --surface-1: #ece6d2;
  --surface-2: #d9d0b5;
  --line: #1a2b6d;
  --line-soft: rgba(26, 43, 109, 0.18);
  --text: #14224e;
  --text-dim: #4a5a8a;
  --text-muted: #7a85a8;
  --navy: #1a2b6d;
  --navy-deep: #0d1a4a;
  --pink: #ff5d8f;
  --pink-deep: #e63b6f;
  --rose: #c41e3a;
  --gold: #d4a500;
  --jade: #5aab9e;
  --jade-pale: #c8ebe4;
  --jade-soft: rgba(126, 196, 184, 0.16);
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius-card: 12px;
  --radius-input: 8px;
  --radius-pill: 999px;
  --border-width: 1.5px;
  /* legacy aliases */
  --border: var(--line);
  --border-strong: var(--navy);
  --text-2: var(--text-dim);
  --text-3: var(--text-muted);
  --accent: var(--navy);
  --accent-soft: var(--line-soft);
  --accent-medium: rgba(255, 93, 143, 0.14);
  --surface-inset: var(--surface-1);
  --green: var(--pink);
  --green-bg: rgba(255, 93, 143, 0.12);
  --green-border: var(--pink);
  --red: var(--rose);
  --red-bg: rgba(196, 30, 58, 0.1);
  --red-border: var(--rose);
  --orange: var(--gold);
  --orange-bg: rgba(212, 165, 0, 0.12);
  --orange-border: var(--gold);
  --mono: var(--font-mono);
  --sans: var(--font-sans);
  --radius: var(--radius-input);
  --radius-lg: var(--radius-card);
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: none;
}

/* ---- HEADER ---- */
    .header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 32px;
      height: 56px;
      background: var(--surface);
      border-bottom: var(--border-width) solid var(--border);
      
      position: sticky;
      top: 0;
      z-index: 100;
    }

    .header-brand {
      font-family: var(--font-mono);
      font-size: 14px;
      font-weight: 600;
      color: var(--text);
      letter-spacing: -0.3px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .header-brand .mark {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      background: var(--accent);
      color: white;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0;
    }

    .header-right {
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .header-stats {
      display: flex;
      gap: 10px;
      font-family: var(--font-mono);
      font-size: 12px;
    }

    .stat-badge {
      padding: 3px 10px;
      border-radius: 20px;
      font-weight: 500;
      letter-spacing: -0.2px;
    }

    .stat-badge.pending { background: var(--orange-bg); color: var(--orange); border: var(--border-width) solid var(--orange-border); }
    .stat-badge.executed { background: var(--green-bg); color: var(--green); border: var(--border-width) solid var(--green-border); }
    .stat-badge.failed { background: var(--red-bg); color: var(--red); border: var(--border-width) solid var(--red-border); }

    .header-user {
      display: flex;
      align-items: center;
      gap: 10px;
      padding-left: 16px;
      border-left: var(--border-width) solid var(--border);
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--text-3);
    }

    .btn-logout {
      padding: 4px 10px;
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      color: var(--text-3);
      font-family: var(--font-mono);
      font-size: 11px;
      cursor: pointer;
      transition: all 0.15s;
    }

    .btn-logout:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }

    /* ---- LOGIN ---- */
    .login-screen {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
      background: var(--bg);
    }

    .login-box {
      background: var(--surface);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius-lg);
      padding: 36px 32px;
      width: 380px;
      
    }

    .login-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 6px;
    }

    .login-brand .mark {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      background: var(--accent);
      color: white;
      border-radius: 8px;
      font-family: var(--font-mono);
      font-size: 15px;
      font-weight: 600;
    }

    .login-brand h2 {
      font-family: var(--font-mono);
      font-size: 17px;
      font-weight: 600;
      color: var(--text);
      letter-spacing: -0.3px;
    }

    .login-box > p {
      color: var(--text-3);
      font-size: 13px;
      margin-bottom: 24px;
      margin-top: 4px;
    }

    .login-box .form-group { margin-bottom: 14px; }

    .login-box .form-group label {
      display: block;
      font-size: 12px;
      font-weight: 500;
      margin-bottom: 5px;
      color: var(--text-2);
      font-family: var(--font-mono);
    }

    .login-box .form-group input {
      width: 100%;
      padding: 9px 12px;
      background: var(--surface-2);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius);
      color: var(--text);
      font-family: var(--font-sans);
      font-size: 14px;
      transition: border-color 0.15s;
    }

    .login-box .form-group input:focus {
      outline: none;
      border-color: var(--accent);
      
    }

    .login-error {
      font-size: 13px;
      color: var(--red);
      margin-bottom: 10px;
      padding: 8px 10px;
      background: var(--red-bg);
      border-radius: var(--radius);
      display: none;
    }

    .btn-login {
      width: 100%;
      padding: 10px;
      background: var(--accent);
      color: white;
      border: none;
      border-radius: var(--radius);
      font-family: var(--font-sans);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s;
    }

    .btn-login:hover { opacity: 0.9; }
    .btn-login:disabled { opacity: 0.4; cursor: not-allowed; }

    .login-toggle {
      text-align: center;
      margin-top: 16px;
      font-size: 13px;
      color: var(--text-3);
    }

    .login-toggle a {
      color: var(--accent);
      cursor: pointer;
      text-decoration: none;
      font-weight: 500;
    }

    .login-toggle a:hover { text-decoration: underline; }

    /* ---- LAYOUT ---- */
    .container { max-width: 960px; margin: 0 auto; padding: 24px 24px; }

    /* ---- TABS ---- */
    .tabs {
      display: flex;
      gap: 2px;
      margin-bottom: 20px;
      border-bottom: var(--border-width) solid var(--border);
      padding-bottom: 0;
    }

    .tab {
      padding: 10px 16px;
      border: none;
      background: transparent;
      color: var(--text-3);
      font-family: var(--font-sans);
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      border-bottom: 2px solid transparent;
      margin-bottom: -1px;
      transition: all 0.15s;
    }

    .tab:hover { color: var(--text-2); }

    .tab.active {
      color: var(--accent);
      border-bottom-color: var(--accent);
    }

    .tab-count {
      font-family: var(--font-mono);
      font-size: 11px;
      margin-left: 5px;
      padding: 1px 6px;
      border-radius: 10px;
      background: var(--surface-inset);
      color: var(--text-3);
    }

    .tab.active .tab-count {
      background: var(--accent-soft);
      color: var(--accent);
    }

    /* ---- TASK CARDS ---- */
    .task-list { display: flex; flex-direction: column; gap: 10px; }

    .task-card {
      background: var(--surface);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius-lg);
      padding: 18px 20px;
      transition: box-shadow 0.15s, border-color 0.15s;
      
    }

    .task-card:hover { border-color: var(--border-strong);  }

    .task-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
    }

    .task-type {
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 500;
      padding: 3px 8px;
      border-radius: 4px;
      background: var(--accent-soft);
      color: var(--accent);
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }

    .task-priority {
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 500;
      padding: 3px 8px;
      border-radius: 4px;
    }

    .priority-urgent { background: var(--red-bg); color: var(--red); border: var(--border-width) solid var(--red-border); }
    .priority-high { background: var(--orange-bg); color: var(--orange); border: var(--border-width) solid var(--orange-border); }
    .priority-normal { background: var(--surface-inset); color: var(--text-3); }
    .priority-low { background: var(--surface-inset); color: var(--text-3); opacity: 0.65; }

    .task-recipients {
      font-size: 14px;
      font-weight: 600;
      margin-bottom: 6px;
      color: var(--text);
    }

    .task-subject {
      font-size: 13px;
      color: var(--accent);
      margin-bottom: 8px;
      font-weight: 500;
    }

    .task-body {
      font-size: 13px;
      color: var(--text-2);
      line-height: 1.6;
      margin-bottom: 10px;
      white-space: pre-wrap;
      background: var(--surface-2);
      border: var(--border-width) solid var(--border);
      padding: 10px 12px;
      border-radius: var(--radius);
      max-height: 120px;
      overflow-y: auto;
    }

    .task-body-edit-wrap { position: relative; }
    .task-body-editor {
      font-size: 13px;
      font-family: inherit;
      color: var(--text-1);
      line-height: 1.6;
      margin-bottom: 10px;
      white-space: pre-wrap;
      background: var(--surface-2);
      border: var(--border-width) solid var(--green);
      padding: 10px 12px;
      border-radius: var(--radius);
      min-height: 60px;
      max-height: 200px;
      width: 100%;
      resize: vertical;
      box-sizing: border-box;
    }
    .btn-edit-toggle {
      position: absolute;
      top: 4px;
      right: 4px;
      background: var(--surface);
      border: var(--border-width) solid var(--border);
      color: var(--text-2);
      font-size: 11px;
      padding: 2px 8px;
      border-radius: var(--radius);
      cursor: pointer;
    }
    .btn-edit-toggle:hover { border-color: var(--green); color: var(--green); }

    .task-context {
      font-size: 12px;
      color: var(--text-2);
      padding: 8px 12px;
      border-left: var(--border-width) solid var(--accent);
      margin-bottom: 10px;
      background: var(--accent-soft);
      border-radius: 0 var(--radius) var(--radius) 0;
    }

    .task-context label {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      color: var(--accent);
      display: block;
      margin-bottom: 3px;
    }

    .task-summary {
      font-size: 12px;
      color: var(--text-2);
      padding: 8px 12px;
      border-left: var(--border-width) solid var(--green);
      margin-bottom: 10px;
      background: var(--green-bg);
      border-radius: 0 var(--radius) var(--radius) 0;
    }

    .task-summary label {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      color: var(--green);
      display: block;
      margin-bottom: 3px;
    }

    .task-ref-link {
      display: inline-block;
      font-size: 12px;
      color: var(--accent);
      text-decoration: none;
      margin-bottom: 10px;
      font-family: var(--font-mono);
      font-weight: 500;
    }

    .task-ref-link:hover { text-decoration: underline; }

    .task-error {
      font-size: 12px;
      color: var(--red);
      padding: 8px 12px;
      border-left: var(--border-width) solid var(--red);
      margin-bottom: 10px;
      background: var(--red-bg);
      border-radius: 0 var(--radius) var(--radius) 0;
    }

    .task-error label {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      color: var(--red);
      display: block;
      margin-bottom: 3px;
    }

    .task-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 2px;
    }

    .task-time {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-3);
    }

    .task-reply-all-wrap {
      margin-bottom: 6px;
    }
    .btn-reply-all-toggle {
      background: none;
      border: none;
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--accent);
      cursor: pointer;
      padding: 2px 0;
      font-weight: 500;
    }
    .btn-reply-all-toggle:hover { text-decoration: underline; }
    .task-reply-all-list {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      margin-top: 4px;
      padding: 6px 8px;
      background: var(--surface-2);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius);
    }
    .reply-all-email {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-2);
      background: var(--surface);
      border: var(--border-width) solid var(--border);
      border-radius: 3px;
      padding: 2px 6px;
    }
    .btn-reply-all {
      background: var(--accent);
    }

    .task-actions { display: flex; gap: 8px; flex-wrap: wrap; }

    .btn {
      padding: 7px 16px;
      border: none;
      border-radius: var(--radius);
      font-family: var(--font-sans);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s;
    }

    .btn-approve {
      background: var(--green);
      color: white;
    }

    .btn-approve:hover { opacity: 0.9; }

    .btn-reject {
      background: var(--surface);
      border: var(--border-width) solid var(--border);
      color: var(--text-2);
    }

    .btn-reject:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }

    .btn-small {
      padding: 4px 12px;
      font-size: 12px;
    }

    /* ---- STATUS BADGES ---- */
    .status-badge {
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 500;
      padding: 3px 8px;
      border-radius: 4px;
    }

    .status-executed { background: var(--green-bg); color: var(--green); }
    .status-rejected { background: var(--red-bg); color: var(--red); }
    .status-failed { background: var(--red-bg); color: var(--red); }
    .status-approved { background: var(--orange-bg); color: var(--orange); }

    .review-banner {
      background: rgba(212, 165, 0, 0.15);
      border: var(--border-width) solid #665200;
      border-radius: 6px;
      padding: 8px 12px;
      margin: 8px 0;
      font-size: 12px;
      color: var(--gold);
      line-height: 1.4;
    }
    .review-banner label {
      font-weight: 600;
      display: block;
      margin-bottom: 2px;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .approval-badge {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 500;
      padding: 2px 7px;
      border-radius: 4px;
      background: var(--accent-soft);
      color: var(--accent);
      margin-left: 6px;
    }

    /* ---- RULES ---- */
    .rule-card {
      background: var(--surface);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius-lg);
      padding: 14px 18px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
      
    }

    .rule-info h3 { font-size: 14px; font-weight: 600; margin-bottom: 3px; color: var(--text); }

    .rule-info p {
      font-size: 12px;
      color: var(--text-3);
      font-family: var(--font-mono);
    }

    .rule-toggle {
      width: 38px; height: 22px;
      border-radius: 11px;
      background: var(--border);
      border: none;
      cursor: pointer;
      position: relative;
      transition: background 0.2s;
    }

    .rule-toggle.active { background: var(--green); }

    .rule-toggle::after {
      content: '';
      position: absolute;
      width: 16px; height: 16px;
      border-radius: 50%;
      background: white;
      top: 3px; left: 3px;
      transition: transform 0.2s;
      
    }

    .rule-toggle.active::after { transform: translateX(16px); }

    /* ---- FORMS ---- */
    .add-rule-form {
      background: var(--surface);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius-lg);
      padding: 18px 20px;
      margin-bottom: 14px;
      display: none;
      
    }

    .add-rule-form.show { display: block; }

    .form-row { display: flex; gap: 12px; margin-bottom: 12px; }

    .form-group { flex: 1; }

    .form-group label {
      display: block;
      font-size: 12px;
      font-weight: 500;
      margin-bottom: 4px;
      color: var(--text-2);
      font-family: var(--font-mono);
    }

    .form-group input, .form-group select, .form-group textarea {
      width: 100%;
      padding: 8px 10px;
      background: var(--surface-2);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius);
      color: var(--text);
      font-family: var(--font-sans);
      font-size: 13px;
      transition: border-color 0.15s;
    }

    .form-group textarea {
      resize: vertical;
      min-height: 60px;
      line-height: 1.5;
    }

    .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
      outline: none;
      border-color: var(--accent);
      
    }

    /* ---- CREATE TASK ---- */
    .create-task-bar {
      display: flex;
      justify-content: flex-end;
      margin-bottom: 14px;
    }

    .btn-create {
      padding: 7px 16px;
      border: var(--border-width) solid var(--accent);
      border-radius: var(--radius);
      background: var(--accent-soft);
      color: var(--accent);
      font-family: var(--font-sans);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s;
    }

    .btn-create:hover { background: var(--accent); color: white; }

    .create-task-form {
      background: var(--surface);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius-lg);
      padding: 20px;
      margin-bottom: 16px;
      display: none;
      
    }

    .create-task-form.show { display: block; }

    .create-task-form h3 {
      font-size: 14px;
      font-weight: 600;
      margin-bottom: 14px;
      color: var(--text);
    }

    /* ---- STATES ---- */
    .empty-state {
      text-align: center;
      padding: 56px 20px;
      color: var(--text-3);
    }

    .empty-state h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--text-2); }
    .empty-state p { font-size: 13px; }

    .loading {
      text-align: center;
      padding: 40px;
      color: var(--text-3);
      font-family: var(--font-mono);
      font-size: 13px;
    }

    .hidden { display: none !important; }

    /* ---- ANIMATIONS ---- */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(6px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .task-card { animation: fadeIn 0.25s ease both; }
    .task-card:nth-child(2) { animation-delay: 0.03s; }
    .task-card:nth-child(3) { animation-delay: 0.06s; }
    .task-card:nth-child(4) { animation-delay: 0.09s; }
    .task-card:nth-child(5) { animation-delay: 0.12s; }

    .rule-card { animation: fadeIn 0.2s ease both; }

    /* ---- FEED ---- */
    .feed-status-bar {
      display: flex;
      gap: 16px;
      align-items: center;
      padding: 10px 16px;
      background: var(--surface);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius-lg);
      margin-bottom: 14px;
      
      font-size: 12px;
      font-family: var(--font-mono);
      color: var(--text-3);
      flex-wrap: wrap;
    }

    .poller-status {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .poller-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: inline-block;
    }

    .poller-dot.ok { background: var(--green); }
    .poller-dot.error { background: var(--red); }
    .poller-dot.unknown { background: var(--border-strong); }

    .feed-filters {
      display: flex;
      gap: 6px;
      margin-bottom: 14px;
    }

    .feed-filter-btn {
      padding: 5px 14px;
      border: var(--border-width) solid var(--border);
      border-radius: 20px;
      background: var(--surface);
      color: var(--text-3);
      font-family: var(--font-sans);
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.15s;
    }

    .feed-filter-btn:hover { border-color: var(--border-strong); color: var(--text-2); }

    .feed-filter-btn.active {
      background: var(--accent-soft);
      border-color: var(--accent);
      color: var(--accent);
    }

    .feed-card {
      background: var(--surface);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius-lg);
      padding: 16px 18px;
      margin-bottom: 8px;
      
      transition: box-shadow 0.15s, border-color 0.15s;
      animation: fadeIn 0.25s ease both;
    }

    .feed-card:hover { border-color: var(--border-strong);  }

    .feed-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
    }

    .feed-card-header-left {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .source-badge {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      padding: 2px 7px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }

    .source-badge.gmail { background: rgba(196, 30, 58, 0.12); color: var(--rose); border: var(--border-width) solid var(--rose); }
    .source-badge.google_chat { background: var(--line-soft); color: var(--navy); border: var(--border-width) solid var(--navy); }

    .feed-indicators {
      display: flex;
      gap: 5px;
    }

    .feed-indicator {
      font-family: var(--font-mono);
      font-size: 10px;
      padding: 2px 6px;
      border-radius: 3px;
      background: var(--surface-inset);
      color: var(--text-3);
    }

    .feed-from {
      font-size: 14px;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 3px;
    }

    .feed-subject {
      font-size: 13px;
      color: var(--accent);
      font-weight: 500;
      margin-bottom: 6px;
    }

    .feed-body-preview {
      font-size: 13px;
      color: var(--text-2);
      line-height: 1.5;
      background: var(--surface-2);
      border: var(--border-width) solid var(--border);
      padding: 8px 12px;
      border-radius: var(--radius);
      max-height: 80px;
      overflow: hidden;
      margin-bottom: 8px;
    }

    .feed-card-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .feed-time {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-3);
    }

    .feed-labels {
      display: flex;
      gap: 4px;
      flex-wrap: wrap;
    }

    .feed-label {
      font-family: var(--font-mono);
      font-size: 10px;
      padding: 1px 5px;
      border-radius: 3px;
      background: var(--surface-inset);
      color: var(--text-3);
    }

    .feed-top-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }

    .feed-top-bar .feed-filters { margin-bottom: 0; }

    .feed-settings-panel {
      background: var(--surface);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius-lg);
      padding: 20px;
      margin-bottom: 16px;
      display: flex;
      gap: 32px;
    }

    .feed-settings-section { flex: 1; }

    .feed-settings-section h4 {
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-2);
      margin: 0 0 4px;
    }

    .feed-settings-desc {
      font-size: 12px;
      color: var(--text-3);
      margin: 0 0 10px;
    }

    .feed-settings-add {
      display: flex;
      gap: 8px;
      margin-bottom: 10px;
    }

    .feed-settings-add .form-input { flex: 1; }

    .blocklist-items { display: flex; flex-direction: column; gap: 6px; }

    .blocklist-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: var(--surface-inset);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius);
      padding: 6px 10px;
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--text);
    }

    .blocklist-item-remove {
      background: none;
      border: none;
      color: var(--text-3);
      cursor: pointer;
      font-size: 14px;
      padding: 0 2px;
      line-height: 1;
    }

    .blocklist-item-remove:hover { color: var(--red); }

    .blocklist-empty {
      font-size: 12px;
      color: var(--text-3);
      font-style: italic;
    }

    .pagination {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      padding: 16px 0 8px;
    }

    .pagination-info {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--text-3);
      min-width: 120px;
      text-align: center;
    }

    .tab-badge {
      font-family: var(--font-mono);
      font-size: 10px;
      min-width: 16px;
      height: 16px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      background: var(--red);
      color: white;
      margin-left: 5px;
      padding: 0 4px;
    }

    .tab-badge.zero { display: none; }

    /* ---- ESCALATIONS ---- */
    .escalation-panel { padding: 0; }

    .escalation-filter-bar {
      display: flex;
      gap: 8px;
      padding: 16px 0 12px;
      align-items: center;
    }

    .escalation-filter-btn {
      padding: 4px 12px;
      border-radius: 20px;
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 500;
      border: var(--border-width) solid var(--border);
      background: var(--surface);
      color: var(--text-3);
      cursor: pointer;
      transition: all 0.15s;
    }

    .escalation-filter-btn:hover { border-color: var(--accent); color: var(--accent); }
    .escalation-filter-btn.active {
      background: var(--accent);
      border-color: var(--accent);
      color: white;
    }

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

    .escalation-card {
      background: var(--surface);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius-lg);
      padding: 14px 16px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .escalation-card.active { border-left: var(--border-width) solid var(--red); }
    .escalation-card.acknowledged { border-left: var(--border-width) solid var(--border-strong); opacity: 0.7; }

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

    .escalation-type-badge {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .escalation-type-badge.alert { background: var(--red-bg); color: var(--red); border: var(--border-width) solid var(--red-border); }
    .escalation-type-badge.eta { background: var(--orange-bg); color: var(--orange); border: var(--border-width) solid var(--orange-border); }

    .escalation-service {
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 600;
      color: var(--text);
    }

    .escalation-time {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-3);
      margin-left: auto;
    }

    .escalation-message {
      font-size: 13px;
      color: var(--text-2);
      line-height: 1.5;
    }

    .escalation-footer {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 4px;
    }

    .escalation-meta {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-3);
    }

    .escalation-actions { display: flex; gap: 6px; margin-left: auto; }

    .btn-acknowledge {
      padding: 4px 12px;
      border: var(--border-width) solid var(--green-border);
      border-radius: var(--radius);
      background: var(--green-bg);
      color: var(--green);
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.15s;
    }

    .btn-acknowledge:hover { background: var(--green); color: white; }

    .btn-delete-esc {
      padding: 4px 10px;
      border: var(--border-width) solid var(--red-border);
      border-radius: var(--radius);
      background: var(--red-bg);
      color: var(--red);
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.15s;
    }

    .btn-delete-esc:hover { background: var(--red); color: white; }

    .escalation-empty {
      text-align: center;
      padding: 48px 24px;
      color: var(--text-3);
      font-family: var(--font-mono);
      font-size: 13px;
    }

    /* ---- KANBAN ---- */
    .kanban-board {
      display: flex;
      gap: 12px;
      overflow-x: auto;
      padding-bottom: 12px;
      align-items: flex-start;
    }

    .kanban-col {
      flex: 1;
      min-width: 200px;
      background: var(--surface);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius-lg);
      display: flex;
      flex-direction: column;
      max-height: calc(100vh - 200px);
      
    }

    .kanban-col-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 11px 14px 9px;
      border-bottom: var(--border-width) solid var(--border);
      border-radius: var(--radius-lg) var(--radius-lg) 0 0;
      background: var(--surface);
      position: sticky;
      top: 0;
      z-index: 1;
    }

    .kanban-col-title {
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-3);
    }
    .kanban-col-title.stage-TODO       { color: var(--text-3); }
    .kanban-col-title.stage-IN_PROGRESS{ color: var(--accent); }
    .kanban-col-title.stage-BLOCKED    { color: var(--red); }
    .kanban-col-title.stage-DONE       { color: var(--green); }

    .kanban-col-count {
      font-family: var(--font-mono);
      font-size: 11px;
      padding: 1px 7px;
      border-radius: 10px;
      background: var(--surface-inset);
      color: var(--text-3);
      font-weight: 500;
    }

    .kanban-col[data-stage="IN_PROGRESS"] .kanban-col-header {
      border-top: var(--border-width) solid var(--accent);
    }
    .kanban-col[data-stage="BLOCKED"] .kanban-col-header {
      border-top: var(--border-width) solid var(--red);
    }
    .kanban-col[data-stage="DONE"] .kanban-col-header {
      border-top: var(--border-width) solid var(--green);
    }

    .kanban-quick-add {
      padding: 8px 10px;
      border-bottom: var(--border-width) solid var(--border);
    }

    .kanban-quick-input {
      width: 100%;
      padding: 7px 10px;
      background: var(--surface-2);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius);
      color: var(--text);
      font-family: var(--font-sans);
      font-size: 13px;
      transition: border-color 0.15s;
    }
    .kanban-quick-input:focus {
      outline: none;
      border-color: var(--accent);
      
    }
    .kanban-quick-input::placeholder { color: var(--text-3); }

    .kanban-cards {
      flex: 1;
      overflow-y: auto;
      padding: 8px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      min-height: 80px;
      transition: background 0.15s;
    }

    .kanban-cards.drag-over {
      background: var(--accent-soft);
      border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }

    .kanban-card {
      background: var(--surface-2);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius);
      padding: 10px 11px;
      cursor: grab;
      transition: box-shadow 0.15s, border-color 0.15s, opacity 0.15s;
      user-select: none;
      animation: fadeIn 0.2s ease both;
    }
    .kanban-card:hover { border-color: var(--border-strong);  }
    .kanban-card.dragging { opacity: 0.35; cursor: grabbing; }

    .kanban-card-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 6px;
      margin-bottom: 6px;
    }

    .kanban-card-title {
      font-size: 13px;
      font-weight: 500;
      color: var(--text);
      line-height: 1.4;
      flex: 1;
      word-break: break-word;
      cursor: text;
      border-radius: 3px;
      padding: 1px 3px;
      margin: -1px -3px;
    }
    .kanban-card-title:focus {
      outline: none;
      background: var(--surface);
      
    }

    .kanban-card-delete {
      background: none;
      border: none;
      color: var(--text-3);
      cursor: pointer;
      font-size: 13px;
      padding: 0;
      line-height: 1;
      opacity: 0;
      transition: opacity 0.12s, color 0.12s;
      flex-shrink: 0;
      margin-top: 1px;
    }
    .kanban-card:hover .kanban-card-delete { opacity: 1; }
    .kanban-card-delete:hover { color: var(--red); }

    .kanban-card-desc {
      font-size: 12px;
      color: var(--text-3);
      line-height: 1.4;
      margin-bottom: 7px;
      white-space: pre-wrap;
    }

    .kanban-card-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .kanban-card-time {
      font-family: var(--font-mono);
      font-size: 10px;
      color: var(--text-3);
    }

    /* ---- KANBAN SEND MODAL ---- */
    .km-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.55);
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }
    .km-modal {
      background: var(--surface);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius-lg);
      width: 100%;
      max-width: 560px;
      max-height: 85vh;
      display: flex;
      flex-direction: column;
      
    }
    .km-header {
      padding: 16px 18px 12px;
      border-bottom: var(--border-width) solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .km-header h3 { font-size: 14px; font-weight: 600; margin: 0; }
    .km-close {
      background: none;
      border: none;
      color: var(--text-3);
      cursor: pointer;
      font-size: 16px;
      line-height: 1;
      padding: 2px 4px;
    }
    .km-close:hover { color: var(--text); }
    .km-body {
      overflow-y: auto;
      padding: 16px 18px;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }
    .km-context-block {
      background: var(--surface-inset);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius);
      padding: 12px 14px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .km-context-block label {
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-3);
      font-family: var(--font-mono);
    }
    .km-context-row { display: flex; flex-direction: column; gap: 2px; }
    .km-context-value {
      font-size: 12px;
      color: var(--text-2);
      white-space: pre-wrap;
      word-break: break-word;
      max-height: 100px;
      overflow-y: auto;
    }
    .km-context-value a { color: var(--accent); }
    .km-field { display: flex; flex-direction: column; gap: 5px; }
    .km-field label { font-size: 11px; font-weight: 500; color: var(--text-2); }
    .km-field input, .km-field select {
      background: var(--surface-2);
      border: var(--border-width) solid var(--border);
      border-radius: var(--radius);
      color: var(--text);
      font-family: var(--font-sans);
      font-size: 13px;
      padding: 7px 10px;
      width: 100%;
    }
    .km-field input:focus, .km-field select:focus {
      outline: none;
      border-color: var(--accent);
      
    }
    .km-row { display: flex; gap: 10px; }
    .km-row .km-field { flex: 1; }
    .km-footer {
      padding: 12px 18px;
      border-top: var(--border-width) solid var(--border);
      display: flex;
      gap: 8px;
      justify-content: flex-end;
    }
  

        .reports-tree { padding: 16px 0; }
        .reports-tree-empty { padding: 24px; color: var(--text-3); text-align: center; }
        .reports-year { margin-bottom: 12px; }
        .reports-year-header, .reports-month-header, .reports-date-header {
          cursor: pointer; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border);
          border-radius: var(--radius); display: flex; align-items: center; gap: 10px;
          font-family: var(--sans); font-weight: 500; user-select: none;
        }
        .reports-year-header { font-size: 16px; }
        .reports-month-header { font-size: 14px; background: var(--surface-2); }
        .reports-date-header { font-size: 13px; background: var(--surface-2); padding: 8px 12px; }
        .reports-year-header:hover, .reports-month-header:hover, .reports-date-header:hover { background: var(--accent-soft); }
        .reports-children { padding-left: 20px; margin-top: 6px; }
        .reports-caret { font-family: var(--mono); font-size: 11px; color: var(--text-3); width: 12px; }
        .reports-count { font-family: var(--mono); font-size: 11px; color: var(--text-3); margin-left: auto; }
        .reports-entry {
          padding: 10px 14px; cursor: pointer; border-radius: var(--radius); display: flex;
          align-items: center; gap: 10px; margin: 4px 0; background: var(--surface); border: 1px solid var(--border);
        }
        .reports-entry:hover { background: var(--accent-soft); border-color: var(--accent); }
        .reports-entry-type {
          font-family: var(--mono); font-size: 11px; padding: 2px 8px; background: var(--accent-soft);
          color: var(--accent); border-radius: 3px; text-transform: uppercase; letter-spacing: 0.3px;
        }
        .reports-entry-title { flex: 1; font-size: 14px; color: var(--text); }
        .reports-entry-summary { font-size: 12px; color: var(--text-3); margin-left: 8px; }
        .reports-viewer { display: flex; flex-direction: column; height: calc(100vh - 130px); }
        .reports-viewer-header {
          display: flex; align-items: center; gap: 14px; padding: 12px 16px;
          background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
          margin-bottom: 8px;
        }
        .reports-viewer-title { flex: 1; font-weight: 600; }
        .reports-viewer iframe { flex: 1; width: 100%; border: 1px solid var(--border); border-radius: var(--radius); background: white; }
        .reports-back-btn {
          padding: 6px 12px; font-size: 13px; cursor: pointer; background: var(--surface-2);
          border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--sans);
        }
        .reports-back-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
      

/* ---- Riso Press base ---- */
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2.page-title, .login-brand h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2.page-title, .login-brand h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }

a:hover, .tab:hover, .task-ref-link:hover, .btn-reply-all-toggle:hover {
  text-decoration: none;
  text-decoration-line: underline;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

/* Card chrome — task lists use soft jade offset (readable); others keep pink accent */
.task-card, .rule-card, .feed-card, .login-box, .add-rule-form, .create-task-form,
.feed-status-bar, .kanban-col, .escalation-card, .km-modal, .reports-entry,
.reports-year-header, .reports-month-header, .reports-date-header {
  position: relative;
  background: var(--surface);
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: none;
}

.task-card {
  isolation: isolate;
  z-index: 0;
}

/* Task queue cards: pale jade offset — not pink (legibility for dates/summary) */
.task-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--jade-pale);
  opacity: 0.55;
  transform: translate(3px, 3px);
  z-index: -1;
}

.rule-card::before, .feed-card::before, .login-box::before,
.add-rule-form::before, .create-task-form::before, .feed-status-bar::before,
.kanban-col::before, .escalation-card::before, .km-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--pink);
  transform: translate(4px, 4px);
  z-index: -1;
}

.task-card:hover, .feed-card:hover, .rule-card:hover {
  border-color: var(--navy);
  box-shadow: none;
}

.task-card .task-time,
.task-card .task-footer,
.task-card .task-recipients,
.task-card .task-body,
.task-card .task-subject {
  position: relative;
  z-index: 1;
}

.task-card .task-time {
  color: var(--text-dim);
  font-weight: 500;
}

/* Task action UX — in-place loading, smooth dismiss (no full-list flash) */
.task-list {
  transition: gap 0.3s ease;
}

.task-card {
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    max-height 0.32s ease,
    margin-bottom 0.32s ease,
    padding 0.32s ease,
    border-width 0.2s ease,
    border-color 0.15s;
  overflow: hidden;
}

.task-card--busy {
  opacity: 0.88;
  pointer-events: none;
}

.task-card--busy .task-actions .btn.is-loading {
  pointer-events: none;
  cursor: wait;
  opacity: 1;
}

.task-card--exit {
  opacity: 0;
  transform: translateY(-6px) scale(0.985);
  max-height: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-width: 0 !important;
}

.task-card--exit::before {
  opacity: 0;
}

.btn.is-loading {
  cursor: wait;
  min-width: 6.5em;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Header = editorial masthead */
.header {
  background: var(--bg-deep);
  border-bottom: var(--border-width) solid var(--line);
  box-shadow: none;
  height: 64px;
}

.header-brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.header-brand .mark {
  background: var(--navy);
  color: var(--bg);
  border-radius: var(--radius-card);
  border: var(--border-width) solid var(--line);
  font-family: var(--font-mono);
}

/* Tabs */
.tabs { border-bottom: var(--border-width) solid var(--line); margin-bottom: 24px; gap: 4px; }
.tab {
  border-radius: var(--radius-pill) var(--radius-pill) 0 0;
  font-weight: 600;
}
.tab.active {
  color: var(--navy);
  border-bottom: 3px solid var(--pink);
  background: var(--surface);
}
.tab.active .tab-count { background: rgba(255, 93, 143, 0.15); color: var(--pink-deep); }

/* Buttons */
.btn, .btn-login, .btn-create, .btn-approve, .btn-reject, .btn-logout,
.btn-acknowledge, .btn-delete-esc, .feed-filter-btn, .escalation-filter-btn,
.reports-back-btn, .btn-secondary {
  border-radius: var(--radius-pill);
  font-weight: 700;
  border: var(--border-width) solid var(--line);
  box-shadow: none;
}

.btn-approve, .btn-login, .btn-create:hover, .escalation-filter-btn.active {
  background: var(--navy);
  color: var(--bg);
  border-color: var(--line);
}

.btn-reject, .btn-secondary, .btn-logout, .btn-create, .feed-filter-btn {
  background: var(--bg);
  color: var(--navy);
}

.btn-reject:hover, .btn-secondary:hover, .btn-logout:hover, .feed-filter-btn:hover {
  background: var(--pink);
  color: var(--bg);
  border-color: var(--line);
}

.btn-create {
  background: var(--bg);
  color: var(--navy);
  border-color: var(--line);
}
.btn-create:hover { background: var(--pink); color: var(--bg); }

/* Pills / badges */
.stat-badge, .status-badge, .task-type, .task-priority, .source-badge,
.approval-badge, .escalation-type-badge, .tab-count, .kanban-col-count {
  border-radius: var(--radius-pill);
  border: var(--border-width) solid var(--line);
  font-weight: 700;
}

.stat-badge.pending, .status-approved, .escalation-type-badge.eta {
  background: rgba(212, 165, 0, 0.12);
  color: var(--gold);
  border-color: var(--gold);
}
.stat-badge.executed, .status-executed, .priority-normal {
  background: rgba(255, 93, 143, 0.12);
  color: var(--pink-deep);
  border-color: var(--pink);
}
.stat-badge.failed, .status-failed, .status-rejected, .priority-urgent,
.escalation-type-badge.alert {
  background: rgba(196, 30, 58, 0.1);
  color: var(--rose);
  border-color: var(--rose);
}
.priority-high {
  background: rgba(212, 165, 0, 0.12);
  color: var(--gold);
  border-color: var(--gold);
}

.task-type, .tab.active .tab-count, .feed-filter-btn.active, .approval-badge {
  background: rgba(255, 93, 143, 0.12);
  color: var(--navy);
  border-color: var(--navy);
}

/* Forms / inputs */
.form-group input, .form-group select, .form-group textarea,
.login-box .form-group input, .kanban-quick-input, .km-field input, .km-field select {
  background: var(--bg);
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius-input);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus,
.login-box .form-group input:focus, .kanban-quick-input:focus, .km-field input:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 4px 4px 0 var(--pink);
}

/* Context blocks */
.task-context, .task-summary, .task-error {
  border-left: var(--border-width) solid var(--line);
  border-radius: 0 var(--radius-input) var(--radius-input) 0;
  background: var(--surface-1);
}
.task-context { border-left-color: var(--navy); }
.task-context label { color: var(--navy); }
.task-summary { border-left-color: var(--jade); background: var(--jade-soft); }
.task-summary label { color: var(--jade); }
.task-error { border-left-color: var(--rose); }

.task-card .task-subject { color: var(--navy); font-weight: 600; }
.feed-subject { color: var(--pink-deep); }

/* Tables / lists hover */
.task-body, .feed-body-preview, .task-reply-all-list {
  border: var(--border-width) solid var(--line);
  background: var(--bg);
}

/* Kanban */
.kanban-col-header { background: var(--bg-deep); }
.kanban-col[data-stage="IN_PROGRESS"] .kanban-col-header { border-top: var(--border-width) solid var(--pink); }
.kanban-col[data-stage="BLOCKED"] .kanban-col-header { border-top: var(--border-width) solid var(--rose); }
.kanban-col[data-stage="DONE"] .kanban-col-header { border-top: var(--border-width) solid var(--navy); }
.kanban-col-title.stage-IN_PROGRESS { color: var(--pink-deep); }
.kanban-col-title.stage-BLOCKED { color: var(--rose); }
.kanban-col-title.stage-DONE { color: var(--navy); }
.kanban-cards.drag-over { background: rgba(255, 93, 143, 0.06); }
.kanban-card:hover { background: rgba(255, 93, 143, 0.06); border-color: var(--line); }

/* Modal overlay */
.km-overlay { background: rgba(20, 34, 78, 0.45); }

/* Poller dots */
.poller-dot.ok { background: var(--pink); }
.poller-dot.error { background: var(--rose); }
.poller-dot.unknown { background: var(--surface-2); border: var(--border-width) solid var(--line); }

/* Section divider utility */
.riso-divider {
  display: block;
  width: 100%;
  height: 12px;
  margin: 24px 0;
  border: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 12'%3E%3Cpath d='M0 6 Q150 0 300 6 T600 6 T900 6 T1200 6' fill='none' stroke='%231a2b6d' stroke-width='1.5'/%3E%3C/svg%3E") repeat-x center;
  opacity: 0.5;
}

.container { padding: 24px; max-width: 1040px; }

/* Gmail-style undo toast */
.undo-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--navy);
  color: var(--cream);
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-family: var(--font-sans);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  z-index: 9999;
  min-width: 200px;
  overflow: hidden;
  animation: undoToastIn 0.2s ease;
}
.undo-toast--out { animation: undoToastOut 0.2s ease forwards; }
.undo-toast-msg { flex: 1; }
.undo-toast-btn {
  background: none;
  border: 1px solid var(--pink);
  color: var(--pink);
  border-radius: var(--radius);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.03em;
  white-space: nowrap;
  font-family: var(--font-sans);
}
.undo-toast-btn:hover { background: var(--pink); color: var(--bg); }
.undo-toast-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  animation: undoBarShrink 3s linear forwards;
}
@keyframes undoToastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes undoToastOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(12px); }
}
@keyframes undoBarShrink {
  from { width: 100%; }
  to   { width: 0%; }
}

/* Reports (merged) */
