* { box-sizing: border-box; }

    html, body {
      margin: 0;
      padding: 0;
      font-family: Arial, Helvetica, sans-serif;
      background: linear-gradient(180deg, var(--bg) 0%, #f8fafc 100%);
      color: var(--text);
    }

    .container {
      width: min(1180px, calc(100% - 32px));
      margin: 0 auto;
    }

    header {
      position: sticky;
      top: 0;
      z-index: 30;
      backdrop-filter: blur(10px);
      background: rgba(255, 255, 255, 0.95);
      border-bottom: 1px solid rgba(229, 231, 235, 0.95);
    }

    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: clamp(8px, 1.4vw, 16px);
      padding: 16px 0;
      flex-wrap: nowrap;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 16px;
      text-decoration: none;
      color: inherit;
      cursor: pointer;
      flex: 0 1 auto;
      min-width: 0;
    }

    .brand img {
      height: clamp(40px, 4vw, 56px);
      max-width: clamp(110px, 18vw, 240px);
      width: auto;
      display: block;
      object-fit: contain;
    }

    .brand-text h1 {
      margin: 0;
      font-size: clamp(1rem, 1.45vw, 1.45rem);
      color: var(--primary-strong);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      white-space: nowrap;
    }

    nav {
      display: flex;
      gap: clamp(6px, 0.8vw, 10px);
      flex: 1 1 auto;
      flex-wrap: nowrap;
      justify-content: flex-end;
      min-width: 0;
    }

    .menu-toggle {
      display: none;
      width: 44px;
      height: 44px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      cursor: pointer;
      padding: 10px;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 5px;
    }

    .menu-toggle span {
      width: 20px;
      height: 2px;
      border-radius: 999px;
      background: var(--primary-strong);
      display: block;
    }

    .nav-btn {
      display: inline-flex;
      align-items: center;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--primary-strong);
      border-radius: 8px;
      padding: 11px clamp(10px, 1.1vw, 16px);
      cursor: pointer;
      font-weight: 600;
      text-decoration: none;
      flex: 0 1 auto;
      min-width: 0;
      white-space: nowrap;
    }

    .nav-btn.active,
    .nav-btn:hover {
      background: var(--primary);
      color: white;
      border-color: var(--primary);
    }

    main {
      padding: 26px 0 40px;
    }

    .hero {
      background: linear-gradient(135deg, var(--primary), var(--primary-strong));
      color: white;
      border-radius: 12px;
      padding: 34px;
      box-shadow: var(--shadow);
      margin-bottom: 24px;
    }

    .hero-grid {
      display: grid;
      grid-template-columns: 1.4fr 1fr;
      gap: 24px;
      align-items: center;
    }

    .hero h2 {
      margin: 0 0 12px;
      font-size: clamp(1.7rem, 2.6vw, 2.5rem);
    }

    .hero p {
      margin: 0;
      line-height: 1.6;
      max-width: 680px;
    }

    .badge {
      display: inline-flex;
      padding: 7px 10px;
      border-radius: 8px;
      background: rgba(255,255,255,0.18);
      color: white;
      font-size: 0.82rem;
      font-weight: 700;
      margin-bottom: 12px;
    }

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

    .quick-link {
      display: block;
      text-decoration: none;
      color: white;
      background: rgba(255, 255, 255, 0.12);
      border: 1px solid rgba(255, 255, 255, 0.2);
      padding: 18px;
      border-radius: 8px;
    }

    .quick-link strong {
      display: block;
      margin-bottom: 6px;
    }

    .panel { display: none; }
    .panel.active { display: block; }

    .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
      padding: 22px;
      margin-bottom: 18px;
    }

    .card h3 {
      margin: 0 0 8px;
      color: var(--primary-strong);
    }

    .card p.lead {
      margin: 0;
      color: var(--muted);
      line-height: 1.55;
    }

    .toolbar {
      display: grid;
      grid-template-columns: 1.5fr 1fr 1fr;
      gap: 14px;
      margin-top: 20px;
    }

    .field,
    .textarea,
    .select,
    .file-input {
      width: 100%;
      border: 1px solid var(--border);
      background: var(--surface-soft);
      border-radius: 8px;
      padding: 13px 14px;
      color: var(--text);
      font-size: 0.95rem;
    }

    .textarea {
      min-height: 140px;
      resize: vertical;
    }

    .compact-textarea {
      min-height: 96px;
    }

    .field-block {
      margin-top: 14px;
    }

    .field-label {
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 0.84rem;
      font-weight: 700;
    }

    .actions {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      margin-top: 18px;
    }

    .form-actions-top {
      margin-top: 20px;
      margin-bottom: 0;
    }

    .form-spaced {
      margin-top: 18px;
    }

    .form-grid-2 {
      grid-template-columns: 1fr 1fr;
    }

    .form-grid-spaced {
      margin-top: 16px;
    }

    .form-grid-tight {
      margin-top: 14px;
    }

    .form-grid-reset {
      margin-top: 0;
    }

    .check-row {
      display: flex;
      align-items: center;
      gap: 10px;
      font-weight: 600;
      color: var(--primary-strong);
    }

    .btn {
      border: 0;
      border-radius: 8px;
      padding: 12px 16px;
      font-weight: 700;
      cursor: pointer;
      min-height: 44px;
    }

    .button-link {
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

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

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

    .btn.ghost {
      background: transparent;
      color: var(--primary-strong);
      border: 1px solid var(--border);
    }

    .status {
      margin-top: 14px;
      padding: 12px 14px;
      border-radius: 8px;
      display: none;
      font-size: 0.94rem;
    }

    .status.show { display: block; }
    .status.success { background: rgba(21, 128, 61, 0.1); color: var(--success); }
    .status.error { background: rgba(185, 28, 28, 0.08); color: var(--danger); }

    .table-wrap {
      overflow: auto;
      border: 1px solid var(--border);
      border-radius: 8px;
      margin-top: 18px;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      min-width: 760px;
      background: white;
    }

    thead th {
      text-align: left;
      background: var(--accent);
      color: var(--text);
      font-size: 0.9rem;
      padding: 14px;
      border-bottom: 1px solid var(--border);
    }

    .sort-btn {
      border: 0;
      background: transparent;
      color: inherit;
      cursor: pointer;
      font: inherit;
      font-weight: 800;
      min-height: 0;
      padding: 0;
      text-align: left;
      width: 100%;
    }

    .sort-btn::after {
      content: "";
      display: inline-block;
      margin-left: 6px;
    }

    .sort-btn[data-sort-direction="asc"]::after {
      content: "▲";
    }

    .sort-btn[data-sort-direction="desc"]::after {
      content: "▼";
    }

    tbody td {
      padding: 14px;
      border-bottom: 1px solid #f8e8dd;
    }

    .empty {
      padding: 24px;
      text-align: center;
      color: var(--muted);
    }

    .grid-2 {
      display: grid;
      grid-template-columns: 1.1fr 0.9fr;
      gap: 18px;
    }

    .channel-layout {
      display: grid;
      grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
      gap: 20px;
      align-items: start;
    }

    .channel-card,
    .channel-aside {
      margin-bottom: 0;
    }

    .channel-header {
      border-bottom: 1px solid var(--border);
      padding-bottom: 18px;
      margin-bottom: 18px;
    }

    .channel-kicker {
      display: inline-flex;
      align-items: center;
      border: 1px solid rgba(249, 115, 22, 0.24);
      border-radius: 999px;
      background: rgba(249, 115, 22, 0.08);
      color: var(--primary-strong);
      font-size: 0.78rem;
      font-weight: 800;
      padding: 6px 10px;
      margin-bottom: 10px;
      text-transform: uppercase;
    }

    .channel-header h3 {
      font-size: 1.45rem;
    }

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

    .notice-item {
      background: var(--surface-soft);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 13px;
    }

    .notice-item strong {
      display: block;
      color: var(--primary-strong);
      margin-bottom: 5px;
      font-size: 0.9rem;
    }

    .notice-item span {
      color: var(--muted);
      display: block;
      font-size: 0.86rem;
      line-height: 1.45;
    }

    .channel-aside {
      position: sticky;
      top: 104px;
    }

    .channel-aside .compliance-box p {
      margin: 0;
      color: var(--muted);
      line-height: 1.62;
    }

    .policy-link {
      display: inline-flex;
      margin-top: 14px;
      color: var(--primary-strong);
      font-weight: 800;
      text-decoration: none;
    }

    .file-box {
      display: grid;
      gap: 7px;
      border: 1px dashed var(--border);
      border-radius: 8px;
      background: var(--surface-soft);
      padding: 14px;
      color: var(--primary-strong);
      font-weight: 800;
    }

    .file-box small {
      color: var(--muted);
      font-weight: 400;
      line-height: 1.4;
    }

    .grid-3 {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 18px;
      margin-top: 18px;
    }

    .feature-card {
      background: var(--surface-soft);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 18px;
    }

    .feature-card h4 {
      margin: 0 0 10px;
      color: var(--primary-strong);
      font-size: 1rem;
    }

    .feature-card p {
      margin: 0;
      color: var(--muted);
      line-height: 1.55;
    }

    .compliance-box {
      background: var(--surface-soft);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 18px;
    }

    .footer-note {
      color: var(--muted);
      font-size: 0.9rem;
      text-align: center;
      padding: 10px 0 0;
    }

    .footer-link {
      color: var(--primary-strong);
      font-weight: 700;
      text-decoration: none;
    }

    .admin-tools {
      margin-top: 16px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface-soft);
      overflow: hidden;
    }

    .admin-toggle {
      width: 100%;
      background: transparent;
      color: var(--primary-strong);
      border: 0;
      padding: 12px 14px;
      text-align: left;
      font-weight: 700;
      cursor: pointer;
    }

    .admin-content {
      display: none;
      padding: 0 14px 14px;
      border-top: 1px solid var(--border);
    }

    .admin-content.open {
      display: block;
    }

    .small-note {
      font-size: 0.88rem;
      color: var(--muted);
      margin-top: 10px;
      display: block;
    }

    .subtle-box {
      margin-top: 20px;
      background: var(--surface-soft);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 18px;
    }

    .subtle-box h4 {
      margin: 0 0 8px;
      color: var(--primary-strong);
      font-size: 1rem;
    }

    .subtle-box p {
      margin: 0;
      color: var(--muted);
      line-height: 1.55;
      font-size: 0.95rem;
    }

    .news-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 18px;
      margin-top: 18px;
    }

    .news-featured,
    .news-list {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
    }

    .news-link {
      color: inherit;
      display: block;
      text-decoration: none;
    }

    .news-link:hover h4 {
      color: var(--primary-strong);
    }

    .news-image {
      width: 100%;
      aspect-ratio: 16 / 9;
      object-fit: cover;
      background: var(--surface-soft);
      display: block;
    }

    .news-body {
      padding: 18px;
    }

    .compact-body {
      padding: 0;
    }

    .news-meta {
      color: var(--primary-strong);
      font-weight: 700;
      font-size: 0.82rem;
      margin-bottom: 8px;
    }

    .news-body h4 {
      margin: 0 0 8px;
      color: var(--text);
      font-size: 1.12rem;
    }

    .news-body p {
      margin: 0;
      color: var(--muted);
      line-height: 1.5;
    }

    .news-item {
      padding: 16px;
      border-bottom: 1px solid var(--border);
    }

    .news-item--has-thumb {
      display: flex;
      gap: 12px;
      align-items: flex-start;
    }

    .news-thumb {
      width: 90px;
      height: 64px;
      object-fit: cover;
      border-radius: calc(var(--radius) - 2px);
      flex-shrink: 0;
      background: var(--surface-soft);
      display: block;
    }

    .news-article {
      max-width: 860px;
      margin: 0 auto;
    }

    .news-article h2 {
      margin: 10px 0 12px;
      color: var(--text);
      font-size: 2rem;
      line-height: 1.18;
    }

    .news-article .lead {
      margin-bottom: 18px;
    }

    .news-article-content {
      color: var(--text);
      font-size: 1rem;
      line-height: 1.75;
      white-space: pre-line;
    }

    .news-gallery {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 12px;
      margin-top: 24px;
    }

    .news-gallery img {
      width: 100%;
      aspect-ratio: 4 / 3;
      object-fit: cover;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface-soft);
      display: block;
    }

    .gallery-thumb {
      appearance: none;
      border: 0;
      background: transparent;
      padding: 0;
      cursor: pointer;
      text-align: left;
    }

    .gallery-thumb:focus-visible {
      outline: 3px solid var(--primary);
      outline-offset: 3px;
      border-radius: var(--radius);
    }

    .viewer-open {
      overflow: hidden;
    }

    .image-viewer {
      position: fixed;
      inset: 0;
      z-index: 100;
      display: grid;
      place-items: center;
      padding: 24px;
    }

    .image-viewer[hidden] {
      display: none;
    }

    .image-viewer-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(15, 23, 42, 0.82);
    }

    .image-viewer-dialog {
      position: relative;
      z-index: 1;
      width: min(1040px, 100%);
      min-height: 240px;
      display: grid;
      place-items: center;
    }

    .image-viewer-dialog img {
      max-width: 100%;
      max-height: min(78vh, 760px);
      object-fit: contain;
      border-radius: var(--radius);
      background: #0f172a;
      box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    }

    .viewer-close,
    .viewer-nav {
      position: absolute;
      z-index: 2;
      border: 1px solid rgba(255, 255, 255, 0.28);
      background: rgba(255, 255, 255, 0.94);
      color: #111827;
      border-radius: 8px;
      cursor: pointer;
      font-weight: 700;
    }

    .viewer-close {
      top: -54px;
      right: 0;
      padding: 10px 14px;
    }

    .viewer-nav {
      top: 50%;
      transform: translateY(-50%);
      width: 44px;
      height: 56px;
      font-size: 2rem;
      line-height: 1;
    }

    .viewer-prev {
      left: 8px;
    }

    .viewer-next {
      right: 8px;
    }

    .viewer-counter {
      position: absolute;
      left: 50%;
      bottom: -42px;
      transform: translateX(-50%);
      color: white;
      font-weight: 700;
      background: rgba(15, 23, 42, 0.72);
      border-radius: 8px;
      padding: 8px 12px;
    }

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

    .news-list-footer {
      padding: 14px 16px 2px;
      display: flex;
      justify-content: center;
    }

    .news-see-more {
      width: 100%;
      justify-content: center;
    }

    .newslist-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 18px;
      margin-top: 18px;
    }

    .newslist-card {
      display: flex;
      flex-direction: column;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
      color: inherit;
      text-decoration: none;
      transition: box-shadow 0.18s;
    }

    .newslist-card:hover {
      box-shadow: var(--shadow);
    }

    .newslist-card:hover h4 {
      color: var(--primary-strong);
    }

    .newslist-card-image {
      width: 100%;
      aspect-ratio: 16 / 9;
      object-fit: cover;
      background: var(--surface-soft);
      display: block;
    }

    .newslist-card-placeholder {
      background: var(--surface-soft);
      border-bottom: 1px solid var(--border);
    }

    .newslist-card-body {
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      flex: 1;
    }

    .newslist-card-body h4 {
      margin: 0;
      color: var(--text);
      font-size: 1rem;
      line-height: 1.4;
    }

    .newslist-card-body p {
      margin: 0;
      color: var(--muted);
      font-size: 0.9rem;
      line-height: 1.5;
    }

    .pagination {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      margin-top: 28px;
      padding-top: 20px;
      border-top: 1px solid var(--border);
    }

    .pagination-info {
      color: var(--muted);
      font-size: 0.9rem;
    }

    .muted-text {
      color: var(--muted);
      margin-top: 12px;
    }

    @media (max-width: 980px) {
      .newslist-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 980px) {
      .brand {
        gap: 10px;
      }

      .brand img {
        max-height: 42px;
        max-width: 150px;
      }

      .brand-text h1 {
        font-size: 1rem;
      }

      .nav-btn {
        padding: 9px 10px;
        font-size: 0.88rem;
      }

      .hero-grid,
      .grid-2,
      .channel-layout,
      .toolbar,
      .grid-3 {
        grid-template-columns: 1fr;
      }

      .notice-grid {
        grid-template-columns: 1fr;
      }

      .channel-aside {
        position: static;
      }

      .hero-actions {
        grid-template-columns: 1fr;
      }

      .news-grid {
        grid-template-columns: 1fr;
      }

      .newslist-grid {
        grid-template-columns: 1fr;
      }

      .pagination {
        flex-wrap: wrap;
      }
    }

    @media (min-width: 721px) and (max-width: 860px) {
      .topbar {
        gap: 6px;
      }

      .brand {
        gap: 6px;
      }

      .brand img {
        max-height: 34px;
        max-width: 92px;
      }

      .brand-text h1 {
        font-size: 0.78rem;
      }

      nav {
        gap: 4px;
      }

      .nav-btn {
        border-radius: 6px;
        padding: 7px 6px;
        font-size: 0.74rem;
      }
    }

    @media (max-width: 720px) {
      .container {
        width: min(100% - 24px, 1180px);
      }

      .topbar {
        align-items: center;
        padding: 12px 0;
      }

      .brand {
        flex: 1 1 auto;
        min-width: 0;
      }

      .brand img {
        max-width: min(180px, 65vw);
        height: auto;
        max-height: 48px;
      }

      .brand-text h1 {
        font-size: 1.05rem;
      }

      .menu-toggle {
        display: inline-flex;
        flex: 0 0 auto;
      }

      nav {
        width: 100%;
        display: none;
        overflow: visible;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 8px 0 0;
      }

      nav.open {
        display: flex;
      }

      .nav-btn {
        flex: 0 0 auto;
        width: 100%;
        justify-content: center;
        min-height: 42px;
        white-space: normal;
        text-align: center;
      }

      main {
        padding-top: 18px;
      }

      .hero {
        padding: 22px;
      }

      .card {
        padding: 18px;
      }

      .actions {
        flex-direction: column;
      }

      .btn,
      .button-link {
        width: 100%;
      }

      .table-wrap {
        overflow: visible;
        border: 0;
      }

      table,
      thead,
      tbody,
      tr,
      td {
        display: block;
        width: 100%;
      }

      table {
        min-width: 0;
        background: transparent;
      }

      thead {
        display: none;
      }

      tbody tr {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 8px;
        margin-bottom: 12px;
        overflow: hidden;
      }

      tbody td {
        display: grid;
        grid-template-columns: 96px 1fr;
        gap: 12px;
        padding: 11px 12px;
        border-bottom: 1px solid var(--border);
        overflow-wrap: anywhere;
      }

      tbody td::before {
        content: attr(data-label);
        color: var(--muted);
        font-weight: 700;
      }

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

      tbody td.empty {
        display: block;
      }

      tbody td.empty::before {
        content: none;
      }

      .image-viewer {
        padding: 14px;
      }

      .viewer-close {
        top: 10px;
        right: 10px;
      }

      .viewer-nav {
        width: 40px;
        height: 48px;
      }

      .viewer-counter {
        bottom: 12px;
      }
    }

