/* ===================================================
   ATELIER DENTAL INOVE — Visual Redesign 2026
   Identidade: Precisão clínica + sofisticação premium
   Paleta: Branco perolado, navy profundo, safira, dourado
   =================================================== */

:root {
  color-scheme: light;

  /* Cores principais */
  --ink: #E8EFF8;
  --ink-dim: #9AAFC8;
  --navy: #080F1C;
  --navy-mid: #0E1A2E;
  --navy-light: #152238;
  --sapphire: #2A72E5;
  --sapphire-glow: rgba(42, 114, 229, 0.18);
  --gold: #C9A84C;
  --gold-light: #F0D080;
  --gold-dim: rgba(201, 168, 76, 0.18);
  --pearl: rgba(240, 246, 255, 0.06);
  --pearl-hover: rgba(240, 246, 255, 0.1);

  /* Painéis */
  --panel: rgba(14, 26, 46, 0.92);
  --panel-border: rgba(42, 114, 229, 0.2);
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(42, 114, 229, 0.14);
  --muted: #6E89AD;
  --success: #3FB88A;
  --danger-text: #FF9090;
  --danger-border: rgba(255, 105, 105, 0.38);
  --danger-bg: rgba(255, 105, 105, 0.08);
}

* {
  box-sizing: border-box;
}

