/* =========================================
   SlimKozijn – ACCOUNT & AUTHENTICATION
   2026 World-Class Design System
   Mobile-First · Micro-Animations · Bento Grid
   ========================================= */

@import url("./theme.css");

/* =========================================
   CSS CUSTOM PROPERTIES (Account-specific)
   ========================================= */
:root {
  --account-sidebar-w: 280px;
  --account-sidebar-w-lg: 300px;
  --account-transition: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --account-stagger: 60ms;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-blur: 20px;
  --gradient-mesh: linear-gradient(135deg, #667eea11 0%, #764ba211 100%);
  --glow-primary: 0 0 40px rgba(47, 95, 143, 0.12);
  --card-hover-lift: -6px;
  --card-hover-shadow: 0 20px 60px rgba(15, 23, 42, 0.1), 0 4px 16px rgba(15, 23, 42, 0.06);
}

/* =========================================
   AUTH PAGE LAYOUT
   ========================================= */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  padding-top: var(--header-height);
}

.auth-page main {
  flex: 1;
  display: flex;
  align-items: stretch;
  min-height: 0;
}

/* =========================================
   AUTH SPLIT LAYOUT (Desktop: Brand + Form)
   ========================================= */
.auth-split {
  display: flex;
  width: 100%;
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100dvh - var(--header-height));
}

/* Left brand panel - desktop only */
.auth-brand {
  display: none;
  flex: 0 0 48%;
  max-width: 600px;
  background: 
    linear-gradient(135deg, 
      var(--heading) 0%, 
      #1e3a5f 25%,
      #1e40af 50%,
      #3b82f6 75%,
      var(--badge-info-bg) 100%
    );
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 5vw, 4rem);
}

/* Animated gradient mesh overlay */
.auth-brand::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 90%, rgba(6, 182, 212, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 10%, rgba(139, 92, 246, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
  animation: meshPulse 12s ease-in-out infinite;
}

@keyframes meshPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* Decorative grid pattern */
.auth-brand::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.auth-brand__content {
  position: relative;
  z-index: var(--z-base);
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  color: white;
}

.auth-brand__title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.03em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.auth-brand__text {
  font-size: 1.0625rem;
  line-height: 1.7;
  opacity: 0.9;
  max-width: 400px;
  margin-bottom: var(--space-2xl);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

.auth-brand__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.auth-brand__feature {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-brand__feature:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
  transform: translateX(6px);
  border-color: rgba(255, 255, 255, 0.25);
}

.auth-brand__feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-brand__feature-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.5;
}

.auth-brand__feature-text {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.auth-brand__feature-sub {
  font-size: 0.8125rem;
  opacity: 0.75;
  margin-top: 3px;
  font-weight: 400;
}

/* Right form panel */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-md);
  padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

/* =========================================
   AUTH CONTAINER (Form Card)
   ========================================= */
.auth-container {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.auth-card {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 24px;
  box-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.04),
    0 16px 40px rgba(0, 0, 0, 0.06);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  animation: authSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  animation-fill-mode: both;
}

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

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

.auth-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  background: linear-gradient(135deg, var(--cta-bg) 0%, #3b82f6 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(47, 95, 143, 0.25);
  position: relative;
}

.auth-logo::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.2));
  border-radius: inherit;
}

.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: var(--z-base);
}

.auth-title {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 800;
  color: var(--heading);
  margin-bottom: var(--space-xs);
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5;
}

/* =========================================
   MODERN FORM STYLES
   ========================================= */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--heading);
  transition: color 0.2s ease;
}

.form-group:focus-within .form-label {
  color: var(--cta-bg);
}

.form-input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  font-size: 16px;
  font-family: var(--font-family);
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:hover {
  border-color: rgba(47, 95, 143, 0.3);
}

.form-input:focus {
  outline: none;
  border-color: var(--cta-bg);
  box-shadow: 0 0 0 4px rgba(47, 95, 143, 0.1);
  background: var(--card);
}

.form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form-input--error,
.form-group.has-error .form-input {
  border-color: var(--error);
}

.form-input--error:focus,
.form-group.has-error .form-input:focus {
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.form-input.is-valid {
  border-color: var(--success);
  padding-right: 48px;
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 20 20' fill='%2316a34a' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px;
}

.form-input.is-invalid {
  border-color: var(--error);
}

/* Password field with toggle */
.form-input-wrapper {
  position: relative;
}

.form-input-wrapper .form-input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: 10px;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: none;
  background: none;
}

