﻿:root {
      --bg: #eef1f5;
      --surface: #ffffff;
      --surface-soft: #f8fafc;
      --line: #e3e7ee;
      --line-strong: #d6dce6;
      --text: #1e293b;
      --muted: #718096;
      --primary: #c62127;
      --primary-strong: #a81b20;
      --shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
      --radius: 14px;
      --mobile-header-offset: 76px;
    }

    * { box-sizing: border-box; }
    .hidden { display: none !important; }

    html {
      min-height: 100%;
      overflow-y: scroll;
      scrollbar-gutter: stable;
    }

    body {
      margin: 0;
      font-family: "Montserrat", "Nunito Sans", "Segoe UI", sans-serif;
      background: radial-gradient(circle at top left, #f5f7fb, #eceff4 68%);
      color: var(--text);
      min-height: 100vh;
      overflow-x: hidden;
    }

    .app-shell {
      min-height: calc(100vh - 76px);
      display: grid;
      grid-template-columns: 250px 1fr;
      transition: grid-template-columns .18s ease;
    }

    .sidebar {
      background: #fff;
      border-right: 1px solid var(--line);
      display: flex;
      flex-direction: column;
      padding: 18px 14px;
      gap: 16px;
      transition: padding .18s ease, transform .22s ease;
      will-change: transform;
    }

    .nav {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 4px;
    }

    .nav-item {
      border: 1px solid transparent;
      border-radius: 10px;
      padding: 10px 12px;
      font-size: 14px;
      color: #334155;
      background: transparent;
      cursor: pointer;
      transition: background .12s ease, border-color .12s ease;
      display: flex;
      align-items: center;
      gap: 10px;
      white-space: nowrap;
    }

    .nav-item:hover {
      background: #f8fafc;
      border-color: #e2e8f0;
    }

    .nav-item.active {
      background: rgba(198, 33, 39, 0.08);
      color: var(--primary);
      border-color: rgba(198, 33, 39, 0.2);
      font-weight: 700;
    }

    .nav-ico {
      width: 18px;
      text-align: center;
      font-size: 14px;
      flex: 0 0 18px;
    }

    .nav-label {
      overflow: hidden;
      text-overflow: ellipsis;
      transition: opacity .15s ease, transform .15s ease, width .15s ease;
    }

    .sidebar-footer {
      margin-top: auto;
      font-size: 12px;
      color: var(--muted);
      padding: 8px 12px;
      border-top: 1px solid var(--line);
    }

    .sidebar-collapsed .app-shell {
      grid-template-columns: 72px 1fr;
    }

    .sidebar-collapsed .sidebar {
      padding: 18px 8px;
    }

    .sidebar-collapsed .nav-item {
      justify-content: center;
      padding: 10px 8px;
      gap: 0;
    }

    .sidebar-collapsed .nav-label {
      opacity: 0;
      transform: translateX(-4px);
      width: 0;
      pointer-events: none;
    }

    .sidebar-collapsed .sidebar-footer {
      display: none;
    }

    .main {
      display: flex;
      flex-direction: column;
      min-width: 0;
    }

    .topbar {
      height: 76px;
      background: #fff;
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 24px;
      gap: 12px;
      width: 100%;
      position: sticky;
      top: 0;
      z-index: 30;
    }

    .mobile-overlay {
      display: none;
      position: fixed;
      inset: var(--mobile-header-offset) 0 0 0;
      background: rgba(15, 23, 42, 0.35);
      opacity: 0;
      pointer-events: none;
      transition: opacity .22s ease;
      z-index: 20;
    }

    .top-left {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 190px;
    }

    .menu-toggle {
      border: 1px solid var(--line-strong);
      background: #fff;
      color: #334155;
      border-radius: 9px;
      width: 38px;
      height: 38px;
      cursor: pointer;
      font-size: 18px;
      line-height: 1;
      padding: 0;
    }

    .menu-toggle:hover {
      border-color: var(--primary);
      color: var(--primary);
    }

    .brand-head {
      display: flex;
      align-items: baseline;
      gap: 6px;
      white-space: nowrap;
    }

    .brand-head .honda {
      color: var(--primary);
      font-weight: 800;
      font-size: 26px;
      line-height: 1;
      letter-spacing: .5px;
    }

    .brand-head .go {
      color: #475569;
      font-size: 18px;
      font-weight: 700;
    }

    .title h1 {
      margin: 0;
      font-size: 20px;
      letter-spacing: 0.2px;
    }

    .title {
      flex: 1;
      min-width: 0;
    }

    .title p {
      margin: 4px 0 0;
      font-size: 13px;
      color: var(--muted);
    }

    .top-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-left: auto;
    }

    #status {
      font-size: 13px;
      font-weight: 700;
      color: #475569;
      background: transparent;
      padding: 0;
      border-radius: 0;
      border: none;
      width: 560px;
      min-width: 420px;
      max-width: 560px;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      text-align: right;
      cursor: pointer;
    }

    #status:hover {
      color: #334155;
      text-decoration: underline;
    }

    .status-detail-text {
      width: 100%;
      min-height: 140px;
      max-height: 56vh;
      resize: vertical;
      border: 1px solid var(--line-strong);
      border-radius: 10px;
      padding: 10px;
      background: #f8fafc;
      color: #1f2937;
      font-family: "JetBrains Mono", "Consolas", monospace;
      font-size: 12px;
      line-height: 1.45;
    }

    .user-menu-wrap {
      position: relative;
      flex: 0 0 auto;
    }

    .user-chip {
      border: none;
      border-radius: 0;
      background: transparent;
      height: 28px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: #1e293b;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      transition: background .12s ease, border-color .12s ease;
    }

    .user-chip:hover {
      color: #0f172a;
    }

    .user-avatar-ico {
      width: 20px;
      height: 20px;
      border-radius: 999px;
      border: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      color: #475569;
      background: transparent;
      line-height: 1;
      flex: 0 0 auto;
    }

    .user-menu {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      width: 180px;
      background: #fff;
      border: 1px solid #cbd5e1;
      border-radius: 10px;
      box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
      padding: 6px;
      z-index: 30;
    }

    .user-menu.hidden {
      display: none;
    }

    .user-menu-item {
      width: 100%;
      border: 1px solid transparent;
      border-radius: 8px;
      background: transparent;
      color: #334155;
      font-size: 13px;
      font-weight: 700;
      text-align: left;
      padding: 8px 10px;
      cursor: pointer;
    }

    .user-menu-item:hover {
      background: #f8fafc;
      border-color: #e2e8f0;
    }

    .btn {
      border: 1px solid #cbd5e1;
      border-radius: 10px;
      padding: 8px 12px;
      cursor: pointer;
      color: #334155;
      background: #fff;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.2px;
      transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
      min-height: 38px;
      height: 38px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .btn:hover {
      background: #f8fafc;
      border-color: #94a3b8;
      color: #1e293b;
    }
    .btn:active { transform: translateY(1px); }

    .btn .btn-ico {
      width: 14px;
      height: 14px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 14px;
    }

    .btn .btn-ico svg {
      width: 14px;
      height: 14px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .btn.btn-danger {
      color: var(--primary);
      border-color: rgba(198, 33, 39, 0.32);
      background: #fff;
    }

    .btn.btn-danger:hover {
      color: #991b1b;
      border-color: rgba(153, 27, 27, 0.35);
      background: #fff5f5;
    }
    .app-confirm-actions {
      display: flex;
      gap: 10px;
      justify-content: flex-end;
      padding: 0 16px 14px;
      border-top: 1px solid var(--line);
      margin-top: 4px;
      padding-top: 12px;
    }

    .btn.btn-execute {
      color: #15803d;
      border-color: rgba(22, 163, 74, 0.42);
      background: #f0fdf4;
    }

    .btn.btn-execute:hover {
      color: #166534;
      border-color: rgba(21, 128, 61, 0.5);
      background: #dcfce7;
    }

    .content {
      padding: 18px;
      display: grid;
      grid-template-columns: minmax(560px, 0.95fr) minmax(420px, 1.35fr);
      gap: 14px;
      min-width: 0;
      align-items: stretch;
    }

    .page.hidden { display: none; }

    #page-config {
      grid-template-columns: minmax(0, 1fr);
      align-items: start;
    }

    #page-reservas.reserve-wide {
      grid-template-columns: minmax(0, 1fr);
      align-items: start;
    }

    #page-reservas.reserve-wide .log-panel {
      display: none;
    }

    #page-dashboard {
      grid-template-columns: minmax(0, 1fr);
      align-items: start;
    }

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

    .panel-head {
      padding: 16px 16px 12px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.22);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      background: #c62127;
      color: #ffffff;
      border-top-left-radius: var(--radius);
      border-top-right-radius: var(--radius);
    }

    .panel-head h2 {
      margin: 0;
      font-size: 18px;
      letter-spacing: 0.15px;
      color: #ffffff;
    }

    .panel-head p {
      margin: 4px 0 0;
      font-size: 12px;
      color: rgba(255, 255, 255, 0.9);
    }

    .panel-body { padding: 14px 16px 16px; }

    .config-row {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      margin-bottom: 12px;
    }

    .field-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .field label {
      display: block;
      font-size: 12px;
      color: #64748b;
      margin-bottom: 6px;
      font-weight: 600;
    }

    .field input,
    .field select,
    .field textarea {
      width: 100%;
      border: 1px solid var(--line-strong);
      background: var(--surface-soft);
      color: var(--text);
      border-radius: 10px;
      padding: 11px;
      font-size: 14px;
      transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
    }

    .field input:focus,
    .field select:focus,
    .field textarea:focus {
      outline: none;
      background: #fff;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(198, 33, 39, 0.14);
    }
    .field textarea {
      min-height: 160px;
      resize: vertical;
      font-family: "JetBrains Mono", "Consolas", monospace;
      line-height: 1.35;
    }

    .field.full { grid-column: span 2; }

    .field.field-alert label {
      color: var(--primary);
      font-weight: 700;
    }

    .field.field-alert input {
      border-color: rgba(198, 33, 39, 0.62);
      background: var(--surface-soft);
      color: var(--text);
    }

    .field.field-alert input::placeholder {
      color: #64748b;
    }

    .field.field-alert input:focus {
      background: #fff;
      border-color: rgba(198, 33, 39, 0.9);
      box-shadow: 0 0 0 3px rgba(198, 33, 39, 0.18);
    }

    .auth-search-row {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      margin-bottom: 12px;
    }

    .idsg-search-row {
      grid-template-columns: minmax(220px, 320px) minmax(320px, 1fr) auto;
      align-items: end;
    }
    .auth-users-search-row {
      grid-template-columns: minmax(220px, 290px) minmax(320px, 1fr) auto;
      align-items: end;
    }
    .auth-users-search-column {
      max-width: 290px;
    }
    .ga-search-row {
      grid-template-columns: minmax(260px, 1fr) minmax(180px, 230px) minmax(220px, 1fr) auto auto;
      align-items: end;
    }
    .ga-hybrid-filters {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(190px, 190px));
      justify-content: start;
      gap: 8px;
      align-items: end;
      margin-bottom: 12px;
    }
    .ga-hybrid-filters > .field,
    .ga-hybrid-filters > .ga-filter-actions {
      width: 100%;
      min-width: 0;
    }
    .ga-filter-inline .ga-inline {
      display: grid;
      grid-template-columns: 120px 1fr;
      gap: 8px;
    }
    .ga-qtd-box input {
      min-height: 42px;
      height: 42px;
      font-size: 16px;
      font-weight: 600;
      line-height: 1.2;
    }
    .ga-filter-actions {
      display: grid;
      grid-template-columns: repeat(2, 42px);
      justify-content: start;
      align-items: end;
      gap: 8px;
    }
    .ga-filter-actions .btn {
      width: 42px;
      min-width: 42px;
      min-height: 42px;
      height: 42px;
      padding: 0;
    }
    .ga-filter-actions .btn-ghost {
      background: #fff;
      border: 1px solid #cfd8e3;
      color: #334155;
    }

    .sol-search-row {
      grid-template-columns: minmax(170px, 220px) minmax(170px, 220px) minmax(200px, 280px) minmax(180px, 240px) minmax(300px, 1fr) auto;
      align-items: end;
    }

    .my-sol-search-row {
      grid-template-columns: minmax(170px, 220px) minmax(170px, 220px) minmax(220px, 300px) minmax(300px, 1fr) auto;
      align-items: end;
    }

    .reserved-search-row {
      grid-template-columns: minmax(170px, 210px) minmax(170px, 210px) minmax(360px, 1fr) auto;
      align-items: end;
    }

    .msg-search-row {
      grid-template-columns: minmax(170px, 210px) minmax(170px, 210px) minmax(220px, 280px) minmax(320px, 1fr) auto;
      align-items: end;
    }
    .premium-filter-row {
      grid-template-columns: minmax(180px, 240px) minmax(200px, 280px) minmax(280px, 1fr) auto;
      align-items: end;
    }
    .premium-filter-actions {
      display: grid;
      grid-template-columns: repeat(2, 42px);
      gap: 8px;
      align-items: end;
    }
    .premium-filter-actions .btn {
      width: 42px;
      min-width: 42px;
      height: 42px;
      min-height: 42px;
      padding: 0;
    }

    .auth-search-row .field input:not([type="checkbox"]):not([type="radio"]),
    .auth-search-row .field select {
      min-height: 42px;
      height: 42px;
    }

    .search-icon-btn {
      width: 42px;
      min-width: 42px;
      height: 42px;
      min-height: 42px;
      padding: 0;
    }

    .search-icon-btn .btn-label {
      display: none;
    }
    .inline-input-action {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
      align-items: center;
    }
    .inline-input-action .search-icon-btn {
      margin: 0;
    }
    .ga-add-filter-btn {
      min-height: 42px;
      height: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .active-filter-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin: -2px 0 12px;
    }
    .active-filter-chip {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 10px;
      border: 1px solid #d8dee9;
      border-radius: 999px;
      background: #f8fafc;
      color: #334155;
      font-size: 12px;
      font-weight: 600;
    }
    .chip-remove {
      border: 0;
      background: transparent;
      color: #64748b;
      font-size: 16px;
      line-height: 1;
      cursor: pointer;
      padding: 0;
    }

    .config-sections {
      margin-bottom: 12px;
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(190px, 190px));
      justify-content: start;
      gap: 8px;
    }

    .config-tab {
      border: 1px solid var(--line-strong);
      border-radius: 9px;
      padding: 8px 12px;
      width: 190px;
      min-height: 38px;
      height: 38px;
      background: #f8fafc;
      color: #334155;
      font-size: 13px;
      font-weight: 700;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1;
      cursor: pointer;
    }

    .config-tab.active {
      background: rgba(198, 33, 39, 0.12);
      border-color: rgba(198, 33, 39, 0.28);
      color: var(--primary);
    }

    .config-section.hidden {
      display: none;
    }

    .reserve-section.hidden {
      display: none;
    }
    .home-search-row {
      grid-template-columns: minmax(170px, 210px) minmax(170px, 210px) minmax(220px, 320px) auto;
      align-items: end;
      margin-bottom: 12px;
    }
    .seller-home-metrics {
      display: grid;
      grid-template-columns: repeat(4, minmax(150px, 1fr));
      gap: 10px;
      margin-bottom: 14px;
    }
    .seller-metric-card {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      padding: 12px;
    }
    .seller-home-metrics .seller-metric-card:nth-child(1) { background: #eef2ff; border-color: #c7d2fe; }
    .seller-home-metrics .seller-metric-card:nth-child(2) { background: #ecfdf5; border-color: #a7f3d0; }
    .seller-home-metrics .seller-metric-card:nth-child(3) { background: #eff6ff; border-color: #bfdbfe; }
    .seller-home-metrics .seller-metric-card:nth-child(4) { background: #fef9c3; border-color: #fde68a; }
    .seller-metric-card .k {
      font-size: 11px;
      color: #64748b;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .2px;
    }
    .seller-metric-card .v {
      margin-top: 8px;
      font-size: 30px;
      font-weight: 800;
      color: #0f172a;
      line-height: 1;
    }
    .seller-home-title {
      margin: 4px 0 10px;
      font-size: 20px;
      color: #0f172a;
    }
  .seller-home-links {
      display: grid;
      grid-template-columns: repeat(3, minmax(200px, 1fr));
      gap: 10px;
    }
    .seller-link-card {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      color: #0f172a;
      padding: 14px;
      text-align: left;
      text-decoration: none;
      cursor: pointer;
      transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
    }
    .seller-link-card:hover {
      border-color: #94a3b8;
      box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
      transform: translateY(-1px);
    }
    .seller-link-card span {
      font-size: 16px;
      font-weight: 700;
    }
    .seller-link-card small {
      font-size: 12px;
      color: #64748b;
    }
    .seller-link-card.disabled {
      opacity: 0.55;
      cursor: not-allowed;
      pointer-events: none;
      box-shadow: none;
      transform: none;
    }
    .seller-home-footer {
      margin-top: 14px;
      padding: 12px 14px;
      border: 1px solid #fecaca;
      border-radius: 10px;
      background: #fff5f5;
      color: #7f1d1d;
      font-size: 12px;
      line-height: 1.45;
    }
    .seller-home-footer p {
      margin: 0 0 6px;
    }
    .seller-home-footer p:last-child {
      margin-bottom: 0;
    }

    .auth-toolbar {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(190px, 190px));
      justify-content: start;
      gap: 8px;
      margin-bottom: 10px;
    }
    .auth-toolbar .btn {
      width: 190px;
      min-height: 40px;
      height: 40px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1;
      text-align: center;
    }
    #config-rbac .auth-toolbar,
    #config-audit .auth-toolbar,
    #config-password_policy .pp-head-toolbar {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      flex-wrap: wrap;
    }
    #config-password_policy .pp-head-toolbar {
      flex-direction: column;
      align-items: flex-start;
      gap: 2px;
    }
    #config-rbac .auth-toolbar h3,
    #config-audit .auth-toolbar h3,
    #config-password_policy .pp-head-toolbar h3 {
      margin: 0;
      white-space: normal;
    }
    #config-rbac .auth-toolbar p,
    #config-audit .auth-toolbar p,
    #config-password_policy .pp-head-toolbar p {
      margin: 0;
      flex: 1 1 520px;
      max-width: none;
      line-height: 1.3;
      white-space: normal;
    }
    #config-password_policy .pp-head-toolbar p {
      flex: 0 1 auto;
    }
    #config-audit .auth-toolbar .btn {
      width: auto;
      min-width: 170px;
      margin-top: 0 !important;
    }
    #config-assemblies .auth-toolbar,
    #config-active_groups .auth-toolbar {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    #config-assemblies .auth-toolbar .toolbar-left-actions,
    #config-active_groups .auth-toolbar .toolbar-left-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    #config-assemblies .auth-toolbar .toolbar-left-actions .btn,
    #config-active_groups .auth-toolbar .toolbar-left-actions .btn {
      width: 190px;
      min-width: 190px;
    }
    #config-assemblies .auth-toolbar .table-pager,
    #config-active_groups .auth-toolbar .table-pager {
      margin-left: auto;
    }
    .table-pager {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      font-size: 13px;
      color: #475569;
    }
    .table-pager label {
      font-weight: 700;
      color: #475569;
    }
    .table-pager select {
      min-width: 84px;
      height: 38px;
      border: 1px solid #cbd5e1;
      border-radius: 10px;
      padding: 0 10px;
      background: #fff;
      color: #0f172a;
      font-size: 13px;
      font-weight: 600;
    }
    .table-pager span {
      font-weight: 600;
      color: #475569;
      white-space: nowrap;
    }

    .dash-grid-cards {
      display: grid;
      grid-template-columns: repeat(7, minmax(120px, 1fr));
      gap: 10px;
      margin-bottom: 12px;
    }

    .dash-filters {
      display: grid;
      grid-template-columns: 170px 170px 220px auto;
      gap: 8px;
      align-items: end;
      margin-bottom: 12px;
    }

    .dash-filters .btn {
      min-height: 42px;
      height: 42px;
    }

    .dash-filters .search-icon-btn {
      min-height: 40px;
      height: 40px;
      width: 40px;
      min-width: 40px;
    }

    .dash-card {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      padding: 10px 12px;
      text-align: center;
      cursor: pointer;
    }

    .dash-card .k {
      font-size: 10px;
      font-weight: 700;
      color: #64748b;
      text-transform: uppercase;
      letter-spacing: .2px;
      cursor: help;
    }

    .dash-card .v {
      margin-top: 6px;
      font-size: 20px;
      font-weight: 800;
      color: #0f172a;
    }

    .dash-card .d {
      margin-top: 4px;
      font-size: 10px;
      font-weight: 500;
      color: #64748b;
      min-height: 14px;
    }

    .dash-card .d.up { color: #15803d; }
    .dash-card .d.down { color: #b91c1c; }

    .dash-card.dash-alert {
      border-color: #f59e0b !important;
      box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.25);
    }

    .dash-grid-cards .dash-card:nth-child(1) { background: #eef2ff; border-color: #c7d2fe; }
    .dash-grid-cards .dash-card:nth-child(2) { background: #ecfdf5; border-color: #a7f3d0; }
    .dash-grid-cards .dash-card:nth-child(3) { background: #fff1f2; border-color: #fecdd3; }
    .dash-grid-cards .dash-card:nth-child(4) { background: #eff6ff; border-color: #bfdbfe; }
    .dash-grid-cards .dash-card:nth-child(5) { background: #fef9c3; border-color: #fde68a; }
    .dash-grid-cards .dash-card:nth-child(6) { background: #f5f3ff; border-color: #ddd6fe; }
    .dash-grid-cards .dash-card:nth-child(n+7):nth-child(-n+12) { background: #f8fafc; border-color: #cbd5e1; }

    .dash-layout {
      display: grid;
      grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
      gap: 12px;
    }

    .dash-box {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      padding: 10px 12px;
      min-width: 0;
    }

    .dash-box h4 {
      margin: 0 0 8px;
      font-size: 14px;
      color: #1e293b;
    }

    .dash-box.api-health {
      grid-column: 2;
    }

    .api-health-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(120px, 1fr));
      gap: 8px;
    }

    .api-health-item {
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 8px;
      background: #f8fafc;
    }

    .api-health-item .k {
      font-size: 11px;
      color: #64748b;
      font-weight: 700;
      text-transform: uppercase;
    }

    .api-health-item .v {
      font-size: 18px;
      font-weight: 800;
      color: #0f172a;
      margin-top: 4px;
    }

    .dash-bars {
      display: flex;
      flex-direction: column;
      gap: 8px;
      max-height: 320px;
      overflow: auto;
    }

    .dash-bar-row {
      display: grid;
      grid-template-columns: minmax(120px, 180px) 1fr auto;
      align-items: center;
      gap: 8px;
      font-size: 12px;
    }

    .dash-bar-track {
      height: 8px;
      border-radius: 999px;
      background: #e2e8f0;
      overflow: hidden;
    }

    .dash-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, #2563eb, #06b6d4);
    }

    .dash-mini-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }

    .dash-mini-table th,
    .dash-mini-table td {
      border-bottom: 1px solid var(--line);
      padding: 7px 4px;
      text-align: left;
      white-space: nowrap;
    }

    .dash-mini-table th {
      color: #475569;
      font-size: 12px;
    }

    .dash-link-btn {
      border: none;
      background: transparent;
      padding: 0;
      margin: 0;
      min-height: 0;
      color: #1e293b;
      font-size: 13px;
      font-weight: 600;
      text-align: left;
      cursor: pointer;
      line-height: 1.2;
    }

    .dash-link-btn:hover {
      color: #0f172a;
      text-decoration: underline;
    }

    .auth-table-wrap {
      border: 1px solid var(--line);
      border-radius: 12px;
      overflow: auto;
      background: #fff;
      max-height: calc(100vh - 340px);
    }

    .auth-table {
      width: 100%;
      min-width: 980px;
      border-collapse: collapse;
      font-size: 13px;
    }

    .auth-table th,
    .auth-table td {
      border-bottom: 1px solid var(--line);
      padding: 8px 10px;
      text-align: left;
      vertical-align: middle;
      white-space: nowrap;
    }

    .auth-table thead th {
      position: sticky;
      top: 0;
      background: #f1f5f9;
      z-index: 2;
      font-weight: 700;
      color: #334155;
    }

    .sol-table {
      table-layout: fixed;
      width: 100%;
      min-width: 1650px;
    }

    .ga-table {
      table-layout: fixed;
      width: 100%;
      min-width: 980px;
    }
    .my-reservas-table th,
    .my-reservas-table td,
    .cotas-reservadas-table th,
    .cotas-reservadas-table td {
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .my-reservas-table {
      min-width: 1150px;
    }
    .cotas-reservadas-table {
      min-width: 1320px;
    }
    .appuser-table {
      min-width: 1320px;
    }

    .sol-cell-ellipsis {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .ga-cell-ellipsis {
      display: block;
      width: 20ch;
      max-width: 20ch;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .auth-actions {
      display: flex;
      gap: 6px;
    }

    .auth-action-btn {
      border: 1px solid #cbd5e1;
      background: #fff;
      color: #64748b;
      border-radius: 8px;
      cursor: pointer;
      padding: 0;
      width: 30px;
      min-width: 30px;
      height: 30px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: background .12s ease, border-color .12s ease, color .12s ease;
    }

    .auth-action-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      filter: grayscale(1);
      border-color: #e2e8f0;
      background: #f1f5f9;
      color: #94a3b8;
    }

    .auth-action-btn:hover {
      background: #f8fafc;
      border-color: #94a3b8;
      color: #334155;
    }

    .auth-action-btn.auth-action-danger {
      color: var(--primary);
      border-color: rgba(198, 33, 39, 0.32);
      background: #fff;
    }

    .auth-action-btn.auth-action-danger:hover {
      color: #991b1b;
      border-color: rgba(153, 27, 27, 0.35);
      background: #fff5f5;
    }

    .auth-action-btn.auth-action-success {
      color: #15803d;
      border-color: rgba(22, 163, 74, 0.42);
      background: #f0fdf4;
    }

    .auth-action-btn.auth-action-success:hover {
      color: #166534;
      border-color: rgba(21, 128, 61, 0.52);
      background: #dcfce7;
    }

    .auth-action-btn svg {
      width: 14px;
      height: 14px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .auth-modal-card {
      width: min(820px, 96vw);
      max-height: min(760px, 94vh);
    }

    .auth-edit-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .auth-edit-grid .field.full { grid-column: span 2; }
    .model-variant-editor-row {
      display: flex;
      gap: 8px;
      align-items: flex-end;
      flex-wrap: nowrap;
      margin-bottom: 8px;
    }
    .model-variant-editor-row .field {
      margin: 0;
      min-width: 0;
      flex: 1;
    }
    .model-variant-editor-row .field input,
    .model-variant-editor-row .field select {
      min-width: 0;
    }
    .model-variant-editor-row .field:nth-child(1) { flex: 1.7; }
    .model-variant-editor-row .field:nth-child(2) { flex: 0.9; }
    .model-variant-editor-row .field:nth-child(3) { flex: 0.55; max-width: 110px; }
    .model-variant-editor-row .field:nth-child(4) { flex: 0.8; max-width: 170px; }
    .model-variant-editor-row-actions { flex-wrap: wrap; }
    #modelo_var_image_file { flex: 1; min-width: 220px; }
    .model-specs-editor { margin-top: 4px; }
    .model-spec-tabs {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 10px;
    }
    .model-spec-tab {
      border: 1px solid #bcc8da;
      background: #eef2f7;
      color: #243b58;
      border-radius: 999px;
      padding: 6px 14px;
      font-weight: 700;
      cursor: pointer;
    }
    .model-spec-tab.active {
      background: #c1121f;
      color: #fff;
      border-color: #c1121f;
    }
    .model-spec-panel {
      display: none;
      border: 1px solid #d4deed;
      border-radius: 10px;
      padding: 10px;
      background: #f8fafc;
    }
    .model-spec-panel.active { display: block; }
    .model-spec-panel .auth-edit-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }
    .model-variants-wrap {
      max-height: 220px;
      overflow: auto;
    }
    .model-variants-table th,
    .model-variants-table td {
      white-space: nowrap;
      padding: 6px 6px;
    }
    .model-variants-table {
      table-layout: fixed;
      width: auto;
      min-width: 0 !important;
      display: inline-table;
    }
    .model-variants-table th:nth-child(1),
    .model-variants-table td:nth-child(1) { width: 28px; text-align: center; }
    .model-variants-table th:nth-child(2),
    .model-variants-table td:nth-child(2) { width: 28px; text-align: center; }
    .model-variants-table th:nth-child(3),
    .model-variants-table td:nth-child(3) { width: 100px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
    .model-variants-table th:nth-child(4),
    .model-variants-table td:nth-child(4) { width: 62px; text-align: center; }
    .model-variants-table th:nth-child(5),
    .model-variants-table td:nth-child(5) { width: 60px; text-align: center; }
    .model-variants-table th:nth-child(6),
    .model-variants-table td:nth-child(6) { width: 44px; text-align: center; }
    .model-variants-table th:nth-child(7),
    .model-variants-table td:nth-child(7) { width: 70px; text-align: center; }
    .model-variants-table td:nth-child(7) .btn {
      min-width: 56px;
      padding: 4px 6px;
    }
    .model-variants-table td:nth-child(7) .auth-actions{
      justify-content: center;
    }
    .model-variants-table td:nth-child(7) .auth-action-btn{
      width: 30px;
      height: 30px;
      padding: 0;
      min-width: 30px;
    }
    .variant-select-btn {
      width: 12px;
      height: 12px;
      padding: 0;
      border: 1px solid #7f8fa6;
      border-radius: 2px;
      background: #fff;
      line-height: 10px;
      font-size: 10px;
      color: #2563eb;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .sol-triplet-row {
      padding: 0;
      margin: 0;
    }
    .sol-triplet-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
    }
    .field .readonly {
      background: #eef2f7;
      color: #4b5563;
    }

    .check-wrap {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 6px;
      font-size: 13px;
      color: #334155;
      font-weight: 600;
    }

    .check-wrap input { width: auto; }

    .check-wrap.check-alert {
      color: var(--primary);
      font-weight: 700;
    }

    .form-footer {
      margin-top: 16px;
      padding-top: 14px;
      padding-bottom: 5px;
      border-top: 1px solid var(--line);
      display: flex;
      justify-content: center;
      gap: 8px;
      flex-wrap: nowrap;
      overflow-x: visible;
      min-height: 57px;
    }

    .form-footer .btn {
      min-width: 0;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    #reserve-config .form-footer {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      justify-content: stretch;
      gap: 8px;
      overflow: visible;
      min-height: 0;
    }
    #reserve-config .form-footer .btn {
      width: 100%;
      min-width: 0;
    }

    #config-database .form-footer {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      justify-content: stretch;
      gap: 8px;
      overflow: visible;
      min-height: 0;
    }
    #config-database .form-footer .btn {
      width: 100%;
      min-width: 0;
    }

    .log-panel {
      display: flex;
      flex-direction: column;
      min-height: 0;
    }

    #logs {
      margin: 0;
      padding: 12px;
      font-family: "JetBrains Mono", "Consolas", monospace;
      font-size: 12px;
      line-height: 1.45;
      color: #1f2937;
      background: #f8fafc;
      border-top: 1px solid var(--line);
      border-bottom-left-radius: var(--radius);
      border-bottom-right-radius: var(--radius);
      flex: 1 1 auto;
      min-height: 0;
      height: 0;
      max-height: none;
      overflow-y: auto;
      overflow-x: auto;
      white-space: pre;
      word-break: normal;
    }

    .modal {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.48);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10020;
      padding: 18px;
    }

    .modal.hidden { display: none; }

    .modal-card {
      width: min(920px, 96vw);
      max-height: min(720px, 92vh);
      overflow: hidden;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 14px;
      box-shadow: 0 20px 56px rgba(15, 23, 42, 0.2);
      display: flex;
      flex-direction: column;
    }

    .login-overlay {
      position: fixed;
      inset: 0;
      background: #eef1f5;
      display: flex;
      align-items: stretch;
      justify-content: stretch;
      z-index: 10000;
      padding: 0;
    }

    .login-overlay.hidden { display: none; }

    .login-screen {
      width: 100%;
      min-height: 100vh;
      display: grid;
      grid-template-columns: minmax(320px, 1fr) minmax(360px, 1fr);
      background: #fff;
    }

    .login-visual {
      position: relative;
      overflow: hidden;
      background: #0f172a;
      min-height: 300px;
    }

    .login-visual img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .login-visual::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, rgba(15, 23, 42, 0.52), rgba(198, 33, 39, 0.28));
      pointer-events: none;
    }

    .login-visual-caption {
      position: absolute;
      left: 28px;
      right: 28px;
      bottom: 26px;
      z-index: 1;
      color: #fff;
    }

    .login-visual-caption h3 {
      margin: 0;
      font-size: 34px;
      line-height: 1.1;
      letter-spacing: 0.3px;
    }

    .login-visual-caption p {
      margin: 8px 0 0;
      font-size: 14px;
      opacity: 0.94;
    }

    .login-form-side {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    }

    .login-card {
      width: min(460px, 94vw);
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 14px;
      box-shadow: 0 20px 56px rgba(15, 23, 42, 0.14);
      overflow: hidden;
    }

    .login-head {
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
      background: #f8fafc;
    }

    .login-head h3 {
      margin: 0;
      font-size: 20px;
      color: #0f172a;
    }

    .login-head p {
      margin: 4px 0 0;
      font-size: 13px;
      color: var(--muted);
    }

    .login-body {
      padding: 14px 16px 16px;
      display: grid;
      gap: 10px;
    }

    .login-error {
      margin: 6px 0 0;
      min-height: 20px;
      color: var(--primary);
      font-weight: 400;
      font-size: 13px;
    }

    .field-required-missing {
      border-color: #dc2626 !important;
      box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.25) inset !important;
    }

    .modal-head {
      padding: 14px 16px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.22);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      background: #c62127;
      color: #fff;
    }

    .modal-head h3 {
      margin: 0;
      font-size: 17px;
      color: #fff;
    }
    .modal-head .btn {
      min-width: 150px;
      height: 38px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      flex: 0 0 auto;
    }

    .modal-sub {
      margin: 4px 0 0;
      color: rgba(255, 255, 255, 0.9);
      font-size: 12px;
    }

    .diag-body {
      overflow: auto;
      padding: 10px 12px 14px;
    }

    .dash-details-body {
      overflow: hidden;
    }

    .dash-details-body .auth-table-wrap {
      max-height: 62vh;
      overflow: auto;
    }

    .dash-details-table {
      width: 100%;
      min-width: 0;
      table-layout: auto;
    }

    .dash-details-table th,
    .dash-details-table td {
      white-space: normal;
      overflow-wrap: anywhere;
    }

    .diag-list {
      border: 1px solid var(--line);
      border-radius: 12px;
      overflow: hidden;
      background: #fff;
    }

    .diag-row {
      width: 100%;
      border-bottom: 1px solid var(--line);
      background: #fff;
      display: grid;
      grid-template-columns: 34px 1fr 180px 120px 84px;
      gap: 10px;
      align-items: center;
      padding: 11px 12px;
      text-align: left;
      color: #1f2937;
      font-size: 13px;
    }

    .diag-row:last-child { border-bottom: 0; }
    .diag-row:hover { background: #f8fafc; }

    .diag-head {
      background: #f1f5f9;
      font-weight: 700;
      color: #334155;
      cursor: default;
    }

    .diag-open-link {
      border: 0;
      padding: 0;
      background: transparent;
      color: #1f2937;
      text-align: left;
      cursor: pointer;
      font-size: 13px;
      font-weight: 600;
    }

    .diag-open-link:hover {
      color: #0f172a;
      text-decoration: underline;
    }

    .diag-actions {
      display: flex;
      gap: 6px;
      justify-content: flex-end;
    }

    .success-msg-list {
      border: 1px solid var(--line);
      border-radius: 12px;
      overflow: hidden;
      background: #fff;
    }

    .success-msg-row {
      width: 100%;
      border-bottom: 1px solid var(--line);
      background: #fff;
      display: grid;
      grid-template-columns: 34px 1fr;
      gap: 10px;
      align-items: flex-start;
      padding: 11px 12px;
      text-align: left;
      color: #1f2937;
      font-size: 13px;
    }

    .success-msg-row:last-child { border-bottom: 0; }
    .success-msg-head {
      background: #f1f5f9;
      font-weight: 700;
      color: #334155;
    }

    .success-msg-text {
      margin: 0;
      white-space: pre-wrap;
      line-height: 1.45;
      font-family: "JetBrains Mono", "Consolas", monospace;
      font-size: 12px;
    }

    .monitor-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 10px;
    }

    .monitor-card {
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 10px 12px;
      background: #fff;
    }

    .monitor-label {
      margin: 0;
      font-size: 11px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .4px;
    }

    .monitor-value {
      margin: 6px 0 0;
      font-size: 20px;
      line-height: 1.1;
      font-weight: 800;
      color: #0f172a;
    }

    .monitor-meta {
      margin: 6px 0 0;
      font-size: 12px;
      color: #64748b;
    }

    .monitor-log {
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #f8fafc;
      padding: 10px;
      font-family: "JetBrains Mono", "Consolas", monospace;
      font-size: 12px;
      line-height: 1.4;
      white-space: pre-wrap;
      word-break: break-word;
      max-height: 280px;
      overflow: auto;
      margin: 0;
    }

    .monitor-empty {
      color: #64748b;
      font-size: 12px;
      margin: 0;
    }

    @media (max-width: 1180px) {
      .top-left {
        min-width: 160px;
      }
      .title h1 {
        font-size: 18px;
      }
      .title p {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      #status {
        width: auto;
        min-width: 240px;
        max-width: 380px;
      }
      .content {
        grid-template-columns: 1fr;
        align-items: start;
      }
      .dash-grid-cards {
        grid-template-columns: repeat(4, minmax(130px, 1fr));
      }
      .dash-filters {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
      }
      .dash-layout {
        grid-template-columns: 1fr;
      }
      .dash-box.api-health {
        grid-column: auto;
      }
      .log-panel {
        height: auto;
        min-height: 0;
        max-height: none;
      }
      #logs {
        flex: 0 0 auto;
        height: 250px;
        max-height: 250px;
      }
      .auth-table-wrap {
        max-height: 56vh;
      }
    }

    @media (max-width: 900px) {
      .app-shell { grid-template-columns: 1fr; }
      .sidebar-collapsed .app-shell { grid-template-columns: 1fr; }
      .mobile-overlay { display: block; }
      .sidebar {
        position: fixed;
        top: var(--mobile-header-offset);
        left: 0;
        bottom: 0;
        width: 250px;
        max-width: 85vw;
        z-index: 25;
        border-right: 1px solid var(--line);
        border-bottom: none;
        box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
        transform: translateX(-108%);
        padding: 18px 14px;
      }
      body.sidebar-mobile-open .sidebar { transform: translateX(0); }
      body.sidebar-mobile-open .mobile-overlay {
        opacity: 1;
        pointer-events: auto;
      }
      .nav { flex-direction: column; flex-wrap: nowrap; }
      .nav-item { font-size: 13px; padding: 10px 12px; }
      .sidebar-collapsed .sidebar { padding: 18px 14px; }
      .sidebar-collapsed .nav-label {
        opacity: 1;
        transform: none;
        width: auto;
        pointer-events: auto;
      }
      .sidebar-collapsed .sidebar-footer { display: block; }
      .sidebar-collapsed .nav-item { justify-content: flex-start; gap: 10px; padding: 10px 12px; }
      .topbar {
        height: auto;
        align-items: center;
        flex-wrap: wrap;
        padding: 14px;
      }
      :root {
        --mobile-header-offset: 146px;
      }
      .top-left { min-width: auto; }
      .title { flex: 1 1 220px; }
      .title p {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
      }
      .top-actions {
        width: 100%;
        justify-content: flex-end;
      }
      .dash-grid-cards {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
      }
      .seller-home-metrics {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
      }
      .seller-home-links {
        grid-template-columns: 1fr;
      }
      .home-search-row { grid-template-columns: 1fr; }
      .config-sections {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .config-tab {
        width: 100%;
      }
      .auth-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .auth-toolbar .btn {
        width: 100%;
      }
      #config-rbac .auth-toolbar,
      #config-audit .auth-toolbar {
        display: flex;
      }
      #config-rbac .auth-toolbar h3,
      #config-audit .auth-toolbar h3,
      #config-rbac .auth-toolbar p,
      #config-audit .auth-toolbar p {
        flex: 1 1 100%;
      }
      #config-audit .auth-toolbar .btn {
        width: 100%;
      }
      .dash-filters {
        grid-template-columns: 1fr;
      }
      #config-database .form-footer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      #config-database .form-footer .btn {
        width: 100%;
        min-width: 0;
      }
      #reserve-config .form-footer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .dash-bar-row {
        grid-template-columns: minmax(90px, 120px) 1fr auto;
      }
      #status {
        width: min(100%, 560px);
        min-width: 0;
      }
      .content { padding: 12px; }
      .field-grid { grid-template-columns: 1fr; }
      .auth-edit-grid { grid-template-columns: 1fr; }
      .field.full { grid-column: span 1; }
      .auth-edit-grid .field.full { grid-column: span 1; }
      .model-variant-editor-row { flex-wrap: wrap; }
      #modelo_var_color_name,
      #modelo_var_color_hex,
      #modelo_var_sort_order,
      #modelo_var_status,
      #modelo_var_image_file {
        flex: 1 1 calc(50% - 8px);
        min-width: 140px;
        max-width: none;
      }
      .sol-triplet-grid { grid-template-columns: 1fr; }
      .config-row { grid-template-columns: 1fr; }
      .auth-search-row {
        grid-template-columns: 1fr auto;
        align-items: end;
      }
      .auth-search-row > .field {
        grid-column: 1 / -1;
      }
      .auth-search-row > .field:last-child,
      .auth-search-row > .field:nth-last-child(2) {
        grid-column: 1;
      }
      .auth-search-row > .search-icon-btn,
      .auth-search-row > div:last-child {
        grid-column: 2;
        justify-self: start;
      }
      .auth-search-row > div:last-child {
        display: flex;
        align-items: flex-end;
      }
      .auth-search-row > div:last-child .search-icon-btn {
        margin: 0;
      }
      .auth-users-search-row {
        grid-template-columns: 1fr auto;
      }
      .auth-users-search-row > .field:first-child {
        grid-column: 1 / -1;
        max-width: none;
      }
      .auth-users-search-row > .field:nth-child(2) {
        grid-column: 1;
      }
      .auth-users-search-row > .search-action {
        grid-column: 2;
        justify-self: start;
        display: flex;
        align-items: flex-end;
      }
      .auth-users-search-row > .search-action .search-icon-btn {
        margin: 0;
      }
      .premium-filter-row {
        grid-template-columns: 1fr 1fr;
      }
      .premium-filter-row > .field {
        grid-column: auto;
      }
      .premium-filter-row > .field:nth-child(3) {
        grid-column: 1 / -1;
      }
      .premium-filter-row > .premium-filter-actions {
        grid-column: 1 / -1;
      }
      .dash-filters {
        grid-template-columns: 1fr auto;
        align-items: end;
      }
      .dash-filters > .field {
        grid-column: 1 / -1;
      }
      .dash-filters > .field:last-child,
      .dash-filters > .field:nth-last-child(2) {
        grid-column: 1;
      }
      .dash-filters > .search-icon-btn,
      .dash-filters > div:last-child {
        grid-column: 2;
        justify-self: start;
      }
      .dash-filters > div:last-child {
        display: flex;
        align-items: flex-end;
      }
      .dash-filters > div:last-child .search-icon-btn {
        margin: 0;
      }
      .idsg-search-row { grid-template-columns: 1fr auto; }
      .ga-search-row { grid-template-columns: 1fr auto auto; }
      .sol-search-row { grid-template-columns: 1fr auto; }
      .my-sol-search-row { grid-template-columns: 1fr auto; }
      .reserved-search-row { grid-template-columns: 1fr auto; }
      .msg-search-row { grid-template-columns: 1fr auto; }
      .home-search-row { grid-template-columns: 1fr auto; }
      .home-search-row > .field {
        grid-column: 1 / -1;
      }
      .home-search-row > .field:nth-child(2) {
        grid-column: 1;
      }
      .home-search-row > div:last-child {
        grid-column: 2;
        justify-self: start;
      }
      .ga-search-row > .field {
        grid-column: 1 / -1;
      }
      .ga-search-row > .field:nth-child(3) {
        grid-column: 1;
      }
      .ga-search-row > div:nth-last-child(2) {
        grid-column: 2;
        justify-self: start;
        display: flex;
        align-items: flex-end;
      }
      .ga-search-row > div:last-child {
        grid-column: 3;
        justify-self: start;
        display: flex;
        align-items: flex-end;
      }
      .diag-row { grid-template-columns: 1fr; gap: 6px; }
      .monitor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .modal-head {
        flex-wrap: wrap;
        align-items: flex-start;
      }
      .modal-head > div:last-child[style*="display:flex"] {
        width: 100%;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px !important;
        align-items: stretch !important;
      }
      .modal-head > div:last-child[style*="display:flex"] .btn {
        width: 100%;
        min-width: 0;
      }
      .modal-head > .btn {
        margin-left: auto;
        min-width: 120px;
      }
      /* Grupos Ativos (mobile): organizar ações e paginação em menos linhas */
      #config-active_groups .auth-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        align-items: start;
      }
      #config-active_groups .auth-toolbar .toolbar-left-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
      }
      #config-active_groups .auth-toolbar .toolbar-left-actions .btn {
        width: 100%;
        min-width: 0;
      }
      #config-active_groups .auth-toolbar .table-pager {
        grid-column: 1 / -1;
        margin-left: 0;
        display: grid;
        grid-template-columns: auto 84px 1fr 1fr;
        gap: 8px;
        align-items: center;
        width: 100%;
      }
      #config-active_groups .auth-toolbar .table-pager label {
        justify-self: start;
      }
      #config-active_groups .auth-toolbar .table-pager select {
        width: 84px;
        min-width: 84px;
      }
      #config-active_groups .auth-toolbar .table-pager .btn {
        width: 100%;
        min-width: 0;
      }
      #config-active_groups .auth-toolbar .table-pager span {
        grid-column: 1 / -1;
        white-space: nowrap;
      }
      .login-screen {
        grid-template-columns: 1fr;
        min-height: 100dvh;
      }
      .login-visual {
        min-height: 180px;
        max-height: 42vh;
      }
      .login-visual-caption h3 {
        font-size: 22px;
      }
      .login-visual-caption p {
        font-size: 13px;
      }
      .login-overlay {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
      }
      .login-form-side {
        align-items: flex-start;
        justify-content: center;
        padding: 12px 12px 18px;
      }
      .login-card {
        width: min(420px, calc(100vw - 24px));
      }
      .login-head {
        padding: 12px 14px;
      }
      .login-body {
        padding: 12px 14px 14px;
      }
    }