.is-hidden {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 70% -10%, rgba(42, 114, 229, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 10% 90%, rgba(201, 168, 76, 0.06), transparent),
    linear-gradient(160deg, #050B17, #0A1525 50%, #080F1E);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

/* ─── AUTH LOCK ─── */
.auth-locked .sidebar,
.auth-locked main {
  display: none;
}

.admin-only {
  display: none !important;
}

.admin-mode .client-only {
  display: none !important;
}

.admin-mode .admin-only {
  display: grid !important;
}

.admin-mode .price-panel,
.admin-mode .submit-panel,
.admin-mode .hero,
.admin-mode .hero-metrics article:nth-child(1),
.admin-mode .hero-metrics article:nth-child(2) {
  display: none;
}

.admin-mode .workspace {
  display: none;
}

/* ─── LOGIN SCREEN ─── */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(ellipse 80% 50% at 70% -10%, rgba(42, 114, 229, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 10% 90%, rgba(201, 168, 76, 0.06), transparent),
    linear-gradient(160deg, #050B17, #0A1525 50%, #080F1E);
}

.login-screen[hidden] {
  display: none;
}

.login-box {
  width: min(440px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 28px;
  background: rgba(8, 15, 28, 0.9);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(42, 114, 229, 0.08) inset;
}

.login-box h1 {
  margin-bottom: 6px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.login-box p {
  color: var(--ink-dim);
  font-size: 14px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 4px;
}

.auth-tabs button {
  border: none;
  color: var(--ink-dim);
  background: transparent;
  box-shadow: none;
  border-radius: 6px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 600;
  transition: all 160ms ease;
}

.auth-tabs button.is-active {
  color: #fff;
  background: var(--sapphire);
  box-shadow: 0 2px 8px rgba(42, 114, 229, 0.4);
}

.admin-access-link {
  justify-self: center;
  padding: 4px 0;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-access-link.is-active {
  color: var(--gold-light);
}

/* ─── SIDEBAR ─── */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 270px;
  padding: 22px 16px;
  color: #fff;
  background:
    /* micro-dot pattern evocando grade radiográfica */
    radial-gradient(circle, rgba(42, 114, 229, 0.08) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(180deg, rgba(5, 10, 22, 0.99), rgba(10, 20, 40, 0.99));
  border-right: 1px solid rgba(42, 114, 229, 0.15);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(42, 114, 229, 0.14);
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(42, 114, 229, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 20px rgba(42, 114, 229, 0.14);
}

.login-box .brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  margin: 0 auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.brand strong,
.brand small,
.contact-box strong,
.contact-box small,
.price-card small,
.message,
.file-zone small {
  display: block;
}

.brand strong {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.brand small,
.contact-box small,
.message,
.file-zone small,
.muted {
  color: var(--muted);
}

.brand small {
  font-size: 11px;
  margin-top: 2px;
}

nav {
  display: grid;
  gap: 4px;
}

nav a,
.nav-button {
  color: var(--ink-dim);
  text-decoration: none;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  text-align: left;
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all 150ms ease;
  display: block;
}

nav a:hover,
.nav-button:hover {
  border-color: rgba(42, 114, 229, 0.22);
  background: rgba(42, 114, 229, 0.08);
  color: #fff;
}

.logout-button {
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink-dim);
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 150ms ease;
}

.logout-button:hover {
  border-color: rgba(255, 105, 105, 0.3);
  color: var(--danger-text);
  background: var(--danger-bg);
}

.contact-box {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(42, 114, 229, 0.12);
  display: grid;
  gap: 4px;
}

.contact-box small {
  font-size: 11px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-box strong {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}

/* ─── MAIN ─── */
main {
  margin-left: 270px;
  padding: 24px;
}

/* ─── HERO ─── */
.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 44px 48px;
  background:
    radial-gradient(ellipse 70% 100% at 80% 50%, rgba(201, 168, 76, 0.1), transparent),
    linear-gradient(105deg, rgba(8, 15, 28, 0.98), rgba(14, 26, 46, 0.9) 55%, rgba(14, 26, 46, 0.6));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

/* linha dourada decorativa no topo do hero */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), rgba(201, 168, 76, 0.3), transparent);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-tooth {
  position: absolute;
  right: 24px;
  bottom: -38px;
  width: min(40vw, 460px);
  opacity: 0.28;
  filter: drop-shadow(0 0 40px rgba(42, 114, 229, 0.2));
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 12px;
  font-size: 42px;
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin-bottom: 4px;
}

h3 {
  font-size: 16px;
  font-weight: 700;
}

.hero p {
  max-width: 680px;
  color: var(--ink-dim);
  font-size: 17px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.hero-metrics article {
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 8px;
  background: rgba(201, 168, 76, 0.06);
  padding: 14px;
}

.hero-metrics small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.hero-metrics strong {
  display: block;
  color: var(--gold-light);
  font-size: 18px;
  font-weight: 700;
}

/* ─── WORKSPACE ─── */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px) minmax(280px, 340px);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

/* ─── PANEL ─── */
.panel {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  display: grid;
  gap: 16px;
  padding: 20px;
  background: var(--panel);
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-title h2 {
  margin: 0;
}

/* ─── PRICE PANEL ─── */
.price-panel {
  position: sticky;
  top: 16px;
  order: 3;
  width: 100%;
  max-height: calc(100vh - 32px);
  overflow: auto;
  max-width: none;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  box-shadow: none;
}

.price-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.close-panel-button {
  display: none;
}

.search-box {
  width: min(300px, 100%);
}

/* ─── PROFILE PANEL ─── */
.profile-panel {
  position: sticky;
  top: 16px;
  order: 2;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.profile-panel h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.profile-grid {
  display: grid;
  gap: 8px;
}

.profile-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px;
  background: var(--card-bg);
  transition: border-color 150ms ease, background 150ms ease;
}

.profile-card:hover {
  border-color: rgba(42, 114, 229, 0.28);
  background: var(--pearl-hover);
}

.profile-photo {
  position: relative;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 8px;
}

.profile-photo > img:first-child,
.profile-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(42, 114, 229, 0.2);
  background: rgba(2, 8, 18, 0.34);
}

.profile-placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--sapphire), #1a4fa0);
  font-weight: 800;
  font-size: 22px;
}

.profile-card strong,
.profile-card small {
  display: block;
}

.profile-card strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.profile-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  margin-top: 2px;
}

.profile-card a,
.profile-waiting {
  grid-column: 1 / -1;
  display: block;
  border-radius: 7px;
  padding: 7px 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  transition: all 150ms ease;
}

.profile-card a {
  color: #fff;
  background: linear-gradient(135deg, #25A244, #1B7A33);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 162, 68, 0.2);
}

.profile-card a:hover {
  box-shadow: 0 4px 18px rgba(37, 162, 68, 0.35);
  transform: translateY(-1px);
}

.profile-waiting {
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
}

/* ─── PRICE CARD ─── */
.price-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: rgba(6, 14, 28, 0.5);
}

.price-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.price-card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.price-card small {
  color: var(--muted);
  font-size: 12px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
  color: var(--ink-dim);
  font-size: 14px;
}

.price-row strong {
  color: var(--gold-light);
  white-space: nowrap;
  font-weight: 700;
}

/* ─── SUBMIT PANEL ─── */
.submit-panel {
  order: 1;
  max-width: 1180px;
  width: 100%;
}

.submit-panel > .section-title {
  align-items: center;
}

/* ─── SECONDARY / CLOSE BUTTONS ─── */
.secondary-action,
.close-panel-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  transition: all 150ms ease;
}

.secondary-action:hover {
  border-color: rgba(42, 114, 229, 0.3);
  color: var(--ink);
  background: rgba(42, 114, 229, 0.1);
}

.secondary-action {
  white-space: nowrap;
}

/* ─── FORM ELEMENTS ─── */
.case-form,
.form-grid,
.work-picker,
.work-picker-grid,
.selected-work-list,
.file-preview,
.submission-list,
.payment-box {
  display: grid;
  gap: 12px;
}

.payment-box {
  order: 20;
}

.case-form > button[type="submit"] {
  order: 21;
}

.share-actions {
  order: 22;
}

#formMessage {
  order: 23;
}

.work-picker {
  border: 1px solid rgba(42, 114, 229, 0.18);
  border-radius: 10px;
  padding: 14px;
  background: rgba(8, 15, 28, 0.4);
}

.work-picker-grid {
  grid-template-columns: minmax(0, 1.2fr) 110px auto;
  align-items: end;
}

.selected-work-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px;
  background: var(--card-bg);
}

.selected-work-row strong,
.selected-work-row small {
  display: block;
}

.selected-work-row strong {
  color: var(--ink);
  font-size: 13px;
}

.selected-work-row small {
  color: var(--muted);
  font-size: 12px;
}

