/* css/pages/dashboard.css */

.dashboard-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-gradient);
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: rgba(15, 23, 42, 0.4);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
  padding-bottom: 1rem;
}

.sidebar-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-menu {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
  cursor: pointer;
}

.menu-item:hover, .menu-item.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}
.menu-item.active {
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
}

/* User Profile Widget */
.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.user-widget {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
}
.user-info {
  display: flex;
  flex-direction: column;
}
.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}
.user-plan {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Main Content Area */
.dashboard-main {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 3rem;
}

.dashboard-header {
  margin-bottom: 2rem;
}
.dashboard-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* URL Input Card */
.analyze-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(12px);
}

.analyze-card-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.analyze-icon-box {
  width: 44px;
  height: 44px;
  background: rgba(99, 102, 241, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.analyze-input-group {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  gap: 0.5rem;
  max-width: 500px;
}
.analyze-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: white;
  outline: none;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

/* Metric Card */
.metric-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 2rem;
  backdrop-filter: blur(12px);
}

/* SEO Score Donut */
.seo-score-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

.donut-chart {
  position: relative;
  width: 160px;
  height: 160px;
}

.donut-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}
.donut-bg {
  fill: none;
  stroke: rgba(255,255,255,0.05); /* Grey/Dark border */
  stroke-width: 12;
}
.donut-value {
  fill: none;
  stroke: #f59e0b; /* Yellow/Orange representing "Bom" 78 rating */
  stroke-width: 12;
  stroke-dasharray: 400; /* Circumference approximation */
  stroke-dashoffset: 88; /* Shows 78% (400 - (400 * 0.78)) */
  stroke-linecap: round;
}

.donut-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.donut-number {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}
.donut-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.score-status {
  margin-top: 1.5rem;
  font-weight: 600;
  color: #f59e0b;
}

/* GSC Connection Placeholder */
.gsc-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
}
.gsc-icon {
  color: #f59e0b;
  margin-bottom: 1rem;
}
.gsc-buttons {
  margin-top: 1.5rem;
}

.gsc-stats-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  opacity: 0.3;
}
.gsc-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.gsc-stat-item svg {
  color: var(--text-muted);
}
.gsc-stat-val {
  font-weight: bold;
}
.gsc-stat-label {
  font-size: 0.75rem;
}