.password-toggle:hover {
  color: var(--heading);
  background: var(--bg-soft);
}

.password-toggle:active {
  transform: translateY(-50%) scale(0.92);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* Form error message */
.form-error {
  font-size: 12px;
  font-weight: 500;
  color: var(--error);
  display: none;
  align-items: center;
  gap: 4px;
  animation: shakeIn 0.4s ease;
}

.form-group.has-error .form-error {
  display: flex;
}

@keyframes shakeIn {
  0% { transform: translateX(-8px); opacity: 0; }
  30% { transform: translateX(4px); }
  60% { transform: translateX(-2px); }
  100% { transform: translateX(0); opacity: 1; }
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* Password strength */
.password-strength {
  margin-top: 4px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.password-strength.is-visible {
  opacity: 1;
  max-height: 50px;
}

.password-strength__bar {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.password-strength__fill {
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width 0.4s ease, background 0.4s ease;
}

.password-strength__fill[data-strength="weak"] { width: 33%; background: var(--error); }
.password-strength__fill[data-strength="medium"] { width: 66%; background: #f59e0b; }
.password-strength__fill[data-strength="strong"] { width: 100%; background: var(--success); }

.password-strength__text {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.password-strength__text[data-strength="weak"] { color: var(--error); }
.password-strength__text[data-strength="medium"] { color: #f59e0b; }
.password-strength__text[data-strength="strong"] { color: var(--success); }

/* =========================================
   LOADING & SUBMIT BUTTON
   ========================================= */
.auth-submit {
  margin-top: var(--space-sm);
  position: relative;
  overflow: hidden;
  min-height: 52px;
  font-weight: 700;
  font-size: var(--text-base);
  border-radius: 12px;
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-submit::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.auth-submit:hover::after { opacity: 1; }
.auth-submit:active { transform: scale(0.98); }
.auth-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.spinner { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-loader {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Form success state */
.auth-success {
  text-align: center;
  padding: var(--space-xl) 0;
  animation: successPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes successPop {
  0% { opacity: 0; transform: scale(0.9) translateY(10px); }
  50% { transform: scale(1.02) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-success__icon { margin-bottom: var(--space-lg); }
.auth-success__icon svg { filter: drop-shadow(0 4px 12px rgba(22, 163, 74, 0.3)); }

.auth-success__title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--heading);
  margin-bottom: var(--space-sm);
}

.auth-success__text {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.auth-success__note {
  font-size: var(--text-sm);
  color: var(--text-muted);
  opacity: 0.7;
}

/* =========================================
   CHECKBOX
   ========================================= */
.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.form-checkbox input[type="checkbox"]:checked {
  background: var(--cta-bg);
  border-color: var(--cta-bg);
  animation: checkPop 0.3s ease;
}

@keyframes checkPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.form-checkbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
}

.form-checkbox input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(47, 95, 143, 0.12);
}

.form-checkbox-label {
  font-size: var(--text-sm);
  color: var(--text);
  line-height: 1.5;
}

.form-checkbox-label a {
  color: var(--cta-bg);
  font-weight: 600;
  text-decoration: none;
}

.form-checkbox-label a:hover { text-decoration: underline; }

/* =========================================
   DIVIDER & SOCIAL LOGIN
   ========================================= */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.social-login {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn--social {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  font-family: var(--font-family);
  position: relative;
  overflow: hidden;
}

.btn--social::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.05) 0%, rgba(52, 168, 83, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.btn--social:hover {
  border-color: rgba(47, 95, 143, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.btn--social:hover::before { opacity: 1; }
.btn--social:active { transform: translateY(0); }

.btn--social svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Auth footer */
.auth-footer {
  text-align: center;
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.auth-footer p {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--cta-bg);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

.auth-footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cta-bg);
  border-radius: 1px;
  transition: width 0.3s ease;
}

.auth-footer a:hover::after { width: 100%; }

/* Forgot password link */
.auth-forgot {
  font-size: var(--text-sm);
  color: var(--cta-bg);
  font-weight: 600;
  text-decoration: none;
}

.auth-forgot:hover {
  color: var(--cta-bg-hover);
  text-decoration: underline;
}

/* Trust signals */
.auth-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
}

.auth-trust__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.auth-trust__item svg {
  width: 14px;
  height: 14px;
  color: var(--success);
  flex-shrink: 0;
}

/* =========================================
   ALERT MESSAGES
   ========================================= */
.auth-alert {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-md);
  display: none;
  align-items: center;
  gap: 10px;
  line-height: 1.5;
}

.auth-alert.is-visible {
  display: flex;
  animation: alertSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-alert--error {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.15);
  color: var(--error);
}

.auth-alert--success {
  background: rgba(22, 163, 74, 0.06);
  border: 1px solid rgba(22, 163, 74, 0.15);
  color: var(--success);
}

/* =========================================
   ACCOUNT DASHBOARD – PAGE LAYOUT
   ========================================= */
.account-page {
  padding-top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}

.account-layout {
  display: flex;
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100dvh - var(--header-height));
}

/* =========================================
   SIDEBAR NAVIGATION (Desktop)
   ========================================= */
.account-sidebar {
  display: none;
  flex: 0 0 var(--account-sidebar-w);
  width: var(--account-sidebar-w);
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: var(--space-xl) 0;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-profile {
  padding: 0 var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.sidebar-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto var(--space-md);
  position: relative;
  cursor: pointer;
}

.sidebar-avatar__circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cta-bg) 0%, #3b82f6 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 16px rgba(47, 95, 143, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-avatar:hover .sidebar-avatar__circle {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(47, 95, 143, 0.35);
}

.sidebar-avatar__badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.sidebar-avatar__badge svg {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
}

.sidebar-name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 2px;
}

.sidebar-email {
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
}

.sidebar-nav {
  padding: 0 var(--space-sm);
}

.sidebar-nav__group {
  margin-bottom: var(--space-lg);
}

.sidebar-nav__label {
  padding: var(--space-xs) var(--space-md);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.sidebar-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px var(--space-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  position: relative;
  font-family: var(--font-family);
}

.sidebar-nav__item:hover {
  background: var(--bg-soft);
  color: var(--heading);
}

.sidebar-nav__item.is-active {
  background: rgba(47, 95, 143, 0.08);
  color: var(--cta-bg);
}

.sidebar-nav__item.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--cta-bg);
}

.sidebar-nav__item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

.sidebar-nav__item.is-active svg { opacity: 1; }

.sidebar-nav__item .badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--cta-bg);
  color: white;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-nav__item--danger { color: var(--error); }
.sidebar-nav__item--danger svg { opacity: 0.8; }

.sidebar-nav__item--logout { color: var(--error); }
.sidebar-nav__item--logout:hover { background: rgba(220, 38, 38, 0.06); }
.sidebar-nav__item--logout svg { opacity: 0.8; }

.sidebar-nav__divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-sm) var(--space-md);
}

/* =========================================
   ACCOUNT MAIN CONTENT AREA
   ========================================= */
.account-main {
  flex: 1;
  min-width: 0;
  padding: var(--space-xl) var(--space-lg);
  padding-bottom: calc(var(--space-2xl) + env(safe-area-inset-bottom, 0px));
}

.account-container {
  max-width: 960px;
  margin: 0 auto;
}

/* =========================================
   ACCOUNT HEADER (Mobile)
   ========================================= */
.account-header {
  padding: var(--space-lg) 0;
  margin-bottom: var(--space-xl);
}

.account-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.account-user {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.account-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cta-bg) 0%, #3b82f6 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(47, 95, 143, 0.2);
}

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

.account-info h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--heading);
  margin-bottom: 2px;
  letter-spacing: -0.02em;
}