.selected-work-row > strong {
  color: var(--gold-light);
  white-space: nowrap;
  font-weight: 700;
}

.selected-work-row label {
  gap: 4px;
}

.selected-work-row input {
  padding: 8px;
}

/* ─── PAYMENT BOX ─── */
.payment-box {
  border: 1px solid rgba(42, 114, 229, 0.18);
  border-radius: 10px;
  padding: 14px;
  background: rgba(8, 15, 28, 0.34);
}

.payment-box.is-muted {
  border-color: var(--card-border);
}

.payment-summary,
.payment-choice,
.pix-card,
.pix-copy {
  display: grid;
  gap: 10px;
}

.payment-summary {
  grid-template-columns: minmax(0, 1.4fr) minmax(120px, 0.6fr);
  align-items: stretch;
}

.payment-summary > div,
.payment-choice label {
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card-bg);
}

.payment-summary > div {
  padding: 10px;
}

.payment-summary small,
.payment-summary strong {
  display: block;
}

.payment-summary small {
  color: var(--muted);
  font-size: 12px;
}

.payment-summary strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  margin-top: 2px;
}

.payment-choice,
.pix-card {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.payment-choice label {
  min-height: 48px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding: 10px;
  font-weight: 700;
  font-size: 14px;
}

.payment-choice input {
  width: auto;
}

.pix-card {
  border: 1px solid rgba(201, 168, 76, 0.24);
  border-radius: 8px;
  padding: 10px;
  background: rgba(201, 168, 76, 0.05);
}

.qr-frame {
  position: relative;
  display: grid;
  min-height: 150px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(42, 114, 229, 0.24);
  border-radius: 8px;
  background: rgba(8, 15, 28, 0.4);
}

.qr-frame img {
  width: 100%;
  max-width: 190px;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 6px;
  background: #fff;
  border-radius: 6px;
}

.pix-copy textarea {
  min-height: 126px;
  resize: vertical;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* ─── FORM GRID ─── */
.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink-dim);
  font-weight: 600;
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(8, 15, 28, 0.6);
  font: inherit;
  font-size: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(42, 114, 229, 0.5);
  box-shadow: 0 0 0 3px rgba(42, 114, 229, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

select option {
  background: #ffffff;
  color: #172033;
}

/* ─── BUTTONS ─── */
button {
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  color: #fff;
  background: var(--sapphire);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(42, 114, 229, 0.3);
  transition: all 150ms ease;
  font-family: inherit;
}

button:hover {
  background: #3480F0;
  box-shadow: 0 6px 20px rgba(42, 114, 229, 0.4);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(42, 114, 229, 0.25);
}

.remove-file {
  justify-self: start;
  border: 1px solid rgba(201, 168, 76, 0.28);
  padding: 6px 10px;
  color: var(--gold-light);
  background: var(--gold-dim);
  box-shadow: none;
  font-size: 12px;
}

.remove-file:hover {
  background: rgba(201, 168, 76, 0.2);
  transform: none;
}

.remove-work {
  padding: 8px 10px;
  color: var(--gold-light);
  background: var(--gold-dim);
  border: 1px solid rgba(201, 168, 76, 0.28);
  box-shadow: none;
  font-size: 13px;
}

.remove-work:hover {
  background: rgba(201, 168, 76, 0.2);
  transform: none;
}

/* ─── SHARE ACTIONS ─── */
.share-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.share-actions button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.share-actions button:hover {
  border-color: rgba(42, 114, 229, 0.3);
  color: var(--ink);
  background: rgba(42, 114, 229, 0.1);
  transform: none;
}

/* ─── FILE ZONE ─── */
.file-zone {
  border: 1px dashed rgba(42, 114, 229, 0.24);
  border-radius: 10px;
  padding: 14px;
  background: rgba(8, 15, 28, 0.3);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  cursor: pointer;
}

.file-zone:hover {
  border-color: rgba(42, 114, 229, 0.4);
  background: rgba(42, 114, 229, 0.04);
}

.file-zone.is-dragging {
  border-color: var(--sapphire);
  background: rgba(42, 114, 229, 0.1);
  box-shadow: 0 0 0 4px rgba(42, 114, 229, 0.08);
  transform: translateY(-1px);
}

.file-zone small {
  font-size: 12px;
  margin-top: 4px;
}

/* ─── FILE PREVIEW / SUBMISSIONS ─── */
.file-preview article,
.submission-list article {
  display: grid;
  gap: 4px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--card-bg);
}

.file-preview strong,
.submission-list strong {
  color: var(--ink);
  font-size: 14px;
}

/* ─── SUBMISSION BOX ─── */
.submission-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: rgba(8, 15, 28, 0.3);
}

.submission-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 300px);
  gap: 10px;
  align-items: end;
}

.submission-title-row h3 {
  margin: 0;
}

.submission-search {
  position: relative;
}

.submission-search input {
  padding-left: 34px;
}

.submission-search::after {
  content: "⌕";
  position: absolute;
  left: 11px;
  bottom: 10px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  pointer-events: none;
}

/* ─── ADMIN PANEL ─── */
.admin-panel {
  margin-top: 16px;
}

