/* ============================================
   TOLEDO INDOOR GARDEN - COMMERCIAL PREMIUM CSS
   Premium layer: animations, wizard, micro-interactions
   Builds on top of commercial.css
   ============================================ */

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

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes checkmark {
  0% { stroke-dashoffset: 60; }
  100% { stroke-dashoffset: 0; }
}

/* === HEADER ENHANCEMENTS === */
.header {
  animation: fadeIn 0.4s ease;
}

.logo-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--toledo-green);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dark);
  padding: 8px;
}

.mobile-nav-drawer {
  display: none;
  flex-direction: column;
  background: white;
  border-top: 1px solid var(--gray-200);
  padding: 8px 24px 16px;
}

.mobile-nav-drawer.open {
  display: flex;
}

.mobile-nav-drawer a {
  display: block;
  padding: 12px 0;
  color: var(--dark);
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid var(--gray-100);
}

.mobile-nav-drawer a.active {
  color: var(--toledo-green);
}

.mobile-phone-link {
  display: inline-block;
  margin-top: 12px;
  padding: 14px 0 !important;
  text-align: center;
  background: var(--toledo-green);
  color: white !important;
  border-radius: var(--radius-md);
  border: none !important;
}

/* === HERO ENHANCEMENTS === */
.page-hero {
  position: relative;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(71, 158, 82, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero h1 {
  animation: fadeInUp 0.6s ease;
}

.page-hero p {
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-badges {
  animation: fadeInUp 0.6s ease 0.2s both;
}

/* === BENEFITS SECTION === */
.benefits-section {
  padding: 60px 0 20px;
  background: white;
}

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

.benefit-card {
  background: white;
  padding: 28px 20px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--gray-200);
  text-align: center;
  transition: var(--transition);
  animation: fadeInUp 0.5s ease both;
}

.benefit-card:nth-child(1) { animation-delay: 0.1s; }
.benefit-card:nth-child(2) { animation-delay: 0.15s; }
.benefit-card:nth-child(3) { animation-delay: 0.2s; }
.benefit-card:nth-child(4) { animation-delay: 0.25s; }

.benefit-card:hover {
  border-color: var(--toledo-green);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--toledo-green-light);
  border-radius: 14px;
  margin-bottom: 16px;
}

.benefit-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.benefit-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* === WIZARD PROGRESS === */
.wizard-progress {
  margin-bottom: 32px;
  animation: fadeInUp 0.5s ease;
}

.wizard-progress-bar {
  height: 4px;
  background: var(--gray-200);
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden;
}

.wizard-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--toledo-green), var(--toledo-gold));
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}

.wizard-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  background: var(--gray-100);
  color: var(--gray-400);
  border: 2px solid var(--gray-200);
  transition: var(--transition);
}

.wizard-step.active .wizard-step-number {
  background: var(--toledo-green);
  color: white;
  border-color: var(--toledo-green);
  box-shadow: 0 4px 12px rgba(71, 158, 82, 0.3);
}

.wizard-step.completed .wizard-step-number {
  background: var(--toledo-green-light);
  color: var(--toledo-green);
  border-color: var(--toledo-green);
}

.wizard-step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-400);
  white-space: nowrap;
}

.wizard-step.active .wizard-step-label {
  color: var(--toledo-green);
}

.wizard-step.completed .wizard-step-label {
  color: var(--toledo-green-dark);
}

/* === WIZARD PANELS === */
.wizard-panel {
  display: none;
  animation: fadeInUp 0.4s ease;
}

.wizard-panel.active {
  display: block;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

/* === FORM ENHANCEMENTS === */
.form-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  margin-bottom: 28px;
}

.section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--toledo-green-light);
  border-radius: 12px;
  flex-shrink: 0;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--dark);
  margin-bottom: 6px;
}

.required {
  color: #ef4444;
  margin-left: 2px;
}

.form-error {
  display: none;
  color: #ef4444;
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
}

.form-error.visible {
  display: flex;
  align-items: center;
  gap: 4px;
  animation: fadeIn 0.2s ease;
}

.form-hint {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 6px;
}

/* Input focus ring animation */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--toledo-green);
  box-shadow: 0 0 0 3px rgba(71, 158, 82, 0.15);
}

/* Radio option enhancement */
.radio-option {
  transition: var(--transition);
}

.radio-option:has(input:checked) {
  border-color: var(--toledo-green);
  background: var(--toledo-green-light);
}

