/* ================================
   GLOBAL RESET & BASE STYLES
   ================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === PROFESSIONAL DESIGN SYSTEM === */
:root {
    /* Brand Colors - Minimal palette */
    --primary-color: #FF8C42;
    --primary-hover: #ff7a2e;
    --primary-light: rgba(255, 140, 66, 0.08);
    
    /* Neutral Colors - Clean grayscale */
    --text-dark: #1a1a1a;
    --text-medium: #666666;
    --text-light: #999999;
    
    /* Background Colors */
    --bg-white: #ffffff;
    --bg-cream: #fafaf9;
    --bg-light: #f5f5f4;
    --border-color: #e7e5e4;
    
    /* Semantic Colors */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    
    /* Spacing System (consistent) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 24px;
    --space-2xl: 32px;
    --space-3xl: 48px;
    
    /* Border Radius (consistent) */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Shadows (subtle) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08);
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

    /* Surfaces (fix missing vars + make UI consistent) */
    --card-bg: #ffffff;
    --input-bg: #ffffff;

    /* Premium ring + deeper shadow */
    --focus-ring: 0 0 0 4px rgba(255, 140, 66, 0.14);
    --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.12);

    /* Subtle glass border */
    --border-soft: rgba(231, 229, 228, 0.9);

}

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

body {
    font-family: var(--font-family);
    background: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    position: relative;
    overflow: hidden;
}

/* Subtle brand-tinted background glow (keeps your orange) */
.page-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 600px at 50% 0%, rgba(255, 140, 66, 0.12), transparent 60%),
        radial-gradient(700px 500px at 0% 100%, rgba(255, 140, 66, 0.08), transparent 55%),
        radial-gradient(700px 500px at 100% 100%, rgba(0, 0, 0, 0.03), transparent 55%);
    pointer-events: none;
}

/* Subtle noise texture effect (very light, MNC feel) */
.page-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E");
    opacity: 0.25;
    mix-blend-mode: multiply;
    pointer-events: none;
}


/* ================================
   LOGO & BRANDING
   ================================ */
.logo-section {
    text-align: center;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.logo-circle {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, rgba(255, 140, 66, 0.18), rgba(255, 255, 255, 0.9));
    border: 1px solid rgba(255, 140, 66, 0.22);
    box-shadow: 0 10px 30px rgba(255, 140, 66, 0.12);
}


.logo-text {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-dark);
}

/* ================================
   TYPOGRAPHY
   ================================ */
h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-dark);
    margin-bottom: 8px;
}


h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.subtitle {
    font-size: 15px;
    color: var(--text-medium);
    margin-bottom: 24px;
}

.helper-text {
    font-size: 13px;
    color: var(--text-medium);
    margin-top: 8px;
    line-height: 1.4;
}

.footer-text {
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 32px;
}

.footer-text a {
    color: var(--text-dark);
    text-decoration: underline;
}

/* ================================
   CARDS & CONTAINERS
   ================================ */
.card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    box-shadow: var(--shadow-xl);
    padding: 28px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.14);
}

.card-compact {
    padding: 24px;
}

/* ================================
   FORM ELEMENTS
   ================================ */