.admin-view[hidden] {
  display: none !important;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-tab {
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
}

.admin-tab:hover {
  border-color: rgba(42, 114, 229, 0.3);
  color: var(--ink);
  background: rgba(42, 114, 229, 0.08);
  transform: none;
}

.admin-tab.is-active {
  color: #fff;
  background: var(--sapphire);
  border-color: var(--sapphire);
  box-shadow: 0 2px 8px rgba(42, 114, 229, 0.3);
}

.admin-create-user {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(42, 114, 229, 0.16);
  border-radius: 10px;
  padding: 16px;
  background: rgba(8, 15, 28, 0.3);
}

.admin-section {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(42, 114, 229, 0.14);
  border-radius: 10px;
  padding: 16px;
  background: rgba(8, 15, 28, 0.22);
}

.admin-section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
  gap: 12px;
  align-items: end;
}

.admin-section-title h3 {
  margin: 0;
}

.admin-search {
  position: relative;
}

.admin-search input {
  padding-left: 34px;
}

.admin-search::after {
  content: "⌕";
  position: absolute;
  left: 11px;
  bottom: 10px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  pointer-events: none;
}

.admin-submission-list,
.admin-user-list {
  display: grid;
  gap: 10px;
}

.admin-price-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-price-group {
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 12px;
  background: var(--card-bg);
}

.admin-price-group h4 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ink-dim);
  font-weight: 600;
}

.admin-price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.admin-price-row span,
.admin-price-row small {
  display: block;
}

.admin-price-row small {
  color: var(--muted);
  font-size: 11px;
}

.order-total-line {
  display: block;
  justify-self: end;
  color: var(--gold-light);
  font-weight: 700;
}

.admin-case-card,
.admin-user-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 14px;
  background: var(--card-bg);
  transition: border-color 150ms ease;
}

.admin-case-card:hover,
.admin-user-card:hover {
  border-color: rgba(42, 114, 229, 0.28);
}

.admin-card-actions,
.admin-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-detail-actions {
  align-items: end;
}

.danger-action {
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
  background: var(--danger-bg);
  box-shadow: none;
}

.danger-action:hover {
  background: rgba(255, 105, 105, 0.15);
  transform: none;
  box-shadow: none;
}

.admin-case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-case-grid div {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px;
  background: rgba(8, 15, 28, 0.4);
}

.admin-case-grid small,
.admin-case-grid strong {
  display: block;
}

.admin-case-grid small {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}

.admin-case-grid strong {
  font-size: 14px;
  color: var(--ink);
}

/* ─── DOWNLOAD / FILES ─── */
.submission-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.download-file {
  border: 1px solid rgba(42, 114, 229, 0.22);
  padding: 6px 10px;
  color: var(--ink-dim);
  background: rgba(42, 114, 229, 0.08);
  box-shadow: none;
  font-size: 12px;
  font-weight: 600;
}

.download-file:hover {
  border-color: var(--sapphire);
  color: var(--ink);
  background: rgba(42, 114, 229, 0.14);
  transform: none;
  box-shadow: none;
}

/* ─── FINANCEIRO ─── */
.finance-filters,
.finance-totals,
.finance-edit-grid {
  display: grid;
  gap: 10px;
}

.finance-filters {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  align-items: end;
}

.finance-totals {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-total-card {
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: 10px;
  padding: 14px;
  background: rgba(201, 168, 76, 0.06);
}

.finance-total-card small,
.finance-total-card strong {
  display: block;
}

.finance-total-card small {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.finance-total-card strong {
  color: var(--gold-light);
  font-size: 20px;
  font-weight: 700;
}

.finance-edit-grid {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  border: 1px solid rgba(42, 114, 229, 0.14);
  border-radius: 10px;
  padding: 12px;
  background: rgba(8, 15, 28, 0.3);
}

.finance-edit-grid .form-wide {
  grid-column: span 2;
}

.finance-edit-grid button {
  align-self: end;
}

/* ─── PRODUÇÃO/SÓCIOS ─── */
.production-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 0.7fr)) minmax(180px, 1.3fr);
  gap: 10px;
  align-items: end;
}

.production-report,
.production-management,
.management-list,
.production-stage-list,
.order-production-stages {
  display: grid;
  gap: 10px;
}

.production-management {
  grid-template-columns: minmax(260px, 0.8fr) minmax(400px, 1.2fr);
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 16px;
}

.production-band {
  display: grid;
  align-content: start;
  gap: 12px;
}

.management-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
}

.management-actions {
  display: flex;
  gap: 8px;
}

.management-actions button {
  padding: 7px 10px;
  font-size: 12px;
}

.production-summary-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 130px 130px auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
}

.production-summary-row strong,
.production-summary-row small {
  display: block;
}

.production-summary-row small {
  color: var(--muted);
  font-size: 11px;
}

.production-summary-total {
  font-weight: 700;
  color: var(--gold-light);
  white-space: nowrap;
}

.production-stage-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(150px, 1fr) 120px auto;
  gap: 10px;
  align-items: end;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}

.production-stage-title strong,
.production-stage-title small,
.order-production-row span strong,
.order-production-row span small {
  display: block;
}

