/* =====================================================
   SOCIAL UP - CAPTADORES & MEMBROS DESIGN SYSTEM
   TEMA BRANCO E LARANJA (CLEAN LIGHT & VIBRANT ORANGE)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color Palette - White & Orange Theme */
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-input: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #f97316;
  
  --primary: #f97316;
  --primary-hover: #ea580c;
  --primary-glow: rgba(249, 115, 22, 0.25);
  
  --secondary: #fb923c;
  --accent-cyan: #ea580c;
  --accent-pink: #f43f5e;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  
  /* Fonts & Shadows */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-lg: 0 20px 30px -10px rgba(249, 115, 22, 0.08), 0 10px 20px -5px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(249, 115, 22, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 90% 90%, rgba(251, 146, 60, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(234, 88, 12, 0.03) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Layout Utilities */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hidden {
  display: none !important;
}

/* Header & Navbar */
.app-header {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  border-bottom: 2px solid #ffedd5;
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.85rem 0;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
  font-size: 1.3rem;
  color: white;
}

.brand-text span {
  background: linear-gradient(135deg, #f97316, #c2410c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-status-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.role-badge {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.role-badge.captador {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.role-badge.membro {
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid #ffedd5;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.45);
  background: linear-gradient(135deg, #ea580c, #c2410c);
}

.btn-cyan {
  background: linear-gradient(135deg, #fb923c, #f97316);
  color: white;
  box-shadow: 0 4px 14px rgba(251, 146, 60, 0.35);
}

.btn-cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.45);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-danger {
  background: var(--danger-bg);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: #dc2626;
  color: white;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Cards & Panels */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-lg);
}

/* Single Password Login Screen */
.login-view {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.login-hero {
  text-align: center;
  max-width: 580px;
  margin: 0 auto 2rem auto;
}

.login-badge {
  display: inline-block;
  padding: 0.4rem 1.1rem;
  background: #ffedd5;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-full);
  color: #c2410c;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.login-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.8rem;
  color: #0f172a;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.login-box-container {
  max-width: 460px;
  margin: 0 auto;
}

.login-single-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.07);
  position: relative;
  overflow: hidden;
}

.login-single-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #f97316, #fb923c);
}

.password-input-wrapper {
  position: relative;
}

.password-input-wrapper i.lock-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 1.1rem;
}

.password-input-wrapper input {
  padding-left: 2.8rem;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-label span.optional {
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 400;
}

.form-input, .form-select {
  width: 100%;
  padding: 0.8rem 1rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
  background-color: #ffffff;
}

.form-input::placeholder {
  color: var(--text-dim);
}

.char-counter {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: right;
  margin-top: 0.25rem;
}

/* Dashboard & Panels */
.dashboard-view {
  padding: 2.5rem 0;
}

.page-title-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.page-description {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Stats Row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-card);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: #ffedd5;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Section Grid */
.content-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2rem;
  align-items: start;
}

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

/* Table Design */
.table-container {
  overflow-x: auto;
  margin-top: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.925rem;
}

.data-table th {
  background: #f8fafc;
  padding: 0.9rem 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
  background: #ffffff;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover td {
  background: #fff7ed;
}

/* Captador Selector Component in Membro Form */
.captador-select-box {
  background: #fff7ed;
  border: 2px dashed #fed7aa;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.captador-select-box:hover {
  border-color: var(--primary);
  background: #ffedd5;
}

.selected-captador-card {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md);
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.selected-captador-info h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #c2410c;
}

.selected-captador-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Pagination */
.pagination-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  margin-top: 0.5rem;
}

.page-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.pagination-buttons {
  display: flex;
  gap: 0.5rem;
}

/* Search Bar Filter */
.filter-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.search-input-group {
  flex: 1;
  min-width: 240px;
  position: relative;
}

.search-input-group i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.search-input-group input {
  padding-left: 2.6rem;
}

/* Social Badges */
.social-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 0.35rem;
}

.social-tag.instagram {
  background: #fce7f3;
  color: #db2777;
  border: 1px solid #fbcfe8;
}

.social-tag.facebook {
  background: #dbeafe;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

/* Live Preview Card */
.member-preview-card {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
}

.preview-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transform: scale(0.95);
  transition: var(--transition);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: #0f172a;
}

.modal-body {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
}

.toast {
  background: #ffffff;
  color: #0f172a;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border-left: 5px solid var(--primary);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.925rem;
  font-weight: 600;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.warning {
  border-left-color: var(--warning);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* API Config Bar Footer */
.api-bar {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 0.75rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4rem;
}

.api-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.api-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

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

/* =====================================================
   RESPONSIVE MOBILE & TABLET STYLES
   ===================================================== */

@media (max-width: 992px) {
  .container {
    padding: 0 1.25rem;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .login-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .app-header {
    padding: 0.65rem 0;
  }

  .brand-logo {
    font-size: 1.15rem;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  .role-badge {
    padding: 0.3rem 0.65rem;
    font-size: 0.725rem;
  }

  .login-hero {
    margin-bottom: 1.5rem;
  }

  .login-title {
    font-size: 1.65rem;
  }

  .login-subtitle {
    font-size: 0.95rem;
  }

  .login-single-card {
    padding: 1.75rem 1.25rem;
  }

  .page-title-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .stat-card {
    padding: 1rem 1.25rem;
  }

  .stat-icon {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }

  .stat-value {
    font-size: 1.35rem;
  }

  .glass-card {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }

  .filter-bar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .data-table th, .data-table td {
    padding: 0.75rem 0.85rem;
    font-size: 0.85rem;
  }

  .pagination-wrapper {
    flex-direction: column;
    gap: 0.85rem;
    align-items: center;
  }

  /* Modals on mobile */
  .modal-content {
    width: 95vw;
    margin: 0.5rem;
  }

  .modal-header {
    padding: 1rem 1.25rem;
  }

  .modal-body {
    padding: 1.25rem;
  }

  .modal-footer {
    padding: 0.85rem 1.25rem;
  }

  /* Toast notifications on mobile */
  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .brand-text span {
    display: inline;
  }

  .user-status-bar {
    gap: 0.5rem;
  }

  .btn {
    padding: 0.65rem 1.1rem;
    font-size: 0.875rem;
  }

  .btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .social-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
  }
}