/* --- FASE 2: ESTABILIZACAO VISUAL DAS TABELAS --- */
table, .auth-table, .sol-table {
    table-layout: fixed !important;
    width: 100% !important;
}

table th, table td, .auth-table th, .auth-table td {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grupo-similar-table {
    table-layout: auto !important;
    width: max-content !important;
    min-width: 100% !important;
    font-size: 12px;
}
#grupoSimilarModal .auth-table-wrap {
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}
.grupo-similar-table th,
.grupo-similar-table td {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    padding: 8px 8px !important;
}
.grupo-similar-table th:nth-child(1),
.grupo-similar-table td:nth-child(1) { width: 50px; }
.grupo-similar-table th:nth-child(2),
.grupo-similar-table td:nth-child(2) { width: 36px; }
.grupo-similar-table th:nth-child(3),
.grupo-similar-table td:nth-child(3) { width: 120px; }
.grupo-similar-table th:nth-child(4),
.grupo-similar-table td:nth-child(4) { width: 44px; }
.grupo-similar-table th:nth-child(5),
.grupo-similar-table td:nth-child(5) { width: 42px; }
.grupo-similar-table th:nth-child(6),
.grupo-similar-table td:nth-child(6) { width: 42px; }
.grupo-similar-table th:nth-child(7),
.grupo-similar-table td:nth-child(7) { width: 82px; }
.grupo-similar-table th:nth-child(7),
.grupo-similar-table td:nth-child(7) {
    padding-right: 4px !important;
}
.grupo-similar-row {
    cursor: pointer;
}
.grupo-similar-row:hover {
    background: #f8fafc;
}
.search-icon-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* Importacao de assembleias por texto (modal em Grupos Ativos) */
.ga-assembleias-preview-wrap {
    overflow-x: auto !important;
}
.ga-assembleias-preview-table {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 1120px;
    font-size: 12px;
}
.ga-assembleias-preview-table th,
.ga-assembleias-preview-table td {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.ga-assembleias-preview-table th:nth-child(1),
.ga-assembleias-preview-table td:nth-child(1) { width: 7%; }   /* Grupo */
.ga-assembleias-preview-table th:nth-child(2),
.ga-assembleias-preview-table td:nth-child(2) { width: 9%; }   /* Cota-R-D */
.ga-assembleias-preview-table th:nth-child(3),
.ga-assembleias-preview-table td:nth-child(3) { width: 12%; }  /* Data Contemplacao */
.ga-assembleias-preview-table th:nth-child(4),
.ga-assembleias-preview-table td:nth-child(4) { width: 12%; }  /* Tipo */
.ga-assembleias-preview-table th:nth-child(5),
.ga-assembleias-preview-table td:nth-child(5) { width: 12%; }  /* Data Desclassificacao */
.ga-assembleias-preview-table th:nth-child(6),
.ga-assembleias-preview-table td:nth-child(6) { width: 20%; }  /* Nome Consorciado */
.ga-assembleias-preview-table th:nth-child(7),
.ga-assembleias-preview-table td:nth-child(7) { width: 8%; }   /* % Lance */
.ga-assembleias-preview-table th:nth-child(8),
.ga-assembleias-preview-table td:nth-child(8) { width: 12%; }  /* Vendedor */
.ga-assembleias-preview-table th:nth-child(9),
.ga-assembleias-preview-table td:nth-child(9) { width: 8%; }   /* Num Loteria */

/* Grupos Ativos: manter layout original e garantir 4 ações visíveis */
#config-active_groups .auth-table th:nth-child(1),
#config-active_groups .auth-table td:nth-child(1) { width: 32px; }  /* check */
#config-active_groups .auth-table th:nth-child(2),
#config-active_groups .auth-table td:nth-child(2) { width: 74px; }  /* grupo */
#config-active_groups .auth-table th:nth-child(3),
#config-active_groups .auth-table td:nth-child(3) { width: 52px; }  /* tipo */
#config-active_groups .auth-table th:nth-child(4),
#config-active_groups .auth-table td:nth-child(4) { width: 64px; }  /* parc */
#config-active_groups .auth-table th:nth-child(5),
#config-active_groups .auth-table td:nth-child(5) { width: 62px; }  /* venc */
#config-active_groups .auth-table th:nth-child(6),
#config-active_groups .auth-table td:nth-child(6) { width: 62px; }  /* prazo */
#config-active_groups .auth-table th:nth-child(7),
#config-active_groups .auth-table td:nth-child(7) { min-width: 180px; } /* produto */
#config-active_groups .auth-table th:nth-child(8),
#config-active_groups .auth-table td:nth-child(8) { min-width: 140px; } /* modelos */
#config-active_groups .auth-table th {
    font-size: 13px;
    white-space: nowrap;
}
#config-active_groups .auth-table td:nth-child(7) {
    white-space: nowrap;
}
#config-active_groups .auth-table td:nth-child(8) {
    white-space: nowrap;
}
#config-active_groups .auth-table th:nth-child(16),
#config-active_groups .auth-table td:nth-child(16) { width: 176px; } /* Ações (4 botões) */
#config-active_groups .auth-table td:nth-child(16) .auth-actions {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
}

