/* ===== Dashboard Specific Styles ===== */

.dashboard-app {
  position: relative;
  min-height: 100vh;
  background: #000000;
  color: #ffffff;
  overflow-x: hidden;
}

/* Background Gradients */
.dashboard-bg-gradients {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(800px 800px at 80% 10%, rgba(16, 185, 129, 0.14), transparent),
    radial-gradient(800px 800px at 10% 90%, rgba(168, 85, 247, 0.14), transparent);
}

/* ===== Header ===== */
.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
}

.header-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  height: 2rem;
  width: 2rem;
  border-radius: 0.5rem;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.brand-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff;
}

.brand-badge {
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: rgb(167, 243, 208);
  background: rgba(16, 185, 129, 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.back-link {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: #ffffff;
}

.logout-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.375rem;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-sans);
  font-size: 0.875rem;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Dashboard Navigation */
.dashboard-nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 0.75rem;
}

.dashboard-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-item {
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  border: 1px solid;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(40px);
  cursor: pointer;
}

.nav-item:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}

.nav-item:not(.active):hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-item.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: rgb(167, 243, 208);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.45);
}

/* ===== Main Content ===== */
.dashboard-main {
  position: relative;
  z-index: 10;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ===== Demo Notice ===== */
.demo-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
  color: rgb(167, 243, 208);
  margin-bottom: 2.5rem;
}

/* ===== Dashboard Sections ===== */
.dashboard-section {
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.section-header svg {
  color: rgb(110, 231, 183);
}

/* ===== KPIs Grid ===== */
.kpis-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .kpis-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .kpis-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.kpi-card {
  border-radius: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(40px);
  transition: all 0.3s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
}

.kpi-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.kpi-value {
  font-size: 1.875rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.kpi-delta {
  font-size: 0.75rem;
  margin-bottom: 1rem;
}

.kpi-delta.positive {
  color: rgb(110, 231, 183);
}

.kpi-delta.negative {
  color: rgb(252, 165, 165);
}

.kpi-progress {
  height: 0.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.kpi-progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--emerald-400), var(--sky-400), var(--fuchsia-400));
  border-radius: inherit;
  transition: width 1s ease-out;
}

/* ===== Charts Grid ===== */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .charts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.chart-card {
  border-radius: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(40px);
}

.chart-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.chart-header svg {
  color: rgb(110, 231, 183);
}

.chart-content {
  margin-top: 1rem;
}

/* Usage Bars */
.usage-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

.usage-bar {
  height: 4rem;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.usage-bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(16, 185, 129, 0.7);
  border-radius: inherit;
  transition: height 1s ease-out;
}

/* AI Accuracy Chart */
.accuracy-chart {
  height: 10rem;
  border-radius: 0.375rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  position: relative;
  overflow: hidden;
}

.accuracy-fill {
  position: absolute;
  inset-x: 0;
  bottom: 0;
  height: 65%;
  background: rgba(16, 185, 129, 0.6);
  transition: height 1s ease-out;
}

.accuracy-chart::before {
  content: '';
  position: absolute;
  inset-x: 0;
  bottom: 65%;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.accuracy-value {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  text-align: right;
}

.accuracy-value .value {
  font-size: 1.875rem;
  font-weight: 600;
  color: #ffffff;
}

.accuracy-value .label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: normal;
}

/* Security List */
.security-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ===== Automations Table ===== */
.table-container {
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.automations-table {
  width: 100%;
  min-width: 45rem;
  font-size: 0.875rem;
  border-collapse: collapse;
}

.automations-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.automations-table td {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.automation-status {
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid;
  font-size: 0.75rem;
  font-weight: 500;
}

.automation-status.active {
  color: rgb(167, 243, 208);
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
}

.automation-status.review {
  color: rgb(252, 211, 77);
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
}

/* ===== Activity Grid ===== */
.activity-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .activity-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .activity-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.activity-item {
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(40px);
  transition: all 0.3s ease;
}

.activity-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

.activity-title {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.activity-time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.75rem;
}

.activity-detail {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

/* ===== CTA Card ===== */
.cta-card {
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 768px) {
  .cta-card {
    flex-direction: row;
  }
}

.cta-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

.cta-content svg {
  color: rgb(110, 231, 183);
}

.cta-button {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: rgb(167, 243, 208);
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.cta-button:hover {
  background: rgba(16, 185, 129, 0.35);
  transform: translateY(-2px);
}

/* ===== Coming Soon Pages ===== */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  min-height: 50vh;
}

.coming-soon svg {
  color: rgb(110, 231, 183);
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.coming-soon h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1rem;
}

.coming-soon p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
  max-width: 32rem;
  line-height: 1.6;
}

.coming-soon ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  color: rgba(255, 255, 255, 0.8);
}

.coming-soon li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* ===== Responsive Design ===== */
@media (max-width: 767px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .dashboard-main {
    padding: 1rem;
  }
  
  .dashboard-section {
    margin-bottom: 2rem;
  }
  
  .section-title {
    font-size: 1.25rem;
  }
  
  .kpi-value {
    font-size: 1.5rem;
  }
  
  .chart-card {
    padding: 1rem;
  }
  
  .cta-card {
    padding: 1rem;
    text-align: center;
  }
}

@media (max-width: 479px) {
  .dashboard-nav {
    flex-direction: column;
  }
  
  .nav-item {
    text-align: center;
  }
  
  .automations-table {
    min-width: 40rem;
  }
  
  .coming-soon {
    padding: 2rem 1rem;
  }
  
  .coming-soon h2 {
    font-size: 1.5rem;
  }
}

/* ===== Animation Classes ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease-out;
}

.animate-delay-1 {
  animation-delay: 0.1s;
}

.animate-delay-2 {
  animation-delay: 0.2s;
}

.animate-delay-3 {
  animation-delay: 0.3s;
}

/* ===== Focus States ===== */
.nav-item:focus-visible,
.logout-btn:focus-visible,
.cta-button:focus-visible {
  outline: 2px solid var(--emerald-400);
  outline-offset: 2px;
}