/* ===================================================
   WedAura - Wedding Invitation Generator
   Design System & Core Styles
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600;700&family=Great+Vibes&display=swap');

:root {
    /* Color Palette */
    --primary: #b8860b;
    --primary-light: #d4a843;
    --primary-dark: #8b6508;
    --primary-glow: rgba(184, 134, 11, 0.15);
    
    --accent: #c41e3a;
    --accent-light: #e8425a;
    --accent-dark: #9a1730;
    
    --rose: #f43f5e;
    --rose-light: #fda4af;
    --rose-dark: #be123c;
    
    --gold: #f59e0b;
    --gold-light: #fbbf24;
    
    --bg-primary: #0f0f14;
    --bg-secondary: #1a1a24;
    --bg-card: #22222e;
    --bg-elevated: #2a2a38;
    --bg-input: #1e1e2a;
    --bg-hover: #2e2e3e;
    
    --text-primary: #f1f1f4;
    --text-secondary: #a0a0b4;
    --text-muted: #6b6b80;
    --text-accent: var(--primary-light);
    
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-focus: var(--primary);
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px var(--primary-glow);
    
    /* Typography */
    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-script: 'Great Vibes', cursive;
    
    /* Spacing */
    --sidebar-width: 260px;
    --header-height: 65px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.3s var(--ease);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary); }

img { max-width: 100%; height: auto; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===== Layout: Admin / Dashboard ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-brand {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.sidebar-brand h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-light), var(--rose-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
    font-weight: 600;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
}

.nav-link i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(184,134,11,0.15), rgba(196,30,58,0.1));
    color: var(--primary-light);
    border-left: 3px solid var(--primary);
}

.nav-link .badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
}

.top-bar {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(20px);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar-left h1 {
    font-size: 1.2rem;
    font-weight: 600;
}

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

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
}

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

.page-content {
    padding: 28px;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

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

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

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 22px;
}

.card-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* Stats Card */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-icon.gold { background: rgba(245,158,11,0.12); color: var(--gold); }
.stat-icon.rose { background: rgba(244,63,94,0.12); color: var(--rose); }
.stat-icon.blue { background: rgba(59,130,246,0.12); color: var(--info); }
.stat-icon.green { background: rgba(16,185,129,0.12); color: var(--success); }

.stat-info h4 {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-info .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn i { font-size: 1rem; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 2px 12px rgba(184,134,11,0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(184,134,11,0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    box-shadow: 0 2px 12px rgba(196,30,58,0.3);
}
.btn-accent:hover {
    color: #fff;
    transform: translateY(-1px);
}

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

.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; }

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

/* ===== Forms ===== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

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

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%236b6b80'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

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

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== Grid ===== */
.grid {
    display: grid;
    gap: 20px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== Table ===== */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

th {
    background: var(--bg-elevated);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover td {
    background: var(--bg-hover);
}

/* ===== Badge ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-free { background: rgba(16,185,129,0.12); color: var(--success); }
.badge-premium { background: rgba(245,158,11,0.12); color: var(--gold); }
.badge-active { background: rgba(16,185,129,0.12); color: var(--success); }
.badge-inactive { background: rgba(239,68,68,0.12); color: var(--danger); }

/* ===== Flash Messages ===== */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s var(--ease);
}

.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: var(--success); }
.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: var(--danger); }
.alert-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: var(--warning); }
.alert-info { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3); color: var(--info); }

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

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===== Template Cards ===== */
.template-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.template-card .template-image {
    width: 100%;
    aspect-ratio: 9/16;
    object-fit: cover;
    display: block;
}

.template-card .template-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
}

.template-card .template-info {
    padding: 14px 16px;
}

