/* Inter (subconjunto latino, hospedado no próprio servidor) */
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/inter-400.woff) format("woff"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/inter-500.woff) format("woff"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/inter-600.woff) format("woff"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/inter-700.woff) format("woff"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/inter-800.woff) format("woff"); }
/* =====================================================================
   Painel administrativo - tema claro SaaS
   ===================================================================== */
:root {
  --primary: #E5306A;
  --secondary: #FF7A2F;
  --btn-bg: var(--primary);
  --btn-text: #FFFFFF;
  --sidebar-bg: #14111F;
  --sidebar-text: #B9B4C9;
  --login-bg: #F6F2F7;
  --bg: #F6F5F8;
  --surface: #FFFFFF;
  --border: #ECEAF1;
  --border-strong: #DCD8E4;
  --text: #17141F;
  --text-2: #4F4A5E;
  --muted: #7B7589;
  --success: #12B76A;
  --success-bg: #DCFAE6;
  --danger: #E11D48;
  --danger-bg: #FFE4E8;
  --warning: #E08A00;
  --warning-bg: #FEF0C7;
  --info: #0B84D6;
  --info-bg: #E0F2FE;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(23, 20, 31, .04), 0 2px 8px rgba(23, 20, 31, .04);
  --shadow-lg: 0 24px 60px -16px rgba(23, 20, 31, .28);
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-w: 260px;
  --grad: linear-gradient(135deg, var(--primary), var(--secondary));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.25;
  font-weight: 650;
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .92em;
  background: #F1F5F9;
  padding: 1px 6px;
  border-radius: 6px;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.icon-sm {
  width: 15px;
  height: 15px;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

/* ---------- Layout ---------- */
.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform .25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 14px;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  min-height: 64px;
}

.sidebar-brand img {
  max-height: 34px;
  max-width: 150px;
  object-fit: contain;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}

.sidebar nav {
  flex: 1;
  overflow-y: auto;
  padding: 6px 10px 16px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  margin: 2px 0;
  border-radius: 9px;
  color: var(--sidebar-text);
  font-weight: 500;
  text-decoration: none !important;
  transition: background .15s, color .15s;
}

.nav-item:hover {
  background: rgba(255, 255, 255, .07);
  color: #fff;
}

.nav-item.active {
  background: color-mix(in srgb, var(--primary) 85%, #000);
  color: #fff;
  box-shadow: inset 3px 0 0 #fff3;
}

.nav-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: color-mix(in srgb, var(--sidebar-text) 60%, transparent);
  padding: 14px 12px 4px;
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 12px;
  color: color-mix(in srgb, var(--sidebar-text) 75%, transparent);
}

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar-title {
  font-size: 18px;
  font-weight: 650;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-toggle {
  display: none;
}

.user-menu {
  position: relative;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 15%, #fff);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
}

.dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 6px;
  display: none;
  z-index: 50;
}

.dropdown.open {
  display: block;
}

.dropdown button,
.dropdown a {
  display: flex;
  width: 100%;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 7px;
  border: 0;
  background: none;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.dropdown button:hover,
.dropdown a:hover {
  background: #F1F5F9;
}

.content {
  padding: 24px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.page-head h2 {
  font-size: 20px;
}

.page-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

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

.backdrop {
  display: none;
}

/* ---------- Cards & grid ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.card-header h3 {
  font-size: 15px;
}

.card-body {
  padding: 18px;
}

.card-body.flush {
  padding: 0;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.grid-auto {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

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

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.row.between {
  justify-content: space-between;
}

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

.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mb-1 {
  margin-bottom: 8px;
}

.mb-2 {
  margin-bottom: 16px;
}

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

.small {
  font-size: 12px;
}

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

.text-success {
  color: var(--success);
}

.text-warning {
  color: var(--warning);
}

.nowrap {
  white-space: nowrap;
}

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

.right {
  text-align: right;
}

.hidden {
  display: none !important;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
  border: 0;
}

.stat {
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  color: var(--primary);
  flex: none;
}

.stat-icon.green {
  background: var(--success-bg);
  color: var(--success);
}

.stat-icon.red {
  background: var(--danger-bg);
  color: var(--danger);
}

.stat-icon.amber {
  background: var(--warning-bg);
  color: var(--warning);
}

.stat-icon.sky {
  background: var(--info-bg);
  color: var(--info);
}

.stat-label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.stat-sub {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, opacity .15s;
  background: #fff;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn:hover {
  background: #F8FAFC;
}

.btn:disabled,
.btn.disabled {
  opacity: .55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: var(--btn-bg);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--btn-bg) 88%, #000);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-danger:hover {
  background: #B91C1C;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}

.btn-ghost:hover {
  background: #F1F5F9;
}

.btn-soft {
  background: color-mix(in srgb, var(--primary) 10%, #fff);
  color: var(--primary);
  border-color: transparent;
}

.btn-sm {
  height: 32px;
  padding: 0 10px;
  font-size: 12.5px;
  border-radius: 8px;
}

.btn-xs {
  height: 26px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 7px;
}

.btn-icon {
  width: 34px;
  padding: 0;
}

.btn-icon.btn-sm {
  width: 30px;
}

.btn-block {
  width: 100%;
}

.btn-group {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #F1F5F9;
  color: var(--text-2);
  white-space: nowrap;
}

.badge.success {
  background: var(--success-bg);
  color: #15803D;
}

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

.badge.warning {
  background: var(--warning-bg);
  color: #B45309;
}

.badge.info {
  background: var(--info-bg);
  color: #0369A1;
}

.badge.primary {
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  color: var(--primary);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.dot.pulse {
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, .5);
  }

  70% {
    box-shadow: 0 0 0 7px rgba(22, 163, 74, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

/* ---------- Forms ---------- */
.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field label,
.label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.field .help {
  font-size: 12px;
  color: var(--muted);
}

.field .error-msg {
  font-size: 12px;
  color: var(--danger);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
}

input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=tel],
input[type=date],
input[type=time],
input[type=datetime-local],
input[type=search],
select,
textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  font: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}

textarea {
  height: auto;
  min-height: 84px;
  padding: 10px 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

input[type=color] {
  width: 46px;
  height: 40px;
  padding: 3px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

input[type=range] {
  width: 100%;
  accent-color: var(--primary);
}

input[type=checkbox],
input[type=radio] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

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

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

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
}

.color-field {
  display: flex;
  gap: 8px;
  align-items: center;
}

.color-field input[type=text] {
  font-family: ui-monospace, Consolas, monospace;
  text-transform: uppercase;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch .track {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #CBD5E1;
  position: relative;
  transition: background .15s;
  flex: none;
}

.switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.switch input:checked+.track {
  background: var(--primary);
}

.switch input:checked+.track::after {
  transform: translateX(18px);
}

.switch input:focus-visible+.track {
  outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent);
}

.input-group {
  display: flex;
}

.input-group input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: -1px;
  height: 40px;
}

.search-input {
  position: relative;
}

.search-input .icon {
  position: absolute;
  left: 11px;
  top: 11px;
  color: var(--muted);
}

.search-input input {
  padding-left: 36px;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}

.filters>* {
  min-width: 160px;
}

.filters>select,
.filters>input[type=date] {
  width: auto;
  flex: 0 1 210px;
}

.filters .search-input {
  flex: 1 1 260px;
  min-width: 220px;
}

.days-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.days-picker label {
  display: inline-flex;
}

.days-picker input {
  position: absolute;
  opacity: 0;
}

.days-picker span {
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  font-weight: 600;
  font-size: 12.5px;
  user-select: none;
}

.days-picker input:checked+span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.days-picker input:focus-visible+span {
  outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent);
}