.input-group {
    margin-bottom: 24px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

input[type="tel"],
input[type="text"],
input[type="email"],
input[type="file"],
select {
    width: 100%;
    padding: 14px 14px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background-color: var(--input-bg);
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    font-family: var(--font-family);
    color: var(--text-dark);
}

input::placeholder {
    color: #a8a29e;
}

input:focus,
select:focus {
    outline: none;
    border-color: rgba(255, 140, 66, 0.6);
    box-shadow: var(--focus-ring);
}


/* ================================
   BUTTONS
   ================================ */
.btn {
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    font-family: var(--font-family);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    width: 100%;
    color: #fff;
    background: linear-gradient(180deg, var(--primary-color), var(--primary-hover));
    box-shadow: 0 10px 24px rgba(255, 140, 66, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(255, 140, 66, 0.30);
}

.btn-primary:active {
    transform: translateY(0px) scale(0.99);
}


.btn-secondary {
    width: 100%;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.btn-secondary:hover {
    background-color: #DDD5CA;
}

.btn-outline {
    width: 100%;
    color: var(--primary-color);
    background-color: transparent;
    border: 2px solid var(--primary-color);
}

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

/* ================================
   OTP INPUTS
   ================================ */
.otp-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.otp-input {
    width: 54px;
    height: 54px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background-color: var(--input-bg);
    padding: 0;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.otp-input:focus {
    outline: none;
    border-color: rgba(255, 140, 66, 0.6);
    box-shadow: var(--focus-ring);
}


/* ================================
   NAVIGATION & HEADER
   ================================ */
.header {
    background: var(--card-bg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

.credits-badge {
    background: var(--bg-light);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

/* ================================
   IMAGES & MEDIA
   ================================ */
.image-preview {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

/* ================================
   LOADING STATES
   ================================ */
.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

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

.loading-text {
    text-align: center;
    font-size: 16px;
    color: var(--text-medium);
    margin-top: 16px;
}

/* ================================
   UTILITY CLASSES
   ================================ */
.text-center {
    text-align: center;
}

.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.hidden {
    display: none !important;
}

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

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 480px) {
    .container {
        padding: 16px;
    }
    
    .card {
        padding: 32px 24px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .otp-input {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 480px;
    }
}

/* ================================
   LINKS
   ================================ */
.link {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.link:hover {
    opacity: 0.8;
}

.link-underline {
    text-decoration: underline;
}



/* === TOAST NOTIFICATIONS === */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 20px 25px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
    max-width: 90%;
    font-family: var(--font-family);
}

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

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

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.warning {
    border-left: 4px solid #f59e0b;
}

/* === RESPONSIVE IMPROVEMENTS === */
@media (max-width: 640px) {
    .toast {
        right: 10px;
        top: 10px;
        max-width: calc(100% - 20px);
    }
}

/* === TOP HEADER WITH MENU === */
.app-header {
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 90;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-light);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s;
    color: var(--text-dark);
}

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

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.credits-badge {
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid var(--border-color);
}

.menu-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-light);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s;
}

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

/* === SLIDE-IN MENU OVERLAY === */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* === SLIDE-IN MENU === */
.slide-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 12px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.slide-menu.active {
    left: 0;
}

.menu-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
}

.menu-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #ff6b2c);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.menu-user-details h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-dark);
}

.menu-user-details p {
    margin: 0;
    font-size: 13px;
    color: var(--text-medium);
}

.menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-medium);
    transition: all 0.2s;
}

.menu-close:hover {
    background: var(--border-color);
}

.menu-items {
    padding: 8px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    font-size: 15px;
    font-family: var(--font-family);
}

.menu-item:hover {
    background: var(--bg-light);
}

.menu-item-icon {
    width: 24px;
    font-size: 20px;
    text-align: center;
}

.menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.menu-item.logout {
    color: #ef4444;
}

.menu-item.logout:hover {
    background: #fee;
}

/* Remove old bottom nav */
.bottom-nav {
    display: none;
}

/* === CLEAN CARD SYSTEM === */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* === CLEAN BUTTONS === */
.btn {
    padding: var(--space-md) var(--space-xl);
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-family);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

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

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

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

.btn-secondary:hover {
    background: var(--bg-light);
}

/* ================================
   PAGE LAYOUT HELPERS
   ================================ */
.page-shell {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 6px 0;
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-medium);
    margin: 0;
}

.card-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.card-header-left {
    min-width: 0;
}

.card-header-left * {
    overflow-wrap: anywhere;
}

/* Prevent grid overflow on small screens */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 720px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 420px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Action list cards */
.action-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    text-decoration: none;
}

.action-card:active {
    transform: scale(0.99);
}

.action-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.action-meta {
    min-width: 0;
    flex: 1;
}

.action-meta .title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-dark);
    margin: 0 0 2px 0;
}

.action-meta .desc {
    font-size: 13px;
    color: var(--text-medium);
    margin: 0;
}

.chev {
    color: var(--text-medium);
    font-size: 18px;
    flex: 0 0 auto;
}

/* Inputs inside cards should not blow width */
input, select, button {
    max-width: 100%;
}

/* Safer email wrapping */
.mono-wrap {
    overflow-wrap: anywhere;
    word-break: break-word;
}


/* Loading Overlay */
/* ================================
   PREMIUM LOADING OVERLAY (NEW) - Enhanced Psychology
   ================================ */

.loading-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;

  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  animation: fadeIn 0.25s ease-out;
}

.loading-overlay.active { display: flex; }

/* This is the NEW card wrapper (your overlay content should be inside .loader) */
.loader {
  width: min(540px, 92vw);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,140,66,0.1);

  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Top row */
.loading-top {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.stage-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 26px;

  background: linear-gradient(135deg, rgba(255, 140, 66, 0.18) 0%, rgba(255, 140, 66, 0.12) 100%);
  border: 1.5px solid rgba(255, 140, 66, 0.28);
  box-shadow: 0 4px 12px rgba(255, 140, 66, 0.15);
  animation: iconPulse 2s ease-in-out infinite;
}

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

.stage-copy { flex: 1; min-width: 0; }

.stage-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
  margin-bottom: 2px;
}

.stage-sub {
  margin-top: 4px;
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.4;
}

/* Progress bar - Enhanced with shimmer effect */
.loading-bar-background {
  width: 100%;
  height: 14px;
  padding: 0;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.09);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
  overflow: hidden;
  position: relative;
}

.loading-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FF7A2E 0%, var(--primary-color) 50%, #FFA570 100%);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Shimmer effect on progress bar */
.loading-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* Hide the old white bars container */
.white-bars-container { display: none; }

