* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f1117;
  color: #e2e8f0;
  min-height: 100vh;
}

.hidden { display: none !important; }

.screen { min-height: 100vh; }

/* Login */
.login-card {
  max-width: 400px;
  margin: 10vh auto;
  padding: 2.5rem;
  background: #1a1d27;
  border-radius: 16px;
  border: 1px solid #2d3148;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.login-card h1 { font-size: 1.8rem; margin-bottom: 0.3rem; text-align: center; }
.subtitle { color: #718096; margin-bottom: 2rem; font-size: 0.95rem; }
.login-card .subtitle { text-align: center; }
.hint { color: #4a5568; font-size: 0.8rem; margin-top: 1.5rem; text-align: center; }
.error-msg { color: #fc8181; font-size: 0.85rem; margin-top: 0.8rem; text-align: center; }
.success-msg { color: #68d391; font-size: 0.85rem; margin-top: 0.8rem; text-align: center; }

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap input {
  padding-right: 44px;
}

.btn-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  line-height: 0;
  color: #718096;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.btn-eye:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}

.btn-eye svg {
  width: 18px;
  height: 18px;
  display: block;
}

.forgot-wrap { text-align: center; margin-top: 1rem; }
.forgot-link {
  color: #667eea;
  font-size: 0.85rem;
  text-decoration: none;
}
.forgot-link:hover { text-decoration: underline; }

.btn-notifications {
  position: relative;
  background: transparent;
  border: 1px solid #2d3148;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 1rem;
  color: #e2e8f0;
}

.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e53e3e;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.notifications-panel {
  background: #1a1d27;
  border-bottom: 1px solid #2d3148;
  padding: 1rem 2rem;
  max-height: 50vh;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.notifications-header h3 { font-size: 0.95rem; }

.notifications-list { display: flex; flex-direction: column; gap: 0.6rem; }

.notif-item {
  background: #0f1117;
  border: 1px solid #2d3148;
  border-left: 3px solid #667eea;
  border-radius: 8px;
  padding: 0.8rem 1rem;
}

.notif-item.unread { border-left-color: #f6e05e; }

.notif-item p { font-size: 0.85rem; color: #a0aec0; margin-top: 4px; }

.notif-item strong { color: #e2e8f0; }

.notif-password {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  background: #667eea22;
  color: #b794f4;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.9rem;
}

.notif-meta { font-size: 0.75rem; color: #718096; margin-top: 6px; }

/* Header fixo */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #0f1117;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

#admin-screen .content {
  padding-top: calc(57px + 2rem);
}

.content { padding: 2rem; max-width: 1200px; margin: 0 auto; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #1a1d27;
  border-bottom: 1px solid #2d3148;
}

.topbar-left { display: flex; align-items: center; gap: 0.8rem; }
.topbar-titles { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.topbar-left h2 { font-size: 1.2rem; }
.topbar-right { display: flex; align-items: center; gap: 1rem; color: #a0aec0; font-size: 0.9rem; }

.badge {
  background: #667eea33;
  color: #667eea;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Content */
.content { padding: 2rem; max-width: 1200px; margin: 0 auto; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h1 { font-size: 1.6rem; margin-bottom: 0.3rem; }
.page-header p { color: #718096; font-size: 0.9rem; }

/* Sites Grid */
.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem;
}

.site-card {
  background: #1a1d27;
  border: 1px solid #2d3148;
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.site-card:hover { border-color: #667eea55; }

.site-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.site-card-title {
  flex: 1 1 auto;
  min-width: 0;
}

.site-card-status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}

.site-score-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.score-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  font-weight: 700;
  text-align: center;
  line-height: 1.1;
  flex-shrink: 0;
}

.score-badge .score-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.score-badge .score-value {
  font-size: 0.72rem;
  margin-top: 0.1rem;
}

.score-seo {
  background: #05966933;
  color: #34d399;
  border: 1px solid #34d39944;
}

.score-google {
  background: #3b82f633;
  color: #60a5fa;
  border: 1px solid #60a5fa44;
}

.score-social {
  background: #a855f733;
  color: #c084fc;
  border: 1px solid #c084fc44;
}

.site-card h3 { font-size: 1.1rem; }
.site-card .domain {
  color: #718096;
  font-size: 0.85rem;
  margin-top: 2px;
  word-break: break-word;
}

.status-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-active { background: #38a16933; color: #68d391; }
.status-inactive { background: #e53e3e33; color: #fc8181; }
.status-max { background: #d69e2e33; color: #f6e05e; }

.seo-badge {
  background: #05966933;
  color: #34d399;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}

.seo-badge.plan-free { background: #3b82f633; color: #60a5fa; }
.seo-badge.plan-paid { background: #a855f733; color: #c084fc; }
.seo-badge.plan-remarketing { background: #f59e0b33; color: #fbbf24; }
.seo-badge.plan-plus { background: #10b98133; color: #6ee7b7; }
.seo-badge.plan-master { background: #ef444433; color: #fca5a5; }

.visibility-google { background: #3b82f633; color: #60a5fa; }
.visibility-social { background: #a855f733; color: #c084fc; }

.site-integrations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.65rem 0 0;
}

.integration-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.integration-pill.ok {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.25);
}

.site-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}

.stat-box {
  background: #0f1117;
  padding: 0.8rem;
  border-radius: 8px;
}

.stat-box .label { color: #718096; font-size: 0.75rem; }
.stat-box .value { font-size: 1.2rem; font-weight: 700; margin-top: 2px; }
.stat-box .value.green { color: #68d391; }
.stat-box .value.purple { color: #b794f4; }

.progress-bar {
  height: 6px;
  background: #2d3148;
  border-radius: 3px;
  margin: 0.8rem 0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 3px;
  transition: width 0.5s;
}

.site-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.site-actions .btn {
  flex: 0 1 auto;
  white-space: nowrap;
}

.empty-msg {
  text-align: center;
  color: #718096;
  padding: 3rem;
  font-size: 1rem;
}

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-size: 0.85rem; color: #a0aec0; }
.form-group small { display: block; color: #4a5568; font-size: 0.75rem; margin-top: 0.3rem; }

.form-group input, .form-group select, .password-wrap input {
  width: 100%;
  padding: 10px 14px;
  background: #0f1117;
  border: 1px solid #2d3148;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus { border-color: #667eea; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: #a0aec0;
  border: 1px solid #2d3148;
}

.btn-ghost:hover { background: #2d3148; color: #e2e8f0; }

.btn-danger {
  background: #e53e3e33;
  color: #fc8181;
  border: 1px solid #e53e3e55;
}

.btn-danger:hover { background: #e53e3e55; }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-block { width: 100%; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal {
  background: #1a1d27;
  border: 1px solid #2d3148;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #2d3148;
}

.modal-header h3 { font-size: 1.2rem; }

.btn-close {
  background: none;
  border: none;
  color: #a0aec0;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
}

.modal form { padding: 1.5rem; }

.modal-sm { max-width: 440px; }
.modal-lg { max-width: 920px; }
.modal-subtitle { color: #a0aec0; font-size: 0.9rem; margin-bottom: 1rem; }

.section-hint {
  color: #718096;
  font-size: 0.85rem;
  margin: -0.25rem 0 1rem;
  line-height: 1.45;
}

.form-section--client {
  background: rgba(102, 126, 234, 0.04);
  border-color: #667eea33;
}

.client-form-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1rem;
  align-items: start;
}

@media (max-width: 800px) {
  .client-form-layout { grid-template-columns: 1fr; }
}

.client-type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.client-type-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #a0aec0;
}

.client-type-toggle {
  display: inline-flex;
  border: 1px solid #2d3148;
  border-radius: 10px;
  overflow: hidden;
}

.client-type-btn {
  border: none;
  background: #12151f;
  color: #a0aec0;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.client-type-btn:hover { color: #e2e8f0; }
.client-type-btn.active {
  background: #667eea33;
  color: #a5b4fc;
}

.client-preview {
  background: #12151f;
  border: 1px solid #2d3148;
  border-radius: 12px;
  padding: 0.85rem;
  position: sticky;
  top: 0;
}

.client-preview h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #718096;
  margin-bottom: 0.65rem;
}

.client-preview-empty {
  font-size: 0.8rem;
  color: #718096;
  line-height: 1.4;
}

.client-preview-card { font-size: 0.82rem; line-height: 1.45; }
.client-preview-type {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #667eea;
  margin-bottom: 0.35rem;
}
.client-preview-name { display: block; font-size: 0.95rem; margin-bottom: 0.35rem; }
.client-preview-line { color: #cbd5e0; margin-top: 0.2rem; word-break: break-word; }
.client-preview-notes {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #2d3148;
  color: #718096;
  font-size: 0.78rem;
  white-space: pre-wrap;
}

.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #2d3148;
  background: #12151f;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 64px;
}

.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
}

.site-client-summary {
  background: rgba(102, 126, 234, 0.08);
  border: 1px solid #667eea33;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
}

.site-client-head {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a5b4fc;
  margin-bottom: 0.25rem;
}

.site-client-name { margin-bottom: 0.15rem; }
.site-client-line {
  color: #cbd5e0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.15rem;
}
.site-client-line.muted { color: #718096; font-size: 0.78rem; }

#client-form-error:not(.hidden) { display: block; margin-top: 0.5rem; }

.form-section {
  border: 1px solid #2d3148;
  border-radius: 12px;
  padding: 1rem 1.1rem 0.25rem;
  margin-bottom: 1rem;
  background: rgba(0, 0, 0, 0.15);
}

.form-section legend {
  padding: 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.billing-last-sent {
  font-size: 0.8rem;
  color: #68d391;
  margin-top: 0.25rem;
}

.form-section--renew {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.06);
}

.renew-last-info {
  font-size: 0.85rem;
  color: #93c5fd;
  margin: 0 0 0.75rem;
}

.renew-last-info.hidden { display: none; }

#renew-plan-error:not(.hidden) { display: block; margin-top: 0.5rem; }

.financial-method-select,
.financial-due-input {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid #2d3148;
  background: #12151f;
  color: #e2e8f0;
  font-size: 0.85rem;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #2d3148;
  padding-bottom: 0;
}

.admin-tab {
  background: none;
  border: none;
  color: #a0aec0;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.admin-tab:hover { color: #e2e8f0; }
.admin-tab.active {
  color: #667eea;
  border-bottom-color: #667eea;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dashboard-card {
  background: #1a1d27;
  border: 1px solid #2d3148;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  text-align: center;
}

.dashboard-card.dash-card-danger { border-color: rgba(252, 129, 129, 0.4); }
.dashboard-card.dash-card-warn { border-color: rgba(236, 201, 75, 0.35); }

.dash-card-icon { font-size: 1.4rem; margin-bottom: 0.35rem; }
.dash-card-label { color: #718096; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
.dash-card-value { font-size: 1.5rem; font-weight: 700; color: #fff; margin: 0.25rem 0; }
.dash-card-sub { font-size: 0.75rem; color: #a0aec0; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.dashboard-panel {
  background: #1a1d27;
  border: 1px solid #2d3148;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.dashboard-panel h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: #e2e8f0;
}

.dashboard-table { font-size: 0.85rem; }

.dash-progress {
  height: 6px;
  background: #2d3148;
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.35rem;
}

.dash-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 3px;
}

.dashboard-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 140px;
  padding-top: 1rem;
}

.dash-chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 0.25rem;
}

.dash-chart-fill {
  width: 100%;
  max-width: 40px;
  background: linear-gradient(180deg, #667eea, #553c9a);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
}

.dash-chart-val { font-size: 0.7rem; color: #a0aec0; }
.dash-chart-label { font-size: 0.65rem; color: #718096; text-align: center; }

.financial-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.financial-card {
  background: #1a1d27;
  border: 1px solid #2d3148;
  border-radius: 12px;
  padding: 1.25rem;
}

.financial-card .label {
  color: #718096;
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
}

.financial-card .value {
  font-size: 1.5rem;
  font-weight: 700;
}

.financial-card .value.green { color: #68d391; }
.financial-card .value.purple { color: #b794f4; }
.financial-card .value.orange { color: #f6ad55; }

.financial-table-wrap {
  background: #1a1d27;
  border: 1px solid #2d3148;
  border-radius: 12px;
  overflow-x: auto;
}

.financial-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.financial-table th,
.financial-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid #2d3148;
}

.financial-table th {
  color: #a0aec0;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.financial-table tr:last-child td { border-bottom: none; }

.pay-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.pay-badge.paid { background: rgba(104, 211, 145, 0.15); color: #68d391; }
.pay-badge.pending { background: rgba(246, 173, 85, 0.15); color: #f6ad55; }
.pay-badge.overdue { background: rgba(252, 129, 129, 0.2); color: #fc8181; }
.pay-badge.due-soon { background: rgba(236, 201, 75, 0.2); color: #ecc94b; }
.pay-badge.due-today { background: rgba(237, 137, 54, 0.2); color: #ed8936; }

.financial-alerts { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.fin-alert { padding: 0.75rem 1rem; border-radius: 8px; font-size: 0.9rem; }
.fin-alert-danger { background: rgba(252, 129, 129, 0.12); border: 1px solid rgba(252, 129, 129, 0.35); color: #feb2b2; }
.fin-alert-warn { background: rgba(236, 201, 75, 0.12); border: 1px solid rgba(236, 201, 75, 0.35); color: #faf089; }

.financial-subtabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.financial-subtab {
  padding: 0.5rem 1rem; border-radius: 8px; border: 1px solid #4a5568;
  background: transparent; color: #a0aec0; cursor: pointer; font-size: 0.875rem;
}
.financial-subtab.active { background: #2d3748; color: #fff; border-color: #667eea; }
.financial-panel { margin-bottom: 1.5rem; }

.financial-card .value.red { color: #fc8181; }
.financial-card .value.yellow { color: #ecc94b; }

.notif-item.notif-urgent { border-left: 3px solid #fc8181; }

.billing-alert-banner {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.875rem 1rem; margin-bottom: 1rem; border-radius: 10px; font-size: 0.9rem;
}
.billing-alert-banner.overdue { background: rgba(252, 129, 129, 0.15); border: 1px solid rgba(252, 129, 129, 0.4); color: #fed7d7; }
.billing-alert-banner.due-today { background: rgba(237, 137, 54, 0.15); border: 1px solid rgba(237, 137, 54, 0.4); color: #feebc8; }
.billing-alert-banner.due-soon { background: rgba(236, 201, 75, 0.12); border: 1px solid rgba(236, 201, 75, 0.35); color: #fefcbf; }
.billing-alert-banner.hidden { display: none; }

.financial-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.financial-notes-input {
  width: 100%;
  min-width: 140px;
  background: #0f1117;
  border: 1px solid #2d3148;
  border-radius: 6px;
  color: #e2e8f0;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

.financial-amount-input {
  width: 110px;
  background: #0f1117;
  border: 1px solid #2d3148;
  border-radius: 6px;
  color: #e2e8f0;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

.dispatch-preview {
  font-size: 0.85rem;
  color: #a0aec0;
  background: rgba(102, 126, 234, 0.08);
  border: 1px solid #2d3148;
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  margin: 0 1.5rem 0.5rem;
}

.dispatch-row { margin-top: 0.25rem; }

.site-dispatch {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: #0f1117;
  border-radius: 8px;
  border: 1px solid #2d3148;
  font-size: 0.82rem;
}

.site-dispatch .dispatch-line {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  color: #a0aec0;
}

.site-dispatch .dispatch-line strong { color: #e2e8f0; }

.dispatch-badge {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.dispatch-badge.active { background: rgba(104, 211, 145, 0.15); color: #68d391; }
.dispatch-badge.paused { background: rgba(246, 173, 85, 0.15); color: #f6ad55; }

.site-access {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #0f1117;
  border: 1px solid #2d3148;
  border-radius: 8px;
}

.site-access-modal {
  margin: 0 1.5rem 1rem;
}

.site-access-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.site-access-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
}

.site-access-url {
  font-size: 0.75rem;
  color: #667eea;
}

.access-field {
  margin-bottom: 0.5rem;
}

.access-field:last-of-type { margin-bottom: 0.65rem; }

.access-field label {
  display: block;
  font-size: 0.72rem;
  color: #718096;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.access-value-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.access-value-row code {
  flex: 1;
  min-width: 0;
  background: #1a1d27;
  border: 1px solid #2d3148;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
  color: #68d391;
  word-break: break-all;
}

.access-secret { letter-spacing: 0.08em; }

.access-secret.muted { color: #718096; font-style: italic; letter-spacing: normal; }

.btn-eye-sm {
  position: static;
  transform: none;
  flex-shrink: 0;
  padding: 4px;
}

.btn-xs {
  padding: 0.2rem 0.45rem;
  font-size: 0.72rem;
}

.btn-block { width: 100%; margin-top: 0.35rem; }

.financial-access {
  font-size: 0.8rem;
  line-height: 1.45;
}

.financial-access code {
  color: #68d391;
  font-size: 0.78rem;
}

/* Manual */
.manual-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.manual-nav {
  position: sticky;
  top: 5rem;
  background: #1a1d27;
  border: 1px solid #2d3148;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.manual-nav a {
  color: #a0aec0;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.manual-nav a:hover {
  color: #e2e8f0;
  background: rgba(102, 126, 234, 0.1);
}

.manual-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.manual-section {
  background: #1a1d27;
  border: 1px solid #2d3148;
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  scroll-margin-top: 5rem;
}

.manual-section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #e2e8f0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #2d3148;
}

.manual-section h3 {
  font-size: 1rem;
  margin: 1.25rem 0 0.5rem;
  color: #cbd5e0;
}

.manual-section p,
.manual-section li,
.manual-section dd {
  color: #a0aec0;
  line-height: 1.65;
  font-size: 0.92rem;
}

.manual-section ul,
.manual-section ol {
  margin: 0.5rem 0 0.75rem 1.25rem;
}

.manual-section li { margin-bottom: 0.35rem; }

.manual-section code {
  background: #0f1117;
  border: 1px solid #2d3148;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-size: 0.85rem;
  color: #68d391;
}

.manual-code {
  background: #0f1117;
  border: 1px solid #2d3148;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: 0.82rem;
  color: #68d391;
  overflow-x: auto;
  line-height: 1.6;
  margin: 0.75rem 0;
}

.manual-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 1rem;
  font-size: 0.88rem;
}

.manual-table th,
.manual-table td {
  padding: 0.65rem 0.9rem;
  text-align: left;
  border: 1px solid #2d3148;
}

.manual-table th {
  background: #0f1117;
  color: #a0aec0;
  font-weight: 600;
}

.manual-table td { color: #cbd5e0; }

.manual-tip {
  background: rgba(102, 126, 234, 0.1);
  border-left: 3px solid #667eea;
  padding: 0.65rem 0.9rem;
  border-radius: 0 6px 6px 0;
  margin-top: 0.75rem;
}

.manual-warn {
  background: rgba(246, 173, 85, 0.1);
  border-left: 3px solid #f6ad55;
  padding: 0.65rem 0.9rem;
  border-radius: 0 6px 6px 0;
  margin-top: 0.75rem;
}

.manual-faq dt {
  color: #e2e8f0;
  font-weight: 600;
  margin-top: 1rem;
  font-size: 0.92rem;
}

.manual-faq dt:first-child { margin-top: 0; }

.manual-faq dd {
  margin: 0.35rem 0 0 0;
  padding-left: 0.5rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-top: 1rem;
}

.embed-section { margin-top: 1rem; }

.embed-box {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  background: #0f1117;
  border: 1px solid #2d3148;
  border-radius: 8px;
  padding: 0.8rem;
  margin-top: 0.4rem;
}

.embed-box code {
  flex: 1;
  font-size: 0.75rem;
  color: #68d391;
  word-break: break-all;
  line-height: 1.5;
}

.admin-tickets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-tickets-table th,
.admin-tickets-table td {
  padding: 0.75rem 0.65rem;
  border-bottom: 1px solid #2d3148;
  text-align: left;
  vertical-align: top;
}

.admin-tickets-table th {
  color: #a0aec0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ticket-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-block;
}

.ticket-status--open { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.ticket-status--in_progress { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.ticket-status--resolved { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.ticket-status--closed { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }

.ticket-modal-body { margin-bottom: 1rem; }

.ticket-modal-message,
.ticket-modal-reply {
  margin-top: 0.85rem;
  padding: 0.75rem;
  background: #12151f;
  border: 1px solid #2d3148;
  border-radius: 10px;
}

.ticket-modal-message p,
.ticket-modal-reply p {
  margin-top: 0.35rem;
  white-space: pre-wrap;
  line-height: 1.45;
  font-size: 0.9rem;
}

.ticket-reply-history {
  margin-top: 0.85rem;
  padding: 0.75rem;
  background: #12151f;
  border: 1px solid #2d3148;
  border-radius: 10px;
}

.ticket-history-item {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid #2d3148;
}

.ticket-history-item:first-of-type { border-top: none; padding-top: 0; margin-top: 0.35rem; }
.ticket-history-meta { font-size: 0.75rem; color: #718096; margin-bottom: 0.25rem; }
.warn-text { color: #fbbf24 !important; }

/* Clientes */
.clients-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.clients-card-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.client-card {
  background: #1a1d27;
  border: 1px solid #2d3148;
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.client-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.client-card-identity {
  min-width: 0;
  flex: 1 1 12rem;
}

.client-card-name {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  word-break: break-word;
}

.client-card-type {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: #718096;
}

.client-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.client-card-site {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #2d3148;
}

.client-card-site strong {
  font-size: 0.92rem;
  word-break: break-word;
}

.client-card-site span {
  font-size: 0.78rem;
  color: #718096;
  word-break: break-all;
}

.client-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.85rem 1rem;
  margin-bottom: 0.9rem;
}

.client-card-field {
  min-width: 0;
}

.client-card-field--contact {
  grid-column: 1 / -1;
}

@media (min-width: 720px) {
  .client-card-field--contact {
    grid-column: span 2;
  }

  .client-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.client-card-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #a0aec0;
}

.client-card-value {
  font-size: 0.88rem;
  color: #e2e8f0;
  word-break: break-word;
}

.client-contact-line {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
  line-height: 1.35;
}

.client-contact-line span {
  min-width: 0;
  word-break: break-word;
}

.client-card .client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
  padding-top: 0.15rem;
  border-top: 1px solid #2d3148;
}

.clients-table .client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 11rem;
}

.client-row-paused {
  opacity: 0.85;
}

.btn-whatsapp {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}

.btn-whatsapp:hover:not(:disabled) {
  background: #1ebe57;
  border-color: #1ebe57;
}

.btn-whatsapp:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.whatsapp-last-cell { min-width: 8.5rem; }
.whatsapp-last { font-size: 0.8rem; color: #e2e8f0; }
.whatsapp-last-meta { font-size: 0.72rem; color: #718096; margin-top: 0.15rem; }
.text-muted { color: #718096; font-size: 0.85rem; }

.whatsapp-history {
  margin: 0.75rem 0 0;
  padding: 0.75rem;
  background: #1a1d2e;
  border: 1px solid #2d3148;
  border-radius: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.whatsapp-history-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.whatsapp-history-empty {
  font-size: 0.85rem;
  color: #718096;
  margin: 0;
}

.whatsapp-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.whatsapp-history-list li {
  padding: 0.5rem 0;
  border-top: 1px solid #2d3148;
}

.whatsapp-history-list li:first-child {
  border-top: none;
  padding-top: 0;
}

.whatsapp-history-meta {
  font-size: 0.72rem;
  color: #718096;
  margin-bottom: 0.2rem;
}

.whatsapp-history-msg {
  font-size: 0.82rem;
  color: #cbd5e0;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .content { padding: 1rem; }
  .sites-grid { grid-template-columns: 1fr; }
  .manual-layout { grid-template-columns: 1fr; }
  .manual-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .manual-nav a { font-size: 0.8rem; }
}

/* Backup */
.backup-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.backup-stat {
  background: #1a1d27;
  border: 1px solid #2d3148;
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.backup-stat span {
  display: block;
  font-size: 0.75rem;
  color: #718096;
  margin-bottom: 0.25rem;
}

.backup-stat strong {
  font-size: 0.95rem;
  color: #e2e8f0;
  word-break: break-word;
}

.backup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.backup-card {
  background: #1a1d27;
  border: 1px solid #2d3148;
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
}

.backup-card--wide { margin-top: 0.25rem; }

.backup-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.backup-card-desc {
  color: #718096;
  font-size: 0.85rem;
  margin: 0 0 1rem;
  line-height: 1.45;
}

.backup-card-actions,
.backup-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.backup-upload-row input[type="file"] {
  flex: 1;
  min-width: 180px;
  font-size: 0.82rem;
  color: #cbd5e0;
}

.backup-warn {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: #fbbf24;
}

.backup-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.backup-list-head h3 { margin: 0; }

.backup-list-wrap { overflow-x: auto; }

.backup-table code {
  font-size: 0.78rem;
  color: #93c5fd;
}

.backup-row-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.backup-msg {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
}

.backup-msg--success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.backup-msg--error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.backup-msg.hidden { display: none; }

.plans-pix-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .plans-pix-form .form-row { grid-template-columns: 1fr; }
}

.text-muted {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
}

.ticket-archive-hint {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: #a0aec0;
}

.support-subtabs { margin-bottom: 0.75rem; }

.section-hint {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: #718096;
}

.ticket-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.btn-danger-text {
  color: #f87171 !important;
}

.btn-danger-text:hover {
  background: rgba(239, 68, 68, 0.12) !important;
}

.confirm-delete-modal {
  text-align: center;
  max-width: 420px;
}

.confirm-delete-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.confirm-delete-modal h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.confirm-delete-message {
  margin: 0 0 1.25rem;
  color: #718096;
  font-size: 0.92rem;
  line-height: 1.5;
}

.confirm-delete-actions {
  justify-content: center;
  gap: 0.75rem;
}