.account-info p {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.account-actions {
  display: flex;
  gap: 8px;
}

/* =========================================
   MOBILE TAB NAV (Segmented control)
   ========================================= */
.account-nav {
  display: flex;
  gap: 6px;
  margin-bottom: var(--space-xl);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 6px;
  background: var(--bg-soft);
  border-radius: 14px;
  border: 1px solid var(--border);
}

.account-nav::-webkit-scrollbar { display: none; }

.account-nav__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 10px;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  font-family: var(--font-family);
}

.account-nav__item:hover { color: var(--text); }

.account-nav__item.is-active {
  color: var(--heading);
  background: var(--card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.account-nav__item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.account-nav__item .badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--cta-bg);
  color: white;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================
   ACCOUNT PANELS
   ========================================= */
.account-panel {
  display: none;
}

.account-panel.is-active {
  display: block;
  animation: panelReveal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* =========================================
   PROFILE STATS ROW
   ========================================= */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: var(--space-lg);
  text-align: center;
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--cta-bg), #3b82f6);
}

.stat-card:nth-child(1)::before { background: linear-gradient(90deg, var(--cta-bg), #3b82f6); }
.stat-card:nth-child(2)::before { background: linear-gradient(90deg, var(--success-emphasis), var(--success-dark)); }
.stat-card:nth-child(3)::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
.stat-card--projects::before { background: linear-gradient(90deg, var(--cta-bg), #3b82f6); }
.stat-card--orders::before { background: linear-gradient(90deg, var(--success-emphasis), var(--success-dark)); }
.stat-card--quotes::before { background: linear-gradient(90deg, var(--badge-new-bg), #7c3aed); }
.stat-card--member::before { background: linear-gradient(90deg, #f59e0b, #d97706); }

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.stat-card__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto var(--space-sm);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card:nth-child(1) .stat-card__icon { background: rgba(47, 95, 143, 0.1); color: var(--cta-bg); }
.stat-card:nth-child(2) .stat-card__icon { background: rgba(16, 185, 129, 0.1); color: var(--success-emphasis); }
.stat-card:nth-child(3) .stat-card__icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.stat-card--projects .stat-card__icon { background: rgba(47, 95, 143, 0.1); color: var(--cta-bg); }
.stat-card--orders .stat-card__icon { background: rgba(16, 185, 129, 0.1); color: var(--success-emphasis); }
.stat-card--quotes .stat-card__icon { background: rgba(139, 92, 246, 0.1); color: var(--badge-new-bg); }
.stat-card--member .stat-card__icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

.stat-card__icon svg {
  width: 22px;
  height: 22px;
}

.stat-card__value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--heading);
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.stat-card__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* =========================================
   ACCOUNT SECTION CARD
   ========================================= */
.account-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: var(--space-lg);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.account-section:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.account-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.account-section__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.account-section__body {
  padding: var(--space-lg);
}

/* =========================================
   INFO LIST (Profile Details)
   ========================================= */
.info-list {
  display: grid;
  gap: 0;
}

.info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: var(--space-md);
}

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

.info-item__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.info-item__value {
  font-size: var(--text-sm);
  color: var(--text);
  text-align: right;
  word-break: break-word;
}

.text-muted {
  color: var(--text-muted);
  font-style: italic;
}

/* =========================================
   QUICK LINKS GRID
   ========================================= */
.quick-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.quick-link:hover {
  background: var(--card);
  border-color: var(--cta-bg);
  color: var(--cta-bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 95, 143, 0.08);
}

.quick-link:active { transform: translateY(0); }

.quick-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
}

.quick-link:hover svg { opacity: 1; }

/* =========================================
   PROJECTS GRID
   ========================================= */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(var(--card-hover-lift));
  box-shadow: var(--card-hover-shadow);
}

.project-card__image {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--bg-soft), var(--bg));
  overflow: hidden;
  position: relative;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-card__image img { transform: scale(1.05); }

.project-card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.project-card__image--placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}

.project-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 12px;
  background: rgba(15, 23, 42, 0.75);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
}

.project-card__body { padding: var(--space-md); }

.project-card__type {
  font-size: 11px;
  font-weight: 700;
  color: var(--cta-bg);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.project-card__title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 4px;
}

.project-card__date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.project-card__price {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--heading);
  margin-bottom: var(--space-md);
}