/* ---------- Alerts ---------- */
.alert {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid;
  font-size: 13.5px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.alert-info {
  background: var(--info-bg);
  border-color: #BAE6FD;
  color: #075985;
}

.alert-success {
  background: var(--success-bg);
  border-color: #BBF7D0;
  color: #166534;
}

.alert-danger {
  background: var(--danger-bg);
  border-color: #FECACA;
  color: #991B1B;
}

.alert-warning {
  background: var(--warning-bg);
  border-color: #FDE68A;
  color: #92400E;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: #FAFBFC;
  white-space: nowrap;
}

.table td {
  padding: 11px 14px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

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

.table tbody tr:hover {
  background: #FAFBFF;
}

.table .actions {
  text-align: right;
  white-space: nowrap;
}

.table .title-cell {
  font-weight: 600;
}

.table .sub {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.row-expired td {
  background: #FEF2F2 !important;
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
}

.tab {
  padding: 10px 14px;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .5);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px 16px;
  overflow-y: auto;
  animation: fadeIn .15s ease;
}

.modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  animation: popIn .18s ease;
}

.modal.lg {
  max-width: 860px;
}

.modal.xl {
  max-width: 1180px;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 16px;
  flex: 1;
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: #FAFBFC;
  border-radius: 0 0 14px 14px;
  flex-wrap: wrap;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Toast ---------- */
.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 36px));
}

.toast {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 11px;
  background: #0F172A;
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  animation: popIn .2s ease;
}

.toast.success .icon {
  color: #4ADE80;
}

.toast.error .icon {
  color: #F87171;
}

.toast.warning .icon {
  color: #FBBF24;
}

/* ---------- Empty / loading ---------- */
.empty {
  text-align: center;
  padding: 42px 20px;
  color: var(--muted);
}

.empty .empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  background: #F1F5F9;
  color: var(--muted);
}

.empty h4 {
  color: var(--text);
  font-size: 15px;
  margin-bottom: 4px;
}

.empty p {
  margin: 0 auto 14px;
  max-width: 420px;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #E2E8F0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 40px;
  color: var(--muted);
}

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