.template-card .template-info h4 {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.template-card .template-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.template-card .template-actions {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

/* ===== Auth Pages ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-glow), transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
}

.auth-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(244,63,94,0.1), transparent 70%);
    bottom: -80px;
    left: -80px;
    border-radius: 50%;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
}

.auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-brand .brand-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin: 0 auto 14px;
}

.auth-brand h1 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--primary-light), var(--rose-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-brand p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 4px;
}

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

/* ===== Landing Page ===== */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.landing-nav.scrolled {
    background: rgba(15,15,20,0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

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

.landing-nav .logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--rose-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.landing-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.landing-nav .nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.landing-nav .nav-links a:hover {
    color: var(--primary-light);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 120px 24px 80px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(184,134,11,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(244,63,94,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 0%, rgba(184,134,11,0.05) 0%, transparent 60%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 750px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: var(--primary-glow);
    border: 1px solid rgba(184,134,11,0.2);
    border-radius: 30px;
    font-size: 0.8rem;
    color: var(--primary-light);
    font-weight: 500;
    margin-bottom: 24px;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 3.4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary-light), var(--rose));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.hero-stats .stat h3 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-stats .stat p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

/* Features Section */
.section {
    padding: 80px 24px;
}

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

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.feature-card .icon {
    width: 56px;
    height: 56px;
    background: var(--primary-glow);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary-light);
    margin: 0 auto 16px;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Footer */
.landing-footer {
    padding: 40px 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.landing-footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Download Timer Modal ===== */
.download-timer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.download-timer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.timer-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    text-align: center;
    max-width: 420px;
    width: 90%;
}

.timer-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    position: relative;
}

.timer-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-circle .circle-bg {
    fill: none;
    stroke: var(--bg-elevated);
    stroke-width: 6;
}

.timer-circle .circle-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-light);
}

/* ===== Overlay Designer ===== */
.designer-layout {
    display: flex;
    gap: 0;
    height: calc(100vh - var(--header-height));
}

.designer-canvas-area {
    flex: 1;
    background: #0a0a10;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: auto;
    padding: 40px;
}

.designer-canvas-wrap {
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.designer-canvas-wrap img {
    display: block;
    max-height: 70vh;
    width: auto;
}

.designer-field {
    position: absolute;
    border: 2px dashed transparent;
    cursor: move;
    padding: 4px;
    min-width: 50px;
    min-height: 24px;
    user-select: none;
    transition: border-color 0.2s;
}

.designer-field:hover,
.designer-field.active {
    border-color: var(--primary);
    background: rgba(184,134,11,0.05);
}

.designer-field .field-label {
    position: absolute;
    top: -22px;
    left: 0;
    font-size: 0.65rem;
    background: var(--primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
}

.designer-field:hover .field-label,
.designer-field.active .field-label {
    opacity: 1;
}

.designer-field .resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border: 2px solid #fff;
    border-radius: 50%;
    bottom: -5px;
    right: -5px;
    cursor: se-resize;
    opacity: 0;
    transition: opacity 0.2s;
}

.designer-field:hover .resize-handle,
.designer-field.active .resize-handle {
    opacity: 1;
}

/* Designer Sidebar */
.designer-sidebar {
    width: 340px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    overflow-y: auto;
    padding: 20px;
}

.designer-sidebar h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.prop-group {
    margin-bottom: 14px;
}

.prop-group label {
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prop-row {
    display: flex;
    gap: 10px;
}

.prop-row .prop-group {
    flex: 1;
}

/* ===== Toggle Switch ===== */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.toggle .slider {
    position: absolute;
    inset: 0;
    background: var(--bg-elevated);
    border-radius: 12px;
    transition: var(--transition);
}

.toggle .slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--text-secondary);
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: var(--transition);
}

.toggle input:checked + .slider {
    background: var(--primary);
}

.toggle input:checked + .slider::before {
    transform: translateX(20px);
    background: #fff;
}

/* ===== Responsive ===== */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .designer-layout { flex-direction: column; height: auto; }
    .designer-sidebar { width: 100%; }
}

@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .hero h1 { font-size: 2.2rem; }
    .hero-stats { flex-direction: column; gap: 20px; }
    .hero-actions { flex-direction: column; }
    
    .page-content { padding: 16px; }
    
    .landing-nav .nav-links { display: none; }
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-light); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.w-full { width: 100%; }

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.animate-fadeIn { animation: fadeIn 0.5s var(--ease); }
.animate-fadeInUp { animation: fadeInUp 0.5s var(--ease); }

/* Image upload drop zone */
.drop-zone {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-md);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-glow);
}

.drop-zone i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.drop-zone p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* Ruler guides */
.ruler-h, .ruler-v {
    position: absolute;
    background: rgba(59,130,246,0.3);
    z-index: 100;
    pointer-events: none;
}
.ruler-h {
    height: 1px;
    width: 100%;
    left: 0;
}
.ruler-v {
    width: 1px;
    height: 100%;
    top: 0;
}

/* Grid overlay */
.grid-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    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: 20px 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.grid-overlay.visible {
    opacity: 1;
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

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

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Tab navigation */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary);
}
