/**
 * Dark Theme with Green Accents for EquitySense
 * A sleek, modern dark theme with green highlights
 * 
 * Note: All theme variables are now defined in common.css
 * This file provides additional typography and layout styles
 */

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

html,
body {
  height: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.3px;
  color: var(--text-light);
  background-color: var(--secondary-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-light);
  margin-bottom: var(--space-4);
  letter-spacing: -0.025em;
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.75rem;
}
h4 {
  font-size: 1.5rem;
}
h5 {
  font-size: 1.25rem;
}
h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--space-6);
  line-height: 1.8;
  color: var(--text-secondary);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover:not(.btn) {
  color: var(--primary-light);
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.site-header .container {
  padding-left: 0; /* Remove left padding for extreme left positioning */
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
}

/* Grid System */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(-1 * var(--space-4));
}

.col {
  flex: 1 0 0%;
  padding: 0 var(--space-4);
}

.col-auto {
  flex: 0 0 auto;
  width: auto;
}

.col-1 {
  flex: 0 0 auto;
  width: 8.333333%;
}
.col-2 {
  flex: 0 0 auto;
  width: 16.666667%;
}
.col-3 {
  flex: 0 0 auto;
  width: 25%;
}
.col-4 {
  flex: 0 0 auto;
  width: 33.333333%;
}
.col-5 {
  flex: 0 0 auto;
  width: 41.666667%;
}
.col-6 {
  flex: 0 0 auto;
  width: 50%;
}
.col-7 {
  flex: 0 0 auto;
  width: 58.333333%;
}
.col-8 {
  flex: 0 0 auto;
  width: 66.666667%;
}
.col-9 {
  flex: 0 0 auto;
  width: 75%;
}
.col-10 {
  flex: 0 0 auto;
  width: 83.333333%;
}
.col-11 {
  flex: 0 0 auto;
  width: 91.666667%;
}
.col-12 {
  flex: 0 0 auto;
  width: 100%;
}

/* Header */
.site-header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-accent);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  height: 100%;
  padding: var(--space-2) 0;
}

.brand-logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.user-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 100%;
  padding: var(--space-2) 0;
}

.welcome-text {
  font-size: 0.875rem;
  color: var(--neutral-600);
  white-space: nowrap;
}

/* Main Navigation */
.main-nav {
  display: flex;
  gap: var(--space-6);
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-600);
  padding: var(--space-2) 0;
  position: relative;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition-normal),
    box-shadow var(--transition-normal);
  border: 1px solid var(--border-accent);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: var(--space-8) var(--space-6) var(--space-6);
  border-bottom: 1px solid var(--border-accent);
  background-color: var(--card-bg);
}

.card-body {
  padding: var(--space-6);
  background: var(--bg-tertiary);
}

.card-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--border-accent);
  background-color: var(--card-bg);
}

/* Forms */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
}

.form-control {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-light);
  background-color: var(--form-bg);
  background-clip: padding-box;
  border: 1px solid var(--form-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-normal),
    box-shadow var(--transition-normal);
}

.form-control:focus {
  border-color: var(--form-focus-border);
  outline: 0;
  box-shadow: 0 0 0 3px var(--form-focus-shadow);
}

.form-control::placeholder {
  color: var(--form-placeholder);
  opacity: 1;
}

/* Hero Section */
.hero-section {
  padding: var(--space-20) 0 var(--space-16);
  background-color: var(--secondary-dark);
}

.hero-content {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.hero-text {
  flex: 1;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--text-light);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.hero-badge {
  display: inline-flex;
  flex-direction: column;
  padding: var(--space-3) var(--space-4);
  background-color: var(--hero-badge-bg);
  border: 1px solid var(--hero-badge-border);
  border-radius: var(--radius-md);
  color: var(--primary);
  font-weight: 500;
  box-shadow: 0 2px 8px var(--hero-badge-shadow);
  transition: all var(--transition-normal);
}

.hero-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--hero-badge-shadow);
}

.hero-badge-subtitle {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: var(--space-1);
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero-image-container {
  position: relative;
}

.hero-image {
  max-width: 100%;
  height: auto;
}

/* Features Section */
.features-section {
  padding: var(--space-16) 0;
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: var(--space-4);
}

.section-title p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header .section-title {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: var(--space-4);
}

.section-header .section-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

.feature-card {
  background-color: var(--secondary-light);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: transform var(--transition-normal),
    box-shadow var(--transition-normal);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: var(--space-4);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--text-light);
}

.feature-description {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.feature-item {
  text-align: center;
  padding: var(--space-6);
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
  .hero-content {
    flex-direction: column;
  }

  .hero-text,
  .hero-visual {
    width: 100%;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .site-header {
    height: auto;
    padding: var(--space-2) 0;
  }

  .header-inner {
    padding: 0 var(--space-4);
  }

  .brand-logo {
    width: 28px;
    height: 28px;
  }

  .brand-name {
    font-size: 1.125rem;
  }

  .brand-tagline {
    font-size: 0.7rem;
  }

  .user-nav {
    gap: var(--space-3);
  }

  .welcome-text {
    font-size: 0.8125rem;
  }

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

  .hero-subtitle {
    font-size: 1rem;
  }

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

  .section-subtitle {
    font-size: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}

.mt-1 {
  margin-top: var(--space-1);
}
.mt-2 {
  margin-top: var(--space-2);
}
.mt-3 {
  margin-top: var(--space-3);
}
.mt-4 {
  margin-top: var(--space-4);
}
.mt-6 {
  margin-top: var(--space-6);
}
.mt-8 {
  margin-top: var(--space-8);
}

.mb-1 {
  margin-bottom: var(--space-1);
}
.mb-2 {
  margin-bottom: var(--space-2);
}
.mb-3 {
  margin-bottom: var(--space-3);
}
.mb-4 {
  margin-bottom: var(--space-4);
}
.mb-6 {
  margin-bottom: var(--space-6);
}
.mb-8 {
  margin-bottom: var(--space-8);
}

.w-100 {
  width: 100%;
}
.h-100 {
  height: 100%;
}

.d-flex {
  display: flex;
}
.flex-column {
  flex-direction: column;
}
.justify-content-center {
  justify-content: center;
}
.justify-content-between {
  justify-content: space-between;
}
.align-items-center {
  align-items: center;
}
.flex-wrap {
  flex-wrap: wrap;
}
.gap-1 {
  gap: var(--space-1);
}
.gap-2 {
  gap: var(--space-2);
}
.gap-3 {
  gap: var(--space-3);
}
.gap-4 {
  gap: var(--space-4);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + var(--space-4));
  right: var(--space-4);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  background-color: var(--bg-tertiary);
  border-left: 4px solid var(--primary);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 320px;
  max-width: 420px;
  animation: slideIn 0.3s ease forwards;
  pointer-events: auto;
}

.toast-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: var(--space-1);
}

.toast-message {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.toast-close {
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-normal);
  flex-shrink: 0;
}

.toast-close:hover {
  color: var(--text-light);
}

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

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

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

.toast-error .toast-icon {
  color: var(--error);
}

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

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

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

.toast-info .toast-icon {
  color: var(--info);
}

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

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