/* =====================================================
   MyFriends.Online — Global Stylesheet
   Theme: Blue Social Clean
   Base profissional, clara e confortável para leitura
   ===================================================== */

/* ─── CSS Variables ─────────────────────────────── */
:root {
  /* 60% — Fundo dominante */
  --bg-deep:        #EFF6FF;
  --bg-main:        #F8FAFC;
  --bg-surface:     #FFFFFF;
  --bg-card:        #FFFFFF;
  --bg-soft:        #F1F5F9;
  --bg-muted:       #E2E8F0;
  --bg-input:       #FFFFFF;
  --bg-glass:       rgba(37, 99, 235, 0.06);
    /* Navbar / Footer — destaque leve */
  --nav-bg:          #EAF2FF;
  --nav-bg-strong:   #DBEAFE;
  --nav-border:      #BFDBFE;
  --footer-bg:       #EAF2FF;
  --footer-border:   #BFDBFE;

  /* 30% — Azul social secundário */
  --primary:        #1E40AF;
  --primary-strong: #1D4ED8;
  --primary-soft:   #DBEAFE;
  --primary-light:  #EFF6FF;

  /* 10% — Destaque para ações */
  --accent:         #F97316;
  --accent-hover:   #EA580C;
  --accent-soft:    #FFEDD5;

  /* Estados */
  --danger:         #DC2626;
  --danger-soft:    #FEE2E2;
  --success:        #16A34A;
  --success-soft:   #DCFCE7;
  --warning:        #D97706;
  --warning-soft:   #FEF3C7;
  --info:           #0284C7;
  --info-soft:      #E0F2FE;

  /* Texto */
  --text-primary:   #0F172A;
  --text-secondary: #334155;
  --text-muted:     #64748B;
  --text-soft:      #94A3B8;
  --text-inverse:   #FFFFFF;

  /* Bordas e sombras */
  --border:         #E2E8F0;
  --border-hover:   #93C5FD;
  --border-focus:   #2563EB;

  --shadow-sm:      0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md:      0 8px 24px rgba(15, 23, 42, 0.10);
  --shadow-lg:      0 20px 48px rgba(15, 23, 42, 0.14);

  /* Gradientes */
  --gradient:       linear-gradient(135deg, #2563EB, #1D4ED8);
  --gradient-soft:  linear-gradient(135deg, #EFF6FF, #FFFFFF);
  --gradient-cta:   linear-gradient(135deg, #F97316, #FB923C);

  /* Fontes sem terceiros */
  --font-display:   Georgia, 'Times New Roman', serif;
  --font-body:      system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Radius */
  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      20px;
  --radius-xl:      28px;
  --radius-full:    999px;

  --transition:     0.22s ease;
}

/* ─── Reset & Base ──────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(37, 99, 235, 0.08), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(14, 165, 233, 0.08), transparent 30%),
    radial-gradient(circle at 80% 90%, rgba(249, 115, 22, 0.05), transparent 24%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--primary-strong);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  outline: none;
}

input,
textarea,
select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}

/* ─── Acessibilidade visual ─────────────────────── */
:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}

::selection {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ─── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-soft);
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* ─── Typography ────────────────────────────────── */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
}

h3 {
  font-size: 1.35rem;
  font-weight: 700;
}

h4 {
  font-size: 1.08rem;
  font-weight: 700;
}

p {
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-accent {
  color: var(--accent);
}

.text-primary-color {
  color: var(--primary);
}

/* ─── Layout estrutural futuro ──────────────────── */
.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
}

.site-navbar {
  min-height: 64px;
  background:
    linear-gradient(180deg, #F3F8FF 0%, var(--nav-bg) 100%);
  border-bottom: 1px solid var(--nav-border);
  box-shadow: 0 4px 18px rgba(30, 64, 175, 0.08);
  position: sticky;
  top: 0;
  z-index: 500;
}

.site-navbar-inner {
  width: min(100% - 32px, 1400px);
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.site-main {
  width: min(100% - 32px, 1400px);
  margin: 0 auto;
  flex: 1;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0;
}

.site-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
}

.site-content {
  min-width: 0;
}

.site-footer {
  margin-top: auto;
  background:
    linear-gradient(180deg, var(--footer-bg) 0%, #DFECFF 100%);
  border-top: 1px solid var(--footer-border);
  color: var(--text-secondary);
  padding: 28px 0;
  box-shadow: 0 -4px 18px rgba(30, 64, 175, 0.05);
}

.site-footer-inner {
  width: min(100% - 32px, 1400px);
  margin: 0 auto;
}

/* ─── Layout Utilities ──────────────────────────── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 8px;
}

.gap-2 {
  gap: 16px;
}

.gap-3 {
  gap: 24px;
}

.gap-4 {
  gap: 32px;
}

.w-full {
  width: 100%;
}

.text-center {
  text-align: center;
}

.relative {
  position: relative;
}

.hidden {
  display: none !important;
}

/* ─── Buttons ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-cta);
  color: var(--text-inverse);
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.24);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.30);
  color: var(--text-inverse);
}

.btn-secondary {
  background: var(--primary);
  color: var(--text-inverse);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.20);
}

.btn-secondary:hover {
  background: var(--primary-strong);
  color: var(--text-inverse);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--primary);
  border: 1.5px solid var(--border-hover);
}

.btn-outline:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
}

.btn-ghost:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.18);
}

.btn-danger:hover {
  background: #FECACA;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.btn-sm {
  min-height: 34px;
  padding: 6px 14px;
  font-size: 0.82rem;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-md);
  min-width: 40px;
}

.btn[disabled] {
  opacity: 0.55;
  pointer-events: none;
}

/* ─── Cards ─────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.card-soft {
  background: var(--gradient-soft);
}

/* ─── Forms ─────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-control {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  min-height: 44px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  width: 100%;
}

.form-control::placeholder {
  color: var(--text-soft);
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.form-control-icon {
  position: relative;
}

.form-control-icon .form-control {
  padding-left: 44px;
}

.form-control-icon .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  font-size: 1.05rem;
  pointer-events: none;
  transition: color var(--transition);
}

.form-control-icon:focus-within .icon {
  color: var(--primary);
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 2px;
}

/* ─── Avatar ────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--bg-soft);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-xs {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.avatar-sm {
  width: 40px;
  height: 40px;
  font-size: 0.9rem;
}

.avatar-md {
  width: 52px;
  height: 52px;
  font-size: 1.1rem;
}

.avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 1.5rem;
}

.avatar-xl {
  width: 96px;
  height: 96px;
  font-size: 2rem;
}

.avatar-xxl {
  width: 120px;
  height: 120px;
  font-size: 2.5rem;
}

.avatar-initial {
  background: var(--gradient);
  color: var(--text-inverse);
  font-weight: 800;
  font-family: var(--font-display);
}

.avatar-ring {
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12);
}

/* ─── Badges ────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.badge-accent {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid rgba(249, 115, 22, 0.18);
}

.badge-primary {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.16);
}

.badge-success {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid rgba(22, 163, 74, 0.16);
}

.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.16);
}

/* ─── Divider ───────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.divider-text {
  text-align: center;
  position: relative;
}

.divider-text::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.divider-text span {
  position: relative;
  background: var(--bg-card);
  padding: 0 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ─── Toast Notifications ───────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  pointer-events: all;
  animation: toastIn 0.28s ease forwards;
  max-width: 360px;
}

.toast.hide {
  animation: toastOut 0.25s ease forwards;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--danger);
}

.toast-info {
  border-left: 4px solid var(--primary);
}

.toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(28px);
  }
}

/* ─── Modal ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.25s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 0;
}

.modal-body {
  padding: 24px 28px;
}

.modal-footer {
  padding: 0 28px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-close {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1.1rem;
}

.modal-close:hover {
  color: var(--text-primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ─── Dropdown ──────────────────────────────────── */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 190px;
  overflow: hidden;
  z-index: 200;
  animation: fadeIn 0.15s ease;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.dropdown-item.danger {
  color: var(--danger);
}

.dropdown-item.danger:hover {
  background: var(--danger-soft);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ─── Loading Spinner ───────────────────────────── */
.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(37, 99, 235, 0.18);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 250, 252, 0.72);
  backdrop-filter: blur(4px);
  border-radius: inherit;
  z-index: 10;
}

/* ─── Tabs ──────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px;
}

.tab {
  flex: 1;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
}

.tab.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tab:not(.active):hover {
  color: var(--primary);
}

/* ─── Empty State ───────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: 0.65;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ─── Animations ────────────────────────────────── */
.fade-in {
  animation: fadeInUp 0.35s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger > * {
  animation: fadeInUp 0.35s ease both;
}

.stagger > *:nth-child(1) { animation-delay: 0.04s; }
.stagger > *:nth-child(2) { animation-delay: 0.08s; }
.stagger > *:nth-child(3) { animation-delay: 0.12s; }
.stagger > *:nth-child(4) { animation-delay: 0.16s; }
.stagger > *:nth-child(5) { animation-delay: 0.20s; }

/* ─── Pulse dot ─────────────────────────────────── */
.online-dot {
  width: 10px;
  height: 10px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
  position: absolute;
  bottom: 0;
  right: 0;
}

.online-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--success);
  opacity: 0.30;
  animation: pulseRing 2s ease-in-out infinite;
}

@keyframes pulseRing {
  0%, 100% {
    transform: scale(1);
    opacity: 0.30;
  }
  50% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 1024px) {
  .site-main {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }

  .container {
    padding: 0 14px;
  }

  .site-navbar-inner,
  .site-main,
  .site-footer-inner {
    width: min(100% - 24px, 1400px);
  }

  .site-main {
    grid-template-columns: 1fr;
  }

  .site-sidebar {
    position: static;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}
.site-logo-img {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
}

.brand-logo-img {
  display: block;
  width: 280px;
  max-width: 100%;
  height: auto;
}

.mobile-logo-img {
  display: block;
  width: 230px;
  max-width: 100%;
  height: auto;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 220px;
}

@media (max-width: 768px) {
  .site-logo-img {
    width: 190px;
  }

  .brand-logo-img,
  .mobile-logo-img {
    width: 210px;
  }

  .nav-logo {
    min-width: auto;
  }
}