:root {
    --bg-main: #f8fafc; --sidebar-bg: #0f172a; --sidebar-text: #94a3b8; --sidebar-hover: #1e293b;
    --card-bg: #ffffff; --text-main: #0f172a; --text-muted: #64748b; --primary: #3b82f6; --border: #e2e8f0;
    --card-primary: #212529; --card-secondary: #007bff; --card-primary-rgb: 33, 37, 41; --card-secondary-rgb: 0, 123, 255;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-main); color: var(--text-main); }
h1, h2, h3, h4, .title, .fab { font-family: 'Poppins', sans-serif; }

/* GLOBAL LAYOUT & SIDEBAR */
.dashboard-layout { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 260px; background-color: var(--sidebar-bg); display: flex; flex-direction: column; color: white; flex-shrink: 0;}
.brand { padding: 24px; display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.05); }
.brand-logo { width: 24px; height: 24px; background: linear-gradient(135deg, #3b82f6, #8b5cf6); border-radius: 6px; }
.nav-menu { flex: 1; padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto;}
.nav-link { padding: 12px 16px; color: var(--sidebar-text); text-decoration: none; border-radius: 8px; font-weight: 500; font-size: 14px; transition: all 0.2s; display:flex; align-items:center; gap:10px;}
.nav-link:hover { background-color: var(--sidebar-hover); color: white; }
.nav-link.active { background-color: var(--primary); color: white; }
.sidebar-footer { padding: 20px; border-top: 1px solid rgba(255,255,255,0.05); }
.user-profile { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary), #8b5cf6); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; color: white; }
.user-info strong { display: block; font-size: 14px; margin-bottom:2px;}
.user-info span { font-size: 12px; color: var(--sidebar-text); background: rgba(255,255,255,0.1); padding: 2px 8px; border-radius: 12px;}

.main-content { flex: 1; padding: 32px 40px; overflow-y: auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.page-title { font-size: 24px; font-weight: 700; margin-bottom: 4px; }

/* DASHBOARD ANALYTICS TABLES */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; margin-bottom: 32px; }
.kpi-card { background: var(--card-bg); padding: 24px; border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); display: flex; align-items: center; gap: 16px; }
.kpi-icon { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.kpi-label { display: block; color: var(--text-muted); font-size: 12px; font-weight: 600; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px;}
.kpi-value { font-size: 28px; font-weight: 700; }

.data-section { background: var(--card-bg); border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); margin-bottom: 40px; overflow:hidden;}
.section-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display:flex; justify-content:space-between; align-items:center;}
.section-header h3 { font-size: 16px; font-weight: 600; }
.table-container { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 16px 24px; background: #f8fafc; color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; border-bottom: 1px solid var(--border); }
.data-table td { padding: 16px 24px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; color: var(--text-main);}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background-color: #f1f5f9; }
.btn-action { background: transparent; border: 1px solid var(--border); padding: 6px 12px; border-radius: 6px; cursor: pointer; color: var(--text-muted); transition:0.2s; display:inline-flex; align-items:center; justify-content:center;}
.btn-action:hover { background: #f1f5f9; color: var(--text-main);}
.link-styled { color: var(--primary); text-decoration: none; font-weight: 500; }
.link-styled:hover { text-decoration: underline; }

/* BUILDER SPECIFIC */
.builder-grid { display: grid; grid-template-columns: 1fr 420px; gap: 40px; align-items: start; padding-bottom: 40px;}
.editor-card { background: var(--card-bg); padding: 32px; border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.editor-card h2 { font-size: 16px; margin: 30px 0 16px 0; border-bottom: 1px solid var(--border); padding-bottom: 10px; color:#0f172a;}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 12px; color: var(--text-muted); text-transform: uppercase;}
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 14px; transition:0.2s;}
.form-group input:focus, .form-group textarea:focus { border-color:var(--primary); outline:none; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);}
.file-upload-group input { border: 1px dashed #cbd5e1; background: #f8fafc; cursor: pointer;}
#generate-btn { width: 100%; padding: 16px; background: var(--primary); color: white; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); transition:0.2s;}
#generate-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4); }
.preview-container { position: sticky; top: 0; display: flex; justify-content: center; }

/* =========================================
   PREMIUM TEMPLATE DESIGNS 
   ========================================= */
/* BASE RULES - RESPONSIVE WIDTH */
.card-preview { width: 100%; max-width: 400px; margin: 0 auto; position: relative; text-align: left; transition: all 0.3s;}
.card-header { background-size: cover; background-position: center; position: relative; padding: 25px; display:flex; align-items:flex-start; justify-content:center;}
.card-header img { position: relative; z-index: 2; max-height: 60px; max-width: 140px; object-fit: contain; }
.card-body { padding: 0 25px 30px 25px; position: relative; }
.profile-row { display: flex; align-items: flex-end; gap: 15px;}
.profile-wrapper { position: relative; z-index: 3;}
.profile-wrapper img { width: 100px; height: 100px; object-fit: cover; }
.contact-inline { font-size: 14px; font-weight: 500; display: flex; align-items: center; flex-wrap: wrap; gap: 12px;}
.contact-inline a, .contact-inline span { display:flex; align-items:center; gap:6px; text-decoration:none;}
.services-grid { display: flex; flex-wrap: wrap; gap: 8px;}

/* 1. iOS MODERN CLASSIC */
.template-modern { background: #ffffff; border-radius: 24px; box-shadow: 0 20px 40px rgba(0,0,0,0.08); border: 1px solid rgba(0,0,0,0.05); overflow: hidden; }
.template-modern .card-header { height: 190px; background-color: #f1f5f9; }
.template-modern .card-header::before { content: ''; position: absolute; inset:0; background: linear-gradient(135deg, rgba(var(--card-primary-rgb), 0.85), rgba(var(--card-secondary-rgb), 0.85)); z-index: 1; backdrop-filter: blur(5px);}
.template-modern .profile-row { margin-top: -50px; margin-bottom: 20px; }
.template-modern .profile-wrapper img { border-radius: 20px; border: 4px solid #ffffff; box-shadow: 0 8px 24px rgba(0,0,0,0.12); background: #fff;}
.template-modern h3 { font-size: 24px; color: #0f172a; font-weight: 700; margin: 0 0 4px 0; letter-spacing: -0.5px;}
.template-modern .title { color: var(--card-primary); font-size: 14px; font-weight: 500; margin:0;}
.template-modern .contact-inline { border-bottom: 1px solid #f1f5f9; padding-bottom:20px; margin-bottom:20px;}
.template-modern .contact-inline span, .template-modern .contact-inline a { color: #475569; }
.template-modern .contact-inline .material-symbols-outlined { color: var(--card-secondary); background: rgba(var(--card-secondary-rgb), 0.1); padding: 6px; border-radius: 50%; font-size: 16px;}
.template-modern .service-tag { background: rgba(var(--card-primary-rgb), 0.05); color: var(--card-primary); padding: 8px 14px; border-radius: 12px; font-size:13px; font-weight:500;}
.template-modern h4 { font-size: 13px; text-transform: uppercase; margin: 0 0 12px 0; color:#94a3b8; letter-spacing: 1px;}

/* 2. DARK EXECUTIVE */
.template-dark { background: #0f172a; color: #f8fafc; border-radius: 16px; box-shadow: 0 25px 50px rgba(0,0,0,0.25); border: 1px solid #1e293b; overflow:hidden;}
.template-dark .card-header { height: 180px; filter: grayscale(20%); opacity:0.9;}
.template-dark .card-header::before { content: ''; position: absolute; inset:0; background: linear-gradient(to bottom, transparent, #0f172a); z-index: 1; }
.template-dark .profile-row { margin-top: -75px; flex-direction:column; align-items:center; text-align:center; margin-bottom:25px;}
.template-dark .profile-wrapper img { border-radius: 50%; border: 3px solid #0f172a; box-shadow: 0 0 0 2px var(--card-secondary); padding:2px; background: #0f172a;}
.template-dark h3 { font-size: 26px; color: #f8fafc; font-weight: 600; margin: 10px 0 2px 0; letter-spacing:-0.5px;}
.template-dark .title { color: var(--card-secondary); font-size: 13px; text-transform:uppercase; letter-spacing: 1.5px; margin:0;}
.template-dark .contact-inline { display:flex; flex-direction:column; gap:12px; margin-bottom: 25px;}
.template-dark .contact-inline span.divider { display:none; }
.template-dark .contact-inline a, .template-dark .contact-inline > span { color: #cbd5e1; background: #1e293b; padding:12px 16px; border-radius:10px; width: 100%; border: 1px solid #334155;}
.template-dark .service-tag { display:block; width:100%; background: transparent; color: #94a3b8; padding: 10px 0; border-bottom: 1px solid #1e293b; font-size: 14px;}
.template-dark h4 { color:#cbd5e1; font-size:12px; text-transform:uppercase; margin:0 0 12px 0; letter-spacing:1px;}

/* 3. GLASSMORPHISM */
.template-glass { background: rgba(255, 255, 255, 0.4); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 32px; border: 1px solid rgba(255, 255, 255, 0.5); box-shadow: 0 30px 60px rgba(0,0,0,0.1); color: #0f172a;}
.template-glass .card-header { background:transparent !important; height:120px; justify-content:center;}
.template-glass .card-header::before { display: none; }
.template-glass .profile-row { margin-top: 0; flex-direction:column; align-items:center; text-align:center; margin-bottom:20px;}
.template-glass .profile-wrapper img { border-radius: 50%; border: 4px solid rgba(255,255,255,0.6); box-shadow: 0 12px 24px rgba(0,0,0,0.15);}
.template-glass h3 { font-size: 28px; color: #0f172a; font-weight:800; margin: 15px 0 2px 0;}
.template-glass .title { color: #475569; font-size: 14px; font-weight:600; margin:0;}
.template-glass .contact-inline { justify-content:center; gap:15px; margin: 25px 0;}
.template-glass .contact-inline span.divider { display:none; }
.template-glass .contact-inline a, .template-glass .contact-inline > span { color: #0f172a; background: rgba(255,255,255,0.6); width:50px; height:50px; justify-content:center; border-radius:50%; box-shadow: 0 8px 16px rgba(0,0,0,0.05); font-size:0; transition:0.2s;} 
.template-glass .contact-inline .material-symbols-outlined { font-size: 22px; }
.template-glass .contact-inline a:hover { transform: translateY(-3px); background: #fff;}
.template-glass .service-tag { display:inline-block; background: rgba(255,255,255,0.5); color: #0f172a; padding: 8px 16px; border-radius: 12px; margin:4px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); font-size:13px; font-weight:600;}
.template-glass h4 { color: #0f172a; text-align:center; margin:0 0 16px 0; font-size:13px;}

/* 4. CLEAN MINIMAL */
.template-minimal { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); text-align: center; color: #0f172a;}
.template-minimal .card-header { height: 160px; background: #f8fafc !important; border-bottom: 1px solid #e2e8f0; justify-content:center;}
.template-minimal .card-header::before { display: none; }
.template-minimal .profile-row { margin-top: -60px; flex-direction: column; align-items: center; margin-bottom:25px;}
.template-minimal .profile-wrapper img { border-radius: 0; padding: 6px; background: white; border: 1px solid #e2e8f0;}
.template-minimal h3 { font-size: 26px; font-weight: 400; letter-spacing: -0.5px; margin: 0 0 6px 0;}
.template-minimal .title { font-weight: 500; color: #94a3b8; text-transform: uppercase; letter-spacing: 2px; font-size: 11px; margin:0;}
.template-minimal .contact-inline { justify-content: center; margin-bottom: 30px;}
.template-minimal .contact-inline a, .template-minimal .contact-inline span { color: #0f172a; font-weight:400; font-size:14px;}
.template-minimal .service-tag { display:inline-block; background: transparent; border: 1px solid #e2e8f0; color: #475569; border-radius: 4px; padding: 8px 16px; margin: 4px; font-size:13px;}
.template-minimal h4 { font-weight: 500; border-bottom: 1px solid #e2e8f0; padding-bottom: 12px; margin: 0 0 20px 0; color:#94a3b8; font-size:12px; text-transform:uppercase; letter-spacing:1px;}

/* 5. NEO-BRUTALISM */
.template-brutal { background: #ffffff; border: 4px solid #000; border-radius: 16px; box-shadow: 8px 8px 0px #000; overflow:hidden;}
.template-brutal .card-header { height: 180px; border-bottom: 4px solid #000; justify-content:center;}
.template-brutal .card-header::before { content: ''; position: absolute; inset:0; background: var(--card-primary); opacity: 0.9; z-index: 1; }
.template-brutal .profile-row { flex-direction: column; align-items: center; text-align: center; margin-top: -65px; margin-bottom:25px;}
.template-brutal .profile-wrapper img { border-radius: 12px; border: 4px solid #000; box-shadow: 4px 4px 0px #000; background: white;}
.template-brutal h3 { font-size: 28px; font-weight: 800; text-transform: uppercase; color: #000; margin: 0 0 4px 0; letter-spacing:-1px;}
.template-brutal .title { color: var(--card-secondary); font-weight: 800; font-size: 14px; text-transform: uppercase; margin:0; }
.template-brutal .contact-inline { justify-content: center; background: #f8fafc; padding: 15px; border-radius: 12px; border: 3px solid #000; box-shadow: 4px 4px 0px #000; margin-bottom: 30px;}
.template-brutal .contact-inline a, .template-brutal .contact-inline span { color: #000; font-weight: 700;}
.template-brutal .contact-inline .divider { display:none;}
.template-brutal .service-tag { display:inline-block; background: var(--card-secondary); color: #fff; border: 3px solid #000; box-shadow: 3px 3px 0px #000; border-radius: 8px; font-weight: 700; padding: 8px 16px; margin: 6px; font-size:14px;}
.template-brutal h4 { font-weight: 800; text-transform: uppercase; margin: 0 0 16px 0; font-size:16px;}

/* NEW: 6. SOFT WAVE (Curved Pastel) */
.template-wave { background: #ffffff; border-radius: 30px; box-shadow: 0 15px 35px rgba(0,0,0,0.05); overflow:hidden;}
.template-wave .card-header { height: 200px; border-bottom-left-radius: 50% 20%; border-bottom-right-radius: 50% 20%; background-color: var(--card-primary); }
.template-wave .card-header::before { content: ''; position: absolute; inset:0; background: linear-gradient(135deg, rgba(var(--card-primary-rgb), 0.9), rgba(var(--card-secondary-rgb), 0.9)); z-index: 1; border-bottom-left-radius: 50% 20%; border-bottom-right-radius: 50% 20%;}
.template-wave .profile-row { flex-direction: column; align-items: center; text-align: center; margin-top: -60px; margin-bottom:20px;}
.template-wave .profile-wrapper img { border-radius: 50%; border: 6px solid #fff; box-shadow: 0 10px 20px rgba(0,0,0,0.1);}
.template-wave h3 { font-size: 26px; font-weight: 700; color: #1e293b; margin: 0 0 4px 0;}
.template-wave .title { color: var(--card-primary); font-weight: 600; font-size: 14px; margin:0; }
.template-wave .contact-inline { justify-content: center; margin-bottom: 25px; border-top: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; padding: 15px 0;}
.template-wave .contact-inline a { color: #475569; }
.template-wave .service-tag { display:inline-block; background: #f8fafc; color: var(--card-primary); border-radius: 30px; font-weight: 600; padding: 8px 16px; margin: 5px; box-shadow: 0 2px 8px rgba(0,0,0,0.02);}
.template-wave h4 { font-weight: 700; color: #334155; margin: 0 0 15px 0; text-align:center;}

/* NEW: 7. ANGLED SPLIT (Corporate Geometry) */
.template-angled { background: #ffffff; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.1); overflow:hidden;}
.template-angled .card-header { height: 210px; clip-path: polygon(0 0, 100% 0, 100% 70%, 0 100%); background-color: var(--card-primary);}
.template-angled .card-header::before { content: ''; position: absolute; inset:0; background: linear-gradient(135deg, var(--card-primary), var(--card-secondary)); opacity:0.9; z-index: 1;}
.template-angled .profile-row { margin-top: -80px; align-items: center; padding-left: 10px; margin-bottom: 25px;}
.template-angled .profile-wrapper img { border-radius: 12px; border: 4px solid #fff; box-shadow: 0 10px 20px rgba(0,0,0,0.15);}
.template-angled h3 { font-size: 24px; font-weight: 800; color: #0f172a; margin: 0 0 4px 0;}
.template-angled .title { color: var(--card-secondary); font-weight: 700; font-size: 13px; text-transform: uppercase; margin:0;}
.template-angled .contact-inline { background: var(--card-primary); color: white; padding: 15px 20px; border-radius: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 25px;}
.template-angled .contact-inline a { color: white; }
.template-angled .contact-inline .divider { display:none;}
.template-angled .service-tag { display:inline-block; border-left: 3px solid var(--card-secondary); background: #f8fafc; color: #0f172a; border-radius: 4px; padding: 8px 12px; margin: 4px; font-weight:600; font-size:13px;}
.template-angled h4 { font-weight: 800; text-transform: uppercase; color: #0f172a; margin: 0 0 15px 0;}

/* NEW: 8. VIBRANT GLOW (Modern Gradient) */
.template-vibrant { background: #ffffff; border-radius: 20px; box-shadow: 0 25px 50px rgba(var(--card-primary-rgb), 0.2); overflow:hidden;}
.template-vibrant .card-header { height: 180px; background-color: var(--card-primary);}
.template-vibrant .card-header::before { content: ''; position: absolute; inset:0; background: linear-gradient(135deg, var(--card-primary), var(--card-secondary)); z-index: 1;}
.template-vibrant .profile-row { flex-direction: column; align-items: center; text-align: center; margin-top: -60px; margin-bottom:20px;}
.template-vibrant .profile-wrapper { background: linear-gradient(135deg, var(--card-primary), var(--card-secondary)); padding: 4px; border-radius: 50%; box-shadow: 0 10px 25px rgba(var(--card-primary-rgb), 0.4);}
.template-vibrant .profile-wrapper img { border-radius: 50%; border: 3px solid #fff;}
.template-vibrant h3 { font-size: 26px; font-weight: 800; background: linear-gradient(135deg, var(--card-primary), var(--card-secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin: 0 0 4px 0;}
.template-vibrant .title { color: #64748b; font-weight: 600; font-size: 14px; margin:0;}
.template-vibrant .contact-inline { justify-content: center; margin-bottom: 25px;}
.template-vibrant .contact-inline a { color: #ffffff; background: linear-gradient(135deg, var(--card-primary), var(--card-secondary)); padding: 10px; border-radius: 50%; font-size: 0; box-shadow: 0 4px 15px rgba(var(--card-primary-rgb), 0.3); transition:0.2s;}
.template-vibrant .contact-inline a:hover { transform: translateY(-3px) scale(1.05); }
.template-vibrant .contact-inline .divider { display:none;}
.template-vibrant .contact-inline .material-symbols-outlined { font-size: 20px; }
.template-vibrant .service-tag { display:inline-block; background: rgba(var(--card-primary-rgb), 0.1); color: var(--card-primary); border-radius: 8px; padding: 8px 16px; margin: 5px; font-weight:600; transition:0.2s;}
.template-vibrant .service-tag:hover { background: var(--card-primary); color: white; }
.template-vibrant h4 { font-weight: 700; color: #1e293b; margin: 0 0 15px 0;}
/* --- NEW FEATURE SECTIONS --- */
.section-wrapper { margin-top: 25px; padding-top: 20px; border-top: 1px solid rgba(0,0,0,0.08); width:100%;}
.section-wrapper h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 15px 0; color: inherit; opacity: 0.8;}

/* Organization Info */
.org-info p { margin: 8px 0; font-size: 13px; display: flex; align-items: center; gap: 8px; font-weight: 500;}
.org-info a { text-decoration: none; color: inherit;}
.org-info .material-symbols-outlined { font-size: 18px; opacity: 0.7;}

/* Social Links */
.social-icons { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px;}
.social-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--card-primary); color: white !important; text-decoration: none; transition: 0.2s; box-shadow: 0 4px 10px rgba(0,0,0,0.1);}
.social-btn:hover { transform: translateY(-3px); filter: brightness(1.1);}
.social-btn img { width: 20px; height: 20px; filter: invert(1);}

/* Premium Services Cards */
.premium-service-card { display: flex; gap: 15px; align-items: center; background: rgba(0,0,0,0.03); padding: 12px; border-radius: 12px; margin-bottom: 15px; border: 1px solid rgba(0,0,0,0.05);}
.premium-service-card img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover;}
.premium-service-card div { flex: 1; }
.premium-service-card h5 { margin: 0 0 4px 0; font-size: 14px; font-weight: 700; color: inherit;}
.premium-service-card p { margin: 0; font-size: 12px; opacity: 0.8; line-height: 1.4;}

/* Portfolio Gallery */
.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.portfolio-grid img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid rgba(0,0,0,0.05); transition: 0.2s;}
.portfolio-grid img:hover { transform: scale(1.02); }

/* --- FIX FOR MODERN CLASSIC TEMPLATE --- */
.template-modern .profile-row { display: block; margin-top: -60px; margin-bottom: 25px; text-align: left;}
.template-modern .header-text { margin-top: 15px; }
.template-modern h3 { font-size: 24px; color: #0f172a; font-weight: 700; margin: 0 0 4px 0; letter-spacing: -0.5px;}

/* Custom Dark mode adaptations */
.template-dark .section-wrapper { border-color: rgba(255,255,255,0.1); }
.template-dark .premium-service-card { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1);}

/* --- CRITICAL FIXES FOR VIDEO, BUTTONS & MODULES --- */
.iframe-container { position: relative; width: 100%; height: 0; padding-bottom: 56.25%; border-radius: 12px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.08); background: #000; }
.iframe-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

.btn-vcard { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 16px; background: var(--card-primary); color: white !important; text-decoration: none; border-radius: 12px; font-weight: 600; font-size: 15px; margin-bottom: 25px; transition:0.2s; box-shadow: 0 8px 20px rgba(0,0,0,0.15);}
.btn-vcard:hover { opacity:0.9; transform: translateY(-2px);}

.org-info p { margin: 10px 0; font-size: 13px; display: flex; align-items: center; gap: 10px; font-weight: 500; color: inherit;}
.org-info a { text-decoration: none; color: inherit; word-break: break-all;}
.org-info .material-symbols-outlined { font-size: 18px; opacity: 0.7; color: var(--card-secondary);}

.social-icons { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 25px; justify-content: center;}
.social-btn { display: flex; align-items: center; justify-content: center; width: 45px; height: 45px; border-radius: 50%; color: white !important; text-decoration: none; transition: 0.2s; box-shadow: 0 6px 12px rgba(0,0,0,0.15); font-weight: 700;}
.social-btn:hover { transform: translateY(-3px) scale(1.05); filter: brightness(1.1);}

.premium-service-card { display: flex; gap: 15px; align-items: center; background: rgba(0,0,0,0.03); padding: 15px; border-radius: 12px; margin-bottom: 15px; border: 1px solid rgba(0,0,0,0.05);}
.premium-service-card img { width: 70px; height: 70px; border-radius: 8px; object-fit: cover; border: 1px solid rgba(0,0,0,0.1);}
.premium-service-card div { flex: 1; }
.premium-service-card h5 { margin: 0 0 6px 0; font-size: 14px; font-weight: 700; color: inherit;}
.premium-service-card p { margin: 0; font-size: 12px; opacity: 0.8; line-height: 1.5;}

.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.portfolio-grid img { width: 100%; height: 130px; object-fit: cover; border-radius: 12px; border: 1px solid rgba(0,0,0,0.05); transition: 0.2s;}
.portfolio-grid img:hover { transform: scale(1.03); box-shadow: 0 8px 20px rgba(0,0,0,0.1);}
/* --- VISUAL TEMPLATE THUMBNAILS UI --- */
.template-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 25px;}
.tpl-card { border: 2px solid var(--border); border-radius: 12px; padding: 10px; text-align: center; cursor: pointer; background: white; transition: 0.2s;}
.tpl-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.05);}
.tpl-card.active { border-color: var(--primary); background: #eff6ff;}
.tpl-card span { display: block; font-weight: 600; font-size: 11px; color: var(--text-main); margin-top: 8px;}

/* CSS Miniature Drawings */
.tpl-thumb { width: 100%; height: 60px; border-radius: 6px; background: #f8fafc; position: relative; overflow: hidden; border: 1px solid #e2e8f0;}
.tpl-thumb::before { content:''; position:absolute; top:0; left:0; right:0; height: 25px; background: var(--primary); opacity:0.8;}
.tpl-thumb::after { content:''; position:absolute; top: 12px; width: 16px; height: 16px; background: white; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.1);}

.tpl-modern .tpl-thumb::after { left: 10px; }
.tpl-dark .tpl-thumb { background: #0f172a; border-color: #0f172a;}
.tpl-dark .tpl-thumb::after { left: 50%; transform: translateX(-50%); border: 1px solid var(--primary);}
.tpl-glass .tpl-thumb { background: linear-gradient(45deg, var(--primary), #8b5cf6); }
.tpl-glass .tpl-thumb::before { display: none;}
.tpl-glass .tpl-thumb::after { left: 50%; transform: translateX(-50%); top: 15px; border: 2px solid rgba(255,255,255,0.5); background: transparent;}
.tpl-minimal .tpl-thumb::before { background: white; border-bottom: 1px solid #e2e8f0;}
.tpl-minimal .tpl-thumb::after { left: 50%; transform: translateX(-50%); border-radius: 0; border: 1px solid #e2e8f0; top: 15px;}
.tpl-brutal .tpl-thumb { border: 2px solid #000; box-shadow: 2px 2px 0 #000;}
.tpl-brutal .tpl-thumb::before { border-bottom: 2px solid #000;}
.tpl-brutal .tpl-thumb::after { left: 50%; transform: translateX(-50%); border-radius: 4px; border: 2px solid #000;}
.tpl-wave .tpl-thumb::before { border-bottom-left-radius: 50% 10px; border-bottom-right-radius: 50% 10px; height: 30px;}
.tpl-wave .tpl-thumb::after { left: 50%; transform: translateX(-50%); top: 20px;}

/* Custom Angled Thumb */
.tpl-angled .tpl-thumb::before { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 60%); height: 35px; }
.tpl-angled .tpl-thumb::after { right: 5px; left: auto; top: 15px; border-radius: 4px; transform: rotate(10deg);}

/* Custom Float Thumb */
.tpl-float .tpl-thumb::before { height: 40px; }
.tpl-float .tpl-thumb::after { display:none;}
.tpl-float .tpl-thumb .float-box { position:absolute; top: 20px; left: 10px; right: 10px; bottom: -5px; background: white; border-radius: 6px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); border: 1px solid #e2e8f0;}

/* --- REVAMPED ANGLED SPLIT TEMPLATE --- */
.template-angled { background: #ffffff; border-radius: 12px; box-shadow: 0 15px 50px rgba(0,0,0,0.1); overflow:hidden;}
.template-angled .card-header { height: 280px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 80%); background-color: var(--card-primary); align-items: flex-start; padding-top: 25px;}
.template-angled .card-header::before { content: ''; position: absolute; inset:0; background: linear-gradient(135deg, var(--card-primary), var(--card-secondary)); opacity:0.9; z-index: 1;}
.template-angled .card-body { position: relative; padding-top: 0;}
/* Move Profile Row INSIDE the header absolute */
.template-angled .profile-row { position: absolute; top: -160px; left: 25px; right: 25px; display: flex; flex-direction: row; justify-content: space-between; align-items: flex-end; margin: 0; z-index: 10;}
.template-angled .header-text { flex: 1; padding-bottom: 25px; text-align: left; }
.template-angled h3 { font-size: 28px; font-weight: 800; color: #ffffff; margin: 0 0 4px 0; text-shadow: 0 2px 10px rgba(0,0,0,0.3);}
.template-angled .title { color: rgba(255,255,255,0.9); font-weight: 600; font-size: 13px; text-transform: uppercase; margin:0;}
/* Photo on the right slope */
.template-angled .profile-wrapper { padding-bottom: 10px; }
.template-angled .profile-wrapper img { width: 110px; height: 110px; border-radius: 20px; border: 4px solid #fff; box-shadow: 0 15px 30px rgba(0,0,0,0.2); transform: rotate(6deg); object-fit: cover;}
.template-angled .contact-inline { margin-top: 60px; background: var(--card-primary); color: white; padding: 15px 20px; border-radius: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 25px;}
.template-angled .contact-inline a, .template-angled .contact-inline span { color: white; }
.template-angled .contact-inline .divider { display:none;}
.template-angled .service-tag { display:inline-block; border-left: 3px solid var(--card-secondary); background: #f8fafc; color: #0f172a; border-radius: 4px; padding: 8px 12px; margin: 4px; font-weight:600; font-size:13px;}
.template-angled h4 { font-weight: 800; text-transform: uppercase; color: #0f172a; margin: 0 0 15px 0;}

/* --- NEW TEMPLATE 9: FLOATING LAYER --- */
.template-float { background: #f1f5f9; border-radius: 0; box-shadow: none; overflow: visible;}
.template-float .card-header { height: 260px; position: absolute; top: 0; left: 0; right: 0; border-radius: 0; z-index: 0; background-color: var(--card-primary);}
.template-float .card-header::before { content: ''; position: absolute; inset:0; background: linear-gradient(180deg, var(--card-primary), var(--card-secondary)); opacity: 0.85; z-index: 1;}
.template-float .card-body { position: relative; z-index: 2; background: white; margin: 120px 20px 30px 20px; border-radius: 24px; padding: 40px 25px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); border: 1px solid rgba(0,0,0,0.05);}
.template-float .profile-row { flex-direction: column; align-items: center; text-align: center; margin-top: -90px; margin-bottom: 25px;}
.template-float .profile-wrapper img { width: 120px; height: 120px; border-radius: 50%; padding: 6px; background: white; box-shadow: 0 10px 25px rgba(0,0,0,0.1); border:none;}
.template-float h3 { font-size: 26px; font-weight: 800; color: #0f172a; margin: 0 0 4px 0;}
.template-float .title { color: var(--card-primary); font-weight: 700; font-size: 13px; text-transform: uppercase;}
.template-float .contact-inline { justify-content: center; background: #f8fafc; padding: 15px; border-radius: 16px; margin-bottom: 30px;}
.template-float .contact-inline a { color: #475569; font-weight: 600;}:root {
    --bg-main: #f8fafc; --sidebar-bg: #0f172a; --sidebar-text: #94a3b8; --sidebar-hover: #1e293b;
    --card-bg: #ffffff; --text-main: #0f172a; --text-muted: #64748b; --primary: #3b82f6; --border: #e2e8f0;
    --card-primary: #212529; --card-secondary: #007bff; --card-primary-rgb: 33, 37, 41; --card-secondary-rgb: 0, 123, 255;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-main); color: var(--text-main); }
h1, h2, h3, h4, .title, .fab { font-family: 'Poppins', sans-serif; }

/* GLOBAL LAYOUT & SIDEBAR */
.dashboard-layout { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 260px; background-color: var(--sidebar-bg); display: flex; flex-direction: column; color: white; flex-shrink: 0;}
.brand { padding: 24px; display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.05); }
.brand-logo { width: 24px; height: 24px; background: linear-gradient(135deg, #3b82f6, #8b5cf6); border-radius: 6px; }
.nav-menu { flex: 1; padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto;}
.nav-link { padding: 12px 16px; color: var(--sidebar-text); text-decoration: none; border-radius: 8px; font-weight: 500; font-size: 14px; transition: all 0.2s; display:flex; align-items:center; gap:10px;}
.nav-link:hover { background-color: var(--sidebar-hover); color: white; }
.nav-link.active { background-color: var(--primary); color: white; }
.sidebar-footer { padding: 20px; border-top: 1px solid rgba(255,255,255,0.05); }
.user-profile { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary), #8b5cf6); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; color: white; }
.user-info strong { display: block; font-size: 14px; margin-bottom:2px;}
.user-info span { font-size: 12px; color: var(--sidebar-text); background: rgba(255,255,255,0.1); padding: 2px 8px; border-radius: 12px;}

.main-content { flex: 1; padding: 32px 40px; overflow-y: auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.page-title { font-size: 24px; font-weight: 700; margin-bottom: 4px; }

/* DASHBOARD ANALYTICS TABLES */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; margin-bottom: 32px; }
.kpi-card { background: var(--card-bg); padding: 24px; border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); display: flex; align-items: center; gap: 16px; }
.kpi-icon { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.kpi-label { display: block; color: var(--text-muted); font-size: 12px; font-weight: 600; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px;}
.kpi-value { font-size: 28px; font-weight: 700; }

.data-section { background: var(--card-bg); border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); margin-bottom: 40px; overflow:hidden;}
.section-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display:flex; justify-content:space-between; align-items:center;}
.section-header h3 { font-size: 16px; font-weight: 600; }
.table-container { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 16px 24px; background: #f8fafc; color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; border-bottom: 1px solid var(--border); }
.data-table td { padding: 16px 24px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; color: var(--text-main);}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background-color: #f1f5f9; }
.btn-action { background: transparent; border: 1px solid var(--border); padding: 6px 12px; border-radius: 6px; cursor: pointer; color: var(--text-muted); transition:0.2s; display:inline-flex; align-items:center; justify-content:center;}
.btn-action:hover { background: #f1f5f9; color: var(--text-main);}
.link-styled { color: var(--primary); text-decoration: none; font-weight: 500; }
.link-styled:hover { text-decoration: underline; }

/* BUILDER SPECIFIC GRID & SELECTORS */
.builder-grid { display: grid; grid-template-columns: 1fr 420px; gap: 40px; align-items: start; padding-bottom: 40px;}
.editor-card { background: var(--card-bg); padding: 32px; border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.editor-card h2 { font-size: 16px; margin: 30px 0 16px 0; border-bottom: 1px solid var(--border); padding-bottom: 10px; color:#0f172a;}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 12px; color: var(--text-muted); text-transform: uppercase;}
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 14px; transition:0.2s;}
.form-group input:focus, .form-group textarea:focus { border-color:var(--primary); outline:none; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);}
.file-upload-group input { border: 1px dashed #cbd5e1; background: #f8fafc; cursor: pointer;}
#generate-btn { width: 100%; padding: 16px; background: var(--primary); color: white; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); transition:0.2s;}
#generate-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4); }
.preview-container { position: sticky; top: 0; display: flex; justify-content: center; }

/* --- VISUAL TEMPLATE THUMBNAILS UI --- */
.template-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 25px;}
.tpl-card { border: 2px solid var(--border); border-radius: 12px; padding: 10px; text-align: center; cursor: pointer; background: white; transition: 0.2s;}
.tpl-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.tpl-card.active { border-color: var(--primary); background: #eff6ff;}
.tpl-card span { display: block; font-weight: 600; font-size: 11px; color: var(--text-main); margin-top: 8px;}
.tpl-thumb { width: 100%; height: 60px; border-radius: 6px; background: #f8fafc; position: relative; overflow: hidden; border: 1px solid #e2e8f0;}
.tpl-thumb::before { content:''; position:absolute; top:0; left:0; right:0; height: 25px; background: var(--primary); opacity:0.8;}
.tpl-thumb::after { content:''; position:absolute; top: 12px; width: 16px; height: 16px; background: white; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.1);}
.tpl-modern .tpl-thumb::after { left: 10px; }
.tpl-dark .tpl-thumb { background: #0f172a; border-color: #0f172a;}
.tpl-dark .tpl-thumb::after { left: 50%; transform: translateX(-50%); border: 1px solid var(--primary);}
.tpl-glass .tpl-thumb { background: linear-gradient(45deg, var(--primary), #8b5cf6); }
.tpl-glass .tpl-thumb::before { display: none;}
.tpl-glass .tpl-thumb::after { left: 50%; transform: translateX(-50%); top: 15px; border: 2px solid rgba(255,255,255,0.5); background: transparent;}
.tpl-minimal .tpl-thumb::before { background: white; border-bottom: 1px solid #e2e8f0;}
.tpl-minimal .tpl-thumb::after { left: 50%; transform: translateX(-50%); border-radius: 0; border: 1px solid #e2e8f0; top: 15px;}
.tpl-brutal .tpl-thumb { border: 2px solid #000; box-shadow: 2px 2px 0 #000;}
.tpl-brutal .tpl-thumb::before { border-bottom: 2px solid #000;}
.tpl-brutal .tpl-thumb::after { left: 50%; transform: translateX(-50%); border-radius: 4px; border: 2px solid #000;}
.tpl-wave .tpl-thumb::before { border-bottom-left-radius: 50% 10px; border-bottom-right-radius: 50% 10px; height: 30px;}
.tpl-wave .tpl-thumb::after { left: 50%; transform: translateX(-50%); top: 20px;}
.tpl-angled .tpl-thumb::before { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 60%); height: 35px; }
.tpl-angled .tpl-thumb::after { right: 5px; left: auto; top: 15px; border-radius: 4px; transform: rotate(10deg);}
.tpl-float .tpl-thumb::before { height: 40px; }
.tpl-float .tpl-thumb::after { display:none;}
.tpl-float .tpl-thumb .float-box { position:absolute; top: 20px; left: 10px; right: 10px; bottom: -5px; background: white; border-radius: 6px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); border: 1px solid #e2e8f0;}

/* =========================================
   PREMIUM CARD CONTAINER STYLES
   ========================================= */
.card-preview { width: 100%; max-width: 400px; margin: 0 auto; position: relative; text-align: left; transition: all 0.3s;}
.card-header { height: 190px; background-size: cover; background-position: center; position: relative; padding: 25px; display:flex; align-items:flex-start; justify-content:center;}
.card-header img { position: relative; z-index: 2; max-height: 60px; max-width: 140px; object-fit: contain; }
.card-body { padding: 0 25px 30px 25px; position: relative; }

.profile-row { display: flex; align-items: flex-end; gap: 15px;}
.profile-wrapper { position: relative; z-index: 3;}
/* MASSIVE UPGRADED PROFILE IMAGE SIZES AT 130PX */
.profile-wrapper img { width: 130px; height: 130px; object-fit: cover; }

/* REFACTORED IMMERSIVE CONTACT SECTION (No Circles/Bullets) */
.contact-inline { font-size: 14px; font-weight: 500; display: flex; flex-direction: column; gap: 10px; margin-bottom: 25px; width: 100%;}
.contact-inline a, .contact-inline span { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; padding: 10px 14px; background: rgba(0,0,0,0.03); border-radius: 8px;}

.services-grid { display: flex; flex-wrap: wrap; gap: 8px;}
.section-wrapper { margin-top: 25px; padding-top: 20px; border-top: 1px solid rgba(0,0,0,0.08); width:100%;}
.section-wrapper h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 15px 0; color: inherit; opacity: 0.8;}

.org-info p { margin: 10px 0; font-size: 13px; display: flex; align-items: center; gap: 10px; font-weight: 500; color: inherit;}
.org-info a { text-decoration: none; color: inherit; word-break: break-all;}
.org-info .material-symbols-outlined { font-size: 18px; opacity: 0.7; color: var(--card-secondary); }

.social-icons { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 25px; justify-content: center;}
.social-btn { display: flex; align-items: center; justify-content: center; width: 45px; height: 45px; border-radius: 50%; color: white !important; text-decoration: none; transition: 0.2s; box-shadow: 0 6px 12px rgba(0,0,0,0.15); font-weight: 700;}
.social-btn:hover { transform: translateY(-3px) scale(1.05); filter: brightness(1.1);}

.premium-service-card { display: flex; gap: 15px; align-items: center; background: rgba(0,0,0,0.03); padding: 15px; border-radius: 12px; margin-bottom: 15px; border: 1px solid rgba(0,0,0,0.05);}
.premium-service-card img { width: 70px; height: 70px; border-radius: 8px; object-fit: cover; border: 1px solid rgba(0,0,0,0.1);}
.premium-service-card div { flex: 1; }
.premium-service-card h5 { margin: 0 0 6px 0; font-size: 14px; font-weight: 700; color: inherit;}
.premium-service-card p { margin: 0; font-size: 12px; opacity: 0.8; line-height: 1.5;}

.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.portfolio-grid img { width: 100%; height: 130px; object-fit: cover; border-radius: 12px; border: 1px solid rgba(0,0,0,0.05); transition: 0.2s;}
.portfolio-grid img:hover { transform: scale(1.03); box-shadow: 0 8px 20px rgba(0,0,0,0.1);}

/* =========================================
   CUSTOM-SKINNED VIDEO PLAYER CONTROLS
   ========================================= */
.video-player-container { position: relative; width: 100%; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.15); background: #000;}
.iframe-wrapper-hidden { position: relative; width: 100%; height: 0; padding-bottom: 56.25%; pointer-events: none;}
.iframe-wrapper-hidden iframe { position: absolute; top: -50px; left: 0; width: 100%; height: calc(100% + 100px); border: 0; }

.custom-video-controls { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.85), transparent); padding: 15px 20px; display: flex; align-items: center; gap: 15px; z-index: 10; color: white; opacity: 0.9; transition: opacity 0.2s;}
.video-player-container:hover .custom-video-controls { opacity: 1; }
.ctrl-btn { background: transparent; border: 0; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; outline: none; }
.ctrl-btn .material-symbols-outlined { font-size: 24px; transition: transform 0.1s;}
.ctrl-btn:hover .material-symbols-outlined { transform: scale(1.1); }

.video-seeker { flex: 1; -webkit-appearance: none; appearance: none; background: rgba(255,255,255,0.3); height: 5px; border-radius: 3px; outline: none; cursor: pointer; }
.video-seeker::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--card-secondary); cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.3); }

/* =========================================
   THEMED OVERRIDES (MODERN, DARK, GLASS...)
   ========================================= */

/* 1. iOS MODERN CLASSIC */
.template-modern { background: #ffffff; border-radius: 24px; box-shadow: 0 20px 40px rgba(0,0,0,0.08); border: 1px solid rgba(0,0,0,0.05); overflow: hidden; }
.template-modern .card-header::before { content: ''; position: absolute; inset:0; background: linear-gradient(135deg, rgba(var(--card-primary-rgb), 0.85), rgba(var(--card-secondary-rgb), 0.85)); z-index: 1; backdrop-filter: blur(5px);}
.template-modern .profile-row { display: block; margin-top: -70px; margin-bottom: 25px; text-align: left; }
.template-modern .profile-wrapper img { border-radius: 24px; border: 5px solid #ffffff; box-shadow: 0 8px 24px rgba(0,0,0,0.12); background: #fff;}
.template-modern .header-text { margin-top: 15px; }
.template-modern h3 { font-size: 26px; color: #0f172a; font-weight: 700; margin: 0 0 4px 0; letter-spacing: -0.5px;}
.template-modern .title { color: var(--card-primary); font-size: 14px; font-weight: 500; margin:0;}
.template-modern .contact-inline a, .template-modern .contact-inline span { color: #475569; background: #f8fafc; border: 1px solid #f1f5f9; }
.template-modern .service-tag { background: rgba(var(--card-primary-rgb), 0.05); color: var(--card-primary); padding: 8px 14px; border-radius: 12px; font-size:13px; font-weight:500;}

/* 2. DARK EXECUTIVE */
.template-dark { background: #0f172a; color: #f8fafc; border-radius: 16px; box-shadow: 0 25px 50px rgba(0,0,0,0.25); border: 1px solid #1e293b; overflow:hidden;}
.template-dark .card-header::before { content: ''; position: absolute; inset:0; background: linear-gradient(to bottom, transparent, #0f172a); z-index: 1; }
.template-dark .profile-row { margin-top: -85px; flex-direction:column; align-items:center; text-align:center; margin-bottom:25px;}
.template-dark .profile-wrapper img { border-radius: 50%; border: 4px solid #0f172a; box-shadow: 0 0 0 3px var(--card-secondary); padding:2px; background: #0f172a;}
.template-dark h3 { font-size: 26px; color: #f8fafc; font-weight: 600; margin: 10px 0 2px 0; letter-spacing:-0.5px;}
.template-dark .title { color: var(--card-secondary); font-size: 13px; text-transform:uppercase; letter-spacing: 1.5px; margin:0;}
.template-dark .contact-inline a, .template-dark .contact-inline > span { color: #cbd5e1; background: #1e293b; padding:12px 16px; border-radius:10px; width: 100%; border: 1px solid #334155; justify-content:flex-start;}
.template-dark .service-tag { display:block; width:100%; background: transparent; color: #94a3b8; padding: 10px 0; border-bottom: 1px solid #1e293b; font-size: 14px;}

/* 3. PREMIUM ULTRACLEAR SHARPGOW GLASSMORPHISM */
.template-glass { background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(30px) saturate(190%); -webkit-backdrop-filter: blur(30px) saturate(190%); border-radius: 32px; border: 1px solid rgba(255, 255, 255, 0.45); box-shadow: inset 0 1px 1px rgba(255,255,255,0.4), 0 25px 50px rgba(0,0,0,0.18); color: #0f172a;}
.template-glass .card-header { background:transparent !important; height:120px; justify-content:center;}
.template-glass .card-header::before { display: none !important; }
.template-glass .profile-row { margin-top: 0; flex-direction:column; align-items:center; text-align:center; margin-bottom:20px;}
.template-glass .profile-wrapper img { border-radius: 50%; border: 5px solid rgba(255,255,255,0.7); box-shadow: 0 12px 35px rgba(0,0,0,0.12);}
.template-glass h3 { font-size: 28px; color: #0f172a; font-weight:800; margin: 15px 0 2px 0;}
.template-glass .title { color: #2a3a50; font-size: 14px; font-weight:600; margin:0;}
.template-glass .contact-inline a, .template-glass .contact-inline > span { color: #0f172a; background: rgba(255,255,255,0.45); border: 1px solid rgba(255,255,255,0.4); border-radius:10px; flex-direction:row; justify-content:flex-start; font-weight:600;} 
.template-glass .service-tag { display:inline-block; background: rgba(255,255,255,0.4); color: #0f172a; padding: 8px 16px; border-radius: 12px; margin:4px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); font-size:13px; font-weight:600; border: 1px solid rgba(255,255,255,0.3);}

/* 4. CLEAN MINIMAL */
.template-minimal { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); text-align: center; color: #0f172a;}
.template-minimal .card-header { height: 160px; background: #f8fafc !important; border-bottom: 1px solid #e2e8f0; justify-content:center;}
.template-minimal .card-header::before { display: none !important; }
.template-minimal .profile-row { margin-top: -75px; flex-direction: column; align-items: center; margin-bottom:25px;}
.template-minimal .profile-wrapper img { border-radius: 0; padding: 6px; background: white; border: 1px solid #e2e8f0;}
.template-minimal h3 { font-size: 26px; font-weight: 400; letter-spacing: -0.5px; margin: 0 0 6px 0;}
.template-minimal .title { font-weight: 500; color: #94a3b8; text-transform: uppercase; letter-spacing: 2px; font-size: 11px; margin:0;}
.template-minimal .contact-inline a, .template-minimal .contact-inline span { color: #0f172a; font-weight:400; font-size:14px; background:transparent; border:1px solid #e2e8f0; justify-content:center;}
.template-minimal .service-tag { display:inline-block; background: transparent; border: 1px solid #e2e8f0; color: #475569; border-radius: 4px; padding: 8px 16px; margin: 4px; font-size:13px;}

/* 5. NEO-BRUTALISM */
.template-brutal { background: #ffffff; border: 4px solid #000; border-radius: 16px; box-shadow: 8px 8px 0px #000; overflow:hidden;}
.template-brutal .card-header { height: 180px; border-bottom: 4px solid #000; justify-content:center;}
.template-brutal .card-header::before { content: ''; position: absolute; inset:0; background: var(--card-primary); opacity: 0.9; z-index: 1; }
.template-brutal .profile-row { flex-direction: column; align-items: center; text-align: center; margin-top: -80px; margin-bottom:25px;}
.template-brutal .profile-wrapper img { border-radius: 12px; border: 4px solid #000; box-shadow: 4px 4px 0px #000; background: white;}
.template-brutal h3 { font-size: 28px; font-weight: 800; text-transform: uppercase; color: #000; margin: 0 0 4px 0; letter-spacing:-1px;}
.template-brutal .title { color: var(--card-secondary); font-weight: 800; font-size: 14px; text-transform: uppercase; margin:0; }
.template-brutal .contact-inline a, .template-brutal .contact-inline span { color: #000; font-weight: 700; background:white; border:3px solid #000; box-shadow:3px 3px 0 #000;}
.template-brutal .service-tag { display:inline-block; background: var(--card-secondary); color: #fff; border: 3px solid #000; box-shadow: 3px 3px 0px #000; border-radius: 8px; font-weight: 700; padding: 8px 16px; margin: 6px; font-size:14px;}

/* 6. SOFT WAVE */
.template-wave { background: #ffffff; border-radius: 30px; box-shadow: 0 15px 35px rgba(0,0,0,0.05); overflow:hidden;}
.template-wave .card-header { height: 200px; border-bottom-left-radius: 50% 20%; border-bottom-right-radius: 50% 20%; background-color: var(--card-primary); }
.template-wave .card-header::before { content: ''; position: absolute; inset:0; background: linear-gradient(135deg, rgba(var(--card-primary-rgb), 0.9), rgba(var(--card-secondary-rgb), 0.9)); z-index: 1; border-bottom-left-radius: 50% 20%; border-bottom-right-radius: 50% 20%;}
.template-wave .profile-row { flex-direction: column; align-items: center; text-align: center; margin-top: -80px; margin-bottom:20px;}
.template-wave .profile-wrapper img { border-radius: 50%; border: 6px solid #fff; box-shadow: 0 10px 20px rgba(0,0,0,0.1);}
.template-wave h3 { font-size: 26px; font-weight: 700; color: #1e293b; margin: 0 0 4px 0;}
.template-wave .title { color: var(--card-primary); font-weight: 600; font-size: 14px; margin:0; }
.template-wave .contact-inline a, .template-wave .contact-inline span { color: #475569; background:#f8fafc; justify-content:center;}
.template-wave .service-tag { display:inline-block; background: #f8fafc; color: var(--card-primary); border-radius: 30px; font-weight: 600; padding: 8px 16px; margin: 5px; box-shadow: 0 2px 8px rgba(0,0,0,0.02);}

/* 7. REFACTOR MAX ANGLED SPLIT (Name/Title Inside Header, Immersive Photo Right-Bottom) */
.template-angled { background: #ffffff; border-radius: 16px; box-shadow: 0 15px 50px rgba(0,0,0,0.1); overflow:hidden;}
.template-angled .card-header { height: 320px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 78%); background-color: var(--card-primary); align-items: flex-start; padding: 30px 25px; display:block; position:relative;}
.template-angled .card-header::before { content: ''; position: absolute; inset:0; background: linear-gradient(135deg, var(--card-primary), var(--card-secondary)); opacity:0.9; z-index: 1;}
.template-angled .card-body { position: relative; padding-top: 0; clear:both;}
.template-angled .profile-row { position: absolute; top: -140px; left: 25px; right: 25px; display: flex !important; flex-direction: row !important; justify-content: space-between !important; align-items: flex-end !important; margin: 0; z-index: 10; pointer-events:auto;}
.template-angled .header-text { flex: 1; text-align: left; padding-bottom:10px; position:relative; z-index:11;}
.template-angled h3 { font-size: 28px; font-weight: 800; color: #ffffff !important; margin: 0 0 4px 0; text-shadow: 0 2px 12px rgba(0,0,0,0.4); display:block;}
.template-angled .title { color: rgba(255,255,255,0.95) !important; font-weight: 700; font-size: 14px; text-transform: uppercase; margin:0; display:block; text-shadow: 0 1px 6px rgba(0,0,0,0.3);}
.template-angled .profile-wrapper { padding-bottom: 0; position:relative; z-index:12;}
.template-angled .profile-wrapper img { width: 125px; height: 125px; border-radius: 20px; border: 4px solid #ffffff; box-shadow: 0 12px 28px rgba(0,0,0,0.22); transform: rotate(5deg) translateY(15px); object-fit: cover;}
.template-angled .contact-inline { margin-top: 55px;}
.template-angled .contact-inline a, .template-angled .contact-inline span { background: #f8fafc; border: 1px solid #e2e8f0; color: #0f172a;}
.template-angled .service-tag { display:inline-block; border-left: 3px solid var(--card-secondary); background: #f8fafc; color: #0f172a; border-radius: 4px; padding: 8px 12px; margin: 4px; font-weight:600; font-size:13px;}

/* 8. VIBRANT GLOW */
.template-vibrant { background: #ffffff; border-radius: 20px; box-shadow: 0 25px 50px rgba(var(--card-primary-rgb), 0.2); overflow:hidden;}
.template-vibrant .card-header::before { content: ''; position: absolute; inset:0; background: linear-gradient(135deg, var(--card-primary), var(--card-secondary)); z-index: 1;}
.template-vibrant .profile-row { flex-direction: column; align-items: center; text-align: center; margin-top: -80px; margin-bottom:20px;}
.template-vibrant .profile-wrapper { background: linear-gradient(135deg, var(--card-primary), var(--card-secondary)); padding: 4px; border-radius: 50%; box-shadow: 0 10px 25px rgba(var(--card-primary-rgb), 0.4);}
.template-vibrant .profile-wrapper img { border-radius: 50%; border: 4px solid #fff;}

.template-float .contact-inline .divider { display:none;}
.template-float .service-tag { background: #ffffff; color: var(--card-primary); border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.02);}
/* --- PREMIUM LIGHTBOX GALLERY --- */
.portfolio-grid img { cursor: zoom-in; }
.lightbox-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.92); backdrop-filter: blur(8px); z-index: 99999; align-items: center; justify-content: center; flex-direction: column; opacity: 0; transition: opacity 0.3s ease;}
.lightbox-modal.active { display: flex; opacity: 1; }
.lightbox-content { max-width: 90vw; max-height: 75vh; border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); object-fit: contain; }
.lightbox-close { position: absolute; top: 25px; right: 30px; color: white; font-size: 40px; cursor: pointer; line-height: 1; z-index: 100000; opacity: 0.7; transition: 0.2s;}
.lightbox-close:hover { opacity: 1; transform: scale(1.1);}
.lightbox-controls { display: flex; gap: 20px; margin-top: 25px; }
.lightbox-btn { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); color: white; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; backdrop-filter: blur(5px); transition: 0.2s; }
.lightbox-btn:hover { background: rgba(255,255,255,0.3); transform: scale(1.05); }

/* --- BEAUTIFUL CUSTOM VIDEO PLAYER --- */
.premium-video-wrapper { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; box-shadow: 0 15px 35px rgba(0,0,0,0.15); background: #000; border: 1px solid rgba(0,0,0,0.05);}
.premium-video-cover { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 20; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity 0.5s ease, visibility 0.5s;}
.premium-video-cover::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.35); transition: background 0.3s;}
.premium-video-cover:hover::before { background: rgba(0,0,0,0.2); }
.play-btn-massive { position: relative; z-index: 21; width: 75px; height: 75px; background: var(--card-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; box-shadow: 0 8px 25px rgba(0,0,0,0.3); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); border: 4px solid rgba(255,255,255,0.3);}
.play-btn-massive .material-symbols-outlined { font-size: 38px; margin-left: 4px; }
.premium-video-cover:hover .play-btn-massive { transform: scale(1.15); background: var(--card-secondary); border-color: rgba(255,255,255,0.5);}
.yt-iframe-container { position: absolute; inset: 0; z-index: 10; }
.yt-iframe-container iframe { width: 100%; height: 100%; border: 0; pointer-events: none;} /* Pointer events restored dynamically when played */
/* --- FIXED FLOATING ACTION BUTTONS (FABs) --- */
/* For the Live View (Fixed to browser window) */
.sticky-fabs { position: fixed; right: 25px; bottom: 30px; display: flex; flex-direction: column; gap: 15px; z-index: 999999;}
.fab { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 10px 25px rgba(0,0,0,0.25); color: white !important; transition:0.2s;}
.fab .material-symbols-outlined { font-size: 28px; }
.fab:hover { transform: scale(1.1) translateY(-4px); box-shadow: 0 15px 35px rgba(0,0,0,0.3); }

.fab-whatsapp { background-color: #25D366; }
.fab-call { background-color: var(--card-secondary); }
.fab-custom { background-color: var(--card-primary); }

/* For the Builder Preview (Absolute to the mock card) */
.card-preview .sticky-fabs { position: absolute; right: 15px; bottom: 20px; gap: 10px; z-index: 100;}
.card-preview .fab { width: 45px; height: 45px; box-shadow: 0 6px 16px rgba(0,0,0,0.2);}
.card-preview .fab .material-symbols-outlined { font-size: 22px; }

@media (max-width: 480px) {
    .sticky-fabs { bottom: 20px; right: 15px; }
}
/* --- LEAD CAPTURE FORM --- */
.lead-form { background: rgba(0,0,0,0.03); padding: 20px; border-radius: 12px; border: 1px solid rgba(0,0,0,0.05); }
.lead-form input, .lead-form textarea { width: 100%; padding: 12px; border: 1px solid rgba(0,0,0,0.1); border-radius: 8px; margin-bottom: 12px; font-family: 'Inter', sans-serif; font-size: 14px; background: #fff;}
.lead-form input:focus, .lead-form textarea:focus { border-color: var(--card-secondary); outline: none; box-shadow: 0 0 0 3px rgba(var(--card-secondary-rgb), 0.1);}
.btn-submit-lead { width: 100%; padding: 14px; background: var(--card-secondary); color: white; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.2s;}
.btn-submit-lead:hover { background: var(--card-primary); transform: translateY(-2px);}

.template-dark .lead-form { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }
.template-dark .lead-form input, .template-dark .lead-form textarea { background: rgba(0,0,0,0.3); color: #fff; border-color: rgba(255,255,255,0.2);}
.template-glass .lead-form { background: rgba(255,255,255,0.3); backdrop-filter: blur(10px); border-color: rgba(255,255,255,0.4); }
.template-glass .lead-form input, .template-glass .lead-form textarea { background: rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.4);}
.template-brutal .lead-form { background: #fff; border: 3px solid #000; box-shadow: 4px 4px 0px #000; border-radius: 12px;}
.template-brutal .lead-form input, .template-brutal .lead-form textarea { border: 2px solid #000; border-radius: 6px;}

/* --- DASHBOARD CRM MODAL --- */
.dashboard-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(4px); z-index: 999; align-items: center; justify-content: center; }
.dashboard-modal-overlay.active { display: flex; }
.dashboard-modal { background: #fff; width: 90%; max-width: 900px; max-height: 90vh; border-radius: 16px; box-shadow: 0 25px 50px rgba(0,0,0,0.2); display: flex; flex-direction: column; overflow: hidden; }
.modal-header { padding: 24px 30px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: #f8fafc; }
.modal-header h2 { font-size: 20px; font-weight: 700; color: #0f172a;}
.btn-close-modal { background: transparent; border: none; font-size: 24px; cursor: pointer; color: #64748b;}
.modal-body { padding: 30px; overflow-y: auto; flex: 1;}
.modal-stats { display: flex; gap: 20px; margin-bottom: 25px; padding: 20px; background: #f8fafc; border-radius: 12px; border: 1px solid var(--border);}
.m-stat { flex: 1; }
.m-stat span { display: block; font-size: 12px; font-weight: 600; color: #64748b; text-transform: uppercase;}
.m-stat strong { font-size: 24px; color: #0f172a;}