/* Footer replaces the 4 bubbles */
.stage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.stage-chip {
  font-size: 12px;
  font-weight: 800;
  padding: 9px 12px;
  border-radius: 999px;

  background: linear-gradient(135deg, rgba(255, 140, 66, 0.15) 0%, rgba(255, 140, 66, 0.08) 100%);
  border: 1.5px solid rgba(255, 140, 66, 0.25);
  color: #9a3412;
  white-space: nowrap;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(255, 140, 66, 0.1);
}

.stage-hint {
  font-size: 12.5px;
  color: #64748b;
  text-align: right;
  flex: 1;
  font-weight: 500;
}

/* Animated dots - More dynamic */
.stage-dots {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.stage-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 140, 66, 0.5), rgba(255, 140, 66, 0.3));
  animation: dotPulse 1s infinite ease-in-out;
  box-shadow: 0 2px 4px rgba(255, 140, 66, 0.2);
}

.stage-dots span:nth-child(2) { animation-delay: 0.15s; }
.stage-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes dotPulse {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
  50% { transform: translateY(-3px) scale(1.2); opacity: 1; }
}

@media (max-width: 420px) {
  .loader { padding: 20px 16px; }
  .stage-hint { display: none; }
  .stage-icon { width: 48px; height: 48px; font-size: 24px; }
  .stage-title { font-size: 15px; }
  .stage-sub { font-size: 12.5px; }
}



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

/* Loader Animation */
.loader-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 200px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.3em;
  font-weight: 400;
  color: white;
  border-radius: 50%;
  background-color: transparent;
  user-select: none;
}

/* ================================
   FABRIC UPLOAD CHANGE BUTTONS
   ================================ */

#fabricUploadArea,
#blouseFabricUploadArea {
    position: relative !important;
}

.change-fabric-btn,
.change-blouse-btn {
    position: absolute !important;
    z-index: 1000 !important;
}

.change-fabric-btn:hover {
    background: var(--primary-hover) !important;
    transform: translateX(-50%) scale(1.05) !important;
}

.change-blouse-btn:hover {
    background: var(--primary-hover) !important;
    transform: scale(1.05) !important;
}
/* ================================
   DASHBOARD LAYOUT
   ================================ */
.dash-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 32px 16px 64px;
}

.dash-header {
    margin-bottom: 32px;
}

.dash-greeting {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-dark);
    margin: 0 0 6px 0;
}

.dash-tagline {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-medium);
    margin: 0;
}

/* CTA Hero - Enhanced to be more button-like */
.cta-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 26px 24px;
    margin-bottom: 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: 18px;
    text-decoration: none;
    color: white;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(255, 140, 66, 0.35), 0 2px 8px rgba(255, 140, 66, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Subtle shimmer effect to indicate interactivity */
.cta-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.6s;
}

.cta-hero:hover::before {
    left: 100%;
}

.cta-hero:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 32px rgba(255, 140, 66, 0.45), 0 4px 12px rgba(255, 140, 66, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.cta-hero:active {
    transform: translateY(-1px) scale(0.99);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.35);
}

.cta-content {
    flex: 1;
    min-width: 0;
}

.cta-title {
    font-size: 19px;
    font-weight: 800;
    margin: 0 0 4px 0;
    letter-spacing: -0.01em;
}

.cta-subtitle {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    opacity: 0.95;
}

.cta-icon {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Stats Grid */
.stats-section {
    margin-bottom: 32px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-dark);
    margin: 0;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-medium);
    margin: 0;
}

.stat-card.credits-highlight {
    background: linear-gradient(135deg, #fff9f5 0%, #fff 100%);
    border-color: #ffd4b3;
}

.stat-card.credits-highlight .stat-value {
    color: var(--primary-color);
}

/* Content Layout */
.content-layout {
    display: grid;
    gap: 24px;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-dark);
    margin: 0;
}

.view-all-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

.view-all-link:hover {
    opacity: 0.8;
}

/* Renders Grid */
.renders-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.render-card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.render-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.render-image {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
    background: #f5f5f5;
}

.render-info {
    padding: 12px;
}

.render-type {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 4px 0;
}

.render-time {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-medium);
    margin: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-icon {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 16px;
}

.empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.empty-subtitle {
    font-size: 14px;
    color: var(--text-medium);
    margin: 0 0 24px 0;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.action-icon {
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.action-content {
    flex: 1;
    min-width: 0;
}

.action-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 2px 0;
}

.action-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-medium);
    margin: 0;
}

.action-arrow {
    color: var(--text-medium);
    font-size: 18px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.action-card:hover .action-arrow {
    transform: translateX(2px);
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

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

.skeleton-render {
    width: 100%;
    aspect-ratio: 3/4;
}

/* Responsive */
@media (min-width: 640px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .renders-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
    .dash-wrap { padding: 40px 24px 80px; }
    .dash-greeting { font-size: 32px; }
    .dash-tagline { font-size: 16px; }
    .cta-hero { padding: 28px; }
    .cta-title { font-size: 20px; }
    .cta-subtitle { font-size: 15px; }
}

@media (min-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr 320px;
        gap: 32px;
    }
    .renders-grid { grid-template-columns: repeat(2, 1fr); }
}

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