/* ============================================================
   MinCLOUD Social IA - Tema Oficial MinCLOUD (Nuvem Tech & Alta Nitidez)
   ============================================================ */

:root {
  /* Cores Oficiais da Identidade MinCLOUD */
  --bg-deep-space: #070a14;
  --bg-panel: #0d1527;
  --bg-panel-hover: #131d35;
  --bg-input: #060b17;
  
  --border-subtle: rgba(0, 212, 255, 0.18);
  --border-active: #00f2fe;

  --mincloud-blue: #0066ff;
  --mincloud-cyan: #00f2fe;
  --mincloud-teal: #00ffcc;
  --mincloud-purple: #6a11cb;
  --mincloud-grad: linear-gradient(135deg, #0052d4 0%, #4364f7 50%, #6fb1fc 100%);
  --mincloud-glow-btn: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);

  --text-main: #ffffff;
  --text-body: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --instagram-grad: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  --facebook-color: #1877f2;
  --linkedin-color: #0a66c2;
  --twitter-color: #1d9bf0;
  --gmb-color: #ea4335;

  --font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-glow: 0 0 25px rgba(0, 198, 255, 0.3);
}

/* Correção Global de Nitidez e Renderização de Texto */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html, body {
  font-family: var(--font-family);
  background-color: var(--bg-deep-space);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 102, 255, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(0, 242, 254, 0.12) 0%, transparent 45%);
  background-attachment: fixed;
  color: var(--text-body);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.5;
}

/* Sidebar Nítida com a cara da MinCLOUD */
.app-sidebar {
  width: 280px;
  background: #080d1a;
  border-right: 1px solid var(--border-subtle);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: fixed;
  height: 100vh;
  z-index: 100;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
}

.brand-logo-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--mincloud-glow-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-glow);
  color: #fff;
}

.brand-logo-text h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.brand-logo-text span {
  font-size: 11px;
  color: var(--mincloud-cyan);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 800;
  display: block;
  margin-top: 2px;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item button {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.nav-item button:hover {
  background: rgba(0, 242, 254, 0.08);
  color: #ffffff;
  border-color: rgba(0, 242, 254, 0.2);
}

.nav-item button.active {
  background: linear-gradient(90deg, rgba(0, 102, 255, 0.25), rgba(0, 242, 254, 0.15));
  border: 1px solid var(--mincloud-cyan);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(0, 242, 254, 0.2);
  font-weight: 700;
}

.nav-item button .nav-icon {
  font-size: 20px;
}

/* User Plan Badge Widget */
.sidebar-plan-widget {
  background: #0e172a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.plan-badge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.plan-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--mincloud-cyan);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.credits-count {
  font-size: 13px;
  font-weight: 800;
  color: var(--mincloud-teal);
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}

.progress-bar-fill {
  height: 100%;
  width: 100%;
  background: var(--mincloud-glow-btn);
}

.btn-upgrade {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--mincloud-glow-btn);
  border: none;
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 114, 255, 0.3);
}

.btn-upgrade:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 198, 255, 0.5);
}

/* Áreas Principais com Alta Nitidez */
.app-main {
  margin-left: 280px;
  flex: 1;
  padding: 36px 40px;
  max-width: 1440px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
}

.page-title h2 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: #ffffff;
}

.page-title p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.top-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.brand-selector-dropdown {
  background: #0e172a;
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  outline: none;
  cursor: pointer;
}

.brand-selector-dropdown:focus {
  border-color: var(--mincloud-cyan);
}

/* Botão Principal Neon ✨ */
.btn-ai-magic {
  background: var(--mincloud-glow-btn);
  border: none;
  color: #ffffff;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 198, 255, 0.4);
  transition: all 0.25s ease;
}

.btn-ai-magic:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(0, 198, 255, 0.6);
}

/* Painéis com Nitidez Total (Sem Blur Embaçado no Texto) */
.glass-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  isolation: isolate;
}

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

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

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Form Controles Nítidos */
.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--mincloud-cyan);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--mincloud-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
  background: #080f1e;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

/* Previews das Redes Sociais */
.preview-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.preview-tab-btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.preview-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.preview-tab-btn.active.instagram { background: var(--instagram-grad); color: #fff; }
.preview-tab-btn.active.facebook { background: var(--facebook-color); color: #fff; }
.preview-tab-btn.active.linkedin { background: var(--linkedin-color); color: #fff; }
.preview-tab-btn.active.twitter { background: var(--twitter-color); color: #fff; }
.preview-tab-btn.active.gmb { background: var(--gmb-color); color: #fff; }

/* Cartão Mockup Nitidez Máxima */
.social-card-mock {
  background: #060b17;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  color: #f8fafc;
}

.social-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.social-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--mincloud-glow-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(0, 198, 255, 0.3);
}

.social-card-author strong {
  display: block;
  font-size: 15px;
  color: #ffffff;
}

.social-card-author span {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-copy {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  background: var(--mincloud-cyan);
  color: #000000;
  border-color: var(--mincloud-cyan);
}

/* Seção de Preços */
.pricing-card {
  background: #0c1426;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
}

.pricing-card:hover {
  border-color: var(--mincloud-cyan);
  transform: translateY(-4px);
}

.pricing-card.popular {
  border-color: var(--mincloud-cyan);
  background: #0f1930;
  box-shadow: 0 0 35px rgba(0, 242, 254, 0.2);
  transform: scale(1.03);
}

.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--mincloud-glow-btn);
  color: #ffffff;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pricing-card h3 {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.pricing-amount {
  font-size: 38px;
  font-weight: 900;
  color: var(--mincloud-cyan);
  margin: 18px 0;
}

.pricing-amount span {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  margin: 24px 0;
  text-align: left;
  font-size: 14px;
  color: var(--text-body);
}

.pricing-features li {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li::before {
  content: "✓";
  color: var(--mincloud-teal);
  font-weight: 900;
}

/* Modais */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 6, 15, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: #0d1527;
  border: 1px solid var(--mincloud-cyan);
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

/* Responsividade */
@media (max-width: 1024px) {
  .app-sidebar { width: 80px; padding: 20px 12px; }
  .brand-logo-text, .nav-item button span, .sidebar-plan-widget { display: none; }
  .app-main { margin-left: 80px; padding: 24px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