.production-stage-title small,
.order-production-row small,
.order-no-production {
  color: var(--muted);
  font-size: 12px;
}

.production-stage-actions,
.production-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.production-stage-actions button,
.production-editor-actions button {
  padding: 9px 10px;
  font-size: 13px;
}

.production-stage-status {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
}

.production-stage-status.is-complete {
  color: var(--success);
}

.production-editor-actions select {
  flex: 1 1 260px;
}

.order-production-stages {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
}

.order-production-stages > strong {
  color: var(--gold-light);
}

.order-inline-allocation {
  margin-top: 4px;
}

.partner-value-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 10px;
}

.partner-value-option {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(130px, 1fr);
  gap: 10px;
  align-items: end;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px;
  background: var(--card-bg);
}

.partner-value-option > label:first-child {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.partner-value-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--sapphire);
}

.order-production-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 0.8fr);
  gap: 10px;
  align-items: end;
}

.production-table-wrap {
  overflow-x: auto;
}

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

.production-table th,
.production-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 9px 8px;
  text-align: left;
  white-space: nowrap;
}

.production-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── ACCEPTANCE / ALLOCATION ─── */
.acceptance-editor,
.allocation-summary,
.allocation-builder {
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 8px;
  background: rgba(201, 168, 76, 0.04);
}

.acceptance-editor summary {
  cursor: pointer;
  padding: 12px;
  color: var(--gold-light);
  font-weight: 700;
  font-size: 14px;
}

.acceptance-content,
.acceptance-item-list,
.acceptance-allocation-list,
.allocation-list {
  display: grid;
  gap: 10px;
}

.acceptance-content {
  padding: 0 12px 12px;
}

.acceptance-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}

.acceptance-heading button {
  padding: 8px 10px;
}

.acceptance-item-row,
.acceptance-allocation-row {
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) 110px 150px auto;
  gap: 10px;
  align-items: end;
}

.acceptance-allocation-row {
  grid-template-columns: minmax(160px, 0.8fr) minmax(190px, 1.2fr) 150px auto;
}

.acceptance-item-row button,
.acceptance-allocation-row button {
  padding: 10px;
}

.acceptance-meta,
.acceptance-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 10px;
}

.acceptance-totals {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.acceptance-totals span {
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
}

.acceptance-totals strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.acceptance-totals .is-warning strong,
.warning-message {
  color: #FF9090;
}

.allocation-builder {
  margin: 0;
  padding: 12px;
}

.allocation-builder legend {
  color: var(--gold-light);
  padding: 0 6px;
  font-weight: 700;
  font-size: 13px;
}

.allocation-builder-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(190px, 1.2fr) 150px auto;
  gap: 10px;
  align-items: end;
}

.allocation-row,
.allocation-summary-row,
.allocation-summary-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 9px;
}

.allocation-row span strong,
.allocation-row span small,
.allocation-summary-row span strong,
.allocation-summary-row span small {
  display: block;
}

.allocation-row small,
.allocation-summary-row small {
  color: var(--muted);
  font-size: 12px;
}

.allocation-total {
  justify-self: end;
  color: var(--gold-light);
  font-weight: 700;
}

.allocation-summary {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.allocation-summary-total {
  color: var(--gold-light);
  font-weight: 700;
}

/* ─── PERÍODOS FECHADOS ─── */
.closed-periods {
  display: grid;
  gap: 8px;
}

.closed-period-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.8fr) auto auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
}

.closed-period-row small {
  color: var(--muted);
  font-size: 12px;
}

/* ─── PICKUP BUTTON ─── */
.pickup-request-button {
  justify-self: stretch;
  border: 1px solid rgba(201, 168, 76, 0.6);
  padding: 13px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--gold), #A07830);
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.2);
  font-size: 14px;
  text-align: center;
  font-weight: 700;
}

.pickup-request-button:hover {
  box-shadow: 0 10px 28px rgba(201, 168, 76, 0.3);
  background: linear-gradient(135deg, #D4B056, #B08840);
}

/* ─── FORM COMPACT ─── */
.compact-form {
  gap: 10px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .price-list {
    grid-template-columns: 1fr;
  }

  .price-panel,
  .profile-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: auto;
  }

  main {
    margin-left: 0;
    padding: 16px;
  }

  .hero {
    padding: 28px 22px;
  }

  h1 {
    font-size: 30px;
  }

  .form-grid,
  .share-actions,
  .admin-case-grid,
  .admin-price-editor,
  .finance-filters,
  .finance-totals,
  .finance-edit-grid,
  .production-filters,
  .production-management,
  .compact-form,
  .production-stage-row,
  .order-production-row,
  .management-row,
  .production-summary-row,
  .acceptance-item-row,
  .acceptance-allocation-row,
  .acceptance-meta,
  .acceptance-totals,
  .allocation-builder-grid,
  .partner-value-grid,
  .partner-value-option,
  .allocation-row,
  .allocation-summary-row,
  .allocation-summary-total,
  .closed-period-row,
  .work-picker-grid,
  .selected-work-row,
  .hero-metrics,
  .payment-summary,
  .payment-choice,
  .pix-card {
    grid-template-columns: 1fr;
  }

  .section-title {
    flex-direction: column;
  }

  .submission-title-row {
    grid-template-columns: 1fr;
  }

  .admin-section-title {
    grid-template-columns: 1fr;
  }

  .finance-edit-grid .form-wide {
    grid-column: auto;
  }

  .production-stage-status,
  .order-production-stages {
    grid-column: auto;
  }

  .management-actions,
  .production-stage-actions,
  .production-editor-actions {
    align-items: stretch;
  }

  .acceptance-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .secondary-action {
    width: 100%;
  }
}

