/* ============================================
   POUSADA VIVA — ADS AI MANAGER
   Main Stylesheet
   ============================================ */

/* Remove setas de input number */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* CSS Variables */
:root {
  --primary: #2d6a4f;
  --primary-light: #40916c;
  --primary-dark: #1b4332;
  --secondary: #40916c;
  --accent: #f4a261;
  --accent-dark: #e76f51;
  --dark-bg: #ffffff;
  --card-bg: #ffffff;
  --card-bg-hover: #f8f9fa;
  --surface: #f0f2f5;
  --text-primary: #1a1a2e;
  --text-secondary: #555770;
  --text-muted: #8c8ca1;
  --success: #2d6a4f;
  --warning: #e6930a;
  --danger: #d32f2f;
  --info: #1976d2;
  --border: rgba(0, 0, 0, 0.1);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 4px;
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 62px;
  --topbar-height: 60px;
  --transition: all 0.2s ease;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   LOGIN PAGE — Hospedin-inspired, fundo branco
   ============================================ */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #ffffff;
}

.login-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 48px 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.login-logo {
  text-align: center;
  margin-bottom: 8px;
}

.login-logo i {
  font-size: 44px;
  color: #00B5B8;
  margin-bottom: 8px;
  display: block;
}

.login-logo h1 {
  font-size: 28px;
  font-weight: 800;
  color: #1E293B;
  margin: 0;
  letter-spacing: -0.5px;
}

.login-logo-accent {
  color: #00B5B8;
}

.login-welcome {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: #2D3748;
  margin: 20px 0 4px;
}

.login-subtitle {
  text-align: center;
  font-size: 14px;
  color: #94A3B8;
  margin: 0 0 28px;
}

.login-error {
  background: #FEB2B2;
  border-left: 3px solid #E53E3E;
  color: #742A2A;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 18px;
  font-size: 13px;
}

.login-field {
  margin-bottom: 20px;
}

.login-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #2D3748;
  margin-bottom: 6px;
}

.login-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #E2E8F0;
  border-radius: 25px;
  font-size: 14px;
  color: #1E293B;
  background: #F7FAFC;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input:focus {
  outline: none;
  border-color: #00B5B8;
  box-shadow: 0 0 0 3px rgba(61, 90, 128, 0.15);
  background: #fff;
}

.login-input::placeholder {
  color: #A0AEC0;
}

.login-btn-enter {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  background: linear-gradient(135deg, #F5A623 0%, #E6930A 100%);
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(230, 147, 10, 0.3);
}

.login-btn-enter:hover {
  background: linear-gradient(135deg, #E6930A 0%, #D4820A 100%);
  box-shadow: 0 6px 16px rgba(230, 147, 10, 0.4);
  transform: translateY(-1px);
}

.login-btn-enter:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(230, 147, 10, 0.3);
}

.login-forgot {
  text-align: center;
  margin-top: 18px;
}

.login-forgot a {
  color: #64748B;
  font-size: 13px;
  text-decoration: underline;
  transition: color 0.2s;
}

.login-forgot a:hover {
  color: #00B5B8;
}

@media (max-width: 480px) {
  .login-card {
    margin: 16px;
    padding: 32px 24px 28px;
  }
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group label i {
  margin-right: 6px;
  width: 16px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.2);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

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

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text-primary);
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

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

.btn-primary:hover {
  background: var(--primary-light);
}

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

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

.btn-warning {
  background: var(--warning);
  color: #ffffff;
}

.btn-warning:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-logout {
  background: transparent;
  color: var(--text-secondary);
  width: 100%;
  justify-content: flex-start;
  padding: 10px 16px;
}

.btn-logout:hover {
  color: var(--danger);
  background: rgba(230, 57, 70, 0.1);
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.dashboard {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  background: var(--card-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: width 0.25s ease;
  overflow: visible;
}

/* Sidebar collapsed state */
.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-header span,
.sidebar.collapsed #global-property-selector,
.sidebar.collapsed .nav-item a span,
.sidebar.collapsed .nav-group-header span,
.sidebar.collapsed .nav-chevron,
.sidebar.collapsed .sidebar-footer span,
.sidebar.collapsed .btn-logout span {
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.sidebar:not(.collapsed) .sidebar-header span,
.sidebar:not(.collapsed) .nav-item a span,
.sidebar:not(.collapsed) .nav-group-header span,
.sidebar:not(.collapsed) .nav-chevron,
.sidebar:not(.collapsed) .sidebar-footer span,
.sidebar:not(.collapsed) .btn-logout span {
  opacity: 1;
  width: auto;
  transition: opacity 0.2s ease 0.1s;
}

.sidebar.collapsed .nav-submenu .nav-item a {
  padding-left: 20px;
}

.sidebar.collapsed .sidebar-header {
  padding: 20px 12px;
  align-items: center !important;
}

.sidebar.collapsed .nav-item a {
  padding: 12px 0;
  justify-content: center;
  border-left-color: transparent;
}

.sidebar.collapsed .nav-group-header {
  padding: 12px 0;
  justify-content: center;
}

.sidebar.collapsed .nav-group-header i:first-child {
  width: auto;
}

.sidebar.collapsed .sidebar-footer {
  padding: 12px 8px;
}

.sidebar.collapsed .btn-logout {
  justify-content: center;
  padding: 8px;
}

/* Collapsed: highlight group icon when it contains active tab */
.sidebar.collapsed .nav-group.has-active > .nav-group-header {
  color: var(--primary-light);
  background: rgba(45, 106, 79, 0.12);
  position: relative;
}
.sidebar.collapsed .nav-group.has-active > .nav-group-header::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--primary-light);
  border-radius: 0 3px 3px 0;
}

/* Collapsed: Home active indicator */
.sidebar.collapsed .nav-item.active > a {
  position: relative;
}
.sidebar.collapsed .nav-item.active > a::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--primary-light);
  border-radius: 0 3px 3px 0;
}

