/* ===================================
   3D Print My Pic — Design System
   White theme, Inter font, Indigo accent
   =================================== */

/* ---------- CSS Variables ---------- */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --primary-100: #e0e7ff;
    --accent: #a855f7;
    --gradient: linear-gradient(135deg, #6366f1, #a855f7);
    --gradient-hover: linear-gradient(135deg, #4f46e5, #9333ea);

    --text-dark: #0f172a;
    --text: #334155;
    --text-light: #64748b;
    --text-muted: #94a3b8;

    --white: #ffffff;
    --bg-light: #f8fafc;
    --bg-section: #f1f5f9;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.15);

    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    min-height: 100vh;
    font-size: 16px;
}

img {
    max-width: 100%;
    display: block;
}

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

a:hover {
    color: var(--primary-hover);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 3.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2.25rem; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.btn-primary {
    background: var(--gradient);
    color: #000;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    background: var(--gradient-hover);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
    color: #000;
}

.btn-outline {
    background: var(--white);
    color: var(--text-dark);
    border: 1.5px solid var(--border);
}

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

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

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

.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.0625rem; }
.btn-full { width: 100%; }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-dark);
    text-decoration: none;
}

.nav-logo:hover { color: var(--text-dark); }

.logo-icon {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a.btn-primary {
    color: #000;
}

.nav-links a:hover {
    color: var(--text-dark);
}

.nav-signin {
    font-weight: 600 !important;
    color: var(--text-dark) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 10rem 1.5rem 6rem;
    overflow: hidden;
    background: linear-gradient(180deg, var(--white) 0%, var(--primary-light) 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.hero-blob-1 {
    width: 600px;
    height: 600px;
    background: #c4b5fd;
    top: -200px;
    right: -100px;
    animation: float 20s ease-in-out infinite;
}

.hero-blob-2 {
    width: 400px;
    height: 400px;
    background: #93c5fd;
    bottom: -100px;
    left: -100px;
    animation: float 25s ease-in-out infinite reverse;
}

.hero-blob-3 {
    width: 300px;
    height: 300px;
    background: #f9a8d4;
    top: 50%;
    left: 50%;
    animation: float 15s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 1.5rem;
    border: 1px solid var(--primary-100);
}

.hero h1 {
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.hero-trust {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.trust-avatars {
    display: flex;
}

.trust-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--white);
    border: 2px solid var(--white);
    margin-right: -8px;
}

.hero-trust p {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Hero Visual */
.hero-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.hero-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.hero-card:hover {
    transform: translateY(-4px);
}

.hero-card-icon {
    margin-bottom: 1rem;
}

.hero-card span {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9375rem;
}

.hero-card-arrow {
    animation: pulse-arrow 2s ease-in-out infinite;
}

@keyframes pulse-arrow {
    0%, 100% { transform: translateX(0); opacity: 1; }
    50% { transform: translateX(6px); opacity: 0.6; }
}

/* ---------- Wave Dividers ---------- */
.wave-divider {
    margin-top: -1px;
    line-height: 0;
}

.wave-divider svg {
    width: 100%;
    height: 80px;
    display: block;
}

.wave-divider-flip {
    transform: scaleY(-1);
    margin-top: 0;
    margin-bottom: -1px;
}

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

.section-light {
    background: var(--bg-light);
}

.section-container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-label {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-header h2 {
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.0625rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- How It Works ---------- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.step-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

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

.step-number {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    background: var(--gradient);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
}

.step-icon {
    width: 72px;
    height: 72px;
    background: var(--primary-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
}

.step-card h3 {
    margin-bottom: 0.75rem;
}

.step-card p {
    color: var(--text-light);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ---------- Style Showcase ---------- */
.style-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.showcase-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.showcase-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.showcase-card h4 {
    margin-bottom: 0.5rem;
}

.showcase-card p {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ---------- Ideas / Perfect For ---------- */
.ideas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.idea-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.idea-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.idea-card h4 {
    margin-bottom: 0.5rem;
}

.idea-card p {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ---------- CTA Section ---------- */
.section-cta {
    background: var(--gradient);
    text-align: center;
    padding: 5rem 1.5rem;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--text-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 1.5rem 2rem;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .nav-logo {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-brand p {
    font-size: 0.9375rem;
    line-height: 1.6;
    max-width: 280px;
}

.footer-links h5 {
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
}

.footer-bottom-links a:hover {
    color: var(--white);
}

.footer-app {
    background: var(--bg-light);
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

.footer-app .footer-bottom {
    border-top: none;
    padding-top: 0;
}

.footer-app .footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.footer-app .footer-bottom-links a {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.footer-app .footer-bottom-links a:hover {
    color: var(--primary);
}

/* ---------- Auth Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

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

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
    color: var(--text-dark);
    background: var(--bg-light);
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.modal-header p {
    color: var(--text-light);
    font-size: 0.9375rem;
}

.auth-tabs {
    display: flex;
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 1.5rem;
}

.auth-tab {
    flex: 1;
    padding: 0.625rem 1rem;
    background: none;
    border: none;
    border-radius: 10px;
    color: var(--text-light);
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab.active {
    background: var(--white);
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}

.auth-form {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

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

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-dark);
    font-family: var(--font);
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.error-message {
    color: #ef4444;
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    min-height: 1.25rem;
}

.auth-footer-text {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

.auth-footer-text a {
    color: var(--primary);
    font-weight: 500;
}

/* ---------- User Menu ---------- */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu span {
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ---------- App Layout ---------- */
.app-main {
    padding-top: 72px;
    min-height: calc(100vh - 72px - 60px);
}

.app-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.app-step {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.app-step-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.app-step-number {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--gradient);
    color: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.0625rem;
}

.app-step-complete {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.app-step-header h2 {
    font-size: 1.375rem;
    margin-bottom: 0.25rem;
}

.app-step-header p {
    color: var(--text-light);
    font-size: 0.9375rem;
}

/* ---------- Upload Area ---------- */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background: var(--bg-light);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-icon-wrapper {
    width: 72px;
    height: 72px;
    background: var(--primary-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.upload-icon {
    width: 36px;
    height: 36px;
    color: var(--primary);
}

.upload-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.upload-or {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.75rem !important;
}

.upload-hint {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-top: 0.75rem;
}

/* ---------- Loading / Spinner ---------- */
.loading {
    text-align: center;
    padding: 2rem;
}

.loading p {
    color: var(--text-light);
    font-size: 0.9375rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

.spinner-sm {
    width: 28px;
    height: 28px;
    border-width: 2.5px;
}

.spinner-xs {
    width: 20px;
    height: 20px;
    border-width: 2px;
    margin: 0;
    border-color: rgba(255,255,255,0.3);
    border-top-color: white;
}

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

/* ---------- Paint Controls ---------- */
.paint-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.paint-canvas-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.paint-canvas-wrapper img {
    max-width: 100%;
    max-height: 500px;
    border-radius: var(--radius);
    display: block;
}

#paint-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius);
    cursor: crosshair;
}

.paint-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.brush-size-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-light);
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.brush-size-control label {
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
}

.brush-size-control input[type="range"] {
    width: 150px;
    accent-color: var(--primary);
}

#brush-size-value {
    color: var(--text-light);
    font-size: 0.875rem;
    min-width: 2ch;
    font-weight: 600;
}

.paint-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* ---------- Options Grid ---------- */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 0.5rem;
}

.option-card {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

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

.option-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.option-card img {
    width: 100%;
    min-height: 200px;
    max-height: 400px;
    object-fit: contain;
    background: var(--white);
    border-radius: 8px;
}

.option-card .option-info {
    display: flex;
    justify-content: space-between;
    padding: 0.625rem 0.5rem 0.25rem;
    font-size: 0.8125rem;
}

.option-card .method {
    color: var(--text);
    font-weight: 500;
}

.option-card .confidence {
    color: var(--text-muted);
}

/* ---------- Style Options Grid ---------- */
.style-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.style-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--bg-light);
    border-radius: 8px;
}

/* ---------- Queue ---------- */
.queue-status {
    text-align: center;
    margin-bottom: 2rem;
}

.queue-position {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0.75rem;
}

.position-number {
    font-size: 4rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.position-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

#queue-wait {
    color: var(--text-light);
    font-size: 0.9375rem;
}

/* ---------- Progress ---------- */
.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    height: 8px;
    background: var(--bg-section);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: var(--radius-full);
}

#progress-text {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9375rem;
}

.processing-preview {
    text-align: center;
}

.processing-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--radius);
    opacity: 0.8;
}

.generation-time {
    color: var(--text-light);
    font-size: 0.9375rem;
}

/* ---------- Model Viewer ---------- */
.model-viewer-container {
    width: 100%;
    height: 500px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.model-viewer-main {
    height: 500px;
}

.model-viewer-half {
    height: 350px;
}

model-viewer {
    width: 100%;
    height: 100%;
}

.model-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--bg-light);
}

.model-loading p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.model-viewers-row {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.model-viewer-panel {
    flex: 1;
    min-width: 0;
}

.model-viewer-panel h3 {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

/* ---------- Download Buttons ---------- */
.download-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

/* ---------- Guidance Callout ---------- */
.guidance-callout {
    background: #eef2ff;
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text);
}

.guidance-callout p {
    margin-bottom: 0.5rem;
}

.guidance-callout p:last-child {
    margin-bottom: 0;
}

.guidance-callout strong {
    color: var(--text-dark);
}

.guidance-callout ul {
    margin: 0.25rem 0 0.5rem 1.25rem;
    padding: 0;
}

.guidance-callout ul:last-child {
    margin-bottom: 0;
}

.guidance-callout li {
    margin-bottom: 0.25rem;
}

/* ---------- Tips Modal ---------- */
.tips-modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 640px;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.tips-modal h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    text-align: center;
}

.tips-modal .tips-intro {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

.tips-section-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tips-section-label.good {
    color: #16a34a;
}

.tips-section-label.bad {
    color: #dc2626;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.tip-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.tip-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: var(--bg-light);
}

.tip-card .tip-caption {
    padding: 0.5rem;
    font-size: 0.75rem;
    color: var(--text);
    text-align: center;
    line-height: 1.3;
    background: var(--white);
}

.tip-badge {
    position: absolute;
    top: 0.375rem;
    right: 0.375rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tip-badge-good {
    background: #16a34a;
    color: white;
}

.tip-badge-bad {
    background: #dc2626;
    color: white;
}

.tips-bullets {
    margin: 0;
    padding: 0 0 0 1.25rem;
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.7;
}

.tips-bullets li {
    margin-bottom: 0.25rem;
}

.photo-tips-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font);
    padding: 0;
    margin-top: 0.5rem;
}

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

/* ---------- Skeleton Loading ---------- */
.skeleton {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 0.5rem;
    border: 2px solid transparent;
}

.skeleton .skeleton-img {
    width: 100%;
    min-height: 200px;
    background: linear-gradient(90deg, var(--bg-section) 25%, var(--border) 50%, var(--bg-section) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton .skeleton-text {
    height: 1rem;
    margin-top: 0.75rem;
    width: 60%;
    background: linear-gradient(90deg, var(--bg-section) 25%, var(--border) 50%, var(--bg-section) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

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

/* ---------- Legal Pages ---------- */
.legal-page {
    padding-top: 72px;
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.legal-container h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.legal-container .legal-updated {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 2.5rem;
}

.legal-container h2 {
    font-size: 1.375rem;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.legal-container p,
.legal-container li {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.legal-container ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-container li {
    margin-bottom: 0.375rem;
}

/* ---------- History Panel ---------- */
.history-panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.history-header:hover {
    background: var(--bg-light);
}

.history-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.history-header-left h3 {
    font-size: 1.125rem;
    margin: 0;
}

.history-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
}

.history-chevron {
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.history-chevron.collapsed {
    transform: rotate(-90deg);
}

.history-list {
    padding: 0 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-empty {
    text-align: center;
    padding: 1.5rem 0;
}

.history-empty p {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    border: 1.5px solid transparent;
}

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

.history-item.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.history-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-section);
}

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

.history-info {
    flex: 1;
    min-width: 0;
}

.history-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-complete .status-dot { background: #22c55e; }
.status-processing .status-dot { background: var(--primary); animation: pulse-dot 1.5s ease-in-out infinite; }
.status-queued .status-dot { background: #f59e0b; }
.status-error .status-dot { background: #ef4444; }
.status-cancelled .status-dot { background: var(--text-muted); }

.status-complete { color: #16a34a; }
.status-processing { color: var(--primary); }
.status-queued { color: #d97706; }
.status-error { color: #ef4444; }
.status-cancelled { color: var(--text-muted); }

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.history-date {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-top: 0.125rem;
}

.history-expiry {
    color: var(--warning, #e6a700);
    font-weight: 500;
}

/* ---------- Multi-Image Preview ---------- */
.image-preview-area {
    padding: 0.5rem 0 0;
}

.image-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.photo-counter {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.image-preview-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1.5px solid var(--border);
    background: var(--bg-light);
    aspect-ratio: 1;
}

.image-preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-preview-remove {
    position: absolute;
    top: 0.375rem;
    right: 0.375rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.7);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    padding: 0;
}

.image-preview-remove:hover {
    background: #ef4444;
}

/* ---------- Upload Error Banner ---------- */
.upload-error-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    animation: fadeIn 0.2s ease;
}

.upload-error-content {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 500;
}

.upload-error-content svg {
    flex-shrink: 0;
}

/* ---------- Size Selection ---------- */
/* Size Selection — layout is inline; CSS handles hover/interaction */
.size-card:hover {
    border-color: #6366f1 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15) !important;
}

#order-btn:hover {
    background: linear-gradient(135deg, #4f46e5, #9333ea) !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

/* Order Success Banner */
div.order-success-banner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.order-success-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-success-info h3 {
    font-size: 1.125rem;
    color: #166534;
    margin-bottom: 0.25rem;
}

.order-success-info p {
    font-size: 0.9375rem;
    color: #15803d;
    margin-bottom: 0.25rem;
}

.order-success-details {
    font-weight: 600;
}

/* ---------- Orders Section ---------- */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    transition: box-shadow 0.2s;
}

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

.order-card-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-section);
}

.order-card-thumb-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    flex-shrink: 0;
    background: var(--bg-section);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

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

.order-card-top {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.25rem;
}

.order-card-date {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

.order-status-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: capitalize;
}

.order-status-badge.status-paid {
    background: #dbeafe;
    color: #1d4ed8;
}

.order-status-badge.status-printing {
    background: #fef3c7;
    color: #b45309;
}

.order-status-badge.status-shipped {
    background: #e0e7ff;
    color: #4338ca;
}

.order-status-badge.status-delivered {
    background: #dcfce7;
    color: #15803d;
}

.order-card-details {
    font-size: 0.8125rem;
    color: var(--text-light);
}

.order-card-tracking {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.order-card-actions {
    flex-shrink: 0;
}

/* Order Model Viewer Modal */
.order-model-modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 700px;
    height: 70vh;
    max-height: 600px;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.order-model-modal-content .modal-close {
    z-index: 10;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .order-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-card-actions {
        width: 100%;
    }

    .order-card-actions .btn {
        width: 100%;
    }

    .order-model-modal-content {
        width: 95%;
        height: 60vh;
    }
}

/* ---------- Admin Section ---------- */

/* Admin tabs */
.admin-tabs {
    display: flex;
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.admin-tab {
    flex: 1;
    padding: 0.625rem 1rem;
    background: none;
    border: none;
    border-radius: 10px;
    color: var(--text-light);
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.admin-tab:hover {
    color: var(--text-dark);
}

.admin-tab.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

/* Admin stat cards */
.admin-stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.admin-stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.admin-stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Status breakdown */
.admin-status-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.admin-status-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-light);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
}

.admin-status-item .count {
    font-weight: 700;
}

/* Admin tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table th {
    text-align: left;
    padding: 0.75rem 0.75rem;
    background: var(--bg-light);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.admin-table td {
    padding: 0.75rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: var(--bg-light);
}

.admin-table .truncate {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: monospace;
    font-size: 0.8125rem;
}

/* Admin badges */
.admin-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: capitalize;
    white-space: nowrap;
}

.admin-badge-pending { background: #f3f4f6; color: #6b7280; }
.admin-badge-queued { background: #fef3c7; color: #b45309; }
.admin-badge-processing { background: #dbeafe; color: #1d4ed8; }
.admin-badge-complete { background: #dcfce7; color: #15803d; }
.admin-badge-error { background: #fee2e2; color: #dc2626; }
.admin-badge-cancelled { background: #f3f4f6; color: #6b7280; }
.admin-badge-active { background: #dcfce7; color: #15803d; }
.admin-badge-inactive { background: #fee2e2; color: #dc2626; }

/* Admin buttons */
.admin-btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.admin-btn-warn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-btn-warn:hover {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

/* Admin confirm dialog */
.admin-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.admin-confirm-dialog {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

.admin-confirm-dialog h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.admin-confirm-dialog p {
    color: var(--text-light);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.admin-confirm-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Existing admin order styles */
.admin-orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-loading, .admin-empty, .admin-error {
    text-align: center;
    color: #94a3b8;
    padding: 2rem 0;
}

.admin-error {
    color: #ef4444;
}

.admin-order-row {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.admin-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.admin-order-header strong {
    font-size: 0.9375rem;
    color: #0f172a;
}

.admin-order-date {
    color: #94a3b8;
    font-size: 0.8125rem;
    margin-left: 0.75rem;
}

.admin-order-amount {
    font-weight: 600;
    color: #6366f1;
    font-size: 0.9375rem;
}

.admin-order-body {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    align-items: flex-start;
}

.admin-order-shipping {
    flex: 1;
}

.admin-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.admin-address {
    font-size: 0.875rem;
    color: #334155;
    line-height: 1.5;
}

.admin-order-actions {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.admin-field label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.admin-status-select,
.admin-tracking-input {
    padding: 0.5rem 0.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.875rem;
    color: #0f172a;
    background: #ffffff;
}

.admin-tracking-input {
    width: 160px;
}

.admin-status-select:focus,
.admin-tracking-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ---------- Responsive ---------- */

/* Tablet */
@media (max-width: 1024px) {
    h1 { font-size: 2.75rem; }
    h2 { font-size: 2rem; }

    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-trust {
        justify-content: center;
    }

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

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

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }

    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem 1.5rem 1.5rem;
        gap: 0.75rem;
        box-shadow: var(--shadow-lg);
    }

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

    .nav-links a { font-size: 1rem; }

    .hero {
        padding: 8rem 1.5rem 4rem;
    }

    .hero-visual {
        flex-direction: row;
        gap: 0.75rem;
    }

    .hero-card {
        padding: 1.5rem 1rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

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

    .cta-content h2 {
        font-size: 1.75rem;
    }

    .section {
        padding: 3.5rem 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    /* App mobile */
    .app-container {
        padding: 1.25rem 1rem;
    }

    .app-step {
        padding: 1.5rem;
    }

    .app-step-header {
        flex-direction: column;
        gap: 0.75rem;
    }

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

    .style-options-grid {
        grid-template-columns: 1fr 1fr;
    }

    .model-viewers-row {
        flex-direction: column;
    }

    .model-viewer-half {
        height: 300px;
    }

    #size-cards-row {
        flex-direction: column !important;
    }

    .admin-order-body {
        flex-direction: column;
    }

    .admin-order-actions {
        width: 100%;
    }

    .admin-tracking-input {
        width: 100%;
    }

    .admin-tabs {
        flex-wrap: wrap;
    }

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

    .admin-table {
        font-size: 0.8125rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.5rem;
    }

    .download-buttons {
        flex-direction: column;
    }

    .download-buttons .btn {
        width: 100%;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }

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

    .history-list {
        padding: 0 1rem 1rem;
    }

    .history-header {
        padding: 1rem;
    }

    .history-thumb {
        width: 40px;
        height: 40px;
    }

    .upload-error-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .paint-buttons {
        flex-direction: column;
        width: 100%;
    }

    .paint-buttons .btn {
        width: 100%;
    }

    .modal {
        padding: 1.75rem;
        margin: 0.5rem;
        border-radius: var(--radius-lg);
    }

    .tips-modal {
        padding: 1.75rem;
        margin: 0.5rem;
    }

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

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    h1 { font-size: 1.875rem; }

    .hero { padding: 7rem 1rem 3rem; }

    .hero-card {
        padding: 1.25rem 0.75rem;
    }

    .hero-card-arrow svg {
        width: 28px;
        height: 28px;
    }

    .style-showcase-grid {
        grid-template-columns: 1fr;
    }

    .legal-container h1 {
        font-size: 1.875rem;
    }
}