/* ─── CLASSES ADICIONAIS ─── */
.partner-eligibility {
  margin: 0;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px;
}

.partner-eligibility legend {
  color: var(--muted);
  padding: 0 6px;
  font-size: 13px;
}

#catalogEligiblePartners {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.management-row.is-inactive {
  opacity: 0.5;
}

.production-editor {
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 8px;
  background: rgba(201, 168, 76, 0.04);
}

.production-editor summary {
  cursor: pointer;
  padding: 11px 12px;
  color: var(--gold-light);
  font-weight: 700;
  font-size: 14px;
}

.production-editor summary span {
  float: right;
  color: var(--muted);
}

/* ===================================================
   MELHORIAS — Toasts, Modal, Badges, Timeline, Mobile
   =================================================== */

/* ─── TOASTS ─── */
.toast-container {
  position: fixed;
  z-index: 9999;
  top: 16px;
  right: 16px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 240px;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--navy-mid);
  border: 1px solid var(--panel-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.toast-success {
  border-color: rgba(63, 184, 138, 0.4);
  background: rgba(20, 50, 38, 0.96);
}

.toast-danger {
  border-color: var(--danger-border);
  background: rgba(50, 18, 18, 0.96);
}

.toast-info {
  border-color: rgba(42, 114, 229, 0.4);
}

/* ─── CONFIRMATION MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 7, 14, 0.7);
  backdrop-filter: blur(2px);
  animation: fadeIn 180ms ease;
}

.modal-overlay[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  width: min(480px, 100%);
  max-height: 86vh;
  overflow: auto;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 22px;
  background: rgba(10, 18, 32, 0.98);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
  display: grid;
  gap: 14px;
}

.modal-box h3 {
  margin: 0;
  font-size: 17px;
}

.confirm-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.confirm-list > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.confirm-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.confirm-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ─── STATUS BADGES ─── */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-info {
  color: #7AAFF5;
  background: rgba(42, 114, 229, 0.15);
}

.badge-progress {
  color: var(--gold-light);
  background: rgba(201, 168, 76, 0.16);
}

.badge-warning {
  color: #F0C040;
  background: rgba(240, 192, 64, 0.14);
}

.badge-success {
  color: #3FB88A;
  background: rgba(63, 184, 138, 0.15);
}

.badge-danger {
  color: var(--danger-text);
  background: var(--danger-bg);
}

.submission-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ─── CASE TIMELINE ─── */
.case-timeline {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 2px 0 4px;
}

.timeline-step {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.timeline-step.is-done {
  background: var(--sapphire);
}

.timeline-step.is-active {
  background: var(--gold);
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.5);
}

.case-timeline.is-cancelled {
  margin: 2px 0 4px;
}

/* ─── SUBMISSION ACTIONS ─── */
.submission-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.submission-actions .download-receipt-button {
  grid-column: 1 / -1;
}

/* ─── RATING WIDGET ─── */
.rating-widget {
  display: grid;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
  margin-top: 4px;
}

.rating-stars {
  display: flex;
  gap: 4px;
}

.rating-star {
  background: transparent;
  box-shadow: none;
  color: rgba(240, 208, 128, 0.3);
  font-size: 20px;
  padding: 2px 4px;
  line-height: 1;
  transition: color 120ms ease, transform 120ms ease;
}

.rating-star:hover {
  color: var(--gold-light);
  transform: scale(1.15) translateY(0);
  background: transparent;
  box-shadow: none;
}

.rating-done {
  font-size: 12px;
  color: var(--gold-light);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
  margin-top: 4px;
}

/* ─── REFRESH INDICATOR ─── */
.refresh-indicator {
  color: var(--muted);
  font-size: 11px;
}

/* ─── FILE PREVIEW THUMBS ─── */
.file-preview article {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.file-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background-color: rgba(8, 15, 28, 0.6);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--card-border);
  flex-shrink: 0;
}

.file-thumb-stl {
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-light);
  background: rgba(201, 168, 76, 0.1);
}

.file-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.file-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── LOADING BUTTON ─── */
button.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

button.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── GLOBAL SEARCH (sidebar) ─── */
.sidebar-search {
  margin-bottom: 6px;
}

.sidebar-search input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--ink);
  background: rgba(8, 15, 28, 0.6);
  font-size: 13px;
}

.sidebar-search input::placeholder {
  color: var(--muted);
}

/* ─── ADMIN SORT SELECT ─── */
.admin-sort,
.field-hint {
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
}

.admin-sort select {
  width: 100%;
}