/* Collapsed: active group name mini-label below icon */
.sidebar.collapsed .nav-group.has-active > .nav-group-header::before {
  content: attr(data-active-label);
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 7px;
  font-weight: 700;
  color: var(--primary-light);
  white-space: nowrap;
  letter-spacing: -.3px;
  pointer-events: none;
  max-width: 58px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Collapsed: ensure icons are visible and interactive */
.sidebar.collapsed .nav-group-header,
.sidebar.collapsed .nav-item > a {
  position: relative;
}

/* Collapsed: submenu stays hidden but icons remain clickable */
.sidebar.collapsed .nav-submenu {
  max-height: 0 !important;
  overflow: hidden;
}

/* Toggle arrow button */
.sidebar-toggle {
  position: absolute;
  top: 22px;
  right: -13px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 101;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.25s ease, background 0.2s;
  font-size: 12px;
  color: var(--text-secondary);
}

.sidebar-toggle:hover {
  background: var(--surface);
  color: var(--primary);
}

.sidebar.collapsed .sidebar-toggle {
  transform: rotate(180deg);
}

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

.sidebar-header i {
  font-size: 24px;
  color: var(--primary-light);
}

.sidebar-header span {
  font-size: 16px;
  font-weight: 600;
}

.sidebar-nav {
  list-style: none;
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.nav-item a i {
  width: 20px;
  text-align: center;
}

.nav-item:hover a {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.nav-item.active a {
  color: var(--primary-light);
  background: rgba(45, 106, 79, 0.1);
  border-left-color: var(--primary-light);
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}

/* NAV GROUPS (sub-menus) */
.nav-group {
  margin: 2px 0;
}

.nav-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.nav-group-header:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.nav-group-header i:first-child {
  width: 20px;
  text-align: center;
}

.nav-chevron {
  margin-left: auto;
  font-size: 11px;
  transition: transform 0.2s ease;
}

.nav-group.open .nav-chevron {
  transform: rotate(180deg);
}

.nav-group.open .nav-group-header {
  color: var(--text-primary);
}

.nav-submenu {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.nav-group.open .nav-submenu {
  max-height: 600px;
}

.nav-submenu .nav-item a {
  padding: 10px 20px 10px 52px;
  font-size: 13px;
}

.nav-submenu .nav-item.active a {
  color: var(--primary-light);
  background: rgba(45, 106, 79, 0.08);
  border-left-color: var(--primary-light);
}

/* Role-based visibility */
[data-admin-only] {
  display: none;
}

body.role-master [data-admin-only],
body.role-admin [data-admin-only],
body.role-gerenciador [data-admin-only] {
  display: block;
}

body.role-master .bottom-nav [data-admin-only],
body.role-admin .bottom-nav [data-admin-only],
body.role-gerenciador .bottom-nav [data-admin-only] {
  display: flex;
}

/* Mobile menu button - hidden on desktop */
.mobile-menu-btn {
  display: none;
}

.sidebar-overlay {
  display: none;
}

/* BOTTOM NAV (mobile) */
.bottom-nav {
  display: none;
}

/* MAIN CONTENT */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  padding-bottom: 40px;
  transition: margin-left 0.25s ease;
}

.sidebar-is-collapsed .main-content {
  margin-left: var(--sidebar-collapsed-width);
}

/* TOP BAR */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  height: var(--topbar-height);
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-bar h2 {
  font-size: 18px;
  font-weight: 600;
}

.user-display {
  color: var(--text-secondary);
  font-size: 24px;
}

/* ============================================
   TABS
   ============================================ */
.tab-content {
  display: none;
  padding: 24px 28px;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

/* ============================================
   CARD SYSTEM
   ============================================ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(0, 0, 0, 0.15);
}

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

.card-header h4 {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Card Grid */
.card-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

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

/* ============================================
   STATUS CARDS
   ============================================ */
.status-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.status-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.status-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(45, 106, 79, 0.15);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.status-icon.accent {
  background: rgba(244, 162, 97, 0.15);
  color: var(--accent);
}

.status-icon.success {
  background: rgba(82, 183, 136, 0.15);
  color: var(--success);
}

.status-icon.warning {
  background: rgba(244, 162, 97, 0.15);
  color: var(--warning);
}

.status-info {
  display: flex;
  flex-direction: column;
}

.status-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.status-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ============================================
   KPI CARDS
   ============================================ */
.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: var(--transition);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.kpi-label {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}

.kpi-card-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.kpi-change {
  font-size: 13px;
  font-weight: 500;
}

.kpi-change.positive {
  color: var(--success);
}

.kpi-change.negative {
  color: var(--danger);
}

/* ============================================
   HEALTH SEMAPHORE
   ============================================ */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title h3 {
  font-size: 16px;
  font-weight: 600;
}

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

.semaphore-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-muted);
}

.semaphore-dot.green {
  background: var(--success);
  box-shadow: 0 0 8px rgba(82, 183, 136, 0.5);
}

.semaphore-dot.yellow {
  background: var(--warning);
  box-shadow: 0 0 8px rgba(244, 162, 97, 0.5);
}

.semaphore-dot.red {
  background: var(--danger);
  box-shadow: 0 0 8px rgba(230, 57, 70, 0.5);
}

.semaphore-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ============================================
   SEASONALITY BANNER
   ============================================ */
.seasonality-banner {
  background: linear-gradient(135deg, rgba(244, 162, 97, 0.15), rgba(231, 111, 81, 0.15));
  border: 1px solid rgba(244, 162, 97, 0.3);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--accent);
}

.seasonality-banner i {
  font-size: 20px;
}

/* ============================================
   TABLES
   ============================================ */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.data-table th {
  text-align: left;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

.data-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-success {
  background: rgba(82, 183, 136, 0.15);
  color: var(--success);
}

.badge-warning {
  background: rgba(244, 162, 97, 0.15);
  color: var(--warning);
}

.badge-danger {
  background: rgba(230, 57, 70, 0.15);
  color: var(--danger);
}

.badge-primary {
  background: rgba(45, 106, 79, 0.15);
  color: var(--primary-light);
}

.badge-accent {
  background: rgba(244, 162, 97, 0.15);
  color: var(--accent);
}

.badge-info {
  background: rgba(72, 149, 239, 0.15);
  color: var(--info);
}

/* ============================================
   MODALS
   ============================================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: modalIn 0.2s ease;
}

.modal-sm {
  max-width: 420px;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

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

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

/* ============================================
   TOOLBAR
   ============================================ */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-bar .form-select {
  width: auto;
  min-width: 160px;
}

.period-selector {
  display: flex;
  gap: 6px;
}

.period-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
}

.period-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

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

/* ============================================
   PROPOSALS
   ============================================ */
/* Budget Bar */
.budget-bar-content {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.budget-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.budget-month-label {
  font-weight: 700;
  font-size: 16px;
  min-width: 90px;
  text-align: center;
}

.budget-amounts {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.budget-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.budget-item label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.budget-value {
  font-size: 15px;
  font-weight: 600;
}

.budget-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.budget-input-wrap input {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 14px;
  background: var(--dark-bg);
  color: var(--text-primary);
}

.budget-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 120px;
}

.budget-progress-bar {
  flex: 1;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.budget-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s, background 0.4s;
  background: var(--primary);
}

.budget-progress-pct {
  font-size: 13px;
  font-weight: 600;
  min-width: 35px;
  text-align: right;
}

/* Proposals Grid */
.proposals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

/* Proposal Card V2 */
.proposal-card-v2 {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
  border-left: 4px solid var(--border);
}

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

.proposal-card-v2.status-pending { border-left-color: #ffc107; }
.proposal-card-v2.status-approved { border-left-color: var(--primary); }
.proposal-card-v2.status-rejected { border-left-color: var(--danger); }

.proposal-v2-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.proposal-v2-platform {
  font-size: 22px;
}

.proposal-v2-title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.proposal-v2-title strong {
  font-size: 15px;
}

.proposal-v2-region {
  background: #e9ecef;
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}

.proposal-v2-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
}

.proposal-v2-status.status-pending { background: #fff3cd; color: #856404; }
.proposal-v2-status.status-approved { background: #d4edda; color: #155724; }
.proposal-v2-status.status-rejected { background: #f8d7da; color: #721c24; }

.proposal-v2-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.proposal-v2-preview-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 18px;
}

.proposal-v2-preview-info {
  flex: 1;
}

.proposal-v2-preview-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: capitalize;
}

.proposal-v2-preview-date {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.proposal-v2-reasoning {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: rgba(45, 106, 79, 0.04);
  border-radius: var(--radius-sm);
}

.proposal-v2-reasoning i {
  color: var(--primary);
  margin-right: 4px;
}

.proposal-v2-budget {
  margin-bottom: 12px;
}

.proposal-v2-budget-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.proposal-v2-budget-row label {
  font-size: 13px;
  color: var(--text-secondary);
}

.proposal-v2-budget-row label i {
  margin-right: 4px;
  width: 16px;
  text-align: center;
}

.proposal-v2-suggested {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

.proposal-v2-budget-input {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.proposal-v2-budget-input input {
  width: 100px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.proposal-v2-rejection {
  font-size: 12px;
  color: #721c24;
  background: #f8d7da;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.proposal-v2-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Creative Approval Cards */
/* Approval columns layout */
.ca-columns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 1100px) { .ca-columns { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .ca-columns { grid-template-columns: 1fr; } }

.ca-column { min-width: 0; }
.ca-col-header {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; padding: 8px 10px;
  border-bottom: 3px solid; border-radius: 8px 8px 0 0;
  background: #f8fafc;
}
.ca-col-badge {
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 1px 7px; border-radius: 10px; margin-left: auto;
}
.ca-col-body {
  display: flex; flex-direction: column; gap: 8px;
  padding: 8px 0; max-height: 520px; overflow-y: auto;
}
.ca-col-body::-webkit-scrollbar { width: 3px; }
.ca-col-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.ca-col-empty { text-align: center; padding: 20px 8px; color: #94a3b8; font-size: 12px; }

/* Compact card */
.ca-mini {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 10px; transition: box-shadow .15s;
}
.ca-mini:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }

.ca-mini-top { display: flex; gap: 8px; }
.ca-mini-img {
  width: 56px; height: 56px; border-radius: 6px; overflow: hidden;
  flex-shrink: 0; background: #f1f5f9;
}
.ca-mini-img img { width: 100%; height: 100%; object-fit: cover; }
.ca-mini-info { flex: 1; min-width: 0; }
.ca-mini-title {
  font-size: 12px; font-weight: 600; color: #1e293b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ca-mini-meta { font-size: 10px; color: #94a3b8; margin-top: 2px; }
.ca-mini-meta i { margin-right: 3px; }

.ca-mini-edit { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.ca-mini-copy {
  font-size: 11px; color: #64748b; margin-top: 6px;
  line-height: 1.3; padding: 4px 0;
}
.ca-mini-reject {
  font-size: 10px; color: #991b1b; background: #fef2f2;
  padding: 4px 8px; border-radius: 4px; margin-top: 6px;
}

.ca-mini-actions {
  display: flex; gap: 4px; justify-content: flex-end; margin-top: 8px;
}
.ca-btn {
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  border: none; border-radius: 6px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  transition: opacity .15s;
}
.ca-btn:hover { opacity: .85; }
.ca-btn-success { background: #22C55E; color: #fff; }
.ca-btn-danger { background: #EF4444; color: #fff; }
.ca-btn-warn { background: #F59E0B; color: #fff; }
.ca-btn-muted { background: #64748B; color: #fff; }

/* Legacy compat — keep for published ads list */
.ca-info { display: flex; gap: 12px; font-size: 11px; color: var(--text-secondary); margin-bottom: 8px; flex-wrap: wrap; }
.ca-info i { margin-right: 3px; }

/* Account budget grid */
.account-budget-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.account-budget-item { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; background: #f8f9fa; border-radius: var(--radius-xs); }
.account-budget-name { font-weight: 600; }
.account-budget-val { color: var(--primary); font-weight: 700; }
.account-budget-info { color: var(--text-secondary); font-size: 11px; }

.platform-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 14px;
  background: #f8f9fa;
  border-radius: var(--radius-sm);
  min-width: 100px;
}
.platform-stat label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}
.platform-stat span {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.platform-insight {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.campaign-filter-btn {
  font-size: 11px !important;
  padding: 3px 10px !important;
  border: 1px solid var(--border) !important;
  background: #fff !important;
  color: var(--text-secondary) !important;
  cursor: pointer;
  transition: var(--transition);
}
.campaign-filter-btn:hover { border-color: var(--primary-light) !important; }
.campaign-filter-btn.active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}

.campaign-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 12px;
  transition: var(--transition);
}
.campaign-row:hover {
  background: #f0f7ff;
}
.campaign-row-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.campaign-row-obj {
  color: var(--text-secondary);
  font-size: 11px;
  min-width: 80px;
  text-align: center;
}
.campaign-row-budget {
  font-weight: 600;
  min-width: 90px;
  text-align: right;
  white-space: nowrap;
}

.platform-detail-btn {
  border: none;
  border-radius: var(--radius-xs);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.platform-detail-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ============================================
   DRAG & DROP UPLOAD
   ============================================ */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary-light);
  background: rgba(45, 106, 79, 0.05);
  color: var(--primary-light);
}

.drop-zone-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}

.file-preview {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  justify-content: center;
}

.file-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
}

.file-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-preview-item .remove-file {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   VARIATIONS
   ============================================ */
.variation-card {
  cursor: pointer;
  transition: var(--transition);
}

.variation-card:hover {
  transform: translateY(-4px);
}

.variation-card.selected {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(64, 145, 108, 0.3);
}

.variation-headline {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent);
}

.variation-body {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.variation-cta {
  display: inline-block;
  padding: 6px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
}

/* ============================================
   PREVIEW MOCKUPS
   ============================================ */
.preview-grid {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.preview-mockup {
  text-align: center;
}

.preview-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preview-frame {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.feed-frame {
  width: 300px;
}

.stories-frame {
  width: 180px;
}

.preview-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
}

.stories-frame .preview-image {
  height: 280px;
}

.preview-text {
  padding: 12px;
  color: #333;
  font-size: 13px;
  text-align: left;
  line-height: 1.4;
}

/* ============================================
   MEDIA LIBRARY
   ============================================ */
.media-gallery {
  min-height: 60px;
}

/* 4-card grouped gallery */
.mg-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.mg-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.mg-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.mg-card-empty { opacity: .6; }
.mg-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.mg-card-badge {
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}
.mg-card-scroll {
  display: flex;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.mg-card-scroll::-webkit-scrollbar { height: 4px; }
.mg-card-scroll::-webkit-scrollbar-track { background: transparent; }
.mg-card-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.mg-card-scroll .media-gallery-item {
  flex: 0 0 110px;
  width: 110px;
  height: 110px;
  scroll-snap-align: start;
  aspect-ratio: auto;
}
.mg-card-empty-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 80px;
  gap: 4px;
}

@media (max-width: 768px) {
  .mg-cards-grid { grid-template-columns: 1fr; }
}

/* Rate Plan Form — matching plano_tarifas_tela.html */
.rp-card { background:#fff; border:1px solid #d3d1c7; border-radius:12px; overflow:hidden; margin-bottom:12px; }
.rp-card-hd { display:flex; align-items:center; justify-content:space-between; padding:12px 18px; background:#f8f7f4; border-bottom:1px solid #d3d1c7; cursor:pointer; }
.rp-card-hd:hover { background:#f1efe8; }
.rp-card-bd { padding:16px 18px; }
.rp-num { font-size:11px; font-weight:600; padding:2px 8px; border-radius:20px; }
.rp-title { font-size:14px; font-weight:600; color:#1a1a1a; }
.rp-sub { font-size:11px; color:#888; margin-top:1px; }
.rp-section-label { font-size:12px; font-weight:600; color:#5f5e5a; margin-bottom:8px; }
.rp-fl { display:flex; flex-direction:column; gap:3px; }
.rp-fl label { font-size:11px; font-weight:600; color:#5f5e5a; }
.rp-fl input, .rp-fl select, .rp-fl textarea { font-size:13px; border:1px solid #b4b2a9; border-radius:8px; padding:7px 10px; background:#fff; color:#1a1a1a; width:100%; font-family:inherit; }
.rp-hint { font-size:11px; color:#888; line-height:1.4; }
.rp-divider { height:1px; background:#d3d1c7; margin:14px 0; }
.rp-chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
.rp-chip { font-size:12px; padding:4px 12px; border-radius:20px; border:1px solid #b4b2a9; color:#5f5e5a; background:#fff; transition:all .15s; user-select:none; }
.rp-chip.on { background:#E6F1FB; color:#185FA5; border-color:#85B7EB; font-weight:600; }
.rp-chip:hover { background:#f1f5f9; }
.rp-example { padding:8px 12px; background:#f8f7f4; border-left:3px solid #378ADD; border-radius:0 8px 8px 0; margin-top:8px; }
.rp-ex-label { font-size:10px; font-weight:600; color:#185FA5; text-transform:uppercase; letter-spacing:.05em; margin-bottom:3px; }
.rp-ex-text { font-size:12px; color:#5f5e5a; line-height:1.5; }
.rp-preview { padding:10px 14px; background:#f8f7f4; border-radius:8px; border:1px solid #d3d1c7; }
.rp-preview-label { font-size:11px; font-weight:600; color:#5f5e5a; margin-bottom:6px; }
.rp-tgl-row { display:flex; align-items:center; justify-content:space-between; padding:10px 0; border-bottom:1px solid #e2e8f0; }
.rp-tgl-row:last-child { border-bottom:none; }
.rp-tgl-name { font-size:13px; font-weight:500; color:#1a1a1a; }
.rp-tgl-sub { font-size:11px; color:#888; margin-top:2px; }
.rp-tgl { width:32px; height:18px; border-radius:9px; background:#b4b2a9; position:relative; cursor:pointer; flex-shrink:0; }
.rp-tgl.on { background:#378ADD; }
.rp-tgl::after { content:''; position:absolute; width:12px; height:12px; border-radius:50%; background:#fff; top:3px; left:3px; transition:left .15s; }
.rp-tgl.on::after { left:17px; }
.rp-tbl { width:100%; border-collapse:collapse; margin-bottom:10px; }
.rp-tbl th { font-size:10px; font-weight:600; color:#888; text-transform:uppercase; letter-spacing:.05em; padding:7px 10px; border-bottom:1px solid #d3d1c7; background:#f8f7f4; text-align:left; }
.rp-tbl td { padding:7px 10px; border-bottom:1px solid #e2e8f0; font-size:13px; color:#1a1a1a; }
.rp-tbl tr:last-child td { border-bottom:none; }
.rp-pax-col { background:#f8f7f4; border-radius:8px; padding:12px; }
.rp-pax-hd { font-size:12px; font-weight:600; color:#1a1a1a; margin-bottom:2px; }
.rp-pax-sub { font-size:11px; color:#888; margin-bottom:8px; }
.rp-pax-row { display:flex; align-items:center; justify-content:space-between; font-size:12px; padding:4px 0; }
.rp-pax-row span { color:#5f5e5a; }
.rp-pax-row input, .rp-pax-row select { width:80px; font-size:12px; text-align:center; border:1px solid #b4b2a9; border-radius:6px; padding:4px 6px; font-family:inherit; }
.rp-season-header { display:grid; grid-template-columns:16px 1.4fr 110px 110px 100px 70px 70px 24px; gap:8px; padding:0 12px 6px; }
.rp-season-header > div { font-size:10px; font-weight:600; color:#888; text-transform:uppercase; letter-spacing:.05em; }
.rp-season-card { background:#f8f7f4; border:1px solid #d3d1c7; border-radius:8px; padding:10px 12px; margin-bottom:8px; }
.rp-season-row1 { display:grid; grid-template-columns:16px 1.4fr 110px 110px 100px 70px 70px 24px; gap:8px; align-items:center; }
.rp-season-row2 { display:grid; grid-template-columns:16px 1fr; gap:8px; margin-top:8px; }
.rp-season-card input, .rp-season-card select { font-size:12px; border:1px solid #b4b2a9; border-radius:6px; padding:4px 8px; background:#fff; font-family:inherit; width:100%; color:#1a1a1a; }

/* Rate Plan + Config mobile */
@media (max-width: 768px) {
  .rp-card-hd { padding:10px 12px; }
  .rp-card-bd { padding:10px 12px; }
  .rp-title { font-size:13px; }
  .rp-card-bd > div[style*="grid-template-columns: 1fr 1fr 1fr"] { grid-template-columns:1fr !important; }
  .rp-card-bd > div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns:1fr !important; }
  /* Pricing table: scroll horizontal */
  .rp-tbl { font-size:10px; display:block; overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .rp-tbl thead, .rp-tbl tbody, .rp-tbl tr { display:table; width:100%; table-layout:fixed; }
  .rp-tbl th, .rp-tbl td { padding:4px 3px; font-size:10px; }
  .rp-tbl input { width:50px !important; font-size:10px !important; padding:3px 2px !important; }
  .rp-tbl input.rp-money { width:55px !important; }
  /* Pax columns: stack */
  .rp-pax-col { padding:8px; margin-bottom:8px; }
  .rp-pax-hd { font-size:11px; }
  .rp-pax-row { font-size:10px; flex-wrap:wrap; gap:4px; }
  .rp-pax-row input, .rp-pax-row select { width:50px !important; font-size:11px !important; }
  /* Pax grid (adults/children steppers) */
  .rp-card-bd div[style*="grid-template-columns:auto 1fr auto"] { grid-template-columns:1fr !important; gap:6px !important; }
  .rp-card-bd div[style*="grid-template-columns:auto 1fr auto"] > span:first-child { font-size:12px !important; }
  /* Season cards */
  .rp-season-card { padding:8px 10px; }
  .rp-season-card > div { grid-template-columns:1fr !important; gap:6px !important; }
  .rp-season-card > div > div[style*="grid-template-columns:16px"] { grid-template-columns:1fr !important; }
  .rp-season-card input[type="date"] { width:100% !important; }
  .rp-season-card input[type="number"] { width:50px !important; }
  .rp-season-card .rp-sn { font-size:12px !important; }
  /* Chips */
  .rp-chips { gap:3px; }
  .rp-chip { font-size:10px; padding:3px 7px; }
  /* Day definition boxes */
  .rp-card-bd > div[style*="display:flex;gap:16px"] { flex-direction:column !important; gap:8px !important; }
  /* Config popup */
  #bk-cfgbox { width:96vw !important; max-height:94vh !important; top:48% !important; }
  #bk-cfgbox .rp-card-bd > div[style*="grid-template-columns"] { grid-template-columns:1fr !important; }
  #bk-cfgbox-body { padding:10px 12px !important; }
  /* Test rules */
  #rp-test-result table { font-size:9px !important; }
  #rp-test-result table td { padding:2px 4px !important; }
  /* Calendar availability mobile */
  .cal-year-nav { flex-wrap:wrap; gap:8px !important; }
  .cal-month-grid { grid-template-columns:repeat(4, 1fr) !important; }
}

/* Calendar Month Availability — inside rate_plans tab */
.cal-section { background:#fff; border:1px solid #d3d1c7; border-radius:12px; padding:16px 18px; margin-bottom:16px; }
.cal-year-nav { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.cal-year-nav .cal-arrow { width:30px; height:30px; border-radius:8px; border:1px solid #b4b2a9; background:#fff; color:#5f5e5a; font-size:14px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all .15s; }
.cal-year-nav .cal-arrow:hover:not(:disabled) { background:#f1f5f9; border-color:#378ADD; color:#378ADD; }
.cal-year-nav .cal-arrow:disabled { opacity:.35; cursor:not-allowed; }
.cal-year-label { font-size:18px; font-weight:700; color:#1a1a1a; min-width:50px; text-align:center; }
.cal-add-year { width:30px; height:30px; border-radius:8px; border:1px dashed #b4b2a9; background:#fff; color:#5f5e5a; font-size:16px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all .15s; }
.cal-add-year:hover { background:#E6F1FB; border-color:#378ADD; color:#378ADD; }
.cal-month-grid { display:grid; grid-template-columns:repeat(6, 1fr); gap:8px; margin-bottom:12px; }
.cal-month-chip { padding:8px 4px; border-radius:10px; border:1.5px solid #d3d1c7; background:#f8f7f4; color:#94a3b8; font-size:13px; font-weight:500; text-align:center; cursor:pointer; transition:all .15s; user-select:none; position:relative; }
.cal-month-chip.open { background:#E6F1FB; color:#185FA5; border-color:#85B7EB; font-weight:600; }
.cal-month-chip.open::before { content:'✓ '; font-size:11px; }
.cal-month-chip.past { opacity:.5; cursor:default; }
.cal-month-chip:not(.past):hover { border-color:#378ADD; }
.cal-summary { display:flex; align-items:center; justify-content:space-between; font-size:12px; color:#888; }
.cal-summary .cal-counts span { font-weight:600; }

.media-gallery-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  color: var(--text-secondary);
}

.media-gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  background: #f8f9fa;
}

.media-gallery-item:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.media-gallery-item.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.25);
}

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

.media-thumb-video {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #fff;
  font-size: 28px;
}

.media-checkbox {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 18px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  pointer-events: none;
}

.media-gallery-item.selected .media-checkbox {
  color: var(--primary);
}

.media-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 3px;
  font-weight: 600;
}

.media-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.media-delete-btn:hover {
  background: var(--danger);
  transform: scale(1.1);
}

.media-download-btn {
  position: absolute;
  top: 4px;
  left: 28px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  text-decoration: none;
}

.media-download-btn:hover {
  background: var(--primary);
  transform: scale(1.1);
}

/* Fix button on invalid media */
.media-fix-btn {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  background: #e67e22;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 10px;
  cursor: pointer;
  z-index: 2;
  transition: var(--transition);
  white-space: nowrap;
}

.media-fix-btn:hover {
  background: #d35400;
  transform: translateX(-50%) scale(1.05);
}

/* Variation generation progress */
.variation-progress {
  padding: 12px 16px;
  background: #e8f4fd;
  border: 1px solid #b3d7f0;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.variation-progress p {
  font-size: 13px;
  color: #1a5276;
  margin: 8px 0 0 0;
  line-height: 1.5;
}

.variation-progress-bar {
  height: 4px;
  background: #b3d7f0;
  border-radius: 2px;
  overflow: hidden;
}

.variation-progress-fill {
  height: 100%;
  background: #2980b9;
  border-radius: 2px;
  animation: progressPulse 2s ease-in-out infinite;
  width: 40%;
}

@keyframes progressPulse {
  0% { width: 10%; margin-left: 0; }
  50% { width: 40%; margin-left: 30%; }
  100% { width: 10%; margin-left: 90%; }
}

.media-filter-bar {
  display: flex;
  gap: 4px;
}

.media-filter-btn {
  padding: 4px 12px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-xs);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
}

.media-filter-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.media-filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.upload-progress {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Gallery as drop zone */
.media-gallery-dropzone {
  min-height: 100px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.media-gallery-dropzone.drag-over {
  border-color: var(--primary-light);
  background: rgba(45, 106, 79, 0.05);
}

/* Submit approval button */
.btn-submit-approval {
  background: #e67e22;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius-xs);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}

.btn-submit-approval:hover {
  background: #d35400;
}

/* ============================================
   PLACEMENT OPTIONS
   ============================================ */
.placement-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.placement-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  min-width: 160px;
}

.placement-card:hover {
  border-color: var(--primary-light);
  background: rgba(45, 106, 79, 0.03);
}

.placement-card.selected {
  border-color: var(--primary);
  background: rgba(45, 106, 79, 0.06);
  box-shadow: 0 0 0 2px rgba(45, 106, 79, 0.15);
}

.placement-card.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  border-style: dashed;
}

.placement-card i {
  font-size: 20px;
  color: var(--primary);
  width: 24px;
  text-align: center;
}

.placement-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.placement-card-info strong {
  font-size: 14px;
  color: var(--text-primary);
}

.format-dims {
  font-size: 11px;
  color: var(--text-secondary);
}

.format-specs {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(45, 106, 79, 0.05);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
}

.format-specs i {
  color: var(--primary);
  margin-right: 6px;
}

.dimension-warning {
  margin-top: 10px;
  padding: 10px 14px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #856404;
  line-height: 1.5;
}

.dimension-warning i {
  color: #e0a800;
  margin-right: 6px;
}

/* ============================================
   COMPOSITION PREVIEW
   ============================================ */
.composition-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.composition-tag {
  background: var(--primary);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
}

.composition-media-name {
  font-size: 13px;
  color: var(--text-secondary);
}

.composition-media-name i {
  margin-right: 4px;
  color: var(--primary-light);
}

/* Variations gallery */
.variations-gallery {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.var-thumb {
  width: 120px;
  cursor: pointer;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.var-thumb:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.var-thumb.var-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.25);
}

.var-thumb img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  display: block;
}

.var-thumb-original img {
  aspect-ratio: auto;
}

.var-label {
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  background: #f8f9fa;
  color: var(--text-secondary);
}

.var-active .var-label {
  background: var(--primary);
  color: #fff;
}

.copy-edit-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid var(--primary);
}

.copy-edit-section h4 {
  color: var(--primary);
}

.copy-edit-section .form-input,
.copy-edit-section .form-textarea {
  font-size: 14px;
}

.char-counter {
  float: right;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.field-help {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  line-height: 1.4;
  font-style: italic;
}

/* Date inputs — full area clickable */
/* Creative form compact layout */
.creative-form-compact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.creative-form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

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

.creative-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.creative-field .form-select,
.creative-field .form-input,
.creative-field .form-textarea {
  font-size: 13px;
  padding: 5px 8px;
}

.creative-field .form-select {
  min-width: 120px;
}

.creative-date-input {
  width: 120px;
  cursor: pointer;
}

input[type="date"] {
  cursor: pointer;
  font-size: 13px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  padding: 2px;
  opacity: 0.6;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .creative-form-row {
    flex-direction: column;
    gap: 8px;
  }
  .creative-field {
    width: 100%;
  }
  .creative-date-input {
    width: 100%;
  }
}

/* Preview + Checklist side by side */
.preview-with-checklist {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.preview-column {
  flex: 1;
  min-width: 200px;
}

.checklist-column {
  min-width: 260px;
  max-width: 320px;
}

/* Checklist */
.checklist-section {
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.checklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.checklist-header h4 {
  font-size: 14px;
  margin: 0;
}

.checklist-score {
  font-size: 13px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-xs);
}

.checklist-score.score-ok {
  background: #d4edda;
  color: #155724;
}

.checklist-score.score-warn {
  background: #fff3cd;
  color: #856404;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 4px 0;
}

.checklist-item i {
  font-size: 14px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.checklist-item.check-ok i { color: var(--primary); }
.checklist-item.check-fail i { color: var(--danger); }

.checklist-label {
  font-weight: 600;
  white-space: nowrap;
}

.checklist-detail {
  color: var(--text-secondary);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checklist-ready {
  margin-top: 12px;
  padding: 8px 12px;
  background: #d4edda;
  color: #155724;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.checklist-ready i {
  margin-right: 6px;
}

.preview-editable .editable-field {
  margin-bottom: 6px;
}

.preview-editable .editable-field label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.preview-editable .editable-field input,
.preview-editable .editable-field textarea {
  width: 100%;
  padding: 4px 6px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
}

/* Market checkboxes */
.market-checks {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.check-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.check-pill:has(input:checked) {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.check-pill input {
  display: none;
}

/* Top Cities */
.top-cities-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.top-cities-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.top-cities-label i {
  color: var(--primary);
  margin-right: 3px;
}

.top-cities-state {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.top-cities-state-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  min-width: 22px;
}

.city-pill {
  font-size: 11px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  white-space: nowrap;
}

.city-pill:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.city-pill.city-selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.city-pill small {
  opacity: 0.7;
  font-size: 10px;
}

/* Media format tags */
.media-format-tags {
  position: absolute;
  bottom: 4px;
  left: 4px;
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  max-width: calc(100% - 8px);
}

.media-format-tag {
  font-size: 8px;
  padding: 1px 4px;
  border-radius: 2px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.3;
}

.media-format-tag.tag-feed { background: #2196F3; color: #fff; }
.media-format-tag.tag-story { background: #E91E63; color: #fff; }
.media-format-tag.tag-reels { background: #FF5722; color: #fff; }
.media-format-tag.tag-google { background: #4285F4; color: #fff; }
.media-format-tag.tag-invalid { background: #dc3545; color: #fff; font-size: 9px; }

.media-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--text-secondary);
}

.media-legend .media-format-tag {
  margin-right: 1px;
}

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

.suggestion-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}

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

.suggestion-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.suggestion-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.suggestion-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.suggestion-impact {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.impact-bar {
  flex: 1;
  height: 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.impact-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--success);
  transition: width 0.5s ease;
}

.impact-label {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 40px;
  text-align: right;
}

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

/* ============================================
   LOADING / SPINNER
   ============================================ */
.loading-state {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

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

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 380px;
}

.toast.success {
  background: var(--primary-dark);
  border: 1px solid var(--success);
  color: var(--success);
}

.toast.error {
  background: rgba(230, 57, 70, 0.15);
  border: 1px solid var(--danger);
  color: var(--danger);
}

.toast.info {
  background: rgba(72, 149, 239, 0.15);
  border: 1px solid var(--info);
  color: var(--info);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================
   PROJECTION SECTION
   ============================================ */
.projection-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.projection-item {
  text-align: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-sm);
}

.projection-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.projection-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.list-placeholder { color: var(--text-muted); font-size: 14px; padding: 20px; text-align: center; }

/* Campaign list items */
.campaign-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.campaign-item:last-child {
  border-bottom: none;
}

.campaign-item-name {
  font-weight: 500;
  font-size: 14px;
}

.campaign-item-value {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}

/* Reservation list items */
.reservation-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.reservation-item:last-child {
  border-bottom: none;
}

.reservation-item-guest {
  font-weight: 500;
  font-size: 14px;
}

.reservation-item-dates {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.15);
}

/* ============================================
   BOOKINGS EXTRA — Lista, Resumo, Orçamentos,
   FNRH, Café, Atividades
   ============================================ */

/* Breadcrumb */
.bke-breadcrumb {
  font-size: 12px;
  text-transform: uppercase;
  color: #8c8ca1;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

/* Header */
.bke-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.bke-header h3 {
  font-size: 18px;
  color: #1a1a2e;
  margin: 0;
}
.bke-header-actions {
  display: flex;
  gap: 8px;
}

/* Buttons */
.bke-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid #CBD5E0;
  border-radius: 6px;
  background: white;
  color: #4A5568;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.bke-btn:hover { background: #F7FAFC; }
.bke-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 12px;
}
.bke-btn-icon:hover { background: #F7FAFC; border-color: #CBD5E0; }
.bke-btn-primary {
  background: #00B5B8;
  color: white;
  border-color: #00B5B8;
}
.bke-btn-primary:hover { background: #009FA2; }
.bke-btn-danger {
  background: #e63946;
  color: white;
  border-color: #e63946;
}
.bke-btn-danger:hover { background: #c5303c; }
.bke-btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.bke-btn-sm.bke-btn-primary { background: #00B5B8; }
.bke-btn-sm.bke-btn-danger { background: #e63946; }

/* Search Bar */
.bke-search-bar {
  margin-bottom: 16px;
}
.bke-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F7FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 10px 14px;
  max-width: 500px;
}
.bke-search-input-wrap i { color: #A0AEC0; }
.bke-search-input-wrap input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  flex: 1;
  color: #2D3748;
}

/* Status Tabs */
.bke-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.bke-status-tab {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  border: 1px solid #E2E8F0;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  color: #4A5568;
}
.bke-status-tab:hover {
  background: #F7FAFC;
}
.bke-status-tab.active {
  background: var(--tab-bg, #00B5B8);
  color: var(--tab-text, white);
  border-color: var(--tab-color, #00B5B8);
  font-weight: 500;
}

/* Table */
.bke-table-wrap {
  overflow-x: auto;
}
.bke-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.bke-table thead th {
  background: #00B5B8;
  color: white;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  text-align: left;
  white-space: nowrap;
}
.bke-table tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid #EDF2F7;
  color: #2D3748;
}
.bke-table tbody tr:hover { background: #F7FAFC; }
.bke-table-sm { font-size: 13px; }
.bke-table-sm th { padding: 8px 12px; }
.bke-table-sm td { padding: 8px 12px; }

.bke-sortable {
  cursor: pointer;
  user-select: none;
}
.bke-sortable:hover { background: #009FA2; }

/* Row clickable */
.bke-row-clickable { cursor: pointer; }

/* Dot indicator */
.bke-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* Link */
.bke-link {
  color: #00B5B8;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}
.bke-link:hover { text-decoration: underline; }

/* Room badge */
.bke-room-badge {
  padding-left: 8px;
  font-size: 13px;
}

/* Badge */
.bke-badge {
  display: inline-block;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

/* Pagination */
.bke-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.bke-pag-info {
  font-size: 13px;
  color: #8c8ca1;
}
.bke-pag-buttons {
  display: flex;
  gap: 4px;
  align-items: center;
}
.bke-pag-btn {
  padding: 6px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  background: white;
  color: #4A5568;
  font-size: 13px;
  cursor: pointer;
}
.bke-pag-btn:hover { background: #F7FAFC; }
.bke-pag-btn.active {
  background: #00B5B8;
  color: white;
  border-color: #00B5B8;
}

/* Empty / Loading */
.bke-empty {
  text-align: center;
  padding: 40px 20px;
  color: #8c8ca1;
  font-size: 15px;
}
.bke-empty i { margin-right: 8px; }
.bke-error { color: #e63946; }
.bke-loading {
  text-align: center;
  padding: 40px;
  color: #8c8ca1;
}
.bke-loading .spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #E2E8F0;
  border-top-color: #00B5B8;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
.bke-empty-small {
  color: #A0AEC0;
  font-size: 13px;
  padding: 12px;
}

/* Daily Summary */
.bke-daily-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.bke-daily-title h3 {
  margin: 0;
  font-size: 18px;
  color: #1a1a2e;
}
.bke-daily-date-badge {
  background: #e6930a;
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}
.bke-daily-sections {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bke-daily-section {
  background: white;
  border: 1px solid #EDF2F7;
  border-radius: 8px;
  overflow: hidden;
}
.bke-daily-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  transition: background 0.2s;
}
.bke-daily-section-header:hover { background: #F7FAFC; }
.bke-daily-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  flex-shrink: 0;
}
.bke-daily-label {
  color: #00B5B8;
  font-size: 15px;
  font-weight: 500;
  flex: 1;
}
.bke-daily-chevron {
  color: #A0AEC0;
  font-size: 12px;
  transition: transform 0.2s;
}
.bke-daily-section-body {
  padding: 0 18px 14px;
}

/* Estimates form */
.bke-estimate-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.bke-estimate-form-col { flex: 3; }
.bke-estimate-sim-col { flex: 1; min-width: 220px; }
.bke-card {
  background: white;
  border: 1px solid #EDF2F7;
  border-radius: 8px;
  padding: 20px 24px;
}
.bke-card h4 {
  margin: 0 0 16px;
  color: #1a1a2e;
  font-size: 16px;
}
.bke-sim-card {
  position: sticky;
  top: 80px;
}
.bke-sim-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: #4A5568;
}
.bke-sim-total-label {
  text-align: center;
  color: #8c8ca1;
  font-size: 12px;
  text-transform: uppercase;
  margin-top: 8px;
}
.bke-sim-total {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #e63946;
  padding: 8px 0 4px;
}

/* Form elements */
.bke-form-group {
  margin-bottom: 14px;
  flex: 1;
}
.bke-form-group label {
  display: block;
  font-size: 13px;
  color: #4A5568;
  margin-bottom: 4px;
  font-weight: 500;
}
.bke-input {
  width: 100%;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  background: #F7FAFC;
  box-sizing: border-box;
}
.bke-input:focus {
  border-color: #00B5B8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(61,90,128,0.15);
}
.bke-form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.bke-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* FNRH sections */
.bke-fnrh-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #EDF2F7;
}
.bke-fnrh-section h5 {
  font-size: 14px;
  color: #00B5B8;
  margin: 0 0 12px;
  font-weight: 600;
}
.bke-subtitle {
  color: #8c8ca1;
  font-size: 14px;
  margin-bottom: 16px;
}

/* Checkbox group */
.bke-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.bke-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #4A5568;
  cursor: pointer;
}
.bke-checkbox input { cursor: pointer; }

/* Coffee metrics */
.bke-coffee-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.bke-metric-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bke-metric-number {
  font-size: 28px;
  font-weight: 600;
  color: #2D3748;
}
.bke-metric-label {
  font-size: 13px;
  color: #718096;
  margin-top: 4px;
}
.bke-metric-icon {
  font-size: 32px;
  opacity: 0.6;
}

/* Activities */
.bke-activity-list {
  display: flex;
  flex-direction: column;
}
.bke-activity-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #EDF2F7;
}
.bke-activity-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #E2E8F0;
  color: #4A5568;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}
.bke-activity-content { flex: 1; }
.bke-activity-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.bke-activity-header strong {
  font-size: 14px;
  color: #2D3748;
}
.bke-activity-date {
  font-size: 12px;
  color: #A0AEC0;
}
.bke-activity-body {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.bke-activity-arrow {
  color: #CBD5E0;
  font-size: 12px;
}
.bke-activity-desc {
  font-size: 13px;
  color: #4A5568;
}

/* Responsive */
@media (max-width: 768px) {
  .bke-coffee-metrics { grid-template-columns: repeat(2, 1fr); }
  .bke-estimate-layout { flex-direction: column; }
  .bke-estimate-sim-col { min-width: auto; }
  .bke-form-row { flex-direction: column; }
  .bke-status-tabs { gap: 4px; }
  .bke-status-tab { font-size: 11px; padding: 4px 10px; }
}

/* ============================================
   GLOBAL FLOATING BOX — form inputs
   ============================================ */
[id$="-box"] input,
[id$="-box"] select,
[id$="-box"] textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: #1E293B;
  box-sizing: border-box;
}
[id$="-box"] input:focus,
[id$="-box"] select:focus,
[id$="-box"] textarea:focus {
  outline: none;
  border-color: #00B5B8;
  box-shadow: 0 0 0 3px rgba(0,181,184,.15);
}
[id$="-box"] label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 3px;
}
[id$="-box"] textarea {
  min-height: 36px;
  resize: vertical;
}

/* ============================================
   UTILITY CLASSES — Scroll, Skeleton, Empty
   ============================================ */

/* Scroll wrapper for tables and wide content */
.scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
  min-height: 20px;
}
.skeleton-card {
  height: 100px;
  border-radius: var(--radius);
}
.skeleton-line {
  height: 14px;
  margin-bottom: 8px;
  width: 80%;
}
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
@keyframes skeletonPulse {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}
.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 13px;
  margin-bottom: 16px;
  max-width: 320px;
}
.empty-state .btn {
  margin-top: 4px;
}

/* Responsive grid utility */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.grid-auto-sm {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

/* Inline alert */
.alert-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.alert-inline.alert-danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.alert-inline.alert-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.alert-inline.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* ============================================
   REALIDADE — Financial Reality Check
   ============================================ */
.rl-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 8px;
}
.rl-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 8px 0;
}
.rl-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  min-width: 280px;
  text-align: center;
}
.rl-nav-btn {
  background: var(--card-bg);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all .2s;
}
.rl-nav-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.rl-content { min-height: 300px; }
.rl-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.rl-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.rl-empty i { font-size: 36px; margin-bottom: 12px; color: #f59e0b; }

/* Grid */
.rl-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}
.rl-grid-4 { grid-template-columns: repeat(4, 1fr); }
.rl-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* Cards */
.rl-card {
  background: var(--card-bg);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: box-shadow .2s;
}
.rl-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.rl-card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.rl-card-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}
.rl-card-value.positive { color: #16a34a; }
.rl-card-value.negative { color: #dc2626; }
.rl-card-value.warning { color: #f59e0b; }
.rl-card-value.rl-neutral { color: var(--text-secondary); }
.rl-card-sub {
  font-size: 12px;
  color: var(--text-secondary);
  min-height: 18px;
}

/* Variation badges */
.rl-var {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.rl-var.positive { color: #16a34a; background: #f0fdf4; }
.rl-var.negative { color: #dc2626; background: #fef2f2; }
.rl-var.neutral { color: #6b7280; }
.rl-info { color: #6b7280; font-size: 11px; }

/* Comparison section */
.rl-comparison {
  background: var(--card-bg);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.rl-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 16px;
}
.rl-comp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.rl-comp-row:last-child { margin-bottom: 0; }
.rl-comp-label {
  width: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.rl-comp-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rl-comp-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 22px;
}
.rl-comp-bar {
  height: 16px;
  border-radius: 4px;
  min-width: 4px;
  transition: width .5s ease;
}
.rl-comp-bar.current { background: var(--primary); }
.rl-comp-bar.previous { background: #cbd5e1; }
.rl-comp-val { font-size: 11px; color: var(--text-secondary); white-space: nowrap; }
.rl-comp-change {
  width: 80px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.rl-comp-change.positive { color: #16a34a; }
.rl-comp-change.negative { color: #dc2626; }

/* Footer info */
.rl-footer-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: 10px;
  margin-bottom: 20px;
}
.rl-footer-info span {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}
.rl-footer-info i { color: var(--primary); font-size: 11px; }

/* Mobile responsive */
@media (max-width: 768px) {
  .rl-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .rl-grid-3 { grid-template-columns: repeat(1, 1fr); }
  .rl-header h2 { font-size: 17px; min-width: auto; }
  .rl-card-value { font-size: 20px; }
  .rl-comp-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .rl-comp-label { width: auto; }
  .rl-comp-change { width: auto; text-align: left; }
  .rl-footer-info { flex-direction: column; gap: 6px; }
}
@media (max-width: 480px) {
  .rl-grid-4 { grid-template-columns: 1fr; }
}

/* ============================================
   REDE POUSADA
   ============================================ */

/* ── Global hover glow for ALL rede cards ── */
@keyframes rede-glow-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(91,147,196,0.15); }
  50% { box-shadow: 0 0 18px rgba(91,147,196,0.3); }
}
.rede-hover-card {
  transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s cubic-bezier(.4,0,.2,1), border-color 0.25s;
}
.rede-hover-card:hover {
  transform: translateY(-3px) scale(1.008);
  box-shadow: 0 8px 30px rgba(91,147,196,0.18), 0 0 12px rgba(91,147,196,0.12);
  border-color: rgba(91,147,196,0.35);
}

/* ── Status dots with glow ── */
.rede-status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.rede-status-dot.online { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.5); }
.rede-status-dot.offline { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.4); }
.rede-status-dot.warning { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.4); }
.rede-status-dot.dormant { background: #cbd5e1; box-shadow: none; } /* cinza — offline esperado (fechaduras, solar à noite) */

/* Device cards */
.rede-device-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s; }
.rede-device-card:hover { transform: translateY(-3px) scale(1.008); box-shadow: 0 8px 30px rgba(91,147,196,0.18), 0 0 12px rgba(91,147,196,0.12); border-color: rgba(91,147,196,0.35); }

/* Chale cards */
.rede-chale-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s; }
.rede-chale-card:hover { transform: translateY(-3px) scale(1.005); box-shadow: 0 8px 30px rgba(91,147,196,0.18), 0 0 12px rgba(91,147,196,0.12); }
.rede-chale-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.rede-chale-color { width: 12px; height: 12px; border-radius: 50%; }

/* KPI cards for rede */
.rede-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.rede-kpi-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; display: flex; align-items: center; gap: 12px; transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s; }
.rede-kpi-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(91,147,196,0.15); }
.rede-kpi-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.rede-kpi-icon.blue { background: #EFF6FF; color: #3B82F6; }
.rede-kpi-icon.green { background: #F0FDF4; color: #22C55E; }
.rede-kpi-icon.red { background: #FEF2F2; color: #EF4444; }
.rede-kpi-icon.amber { background: #FFFBEB; color: #F59E0B; }
.rede-kpi-value { font-size: 24px; font-weight: 700; color: #1e293b; }
.rede-kpi-label { font-size: 12px; color: #94a3b8; }

/* Tables for rede */
.rede-table { width: 100%; border-collapse: collapse; }
.rede-table th { text-align: left; padding: 10px 12px; font-size: 11px; text-transform: uppercase; color: #94a3b8; border-bottom: 2px solid #e2e8f0; }
.rede-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.rede-table tr:hover { background: #f8fafc; }

/* Tabs (for WiFi Portal sub-tabs) */
.rede-tabs { display: flex; gap: 0; border-bottom: 2px solid #e2e8f0; margin-bottom: 20px; }
.rede-tab-btn { padding: 10px 20px; font-size: 13px; font-weight: 600; color: #94a3b8; border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.rede-tab-btn.active { color: #5B93C4; border-bottom-color: #5B93C4; }
.rede-tab-panel { display: none; }
.rede-tab-panel.active { display: block; }

/* Action buttons */
.rede-btn { padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.rede-btn-primary { background: #5B93C4; color: #fff; }
.rede-btn-primary:hover { background: #4A80B0; }
.rede-btn-danger { background: #EF4444; color: #fff; }
.rede-btn-danger:hover { background: #DC2626; }
.rede-btn-outline { background: transparent; border: 1px solid #e2e8f0; color: #64748b; }
.rede-btn-outline:hover { background: #f8fafc; }

/* Drag-drop zones */
.rede-drop-zone { min-height: 100px; border: 2px dashed #e2e8f0; border-radius: 12px; padding: 12px; transition: all .2s; }
.rede-drop-zone.drag-over { border-color: #5B93C4; background: #EFF6FF; }
.rede-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 11px; cursor: grab; transition: transform 0.2s, box-shadow 0.2s; }
.rede-chip:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,0.1); }
.rede-chip:active { cursor: grabbing; transform: scale(1.05); }

/* WiFi Optimizer mobile */
@media (max-width: 640px) {
  .rwo-router-grid { grid-template-columns: 1fr !important; gap: 8px !important; }
  .rede-drop-zone { padding: 8px; min-height: 60px; }
  .rede-chip { font-size: 10px; padding: 2px 6px; gap: 3px; }
  .rede-chip .rwo-chip-actions { display: none !important; }
  .rede-kpi-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .rede-kpi-card { padding: 10px !important; }
}

/* Pi status indicator */
.rede-pi-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.rede-pi-status.online { background: #F0FDF4; color: #16A34A; }
.rede-pi-status.offline { background: #FEF2F2; color: #DC2626; }