/* Audits Section */
.audits-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.audit-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 0.25rem;
}
.audit-tab {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-muted);
}
.audit-tab.active {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.audit-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.audit-item {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.audit-item:hover {
  background: rgba(255,255,255,0.02);
}

.audit-content-left {
  display: flex;
  gap: 1rem;
}
.audit-icon {
  margin-top: 0.2rem;
}
.audit-icon.error { color: #ef4444; }
.audit-icon.warning { color: #f59e0b; }
.audit-icon.success { color: #10b981; }

.audit-details h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.audit-details p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.audit-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.audit-content-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.5rem;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-error { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-success { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }

.view-solutions {
  font-size: 0.8rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}

/* Scrollbar styling for main content area */
.dashboard-main::-webkit-scrollbar {
  width: 8px;
}
.dashboard-main::-webkit-scrollbar-track {
  background: transparent;
}
.dashboard-main::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

/* ==================================
   Growth & ROI Specific Styles
================================== */

.growth-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  height: 100%;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.solution-drawer {
  overflow: hidden;
}

.solution-drawer h5 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.audit-item-wrapper {
  transition: all 0.3s ease;
}

.audit-item-wrapper:has(.solution-drawer[style*="display: block"]) .audit-item {
  border-radius: 12px 12px 0 0;
  background: rgba(255,255,255,0.04);
}

.growth-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.growth-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ROI Grid */
.roi-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
}

.roi-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-right: 1px solid var(--glass-border);
  padding-right: 1.5rem;
}

.form-group-slim {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group-slim label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.input-with-icon .currency {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.input-with-icon input {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  color: #fff;
  font-weight: 500;
  outline: none;
}

.form-group-slim input {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-weight: 500;
  outline: none;
}

.roi-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.roi-result-card {
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  transition: transform 0.2s, border-color 0.2s;
}

.roi-result-card:hover {
  transform: translateY(-2px);
}

.roi-result-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.roi-result-value {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.roi-result-meta {
  font-size: 0.75rem;
  font-weight: 500;
}

/* Tabular Data Components */
.seo-table-container {
  overflow-x: auto;
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
}

.seo-table th {
  text-align: left;
  padding: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--glass-border);
}

.seo-table td {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  vertical-align: middle;
  font-size: 0.9rem;
  color: var(--text-main);
}

.seo-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.product-col {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.dark-select {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  appearance: none; /* remove default arrow */
}
.dark-select:focus {
  border-color: var(--primary);
}

.btn-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.btn-action:hover {
  color: #fff;
}

.badge-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid;
}
.badge-red {
  color: #ef4444; border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.05);
}
.badge-green {
  color: #10b981; border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.05);
}

.ia-correction {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-main);
}

/* ==================================
   AI Copywriter Specific Styles
================================== */
.aicopy-grid {
   display: grid;
   grid-template-columns: 1fr 1fr 280px;
   gap: 1.5rem;
   height: calc(100vh - 180px);
}

.aicopy-col-left {
   display: flex;
   flex-direction: column;
   overflow-y: auto;
}

.dark-textarea {
   background: rgba(0,0,0,0.25);
   border: 1px solid rgba(255,255,255,0.05);
   border-radius: 8px;
   padding: 0.75rem 1rem;
   color: #fff;
   font-weight: 400;
   outline: none;
   font-family: inherit;
   resize: none;
}

.tone-radio-group {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 0.5rem;
}
.tone-radio {
   display: flex;
   align-items: center;
   gap: 0.5rem;
   padding: 0.5rem;
   border: 1px solid rgba(255,255,255,0.1);
   border-radius: 6px;
   font-size: 0.8rem;
   color: var(--text-muted);
   cursor: pointer;
   transition: all 0.2s;
}
.tone-radio.active {
   background: rgba(139, 92, 246, 0.15);
   border-color: #8b5cf6;
   color: #8b5cf6;
}

.aicopy-col-center {
   display: flex;
   flex-direction: column;
}

.ai-tabs {
   display: flex;
   gap: 0.5rem;
   margin-bottom: 1rem;
}
.ai-tab {
   display: flex;
   align-items: center;
   gap: 0.5rem;
   background: var(--card-bg);
   border: 1px solid var(--glass-border);
   padding: 0.5rem 1.5rem;
   border-radius: 6px;
   font-size: 0.85rem;
   color: var(--text-muted);
   cursor: pointer;
}
.ai-tab.active {
   border-color: rgba(255,255,255,0.15);
   color: white;
}

.ai-output-area {
   background: var(--card-bg);
   border: 1px solid var(--glass-border);
   border-radius: 12px;
   padding: 2rem;
}

.spinner {
   width: 40px;
   height: 40px;
   border: 3px solid rgba(139, 92, 246, 0.2);
   border-radius: 50%;
   border-top-color: #8b5cf6;
   animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
   to { transform: rotate(360deg); }
}

.result-text-box {
   background: rgba(0,0,0,0.2);
   border: 1px solid rgba(255,255,255,0.05);
   border-radius: 8px;
   padding: 1.5rem;
   flex: 1;
   font-size: 0.9rem;
   line-height: 1.6;
}

.score-checkmarks {
   display: flex;
   flex-direction: column;
   gap: 0.65rem;
}
.score-item {
   display: flex;
   align-items: center;
   gap: 0.5rem;
   font-size: 0.85rem;
   color: var(--text-muted);
   transition: color 0.2s;
}
.score-item.active {
   color: #10b981;
}
.score-item.active svg {
   color: #10b981;
}

/* ==================================
   Social Content Lab Specific Styles
================================== */
.social-grid {
   display: grid;
   grid-template-columns: 2fr 1fr;
   gap: 2rem;
}

.platform-toggles {
   display: flex;
   gap: 0.5rem;
   justify-content: center;
   margin-bottom: 2rem;
}
.plat-btn {
   background: rgba(0,0,0,0.3);
   border: 1px solid rgba(255,255,255,0.05);
   padding: 0.5rem 1.5rem;
   border-radius: 999px;
   color: var(--text-muted);
   font-size: 0.9rem;
   cursor: pointer;
   display: flex;
   align-items: center;
   gap: 0.5rem;
   transition: all 0.2s;
}
.plat-btn.active {
   background: rgba(236, 72, 153, 0.15); /* Pinkish */
   border-color: #ec4899;
   color: #ec4899;
}

.social-input-group {
   background: rgba(0,0,0,0.2);
   border: 1px solid rgba(255,255,255,0.05);
   border-radius: 12px;
   padding: 0.5rem;
   display: flex;
   align-items: center;
}
.social-input-group > svg {
   margin-left: 1rem;
   margin-right: 0.5rem;
}
.social-massive-input {
   background: transparent;
   border: none;
   flex: 1;
   color: #fff;
   font-size: 0.95rem;
   outline: none;
}
.social-btn-gerar {
   background: linear-gradient(135deg, #ec4899, #3b82f6);
   border: none;
   padding: 0.85rem 1.5rem;
   border-radius: 8px;
   color: #fff;
   font-weight: 600;
   font-size: 0.95rem;
   cursor: pointer;
   display: flex;
   align-items: center;
   gap: 0.5rem;
}

.social-icon-massive {
   width: 80px;
   height: 80px;
   border-radius: 20px;
   background: linear-gradient(135deg, #ec4899, #3b82f6);
   display: flex;
   align-items: center;
   justify-content: center;
   margin-bottom: 1.5rem;
}

.algo-list {
   list-style: none;
   padding: 0;
   display: flex;
   flex-direction: column;
   gap: 1rem;
}
.algo-list li {
   display: flex;
   align-items: flex-start;
   gap: 0.75rem;
   font-size: 0.85rem;
   color: var(--text-main);
   line-height: 1.4;
}
.algo-num {
   width: 20px;
   height: 20px;
   border-radius: 50%;
   background: rgba(236, 72, 153, 0.2);
   color: #ec4899;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 0.75rem;
   font-weight: 600;
   flex-shrink: 0;
}

.mock-phone {
   width: 100%;
   height: 250px;
   border: 4px solid var(--glass-border);
   border-radius: 24px;
   position: relative;
   overflow: hidden;
   background: rgba(0,0,0,0.3);
   display: flex;
   flex-direction: column;
   justify-content: space-between;
}
.mock-header {
   padding: 1rem;
   text-align: center;
   font-size: 0.8rem;
   color: var(--text-muted);
   border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mock-text-overlay {
   background: rgba(236, 72, 153, 0.85);
   color: #fff;
   align-self: center;
   padding: 0.4rem 0.8rem;
   border-radius: 8px;
   font-size: 0.8rem;
   font-weight: 600;
}
.mock-caption {
   padding: 1rem;
   background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
   font-size: 0.75rem;
   color: #fff;
}
