﻿:root {
      --accent: #ef3124;
      --accent-dark: #c8281e;
      --accent-soft: rgba(239, 49, 36, 0.08);
      --control-icon-filter: none;
      --surface: #ffffff;
      --surface-alt: #f0f1f4;
      --text: #171717;
      --muted: #666b76;
      --border: rgba(23, 23, 23, 0.08);
      --shadow: 0 18px 50px rgba(16, 24, 40, 0.08);
      --radius-xl: 28px;
      --radius-lg: 22px;
      --radius-md: 16px;
      --font: "Segoe UI Variable", "Segoe UI", "Helvetica Neue", sans-serif;
      color-scheme: light;
    }

    :root[data-theme="dark"] {
      --accent: #ff493f;
      --accent-dark: #ef3124;
      --accent-soft: rgba(255, 73, 63, 0.14);
      --control-icon-filter: invert(1) brightness(1.35);
      --surface: #171b24;
      --surface-alt: #10141c;
      --text: #f5f7fb;
      --muted: #aab2c0;
      --border: rgba(255, 255, 255, 0.09);
      --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
      color-scheme: dark;
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      font-family: var(--font);
      color: var(--text);
      background:
        radial-gradient(circle at top left, rgba(239, 49, 36, 0.12), transparent 32%),
        linear-gradient(180deg, #fcfcfd 0%, #f2f3f6 100%);
      min-height: 100vh;
    }

    :root[data-theme="dark"] body {
      background:
        radial-gradient(circle at top left, rgba(255, 73, 63, 0.18), transparent 34%),
        linear-gradient(180deg, #0c0f15 0%, #121722 100%);
    }

    button,
    input,
    textarea,
    select {
      font: inherit;
      color: inherit;
    }

    input,
    textarea,
    select {
      color-scheme: inherit;
    }

    input::placeholder,
    textarea::placeholder {
      color: color-mix(in srgb, var(--muted) 72%, transparent);
    }

    input[type="date"]::-webkit-calendar-picker-indicator {
      cursor: pointer;
      filter: var(--control-icon-filter);
      opacity: 0.82;
    }

    input[type="number"] {
      appearance: textfield;
      -moz-appearance: textfield;
    }

    input[type="number"]::-webkit-outer-spin-button,
    input[type="number"]::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }

    .app-shell {
      display: grid;
      grid-template-columns: 320px minmax(0, 1fr);
      gap: 24px;
      padding: 24px;
      min-height: 100vh;
    }

    .panel {
      background: rgba(255, 255, 255, 0.92);
      border: 1px solid rgba(255, 255, 255, 0.6);
      backdrop-filter: blur(12px);
      border-radius: var(--radius-xl);
      box-shadow: var(--shadow);
    }

    :root[data-theme="dark"] .panel {
      background: rgba(23, 27, 36, 0.92);
      border-color: rgba(255, 255, 255, 0.08);
    }

    .sidebar {
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 18px;
    }

    .brand {
      background: linear-gradient(135deg, #1d1d1f 0%, #2f2f34 35%, var(--accent) 100%);
      color: white;
      border-radius: var(--radius-lg);
      padding: 24px;
      display: grid;
      gap: 10px;
    }

    .brand-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .brand h1,
    .content-head h2,
    .result-header h3,
    .column-card h3 {
      margin: 0;
    }

    .eyebrow {
      font-size: 12px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      opacity: 0.72;
    }

    .brand p,
    .content-head p,
    .result-empty p,
    .status-banner p {
      margin: 0;
      color: inherit;
    }

    .categories {
      display: grid;
      gap: 12px;
    }

    .tool-tabs {
      display: grid;
      gap: 10px;
    }

    .tool-tab {
      width: 100%;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text);
      border-radius: var(--radius-md);
      padding: 16px;
      text-align: left;
      display: grid;
      gap: 6px;
      cursor: pointer;
      transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    }

    .tool-tab:hover {
      transform: translateY(-1px);
    }

    .tool-tab.active {
      background: linear-gradient(135deg, rgba(239, 49, 36, 0.14), rgba(239, 49, 36, 0.02));
      border-color: rgba(239, 49, 36, 0.32);
      box-shadow: 0 14px 30px rgba(239, 49, 36, 0.1);
    }

    .tool-tab span {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.35;
    }

    .category-button {
      width: 100%;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text);
      border-radius: var(--radius-md);
      padding: 18px;
      text-align: left;
      display: grid;
      gap: 8px;
      cursor: pointer;
      transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    }

    .category-button:hover,
    .choice:hover,
    .ghost-button:hover,
    .toolbar-button:hover {
      transform: translateY(-1px);
    }

    .category-button.active {
      background: linear-gradient(135deg, rgba(239, 49, 36, 0.14), rgba(239, 49, 36, 0.02));
      border-color: rgba(239, 49, 36, 0.32);
      box-shadow: 0 14px 30px rgba(239, 49, 36, 0.1);
    }

    .category-button strong {
      font-size: 16px;
      font-weight: 700;
    }

    .category-button span {
      color: var(--muted);
      font-size: 13px;
    }

    .ghost-button,
    .toolbar-button {
      appearance: none;
      border: 0;
      border-radius: 999px;
      padding: 12px 18px;
      cursor: pointer;
      transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    }

    .ghost-button {
      background: rgba(255, 255, 255, 0.16);
      color: white;
      width: fit-content;
      text-decoration: none;
    }

    .ghost-button.subtle {
      background: rgba(255, 255, 255, 0.08);
    }

    .toolbar-button {
      background: var(--surface-alt);
      color: var(--text);
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .toolbar-button.primary {
      background: var(--accent);
      color: white;
    }

    .main {
      display: grid;
      gap: 24px;
      align-content: start;
    }

    .content-head {
      padding: 18px 22px;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      align-self: start;
    }

    .content-head p {
      color: var(--muted);
      max-width: 620px;
      font-size: 14px;
      line-height: 1.45;
    }

    .toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: flex-end;
    }

    .category-strip {
      padding: 18px 22px;
      display: grid;
      gap: 14px;
    }

    .category-strip-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      flex-wrap: wrap;
    }

    .category-strip-head span {
      color: var(--muted);
      font-size: 13px;
    }

    .category-tabs {
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .status-banner {
      padding: 16px 20px;
      border-radius: var(--radius-md);
      background: linear-gradient(135deg, rgba(239, 49, 36, 0.1), rgba(255, 255, 255, 0.8));
      border: 1px solid rgba(239, 49, 36, 0.12);
      display: none;
      align-items: center;
      gap: 12px;
      color: var(--muted);
    }

    .status-banner.visible {
      display: flex;
    }

    .layout-main {
      display: grid;
      grid-template-columns: 1fr;
      gap: 24px;
      align-items: start;
    }

    .tool-card {
      padding: 24px;
      border-radius: var(--radius-lg);
      background: var(--surface);
      border: 1px solid var(--border);
      box-shadow: var(--shadow);
      display: grid;
      gap: 20px;
      min-width: 0;
    }

    .tool-card-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
    }

    .tool-card h3,
    .tool-card h4 {
      margin: 0;
    }

    .tool-card p {
      margin: 8px 0 0;
      color: var(--muted);
      line-height: 1.5;
    }

    .tool-form-grid {
      display: grid;
      gap: 14px;
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tool-field {
      display: grid;
      gap: 8px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 600;
    }

    .tool-field input {
      width: 100%;
      border: 1px solid var(--border);
      background: var(--surface-alt);
      color: var(--text);
      border-radius: 14px;
      padding: 12px 14px;
      outline: none;
      font: inherit;
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .tool-field input:focus {
      border-color: rgba(239, 49, 36, 0.34);
      box-shadow: 0 0 0 4px rgba(239, 49, 36, 0.1);
    }

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

    .tool-switch {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      border-radius: 999px;
      background: var(--surface-alt);
      color: var(--muted);
      cursor: pointer;
      user-select: none;
    }

    .tool-switch input {
      width: 18px;
      height: 18px;
      margin: 0;
      accent-color: var(--accent);
    }

    .tool-alert {
      padding: 14px 16px;
      border-radius: var(--radius-md);
      background: rgba(239, 49, 36, 0.08);
      border: 1px solid rgba(239, 49, 36, 0.18);
      color: var(--accent);
      line-height: 1.45;
    }

    .tool-empty {
      margin: 0;
      color: var(--muted);
      line-height: 1.5;
    }

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

    .tool-table-wrap .tool-empty {
      padding: 18px 20px;
      margin: 0;
    }

    .tool-table {
      width: 100%;
      min-width: 700px;
      border-collapse: collapse;
      font-size: 13px;
      background: var(--surface);
      color: var(--text);
    }

    .tool-table th,
    .tool-table td {
      padding: 10px 12px;
      text-align: center;
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
    }

    .tool-table thead {
      background: var(--accent);
      color: white;
    }

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

    .detail-col {
      transition: opacity 0.2s ease, width 0.2s ease, padding 0.2s ease;
    }

    .hide-details .detail-col {
      opacity: 0;
      width: 0;
      padding: 0;
      border: 0;
      font-size: 0;
    }

    .installment-layout {
      display: grid;
      gap: 16px;
      grid-template-columns: minmax(220px, 0.85fr) minmax(260px, 1.15fr) minmax(220px, 0.85fr);
      align-items: start;
    }

    .tool-subcard {
      padding: 18px;
      border-radius: var(--radius-md);
      background: var(--surface-alt);
      border: 1px solid var(--border);
      display: grid;
      gap: 14px;
      min-width: 0;
    }

    .installment-list {
      display: grid;
      gap: 10px;
    }

    .installment-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
    }

    .installment-item:last-child {
      border-bottom: 0;
    }

    .installment-item div:first-child {
      display: grid;
      gap: 4px;
      min-width: 0;
    }

    .installment-item span {
      color: var(--muted);
      font-size: 13px;
    }

    .installment-item-actions {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex: none;
    }

    .badge {
      padding: 5px 9px;
      border-radius: 999px;
      background: var(--accent);
      color: white;
      font-size: 12px;
      font-weight: 700;
    }

    .installment-item .badge {
      color: white;
    }

    .chip-remove {
      width: 30px;
      height: 30px;
      border: 0;
      border-radius: 999px;
      background: color-mix(in srgb, var(--accent) 14%, transparent);
      color: var(--accent);
      cursor: pointer;
      font: inherit;
      font-size: 18px;
      line-height: 1;
    }

    .tool-total {
      padding-top: 4px;
      color: var(--text);
      font-weight: 800;
    }

    .full-width {
      width: 100%;
    }

    .columns-grid {
      display: grid;
      gap: 18px;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .column-card,
    .result-card,
    .loading-card {
      padding: 22px;
      border-radius: var(--radius-lg);
      background: var(--surface);
      border: 1px solid var(--border);
      box-shadow: var(--shadow);
      min-width: 0;
    }

    .column-card {
      display: grid;
      gap: 16px;
      min-height: 220px;
      align-content: start;
    }

    .column-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .choices {
      display: grid;
      gap: 12px;
      min-height: 0;
    }

    .column-search {
      width: 100%;
      border: 1px solid rgba(23, 23, 23, 0.08);
      background: linear-gradient(180deg, #fafafb, #f2f3f6);
      color: var(--text);
      border-radius: 14px;
      padding: 12px 14px;
      outline: none;
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .column-search:focus {
      border-color: rgba(239, 49, 36, 0.28);
      box-shadow: 0 0 0 4px rgba(239, 49, 36, 0.1);
    }

    .choice-scroll {
      max-height: 280px;
      overflow-y: auto;
      padding: 6px 10px 18px 4px;
      margin: -6px -10px -18px -4px;
      scrollbar-gutter: stable;
    }

    .choice-list {
      display: grid;
      gap: 8px;
    }

    .choice {
      appearance: none;
      border: 1px solid var(--border);
      background: var(--surface-alt);
      color: var(--text);
      border-radius: 14px;
      padding: 12px 16px;
      cursor: pointer;
      transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
      width: 100%;
      min-width: 0;
      text-align: left;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      position: relative;
    }

    .choice-label {
      min-width: 0;
      overflow-wrap: anywhere;
    }

    .choice-marker {
      flex: none;
      width: 10px;
      height: 10px;
      border-radius: 999px;
      background: rgba(23, 23, 23, 0.14);
    }

    .choice.active {
      background: linear-gradient(135deg, var(--accent), var(--accent-dark));
      color: white;
      border-color: transparent;
      box-shadow: 0 10px 18px rgba(239, 49, 36, 0.24);
      z-index: 1;
    }

    .choice.active .choice-marker {
      background: white;
    }

    .muted-note {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.45;
    }

    .result-card {
      display: grid;
      gap: 18px;
      background:
        radial-gradient(circle at top right, rgba(239, 49, 36, 0.08), transparent 34%),
        var(--surface);
    }

    .result-header {
      display: grid;
      gap: 8px;
    }

    .result-header p {
      margin: 0;
      color: var(--muted);
    }

    .result-body {
      display: grid;
      gap: 14px;
    }

    .formatted-text {
      display: grid;
      gap: 12px;
      min-width: 0;
      color: inherit;
      line-height: inherit;
    }

    .formatted-text > * {
      margin: 0;
      min-width: 0;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .formatted-text ul {
      padding-left: 20px;
      display: grid;
      gap: 8px;
    }

    .formatted-text li {
      color: inherit;
      line-height: inherit;
    }

    .formatted-text a {
      color: var(--accent);
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .formatted-text strong,
    .formatted-text em {
      color: inherit;
    }

    .result-list {
      display: grid;
      gap: 12px;
    }

    .result-item {
      padding: 16px;
      border-radius: 16px;
      background: linear-gradient(180deg, var(--surface-alt), rgba(255, 255, 255, 0.98));
      border: 1px solid rgba(23, 23, 23, 0.05);
      display: grid;
      gap: 10px;
    }

    .result-item h4 {
      margin: 0;
      font-size: 18px;
      line-height: 1.25;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .result-item p {
      margin: 0;
      color: var(--muted);
      line-height: 1.5;
      font-size: 14px;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .result-title {
      font-size: 28px;
      line-height: 1.1;
      font-weight: 800;
      margin: 0;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .result-text {
      margin: 0;
      color: var(--muted);
      line-height: 1.6;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .result-body .formatted-text,
    .result-item .formatted-text {
      color: var(--muted);
      line-height: 1.6;
    }

    .result-item .formatted-text {
      font-size: 14px;
      line-height: 1.5;
    }

    .callout-block {
      padding: 14px 16px 14px 52px;
      border-radius: 18px;
      background: linear-gradient(180deg, rgba(239, 49, 36, 0.08), rgba(255, 255, 255, 0.96));
      border: 1px solid rgba(239, 49, 36, 0.16);
      min-width: 0;
    }

    .callout-block > * {
      margin: 0;
    }

    .aligned-block {
      min-width: 0;
    }

    .aligned-block.align-left {
      text-align: left;
    }

    .aligned-block.align-center {
      text-align: center;
    }

    .aligned-block.align-right {
      text-align: right;
    }

    .disclosure-block {
      padding: 2px 0;
      border-radius: 18px;
      border: 1px solid rgba(23, 23, 23, 0.08);
      background: linear-gradient(180deg, rgba(240, 241, 244, 0.9), rgba(255, 255, 255, 0.98));
      overflow: hidden;
    }

    .disclosure-block summary {
      list-style: none;
      cursor: pointer;
      padding: 14px 16px 14px 52px;
      font-weight: 700;
      color: var(--text);
      display: block;
      position: relative;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .disclosure-block summary::-webkit-details-marker {
      display: none;
    }

    .disclosure-block summary::before {
      content: "";
      position: absolute;
      left: 16px;
      top: 50%;
      transform: translateY(-50%);
      width: 22px;
      height: 22px;
      border-radius: 999px;
      background:
        linear-gradient(var(--accent), var(--accent)) center / 10px 2px no-repeat,
        linear-gradient(var(--accent), var(--accent)) center / 2px 10px no-repeat,
        rgba(239, 49, 36, 0.1);
      box-shadow: inset 0 0 0 1px rgba(239, 49, 36, 0.08);
    }

    .disclosure-block[open] summary::before {
      content: "−";
    }

    .disclosure-content {
      padding: 0 16px 16px;
      border-top: 1px solid rgba(23, 23, 23, 0.06);
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .disclosure-block[open] summary::before {
      content: "";
      background:
        linear-gradient(var(--accent), var(--accent)) center / 10px 2px no-repeat,
        rgba(239, 49, 36, 0.1);
    }

    .task-list {
      display: grid;
      gap: 10px;
    }

    .task-item {
      display: grid;
      grid-template-columns: 18px minmax(0, 1fr);
      gap: 12px;
      align-items: start;
      padding: 12px 14px;
      border-radius: 14px;
      background: var(--surface-alt);
      border: 1px solid rgba(23, 23, 23, 0.05);
      min-width: 0;
    }

    .task-item.done {
      background: rgba(239, 49, 36, 0.08);
      border-color: rgba(239, 49, 36, 0.18);
    }

    .task-item input[type="checkbox"] {
      width: 18px;
      height: 18px;
      margin: 2px 0 0;
      accent-color: var(--accent);
      cursor: pointer;
    }

    .task-text {
      min-width: 0;
      color: inherit;
      line-height: inherit;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .task-item.done .task-text {
      color: var(--text);
      text-decoration: line-through;
      text-decoration-thickness: 1.5px;
      text-decoration-color: rgba(239, 49, 36, 0.6);
    }

    .result-empty {
      padding: 22px;
      border-radius: var(--radius-md);
      background: linear-gradient(180deg, var(--surface-alt), rgba(255, 255, 255, 0.96));
      color: var(--muted);
      line-height: 1.55;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .loading-card {
      max-width: 720px;
      margin: 24px auto;
      text-align: center;
    }

    .view-login-body {
      display: grid;
      place-items: center;
      padding: 24px;
    }

    .view-login-shell {
      width: min(960px, 100%);
    }

    .view-login-card {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
      overflow: hidden;
    }

    .view-login-hero {
      padding: clamp(28px, 5vw, 54px);
      background: linear-gradient(135deg, #11141b 0%, #252a35 42%, var(--accent) 100%);
      color: white;
      display: grid;
      align-content: center;
      gap: 14px;
    }

    .view-login-hero h1,
    .view-login-hero p {
      margin: 0;
    }

    .view-login-hero h1 {
      font-size: clamp(32px, 5vw, 54px);
      line-height: 0.96;
    }

    .view-login-form {
      padding: clamp(24px, 4vw, 42px);
      display: grid;
      gap: 16px;
      align-content: center;
      background: var(--surface);
    }

    .view-login-field {
      display: grid;
      gap: 8px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
    }

    .view-login-field input {
      width: 100%;
      border: 1px solid var(--border);
      background: var(--surface-alt);
      color: var(--text);
      border-radius: 16px;
      padding: 13px 15px;
      outline: none;
      font: inherit;
    }

    .view-login-field input:focus {
      border-color: rgba(239, 49, 36, 0.34);
      box-shadow: 0 0 0 4px rgba(239, 49, 36, 0.1);
    }

    .view-login-error {
      padding: 13px 15px;
      border-radius: var(--radius-md);
      background: rgba(239, 49, 36, 0.08);
      border: 1px solid rgba(239, 49, 36, 0.16);
      color: var(--accent);
      line-height: 1.45;
    }

    .view-login-submit {
      width: 100%;
    }

    .view-login-link {
      color: var(--muted);
      text-align: center;
      text-decoration: none;
      font-size: 14px;
    }

    .skeleton {
      height: 12px;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(23, 23, 23, 0.06), rgba(23, 23, 23, 0.13), rgba(23, 23, 23, 0.06));
      background-size: 200% 100%;
      animation: pulse 1.4s linear infinite;
    }

    @keyframes pulse {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }

    :root[data-theme="dark"] .brand {
      background: linear-gradient(135deg, #090b10 0%, #171b24 42%, var(--accent) 100%);
    }

    :root[data-theme="dark"] .category-button.active,
    :root[data-theme="dark"] .tool-tab.active {
      background: linear-gradient(135deg, rgba(255, 73, 63, 0.22), rgba(255, 73, 63, 0.06));
      border-color: rgba(255, 73, 63, 0.38);
    }

    :root[data-theme="dark"] .column-search {
      background: #10141c;
      border-color: rgba(255, 255, 255, 0.1);
    }

    :root[data-theme="dark"] .result-card,
    :root[data-theme="dark"] .result-item,
    :root[data-theme="dark"] .result-empty,
    :root[data-theme="dark"] .task-item,
    :root[data-theme="dark"] .disclosure-block,
    :root[data-theme="dark"] .callout-block,
    :root[data-theme="dark"] .tool-card,
    :root[data-theme="dark"] .tool-table,
    :root[data-theme="dark"] .tool-table-wrap {
      background: var(--surface-alt);
      border-color: var(--border);
    }

    :root[data-theme="dark"] .tool-subcard,
    :root[data-theme="dark"] .tool-field input,
    :root[data-theme="dark"] .tool-switch {
      background: #171b24;
      border-color: var(--border);
    }

    :root[data-theme="dark"] .badge,
    :root[data-theme="dark"] .installment-item .badge {
      background: #ff5a50;
      color: #ffffff;
    }

    :root[data-theme="dark"] .chip-remove {
      background: rgba(255, 73, 63, 0.16);
      color: #ff8b84;
    }

    :root[data-theme="dark"] .task-item.done {
      background: rgba(255, 73, 63, 0.12);
      border-color: rgba(255, 73, 63, 0.22);
    }

    :root[data-theme="dark"] .skeleton {
      background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
      background-size: 200% 100%;
    }

    @media (max-width: 1100px) {
      .app-shell,
      .layout-main {
        grid-template-columns: 1fr;
      }

      .tool-form-grid,
      .installment-layout {
        grid-template-columns: 1fr;
      }

      .view-login-card {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 760px) {
      .app-shell {
        padding: 14px;
        gap: 16px;
      }

      .sidebar,
      .content-head,
      .column-card,
      .result-card,
      .tool-card {
        padding: 18px;
      }

      .categories,
      .tool-tabs {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      }

      .content-head {
        flex-direction: column;
        align-items: flex-start;
      }

      .toolbar {
        width: 100%;
        justify-content: flex-start;
      }

      .columns-grid {
        grid-template-columns: 1fr;
      }

      .tool-actions,
      .installment-item {
        align-items: stretch;
      }

      .tool-actions,
      .installment-item,
      .installment-item-actions {
        flex-direction: column;
      }
    }
