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

:root {
    --primary: #5B21B6;
    --primary-2: #7C3AED;
    --primary-dark: #4C1D95;
    --primary-light: #F3EEFF;
    --accent: #F97316;
    --pink: #DB2777;
    --green: #10B981;
    --red: #EF4444;
    --yellow: #F59E0B;
    --ink: #14121F;
    --gray-700: #362F4D;
    --gray-600: #5B5470;
    --gray-400: #9C96AE;
    --gray-200: #E7E3F2;
    --gray-100: #F4F2FA;
    --bg: #FAFAFD;
    --white: #FFFFFF;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(30,15,70,.05), 0 2px 6px rgba(30,15,70,.05);
    --shadow-lg: 0 12px 32px rgba(45,20,90,.12);
    --grad: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 55%, #A855F7 100%);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { margin: 0; font-weight: 800; letter-spacing: -0.02em; }
p { margin: 0; }

.voxia-mark {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--grad); flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(91,33,182,.35);
}

/* ---------- Layout ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 248px;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    padding: 26px 16px;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    display: flex;
    flex-direction: column;
}
.sidebar .brand {
    display: flex; align-items: center; gap: 11px;
    font-size: 20px; font-weight: 800; margin-bottom: 30px; padding: 0 8px;
}
.sidebar nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.sidebar nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 10px;
    color: var(--gray-600); font-weight: 600; font-size: 14.5px;
    transition: background .12s ease, color .12s ease;
}
.sidebar nav a:hover { background: var(--gray-100); color: var(--ink); }
.sidebar nav a.active { background: var(--primary-light); color: var(--primary); }
.sidebar .user-box {
    border-top: 1px solid var(--gray-200); padding-top: 14px; margin-top: 14px;
    font-size: 13px; color: var(--gray-600);
}
.sidebar .user-box strong { display: block; color: var(--ink); font-size: 14px; }
.sidebar .logout { display: inline-block; margin-top: 8px; color: var(--red); font-weight: 600; font-size: 13px; }

.main {
    margin-left: 248px;
    flex: 1;
    padding: 34px 42px;
    max-width: 1220px;
}

.topbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px; flex-wrap: wrap; gap: 12px;
}
.topbar h1 { font-size: 27px; }
.topbar .subtitle { color: var(--gray-600); font-size: 14.5px; margin-top: 5px; font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 19px; border-radius: 11px; font-weight: 700; font-size: 14.5px;
    border: none; cursor: pointer; transition: all .15s ease; font-family: inherit;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(91,33,182,.28); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-secondary { background: var(--white); color: var(--ink); border: 1.5px solid var(--gray-200); }
.btn-secondary:hover { background: var(--gray-100); border-color: var(--gray-200); }
.btn-danger { background: #FEF2F2; color: var(--red); }
.btn-danger:hover { background: #FEE2E2; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 26px;
}
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.stat-card { padding: 21px 23px; }
.stat-card .label { font-size: 13px; color: var(--gray-600); font-weight: 600; }
.stat-card .value { font-size: 29px; font-weight: 800; margin-top: 7px; }
.stat-card .value.up { color: var(--green); }

.survey-card {
    background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .18s ease, transform .18s ease;
    display: flex; flex-direction: column;
}
.survey-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.survey-card .thumb {
    height: 96px; background: var(--grad);
    display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.survey-card .body { padding: 19px 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.survey-card .title { font-size: 16px; font-weight: 700; }
.survey-card .desc { font-size: 13.5px; color: var(--gray-600); line-height: 1.5; }
.survey-card .meta { display: flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 10px; flex-wrap: wrap; }
.survey-card .actions { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--gray-100); }

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.badge-green { background: #ECFDF5; color: #059669; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-orange { background: #FFF7ED; color: #C2410C; }
.badge-red { background: #FEF2F2; color: var(--red); }

/* ---------- Forms ---------- */
label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=url],
select, textarea {
    width: 100%; padding: 11px 14px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
    font-size: 14.5px; font-family: inherit; background: var(--white); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 4px var(--primary-light); }
.field { margin-bottom: 18px; }
.help { font-size: 12.5px; color: var(--gray-400); margin-top: 6px; }

/* ---------- Auth page ---------- */
.auth-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 15% 15%, #F3EEFF, #FAFAFD 55%);
    padding: 20px;
}
.auth-card { width: 100%; max-width: 384px; background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); padding: 38px; }
.auth-card .brand { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--gray-600); font-size: 14px; margin-bottom: 28px; font-weight: 500; }