.radio-label {
  font-size: 14px;
  font-weight: 500;
}

/* === INPUT WITH ICON === */
.input-icon-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
  transition: color 0.3s ease;
  z-index: 1;
}

.input-icon-wrap .form-input:focus ~ .input-icon,
.input-icon-wrap .form-input:focus + .input-icon {
  color: var(--toledo-green);
}

.form-input.has-icon {
  padding-left: 42px;
}

/* === PASSWORD TOGGLE === */
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: var(--toledo-green);
}

/* === BUTTON SPINNER === */
.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

.btn-secondary .btn-spinner {
  border-color: rgba(0, 0, 0, 0.15);
  border-top-color: var(--dark);
}

/* === SUCCESS STATE === */
.apply-success {
  text-align: center;
  padding: 60px 40px !important;
  animation: scaleIn 0.5s ease;
}

.success-icon-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  background: var(--toledo-green-light);
  border-radius: 50%;
  margin-bottom: 24px;
}

.success-icon-ring svg {
  animation: checkmark 0.5s ease 0.3s both;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
}

.apply-success h2 {
  font-size: 28px;
  color: var(--toledo-green);
  margin-bottom: 12px;
}

.success-id {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 8px;
}

.success-detail {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 32px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* === LOGIN PAGE === */
.login-page {
  min-height: 100vh;
  background: var(--gray-50);
  position: relative;
  overflow: hidden;
}

.login-bg-pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(71, 158, 82, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(247, 201, 81, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  position: relative;
  z-index: 1;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s ease;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--toledo-green), var(--toledo-gold));
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo img {
  height: 56px;
  width: auto;
}

.login-title {
  text-align: center;
  font-size: 24px;
  margin-bottom: 6px;
  color: var(--dark);
}

.login-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
  line-height: 1.5;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.forgot-password {
  text-align: right;
  margin-top: -12px;
  margin-bottom: 24px;
}

.forgot-password a {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.forgot-password a:hover {
  color: var(--toledo-green);
}

.login-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.login-footer p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.login-footer a {
  color: var(--toledo-green);
  font-weight: 600;
}

.login-footer-trust {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-400) !important;
  font-size: 12px !important;
  margin-top: 4px;
}

/* Forgot section */
.forgot-section {
  animation: fadeIn 0.3s ease;
}

.forgot-title {
  font-size: 18px;
  margin-bottom: 6px;
}

.forgot-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.forgot-back {
  margin-top: 16px;
  text-align: center;
}

.forgot-back a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--toledo-green);
  font-size: 14px;
  font-weight: 600;
}

/* === PORTAL LAYOUT ENHANCEMENTS === */
.portal-body {
  background: var(--gray-50);
}

.portal-topbar {
  background: var(--dark);
  color: white;
  padding: 10px 0;
}

.portal-topbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.portal-company-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.portal-logo-link img {
  height: 32px;
  width: auto;
  display: block;
}

.portal-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
}

.portal-company-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--toledo-gold);
  letter-spacing: 0.3px;
}

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

.portal-user-email {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.portal-topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 13px;
  font-weight: 500;
}

.portal-topbar-link:hover {
  color: white !important;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 6px 14px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}

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

/* Portal Nav */
.portal-nav {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.portal-tabs {
  display: flex;
  list-style: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.portal-tabs::-webkit-scrollbar {
  display: none;
}

.portal-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 20px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  border: none;
  background: none;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
}

.portal-tab:hover {
  color: var(--toledo-green);
  background: var(--gray-50);
}

.portal-tab.active {
  color: var(--toledo-green);
  border-bottom-color: var(--toledo-green);
}

.portal-tab svg {
  flex-shrink: 0;
}

.portal-tab-badge {
  background: var(--toledo-green);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 50px;
  min-width: 20px;
  text-align: center;
  line-height: 1.4;
}

/* Mobile tab button */
.portal-mobile-tab-btn {
  display: none;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: white;
  border: none;
  border-bottom: 1px solid var(--gray-200);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--toledo-green);
  cursor: pointer;
}

/* Portal Main */
.portal-main {
  padding: 32px 0 60px;
  min-height: calc(100vh - 200px);
}

.portal-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.portal-section.active {
  display: block;
}

.section-title {
  font-size: 24px;
  margin-bottom: 24px;
}

/* Dashboard */
.dashboard-welcome {
  margin-bottom: 28px;
}

.dashboard-welcome h2 {
  font-size: 26px;
  margin-bottom: 4px;
}