.protocol-box {
  margin-top: 12px;
  padding: 14px;
  border: 2px dashed var(--success);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
}

.protocol-box code {
  display: block;
  margin: 8px 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  word-break: break-all;
  user-select: all;
}

.protocol-box .protocol-warning {
  margin: 8px 0;
  font-weight: 600;
  color: var(--danger);
}

.protocol-box button {
  margin-right: 8px;
}

.track-card form {
  display: grid;
  gap: 8px;
  max-width: 460px;
}

.track-result {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.track-result dt {
  font-weight: 700;
  color: var(--muted);
  margin-top: 8px;
}

.track-result dd {
  margin: 2px 0 0;
}

.track-reply {
  padding: 12px;
  background: var(--surface-soft);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ==========================================================================
   v1.1.2 - refinamento visual (cores vem do branding: --primary, --accent...)
   ========================================================================== */

html {
  min-height: 100%;
  background: color-mix(in srgb, var(--bg) 55%, #f4f6fa);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(900px 460px at 92% -120px, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%),
    radial-gradient(760px 420px at -8% 6%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 55%, #ffffff) 0%, #f3f5f9 100%);
  background-attachment: fixed;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 12%, #e5e7eb);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

header::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary) 55%, color-mix(in srgb, var(--primary) 60%, #ffffff));
}

.brand { flex-shrink: 0; }

.nav-btn {
  border-radius: 999px;
  border-color: transparent;
  background: transparent;
  padding: 10px clamp(12px, 1.2vw, 18px);
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.nav-btn:hover {
  background: color-mix(in srgb, var(--primary) 10%, #ffffff);
  color: var(--primary-strong);
  border-color: transparent;
}

.nav-btn.active {
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 72%, #000));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 38%, transparent);
}

main { padding: 28px 0 48px; }

/* ----- Hero ----- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 20px;
  padding: clamp(26px, 4vw, 46px);
  background:
    linear-gradient(125deg,
      color-mix(in srgb, var(--primary) 82%, #000) 0%,
      var(--primary) 42%,
      color-mix(in srgb, var(--primary) 52%, var(--accent)) 100%);
  box-shadow: 0 22px 50px color-mix(in srgb, var(--primary) 32%, transparent);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(520px 260px at 88% 8%, rgba(255, 255, 255, 0.28), transparent 70%),
    radial-gradient(420px 320px at 4% 110%, rgba(255, 255, 255, 0.14), transparent 70%),
    radial-gradient(rgba(255, 255, 255, 0.16) 1.2px, transparent 1.6px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(120deg, #000 0%, rgba(0, 0, 0, 0.55) 60%, rgba(0, 0, 0, 0.9) 100%);
  mask-image: linear-gradient(120deg, #000 0%, rgba(0, 0, 0, 0.55) 60%, rgba(0, 0, 0, 0.9) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -90px;
  bottom: -130px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 38px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 46px rgba(255, 255, 255, 0.05);
}

.hero h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
}

.hero p { color: rgba(255, 255, 255, 0.92); font-size: 1.02rem; }

.hero-grid--solo { grid-template-columns: minmax(0, 1fr); }
.hero-grid--solo h2 { max-width: 760px; }

.badge {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  padding: 6px 14px;
  letter-spacing: 0.03em;
  backdrop-filter: blur(6px);
}

.quick-link {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  transition: transform 0.18s ease, background 0.18s ease;
}

.quick-link:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.22);
}

/* ----- Servicos (atalhos da home) ----- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 0 0 22px;
}

.service-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 20px 20px 22px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, #e5e7eb);
  border-radius: 16px;
  background: linear-gradient(160deg, #ffffff 0%, color-mix(in srgb, var(--primary) 5%, #ffffff) 100%);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  color: var(--text);
  text-align: left;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.service-tile::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -34px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%);
  transition: transform 0.25s ease;
}

.service-tile:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 40%, #e5e7eb);
  box-shadow: 0 18px 36px color-mix(in srgb, var(--primary) 18%, transparent);
}

.service-tile:hover::after { transform: scale(1.35); }

.service-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--accent)));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 34%, transparent);
}

.service-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-tile strong { font-size: 1.02rem; color: var(--primary-strong); }
.service-tile span.service-desc { font-size: 0.88rem; line-height: 1.45; color: var(--muted); }

/* ----- Cards ----- */
.card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 10%, #e5e7eb);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  padding: 24px;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 45%, var(--accent)) 60%, transparent);
  opacity: 0.85;
}

.card h3 { font-size: 1.15rem; letter-spacing: -0.005em; }

.grid-2--solo { grid-template-columns: minmax(0, 1fr); }

/* ----- Botoes e campos ----- */
.btn {
  border-radius: 12px;
  padding: 11px 20px;
  min-height: 44px;
  font-size: 0.94rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn.primary {
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #000));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 32%, transparent);
}

.btn.secondary {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 88%, #000), color-mix(in srgb, var(--accent) 62%, #000));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 30%, transparent);
}

.btn.ghost {
  background: #ffffff;
  border-color: color-mix(in srgb, var(--primary) 25%, #e5e7eb);
}

.btn.ghost:hover { background: color-mix(in srgb, var(--primary) 7%, #ffffff); }

.field,
.textarea,
.select,
.file-input {
  border-radius: 12px;
  border: 1px solid #d6dce6;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}

.status { border-radius: 12px; }

.footer-note { margin-top: 28px; }

.toolbar { align-items: end; }

/* ----- Protocolo exibido apos o envio ----- */
.protocol-box {
  border: 1px solid color-mix(in srgb, var(--success) 35%, #ffffff);
  border-radius: 14px;
  background: linear-gradient(160deg, #ffffff, color-mix(in srgb, var(--success) 6%, #ffffff));
  box-shadow: 0 8px 22px rgba(21, 128, 61, 0.1);
}

.protocol-box code {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 1.1rem;
}

.protocol-box button {
  border: 0;
  border-radius: 10px;
  padding: 9px 16px;
  font-weight: 700;
  color: #ffffff;
  background: var(--primary);
  cursor: pointer;
}

.protocol-box a { color: var(--primary-strong); font-weight: 700; }

/* ----- Pagina de acompanhamento ----- */
.track-wrap {
  width: min(680px, 100%);
  margin: 12px auto 0;
}

.track-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 20px 20px 0 0;
  padding: 28px 30px 30px;
  color: #ffffff;
  background:
    linear-gradient(125deg,
      color-mix(in srgb, var(--primary) 82%, #000) 0%,
      var(--primary) 45%,
      color-mix(in srgb, var(--primary) 52%, var(--accent)) 100%);
}

.track-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(380px 200px at 92% 0%, rgba(255, 255, 255, 0.26), transparent 70%),
    radial-gradient(rgba(255, 255, 255, 0.15) 1.2px, transparent 1.6px) 0 0 / 20px 20px;
}

.track-hero .service-icon {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: none;
  margin-bottom: 14px;
}

.track-hero h2 { margin: 0 0 6px; font-size: 1.4rem; letter-spacing: -0.01em; }
.track-hero p { margin: 0; font-size: 0.95rem; line-height: 1.5; color: rgba(255, 255, 255, 0.92); }

.track-body {
  padding: 26px 30px 30px;
  background: #ffffff;
  border: 1px solid color-mix(in srgb, var(--primary) 10%, #e5e7eb);
  border-top: 0;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.track-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.track-row {
  display: flex;
  gap: 10px;
}

.track-input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 16px;
  border: 1px solid #d6dce6;
  border-radius: 12px;
  background: var(--surface-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.track-input::placeholder {
  color: #9aa4b2;
  letter-spacing: 0.03em;
  font-size: 0.9rem;
  text-transform: none;
}

.track-input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}

.track-submit {
  flex: none;
  height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #000));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 32%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.track-submit:hover { transform: translateY(-1px); }

.track-hint { margin: 10px 0 0; font-size: 0.82rem; color: var(--muted); }

.track-error {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(185, 28, 28, 0.07);
  border: 1px solid rgba(185, 28, 28, 0.18);
  color: var(--danger);
  font-size: 0.92rem;
}

.track-result {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px dashed #d6dce6;
}

.track-result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.track-protocol {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--primary-strong);
  background: color-mix(in srgb, var(--primary) 10%, #ffffff);
}

.track-type { font-size: 0.9rem; color: var(--muted); font-weight: 600; }

.track-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 22px 0 6px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.track-steps li {
  position: relative;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #9aa4b2;
}

.track-steps li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #e8ecf2;
  color: #7b8696;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.track-steps li::after {
  content: "";
  position: absolute;
  top: 15px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 2px;
  background: #e8ecf2;
}

.track-steps li:last-child::after { display: none; }

.track-steps li.done { color: var(--text); }
.track-steps li.done::before {
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--accent)));
  color: #ffffff;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--primary) 32%, transparent);
}
.track-steps li.done::after { background: var(--primary); }

.track-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px 0 0;
}

.track-info div {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid #e8ecf2;
}

.track-info dt { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.track-info dd { margin: 4px 0 0; font-weight: 600; }

.track-reply-box { margin-top: 18px; }
.track-reply-box h4 { margin: 0 0 8px; font-size: 0.95rem; color: var(--primary-strong); }

.track-reply {
  padding: 14px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 5%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, #e5e7eb);
  border-left: 4px solid var(--primary);
  line-height: 1.6;
}

.track-reply-empty { margin: 0; color: var(--muted); font-size: 0.92rem; }

@media (max-width: 720px) {
  .service-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .service-tile { padding: 16px; }
  .track-hero, .track-body { padding-left: 20px; padding-right: 20px; }
  .track-row { flex-direction: column; }
  .track-submit { width: 100%; }
  .track-info { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .service-grid { grid-template-columns: 1fr; }
}
