    :root {
      --bg: #17171b;
      --bg-top: #1f1f25;
      --surface: #23232a;
      --surface-elevated: #2a2a31;
      --surface-strong: #373741;
      --field: #40404a;
      --field-border: #4a4a56;
      --border: #3a3a43;
      --ink: #f3f0f6;
      --ink-soft: #c3bfca;
      --muted: #8f8a99;
      --accent: #eb3d84;
      --accent-strong: #bf1f5d;
      --accent-soft: rgba(235, 61, 132, 0.14);
      --success: #49c26c;
      --warn: #e7be63;
      --danger: #ff7f91;
      --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
    }
    html {
      color-scheme: dark;
      background: var(--bg);
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      min-height: 100vh;
      font-family: "Avenir Next", "Space Grotesk", "Trebuchet MS", "Segoe UI", sans-serif;
      color: var(--ink);
      background:
        radial-gradient(circle at top right, rgba(235, 61, 132, 0.12), transparent 24%),
        radial-gradient(circle at top left, rgba(103, 87, 255, 0.08), transparent 18%),
        linear-gradient(180deg, var(--bg-top) 0, #1b1b21 132px, var(--bg) 100%);
    }
    body::before {
      content: "";
      position: fixed;
      inset: 0 0 auto;
      height: 1px;
      top: 73px;
      background: linear-gradient(90deg, rgba(235, 61, 132, 0.95), rgba(235, 61, 132, 0.45));
      pointer-events: none;
      z-index: 4;
    }
    header {
      position: sticky;
      top: 0;
      z-index: 5;
      padding: 20px 32px 18px;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 24px;
      background: rgba(31, 31, 37, 0.94);
      backdrop-filter: blur(14px);
    }
    h1 {
      margin: 0;
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: clamp(22px, 1.8vw, 30px);
      line-height: 1;
      letter-spacing: -0.03em;
      font-weight: 800;
    }
    h1::before {
      content: "";
      width: 24px;
      height: 24px;
      flex: 0 0 auto;
      border-radius: 999px;
      background:
        radial-gradient(circle at 68% 32%, #fff 0 18%, transparent 19%),
        conic-gradient(from 22deg, var(--accent) 0 78%, rgba(255, 255, 255, 0.22) 78% 100%);
      box-shadow: 0 0 0 5px rgba(235, 61, 132, 0.12);
    }
    h2 {
      margin: 0 0 18px;
      font-size: clamp(17px, 1.15vw, 23px);
      line-height: 1.1;
      letter-spacing: -0.03em;
      font-weight: 800;
    }
    .sub {
      color: var(--muted);
      font-size: 11px;
      line-height: 1.5;
    }
    .service-hub-card {
      padding: 28px;
    }
    .service-hub-copy {
      max-width: 720px;
      margin-bottom: 22px;
    }
    .service-grid {
      display: grid;
      gap: 18px;
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .service-tile {
      width: 100%;
      min-height: 220px;
      padding: 22px;
      border-radius: 20px;
      border: 1px solid var(--border);
      background: linear-gradient(180deg, rgba(43, 43, 50, 0.98), rgba(34, 34, 41, 0.98));
      display: grid;
      align-content: start;
      gap: 14px;
      text-align: left;
      box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
    }
    .service-tile:hover {
      border-color: rgba(235, 61, 132, 0.32);
      box-shadow: 0 22px 42px rgba(0, 0, 0, 0.3);
    }
    .service-tile.disabled {
      cursor: pointer;
      opacity: 0.9;
    }
    .service-tile-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
    }
    .service-logo {
      width: 50px;
      height: 50px;
      border-radius: 16px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      font-weight: 900;
      letter-spacing: -0.04em;
      color: #fff;
      background: linear-gradient(135deg, rgba(235, 61, 132, 0.95), rgba(153, 36, 114, 0.95));
      border: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
    .service-logo.ticket {
      background: linear-gradient(135deg, rgba(76, 125, 240, 0.95), rgba(34, 78, 173, 0.95));
    }
    .service-logo.streamers {
      background: linear-gradient(135deg, rgba(84, 193, 143, 0.95), rgba(29, 120, 94, 0.95));
    }
    .service-status {
      display: inline-flex;
      align-items: center;
      padding: 6px 10px;
      border-radius: 999px;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      border: 1px solid rgba(255, 255, 255, 0.08);
      color: var(--ink-soft);
      background: rgba(255, 255, 255, 0.08);
    }
    .service-status.live {
      color: #8be3a7;
      border-color: rgba(73, 194, 108, 0.24);
      background: rgba(73, 194, 108, 0.14);
    }
    .service-tile-title {
      margin: 0;
      font-size: 17px;
      line-height: 1.08;
      letter-spacing: -0.03em;
      font-weight: 800;
      color: var(--ink);
    }
    .service-tile-description {
      margin: 0;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.6;
    }
    .service-tile-meta {
      margin-top: auto;
      color: var(--ink-soft);
      font-size: 10px;
      line-height: 1.5;
    }

    main {
      width: calc(100% - 24px);
      max-width: none;
      margin: 0 auto;
      padding: 30px 0 44px;
      display: grid;
      gap: 26px;
    }
    .grid {
      display: grid;
      gap: 22px;
      grid-template-columns: 1fr;
    }
    .dashboard-layout {
      display: grid;
      gap: 22px;
      grid-template-columns: minmax(0, 1fr);
      align-items: start;
    }
    .dashboard-stack {
      display: grid;
      gap: 22px;
      grid-template-columns: minmax(0, 1fr);
      align-items: start;
    }
    @media (min-width: 1120px) {
      .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .dashboard-layout {
        grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
      }
      #appView .dashboard-layout {
        grid-template-columns: minmax(0, 0.74fr) minmax(0, 1.26fr);
        gap: 14px;
      }
    }
    @media (max-width: 1180px) {
      .service-grid {
        grid-template-columns: 1fr;
      }
    }
    #pendingCard,
    #recentCard,
    #ticketActiveCard,
    #ticketResolvedCard {
      display: flex;
      flex-direction: column;
      min-height: 0;
    }
    #pendingCard .table-frame,
    #recentCard .table-frame,
    #ticketActiveCard .table-frame,
    #ticketResolvedCard .table-frame {
      flex: 1 1 auto;
      min-height: 0;
      overflow-x: auto;
      overflow-y: auto;
    }
    @media (min-width: 1120px) {
      #appView,
      #ticketingView {
        padding-bottom: 12px;
        overflow: hidden;
      }
      #createCard,
      #ticketCreateCard {
        display: flex;
        flex-direction: column;
        min-height: 0;
        max-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
      }
      #createCard > .action-row,
      #ticketCreateCard > .action-row {
        margin-top: auto;
      }
      .dashboard-layout,
      .dashboard-stack {
        min-height: 0;
      }
      #pendingCard {
        height: var(--pending-card-height, auto);
      }
      #recentCard {
        height: var(--recent-card-height, auto);
      }
      #ticketActiveCard {
        height: var(--ticket-active-card-height, auto);
      }
      #ticketResolvedCard {
        height: var(--ticket-resolved-card-height, auto);
      }
    }

    .card {
      position: relative;
      overflow: hidden;
      background: linear-gradient(180deg, rgba(44, 44, 51, 0.98), rgba(38, 38, 45, 0.98));
      border: 1px solid var(--border);
      border-radius: 22px;
      padding: 26px;
      box-shadow: var(--shadow);
    }
    .card::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 28%);
      pointer-events: none;
    }
    .auth-card {
      max-width: 580px;
      margin: 32px auto 0;
    }
    .form-section {
      margin-top: 22px;
      padding: 18px 18px 16px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 18px;
      background: rgba(18, 18, 24, 0.26);
    }
    .form-section:first-of-type {
      margin-top: 0;
    }
    .form-split {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 18px;
      align-items: start;
    }
    .request-form-stack {
      display: grid;
      gap: 18px;
    }
    .request-form-stack .form-section {
      margin-top: 0;
    }
    .form-split .form-section {
      margin-top: 0;
    }
    .form-section-title {
      margin: 0 0 6px;
      color: var(--ink);
      font-size: 12px;
      font-weight: 800;
      letter-spacing: -0.01em;
    }
    .form-section-note {
      margin: 0;
      color: var(--muted);
      font-size: 10px;
      line-height: 1.5;
    }
    .required-mark {
      color: var(--accent);
      font-size: 10px;
      vertical-align: top;
      margin-left: 4px;
    }
    .checkbox-row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: 16px;
      color: var(--ink);
      font-weight: 700;
      font-size: 11px;
    }
    .checkbox-row input[type="checkbox"] {
      width: 18px;
      height: 18px;
      min-height: 18px;
      margin: 0;
      accent-color: var(--accent);
      flex: 0 0 auto;
    }
    .checkbox-row label {
      margin: 0;
      font-size: 11px;
      font-weight: 700;
      cursor: pointer;
    }
    label {
      display: block;
      margin: 18px 0 8px;
      font-weight: 700;
      color: var(--ink);
      font-size: 11px;
      letter-spacing: -0.01em;
    }
    input, select, textarea {
      width: 100%;
      min-height: 42px;
      padding: 10px 13px;
      border: 1px solid var(--field-border);
      border-radius: 14px;
      font-size: 13px;
      color: var(--ink);
      background: linear-gradient(180deg, rgba(67, 67, 77, 0.96), rgba(58, 58, 68, 0.96));
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
      transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
    }
    textarea {
      resize: vertical;
      min-height: 110px;
    }
    input::placeholder,
    textarea::placeholder {
      color: #9a96a3;
    }
    input:focus, select:focus, textarea:focus {
      outline: none;
      border-color: rgba(235, 61, 132, 0.8);
      box-shadow: 0 0 0 4px rgba(235, 61, 132, 0.14);
    }
    select {
      appearance: none;
      padding-right: 44px;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1.5L7 7.5L13 1.5' stroke='%23b8b4c0' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: calc(100% - 16px) 50%;
    }
    .wallet-picker-row {
      display: flex;
      gap: 10px;
      align-items: center;
    }
    .wallet-picker-row select {
      flex: 1;
    }
    .scope-picker-row {
      align-items: stretch;
    }
    .scope-picker-row select,
    .scope-picker-row input {
      flex: 1 1 0;
      min-width: 0;
    }
    .scope-picker-row button {
      flex: 0 0 auto;
      align-self: stretch;
      white-space: nowrap;
    }
    .wallet-chip-list {
      margin-top: 10px;
      min-height: 54px;
      border: 1px solid var(--border);
      border-radius: 16px;
      background: rgba(18, 18, 24, 0.5);
      padding: 10px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-content: flex-start;
    }
    .wallet-chip-list.empty {
      color: var(--muted);
      font-size: 12px;
    }
    .wallet-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(235, 61, 132, 0.14);
      color: #ffd7e7;
      border: 1px solid rgba(235, 61, 132, 0.3);
      border-radius: 999px;
      padding: 6px 10px;
      font-size: 10px;
      font-weight: 700;
    }
    .wallet-chip-remove {
      border: none;
      background: transparent;
      color: inherit;
      cursor: pointer;
      padding: 0;
      font-size: 11px;
      line-height: 1;
    }
    .picker-note {
      margin-top: 8px;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.5;
    }
    .file-input {
      padding: 12px 14px;
      background: rgba(18, 18, 24, 0.42);
    }
    button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 44px;
      border: 1px solid transparent;
      background: linear-gradient(180deg, var(--accent), var(--accent-strong));
      color: white;
      padding: 10px 16px;
      border-radius: 14px;
      font-weight: 700;
      font-size: 13px;
      letter-spacing: -0.01em;
      cursor: pointer;
      box-shadow: 0 12px 24px rgba(191, 31, 93, 0.22);
      transition: transform 120ms ease, filter 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
    }
    button:hover {
      transform: translateY(-1px);
      filter: brightness(1.04);
    }
    button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none;
      filter: none;
      box-shadow: none;
    }
    button.secondary {
      background: linear-gradient(180deg, #3b3b45, #2f2f37);
      border-color: #4a4a54;
      box-shadow: none;
    }
    button.ghost {
      background: transparent;
      color: var(--accent);
      border: 1px solid rgba(235, 61, 132, 0.6);
      box-shadow: none;
    }
    button.ghost:hover {
      background: rgba(235, 61, 132, 0.08);
    }

    .action-row,
    .panel-head,
    .compact-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      align-items: center;
    }
    .action-row {
      margin-top: 18px;
    }
    .panel-head {
      justify-content: space-between;
      gap: 14px;
    }
    .search-row {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      width: min(860px, 100%);
    }
    .search-row input,
    .search-row select {
      min-height: 40px;
      padding: 10px 12px;
      font-size: 11px;
      border-radius: 12px;
    }
    .search-row-label {
      color: var(--muted);
      font-size: 10px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      margin-bottom: 6px;
      display: block;
    }
    .table-controls {
      margin-top: 16px;
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }
    .table-summary {
      color: var(--ink-soft);
      font-size: 11px;
      line-height: 1.5;
    }
    .table-frame {
      margin-top: 18px;
      overflow-x: auto;
      overflow-y: hidden;
      border: 1px solid rgba(255, 255, 255, 0.07);
      border-radius: 20px;
      background: rgba(19, 19, 24, 0.18);
      scrollbar-width: thin;
      scrollbar-color: rgba(235, 61, 132, 0.5) rgba(255, 255, 255, 0.04);
    }
    .table-frame::-webkit-scrollbar {
      height: 10px;
    }
    .table-frame::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, 0.04);
      border-radius: 999px;
    }
    .table-frame::-webkit-scrollbar-thumb {
      background: rgba(235, 61, 132, 0.44);
      border-radius: 999px;
    }
    table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      background: transparent;
    }
    th, td {
      text-align: left;
      padding: 12px 10px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.07);
      font-size: 12px;
      vertical-align: middle;
    }
    th {
      color: var(--ink-soft);
      font-weight: 700;
      font-size: 10px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .sort-button {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 0;
      min-height: 0;
      border: none;
      border-radius: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      letter-spacing: inherit;
      text-transform: inherit;
      box-shadow: none;
    }
    .sort-button:hover {
      transform: none;
      filter: none;
      color: var(--ink);
    }
    .sort-button::after {
      content: attr(data-sort-indicator);
      font-size: 9px;
      color: var(--muted);
    }
    tbody tr {
      transition: background 120ms ease;
    }
    tbody tr:hover {
      background: rgba(255, 255, 255, 0.035);
    }
    tbody tr:last-child td {
      border-bottom: none;
    }
    #pendingTable {
      min-width: 100%;
    }
    #recentTable {
      min-width: 100%;
    }
    #permissionsTable {
      min-width: 100%;
    }

    .row-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }
    .row-actions-cell {
      min-width: 260px;
    }
    .row-actions button {
      min-height: 36px;
      padding: 8px 12px;
      border-radius: 12px;
      font-size: 11px;
      box-shadow: none;
    }
    .request-comment {
      color: var(--ink-soft);
      font-size: 11px;
      line-height: 1.5;
      white-space: pre-wrap;
      min-width: 220px;
    }
    .attachment-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
      min-width: 180px;
    }
    .attachment-link {
      color: #ffd7e7;
      text-decoration: none;
      font-size: 11px;
      line-height: 1.4;
    }
    .attachment-link:hover {
      text-decoration: underline;
    }
    .attachment-meta {
      color: var(--muted);
      font-size: 10px;
      line-height: 1.3;
    }
    .pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 6px 10px;
      border-radius: 999px;
      border: 1px solid transparent;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .pill.pending {
      background: rgba(231, 190, 99, 0.12);
      color: #ffd88b;
      border-color: rgba(231, 190, 99, 0.28);
    }
    .pill.executed {
      background: rgba(73, 194, 108, 0.14);
      color: #8be3a7;
      border-color: rgba(73, 194, 108, 0.28);
    }
    .pill.failed {
      background: rgba(255, 127, 145, 0.14);
      color: #ffabb8;
      border-color: rgba(255, 127, 145, 0.28);
    }
    .pill.edit {
      background: rgba(76, 125, 240, 0.14);
      color: #bfd2ff;
      border-color: rgba(76, 125, 240, 0.28);
    }
    .pill.noop {
      background: rgba(255, 255, 255, 0.1);
      color: var(--ink-soft);
      border-color: rgba(255, 255, 255, 0.12);
    }
    .pill.open {
      background: rgba(76, 125, 240, 0.14);
      color: #bfd2ff;
      border-color: rgba(76, 125, 240, 0.28);
    }
    .pill.in_progress {
      background: rgba(235, 61, 132, 0.14);
      color: #ffd0e4;
      border-color: rgba(235, 61, 132, 0.28);
    }
    .pill.pending_client {
      background: rgba(231, 190, 99, 0.12);
      color: #ffd88b;
      border-color: rgba(231, 190, 99, 0.28);
    }
    .pill.resolved {
      background: rgba(73, 194, 108, 0.14);
      color: #8be3a7;
      border-color: rgba(73, 194, 108, 0.28);
    }
    .pill.closed {
      background: rgba(255, 255, 255, 0.1);
      color: var(--ink-soft);
      border-color: rgba(255, 255, 255, 0.12);
    }

    .pending-note {
      margin-top: 12px;
      padding: 12px;
      border-radius: 14px;
      border: 1px solid rgba(255, 127, 145, 0.28);
      background: rgba(122, 22, 38, 0.18);
      color: #ffb7c2;
      white-space: normal;
    }
    .pending-note-title {
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      margin-bottom: 6px;
      color: #ffd1db;
    }
    .pending-note-text {
      font-size: 11px;
      line-height: 1.5;
    }
    .pending-note button {
      margin-top: 10px;
      min-height: 30px;
      padding: 6px 10px;
      font-size: 11px;
      box-shadow: none;
    }

    #approvalModalBackdrop {
      position: fixed;
      inset: 0;
      z-index: 30;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 28px;
      background: rgba(10, 10, 14, 0.74);
      backdrop-filter: blur(10px);
    }
    #approvalModal {
      width: min(1180px, calc(100vw - 56px));
      max-height: calc(100vh - 56px);
      overflow: auto;
    }
    #approvalModalMeta {
      margin-top: 6px;
    }
    #conflictModalBackdrop {
      position: fixed;
      inset: 0;
      z-index: 31;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 28px;
      background: rgba(10, 10, 14, 0.74);
      backdrop-filter: blur(10px);
    }
    #conflictModal {
      width: min(1240px, calc(100vw - 56px));
      max-height: calc(100vh - 56px);
      overflow: auto;
    }
    #conflictModalMeta {
      margin-top: 6px;
    }
    #configChangeModalBackdrop {
      position: fixed;
      inset: 0;
      z-index: 32;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 28px;
      background: rgba(10, 10, 14, 0.74);
      backdrop-filter: blur(10px);
    }
    #configChangeModal {
      width: min(1040px, calc(100vw - 56px));
      max-height: calc(100vh - 56px);
      overflow: auto;
    }
    #configChangeModalMeta {
      margin-top: 6px;
    }
    #similarBrandModalBackdrop {
      position: fixed;
      inset: 0;
      z-index: 33;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 28px;
      background: rgba(10, 10, 14, 0.74);
      backdrop-filter: blur(10px);
    }
    #similarBrandModal {
      width: min(1180px, calc(100vw - 56px));
      max-height: calc(100vh - 56px);
      overflow: auto;
    }
    #similarBrandModalMeta {
      margin-top: 6px;
    }
    #pendingReviewModalBackdrop {
      position: fixed;
      inset: 0;
      z-index: 29;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 28px;
      background: rgba(10, 10, 14, 0.74);
      backdrop-filter: blur(10px);
    }
    #pendingReviewModal {
      width: min(1040px, calc(100vw - 56px));
      max-height: calc(100vh - 56px);
      overflow: auto;
    }
    #brandCheckModalBackdrop {
      position: fixed;
      inset: 0;
      z-index: 33;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 28px;
      background: rgba(10, 10, 14, 0.74);
      backdrop-filter: blur(10px);
    }
    #brandCheckModal {
      width: min(1180px, calc(100vw - 56px));
      max-height: calc(100vh - 56px);
      overflow: auto;
    }
    #ticketDetailModalBackdrop {
      position: fixed;
      inset: 0;
      z-index: 34;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 28px;
      background: rgba(10, 10, 14, 0.74);
      backdrop-filter: blur(10px);
    }
    #ticketDetailModal {
      width: min(1380px, calc(100vw - 56px));
      max-height: calc(100vh - 56px);
      overflow: auto;
    }
    .summary-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      margin: 22px 0;
    }
    .summary-card {
      padding: 14px 16px;
      border-radius: 16px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(18, 18, 24, 0.42);
    }
    .summary-card-label {
      color: var(--muted);
      font-size: 10px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .summary-card-value {
      margin-top: 6px;
      color: var(--ink);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.45;
      word-break: break-word;
    }
    .modal-note {
      margin: 4px 0 0;
      color: var(--ink-soft);
      font-size: 12px;
      line-height: 1.6;
    }
    .decision-select {
      min-width: 190px;
      min-height: 42px;
      font-size: 12px;
    }
    .reference-text {
      color: var(--ink-soft);
      font-size: 10px;
      line-height: 1.5;
    }
    .reference-options {
      margin: 8px 0 0 18px;
      padding: 0;
      color: var(--ink-soft);
      font-size: 11px;
      line-height: 1.6;
    }
    .reference-options li + li {
      margin-top: 4px;
    }
    .config-value-stack {
      display: grid;
      gap: 8px;
      min-width: 150px;
    }
    .config-value-item {
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.04);
    }
    .config-value-main {
      color: var(--ink);
      font-size: 11px;
      font-weight: 700;
      line-height: 1.4;
    }
    .config-value-meta {
      margin-top: 4px;
      color: var(--muted);
      font-size: 10px;
      line-height: 1.45;
    }
    .brand-check-tag-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .brand-check-tag {
      display: inline-flex;
      align-items: center;
      padding: 5px 9px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.05);
      color: var(--ink);
      font-size: 11px;
      font-weight: 700;
      line-height: 1.2;
    }
    .brand-check-cell-title {
      color: var(--ink);
      font-size: 11px;
      font-weight: 700;
      line-height: 1.45;
    }
    .brand-check-cell-subtitle {
      margin-top: 4px;
      color: var(--muted);
      font-size: 10px;
      line-height: 1.5;
      word-break: break-word;
    }
    .review-note {
      margin: 16px 0 0;
      color: var(--ink-soft);
      font-size: 12px;
      line-height: 1.6;
    }
    .ticket-row-trigger {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 0;
      min-height: 0;
      border: none;
      border-radius: 0;
      background: transparent;
      color: var(--ink);
      font: inherit;
      font-weight: 800;
      box-shadow: none;
    }
    .ticket-row-trigger:hover {
      transform: none;
      filter: none;
      color: #ffd7e7;
    }
    .ticket-open-button {
      min-height: 34px;
      padding: 7px 12px;
      border-radius: 10px;
      font-size: 11px;
      line-height: 1;
    }
    .ticket-meta-text {
      color: var(--ink-soft);
      font-size: 12px;
      line-height: 1.45;
    }
    .ticket-detail-layout {
      display: grid;
      grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
      gap: 22px;
      margin-top: 18px;
      align-items: start;
    }
    .ticket-detail-panel,
    .ticket-conversation-pane {
      min-width: 0;
      padding: 18px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 20px;
      background: rgba(18, 18, 24, 0.32);
    }
    .ticket-detail-overview-grid {
      display: grid;
      gap: 10px;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ticket-detail-meta-row {
      padding: 12px 14px;
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.035);
      border: 1px solid rgba(255, 255, 255, 0.06);
    }
    .ticket-detail-meta-label {
      color: var(--muted);
      font-size: 10px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .ticket-detail-meta-value {
      margin-top: 6px;
      color: var(--ink);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.45;
      word-break: break-word;
    }
    .ticket-detail-divider {
      height: 1px;
      margin: 18px 0;
      background: rgba(255, 255, 255, 0.08);
    }
    .ticket-detail-block + .ticket-detail-block {
      margin-top: 16px;
    }
    .ticket-detail-block-title {
      margin: 0 0 12px;
      font-size: 11px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--ink-soft);
      font-weight: 800;
    }
    .ticket-description {
      color: var(--ink);
      font-size: 12px;
      line-height: 1.7;
      white-space: pre-wrap;
    }
    .ticket-conversation-list {
      display: grid;
      gap: 14px;
      max-height: 52vh;
      overflow-y: auto;
      padding-right: 6px;
    }
    .ticket-chat-item {
      padding: 16px 18px;
      border-radius: 18px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(18, 18, 24, 0.32);
    }
    .ticket-chat-item.self {
      background: rgba(232, 235, 240, 0.08);
      border-color: rgba(232, 235, 240, 0.18);
    }
    .ticket-chat-item.private-note {
      background: rgba(201, 206, 216, 0.08);
      border-color: rgba(201, 206, 216, 0.16);
    }
    .ticket-chat-meta {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      margin-bottom: 8px;
    }
    .ticket-chat-author {
      font-size: 12px;
      font-weight: 800;
      color: var(--ink);
    }
    .ticket-chat-time {
      color: var(--muted);
      font-size: 11px;
      line-height: 1.4;
      text-align: right;
    }
    .ticket-chat-body {
      color: var(--ink-soft);
      font-size: 13px;
      line-height: 1.65;
      white-space: pre-wrap;
      word-break: break-word;
    }
    .ticket-chat-kind {
      display: inline-flex;
      align-items: center;
      margin-top: 10px;
      padding: 4px 8px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.08);
      color: var(--ink-soft);
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .ticket-chat-visibility {
      display: inline-flex;
      align-items: center;
      margin-left: 8px;
      padding: 4px 8px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.06);
      color: var(--ink-soft);
      font-size: 9px;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .ticket-composer {
      margin-top: 18px;
      padding-top: 18px;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
    .ticket-composer .checkbox-row {
      margin-top: 12px;
    }
    .ticket-support-controls {
      display: grid;
      gap: 10px;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ticket-support-controls .field-full {
      grid-column: 1 / -1;
    }
    .ticket-empty {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.6;
      padding: 18px 0;
    }
    .ticket-attachment-list {
      display: grid;
      gap: 8px;
    }
    .ticket-table-subject {
      min-width: 220px;
    }

    .message {
      margin-top: 12px;
      font-size: 11px;
      line-height: 1.5;
      color: var(--ink-soft);
    }
    .message.error { color: var(--danger); }
    .message.success { color: #8be3a7; }

    .hidden { display: none !important; }
    #loginView,
    #passwordChangeView {
      padding-top: 48px;
    }
    .header-meta {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 12px;
      flex-wrap: wrap;
      max-width: min(860px, 62vw);
    }
    #userInfo {
      display: flex;
      align-items: stretch;
      gap: 14px;
      flex-wrap: wrap;
      padding: 12px 16px;
      min-height: 50px;
      border-radius: 16px;
      border: 1px solid var(--border);
      background: rgba(26, 26, 32, 0.62);
      color: var(--ink-soft);
    }
    #userInfo:empty {
      display: none;
    }
    .header-stat {
      display: grid;
      gap: 2px;
      min-width: 96px;
    }
    .header-stat-label {
      color: var(--muted);
      font-size: 10px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .header-stat-value {
      color: var(--ink);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: -0.01em;
    }

    #logsCard {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }
    #logsOutput {
      margin: 0;
      min-height: 260px;
      max-height: 320px;
      overflow: auto;
      background: rgba(16, 16, 21, 0.84);
      border: 1px solid var(--border);
      padding: 14px;
      border-radius: 18px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .log-entry {
      border-left: 4px solid var(--border);
      border-radius: 14px;
      padding: 12px 14px;
    }
    .log-entry-header {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 10px;
      flex-wrap: wrap;
    }
    .log-entry-title {
      font-weight: 700;
      font-size: 13px;
    }
    .log-entry-meta {
      margin-top: 6px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
      font-size: 12px;
      white-space: pre-wrap;
      word-break: break-word;
      opacity: 0.92;
    }
    .log-entry-right {
      display: flex;
      gap: 8px;
      align-items: center;
      font-size: 12px;
    }
    .log-badge {
      display: inline-block;
      padding: 3px 8px;
      border-radius: 999px;
      font-weight: 700;
      letter-spacing: 0.2px;
    }
    .log-entry-time {
      opacity: 0.8;
    }
    .log-entry.error {
      background: rgba(122, 22, 38, 0.18);
      border-left-color: #d04860;
      color: #ffb7c2;
    }
    .log-entry.warn {
      background: rgba(112, 81, 18, 0.18);
      border-left-color: #d7a63a;
      color: #ffd88b;
    }
    .log-entry.success {
      background: rgba(37, 99, 57, 0.18);
      border-left-color: #3ea85d;
      color: #99ebb2;
    }
    .log-entry.info {
      background: rgba(31, 54, 114, 0.18);
      border-left-color: #4c7df0;
      color: #bfd2ff;
    }
    .log-entry.debug {
      background: rgba(88, 88, 102, 0.16);
      border-left-color: #7a7b87;
      color: #d1cfda;
    }
    .log-entry.error .log-badge {
      background: #c93651;
      color: #fff6f8;
    }
    .log-entry.warn .log-badge {
      background: #d29d2c;
      color: #201400;
    }
    .log-entry.success .log-badge {
      background: #2f9a50;
      color: #ecfff2;
    }
    .log-entry.info .log-badge {
      background: #4773d8;
      color: #f3f7ff;
    }
    .log-entry.debug .log-badge {
      background: #676976;
      color: #f7f7fa;
    }
    #logsCard.logs-expanded #logsOutput {
      max-height: 70vh;
    }
    @media (max-width: 1080px) {
      body::before {
        top: 116px;
      }
      header {
        padding: 18px 20px;
      }
      main {
        width: calc(100% - 20px);
        padding-top: 24px;
      }
      .header-meta {
        max-width: 100%;
        justify-content: flex-start;
      }
      .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .search-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }
    @media (max-width: 720px) {
      body::before {
        top: 145px;
      }
      h1 {
        font-size: 20px;
      }
      main {
        width: calc(100% - 16px);
        padding-bottom: 28px;
      }
      .card {
        padding: 20px;
        border-radius: 18px;
      }
      #sessionEnv,
      #ticketSessionEnv,
      #permissionsSessionEnv,
      #userInfo {
        width: 100%;
        min-width: 0;
      }
      .table-frame {
        margin-top: 16px;
      }
      th, td {
        padding: 14px 12px;
      }
      .row-actions {
        min-width: 170px;
      }
      #approvalModalBackdrop {
        padding: 12px;
      }
      #approvalModal {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
      }
      #conflictModalBackdrop {
        padding: 12px;
      }
      #conflictModal {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
      }
      #configChangeModalBackdrop {
        padding: 12px;
      }
      #configChangeModal {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
      }
      #similarBrandModalBackdrop {
        padding: 12px;
      }
      #similarBrandModal {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
      }
      #pendingReviewModalBackdrop {
        padding: 12px;
      }
      #pendingReviewModal {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
      }
      #brandCheckModalBackdrop {
        padding: 12px;
      }
      #brandCheckModal {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
      }
      #ticketDetailModalBackdrop {
        padding: 12px;
      }
      #ticketDetailModal {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
      }
      .summary-grid {
        grid-template-columns: 1fr;
      }
      .search-row {
        grid-template-columns: 1fr;
      }
      .service-hub-card {
        padding: 22px;
      }
      .service-tile {
        min-height: 0;
      }
      .form-split {
        grid-template-columns: 1fr;
      }
      .ticket-detail-layout {
        grid-template-columns: 1fr;
      }
      .ticket-detail-overview-grid {
        grid-template-columns: 1fr;
      }
      .ticket-conversation-list {
        max-height: none;
      }
      .ticket-support-controls {
        grid-template-columns: 1fr;
      }
    }