.dashboard-welcome p {
  color: var(--text-muted);
  font-size: 15px;
}

/* Stats grid enhancement */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--toledo-green);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card:hover::after {
  opacity: 1;
}

/* Loading state */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--toledo-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Catalog info */
.catalog-info {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Portal Footer */
.portal-footer {
  background: white;
  border-top: 1px solid var(--gray-200);
  padding: 20px 0;
  margin-top: auto;
}

.portal-footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-footer p {
  color: var(--text-muted);
  font-size: 13px;
}

.portal-footer-support a {
  font-weight: 600;
}

/* === TRUST BAR === */
.trust-bar {
  background: white;
  border-top: 1px solid var(--gray-200);
  padding: 20px 0;
}

.trust-items {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

/* === FOOTER === */
.com-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.6);
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
}

/* === APPLY SECTION OVERRIDE === */
.apply-section {
  padding: 40px 0 60px;
  background: var(--gray-50);
}

.apply-container {
  max-width: 720px;
  margin: 0 auto;
}

.apply-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 44px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s ease;
}

.apply-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--toledo-green), var(--toledo-gold));
}

/* === COM HEADER (for apply page's simpler header) === */
.com-header {
  background: white;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.com-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 24px;
}

.com-logo {
  height: 50px;
  width: auto;
}

.com-header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.com-header-nav a {
  color: var(--dark);
  font-weight: 600;
  font-size: 14px;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Header */
  .nav { display: none; }
  .mobile-menu-btn { display: block; }

  /* Hero */
  .page-hero { padding: 60px 0 50px; }
  .hero-badges { gap: 8px; }
  .hero-badge { font-size: 12px; padding: 6px 14px; }

  /* Benefits */
  .benefits-section { padding: 40px 0 10px; }
  .benefits-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .benefit-card { padding: 20px 16px; }
  .benefit-icon { width: 44px; height: 44px; }
  .benefit-card h3 { font-size: 14px; }
  .benefit-card p { font-size: 12px; }

  /* Wizard */
  .wizard-step-label { font-size: 11px; }
  .wizard-step-number { width: 32px; height: 32px; font-size: 12px; }
  .wizard-actions { flex-direction: column-reverse; gap: 12px; }
  .wizard-actions .btn { width: 100%; }
  .wizard-actions > div { display: none; }

  /* Apply */
  .apply-section { padding: 24px 0 40px; }
  .apply-card { padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .form-section-title { font-size: 18px; }
  .section-icon { width: 36px; height: 36px; }
  .section-icon svg { width: 20px; height: 20px; }

  /* Login */
  .login-card { padding: 36px 24px; margin: 0 8px; }
  .login-title { font-size: 22px; }

  /* Portal */
  .portal-nav { display: none; }
  .portal-nav.mobile-open { display: block; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 999; background: white; padding-top: 60px; }
  .portal-nav.mobile-open .portal-tabs { flex-direction: column; }
  .portal-nav.mobile-open .portal-tab { padding: 16px 24px; border-bottom: 1px solid var(--gray-100); border-left: 3px solid transparent; }
  .portal-nav.mobile-open .portal-tab.active { border-left-color: var(--toledo-green); border-bottom-color: var(--gray-100); }
  .portal-mobile-tab-btn { display: flex; }

  .portal-main { padding: 20px 0 40px; }
  .portal-topbar-actions { gap: 10px; }
  .portal-user-email { display: none; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .dashboard-welcome h2 { font-size: 22px; }

  /* Trust bar */
  .trust-items { gap: 20px; }
  .trust-item { font-size: 12px; }

  /* Success */
  .apply-success { padding: 40px 24px !important; }
  .success-actions { flex-direction: column; }

  /* Com header mobile */
  .com-header-nav { display: none; }
}

@media (max-width: 480px) {
  .benefits-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .wizard-steps { gap: 4px; }
  .wizard-step-label { display: none; }

  .portal-topbar-content { justify-content: center; }
  .portal-company-info { flex-wrap: wrap; justify-content: center; }
}

/* === PRINT === */
@media print {
  .header, .com-header, .portal-topbar, .portal-nav,
  .portal-mobile-tab-btn, .trust-bar, .com-footer,
  .portal-footer, .wizard-progress, .wizard-actions { display: none; }
  .portal-section { display: block !important; }
  .apply-card { box-shadow: none; border: 1px solid #ddd; }
}