.project-card__actions {
  display: flex;
  gap: 8px;
}

.project-card__actions .btn {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}

/* =========================================
   ORDERS LIST
   ========================================= */
.orders-list {
  display: flex;
  flex-direction: column;
}

.order-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.order-item:last-child { border-bottom: none; }
.order-item:hover { background: rgba(47, 95, 143, 0.02); }

.order-item__image {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--bg);
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.order-item__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.order-item__info {
  flex: 1;
  min-width: 0;
}

.order-item__info h3 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 2px;
}

.order-item__info p {
  font-size: 12px;
  color: var(--text-muted);
}

.order-item__status {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.order-item__status--pending { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.order-item__status--processing { background: rgba(59, 130, 246, 0.1); color: var(--link); }
.order-item__status--shipped { background: rgba(16, 185, 129, 0.1); color: var(--success-dark); }
.order-item__status--completed { background: rgba(16, 185, 129, 0.1); color: var(--success-dark); }

.order-item__total {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--heading);
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

/* =========================================
   EMPTY STATE
   ========================================= */
.empty-state {
  text-align: center;
  padding: 3rem var(--space-lg);
}

.empty-state__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-lg);
  background: linear-gradient(135deg, rgba(47, 95, 143, 0.08), rgba(59, 130, 246, 0.06));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cta-bg);
  animation: emptyFloat 3s ease-in-out infinite;
}