/* ─── MOBILE HAMBURGER MENU ─── */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  z-index: 60;
  top: 14px;
  left: 14px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(8, 15, 28, 0.92);
  border: 1px solid var(--panel-border);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.mobile-menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 200ms ease, opacity 200ms ease;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(3, 7, 14, 0.6);
}

@media (max-width: 760px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .sidebar {
    position: fixed;
    z-index: 50;
    top: 0;
    bottom: 0;
    left: 0;
    width: 270px;
    transform: translateX(-100%);
    transition: transform 220ms ease;
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  body.mobile-menu-open .sidebar-overlay {
    display: block;
  }

  body.mobile-menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  body.mobile-menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.mobile-menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  main {
    padding-top: 64px;
  }

  .auth-locked .mobile-menu-toggle,
  .auth-locked .sidebar-overlay {
    display: none !important;
  }

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

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

  .toast-container {
    left: 12px;
    right: 12px;
  }

  .toast {
    max-width: none;
  }
}

/* ─── iOS ZOOM FIX ─── */
@media (max-width: 760px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* ─── SMOOTH SECTION TRANSITIONS ─── */
.panel,
.price-panel,
.profile-panel,
.submit-panel {
  animation: panelFadeIn 260ms ease both;
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── ADMIN SECTION TITLE: accommodate sort dropdown ─── */
.admin-section-title {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) minmax(140px, 180px);
}

@media (max-width: 760px) {
  .admin-section-title {
    grid-template-columns: 1fr;
  }
}

/* ─── WELCOME AUDIO BUTTON ─── */
.welcome-audio-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(201, 168, 76, 0.35);
  background: rgba(201, 168, 76, 0.08);
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
  transition: all 180ms ease;
}

/* ===================================================
   Clean light refresh - dentist portal
   =================================================== */

:root {
  color-scheme: light;
  --ink: #172033;
  --ink-dim: #667085;
  --navy: #ffffff;
  --navy-mid: #f6f8fb;
  --navy-light: #eef2f7;
  --sapphire: #2268c9;
  --sapphire-glow: rgba(34, 104, 201, 0.12);
  --gold: #b98724;
  --gold-light: #d89b2b;
  --gold-dim: rgba(217, 151, 45, 0.13);
  --pearl: #f7fafc;
  --pearl-hover: #eef5ff;
  --panel: #ffffff;
  --panel-border: #dbe4ef;
  --card-bg: #ffffff;
  --card-border: #e5ebf3;
  --muted: #7b8798;
  --success: #158765;
  --danger-text: #b42318;
  --danger-border: #f1b7b2;
  --danger-bg: #fff4f2;
}

html,
body {
  background: #f6f8fb !important;
}

body {
  color: var(--ink);
  letter-spacing: 0;
}

.login-screen {
  background:
    linear-gradient(135deg, rgba(34, 104, 201, 0.08), rgba(217, 151, 45, 0.08)),
    #f6f8fb;
}

.login-box {
  border: 1px solid #dbe4ef;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(25, 38, 60, 0.14);
}

.login-box h1,
.section-title h2,
.hero h1,
.admin-section h3,
.submission-box h3,
.brand strong {
  color: #172033;
}

.login-box p,
.login-box label,
.section-title,
.message,
.field-hint {
  color: var(--ink-dim);
}

.auth-tabs {
  background: #f2f5f9;
  border-color: #e3e9f2;
}

.auth-tabs button {
  color: #667085;
}

.auth-tabs button.is-active,
button,
.share-actions button,
.secondary-action:hover {
  background: #2268c9;
  color: #ffffff;
}

.admin-access-link {
  color: #667085;
}

.sidebar {
  color: #172033;
  background: #ffffff;
  border-right: 1px solid #dbe4ef;
  box-shadow: 8px 0 28px rgba(25, 38, 60, 0.06);
}

.brand {
  border-bottom-color: #e5ebf3;
}

.brand-mark {
  background: #f8fafc;
  border-color: #dbe4ef;
  box-shadow: none;
}

.sidebar nav a,
.sidebar nav button,
.logout-button,
.nav-button {
  color: #344054;
  background: transparent;
  border: 1px solid transparent;
}

.sidebar nav a:hover,
.sidebar nav button:hover,
.nav-button:hover {
  color: #174ea6;
  background: #eef5ff;
  border-color: #d6e6fb;
}

.sidebar-search input,
input,
select,
textarea {
  color-scheme: light;
  color: #172033;
  background: #ffffff;
  border: 1px solid #d6deea;
  box-shadow: none;
}

select option,
select optgroup {
  color: #172033;
  background: #ffffff;
}

select option:checked {
  color: #ffffff;
  background: #2268c9;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #2268c9;
  box-shadow: 0 0 0 3px rgba(34, 104, 201, 0.12);
  outline: none;
}

input[readonly] {
  color: #344054;
  background: #f8fafc;
  border-color: #dbe4ef;
  cursor: default;
}

.contact-box,
.panel,
.price-card,
.admin-case-card,
.admin-user-card,
.submission-card,
.selected-work-row,
.file-zone,
.modal-box {
  color: #172033;
  background: #ffffff;
  border: 1px solid #dbe4ef;
  box-shadow: 0 18px 45px rgba(25, 38, 60, 0.08);
}

.contact-box small,
.price-card small,
.admin-case-card small,
.admin-user-card small,
.submission-card small,
.selected-work-row small {
  color: #667085;
}

main {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(246, 248, 251, 0.96)),
    #f6f8fb;
}

