﻿    :root {
      color-scheme: light;
      --bg: #f6f7fb;
      --surface: #ffffff;
      --surface-muted: #f0f4f8;
      --text: #17202a;
      --muted: #687385;
      --line: #dce3eb;
      --accent: #136f63;
      --accent-dark: #0d5148;
      --accent-soft: #e4f3f0;
      --danger: #b42318;
      --danger-soft: #fef3f2;
      --shadow: 0 18px 45px rgba(21, 35, 55, 0.10);
    }

    * {
      box-sizing: border-box;
    }

    body {
      min-height: 100vh;
      margin: 0;
      background:
        linear-gradient(135deg, rgba(19, 111, 99, 0.08), transparent 38%),
        var(--bg);
      color: var(--text);
      font-family: Inter, "Segoe UI", Arial, sans-serif;
      line-height: 1.5;
    }

    a {
      color: var(--accent-dark);
      text-decoration: none;
    }

    a:hover {
      text-decoration: underline;
    }

    .page-shell {
      width: min(100% - 32px, 1180px);
      margin: 0 auto;
      padding: 40px 0;
    }

    .login-card {
      width: min(100% - 32px, 560px);
      margin: 10vh auto;
      padding: 32px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--surface);
      box-shadow: var(--shadow);
    }

    .login-card h1 {
      margin: 0 0 12px;
      font-size: clamp(1.75rem, 4vw, 2.45rem);
      line-height: 1.1;
    }

    .login-card p {
      margin: 0 0 20px;
      color: var(--muted);
    }

    .page-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 24px;
      margin-bottom: 24px;
    }

    .title-block h1 {
      margin: 0;
      font-size: clamp(2rem, 5vw, 3.5rem);
      line-height: 1;
      letter-spacing: 0;
    }

    .title-block p {
      max-width: 640px;
      margin: 12px 0 0;
      color: var(--muted);
      font-size: 1rem;
    }

    .header-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      align-items: center;
      gap: 10px;
    }

    .button-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 42px;
      padding: 0 16px;
      border: 1px solid transparent;
      border-radius: 6px;
      background: var(--accent);
      color: #ffffff;
      font: inherit;
      font-weight: 700;
      text-decoration: none;
      white-space: nowrap;
      box-shadow: 0 10px 20px rgba(19, 111, 99, 0.18);
      transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
    }

    .button-link:hover {
      background: var(--accent-dark);
      text-decoration: none;
      transform: translateY(-1px);
      box-shadow: 0 12px 22px rgba(19, 111, 99, 0.24);
    }

    .button-link.secondary {
      border-color: var(--line);
      background: var(--surface);
      color: var(--text);
      box-shadow: none;
    }

    .button-link.secondary:hover {
      border-color: #b8c4d1;
      background: var(--surface-muted);
      color: var(--text);
      box-shadow: none;
    }

    .table-panel {
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--surface);
      box-shadow: var(--shadow);
    }

    .table-scroll {
      overflow-x: auto;
    }

    table {
      width: 100%;
      min-width: 880px;
      border-collapse: collapse;
    }

    th,
    td {
      padding: 16px 18px;
      text-align: left;
      vertical-align: middle;
      border-bottom: 1px solid var(--line);
    }

    th {
      background: var(--surface-muted);
      color: #4b596b;
      font-size: .78rem;
      font-weight: 800;
      letter-spacing: .04em;
      text-transform: uppercase;
    }

    tbody tr {
      cursor: pointer;
      transition: background .15s ease;
    }

    tbody tr:hover {
      background: #f8fbfd;
    }

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

    .name-cell {
      width: 24%;
      min-width: 190px;
      font-weight: 800;
    }

    .name-cell,
    .description-cell {
      overflow-wrap: anywhere;
    }

    .description-cell {
      color: var(--muted);
    }

    .date-cell {
      width: 160px;
      color: #344054;
      white-space: nowrap;
    }

    .status-badge {
      display: inline-flex;
      align-items: center;
      min-height: 28px;
      padding: 0 10px;
      border-radius: 999px;
      background: var(--accent-soft);
      color: var(--accent-dark);
      font-size: .85rem;
      font-weight: 800;
      white-space: nowrap;
    }

    .choice-cell {
      width: 1%;
      white-space: nowrap;
    }

    .choice-actions {
      display: grid;
      grid-template-columns: 100px auto;
      align-items: center;
      gap: 10px;
    }

    .choice-actions .team-choice-badge {
      justify-self: start;
    }

    .team-text-link {
      width: auto;
      min-height: 36px;
      padding: 0 10px;
    }

    .team-choice-badge {
      display: inline-flex;
      align-items: center;
      min-height: 28px;
      padding: 0 10px;
      border-radius: 999px;
      background: var(--surface-muted);
      color: #667085;
      font-size: .85rem;
      font-weight: 800;
      white-space: nowrap;
    }

    .team-choice-badge.is-selected {
      background: var(--accent-soft);
      color: var(--accent-dark);
    }

    .team-choice-badge.is-missing-active {
      background: var(--danger-soft);
      color: var(--danger);
    }

    .empty-row td {
      padding: 34px 18px;
      color: var(--muted);
      text-align: center;
      cursor: default;
    }

    .toast-region {
      position: fixed;
      z-index: 100;
      top: 50%;
      left: 50%;
      display: grid;
      gap: 10px;
      width: min(100% - 40px, 360px);
      transform: translate(-50%, -50%);
      pointer-events: none;
    }

    .toast-message {
      padding: 14px 16px;
      border: 1px solid rgba(19, 111, 99, 0.24);
      border-radius: 8px;
      background: var(--surface);
      color: var(--accent-dark);
      font-weight: 800;
      box-shadow: var(--shadow);
      animation: toast-autohide 4s ease forwards;
    }

    @keyframes toast-autohide {
      0%,
      72% {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
      }

      100% {
        opacity: 0;
        transform: translateY(-8px);
        visibility: hidden;
      }
    }

    @media (max-width: 760px) {
      .page-shell {
        width: min(100% - 20px, 1180px);
        padding: 20px 0;
      }

      .page-header {
        align-items: stretch;
        flex-direction: column;
      }

      .header-actions {
        justify-content: flex-start;
      }

      .header-actions .button-link {
        width: 100%;
      }

      .login-card {
        padding: 24px;
      }

      .toast-region {
        width: calc(100% - 20px);
      }
    }