@keyframes emptyFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.empty-state__icon svg {
  width: 36px;
  height: 36px;
  opacity: 0.7;
}

.empty-state__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 8px;
}

.empty-state__text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto var(--space-lg);
  line-height: 1.6;
}

/* =========================================
   SETTINGS FORM
   ========================================= */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.settings-form .form-group {
  max-width: 440px;
}

.form-row-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.form-row-settings .form-group { max-width: none; }

@media (max-width: 480px) {
  .form-row-settings { grid-template-columns: 1fr; }
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.settings-grid .form-group { max-width: none; }

.form-actions {
  display: flex;
  gap: 10px;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  margin-top: var(--space-sm);
}

/* Danger zone */
.danger-zone {
  border-color: rgba(220, 38, 38, 0.15);
  background: rgba(220, 38, 38, 0.02);
}

.danger-zone .account-section__header {
  border-bottom-color: rgba(220, 38, 38, 0.1);
}

.danger-zone .account-section__title { color: var(--error); }

.btn--danger-outline {
  border: 1.5px solid rgba(220, 38, 38, 0.3);
  color: var(--error);
  background: transparent;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  font-family: var(--font-family);
  font-size: var(--text-sm);
}

.btn--danger-outline:hover {
  background: rgba(220, 38, 38, 0.06);
  border-color: var(--error);
}

/* =========================================
   MODERN CONFIRMATION DIALOG
   ========================================= */
.dialog-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: var(--z-banner);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.dialog-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.dialog {
  background: var(--card);
  border-radius: 20px;
  padding: var(--space-xl);
  max-width: 400px;
  width: 100%;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
  transform: scale(0.92) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dialog-overlay.is-open .dialog {
  transform: scale(1) translateY(0);
}

.dialog__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog__icon--danger { background: rgba(220, 38, 38, 0.1); color: var(--error); }
.dialog__icon--success { background: rgba(22, 163, 74, 0.1); color: var(--success); }
.dialog__icon svg { width: 28px; height: 28px; }

.dialog__title {
  text-align: center;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 8px;
}

.dialog__text {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

.dialog__actions {
  display: flex;
  gap: 10px;
}

.dialog__actions .btn {
  flex: 1;
  min-height: 48px;
  border-radius: 12px;
  font-weight: 600;
}

/* =========================================
   SKELETON LOADING
   ========================================= */
.skeleton {
  background: linear-gradient(90deg, var(--bg-soft) 25%, var(--border) 50%, var(--bg-soft) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

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

.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text--lg { height: 20px; width: 60%; }
.skeleton-avatar { width: 56px; height: 56px; border-radius: 50%; }
.skeleton-card { height: 200px; border-radius: 16px; }

/* =========================================
   ACCOUNT HEADER ICON (In site header)
   ========================================= */
.account-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  color: var(--text-muted);
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  border: none;
  background: none;
}

.account-icon:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.account-icon svg { width: 22px; height: 22px; }

.account-icon--logged-in {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cta-bg) 0%, #3b82f6 100%);
  color: white;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(47, 95, 143, 0.25);
}

.account-icon--logged-in:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(47, 95, 143, 0.3);
}

/* Account dropdown */
.account-menu { position: relative; }

.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: var(--z-header-above);
  overflow: hidden;
}

.account-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.account-dropdown__header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}

.account-dropdown__name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--heading);
}

.account-dropdown__email {
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
}

.account-dropdown__menu { padding: 6px; }

.account-dropdown__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  border-radius: 10px;
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: var(--font-family);
  text-decoration: none;
}

.account-dropdown__link:hover {
  background: var(--bg-soft);
  color: var(--heading);
}

.account-dropdown__link svg {
  width: 18px;
  height: 18px;
  opacity: 0.55;
  flex-shrink: 0;
}

