@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   MAILWAVE — PREMIUM LIGHT THEME DESIGN SYSTEM
   Complete CSS for all dashboard pages, editors, auth, and admin
   ========================================================================== */

:root {
    /* Core Colors */
    --bg-main: #f4f6f8;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: rgba(79, 70, 229, 0.08);
    
    --accent: #0ea5e9;
    --accent-hover: #0284c7;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --text-dark: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    
    --sidebar-w: 260px;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body, html { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main); 
    color: var(--text-body); 
    min-height: 100vh; 
    width: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ==========================================================================
   SIDEBAR & NAVIGATION
   ========================================================================== */
.sidebar { 
    width: var(--sidebar-w); 
    background: var(--bg-sidebar); 
    border-right: 1px solid var(--border); 
    height: 100vh; 
    position: fixed; 
    padding: 28px 16px; 
    z-index: 50;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.logo, .sidebar-logo { 
    font-size: 20px; 
    font-weight: 700; 
    color: var(--text-dark); 
    margin-bottom: 36px; 
    display: flex; 
    align-items: center; 
    gap: 10px;
    padding: 0 8px;
    letter-spacing: -0.3px;
}
.logo i, .sidebar-logo i { 
    color: var(--primary); 
    font-size: 22px; 
}

.nav-item { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 11px 14px; 
    color: var(--text-muted); 
    text-decoration: none; 
    border-radius: 10px; 
    margin-bottom: 4px; 
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease; 
}
.nav-item:hover { 
    background: var(--bg-main); 
    color: var(--text-dark); 
    text-decoration: none;
}
.nav-item.active { 
    background: var(--primary-light); 
    color: var(--primary); 
    font-weight: 600;
}
.nav-item i { width: 20px; text-align: center; font-size: 16px; }

.mobile-header { display: none; }

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.main-content { 
    margin-left: var(--sidebar-w); 
    padding: 32px 40px; 
    width: calc(100% - var(--sidebar-w)); 
    min-height: 100vh;
}

.header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 32px; 
}
.header h1 { 
    font-size: 24px; 
    font-weight: 700; 
    color: var(--text-dark);
    letter-spacing: -0.5px;
}
.header-text { margin-bottom: 32px; }
.header-text h1 { font-size: 24px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.header-text p { color: var(--text-muted); font-size: 15px; }

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

.avatar { 
    width: 38px; 
    height: 38px; 
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 700; 
    font-size: 15px;
}

/* ==========================================================================
   CARDS & PANELS
   ========================================================================== */
.card, .stat-card, .panel, .glass-panel { 
    background: var(--bg-card); 
    padding: 24px; 
    border-radius: 14px; 
    border: 1px solid var(--border); 
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}
.card:hover, .stat-card:hover { box-shadow: var(--shadow-md); }

.panel-title { 
    font-size: 16px; 
    font-weight: 700; 
    margin-bottom: 20px; 
    color: var(--text-dark);
    letter-spacing: -0.3px;
}

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-title { color: var(--text-muted); font-size: 13px; font-weight: 500; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.3px; }
.stat-val { font-size: 28px; font-weight: 700; color: var(--text-dark); letter-spacing: -1px; }
.stat-desc { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.stat-icon { float: right; font-size: 24px; color: var(--primary); opacity: 0.15; }

/* Layout Grids */
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-bottom: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

/* ==========================================================================
   TABLES
   ========================================================================== */
table { width: 100%; border-collapse: collapse; }
th { 
    text-align: left; 
    padding: 14px 20px; 
    color: var(--text-muted); 
    font-weight: 600; 
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border); 
    background: #fafbfc; 
}
td { 
    padding: 14px 20px; 
    border-bottom: 1px solid var(--border); 
    font-size: 14px; 
    color: var(--text-body);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbfc; }

/* ==========================================================================
   BADGES
   ========================================================================== */
.badge { 
    padding: 5px 10px; 
    border-radius: 6px; 
    font-size: 12px; 
    font-weight: 600; 
    display: inline-block;
    letter-spacing: 0.2px;
}
.badge-draft { background: #f1f5f9; color: #64748b; }
.badge-sent { background: #dcfce7; color: #16a34a; }
.badge-sending { background: #dbeafe; color: #2563eb; }
.badge-scheduled { background: #fef3c7; color: #d97706; }
.badge-paused { background: #fce7f3; color: #db2777; }
.badge-active { background: #dcfce7; color: #16a34a; }
.badge-unsubscribed { background: #fee2e2; color: #dc2626; }
.badge-bounced { background: #fce7f3; color: #be185d; }
.badge-open { background: #dbeafe; color: #2563eb; }
.badge-click { background: #dcfce7; color: #16a34a; }
.badge-bounce { background: #fee2e2; color: #dc2626; }
.badge-unsubscribe { background: #fef3c7; color: #d97706; }
.badge-complained { background: #fce7f3; color: #db2777; }
.badge-plan { background: var(--primary-light); color: var(--primary); }
.badge-banned { background: #fee2e2; color: #dc2626; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn, .btn-primary, .btn-secondary, .btn-outline, .btn-danger, .btn-solid, 
.btn-accent, .btn-google, .btn-sm, .btn-plan, .btn-use { 
    padding: 10px 18px; 
    text-decoration: none !important;
    border-radius: 8px; 
    font-size: 14px; 
    font-weight: 600; 
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none; 
    cursor: pointer; 
    transition: all 0.15s ease; 
    line-height: 1.4;
}

.btn, .btn-primary { background: var(--primary); color: white !important; box-shadow: var(--shadow-xs); }
.btn:hover, .btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-secondary { background: white; color: var(--text-dark) !important; border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: #f8fafc; border-color: var(--text-dark); }

.btn-solid { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white !important; }
.btn-solid:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25); }

.btn-accent { background: linear-gradient(135deg, var(--accent), #06b6d4); color: white !important; }
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3); }

.btn-outline { background: transparent; color: var(--text-dark) !important; border: 1px solid var(--border-strong); box-shadow: none; }
.btn-outline:hover { background: #f8fafc; border-color: var(--text-dark); }

.btn-danger { background: #fee2e2; color: #dc2626 !important; box-shadow: none; border: 1px solid #fecaca; }
.btn-danger:hover { background: #fecaca; }

.btn-google { background: white; color: var(--text-dark) !important; border: 1px solid var(--border-strong); width: 100%; padding: 12px; font-size: 15px; margin-bottom: 20px; }
.btn-google:hover { background: #f8fafc; border-color: var(--text-dark); }
.btn-google img { width: 20px; height: 20px; }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }

.btn-plan { width: 100%; padding: 12px 20px; border-radius: 10px; font-size: 15px; }
.btn-plan.active { background: var(--bg-main); color: var(--text-muted) !important; cursor: default; pointer-events: none; }

.btn-use { padding: 8px 16px; font-size: 13px; width: 100%; }

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; color: var(--text-muted); font-size: 14px; border-top: 1px solid var(--border); }
.page-btns { display: flex; gap: 8px; }
.page-btn { padding: 8px 14px; background: white; border: 1px solid var(--border-strong); border-radius: 8px; color: var(--text-dark); text-decoration: none; font-weight: 500; font-size: 13px; transition: 0.2s; }
.page-btn:hover { background: #f8fafc; border-color: var(--text-dark); text-decoration: none; }
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--text-dark); font-size: 14px; font-weight: 600; }
.form-control, input, select, textarea {
    width: 100%; 
    padding: 10px 14px; 
    background: white;
    border: 1px solid var(--border-strong); 
    border-radius: 8px; 
    color: var(--text-body); 
    font-size: 14px; 
    transition: all 0.15s ease;
    font-family: inherit;
}
.form-control:focus, input:focus, select:focus, textarea:focus { 
    outline: none; 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08); 
}
.help-text { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(4px); z-index: 1000; align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content { background: white; width: 100%; max-width: 500px; padding: 32px; border-radius: 16px; position: relative; box-shadow: var(--shadow-xl); animation: modalSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes modalSlideIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-header h2, .modal-header h3 { font-size: 18px; font-weight: 700; color: var(--text-dark); }

.close-modal, .close-btn { position: absolute; top: 20px; right: 20px; background: none; border: none; font-size: 20px; color: var(--text-muted); cursor: pointer; transition: 0.15s; padding: 4px; border-radius: 6px; }
.close-modal:hover, .close-btn:hover { color: var(--text-dark); background: var(--bg-main); }

/* ==========================================================================
   ALERTS & TOAST
   ========================================================================== */
.alert { padding: 14px 16px; border-radius: 10px; margin-bottom: 20px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #16a34a; }

.toast { 
    position: fixed; 
    top: 24px; 
    right: 24px; 
    padding: 14px 24px; 
    border-radius: 10px; 
    color: white; 
    font-weight: 600; 
    font-size: 14px;
    z-index: 2000; 
    box-shadow: var(--shadow-lg);
    transform: translateY(-100px); 
    opacity: 0; 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ==========================================================================
   AUTH PAGES (Login, Register, Forgot, Reset)
   ========================================================================== */
.split-layout { display: flex; width: 100%; min-height: 100vh; background: var(--bg-main); }

.visual-side { 
    flex: 1; 
    background: linear-gradient(135deg, #eef2ff 0%, #c7d2fe 50%, #ddd6fe 100%); 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    padding: 60px; 
    position: relative; 
    overflow: hidden; 
}
.visual-content { position: relative; z-index: 2; max-width: 480px; }
.visual-content h1 { font-size: 3rem; font-weight: 800; line-height: 1.1; margin-bottom: 20px; color: var(--text-dark); letter-spacing: -1.5px; }
.visual-content p { font-size: 1.15rem; color: var(--text-muted); line-height: 1.7; }

.form-side { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px; background: var(--bg-main); }
.auth-container { width: 100%; max-width: 440px; background: white; padding: 48px 40px; border-radius: 24px; box-shadow: var(--shadow-xl); border: 1px solid var(--border); }
.auth-container .logo, .auth-container .sidebar-logo { margin-bottom: 32px; font-size: 22px; padding: 0; }
.auth-container .btn, .auth-container .btn-primary { width: 100%; padding: 12px; font-size: 15px; }
.auth-container .title { font-size: 22px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.auth-container .subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
.auth-container .invalid-state { text-align: center; padding: 40px 0; }
.auth-container .invalid-state i { font-size: 48px; color: var(--danger); margin-bottom: 16px; display: block; }

.divider { display: flex; align-items: center; text-align: center; color: var(--text-muted); margin-bottom: 20px; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--border); }
.divider:not(:empty)::before { margin-right: .8em; }
.divider:not(:empty)::after { margin-left: .8em; }

.auth-links { margin-top: 28px; text-align: center; font-size: 14px; color: var(--text-muted); }
.auth-links a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-links a:hover { text-decoration: underline; }

/* Standalone auth pages (forgot, reset) - center the container */
body > .auth-container { 
    margin: 80px auto; 
}

/* ==========================================================================
   TOPBAR (Campaign Editor & Drag/Drop Editor)
   ========================================================================== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: white;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }

.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-main);
    color: var(--text-dark);
    text-decoration: none;
    transition: 0.15s;
    font-size: 16px;
    border: 1px solid var(--border);
}
.back-btn:hover { background: var(--border); text-decoration: none; }

.camp-name-input, .camp-name {
    border: none;
    background: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    padding: 4px 8px;
    border-radius: 6px;
    transition: 0.15s;
}
.camp-name-input:hover { background: var(--bg-main); }
.camp-name-input:focus { outline: none; background: var(--bg-main); box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1); }

/* ==========================================================================
   CAMPAIGN EDITOR
   ========================================================================== */
.editor-layout { display: flex; height: calc(100vh - 65px); border-top: none; overflow: hidden; background: white; }

.sidebar-left { width: 380px; background: white; border-right: 1px solid var(--border); padding: 24px; overflow-y: auto; flex-shrink: 0; }

.main-editor { flex: 1; display: flex; flex-direction: column; background: #fafbfc; position: relative; }
.editor-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; background: #f1f5f9; border-bottom: 1px solid var(--border); }
.editor-title { font-size: 13px; font-weight: 600; color: var(--text-muted); font-family: 'SF Mono', 'Fira Code', monospace; }
.html-editor { flex: 1; border: none; padding: 24px; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 13px; line-height: 1.7; resize: none; background: #fafbfc; color: var(--text-body); }
.html-editor:focus { outline: none; }

.ai-panel { background: #f8fafc; border: 1px solid var(--border); padding: 20px; border-radius: 12px; margin-bottom: 20px; }
.ai-panel h3 { font-size: 14px; font-weight: 700; margin-bottom: 8px; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.ai-prompt { width: 100%; height: 72px; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 8px; font-size: 13px; margin-bottom: 12px; resize: none; font-family: inherit; background: white; }
.ai-btn { width: 100%; padding: 10px 16px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; border: none; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; transition: 0.15s; display: flex; justify-content: center; align-items: center; gap: 8px; }
.ai-btn:hover { box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25); transform: translateY(-1px); }

.preview-fab { position: absolute; bottom: 24px; right: 24px; width: 52px; height: 52px; border-radius: 14px; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; border: none; box-shadow: var(--shadow-lg); transition: 0.2s; z-index: 10; }
.preview-fab:hover { transform: scale(1.05); background: var(--primary-hover); }

.preview-frame { width: 100%; height: 100%; border: none; background: white; }

/* Drag & Drop Editor Container */
.editor-container { width: 100%; height: calc(100vh - 65px); overflow: hidden; }

/* ==========================================================================
   TEMPLATE EDITOR
   ========================================================================== */
.canvas-panel { flex: 1; padding: 24px; overflow-y: auto; background: #fafbfc; }
.tools-panel { width: 340px; background: white; border-left: 1px solid var(--border); padding: 24px; overflow-y: auto; flex-shrink: 0; }

/* ==========================================================================
   TEMPLATES PAGE
   ========================================================================== */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.template-card { 
    background: white; 
    border: 1px solid var(--border); 
    border-radius: 14px; 
    overflow: hidden; 
    box-shadow: var(--shadow-sm); 
    transition: all 0.2s ease;
}
.template-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.template-preview { height: 200px; overflow: hidden; background: #fafbfc; border-bottom: 1px solid var(--border); }
.template-preview iframe { width: 100%; height: 100%; border: none; pointer-events: none; transform: scale(0.5); transform-origin: top left; width: 200%; height: 200%; }
.template-info { padding: 16px 20px; }
.template-name { font-size: 15px; font-weight: 600; color: var(--text-dark); margin-bottom: 4px; }
.template-category { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; font-weight: 500; margin-bottom: 14px; }

/* ==========================================================================
   PLAN / BILLING PAGE
   ========================================================================== */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 8px; }
.plan-card { 
    background: white; 
    padding: 32px 28px; 
    border-radius: 16px; 
    border: 2px solid var(--border); 
    transition: all 0.2s ease; 
    position: relative;
    box-shadow: var(--shadow-sm);
}
.plan-card:hover { box-shadow: var(--shadow-md); }
.plan-card.active { border-color: var(--primary); }
.plan-card.popular { border-color: var(--primary); box-shadow: var(--shadow-md); }

.popular-badge { 
    position: absolute; 
    top: -13px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: linear-gradient(135deg, var(--primary), var(--accent)); 
    color: white; 
    padding: 6px 16px; 
    border-radius: 20px; 
    font-size: 11px; 
    font-weight: 700; 
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    white-space: nowrap;
}
.plan-name { font-size: 18px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.plan-price { font-size: 40px; font-weight: 800; color: var(--text-dark); margin-bottom: 24px; letter-spacing: -1.5px; }
.plan-price span { font-size: 16px; color: var(--text-muted); font-weight: 500; letter-spacing: 0; }
.feature-list { list-style: none; margin-bottom: 28px; }
.feature-list li { padding: 8px 0; font-size: 14px; color: var(--text-body); display: flex; align-items: center; gap: 10px; }
.feature-list li i { color: var(--success); font-size: 14px; width: 18px; }

.qr-img { max-width: 200px; margin: 16px auto; display: block; border-radius: 8px; }
.loader { display: inline-block; width: 20px; height: 20px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   SETTINGS PAGE
   ========================================================================== */
.guide-box {
    background: linear-gradient(135deg, #f0f9ff, #eff6ff);
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 28px;
}
.guide-box h3 { font-size: 16px; font-weight: 700; color: var(--text-dark); margin-bottom: 20px; }
.step { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.step:last-child { margin-bottom: 0; }
.step-num { 
    min-width: 28px; 
    height: 28px; 
    border-radius: 50%; 
    background: var(--primary); 
    color: white; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 13px; 
    font-weight: 700;
    flex-shrink: 0;
}
.step-text { font-size: 14px; color: var(--text-body); line-height: 1.5; padding-top: 3px; }
.step-text a { color: var(--primary); font-weight: 600; }

/* ==========================================================================
   FORMS PAGE (Embed Form Generator)
   ========================================================================== */
.code-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--text-body);
    margin-bottom: 16px;
}
.preview-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    min-height: 200px;
}

/* ==========================================================================
   ADMIN PAGES
   ========================================================================== */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--success);
    font-weight: 600;
}
.live-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

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

/* ==========================================================================
   RESPONSIVE — MOBILE (768px)
   ========================================================================== */
@media (max-width: 768px) {
    body, html { flex-direction: column !important; display: flex !important; }
    
    /* Mobile Header */
    .mobile-header { 
        display: flex !important; 
        background: white; 
        padding: 14px 20px; 
        border-bottom: 1px solid var(--border); 
        justify-content: space-between; 
        align-items: center; 
        width: 100%; 
        position: sticky; 
        top: 0; 
        z-index: 100; 
        box-shadow: var(--shadow-sm); 
    }
    .mobile-header .logo { margin: 0; font-size: 18px; padding: 0; }
    .hamburger { background: none; border: none; color: var(--text-dark); font-size: 22px; cursor: pointer; padding: 4px; }
    
    /* Sidebar */
    .sidebar { 
        display: none; 
        width: 100% !important; 
        height: auto !important; 
        position: relative !important; 
        border-right: none !important; 
        padding: 16px !important; 
        z-index: 90; 
        border-bottom: 1px solid var(--border) !important; 
        flex-direction: column;
    }
    .sidebar.active { display: flex !important; }
    .sidebar .logo, .sidebar .sidebar-logo { display: none !important; }
    .nav-item { margin-bottom: 4px !important; }
    .sidebar a[href*="logout.php"] { position: relative !important; width: 100% !important; bottom: auto !important; margin-top: 16px !important; }
    
    /* Main Content */
    .main-content { margin-left: 0 !important; width: 100% !important; padding: 20px 16px !important; }
    .header { flex-direction: column !important; align-items: flex-start !important; gap: 12px !important; margin-bottom: 24px !important; }
    .header h1 { font-size: 20px !important; }
    .header .btn, .header .user-menu .btn { width: 100% !important; margin-top: 4px !important; }
    
    /* Grids → Single Column */
    .grid-2, .grid-3, .stats-grid, .form-row, .pricing-grid, .template-grid { 
        grid-template-columns: 1fr !important; 
        gap: 16px !important; 
    }
    
    /* Cards */
    .card, .stat-card, .panel, .plan-card, .template-card, .modal-content { 
        padding: 20px !important; 
        margin-bottom: 12px !important; 
    }
    .modal-content { max-width: 94% !important; margin: 16px auto !important; }
    
    /* Tables — Horizontal Scroll */
    .panel { overflow: hidden; }
    table { display: block !important; width: 100% !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch; white-space: nowrap !important; }
    td, th { padding: 10px 14px !important; font-size: 13px !important; }
    
    /* Auth Pages */
    .split-layout { flex-direction: column !important; }
    .visual-side { display: none !important; }
    .form-side { padding: 24px !important; width: 100% !important; }
    
    /* Buttons */
    .btn, .btn-primary, .btn-secondary { margin-bottom: 8px !important; }
    td .btn, td .btn-sm, td .btn-outline, td .btn-danger { width: auto !important; margin-bottom: 0 !important; }
    
    /* Topbar */
    .topbar { padding: 10px 16px !important; flex-wrap: wrap; gap: 10px; }
    .topbar-left { width: 100%; }
    .camp-name-input { font-size: 14px !important; }
    
    /* Editors */
    .editor-layout { flex-direction: column !important; height: auto !important; }
    .sidebar-left { width: 100% !important; border-right: none !important; border-bottom: 1px solid var(--border) !important; max-height: 50vh; overflow-y: auto; }
    .main-editor { min-height: 60vh; }
    .tools-panel, .canvas-panel { width: 100% !important; border-left: none !important; padding: 16px !important; }
    .tools-panel { border-top: 1px solid var(--border) !important; }
    .editor-container { height: calc(100vh - 120px); }
    
    /* Settings Guide */
    .guide-box { padding: 20px !important; }
    .step { gap: 10px; }
    
    /* Pagination */
    .pagination { flex-direction: column !important; gap: 12px !important; align-items: stretch !important; padding: 16px 0 0 0 !important; }
    .page-btns { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .page-btn { margin: 0 !important; text-align: center; }
    
    /* Forms Page */
    .code-box { font-size: 12px; max-height: 200px; }
}