.skeleton {
  background: linear-gradient(90deg, #F1F5F9, #E2E8F0, #F1F5F9);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 16px;
  flex-wrap: wrap;
}

.pagination .info {
  margin-right: auto;
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- Progress ---------- */
.progress {
  height: 8px;
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
}

.progress>div {
  height: 100%;
  background: var(--primary);
  width: 0;
  transition: width .2s;
  border-radius: 999px;
}

.progress.success>div {
  background: var(--success);
}

.progress.danger>div {
  background: var(--danger);
}

/* ---------- Media library ---------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.media-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: box-shadow .15s, transform .15s, border-color .15s;
  position: relative;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 0;
}

.media-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.media-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent);
}

.media-card.expired {
  border-color: #FCA5A5;
  box-shadow: 0 0 0 2px #FECACA;
}

.media-card.expired .media-info {
  background: #FEF2F2;
}

.media-thumb {
  aspect-ratio: 16 / 10;
  background: #0F172A;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  color: #94A3B8;
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-thumb .type-tag {
  position: absolute;
  left: 8px;
  top: 8px;
}

.media-thumb .dur-tag {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 6px;
}

.media-thumb .check-tag {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: none;
  place-items: center;
}

.media-card.selected .check-tag {
  display: grid;
}

.media-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.media-title {
  font-weight: 600;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-meta {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.expired-label {
  color: var(--danger);
  font-weight: 700;
  font-size: 11.5px;
}

.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: 14px;
  padding: 26px;
  text-align: center;
  background: #FAFBFF;
  transition: border-color .15s, background .15s;
  cursor: pointer;
}

.dropzone.drag {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, #fff);
}

.dropzone h4 {
  margin-bottom: 4px;
}

.upload-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.upload-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.upload-item .name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-item .progress {
  grid-column: 1 / -1;
}

.upload-item .status {
  font-size: 12px;
  color: var(--muted);
  grid-column: 1 / -1;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #F1F5F9;
  font-size: 12px;
  font-weight: 500;
}

.chip button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  display: inline-flex;
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.check-list label {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
}

.check-list label:hover {
  background: #F8FAFC;
}

.kv {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px 14px;
  font-size: 13.5px;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.preview-box {
  background: #0B1220;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 220px;
}

.preview-box img,
.preview-box video {
  max-width: 100%;
  max-height: 420px;
  display: block;
}

/* ---------- Playlist editor ---------- */
.pl-editor {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}

.block-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.block-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.block-card:hover {
  border-color: var(--border-strong);
}

.block-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.block-card.dragging {
  opacity: .45;
}

.block-card.drop-before {
  box-shadow: 0 -3px 0 var(--primary);
}

.block-card.drop-after {
  box-shadow: 0 3px 0 var(--primary);
}

.block-card .grip {
  cursor: grab;
  color: var(--muted);
  display: inline-flex;
}

.block-num {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #F1F5F9;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  flex: none;
}

.layout-mini {
  width: 54px;
  height: 32px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  background: #F8FAFC;
  display: flex;
  gap: 2px;
  padding: 2px;
  flex: none;
}

.layout-mini span {
  background: color-mix(in srgb, var(--primary) 35%, #fff);
  border-radius: 2px;
}

.layout-mini.portrait {
  width: 22px;
  height: 38px;
  flex-direction: column;
}

.layout-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.layout-option {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.layout-option.active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 5%, #fff);
}

.layout-option .layout-mini {
  width: 96px;
  height: 54px;
}

.layout-option strong {
  font-size: 12.5px;
}

.regions {
  display: grid;
  gap: 12px;
}

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

.region-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #FCFCFD;
}

.region-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.region-head h4 {
  font-size: 13.5px;
}

.region-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  min-height: 64px;
}

.item-row {
  display: grid;
  grid-template-columns: auto 56px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.item-row.dragging {
  opacity: .45;
}

.item-row.drop-before {
  box-shadow: 0 -3px 0 var(--primary);
}

.item-row.drop-after {
  box-shadow: 0 3px 0 var(--primary);
}

.item-row .thumb {
  width: 56px;
  height: 36px;
  border-radius: 6px;
  background: #0F172A;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #94A3B8;
}

.item-row .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-row .grip {
  cursor: grab;
  color: var(--muted);
  display: inline-flex;
}

.item-row .controls {
  display: flex;
  gap: 4px;
  align-items: center;
}

.item-row select,
.item-row input {
  height: 30px;
  font-size: 12.5px;
  padding: 0 6px;
  width: auto;
}

.item-row.invalid {
  border-color: #FCA5A5;
  background: #FEF2F2;
}

.preview-panel {
  position: sticky;
  top: 80px;
}

.screen-frame {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 6px #111827, 0 12px 30px rgba(0, 0, 0, .25);
}

.screen-frame.landscape {
  aspect-ratio: 16 / 9;
}

.screen-frame.portrait {
  aspect-ratio: 9 / 16;
  max-width: 260px;
  margin: 0 auto;
}

.screen-frame iframe,
.screen-frame .engine-host {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.unsaved {
  color: var(--warning);
  font-weight: 600;
  font-size: 12.5px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

/* ---------- Schedules ---------- */
.week {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 6px 10px;
  font-size: 12px;
}

.week .day-label {
  color: var(--muted);
  font-weight: 600;
  align-self: center;
}

.week .bar {
  position: relative;
  height: 26px;
  background: #F1F5F9;
  border-radius: 6px;
  overflow: hidden;
}

.week .seg {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 4px;
  color: #fff;
  font-size: 10.5px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, .5);
}

.week .seg.default {
  background: repeating-linear-gradient(45deg, #CBD5E1, #CBD5E1 6px, #E2E8F0 6px, #E2E8F0 12px);
  color: #334155;
}

.week .hours {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10.5px;
  grid-column: 2;
}

.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

/* ---------- Monitor / simulation ---------- */
.sim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

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

.sim-tile .sim-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.sim-tile .sim-head .grow {
  min-width: 0;
}

.sim-tile .sim-screen {
  background: #111;
  padding: 10px;
}

.sim-tile .screen-frame {
  box-shadow: none;
  border-radius: 6px;
}

.sim-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 5;
  background: rgba(79, 70, 229, .92);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: .04em;
  pointer-events: none;
}

.status-online {
  color: var(--success);
}

.status-offline {
  color: var(--danger);
}

.status-unlinked {
  color: var(--muted);
}

/* ---------- Charts ---------- */
.chart {
  width: 100%;
  height: 220px;
  display: block;
}

.chart text {
  font-family: var(--font);
  font-size: 10.5px;
  fill: var(--muted);
}

.chart .bar {
  fill: var(--primary);
}

.chart .bar:hover {
  fill: color-mix(in srgb, var(--primary) 80%, #000);
}

.chart .grid-line {
  stroke: #EEF2F7;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
}

.donut-legend div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.donut-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: none;
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-list .bl-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  font-size: 13px;
}

.bar-list .bl-track {
  grid-column: 1 / -1;
  height: 7px;
  background: #EEF2F7;
  border-radius: 999px;
  overflow: hidden;
}

.bar-list .bl-track div {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}

/* ---------- Branding preview ---------- */
.brand-preview {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 120px 1fr;
  min-height: 220px;
}

.brand-preview .bp-side {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand-preview .bp-side i {
  display: block;
  height: 9px;
  border-radius: 4px;
  opacity: .55;
  background: currentColor;
}

.brand-preview .bp-main {
  padding: 16px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.asset-field {
  display: flex;
  gap: 12px;
  align-items: center;
}

.asset-preview {
  width: 92px;
  height: 60px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #F8FAFC center / contain no-repeat;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.standby-preview {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  background-size: cover;
  background-position: center;
}

.standby-preview img.logo {
  max-width: 40%;
  max-height: 40%;
  object-fit: contain;
}

/* ---------- Auth pages ---------- */
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--login-bg);
  position: relative;
}

.auth-bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.auth-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 55%), radial-gradient(circle at 80% 80%, color-mix(in srgb, var(--secondary) 16%, transparent), transparent 55%);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.auth-logo {
  max-height: 44px;
  max-width: 200px;
  object-fit: contain;
}

.auth-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
}

.auth-name {
  font-weight: 700;
  font-size: 18px;
}

.auth-title {
  font-size: 22px;
}

.auth-sub {
  margin: -6px 0 4px;
  color: var(--muted);
}

.auth-links {
  text-align: center;
  font-size: 13.5px;
}

/* ---------- Responsivo ---------- */
@media (max-width: 1280px) {
  .pl-editor {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .pl-editor .preview-col {
    grid-column: 1 / -1;
  }

  .preview-panel {
    position: static;
  }
}

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

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

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    transform: none;
  }

  .backdrop.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 35;
  }

  .main {
    margin-left: 0;
  }

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

  .topbar {
    padding: 0 14px;
  }

  .content {
    padding: 16px;
  }

  .pl-editor {
    grid-template-columns: 1fr;
  }

  .regions.two {
    grid-template-columns: 1fr;
  }

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

  .span-2 {
    grid-column: auto;
  }

  .user-chip .name {
    display: none;
  }
}

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

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

  .kv {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .kv dd {
    margin-bottom: 8px;
  }

  .stat {
    padding: 12px;
  }

  .stat-value {
    font-size: 20px;
  }

  .layout-options {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .layout-option .layout-mini {
    width: 64px;
    height: 36px;
  }

  .modal-backdrop {
    padding: 0;
    align-items: stretch;
  }

  .modal {
    max-height: 100vh;
    border-radius: 0;
  }

  .modal-footer {
    border-radius: 0;
  }

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

  .filters>* {
    min-width: 0;
    flex: 1 1 140px;
  }

  /* Tabelas viram cartões empilhados */
  .table.responsive thead {
    display: none;
  }

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

  .table.responsive tr {
    border-bottom: 1px solid var(--border);
    padding: 8px 4px;
  }

  .table.responsive td {
    border: 0;
    padding: 4px 10px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    text-align: right;
  }

  .table.responsive td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
  }

  .table.responsive td.actions {
    justify-content: flex-end;
  }

  .table.responsive td.actions::before {
    content: "";
  }

  .toasts {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- Ajustes finais (mantidos ao fim do arquivo para prevalecer na cascata) ---------- */
input:not([type]) {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  font: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}

input:not([type]):focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.tabs {
  overflow-y: hidden;
  scrollbar-width: thin;
}

.pl-editor {
  grid-template-columns: 290px minmax(0, 1fr) 360px;
}

.block-card {
  gap: 8px;
  padding: 8px 6px 8px 8px;
}

.block-card .layout-mini {
  width: 42px;
  height: 26px;
}

.block-card .layout-mini.portrait {
  width: 18px;
  height: 32px;
}

.block-card .btn-group {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0;
}

.block-card .btn-group .btn {
  height: 22px;
  width: 26px;
}

.item-row select,
.item-row input:not([type]) {
  width: auto;
  height: 30px;
}

@media (max-width: 1280px) {
  .pl-editor {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .pl-editor {
    grid-template-columns: 1fr;
  }
}

/* O foco programático do conteúdo (acessibilidade ao trocar de página) não precisa de contorno visual */
.content:focus {
  outline: none;
}

@media (max-width: 640px) {

  .filters>select,
  .filters>input[type=date] {
    flex: 1 1 140px;
  }
}

/* ---------- Modo Simples: propagandas da TV ---------- */
.tvseq-head {
  align-items: flex-start;
  flex-wrap: wrap;
}

.tvseq-sync {
  text-align: right;
  font-size: 12px;
  max-width: 380px;
}

.tvseq-sync .sub {
  color: var(--muted);
  margin-top: 4px;
  font-size: 12px;
}

.tvseq-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tvseq-summary {
  font-size: 13px;
}

.tvseq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tvseq-row {
  display: grid;
  grid-template-columns: auto 58px 88px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.tvseq-row.ro {
  grid-template-columns: 58px 88px minmax(0, 1fr) auto;
}

.tvseq-row.off {
  background: #FAFAFA;
}

.tvseq-row.off .tvseq-thumb,
.tvseq-row.off .tvseq-title {
  opacity: .55;
}

.tvseq-row.dragging {
  opacity: .45;
}

.tvseq-row.drop-before {
  box-shadow: 0 -3px 0 var(--primary);
}

.tvseq-row.drop-after {
  box-shadow: 0 3px 0 var(--primary);
}

.tvseq-row .grip {
  cursor: grab;
  color: var(--muted);
  display: inline-flex;
  padding: 8px 2px;
}

.tvseq-row .grip:active {
  cursor: grabbing;
}

.tvseq-pos {
  width: 58px;
  height: 36px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 0 4px;
  background: #F8FAFC;
  font-variant-numeric: tabular-nums;
}

span.tvseq-pos {
  display: grid;
  place-items: center;
}

.tvseq-thumb {
  width: 88px;
  height: 50px;
  border-radius: 8px;
  background: #0F172A;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #94A3B8;
  border: 0;
  padding: 0;
  cursor: zoom-in;
}

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

.tvseq-info {
  min-width: 0;
}

.tvseq-title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tvseq-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: center;
  margin-top: 3px;
}

.tvseq-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tvseq-dur-ctl {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tvseq-dur-ctl select {
  height: 36px;
  width: auto;
  min-width: 220px;
  font-size: 13px;
}

.tvseq-custom {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.tvseq-custom input {
  width: 86px;
  height: 36px;
}

.tvseq-custom input.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent);
}

.tvseq-actions {
  display: flex;
  gap: 2px;
}

.tvseq-empty {
  border: 2px dashed var(--border-strong);
  border-radius: 14px;
  background: #FAFBFF;
}

.tvseq-empty-actions {
  justify-content: center;
}

.tvseq-savebar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 18px;
  background: #fff;
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}

.btn .spinner {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

.media-card.in-use {
  opacity: .6;
  cursor: not-allowed;
}

/* Biblioteca do cliente: cartão com TVs que usam a mídia e ação de desvincular */
.lib-item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .15s;
}

.lib-item:hover {
  box-shadow: var(--shadow-lg);
}

.lib-item.expired {
  border-color: #FCA5A5;
  box-shadow: 0 0 0 2px #FECACA;
}

.lib-item>.media-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  flex: 1 1 auto;
}

.lib-item>.media-card:hover {
  box-shadow: none;
  transform: none;
}

.lib-foot {
  padding: 8px 12px 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.lib-foot .chips {
  gap: 4px;
}

.lib-foot .chip {
  font-size: 11px;
  padding: 2px 8px;
  text-decoration: none;
  color: inherit;
}

.lib-foot a.chip:hover {
  background: #E2E8F0;
}

.lib-foot .lib-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .tvseq-row {
    grid-template-columns: auto 50px 72px minmax(0, 1fr);
  }

  .tvseq-row.ro {
    grid-template-columns: 50px 72px minmax(0, 1fr);
  }

  .tvseq-side {
    grid-column: 1 / -1;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .tvseq-pos {
    width: 50px;
  }

  .tvseq-thumb {
    width: 72px;
    height: 42px;
  }

  .tvseq-dur-ctl select {
    min-width: 0;
  }

  .tvseq-sync {
    text-align: left;
    max-width: none;
  }
}

/* ---------- Instagram na sequência da TV (nomes neutros para não serem ocultados por bloqueadores) ---------- */
.tvig-row .tvseq-thumb {
  background: linear-gradient(135deg, #F58529, #DD2A7B 55%, #8134AF);
  color: #fff;
}

.tvig-mark {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.tvig-row .tvseq-title .icon {
  color: #DD2A7B;
  vertical-align: -2px;
}

.tvig-sources {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.tvig-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: #FFF8FB;
}

.tvig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.tvig-item {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.tvig-item.off {
  opacity: .6;
}

.tvig-thumb {
  position: relative;
  flex: none;
  width: 72px;
  height: 128px;
  border: 0;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #0F172A;
  color: #94A3B8;
  display: grid;
  place-items: center;
  cursor: zoom-in;
}

.tvig-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tvig-thumb .badge {
  position: absolute;
  left: 4px;
  bottom: 4px;
  font-size: 10px;
}

.tvig-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tvig-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tvig-caption {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* =====================================================================
   TV NON 2.0 — camada visual nova (substitui o tema anterior)
   ===================================================================== */
body { font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
h1, h2, h3, h4 { letter-spacing: -.02em; font-weight: 700; }
::selection { background: color-mix(in srgb, var(--primary) 22%, transparent); }

/* ---- Barra lateral ---- */
.sidebar { background: var(--sidebar-bg); border-right: 1px solid rgba(255, 255, 255, .04); }
.sidebar::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 220px; background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--primary) 26%, transparent), transparent 70%); pointer-events: none; }
.sidebar-brand { position: relative; padding: 20px 20px 18px; min-height: 72px; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--primary) 70%, transparent); }
.brand-mark .icon { width: 19px; height: 19px; }
.sidebar-brand .brand-sub { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--sidebar-text) 70%, transparent); margin-top: 1px; }
.sidebar nav { position: relative; padding: 4px 12px 16px; }
.nav-section { padding: 18px 12px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: color-mix(in srgb, var(--sidebar-text) 55%, transparent); }
.nav-item { padding: 9px 12px; margin: 1px 0; border-radius: 10px; font-size: 13.5px; gap: 12px; position: relative; }
.nav-item .icon { width: 18px; height: 18px; opacity: .8; }
.nav-item:hover { background: rgba(255, 255, 255, .06); }
.nav-item.active { background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 30%, transparent), color-mix(in srgb, var(--primary) 8%, transparent)); color: #fff; box-shadow: none; }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.nav-item.active .icon { opacity: 1; color: #fff; }
.nav-item .nav-count { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff; }
.sidebar-cta { margin: 0 12px 12px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07); color: var(--sidebar-text); font-size: 12.5px; line-height: 1.45; }
.sidebar-cta strong { display: block; color: #fff; font-size: 13px; margin-bottom: 2px; }
.sidebar-cta a { color: #fff; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; }
.sidebar-footer { border-top-color: rgba(255, 255, 255, .06); font-size: 11.5px; padding: 12px 20px; }

/* ---- Barra superior ---- */
.topbar { height: 68px; padding: 0 28px; gap: 14px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.topbar-title { flex: 0 1 auto; font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.topbar-spacer { flex: 1; }
.gsearch { position: relative; flex: 0 1 420px; min-width: 160px; }
.gsearch > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 17px; height: 17px; pointer-events: none; }
.gsearch input { height: 40px; padding-left: 38px; padding-right: 52px; border-radius: 12px; background: var(--surface); border-color: var(--border); }
.gsearch kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 600 11px var(--font); color: var(--muted); border: 1px solid var(--border-strong); border-radius: 6px; padding: 2px 6px; background: var(--bg); }
.gsearch-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; max-height: 420px; overflow: auto; z-index: 60; display: none; }
.gsearch-results.open { display: block; }
.gsearch-group { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.gsearch-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text); text-decoration: none !important; cursor: pointer; }
.gsearch-item .icon { color: var(--muted); }
.gsearch-item small { color: var(--muted); margin-left: auto; font-size: 12px; }
.gsearch-item:hover, .gsearch-item.sel { background: color-mix(in srgb, var(--primary) 8%, #fff); }
.gsearch-empty { padding: 14px 10px; color: var(--muted); font-size: 13px; }
.btn-activate { white-space: nowrap; }
.user-chip { background: var(--surface); border-color: var(--border); padding: 4px 10px 4px 4px; }
.avatar { background: var(--grad); color: #fff; }
.dropdown { border-radius: 14px; padding: 6px; }
.dropdown button:hover, .dropdown a:hover { background: color-mix(in srgb, var(--primary) 7%, #fff); }

/* ---- Conteúdo ---- */
.content { padding: 28px; max-width: 1520px; }
.page-head { margin-bottom: 22px; align-items: center; }
.page-head h2 { font-size: 24px; letter-spacing: -.03em; }
.page-head p { font-size: 14px; }
.card { border-radius: var(--radius); border-color: var(--border); box-shadow: var(--shadow); }
.card-header { border-bottom-color: var(--border); }

/* ---- Botões ---- */
.btn { height: 38px; border-radius: 10px; font-weight: 600; border-color: var(--border-strong); letter-spacing: -.005em; }
.btn:hover { background: #FBFAFC; border-color: #CFCAD9; }
.btn-primary { background: var(--btn-bg); background-image: linear-gradient(135deg, transparent, color-mix(in srgb, var(--secondary) 45%, transparent)); border-color: transparent; color: var(--btn-text); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--btn-bg) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn-primary:hover { background-color: color-mix(in srgb, var(--btn-bg) 88%, #000); border-color: transparent; }
.btn-ghost { border-color: transparent; }
.btn-ghost:hover { background: color-mix(in srgb, var(--text) 5%, transparent); border-color: transparent; }
.btn-soft { background: color-mix(in srgb, var(--primary) 9%, #fff); color: color-mix(in srgb, var(--primary) 85%, #000); border-color: transparent; }
.btn-soft:hover { background: color-mix(in srgb, var(--primary) 14%, #fff); border-color: transparent; }
.btn-danger { box-shadow: 0 6px 16px -8px rgba(225, 29, 72, .7); }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 12px; }

/* ---- Formulários ---- */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=time], input[type=datetime-local], input[type=search], select, textarea { border-radius: 10px; border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent); }
.field label, .field .label { font-weight: 600; font-size: 13px; color: var(--text-2); }

/* ---- Badges, abas, tabelas ---- */
.badge { font-weight: 600; background: #F2F0F5; padding: 3px 10px; }
.badge.success { background: var(--success-bg); color: #067647; }
.badge.danger { background: var(--danger-bg); color: #C01048; }
.badge.warning { background: var(--warning-bg); color: #B54708; }
.badge.primary { background: color-mix(in srgb, var(--primary) 12%, #fff); color: color-mix(in srgb, var(--primary) 85%, #000); }
.tabs { border-bottom-color: var(--border); gap: 4px; }
.tab { font-weight: 600; border-radius: 10px 10px 0 0; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.table th { background: #FAF9FB; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.table td { border-bottom-color: #F3F1F6; }
.table tbody tr:hover { background: color-mix(in srgb, var(--primary) 3%, #fff); }

/* ---- Indicadores ---- */
.stat { position: relative; overflow: hidden; }
.stat-icon { border-radius: 12px; background: color-mix(in srgb, var(--primary) 11%, #fff); color: var(--primary); }
.stat-value { font-size: 30px; font-weight: 800; letter-spacing: -.04em; }
.stat-label { font-weight: 600; }

/* ---- Modais, toasts, vazios ---- */
.modal-backdrop { background: rgba(20, 17, 31, .5); backdrop-filter: blur(3px); }
.modal { border-radius: 20px; border: 1px solid var(--border); }
.modal-header h3 { font-size: 17px; }
.toast { border-radius: 12px; background: #1C1829; }
.alert { border-radius: 12px; }
.empty .empty-icon, .empty-icon { background: color-mix(in srgb, var(--primary) 9%, #fff); color: var(--primary); }
.dropzone { border-radius: 16px; border-color: color-mix(in srgb, var(--primary) 30%, var(--border-strong)); background: color-mix(in srgb, var(--primary) 2.5%, #fff); }
.dropzone:hover, .dropzone.over { background: color-mix(in srgb, var(--primary) 6%, #fff); border-color: var(--primary); }
.media-card { border-radius: 14px; }
.progress > div, .progress .bar { background: var(--grad); }

/* ---- Primeiros passos (dashboard) ---- */
.onboard { padding: 20px 22px; margin-bottom: 18px; background: linear-gradient(135deg, #1C1829, #14111F); color: #fff; border: 0; position: relative; overflow: hidden; }
.onboard::after { content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--primary) 45%, transparent), transparent 65%); pointer-events: none; }
.onboard-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.onboard-head h3 { font-size: 17px; }
.onboard-head p { margin: 2px 0 0; color: rgba(255, 255, 255, .7); font-size: 13.5px; }
.onboard-prog { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: rgba(255, 255, 255, .75); font-weight: 600; }
.onboard-prog .bar { width: 120px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.onboard-prog .bar div { height: 100%; background: var(--grad); }
.onboard-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; position: relative; z-index: 1; }
.onboard-step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.onboard-step .n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: rgba(255, 255, 255, .1); }
.onboard-step.done .n { background: var(--success); }
.onboard-step .t { flex: 1; min-width: 0; }
.onboard-step .t b { display: block; font-size: 13.5px; }
.onboard-step .t span { font-size: 12px; color: rgba(255, 255, 255, .6); }
.onboard-step .btn { height: 32px; background: #fff; color: #14111F; border: 0; }
.onboard-step.done .btn { display: none; }
@media (max-width: 1100px) { .onboard-steps { grid-template-columns: 1fr; } }

/* ---- Ativar tela (modal) ---- */
.pair-code-input { display: flex; gap: 8px; justify-content: center; margin: 6px 0 4px; }
.pair-code-input input { width: 52px; height: 64px; text-align: center; font: 800 28px ui-monospace, "Cascadia Mono", Consolas, monospace; text-transform: uppercase; border-radius: 12px; padding: 0; }
.pair-code-input .sep { width: 10px; }
.pair-hint { text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.pair-device { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--success) 9%, #fff); border: 1px solid color-mix(in srgb, var(--success) 25%, #fff); margin: 14px 0; }
.pair-device .icon { color: var(--success); width: 22px; height: 22px; }
.pair-device b { display: block; }
.pair-device span { color: var(--text-2); font-size: 12.5px; }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: #F2F0F5; gap: 4px; margin-bottom: 14px; }
.seg button { border: 0; background: none; font: 600 13px var(--font); color: var(--text-2); padding: 7px 14px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.pair-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.pair-steps div { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.pair-steps b { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; background: #F2F0F5; color: var(--text-2); }
.pair-steps .on b { background: var(--grad); color: #fff; }
.pair-steps .on { color: var(--text); font-weight: 600; }
.pair-ok { text-align: center; padding: 10px 0 4px; }
.pair-ok .big { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--success) 14%, #fff); color: var(--success); }
.pair-ok .big .icon { width: 30px; height: 30px; }

/* ---- Páginas de acesso (login, recuperação) ---- */
.auth-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr); place-items: stretch; padding: 0; background: var(--surface); min-height: 100vh; }
.auth-bg { display: none; }
.auth-hero { position: relative; overflow: hidden; background: #14111F; color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; background-size: cover; background-position: center; }
.auth-hero::before { content: ""; position: absolute; width: 900px; height: 900px; left: -300px; top: -420px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--primary) 55%, transparent), transparent 62%); animation: authdrift 20s ease-in-out infinite alternate; }
.auth-hero::after { content: ""; position: absolute; width: 800px; height: 800px; right: -340px; bottom: -380px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--secondary) 45%, transparent), transparent 62%); animation: authdrift 26s ease-in-out infinite alternate-reverse; }
@keyframes authdrift { to { transform: translate(60px, 40px) scale(1.08); } }
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero .auth-brand { color: #fff; }
.auth-hero h2 { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.05; letter-spacing: -.04em; font-weight: 800; margin: 0 0 14px; max-width: 560px; }
.auth-hero h2 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-hero p.lead { font-size: 16px; color: rgba(255, 255, 255, .72); max-width: 480px; margin: 0; line-height: 1.55; }
.auth-tv { width: min(520px, 100%); margin: 36px 0 28px; }
.auth-tv .scr { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; background: #000; border: 10px solid #24202F; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06); overflow: hidden; }
.auth-tv .stand { width: 26%; height: 14px; margin: 0 auto; background: linear-gradient(#24202F, #1A1724); border-radius: 0 0 10px 10px; }
.auth-tv .ad { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 8%; opacity: 0; animation: authad 12s infinite; }
.auth-tv .ad b { font-size: clamp(16px, 2vw, 26px); font-weight: 800; letter-spacing: -.02em; }
.auth-tv .ad span { font-size: clamp(30px, 4.2vw, 54px); font-weight: 800; letter-spacing: -.04em; line-height: 1; margin-top: 6px; }
.auth-tv .ad small { margin-top: 10px; font-size: 12px; opacity: .85; }
.auth-tv .ad1 { background: linear-gradient(135deg, #B41E14, #FA781E); animation-delay: 0s; }
.auth-tv .ad2 { background: linear-gradient(135deg, #0A5078, #28B4BE); animation-delay: 4s; }
.auth-tv .ad3 { background: linear-gradient(135deg, #2A1155, #7828C8); animation-delay: 8s; }
@keyframes authad { 0% { opacity: 0; transform: scale(1.04); } 4% { opacity: 1; transform: none; } 30% { opacity: 1; } 34% { opacity: 0; } 100% { opacity: 0; } }
.auth-tv .live { position: absolute; top: 10px; right: 12px; z-index: 2; font: 700 10px var(--font); letter-spacing: .12em; padding: 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, .45); display: flex; gap: 6px; align-items: center; }
.auth-tv .live i { width: 6px; height: 6px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .3); }
.auth-feats { display: flex; flex-wrap: wrap; gap: 10px; }
.auth-feats span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; font-size: 13px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .88); }
.auth-feats .icon { width: 15px; height: 15px; color: color-mix(in srgb, var(--secondary) 70%, #fff); }
.auth-side { display: flex; align-items: center; justify-content: center; padding: 48px 32px; background: var(--surface); position: relative; }
.auth-card { max-width: 400px; width: 100%; box-shadow: none; padding: 0; background: transparent; gap: 16px; border-radius: 0; }
.auth-card .auth-brand { display: none; }
.auth-title { font-size: 28px; letter-spacing: -.035em; font-weight: 800; }
.auth-sub { margin: -8px 0 8px; font-size: 14.5px; }
.auth-card .form { gap: 16px; }
.auth-card input[type=text], .auth-card input[type=password], .auth-card input[type=email] { height: 46px; border-radius: 12px; font-size: 15px; }
.auth-card .btn-primary { height: 48px; border-radius: 12px; font-size: 15px; }
.auth-pass { position: relative; }
.auth-pass input { padding-right: 46px; }
.auth-pass button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; color: var(--muted); border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.auth-pass button:hover { background: #F2F0F5; color: var(--text); }
.auth-row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; }
.auth-row label { display: flex; gap: 8px; align-items: center; color: var(--text-2); font-weight: 500; }
.auth-foot { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 12px; }
.auth-links { text-align: left; }
@media (max-width: 960px) {
  .auth-body { grid-template-columns: 1fr; }
  .auth-hero { min-height: 0; padding: 28px 24px; }
  .auth-hero-copy, .auth-feats { display: none; }
  .auth-hero { padding: 22px 22px 26px; }
  .auth-side { align-items: flex-start; padding: 32px 22px 72px; }
}
@media (prefers-reduced-motion: reduce) { .auth-hero::before, .auth-hero::after, .auth-tv .ad { animation: none; } .auth-tv .ad1 { opacity: 1; } }

@media (max-width: 900px) {
  .gsearch { display: none; }
  .topbar { padding: 0 14px; }
  .content { padding: 16px; }
}
@media (max-width: 640px) { .btn-activate span { display: none; } }
[hidden] { display: none !important; }
@media (min-width: 901px) { .menu-toggle { display: none !important; } }
@media (max-height: 980px) { .sidebar-cta { display: none; } }

/* ---- Janela do anúncio (2.0) ---- */
.md2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
.md2-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; }
.md2-preview { border-radius: 14px; overflow: hidden; background: repeating-conic-gradient(#1C1829 0% 25%, #221E31 0% 50%) 50% / 20px 20px; aspect-ratio: 16 / 9; display: grid; place-items: center; box-shadow: 0 12px 30px -14px rgba(20, 17, 31, .45); }
.md2-preview img, .md2-preview video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.md2-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.md2-facts span { font-size: 12px; font-weight: 600; color: var(--text-2); background: #F2F0F5; padding: 4px 10px; border-radius: 999px; }
.md2-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.md2-stats div { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.md2-stats b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.md2-stats span { font-size: 12px; color: var(--muted); }
.md2-tech { border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; }
.md2-tech summary { cursor: pointer; padding: 10px 0; font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; gap: 6px; align-items: center; list-style: none; }
.md2-tech summary::-webkit-details-marker { display: none; }
.md2-tech[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.md2-tech .kv { font-size: 12.5px; margin-bottom: 10px; }
.md2-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.md2-main .form { gap: 12px; }
.md2-title { font-size: 16px !important; font-weight: 600; height: 44px; }
.md2 h4 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.md2 h4 .icon { color: var(--primary); }
.md2-tvs { border: 1.5px solid color-mix(in srgb, var(--primary) 28%, var(--border)); border-radius: 16px; padding: 16px; background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 4%, #fff), #fff 120px); }
.md2-tvs-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.md2-tvs-head p { margin: 4px 0 0; font-size: 13px; color: var(--text-2); }
.md2-count { flex: none; font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--primary) 85%, #000); background: color-mix(in srgb, var(--primary) 11%, #fff); padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.md2-tvs-tools { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.md2-search { position: relative; flex: 1; }
.md2-search .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.md2-search input { height: 36px; padding-left: 32px; width: 100%; }
.md2-tvlist { max-height: 280px; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 2px; }
.md2-group-name { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 2px 2px 6px; }
.md2-tv { display: flex; align-items: center; gap: 12px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; margin-bottom: 6px; }
.md2-tv:hover { border-color: var(--border-strong); }
.md2-tv.on { border-color: color-mix(in srgb, var(--primary) 55%, #fff); background: color-mix(in srgb, var(--primary) 5%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent); }
.md2-tv input { position: absolute; opacity: 0; pointer-events: none; }
.md2-switch { flex: none; width: 38px; height: 22px; border-radius: 999px; background: #DCD8E4; position: relative; transition: background .15s; }
.md2-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s; }
.md2-tv.on .md2-switch { background: var(--grad); }
.md2-tv.on .md2-switch::after { transform: translateX(16px); }
.md2-tv input:focus-visible + .md2-switch { outline: 2px solid var(--primary); outline-offset: 2px; }
.md2-tv-name { flex: 1; min-width: 0; }
.md2-tv-name b { display: block; font-size: 13.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md2-tv-name small { font-size: 11.5px; line-height: 1.3; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.md2-tv .dot { width: 7px; height: 7px; border-radius: 50%; background: #F79009; display: inline-block; }
.md2-tv .dot.on { background: var(--success); }
.md2-tv .dot.none { background: #C9C4D3; }
.md2-tv-pos { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.md2-tv-pos em { font-style: normal; font-weight: 700; color: var(--primary); }
.md2-tv input:disabled ~ * { cursor: default; }
.md2-dur { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border-strong); flex-wrap: wrap; }
.md2-dur label { font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; gap: 6px; align-items: center; }
.md2-dur select { width: auto; height: 34px; }
.md2-diff { margin-top: 10px; font-size: 13px; padding: 9px 12px; border-radius: 10px; background: #FFF7E6; color: #8A4B00; display: flex; gap: 6px; align-items: center; }
.md2-empty { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 12px; background: #F7F6F9; }
.md2-empty .icon { color: var(--muted); width: 24px; height: 24px; }
.md2-empty b, .md2-empty span { display: block; font-size: 13px; }
.md2-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.md2-clients { padding: 0 2px; }
@media (max-width: 860px) { .md2 { grid-template-columns: 1fr; } .md2-side { position: static; } }