/* ---------- Alerts ---------- */
.alert { padding: 13px 17px; border-radius: 12px; font-size: 14px; margin-bottom: 18px; font-weight: 600; }
.alert-success { background: #ECFDF5; color: #059669; }
.alert-error { background: #FEF2F2; color: var(--red); }

/* ---------- Table ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 14px; font-size: 14px; border-bottom: 1px solid var(--gray-100); }
th { color: var(--gray-600); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: none; }

/* ---------- Builder ---------- */
.qblock { background: var(--white); border: 1.5px solid var(--gray-200); border-radius: 14px; padding: 18px; margin-bottom: 14px; }
.qblock .qtop { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.qblock .qtop select { width: auto; }
.qblock .qtop .qnum { width: 27px; height: 27px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px; flex-shrink:0; }
.opt-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.opt-row input { flex: 1; }
.remove-x { color: var(--red); cursor: pointer; font-weight: 700; padding: 4px 8px; }

/* ---------- Public survey ---------- */
.survey-public {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
    background: radial-gradient(circle at 12% 10%, #F3EEFF, #FAFAFD 55%);
}
.survey-box {
    width: 100%; max-width: 560px; background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg);
    padding: 40px 36px; position: relative;
}
.survey-box .progress { height: 6px; background: var(--gray-100); border-radius: 6px; margin-bottom: 28px; overflow: hidden; }
.survey-box .progress-bar { height: 100%; background: var(--grad); transition: width .3s ease; }
.survey-box h2 { font-size: 21px; line-height: 1.4; margin-bottom: 24px; }
.opt-btn {
    display: block; width: 100%; text-align: left; padding: 14px 17px; margin-bottom: 10px;
    border: 1.5px solid var(--gray-200); border-radius: 13px; background: #fff; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: all .12s ease;
}
.opt-btn:hover { border-color: var(--primary-2); background: var(--primary-light); }
.opt-btn.selected { border-color: var(--primary-2); background: var(--primary-light); color: var(--primary-dark); }
.scale-row { display: flex; gap: 10px; justify-content: space-between; }
.scale-row .opt-btn { flex: 1; text-align: center; }
.stars-row { display: flex; gap: 8px; font-size: 34px; cursor: pointer; }
.stars-row span { color: var(--gray-200); transition: color .1s; }
.stars-row span.active { color: var(--yellow); }
.nps-row { display: flex; gap: 6px; flex-wrap: wrap; }
.nps-row .opt-btn { flex: 1 0 40px; padding: 12px 0; text-align: center; min-width: 40px; }
.nav-row { display: flex; justify-content: space-between; margin-top: 26px; }
.thankyou { text-align: center; padding: 40px 10px; }
.thankyou .icon { font-size: 52px; margin-bottom: 14px; }

.empty-state { text-align: center; padding: 64px 20px; color: var(--gray-600); }
.empty-state .icon { font-size: 44px; margin-bottom: 12px; }

/* ================= Landing page ================= */
.landing-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 6vw; max-width: 1280px; margin: 0 auto;
}
.landing-nav .brand { display: flex; align-items: center; gap: 11px; font-size: 19px; font-weight: 800; }
.landing-nav .actions { display: flex; gap: 10px; }

.hero {
    max-width: 780px; margin: 0 auto; text-align: center; padding: 64px 6vw 40px;
}
.hero .eyebrow {
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 16px; border-radius: 999px;
    background: var(--primary-light); color: var(--primary); font-weight: 700; font-size: 13px; margin-bottom: 22px;
}
.hero h1 { font-size: 44px; line-height: 1.15; margin-bottom: 20px; }
.hero p.sub { font-size: 17.5px; color: var(--gray-600); line-height: 1.6; font-weight: 500; max-width: 620px; margin: 0 auto 32px; }
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .btn { padding: 14px 26px; font-size: 15.5px; }

.hero-visual {
    max-width: 900px; margin: 0 auto; padding: 0 6vw 70px;
}
.hero-visual .mock {
    background: var(--white); border: 1px solid var(--gray-200); border-radius: 24px; box-shadow: var(--shadow-lg);
    padding: 26px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.hero-visual .mock .mini-card {
    background: var(--bg); border: 1px solid var(--gray-100); border-radius: 14px; padding: 16px;
}
.hero-visual .mock .mini-card .bar { height: 8px; border-radius: 4px; background: var(--gray-200); margin-bottom: 8px; }
.hero-visual .mock .mini-card .bar.grad { background: var(--grad); width: 60%; }
.hero-visual .mock .mini-card .bar.w40 { width: 40%; }
.hero-visual .mock .mini-card .bar.w70 { width: 70%; }
.hero-visual .mock .mini-card .icon { font-size: 22px; margin-bottom: 10px; }

.features-section { max-width: 1120px; margin: 0 auto; padding: 20px 6vw 80px; }
.features-section .section-head { text-align: center; max-width: 560px; margin: 0 auto 40px; }
.features-section .section-head h2 { font-size: 30px; margin-bottom: 12px; }
.features-section .section-head p { color: var(--gray-600); font-size: 15.5px; font-weight: 500; }
.feature-card {
    background: var(--white); border: 1px solid var(--gray-200); border-radius: 18px; padding: 28px;
    box-shadow: var(--shadow);
}
.feature-card .icon {
    width: 48px; height: 48px; border-radius: 13px; background: var(--primary-light);
    display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 16px;
}
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { color: var(--gray-600); font-size: 14.5px; line-height: 1.6; font-weight: 500; }

.cta-band {
    max-width: 1120px; margin: 0 6vw 80px; margin-left: auto; margin-right: auto;
    background: var(--grad); border-radius: 26px; padding: 56px 40px; text-align: center; color: #fff;
}
.cta-band h2 { font-size: 28px; margin-bottom: 14px; color: #fff; }
.cta-band p { color: rgba(255,255,255,.88); font-size: 15.5px; margin-bottom: 26px; font-weight: 500; }
.cta-band .btn-primary { background: #fff; color: var(--primary); box-shadow: none; }
.cta-band .btn-primary:hover { filter: none; background: #F5F3FF; }

.landing-footer {
    text-align: center; padding: 30px 6vw 44px; color: var(--gray-400); font-size: 13.5px; font-weight: 500;
}
.landing-footer a { color: var(--primary); font-weight: 600; }

@media (max-width: 720px) {
    .hero h1 { font-size: 32px; }
    .hero-visual .mock { grid-template-columns: 1fr; }
}

/* ---------- Settings form (admin landing editor) ---------- */
.settings-section { margin-bottom: 26px; }
.settings-section h3 { font-size: 15px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--gray-100); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 900px) { .settings-grid { grid-template-columns: 1fr; } }

@media (max-width: 800px) {
    .sidebar { display: none; }
    .main { margin-left: 0; padding: 20px; }
}