.ga-lite-pager {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    color: #3a3a3a;
    font-size: 14px;
}
.ga-lite-pager-btn {
    border: 0;
    background: transparent;
    color: #7b7b7b;
    font-size: 28px;
    line-height: 1;
    width: 28px;
    height: 28px;
    cursor: pointer;
    padding: 0;
}
.gaa-row { cursor: pointer; }
.gaa-row:hover { background: #f8fafc; }
.gaa-row.gaa-row-selected { background: #eef6ff; }
.gaa-chart-wrap { width: 100%; min-width: 0; }
.gaa-chart-wrap canvas { display:block; width:100%; height:360px; }
.gaa-chart-wrap { position: relative; }
.gaa-chart-tooltip {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    font-size: 12px;
    line-height: 1.35;
    padding: 8px 10px;
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(0,0,0,.25);
    max-width: 240px;
}
.gaa-chart-tooltip.hidden { display: none; }
@media (max-width: 900px) {
  .gaa-chart-wrap { overflow-x: auto; }
  .gaa-chart-wrap canvas { min-width: 1080px; }
}
.ga-lite-pager-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.premium-catalog-sections {
  display: block;
}
.premium-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.premium-category-section {
  margin-bottom: 20px;
}
.premium-category-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 8px 0 12px;
}
.premium-category-head .line {
  height: 1px;
  background: #d1d5db;
}
.premium-category-head h3 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 400;
  color: #1f2937;
}
.premium-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  height: 100%;
}
.premium-card-top {
  padding: 14px 14px 10px;
  position: relative;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.premium-card-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-color);
  line-height: 1.1;
  margin: 6px 0 10px;
  min-height: 2.2em;
}
.premium-card-image {
  height: 190px;
  display: grid;
  place-items: center;
  background: #ffffff;
  border-radius: 0;
  overflow: hidden;
}
.premium-card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.premium-color-name {
  color: var(--text-muted);
  font-size: 1rem;
  min-height: 26px;
  margin: 6px 0 8px;
}
.premium-swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 8px;
}
.premium-swatch {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 2px solid #d1d5db;
  cursor: pointer;
}
.premium-swatch.active {
  outline: 2px solid #6b7280;
  outline-offset: 1px;
}
.premium-swatch-search {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #4b4f55;
  border: 0;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.premium-swatch-search svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.premium-card-summary {
  font-size: 0.92rem;
  line-height: 1.36;
  background: transparent;
  padding: 12px 14px;
  min-height: 120px;
  color: #1f2937;
  margin-bottom: auto;
}
.premium-card-summary strong {
  font-weight: 700;
}
.premium-tech-btn {
  align-self: stretch;
  margin: 12px 14px 14px;
  background: #c40000;
  border-color: #c40000;
  color: #fff;
  font-weight: 800;
}
.premium-tech-btn:hover {
  background: #a80000;
  border-color: #a80000;
}
.premium-spec-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.premium-spec-tab {
  border: 1px solid var(--line-color);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}
.premium-spec-tab.active {
  background: #c51622;
  border-color: #c51622;
  color: #fff;
}
.premium-spec-table .row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 12px;
  padding: 12px;
}
.premium-spec-table .row:nth-child(odd) {
  background: #f3f4f6;
}
.premium-spec-table .k {
  font-weight: 800;
}
.premium-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.premium-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

#premiumModelDetailModal {
  z-index: 10030;
}

#premiumWhatsappCardModal {
  z-index: 10060;
}

#premiumWhatsappContactModal {
  z-index: 10080;
}

@media (max-width: 1100px) {
  .ga-hybrid-filters {
    grid-template-columns: repeat(auto-fill, minmax(190px, 190px));
  }

  @media (max-width: 820px) {
    .premium-spec-table .row {
      grid-template-columns: 1fr;
      gap: 6px;
    }
  }
  .ga-filter-inline .ga-inline {
    grid-template-columns: 100px 1fr;
  }
}

@media (max-width: 768px) {
  .ga-hybrid-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: start;
  }
  .ga-hybrid-filters > .field,
  .ga-hybrid-filters > .ga-filter-actions {
    width: 100%;
  }
  .premium-card-image {
    height: 240px;
  }
  .premium-card-image img {
    max-height: 232px;
  }
  .premium-detail-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .premium-detail-actions {
    flex-wrap: wrap;
  }
}