.account-dropdown__link:hover svg { opacity: 0.8; }
.account-dropdown__link--danger { color: var(--error); }
.account-dropdown__link--danger svg { opacity: 0.8; }

.account-dropdown__divider {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
}

/* =========================================
   DESKTOP ENHANCEMENTS (>=1024px)
   ========================================= */
@media (min-width: 1024px) {
  .auth-brand {
    display: flex;
    align-items: center;
  }
  
  .auth-form-panel {
    padding: var(--space-2xl) var(--space-xl);
  }
  
  .auth-container { max-width: 440px; }
  
  .auth-card {
    padding: var(--space-2xl);
    border: none;
    box-shadow: none;
    background: transparent;
  }
  
  .auth-title { font-size: 1.75rem; }
  .auth-trust { gap: var(--space-xl); }
  
  .account-sidebar { display: block; }
  .account-header { display: none; }
  .account-nav { display: none; }
  
  .account-main {
    padding: var(--space-2xl) var(--space-xl);
  }
  
  .account-container { max-width: 900px; }
  .profile-stats { grid-template-columns: repeat(3, 1fr); }
  .quick-links { grid-template-columns: repeat(4, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
  
  .order-item {
    padding: var(--space-lg);
    gap: var(--space-lg);
  }
  
  .order-item__image { width: 64px; height: 64px; }
  .settings-form .form-group { max-width: 400px; }
}

@media (min-width: 1200px) {
  .account-sidebar {
    flex: 0 0 var(--account-sidebar-w-lg);
    width: var(--account-sidebar-w-lg);
  }
  
  .account-main {
    padding: var(--space-2xl) var(--space-2xl);
  }
  
  .account-container { max-width: 960px; }
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================
   MOBILE (<=768px)
   ========================================= */
@media (max-width: 768px) {
  .auth-card { padding: var(--space-lg); }
  .auth-title { font-size: 1.375rem; }
  
  .account-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .account-actions { width: 100%; }
  .account-actions .btn { flex: 1; }
  
  .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .info-item__value { text-align: left; }
  .quick-links { grid-template-columns: 1fr; }
  
  .order-item {
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: var(--space-md);
  }
  
  .order-item__image { width: 48px; height: 48px; }
  .order-item__info { flex: 1; }
  
  .order-item__total {
    width: 100%;
    text-align: left;
    padding-top: var(--space-xs);
    border-top: 1px solid var(--border);
    margin-top: var(--space-xs);
  }
  
  .projects-grid { grid-template-columns: 1fr; }
  
  .account-page {
    padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 480px) {
  .auth-page main { padding: 0; }
  
  .auth-form-panel {
    padding: var(--space-lg) var(--space-md);
    align-items: flex-start;
    padding-top: var(--space-xl);
  }
  
  .auth-container { max-width: 100%; }
  
  .auth-card {
    border-radius: 0;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
  }
  
  .auth-footer { border-top: none; padding-top: var(--space-md); }
  .auth-trust { flex-wrap: wrap; justify-content: center; }
  
  .account-nav {
    margin: 0 calc(var(--space-lg) * -1) var(--space-lg);
    border-radius: 0;
    padding: 4px;
  }
  
  .project-card__actions { flex-direction: column; }
  .stat-card { padding: var(--space-md); }
  .stat-card__value { font-size: 1.25rem; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================
   TOUCH OPTIMIZATIONS
   ========================================= */
@media (hover: none) and (pointer: coarse) {
  .form-input,
  .btn,
  .account-nav__item,
  .sidebar-nav__item,
  .quick-link {
    min-height: 48px;
  }
  
  .form-checkbox input[type="checkbox"] { width: 24px; height: 24px; }
  
  .project-card:hover,
  .stat-card:hover,
  .quick-link:hover { transform: none; }
  
  .project-card:active { transform: scale(0.98); }
  .quick-link:active { transform: scale(0.97); background: var(--bg-soft); }
}

/* =========================================
   REDUCED MOTION
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .empty-state__icon { animation: none; }
}

/* =========================================
   PRINT
   ========================================= */
@media print {
  .account-sidebar,
  .account-nav,
  .account-actions,
  .sidebar-nav,
  .btn,
  .quick-links { display: none !important; }
  
  .account-main { padding: 0; }
  .account-section { border: 1px solid #ddd; break-inside: avoid; }
}
