/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

:root {
  /* Brand colors from MakeSpiffy logo */
  --brand-dark-blue: #2E659A;
  --brand-teal: #37B9D6;
  --brand-green: #6FC747;
  
  /* Primary colors using brand palette */
  --primary-color: var(--brand-dark-blue);
  --primary-dark: #1e4a6b;
  --primary-light: var(--brand-teal);
  --accent-color: var(--brand-teal);
  --success-color: var(--brand-green);
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --border-color: #e5e7eb;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  line-height: 1.6;
}

/* Navigation */
.navbar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  min-height: 100px;
}

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

.nav-brand .brand-logo {
  height: 100px;
  width: auto;
  object-fit: contain;
  max-width: 300px;
}

.nav-brand .brand-text {
  display: none;
}

.nav-brand .brand-link {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-brand .brand-link:hover {
  opacity: 0.9;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  padding: 0.5rem 0;
  -webkit-tap-highlight-color: transparent;
}

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

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-weight: 500;
  color: var(--text-primary);
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: calc(100vh - 80px);
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.alert-success {
  background-color: rgba(111, 199, 71, 0.15);
  color: #2d5016;
  border: 1px solid rgba(111, 199, 71, 0.3);
}

.alert-error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-error ul {
  margin: 0.5rem 0 0 1rem;
  padding-left: 1rem;
}

/* Auth form links */
.auth-link-p {
  margin-bottom: 0.5rem;
}

.auth-link-p:last-child {
  margin-bottom: 0;
}

.auth-link {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-success:hover {
  background-color: #059669;
}

.btn-danger {
  background-color: var(--error-color);
  color: white;
}

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Cards */
.card {
  background: var(--bg-primary);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: var(--bg-primary);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(55, 185, 214, 0.1);
}

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

select.form-control {
  cursor: pointer;
}

.form-file {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border: 2px dashed var(--border-color);
  border-radius: 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.form-file:hover {
  border-color: var(--accent-color);
}

.form-file input[type="file"] {
  display: none;
}

.form-help {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 {
  grid-template-columns: 1fr;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Lists */
.list {
  list-style: none;
  background: var(--bg-primary);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.list-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s;
  min-height: 44px;
}

.list-item:hover {
  background-color: var(--bg-secondary);
}

.list-item:last-child {
  border-bottom: none;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 9999px;
}

.badge-success {
  background-color: rgba(111, 199, 71, 0.15);
  color: #2d5016;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background-color: rgba(55, 185, 214, 0.15);
  color: #0d4a5a;
}

.badge-secondary {
  background-color: rgba(107, 114, 128, 0.15);
  color: #374151;
}

/* Images */
.img-thumbnail {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.img-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

/* Hamburger toggle - hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover {
  background: var(--bg-secondary);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Responsive - Mobile first improvements */
@media (max-width: 768px) {
  .nav-container {
    flex-wrap: wrap;
    min-height: auto;
    padding: 0.75rem 1rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .nav-brand .brand-logo.brand-logo-desktop {
    display: none;
  }

  .nav-brand .brand-text {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
  }

  .nav-menu.nav-menu-open {
    display: flex;
  }

  .nav-menu .nav-link {
    padding: 1rem 0;
    font-size: 1.0625rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .nav-user {
    padding: 1rem 0;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    gap: 0.75rem;
  }

  .nav-user .user-avatar {
    width: 40px;
    height: 40px;
  }

  .main-content {
    padding: 1rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }

  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 1rem;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
    min-height: 48px;
    padding: 1rem;
  }

  .btn {
    min-height: 48px;
    padding: 1rem 1.5rem;
  }

  .flex-between {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}

/* Prevent body scroll when menu open on mobile */
@media (max-width: 768px) {
  body.nav-open {
    overflow: hidden;
  }
}

/* Progress Circle */
.progress-circle {
  transition: all 0.3s ease;
}

.progress-circle svg circle {
  transition: stroke-dashoffset 0.6s ease, stroke 0.3s ease;
}

/* Logo Styles */
.logo {
  height: auto;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.logo-small {
  height: 32px;
  width: auto;
}

.logo-medium {
  height: 60px;
  width: auto;
}

.logo-large {
  height: 120px;
  width: auto;
}

.form-logo {
  display: block;
  margin: 0 auto 2rem;
  max-width: 180px;
  height: auto;
}

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

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex {
  display: flex;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gap-2 {
  gap: 1rem;
}

/* ===== Landing Page ===== */
.main-content-landing {
  padding: 0;
  max-width: none;
}

.navbar-guest .nav-container {
  min-height: 72px;
}

.navbar-guest .brand-logo-guest {
  height: 56px;
  max-width: 180px;
}

@media (max-width: 768px) {
  .navbar-guest .brand-logo-guest {
    height: 44px;
    max-width: 140px;
  }
}

.landing {
  width: 100%;
}

.landing-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero */
.landing-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
  min-height: 70vh;
}

.landing-hero-content {
  animation: fadeInUp 0.6s ease-out;
}

.landing-hero-logo {
  width: 100%;
  max-width: 280px;
  height: auto;
  margin-bottom: 1.5rem;
}

.landing-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.25;
  color: #111827;
  margin-bottom: 1rem;
}

.landing-hero-subtitle {
  font-size: 1.125rem;
  color: #4b5563;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.landing-hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-hero {
  padding: 1rem 2rem;
  font-size: 1.0625rem;
  min-height: 52px;
}

.landing-hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.8s ease-out 0.2s both;
}

.landing-hero-image {
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  object-fit: cover;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Sections */
.landing-section {
  padding: 4rem 1.5rem;
}

.landing-section-alt {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.landing-section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: #111827;
  text-align: center;
  margin-bottom: 1rem;
}

.landing-section-lead {
  font-size: 1.125rem;
  color: #4b5563;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Features Grid */
.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.landing-feature {
  background: var(--bg-primary);
  border-radius: 1rem;
  padding: 1.75rem;
  border: 1px solid var(--border-color);
  transition: box-shadow 0.2s, transform 0.2s;
}

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

.landing-feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.landing-feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

.landing-feature-desc {
  font-size: 0.9375rem;
  color: #4b5563;
  line-height: 1.6;
}

/* CTA */
.landing-cta {
  background: linear-gradient(135deg, var(--brand-dark-blue), var(--brand-teal));
  color: white;
  text-align: center;
  padding: 5rem 1.5rem;
}

.landing-cta-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.landing-cta-subtitle {
  font-size: 1.125rem;
  opacity: 0.95;
  margin-bottom: 2rem;
}

.landing-cta-buttons .btn {
  background: white;
  color: var(--brand-dark-blue);
}

.landing-cta-buttons .btn:hover {
  background: var(--bg-secondary);
  color: var(--brand-dark-blue);
}

/* Landing Pricing */
.landing-pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 2rem auto 0;
}

.landing-price-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  position: relative;
}

.landing-price-card-featured {
  border-color: var(--brand-teal);
  border-width: 2px;
}

.landing-price-card-founder {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(46, 101, 154, 0.06), rgba(55, 185, 214, 0.06));
}

.landing-price-card .badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.landing-price-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

.landing-price-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  margin: 0.5rem 0;
}

.landing-price-amount span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.landing-price-note,
.landing-price-desc {
  font-size: 0.9375rem;
  color: #4b5563;
  line-height: 1.5;
}

/* Landing responsive */
@media (max-width: 768px) {
  .landing-hero {
    grid-template-columns: 1fr;
    padding: 2rem 1rem 3rem;
    min-height: auto;
    text-align: center;
  }

  .landing-hero-logo {
    margin-left: auto;
    margin-right: auto;
  }

  .landing-hero-cta {
    justify-content: center;
  }

  .landing-hero-cta .btn {
    width: 100%;
    max-width: 280px;
  }

  .landing-hero-visual {
    order: -1;
  }

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

  .landing-section {
    padding: 3rem 1rem;
  }

  .landing-features {
    grid-template-columns: 1fr;
    margin-top: 2rem;
  }

  .landing-pricing {
    grid-template-columns: 1fr;
  }

  .landing-price-card-founder {
    grid-column: 1;
  }
}