.hero {
  min-height: auto;
  margin-bottom: 18px;
  color: #172033;
  background:
    linear-gradient(135deg, #ffffff 0%, #eef5ff 58%, #fff7e8 100%);
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(25, 38, 60, 0.08);
}

.hero p,
.hero small {
  color: #667085;
}

.hero-tooth {
  opacity: 0.92;
}

.hero-metrics article {
  background: #ffffff;
  border: 1px solid #e5ebf3;
  box-shadow: none;
}

.workspace {
  gap: 18px;
}

[data-admin-view="pedidos"],
[data-admin-view="financeiro"],
[data-admin-view="socios"] {
  display: none !important;
}

.price-panel,
.submit-panel,
.admin-panel {
  border-radius: 10px;
  opacity: 1 !important;
  animation: none !important;
}

.admin-panel,
.admin-panel .admin-section,
.admin-panel .admin-create-user,
.submission-box {
  background: #ffffff !important;
  color: #172033 !important;
  opacity: 1 !important;
}

.hero-tooth {
  display: none !important;
}

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

.price-list {
  gap: 12px;
}

.price-row {
  border-top-color: #edf1f6;
}

.price-row strong {
  color: #174ea6;
}

.work-picker,
.work-picker-grid {
  background: #f8fafc;
  border-color: #e5ebf3;
}

.work-picker-grid {
  align-items: end;
  grid-template-columns: minmax(220px, 1fr) 140px;
}

.work-picker-grid select,
.work-picker-grid input,
.work-picker-grid button {
  min-width: 0;
  width: 100%;
}

.work-picker-grid button {
  grid-column: 1 / -1;
  justify-self: stretch;
}

.submission-title-row {
  grid-template-columns: 1fr;
}

.submission-search input {
  width: 100%;
}

.selected-work-row {
  grid-template-columns: minmax(0, 1fr) 110px auto;
  box-shadow: none;
}

.selected-work-row > strong {
  display: none;
}

.file-zone {
  background: #f8fafc;
  border-style: dashed;
}

.file-zone:hover {
  background: #eef5ff;
  border-color: #9cc4f5;
}

.admin-tabs {
  background: #f2f5f9;
  border: 1px solid #e3e9f2;
}

.admin-tab {
  color: #475467;
  background: transparent;
}

.admin-tab.is-active {
  color: #ffffff;
  background: #2268c9;
}

.admin-card-actions .secondary-action,
.secondary-action {
  color: #174ea6;
  background: #eef5ff;
  border: 1px solid #cfe1f8;
}

.danger-action {
  color: #b42318;
  background: #fff4f2;
  border-color: #f1b7b2;
}

.badge-info,
.badge-progress,
.badge-warning,
.badge-success,
.badge-danger {
  border-radius: 999px;
}

@media (max-width: 880px) {
  .selected-work-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.welcome-audio-btn:hover {
  border-color: rgba(201, 168, 76, 0.6);
  background: rgba(201, 168, 76, 0.14);
  box-shadow: 0 0 16px rgba(201, 168, 76, 0.12);
  transform: translateY(-1px);
}

.welcome-audio-btn.is-playing {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.18);
  box-shadow: 0 0 20px rgba(201, 168, 76, 0.2);
}

.welcome-audio-btn.is-playing .welcome-audio-icon {
  animation: pulse-icon 1s ease infinite;
}

@keyframes pulse-icon {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.welcome-audio-icon {
  font-size: 16px;
  line-height: 1;
}

.cadastro-status {
  align-self: flex-start;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}

.cadastro-status.is-linked {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.cadastro-status.is-pending {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
}

.cadastro-status.is-error {
  color: #b42318;
  background: #fff4f2;
  border: 1px solid #f1b7b2;
}

.cadastro-error-note {
  display: grid;
  gap: 4px;
  margin: 8px 0;
  padding: 10px 12px;
  color: #7a271a;
  background: #fff4f2;
  border: 1px solid #f1b7b2;
  border-radius: 8px;
  font-size: 0.86rem;
}

.cadastro-error-note span {
  color: #b42318;
  overflow-wrap: anywhere;
}

.admin-link-panel {
  display: grid;
  gap: 14px;
  margin: 18px 0 22px;
  padding: 16px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
}

.admin-link-panel h3 {
  margin: 0 0 4px;
  color: #172033;
  font-size: 1rem;
}

.admin-cadastro-link-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(240px, 1.4fr) auto;
  gap: 12px;
  align-items: end;
}

.admin-cadastro-link-grid select {
  min-height: 44px;
}

.intake-os-note {
  margin: 12px 0;
  padding: 12px;
  color: #344054;
  background: #f8fafc;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  white-space: pre-wrap;
}

@media (max-width: 880px) {
  .admin-cadastro-link-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
