/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100%; }
:root {
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #14b8a6;
    --primary-bg: #f0fdfa;
    --accent: #f97316;
    --accent-light: #fb923c;
    --dark: #0f172a;
    --gray-900: #1e293b;
    --gray-700: #475569;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --gray-50: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(13, 148, 136, 0.25);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: 0.2s ease;
}
html { scroll-behavior: smooth; }
button, input, select, textarea, optgroup { font-family: inherit; }
body {
    font-family: var(--font);
    color: var(--gray-900);
    line-height: 1.6;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
h1, h2, h3, h4 {
    font-family: var(--font);
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
    letter-spacing: -0.01em;
}
a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }

/* ===== Buttons ===== */
.btn-primary, .btn-outline, .btn-outline-white, .btn-ghost, .btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    font-family: inherit;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-xl); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-outline-white { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn-outline-white:hover { background: var(--white); color: var(--primary); border-color: var(--white); }
.btn-ghost { color: var(--gray-700); padding: 8px 16px; }
.btn-ghost:hover { color: var(--primary); }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-full { width: 100%; }

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    z-index: 100;
    border-bottom: 1px solid var(--border);
}
.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 32px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font);
    font-weight: 800;
    font-size: 22px;
    color: var(--dark);
}
.logo-icon { width: 36px; height: 36px; display: flex; }
.logo-text span { color: var(--primary); }
.nav {
    display: flex;
    gap: 28px;
    flex: 1;
    justify-content: center;
}
.nav a {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 15px;
    position: relative;
    padding: 4px 0;
}
.nav a:hover, .nav a.active { color: var(--primary); }
.nav a.active::after {
    content: "";
    position: absolute;
    bottom: -4px; left: 0; right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}
.nav-cta { display: flex; align-items: center; gap: 8px; }
.menu-toggle {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    cursor: pointer;
}
.menu-toggle span {
    width: 24px; height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Page Header (banner) ===== */
.page-header {
    padding: 80px 0 60px;
    background:
        radial-gradient(ellipse at top right, rgba(13, 148, 136, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(249, 115, 22, 0.06) 0%, transparent 50%),
        linear-gradient(to bottom, var(--white), var(--primary-bg));
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-header h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 16px; }
.page-header p { color: var(--gray-700); font-size: 18px; max-width: 640px; margin: 0 auto; }
.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 16px;
}
.breadcrumb a { color: var(--primary); font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }

/* ===== Hero ===== */
.hero {
    padding: 80px 0 100px;
    background:
        radial-gradient(ellipse at top right, rgba(13, 148, 136, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(249, 115, 22, 0.06) 0%, transparent 50%),
        linear-gradient(to bottom, var(--white), var(--primary-bg));
    position: relative;
    overflow: hidden;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
    align-items: center;
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
.badge .dot {
    width: 8px; height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}
.hero h1 {
    font-size: clamp(36px, 5vw, 56px);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}
.highlight {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.lead {
    font-size: 18px;
    color: var(--gray-700);
    margin-bottom: 32px;
    max-width: 540px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats {
    display: flex;
    gap: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.stat strong {
    display: block;
    font-family: var(--font);
    font-size: 28px;
    color: var(--dark);
    font-weight: 800;
}
.stat span { font-size: 14px; color: var(--gray-500); }

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 540px;
}
.phone-mockup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 540px;
    background: var(--dark);
    border-radius: 40px;
    padding: 14px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.3);
    z-index: 2;
}
.phone-notch {
    position: absolute;
    top: 14px; left: 50%;
    transform: translateX(-50%);
    width: 100px; height: 24px;
    background: var(--dark);
    border-radius: 0 0 16px 16px;
    z-index: 3;
}
.phone-screen {
    width: 100%; height: 100%;
    background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%);
    border-radius: 28px;
    padding: 60px 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}
.msg-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: var(--shadow-sm);
    animation: slideIn 0.6s ease backwards;
}
.msg-bubble:nth-child(1) { animation-delay: 0.2s; }
.msg-bubble:nth-child(2) { animation-delay: 0.6s; }
.msg-bubble:nth-child(3) { animation-delay: 1s; }
.msg-bubble:nth-child(4) { animation-delay: 1.4s; }
@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.msg-in {
    align-self: flex-start;
    background: var(--white);
    color: var(--gray-900);
    border-bottom-left-radius: 4px;
}
.msg-out {
    align-self: flex-end;
    background: var(--primary);
    color: var(--white);
    border-bottom-right-radius: 4px;
}
.msg-sender {
    font-size: 11px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 2px;
}
.msg-out .msg-sender { color: rgba(255,255,255,0.9); }
.msg-time { font-size: 10px; opacity: 0.6; margin-top: 4px; text-align: right; }
.msg-bubble.typing { opacity: 0.6; }
.floating-card {
    position: absolute;
    background: var(--white);
    padding: 12px 16px;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    z-index: 3;
    animation: float 4s ease-in-out infinite;
}
.floating-card strong { display: block; color: var(--dark); }
.floating-card span { color: var(--gray-500); font-size: 12px; }
.card-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
}
.card-icon.green { background: linear-gradient(135deg, #10b981, #059669); }
.card-icon.orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.card-1 { top: 60px; left: -10px; animation-delay: 0s; }
.card-2 { bottom: 60px; right: -10px; animation-delay: 1s; }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== Networks ===== */
.networks { padding: 60px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--gray-50); }
.network-label { text-align: center; color: var(--gray-500); font-size: 14px; margin-bottom: 32px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.network-list { display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap; gap: 32px; }
.network-item { display: flex; align-items: center; gap: 12px; color: var(--gray-700); font-weight: 600; opacity: 0.7; transition: var(--transition); }
.network-item:hover { opacity: 1; }
.network-logo {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    color: var(--white);
    font-size: 20px;
}
.network-logo.vodacom { background: #e60000; }
.network-logo.airtel { background: #ed1c24; }
.network-logo.tigo { background: #00256c; }
.network-logo.halotel { background: #ff6600; }
.network-logo.ttcl { background: #00a651; }
.network-logo.smart { background: #8b5cf6; }

/* ===== Sections Common ===== */
section { padding: 100px 0; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 64px; }
.eyebrow {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}
.section-header h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 16px; }
.section-header p { color: var(--gray-700); font-size: 17px; }

/* ===== Features ===== */
.features { background: var(--white); }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature-card {
    padding: 32px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.feature-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--primary-bg), #ccfbf1);
    color: var(--primary);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
}
.feature-card h3 { font-size: 19px; margin-bottom: 10px; }
.feature-card p { color: var(--gray-700); font-size: 15px; }

/* ===== How It Works ===== */
.how { background: var(--gray-50); }
.steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.step { text-align: center; flex: 1; }
.step-num {
    width: 72px; height: 72px;
    margin: 0 auto 20px;
    background: var(--white);
    color: var(--primary);
    border: 3px solid var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 800;
    font-family: var(--font);
    box-shadow: var(--shadow);
}
.step h3 { margin-bottom: 10px; }
.step p { color: var(--gray-700); font-size: 15px; }
.step-arrow { color: var(--gray-300); flex-shrink: 0; }

/* ===== Pricing ===== */
.pricing { background: var(--white); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.price-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    text-align: center;
    transition: var(--transition);
    position: relative;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.price-card.featured {
    background: linear-gradient(180deg, var(--dark) 0%, #1e293b 100%);
    color: var(--white);
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
    border: none;
}
.price-card.featured h3, .price-card.featured .price strong { color: var(--white); }
.price-card.featured .price-desc, .price-card.featured .price-features li { color: rgba(255,255,255,0.8); }
.popular {
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.price-card h3 { font-size: 20px; margin-bottom: 16px; }
.price { display: flex; align-items: baseline; justify-content: center; gap: 4px; margin-bottom: 8px; }
.price .currency { font-size: 16px; color: var(--gray-500); font-weight: 600; }
.price-card.featured .currency { color: rgba(255,255,255,0.7); }
.price strong { font-size: 56px; font-weight: 800; line-height: 1; }
.price .per { color: var(--gray-500); font-size: 14px; }
.price-card.featured .per { color: rgba(255,255,255,0.7); }
.price-desc { color: var(--gray-500); font-size: 14px; margin-bottom: 24px; }
.price-features { text-align: left; margin-bottom: 28px; }
.price-features li {
    padding: 10px 0;
    color: var(--gray-700);
    font-size: 15px;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid var(--border);
}
.price-card.featured .price-features li { border-color: rgba(255,255,255,0.1); }
.price-features li:last-child { border-bottom: none; }
.price-features li::before {
    content: "✓";
    color: var(--primary);
    font-weight: 800;
    width: 18px; height: 18px;
    background: var(--primary-bg);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}
.price-card.featured .price-features li::before {
    background: var(--primary);
    color: var(--white);
}

/* ===== API Section ===== */
.api {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--primary-bg) 100%);
}
.api-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.api h2 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 16px; }
.api p { color: var(--gray-700); font-size: 17px; margin-bottom: 28px; }
.api-features { margin-bottom: 32px; }
.api-feature { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: var(--gray-700); font-weight: 500; }
.code-block {
    background: #0f172a;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}
.code-header {
    background: #1e293b;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.code-dots { display: flex; gap: 6px; }
.code-dots span { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }
.code-filename { color: #94a3b8; font-size: 13px; font-family: 'Courier New', monospace; }
.code-block pre {
    padding: 24px;
    overflow-x: auto;
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.7;
}
.c-key { color: #f472b6; }
.c-cls { color: #facc15; }
.c-fn { color: #60a5fa; }
.c-str { color: #86efac; }
.c-var { color: #e2e8f0; }
.c-com { color: #64748b; font-style: italic; }

/* ===== Use Cases ===== */
.usecases { background: var(--white); }
.usecase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.usecase {
    background: var(--gray-50);
    padding: 28px;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
}
.usecase:hover { background: var(--white); border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.usecase-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--primary-bg, #f0fdfa); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.usecase h3 { font-size: 17px; margin-bottom: 6px; }
.usecase p { color: var(--gray-500); font-size: 14px; }

/* ===== Testimonials ===== */
.testimonials { background: var(--gray-50); }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.testimonial:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stars { color: #f59e0b; margin-bottom: 16px; font-size: 18px; letter-spacing: 2px; }
.testimonial p { color: var(--gray-700); font-size: 15px; margin-bottom: 24px; font-style: italic; }
.author { display: flex; align-items: center; gap: 12px; }
.avatar {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-family: var(--font);
}
.author strong { display: block; color: var(--dark); }
.author span { font-size: 13px; color: var(--gray-500); }

/* ===== CTA Section ===== */
.cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta::before {
    content: "";
    position: absolute;
    top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}
.cta-content { position: relative; z-index: 1; }
.cta h2 { color: var(--white); font-size: clamp(28px, 4vw, 42px); margin-bottom: 16px; }
.cta p { font-size: 18px; opacity: 0.9; margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== Contact ===== */
.contact { background: var(--white); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; }
.contact h2 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 16px; }
.contact > .container > div > p { color: var(--gray-700); font-size: 17px; margin-bottom: 32px; }
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.info-item { display: flex; align-items: center; gap: 16px; }
.info-icon {
    width: 48px; height: 48px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.info-item strong { display: block; color: var(--dark); }
.info-item span { color: var(--gray-500); font-size: 14px; }
.contact-form {
    background: var(--gray-50);
    padding: 36px;
    border-radius: var(--radius-lg);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--gray-900); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    background: var(--white);
    transition: var(--transition);
    color: var(--gray-900);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}
.form-group textarea { resize: vertical; }

/* ===== Footer ===== */
.footer { background: var(--dark); color: rgba(255,255,255,0.7); padding: 80px 0 32px; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}
.footer-brand p { margin: 16px 0 24px; font-size: 14px; max-width: 320px; }
.footer .logo { color: var(--white); }
.socials { display: flex; gap: 12px; }
.socials a {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.socials a:hover { background: var(--primary); color: var(--white); transform: translateY(-2px); }
.footer h4 { color: var(--white); font-size: 15px; margin-bottom: 20px; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: rgba(255,255,255,0.6); font-size: 14px; }
.footer ul a:hover { color: var(--white); }
.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
}
.footer-legal { display: flex; gap: 24px; }
.footer-legal a:hover { color: var(--white); }

/* ============================================== */
/* ============ AUTH PAGES (Login/Register) ===== */
/* ============================================== */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--white);
}
.auth-side {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.auth-side::before, .auth-side::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}
.auth-side::before { width: 400px; height: 400px; top: -150px; right: -100px; }
.auth-side::after { width: 300px; height: 300px; bottom: -100px; left: -80px; }
.auth-side .logo { color: var(--white); position: relative; z-index: 1; }
.auth-side .logo-icon svg path:first-child { fill: rgba(255,255,255,0.2); }
.auth-content-side {
    position: relative;
    z-index: 1;
}
.auth-content-side h2 { color: var(--white); font-size: 32px; margin-bottom: 16px; }
.auth-content-side p { font-size: 16px; opacity: 0.9; line-height: 1.6; }
.auth-features-list { margin-top: 32px; display: flex; flex-direction: column; gap: 16px; }
.auth-features-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; }
.auth-features-list .check {
    width: 24px; height: 24px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: var(--white);
}
.auth-side .testimonial-mini {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.08);
    padding: 20px;
    border-radius: 14px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}
.auth-side .testimonial-mini p { font-size: 14px; font-style: italic; margin-bottom: 12px; }
.auth-side .testimonial-mini .author { color: var(--white); }
.auth-side .testimonial-mini .author strong { color: var(--white); }
.auth-side .testimonial-mini .author span { color: rgba(255,255,255,0.7); }

.auth-form-side {
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: var(--white);
}
.auth-back {
    position: absolute;
    top: 32px; left: 32px;
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 500;
    display: flex; align-items: center; gap: 6px;
}
.auth-back:hover { color: var(--primary); }
.auth-form-wrap { max-width: 440px; width: 100%; margin: 0 auto; }
.auth-form-wrap h1 { font-size: 32px; margin-bottom: 8px; }
.auth-form-wrap .subtitle { color: var(--gray-500); font-size: 15px; margin-bottom: 32px; }
.auth-form-wrap form { width: 100%; }
.auth-form-wrap .form-group label { font-size: 13px; }
.password-input {
    position: relative;
}
.password-input input { padding-right: 48px; }
.password-toggle {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 6px;
    display: flex; align-items: center; justify-content: center;
}
.password-toggle:hover { color: var(--primary); }
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0 24px;
    font-size: 14px;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-700);
    cursor: pointer;
    user-select: none;
}
.checkbox-label input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}
.form-options a { color: var(--primary); font-weight: 600; }
.form-options a:hover { text-decoration: underline; }
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-400);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 24px 0;
}
.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}
.social-buttons { display: flex; gap: 12px; }
.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-900);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.social-btn:hover { border-color: var(--gray-300); background: var(--gray-50); }
.auth-footer-text {
    text-align: center;
    margin-top: 28px;
    color: var(--gray-500);
    font-size: 14px;
}
.auth-footer-text a { color: var(--primary); font-weight: 600; }
.auth-footer-text a:hover { text-decoration: underline; }

/* Password strength meter */
.password-strength {
    margin-top: 8px;
    display: flex;
    gap: 4px;
}
.password-strength .bar {
    flex: 1; height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    transition: var(--transition);
}
.password-strength .bar.weak { background: var(--danger); }
.password-strength .bar.medium { background: #f59e0b; }
.password-strength .bar.strong { background: var(--success); }
.password-hint { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

/* ============================================== */
/* ============ ABOUT PAGE ====================== */
/* ============================================== */
.story-section { background: var(--white); }
.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.story-content h2 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 20px; }
.story-content p { color: var(--gray-700); font-size: 16px; margin-bottom: 16px; }
.story-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 32px;
}
.story-stat {
    background: var(--primary-bg);
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
}
.story-stat strong {
    display: block;
    font-family: var(--font);
    font-size: 36px;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 4px;
}
.story-stat span { color: var(--gray-700); font-size: 14px; }
.story-image {
    background: linear-gradient(135deg, var(--primary-bg) 0%, #ccfbf1 100%);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.story-image .big-mark { width: 120px; height: 120px; border-radius: 50%; background: var(--primary-bg, #f0fdfa); color: var(--primary); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.story-image p { color: var(--gray-700); font-weight: 600; font-size: 18px; }

.values { background: var(--gray-50); }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.value-card {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.value-icon {
    width: 64px; height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow);
}
.value-card h3 { font-size: 19px; margin-bottom: 10px; }
.value-card p { color: var(--gray-700); font-size: 15px; }

.team { background: var(--white); }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.team-card { text-align: center; }
.team-avatar {
    width: 140px; height: 140px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 48px;
    font-weight: 800;
    font-family: var(--font);
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.team-card:hover .team-avatar { transform: scale(1.05); box-shadow: var(--shadow-lg); }
.team-card h3 { font-size: 18px; margin-bottom: 4px; }
.team-role { color: var(--primary); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.team-bio { color: var(--gray-500); font-size: 14px; }

.timeline { background: var(--gray-50); }
.timeline-list { max-width: 800px; margin: 0 auto; position: relative; padding-left: 40px; }
.timeline-list::before {
    content: "";
    position: absolute;
    left: 12px; top: 0; bottom: 0;
    width: 2px;
    background: var(--border);
}
.timeline-item { position: relative; padding-bottom: 40px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: "";
    position: absolute;
    left: -34px; top: 6px;
    width: 16px; height: 16px;
    background: var(--primary);
    border: 3px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--primary);
}
.timeline-year {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 8px;
}
.timeline-item h3 { font-size: 18px; margin-bottom: 6px; }
.timeline-item p { color: var(--gray-700); font-size: 15px; }

/* ===== Responsive ===== */
@media (max-width: 968px) {
    .hero-grid, .api-grid, .contact-grid, .story-grid { grid-template-columns: 1fr; gap: 48px; }
    .feature-grid, .pricing-grid, .testimonial-grid, .usecase-grid, .value-grid { grid-template-columns: 1fr 1fr; }
    .team-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .price-card.featured { transform: none; }
    .hero-visual { height: 480px; max-width: 400px; margin: 0 auto; }
    .nav { display: none; }
    .nav.open { display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0; background: var(--white); padding: 24px; gap: 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
    .menu-toggle { display: flex; }
    .nav-cta .btn-ghost { display: none; }
    .steps { flex-direction: column; }
    .step-arrow svg { transform: rotate(90deg); }
    section { padding: 72px 0; }
    /* Auth */
    .auth-page { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .auth-form-side { padding: 32px 24px; min-height: 100vh; }
    .auth-back { position: static; margin-bottom: 24px; }
}
@media (max-width: 600px) {
    .feature-grid, .pricing-grid, .testimonial-grid, .usecase-grid, .value-grid, .team-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .hero-stats { gap: 20px; }
    .form-row { grid-template-columns: 1fr; }
    .story-stats { grid-template-columns: 1fr 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .container { padding: 0 16px; }
    .floating-card.card-1, .floating-card.card-2 { display: none; }
    .form-options { flex-direction: column; align-items: flex-start; gap: 12px; }
    .social-buttons { flex-direction: column; }
}

/* ============================================== */
/* ============ DASHBOARD ======================= */
/* ============================================== */
:root {
    --sidebar-w: 260px;
    --topbar-h: 70px;
    --sidebar-bg: #0f172a;
    --sidebar-hover: rgba(255,255,255,0.06);
    --sidebar-active: rgba(13, 148, 136, 0.18);
}
.dashboard {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
    background: var(--gray-50);
}
/* Sidebar */
.sidebar {
    background: var(--sidebar-bg);
    color: rgba(255,255,255,0.75);
    padding: 24px 16px;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    overflow-y: auto;
    z-index: 50;
    transition: transform 0.3s ease;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.sidebar .logo {
    color: var(--white);
    padding: 0 12px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 24px;
}
.sidebar-section { margin-bottom: 24px; }
.sidebar-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.4);
    padding: 0 12px;
    margin-bottom: 8px;
    font-weight: 700;
}
.sidebar-menu { display: flex; flex-direction: column; gap: 2px; }
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-weight: 500;
    transition: 0.15s;
    position: relative;
}
.sidebar-menu a:hover {
    background: var(--sidebar-hover);
    color: var(--white);
}
.sidebar-menu a.active {
    background: var(--sidebar-active);
    color: var(--white);
}
.sidebar-menu a.active::before {
    content: "";
    position: absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 3px;
    background: var(--primary-light);
    border-radius: 0 3px 3px 0;
}
.sidebar-menu svg { flex-shrink: 0; opacity: 0.8; }
.sidebar-menu a.active svg, .sidebar-menu a:hover svg { opacity: 1; }
.sidebar-menu .badge {
    margin-left: auto;
    background: var(--accent);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
}
.sidebar-upgrade {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 14px;
    padding: 20px;
    color: var(--white);
    margin-top: 16px;
    position: relative;
    overflow: hidden;
}
.sidebar-upgrade::before {
    content: "";
    position: absolute;
    top: -30px; right: -30px;
    width: 100px; height: 100px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}
.sidebar-upgrade h4 { color: var(--white); font-size: 15px; margin-bottom: 6px; position: relative; }
.sidebar-upgrade p { font-size: 12px; opacity: 0.85; margin-bottom: 12px; position: relative; }
.sidebar-upgrade .btn-primary { background: white; color: var(--primary); padding: 8px 14px; font-size: 13px; position: relative; }
.sidebar-upgrade .btn-primary:hover { background: var(--gray-100); }

/* Main content area */
.dashboard-main {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.topbar {
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: sticky;
    top: 0;
    z-index: 40;
}
.topbar-left { display: flex; align-items: center; gap: 16px; flex: 1; }
.sidebar-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: var(--gray-700);
}
.search-box {
    position: relative;
    max-width: 400px;
    flex: 1;
}
.search-box input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    background: var(--gray-50);
    transition: 0.2s;
}
.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--primary-bg);
}
.search-box svg {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-700);
    position: relative;
    transition: 0.2s;
}
.topbar-btn:hover { background: var(--gray-50); color: var(--primary); border-color: var(--primary); }
.topbar-btn .dot {
    position: absolute;
    top: 8px; right: 8px;
    width: 8px; height: 8px;
    background: var(--accent);
    border: 2px solid var(--white);
    border-radius: 50%;
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
}
.topbar-user:hover { background: var(--gray-50); border-color: var(--border); }
.topbar-user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    font-family: var(--font);
}
.topbar-user-info { line-height: 1.2; }
.topbar-user-info strong { display: block; font-size: 13px; color: var(--dark); }
.topbar-user-info span { font-size: 11px; color: var(--gray-500); }

/* Dashboard content */
.dashboard-content {
    padding: 9px;
    flex: 1;
}
.page-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}
.page-title h1 { font-size: 28px; margin-bottom: 4px; font-family: var(--font); }
.page-title p { color: var(--gray-500); font-size: 14px; }
.page-title .actions { display: flex; gap: 8px; }

/* Stat cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: 0.2s;
    position: relative;
    overflow: hidden;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08); }
.stat-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.stat-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.stat-icon.teal { background: rgba(13, 148, 136, 0.1); color: var(--primary); }
.stat-icon.orange { background: rgba(249, 115, 22, 0.1); color: var(--accent); }
.stat-icon.blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.stat-icon.purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}
.stat-trend.up { color: var(--success); background: rgba(16, 185, 129, 0.1); }
.stat-trend.down { color: var(--danger); background: rgba(239, 68, 68, 0.1); }
.stat-value {
    font-family: var(--font);
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}
.stat-label { color: var(--gray-500); font-size: 13px; }
.stat-spark {
    margin-top: 12px;
    height: 36px;
}

/* Two-column layout for chart + side */
.dash-row { display: grid; gap: 20px; margin-bottom: 28px; }
.dash-row.row-2 { grid-template-columns: 2fr 1fr; }
.dash-row.row-3 { grid-template-columns: 1fr 1fr 1fr; }
.dash-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
}
.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}
.dash-card-header h3 { font-size: 17px; font-family: var(--font); }
.dash-card-header p { color: var(--gray-500); font-size: 13px; margin-top: 2px; }
.dash-tabs { display: flex; gap: 4px; background: var(--gray-100); padding: 4px; border-radius: 8px; }
.dash-tabs button {
    background: none;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    font-family: inherit;
    transition: 0.2s;
}
.dash-tabs button.active { background: var(--white); color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }

/* SVG chart */
.chart-svg { width: 100%; height: 240px; display: block; }
.chart-legend { display: flex; gap: 20px; margin-top: 16px; flex-wrap: wrap; }
.chart-legend span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray-700); font-weight: 500; }
.chart-legend .dot { width: 10px; height: 10px; border-radius: 50%; }

/* Network distribution list */
.net-list { display: flex; flex-direction: column; gap: 16px; }
.net-row { }
.net-row-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.net-name { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.net-dot { width: 10px; height: 10px; border-radius: 50%; }
.net-percent { font-size: 13px; color: var(--gray-500); font-weight: 600; }
.net-bar { height: 8px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.net-fill { height: 100%; border-radius: 4px; transition: 1s ease; }

/* Table */
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--gray-50);
}
.dash-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--gray-900);
}
.dash-table tr:hover td { background: var(--gray-50); }
.dash-table tr:last-child td { border-bottom: none; }
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.status-pill.delivered { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.status-pill.delivered::before { background: var(--success); }
.status-pill.pending { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.status-pill.pending::before { background: #f59e0b; }
.status-pill.failed { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.status-pill.failed::before { background: var(--danger); }
.cell-phone { font-family: 'Courier New', monospace; font-size: 13px; color: var(--gray-700); }
.cell-msg { color: var(--gray-500); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Quick action cards */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.quick-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    cursor: pointer;
    transition: 0.2s;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: inherit;
}
.quick-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08); border-color: var(--primary); }
.quick-card-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.quick-card h4 { font-size: 15px; font-family: var(--font); }
.quick-card p { font-size: 13px; color: var(--gray-500); }

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 45;
}
.sidebar-overlay.open { display: block; }

@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .dash-row.row-3 { grid-template-columns: 1fr 1fr; }
    .quick-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .dashboard { grid-template-columns: 1fr; }
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 0 0 40px rgba(0,0,0,0.2);
    }
    .sidebar.open { transform: translateX(0); }
    .dashboard-main { grid-column: 1; }
    .sidebar-toggle { display: flex; }
    .topbar { padding: 0 16px; }
    .dashboard-content { padding: 20px; }
    .dash-row.row-2 { grid-template-columns: 1fr; }
    .topbar-user-info { display: none; }
}
@media (max-width: 600px) {
    .stats-grid, .quick-grid, .dash-row.row-3 { grid-template-columns: 1fr; }
    .page-title h1 { font-size: 22px; }
    .search-box { display: none; }
    .dash-card { padding: 16px; }
    .stat-card { padding: 18px; }
}

/* ============================================== */
/* ============ SEND SMS COMPOSER =============== */
/* ============================================== */
.composer-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.composer-card { background: white; border: 1px solid var(--border); border-radius: 16px; padding: 28px; }
.recipient-tabs { display: flex; gap: 4px; background: var(--gray-100); padding: 4px; border-radius: 10px; margin-bottom: 16px; }
.recipient-tabs button { background: none; border: none; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--gray-700); cursor: pointer; font-family: inherit; flex: 1; transition: 0.2s; }
.recipient-tabs button.active { background: white; color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.phone-input-group { position: relative; }
.phone-input-group .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gray-500); font-weight: 600; font-size: 14px; pointer-events: none; }
.phone-input-group input { padding-left: 56px !important; }
.composer-textarea { min-height: 140px; resize: vertical; }
.composer-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; color: var(--gray-500); }
.composer-meta .char-count { font-weight: 600; }
.composer-meta .char-count.warn { color: #f59e0b; }
.composer-meta .char-count.danger { color: var(--danger); }
.sms-counter {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
}
.schedule-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toggle-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle-switch input { display: none; }
.toggle-slider { width: 40px; height: 22px; background: var(--gray-300); border-radius: 999px; position: relative; transition: 0.2s; }
.toggle-slider::before { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: white; border-radius: 50%; transition: 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }
.recipient-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--primary-bg); color: var(--primary); border-radius: 999px; font-size: 13px; font-weight: 500; margin: 4px 4px 4px 0; }
.recipient-chip button { background: none; border: none; cursor: pointer; color: var(--primary); padding: 0; display: flex; }
.preview-phone {
    background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%);
    border-radius: 28px;
    padding: 24px 18px;
    border: 8px solid var(--dark);
    max-width: 280px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    min-height: 320px;
}
.preview-phone .sender { font-size: 11px; color: var(--primary); font-weight: 700; margin-bottom: 4px; }
.preview-phone .msg { font-size: 14px; line-height: 1.5; color: var(--gray-900); }
.preview-phone .time { font-size: 10px; color: var(--gray-500); margin-top: 6px; text-align: right; }
.preview-info { display: flex; flex-direction: column; gap: 14px; }
.preview-info .row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.preview-info .row:last-child { border-bottom: none; }
.preview-info .row strong { color: var(--dark); font-weight: 600; }
.preview-info .row span { color: var(--gray-500); }

/* ============================================== */
/* ============ API KEYS ======================== */
/* ============================================== */
.api-key-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: 0.2s;
    margin-bottom: 12px;
}
.api-key-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.api-key-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.api-key-info { flex: 1; min-width: 0; }
.api-key-info h4 { font-size: 15px; margin-bottom: 4px; font-family: var(--font); }
.api-key-info p { font-size: 12px; color: var(--gray-500); }
.api-key-token {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: var(--gray-100);
    padding: 4px 10px;
    border-radius: 6px;
    color: var(--gray-700);
    margin-top: 6px;
    display: inline-block;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
.api-key-actions { display: flex; gap: 8px; }
.icon-btn {
    background: var(--gray-100);
    border: none;
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--gray-700);
    transition: 0.2s;
}
.icon-btn:hover { background: var(--primary); color: white; }
.icon-btn.danger:hover { background: var(--danger); }
.code-tabs { display: flex; gap: 4px; background: var(--gray-100); padding: 4px; border-radius: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.code-tabs button { background: none; border: none; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--gray-700); cursor: pointer; font-family: inherit; transition: 0.2s; }
.code-tabs button.active { background: white; color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.code-block-large {
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 16px;
}
.code-block-large pre {
    padding: 20px;
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.7;
    overflow-x: auto;
    margin: 0;
}

/* ============================================== */
/* ============ CAMPAIGNS / CONTACTS ============ */
/* ============================================== */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-bar-left, .filter-bar-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search-mini {
    display: flex; align-items: center; gap: 8px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 240px;
}
.search-mini input { border: none; outline: none; background: none; font-size: 14px; font-family: inherit; flex: 1; }
.filter-pill {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--gray-700);
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.filter-pill:hover, .filter-pill.active { background: var(--primary-bg); color: var(--primary); border-color: var(--primary); }
.campaign-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    transition: 0.2s;
}
.campaign-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.05); border-color: var(--primary); }
.campaign-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.campaign-info h3 { font-size: 17px; margin-bottom: 6px; font-family: var(--font); }
.campaign-info p { font-size: 13px; color: var(--gray-500); }
.campaign-progress { margin-top: 12px; }
.campaign-stats { display: flex; gap: 32px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--border); }
.campaign-stat strong { display: block; font-size: 20px; color: var(--dark); font-weight: 700; font-family: var(--font); }
.campaign-stat span { font-size: 12px; color: var(--gray-500); }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.contact-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    transition: 0.2s;
    cursor: pointer;
}
.contact-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(15,23,42,0.08); border-color: var(--primary); }
.contact-avatar {
    width: 64px; height: 64px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 22px;
    font-family: var(--font);
}
.contact-card h4 { font-size: 15px; margin-bottom: 4px; font-family: var(--font); }
.contact-card .phone { font-size: 12px; color: var(--gray-500); font-family: 'Courier New', monospace; }
.contact-card .tag { display: inline-block; margin-top: 10px; padding: 3px 10px; background: var(--primary-bg); color: var(--primary); border-radius: 999px; font-size: 11px; font-weight: 600; }

/* ============================================== */
/* ============ ANALYTICS ======================= */
/* ============================================== */
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.donut-wrap { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.donut-svg { width: 180px; height: 180px; flex-shrink: 0; }
.donut-legend { display: flex; flex-direction: column; gap: 12px; }
.donut-legend .item { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.donut-legend .item .swatch { width: 12px; height: 12px; border-radius: 3px; }
.donut-legend .item .value { margin-left: auto; font-weight: 700; color: var(--dark); }
.bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 240px; padding: 16px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bar { width: 100%; background: linear-gradient(180deg, var(--primary), var(--primary-light)); border-radius: 6px 6px 0 0; min-height: 4px; position: relative; transition: 0.3s; }
.bar:hover { background: linear-gradient(180deg, var(--primary-dark), var(--primary)); }
.bar-label { font-size: 11px; color: var(--gray-500); font-weight: 600; }
.bar-value { font-size: 11px; color: var(--dark); font-weight: 700; }

/* ============================================== */
/* ============ BILLING ========================= */
/* ============================================== */
.plan-card {
    background: linear-gradient(135deg, var(--dark) 0%, #1e293b 100%);
    color: white;
    border-radius: 20px;
    padding: 32px;
    position: relative;
    overflow: hidden;
}
.plan-card::before {
    content: "";
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}
.plan-card .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.7; position: relative; }
.plan-card .plan-name { font-family: var(--font); font-size: 32px; font-weight: 800; margin: 8px 0; position: relative; }
.plan-card .plan-price { font-size: 16px; opacity: 0.9; position: relative; }
.plan-card .plan-price strong { font-size: 24px; font-weight: 800; }
.plan-card .meta { display: flex; gap: 32px; margin-top: 24px; position: relative; }
.plan-card .meta div { font-size: 12px; opacity: 0.8; }
.plan-card .meta div strong { display: block; font-size: 20px; opacity: 1; font-weight: 800; font-family: var(--font); }
.payment-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.brand-logo {
    width: 48px; height: 32px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    color: white;
    font-size: 12px;
}
.brand-logo.visa { background: #1a1f71; }
.brand-logo.mc { background: linear-gradient(90deg, #eb001b 50%, #f79e1b 50%); }
.brand-logo.mpesa { background: linear-gradient(135deg, #4caf50, #2e7d32); }

/* ============================================== */
/* ============ SETTINGS ======================== */
/* ============================================== */
.settings-grid { display: grid; grid-template-columns: 240px 1fr; gap: 28px; }
.settings-nav { display: flex; flex-direction: column; gap: 4px; }
.settings-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
}
.settings-nav a:hover { background: var(--gray-100); }
.settings-nav a.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.settings-section { background: white; border: 1px solid var(--border); border-radius: 16px; padding: 28px; margin-bottom: 20px; }
.settings-section h3 { font-size: 18px; margin-bottom: 4px; font-family: var(--font); }
.settings-section > p { color: var(--gray-500); font-size: 14px; margin-bottom: 24px; }
.settings-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border); gap: 16px; flex-wrap: wrap; }
.settings-row:last-child { border-bottom: none; }
.settings-row .label h4 { font-size: 15px; margin-bottom: 4px; font-family: var(--font); }
.settings-row .label p { font-size: 13px; color: var(--gray-500); }
.avatar-lg {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    font-weight: 800;
    font-family: var(--font);
}

@media (max-width: 968px) {
    .composer-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr 1fr; }
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .contact-grid, .metric-grid { grid-template-columns: 1fr; }
    .schedule-row { grid-template-columns: 1fr; }
    .api-key-card { flex-wrap: wrap; }
    .campaign-stats { gap: 16px; }
}

/* ============================================== */
/* ============ MISSING COMPONENT CSS ============ */
/* ============================================== */

/* --- Utilities --- */
.desc { color: var(--gray-500); font-size: 14px; margin-bottom: 24px; }
.hint { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.text-right { text-align: right; }

/* --- Settings page --- */
.settings-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
}
.settings-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.settings-nav-item:hover { background: var(--gray-100); }
.settings-nav-item.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }

.avatar-section {
    display: flex; align-items: center; gap: 20px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: 14px;
    margin-bottom: 24px;
}
.avatar-large {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 800;
    font-family: var(--font);
}
.avatar-info h4 { font-size: 16px; margin-bottom: 2px; font-family: var(--font); }
.avatar-info p { font-size: 13px; color: var(--gray-500); margin-bottom: 10px; }
.avatar-actions { display: flex; gap: 8px; }
.avatar-actions button {
    padding: 6px 12px; font-size: 12px; font-weight: 600;
    border-radius: 8px; cursor: pointer; font-family: inherit;
    border: 1px solid var(--border); background: white; color: var(--gray-700);
}
.avatar-actions button.danger { color: var(--danger); border-color: rgba(239,68,68,0.3); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.form-group.full { grid-column: 1 / -1; }
.form-row { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); }

.toggle-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 0; border-bottom: 1px solid var(--border); gap: 16px;
}
.toggle-row:last-child { border-bottom: none; }
.toggle-info strong { display: block; font-size: 14px; margin-bottom: 2px; }
.toggle-info span { font-size: 12px; color: var(--gray-500); }
.toggle-slider {
    position: relative; width: 40px; height: 22px;
    background: var(--gray-300); border-radius: 999px;
    transition: 0.2s;
}
.toggle-slider::before {
    content: ""; position: absolute; top: 2px; left: 2px;
    width: 18px; height: 18px; background: white;
    border-radius: 50%; transition: 0.2s;
}

.session-card {
    display: flex; align-items: center; gap: 14px;
    padding: 16px; border: 1px solid var(--border); border-radius: 12px;
    margin-bottom: 10px; background: var(--gray-50);
}
.session-icon {
    width: 44px; height: 44px; border-radius: 10px;
    background: var(--primary-bg); color: var(--primary);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.session-info { flex: 1; min-width: 0; line-height: 1.4; }
.session-info strong { display: block; font-size: 14px; }
.session-info strong .current {
    display: inline-block; margin-left: 8px;
    font-size: 10px; padding: 2px 6px;
    background: var(--success); color: white; border-radius: 4px;
}
.session-info span { font-size: 12px; color: var(--gray-500); }

.webhook-card {
    border: 1px solid var(--border); border-radius: 12px;
    padding: 16px; margin-bottom: 12px;
}
.webhook-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.webhook-events { display: flex; gap: 6px; flex-wrap: wrap; }
.webhook-event {
    padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
    background: var(--primary-bg); color: var(--primary);
}

.danger-zone {
    border: 1px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.03);
    border-radius: 16px; padding: 28px; margin-bottom: 20px;
}
.danger-zone h3 { color: var(--danger); margin-bottom: 4px; }
.danger-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 0; border-top: 1px solid rgba(239, 68, 68, 0.15); gap: 16px;
}
.danger-row strong { display: block; font-size: 14px; }
.danger-row p { font-size: 12px; color: var(--gray-500); }
.danger-row button {
    padding: 8px 14px; border-radius: 8px;
    border: 1px solid var(--danger); color: var(--danger);
    background: white; font-weight: 600; cursor: pointer; font-family: inherit;
}

/* --- Reports --- */
.reports-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 20px; margin-bottom: 28px;
}
.report-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 16px; padding: 24px; transition: 0.2s;
}
.report-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary); }
.report-icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.report-icon.teal   { background: rgba(13,148,136,0.1);  color: var(--primary); }
.report-icon.orange { background: rgba(249,115,22,0.1);  color: var(--accent); }
.report-icon.blue   { background: rgba(59,130,246,0.1);  color: #3b82f6; }
.report-icon.purple { background: rgba(139,92,246,0.1);   color: #8b5cf6; }
.report-icon.green  { background: rgba(16,185,129,0.1);  color: var(--success); }
.report-icon.pink   { background: rgba(236,72,153,0.1);  color: #ec4899; }
.report-card h3 { font-size: 16px; margin-bottom: 6px; font-family: var(--font); }
.report-card p { font-size: 13px; color: var(--gray-500); margin-bottom: 16px; }
.report-meta {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 12px; border-top: 1px solid var(--border);
    font-size: 12px; color: var(--gray-500);
}
.report-meta strong { color: var(--primary); cursor: pointer; font-weight: 700; }

.schedule-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 16px; padding: 24px; margin-bottom: 28px;
}
.schedule-card h3 { font-size: 16px; margin-bottom: 4px; font-family: var(--font); }
.schedule-card > p { color: var(--gray-500); font-size: 13px; margin-bottom: 20px; }
.schedule-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr auto; gap: 12px; align-items: end; }
.schedule-grid .form-group { margin-bottom: 0; }
.schedule-grid button { padding: 12px 18px; }

.status-pill.ready       { background: rgba(16,185,129,0.1); color: var(--success); }
.status-pill.ready::before       { background: var(--success); }
.status-pill.processing  { background: rgba(245,158,11,0.1); color: #f59e0b; }
.status-pill.processing::before  { background: #f59e0b; }
.status-pill.paid        { background: rgba(13,148,136,0.1); color: var(--primary); }
.status-pill.paid::before        { background: var(--primary); }
.status-pill.active      { background: rgba(13,148,136,0.1); color: var(--primary); }
.status-pill.active::before      { background: var(--primary); }

/* --- Notifications --- */
.notif-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}
.notif-group-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--gray-500); font-weight: 700;
    padding: 16px 24px 8px;
    background: var(--gray-50);
}
.notif-item {
    display: flex; gap: 16px; padding: 16px 24px;
    border-top: 1px solid var(--border); align-items: flex-start;
    transition: 0.15s;
}
.notif-item:hover { background: var(--gray-50); }
.notif-item.unread { background: rgba(13,148,136,0.03); }
.notif-item.unread .notif-title { font-weight: 700; }
.notif-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.notif-icon.warning { background: rgba(245,158,11,0.12); color: #f59e0b; }
.notif-icon.success { background: rgba(16,185,129,0.12);  color: var(--success); }
.notif-icon.danger  { background: rgba(239,68,68,0.12);   color: var(--danger); }
.notif-icon.payment { background: rgba(13,148,136,0.12);  color: var(--primary); }
.notif-icon.info    { background: rgba(59,130,246,0.12);  color: #3b82f6; }
.notif-icon.promo   { background: rgba(236,72,153,0.12);  color: #ec4899; }
.notif-icon.system  { background: rgba(100,116,139,0.12); color: var(--gray-700); }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: 14px; margin-bottom: 4px; color: var(--dark); }
.notif-desc { font-size: 13px; color: var(--gray-700); line-height: 1.5; margin-bottom: 6px; }
.notif-meta { font-size: 12px; color: var(--gray-500); display: flex; gap: 12px; }
.notif-meta a { color: var(--primary); font-weight: 600; }
.notif-action { text-align: right; flex-shrink: 0; }
.notif-time { font-size: 11px; color: var(--gray-400); }
.notif-dot {
    width: 8px; height: 8px; background: var(--primary);
    border-radius: 50%; margin-top: 6px; display: inline-block;
}

.preference-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0; border-bottom: 1px solid var(--border); gap: 16px;
}
.preference-row:last-child { border-bottom: none; }
.preference-row strong { display: block; font-size: 14px; }
.preference-row span { font-size: 12px; color: var(--gray-500); }

/* --- Groups & Templates --- */
.group-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.group-card {
    background: white; border: 1px solid var(--border);
    border-radius: 14px; padding: 20px;
    display: flex; gap: 14px; align-items: flex-start;
    transition: 0.2s;
}
.group-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.group-card h4 { font-size: 15px; margin-bottom: 4px; font-family: var(--font); }
.group-card p { font-size: 13px; color: var(--gray-500); margin-bottom: 8px; line-height: 1.4; }
.group-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px; font-family: var(--font);
    flex-shrink: 0;
}
.meta { font-size: 12px; color: var(--gray-500); display: flex; gap: 8px; flex-wrap: wrap; }

.category-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.cat-chip {
    background: white; border: 1px solid var(--border);
    border-radius: 999px; padding: 8px 14px;
    font-size: 13px; font-weight: 500; cursor: pointer;
    color: var(--gray-700); font-family: inherit;
    display: inline-flex; align-items: center; gap: 8px;
    transition: 0.15s;
}
.cat-chip:hover { border-color: var(--primary); color: var(--primary); }
.cat-chip.active { background: var(--primary-bg); color: var(--primary); border-color: var(--primary); }
.cat-chip .count {
    background: var(--gray-100); color: var(--gray-500);
    padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
}
.cat-chip.active .count { background: var(--primary); color: white; }

.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tpl-card {
    background: white; border: 1px solid var(--border);
    border-radius: 14px; overflow: hidden;
    transition: 0.2s;
}
.tpl-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary); }
.tpl-thumb {
    padding: 28px; text-align: center; font-size: 40px;
    position: relative;
    min-height: 110px; display: flex; align-items: center; justify-content: center;
}
.tpl-thumb.otp       { background: linear-gradient(135deg,#f0fdfa,#ccfbf1); }
.tpl-thumb.sales    { background: linear-gradient(135deg,#fff7ed,#fed7aa); }
.tpl-thumb.alert    { background: linear-gradient(135deg,#fef2f2,#fecaca); }
.tpl-thumb.reminder { background: linear-gradient(135deg,#eff6ff,#bfdbfe); }
.tpl-thumb.welcome  { background: linear-gradient(135deg,#faf5ff,#e9d5ff); }
.tpl-thumb.general  { background: linear-gradient(135deg,#f8fafc,#e2e8f0); }
.tpl-thumb .category-label {
    position: absolute; bottom: 8px; right: 12px;
    font-size: 10px; text-transform: uppercase; font-weight: 700;
    color: var(--gray-500); letter-spacing: 0.08em;
    background: rgba(255,255,255,0.85); padding: 2px 8px; border-radius: 999px;
}
.tpl-body { padding: 16px; }
.tpl-body h4 { font-size: 15px; margin-bottom: 6px; font-family: var(--font); }
.tpl-body p { font-size: 13px; color: var(--gray-500); line-height: 1.5; max-height: 64px; overflow: hidden; margin-bottom: 10px; }
.tpl-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.tpl-tag {
    padding: 2px 8px; background: var(--primary-bg); color: var(--primary);
    border-radius: 4px; font-size: 11px; font-family: 'Courier New', monospace; font-weight: 600;
}
.tpl-stats { font-size: 12px; color: var(--gray-500); padding-top: 8px; border-top: 1px solid var(--border); margin-bottom: 8px; }
.tpl-actions { display: flex; gap: 6px; }
.btn-ghost-sm {
    background: transparent; border: 1px solid var(--border);
    padding: 4px 10px; border-radius: 6px; font-size: 12px;
    color: var(--gray-700); cursor: pointer; font-family: inherit;
    transition: 0.15s;
}
.btn-ghost-sm:hover { border-color: var(--primary); color: var(--primary); }

/* --- Billing --- */
.billing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }

.balance-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white; border-radius: 20px; padding: 32px;
    position: relative; overflow: hidden;
}
.balance-card::before {
    content: ""; position: absolute; top: -60px; right: -60px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    border-radius: 50%;
}
.balance-card h3 { color: rgba(255,255,255,0.85); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; position: relative; }
.balance-amount {
    font-family: var(--font); font-size: 40px; font-weight: 800;
    margin-bottom: 4px; position: relative;
}
.balance-sms { font-size: 14px; opacity: 0.85; margin-bottom: 24px; position: relative; }
.balance-actions { display: flex; gap: 8px; position: relative; }
.balance-actions button {
    padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px;
    border: none; cursor: pointer; font-family: inherit; background: white; color: var(--primary);
}
.balance-actions button.secondary { background: rgba(255,255,255,0.15); color: white; }

.plan-card .badge { background: rgba(255,255,255,0.18); color: white; }
.plan-features { margin: 20px 0; padding: 0; list-style: none; }
.plan-features li {
    padding: 8px 0; font-size: 14px; opacity: 0.9;
    display: flex; align-items: center; gap: 8px; border: none;
}
.plan-features li::before { content: "✓"; font-weight: 800; }
.plan-renewal { font-size: 13px; opacity: 0.85; margin-bottom: 16px; position: relative; }
.plan-actions { display: flex; gap: 8px; position: relative; }
.plan-actions button { flex: 1; padding: 10px; border-radius: 10px; font-weight: 600; cursor: pointer; font-family: inherit; }
.plan-actions .btn-outline { background: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.3); }
.plan-actions .btn-primary { background: white; color: var(--primary); border: none; }

.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 28px; }
.pricing-card {
    background: white; border: 1px solid var(--border);
    border-radius: 16px; padding: 28px; text-align: center; transition: 0.2s;
}
.pricing-card.featured {
    background: linear-gradient(180deg, var(--dark) 0%, #1e293b 100%);
    color: white; border: none; transform: scale(1.03);
}
.pricing-card .name { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--gray-500); margin-bottom: 12px; }
.pricing-card.featured .name { color: rgba(255,255,255,0.7); }
.pricing-card .price { font-family: var(--font); font-size: 32px; font-weight: 800; margin-bottom: 4px; }
.pricing-card .price small { font-size: 14px; font-weight: 500; color: var(--gray-500); }
.pricing-card.featured .price small { color: rgba(255,255,255,0.7); }
.pricing-card .desc { color: var(--gray-500); font-size: 13px; margin-bottom: 20px; }
.pricing-card.featured .desc { color: rgba(255,255,255,0.75); }
.pricing-card ul { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; }
.pricing-card ul li {
    padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 8px;
}
.pricing-card ul li::before { content: "✓"; color: var(--primary); font-weight: 800; }
.pricing-card.featured ul li { border-color: rgba(255,255,255,0.1); color: rgba(255,255,255,0.9); }
.pricing-card ul li.disabled { color: var(--gray-400); }
.pricing-card ul li.disabled::before { content: "✕"; color: var(--gray-400); }
.pricing-card button.btn { width: 100%; padding: 12px; border-radius: 10px; font-weight: 600; cursor: pointer; font-family: inherit; }

.pm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 8px 0; }
.pm-card {
    background: white; border: 1px solid var(--border);
    border-radius: 12px; padding: 16px;
    display: flex; align-items: center; gap: 12px; transition: 0.2s; cursor: pointer;
}
.pm-card:hover { border-color: var(--primary); }
.pm-card.active { border-color: var(--primary); background: var(--primary-bg); }
.pm-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 800; font-family: var(--font);
}
.pm-name { font-weight: 600; font-size: 14px; }
.pm-detail { font-size: 12px; color: var(--gray-500); }
.pm-add {
    background: transparent; border: 2px dashed var(--border);
    border-radius: 12px; padding: 16px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    color: var(--gray-500); cursor: pointer; transition: 0.2s; min-height: 76px;
}
.pm-add:hover { border-color: var(--primary); color: var(--primary); }

/* --- Analytics --- */
.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.kpi-mini { background: var(--gray-50); border-radius: 12px; padding: 14px; }
.kpi-mini-label { font-size: 11px; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.kpi-mini-value { font-family: var(--font); font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.kpi-mini-trend { font-size: 12px; font-weight: 600; }
.stat-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }

.heatmap { display: grid; grid-template-columns: repeat(24, 1fr); gap: 4px; padding: 16px 0; }
.heatmap .cell { aspect-ratio: 1 / 1; border-radius: 4px; background: var(--gray-100); transition: 0.2s; }
.heatmap .cell:hover { transform: scale(1.2); outline: 2px solid var(--primary); }
.heatmap-hours { display: grid; grid-template-columns: repeat(5, 1fr); font-size: 11px; color: var(--gray-500); margin-top: 8px; text-align: center; }
.heatmap-legend { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--gray-500); margin-top: 12px; }
.heatmap-legend .scale { display: flex; gap: 2px; }
.heatmap-legend .scale span { width: 16px; height: 16px; border-radius: 3px; }

.country-list { display: flex; flex-direction: column; gap: 4px; padding: 4px 0; }
.country-row {
    display: grid; grid-template-columns: 36px 1fr auto;
    align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px; transition: 0.15s;
}
.country-row:hover { background: var(--gray-50); }
.country-flag { font-size: 24px; }
.country-name { font-size: 14px; font-weight: 500; }
.country-value { font-size: 14px; font-weight: 700; color: var(--dark); font-family: var(--font); }

.net-list { display: flex; flex-direction: column; gap: 16px; }
.net-row { padding: 4px 0; }
.net-row-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.net-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.net-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.net-percent { font-size: 13px; color: var(--gray-700); font-weight: 500; }
.net-bar { height: 8px; background: var(--gray-100); border-radius: 999px; overflow: hidden; }
.net-fill { height: 100%; background: var(--primary); border-radius: 999px; transition: width 0.4s; }

.top-list { display: flex; flex-direction: column; padding: 4px 0; }
.top-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 12px; border-radius: 10px;
    border-bottom: 1px solid var(--border); transition: 0.15s;
}
.top-item:last-child { border-bottom: none; }
.top-item:hover { background: var(--gray-50); }
.top-rank {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font); font-weight: 800;
    background: var(--gray-100); color: var(--gray-700); flex-shrink: 0;
    font-size: 14px;
}
.top-rank.gold   { background: linear-gradient(135deg,#fbbf24,#f59e0b); color: white; }
.top-rank.silver { background: linear-gradient(135deg,#cbd5e1,#94a3b8); color: white; }
.top-rank.bronze { background: linear-gradient(135deg,#d97706,#b45309); color: white; }
.top-info { flex: 1; min-width: 0; }
.top-info strong { display: block; font-size: 14px; margin-bottom: 2px; }
.top-info span { font-size: 12px; color: var(--gray-500); }
.top-pct { font-family: var(--font); font-weight: 700; color: var(--primary); font-size: 14px; }

.bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 240px; padding: 16px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bar {
    width: 100%; max-width: 36px;
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
    border-radius: 6px 6px 0 0; min-height: 4px;
    transition: 0.3s;
}
.bar-label { font-size: 11px; color: var(--gray-500); font-weight: 600; }

.chart-container { position: relative; height: 280px; padding: 12px 0; }

/* --- Toggle switch complete --- */
.toggle-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle-switch input { display: none; }
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* --- Alerts --- */
.alert { padding: 12px 18px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alert ul { padding-left: 18px; margin: 0; }
.alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.alert-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }

/* --- Data table + pagination --- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 14px 16px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
.data-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-500); background: var(--gray-50); font-weight: 600; }
.data-table tr:hover td { background: var(--gray-50); }
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th, .dash-table td { padding: 14px 20px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
.dash-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-500); background: var(--gray-50); font-weight: 600; }
.dash-table tr:hover td { background: var(--gray-50); }
.pagination { margin: 20px 0; display: flex; justify-content: center; }
.pagination nav { display: flex; gap: 4px; }
.pagination a, .pagination span {
    padding: 8px 14px; border-radius: 8px; font-size: 13px;
    color: var(--gray-700); border: 1px solid var(--border); background: white;
}
.pagination a:hover { background: var(--primary); color: white; border-color: var(--primary); }
.pagination .active span { background: var(--primary); color: white; border-color: var(--primary); }

/* --- Responsive --- */
@media (max-width: 968px) {
    .settings-layout { grid-template-columns: 1fr; }
    .reports-grid { grid-template-columns: 1fr 1fr; }
    .plans-grid, .pm-grid { grid-template-columns: 1fr 1fr; }
    .billing-grid { grid-template-columns: 1fr; }
    .group-grid, .tpl-grid { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .schedule-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .reports-grid, .plans-grid, .pm-grid, .group-grid, .tpl-grid { grid-template-columns: 1fr; }
    .schedule-grid { grid-template-columns: 1fr; }
}

/* ============ Top-Up Modal ============ */
.modal-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.55); z-index: 200;
    align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}
.modal-backdrop.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
    background: white; border-radius: 18px; max-width: 520px; width: 92%;
    max-height: 92vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
    padding: 24px 28px 16px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { margin: 0; font-family: var(--font); font-size: 18px; }
.modal-close {
    background: var(--gray-100); border: none; width: 32px; height: 32px;
    border-radius: 50%; cursor: pointer; color: var(--gray-700); font-size: 18px;
    display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--gray-200); }
.modal-body { padding: 24px 28px; }
.modal-footer {
    padding: 16px 28px 24px; border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 8px;
}

.quote-box {
    background: linear-gradient(135deg, var(--primary-bg), white);
    border: 1px solid var(--primary); border-radius: 12px;
    padding: 20px; margin: 16px 0;
}
.quote-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; font-size: 14px;
}
.quote-row.total {
    border-top: 2px solid var(--primary); margin-top: 8px; padding-top: 12px;
    font-family: var(--font); font-size: 18px; font-weight: 700;
}
.quote-row .label { color: var(--gray-700); }
.quote-row .value { font-weight: 600; color: var(--dark); font-family: var(--font); }
.quote-row.total .value { color: var(--primary); font-size: 22px; }
.quote-savings {
    display: inline-block; background: rgba(16, 185, 129, 0.15); color: var(--success);
    padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; margin-left: 6px;
}
.quote-tier-badge {
    background: var(--primary); color: white; padding: 3px 10px; border-radius: 6px;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
}

.quick-amounts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.quick-amount {
    background: white; border: 1px solid var(--border); border-radius: 8px;
    padding: 6px 12px; font-size: 13px; cursor: pointer; font-family: inherit;
    transition: 0.15s; color: var(--gray-700); font-weight: 600;
}
.quick-amount:hover { border-color: var(--primary); color: var(--primary); }
.quick-amount.active { background: var(--primary); color: white; border-color: var(--primary); }

.spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: white;
    border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.status-step {
    display: flex; align-items: flex-start; gap: 14px; padding: 12px 0;
}
.status-step .step-dot {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--gray-100); color: var(--gray-500); font-weight: 700; font-size: 13px;
}
.status-step.done .step-dot { background: var(--success); color: white; }
.status-step.active .step-dot { background: var(--primary); color: white; }
.status-step .step-info { flex: 1; }
.status-step .step-info strong { display: block; font-size: 14px; }
.status-step .step-info span { font-size: 12px; color: var(--gray-500); }

.poll-banner {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b; border-radius: 12px;
    padding: 16px; margin-bottom: 16px;
    display: flex; align-items: center; gap: 12px;
}
.poll-banner .pulse {
    width: 10px; height: 10px; background: #f59e0b; border-radius: 50%;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}
.poll-banner strong { display: block; font-size: 14px; }
.poll-banner p { font-size: 12px; color: var(--gray-700); margin: 4px 0 0; }

/* ============================================== */
/* ========== GLOBAL MOBILE FIXES =============== */
/* ============================================== */

/* Tables: make any un-wrapped table scroll horizontally on mobile
   instead of forcing the whole page wider. Tables keep their
   semantics (display: table) and stay inside the parent. */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}
@media (max-width: 768px) {
    .data-table, .dash-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
        white-space: nowrap;
    }
}

/* Generic safety: any element styled with a fixed pixel width > 280
   shrinks to viewport width on mobile. */
@media (max-width: 600px) {
    .search-mini { min-width: 0; width: 100%; }
    .search-mini input { width: 100%; }
}

/* Fix the inline-styled 2-column grids used inside dashboard.blade.php
   (chart row) and admin/dashboard.blade.php (recent purchases row). */
.dash-row-mobile,
.admin-row-2col {
    display: grid;
    gap: 20px;
}
.dash-row-mobile { grid-template-columns: 2fr 1fr; }
.admin-row-2col  { grid-template-columns: 2fr 1fr; }
@media (max-width: 900px) {
    .dash-row-mobile, .admin-row-2col { grid-template-columns: 1fr; }
}
.dash-wallet-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 480px) {
    .dash-wallet-mini { grid-template-columns: 1fr; }
}

/* Topbar: hide the API-docs button + logout form on very small screens
   so the user avatar + notifications fit without overflow. */
@media (max-width: 480px) {
    .topbar-btn[aria-label="API Docs"] { display: none; }
    .topbar-right form { display: none; }
    .topbar-right { gap: 6px; }
}

/* Heatmap cells: 24 columns at 360px = 13px each, which is fine but
   on very small screens the labels collide. Hide the hours row on phones. */
@media (max-width: 480px) {
    .heatmap { grid-template-columns: repeat(12, 1fr); gap: 3px; }
    .heatmap-hours { display: none; }
}

/* Generic page-title: actions row stacks under title on small screens
   (this is already flex-wrap: wrap, but ensure buttons get full width). */
@media (max-width: 480px) {
    .page-title .actions { width: 100%; }
    .page-title .actions a { flex: 1; justify-content: center; }
}

/* Notification cards / sessions etc: full-width buttons */
@media (max-width: 480px) {
    .balance-actions, .balance-card { padding: 24px 20px; }
    .balance-amount { font-size: 32px; }
    .plan-actions button { padding: 12px 8px; font-size: 13px; }
}

/* Cards on small screens get less padding so content fits. */
@media (max-width: 600px) {
    .admin-card, .dash-card, .composer-card, .balance-card { padding: 18px; }
}

/* Admin layout (used in layouts/admin.blade.php): the inline styles
   in that file define .admin-layout with a fixed 260px sidebar. On
   mobile we hide it behind a transform so it doesn't cover content. */
@media (max-width: 900px) {
    .admin-layout { grid-template-columns: 1fr !important; }
    .admin-sidebar {
        transform: translateX(-100%);
        box-shadow: 0 0 40px rgba(0,0,0,0.2);
        transition: transform 0.3s ease;
    }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { grid-column: 1 !important; padding: 20px !important; }
}
.admin-sidebar-toggle {
    display: none;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: var(--gray-700);
    align-items: center;
    justify-content: center;
}
@media (max-width: 900px) {
    .admin-sidebar-toggle { display: inline-flex; }
}

/* Auth page: already has media query but ensure form doesn't overflow */
@media (max-width: 480px) {
    .auth-form-side { padding: 24px 16px !important; }
    .auth-form-wrap { padding: 0 4px; }
}

/* Public landing footer: prevent long link lists from overflowing */
@media (max-width: 380px) {
    .footer-grid { grid-template-columns: 1fr !important; }
}

/* Composer preview phone: shrink on small screens so it doesn't force
   a horizontal scroll alongside the form. */
@media (max-width: 600px) {
    .preview-phone { max-width: 240px; padding: 20px 14px; min-height: 280px; }
    .composer-card { padding: 20px; }
}


/* ==========================================================================
   Polish layer: classes the pages used but the stylesheet never defined,
   pagination, the send-sms composer and the sender-names page.
   ========================================================================== */

/* ---- Small utilities the pages rely on ---- */
.text-main { color: var(--gray-900); font-weight: 500; }
.text-muted { color: var(--gray-500); }
.text-sm { font-size: 13px; }
.text-danger { color: var(--danger); }
.link, .link-inline { color: var(--primary); font-weight: 600; text-decoration: none; }
.link:hover, .link-inline:hover { text-decoration: underline; }
.header-content { min-width: 0; }
.header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---- Compact stat strip (Contacts, Groups, API keys) ---- */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-mini { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat-mini .label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gray-500); }
.stat-mini .value { font-family: var(--font); font-size: 26px; font-weight: 700; color: var(--dark); line-height: 1.15; }

/* ---- Pagination ---- */
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 4px; }
.pager-info { font-size: 13px; color: var(--gray-500); }
.pager-info strong { color: var(--gray-900); font-weight: 600; }
.pager-list { display: flex; gap: 4px; list-style: none; flex-wrap: wrap; }
.pager-item { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--gray-700); font-size: 13px; font-weight: 600; text-decoration: none; transition: var(--transition); }
a.pager-item:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.pager-item.is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager-item.is-disabled, .pager-item.is-gap { color: var(--gray-400); background: var(--gray-50); cursor: default; }
.pager-item.is-gap { border-color: transparent; background: transparent; }
.pagination { display: block; margin: 8px 0; }
.pagination nav { display: block; }
.pagination-container { padding: 4px 20px 16px; }

/* ---- Forms: multi-selects, focus, disabled ---- */
select[multiple] { padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-family: inherit; font-size: 14px; }
select[multiple] option { padding: 8px 10px; border-radius: 6px; }
select[multiple] option:checked { background: var(--primary-bg) linear-gradient(0deg, var(--primary-bg), var(--primary-bg)); color: var(--primary-dark); font-weight: 600; }
select:disabled, input:disabled, textarea:disabled { background: var(--gray-50); color: var(--gray-400); cursor: not-allowed; }
.form-hint { font-size: 12px; color: var(--gray-500); margin-top: 6px; }
.req { color: var(--danger); }
.input-mono { font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace !important; letter-spacing: 0.02em; }

/* ---- Send SMS ---- */
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.credit-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; padding: 14px 18px; background: linear-gradient(90deg, var(--primary-bg), #fff); border: 1px solid #ccfbf1; border-radius: 14px; }
.credit-banner .amount { font-family: var(--font); font-weight: 700; font-size: 18px; color: var(--primary-dark); }
.credit-banner .note { font-size: 13px; color: var(--primary-dark); }
.credit-banner .link { margin-left: auto; font-size: 13px; }
.composer-card h3 { font-family: var(--font); font-size: 16px; margin-bottom: 16px; }
.composer-grid { align-items: start; }
.composer-side { display: grid; gap: 16px; position: sticky; top: 90px; }
.sender-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; }
.seg-bar { height: 6px; background: var(--gray-100); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.seg-bar > span { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 999px; transition: width 0.15s ease, background 0.15s ease; }
.seg-bar.warn > span { background: #f59e0b; }
.seg-bar.danger > span { background: var(--danger); }
.composer-actions { display: flex; gap: 10px; margin-top: 22px; }
.composer-actions .btn-outline { flex: 1; }
.composer-actions .btn-primary { flex: 2; }
.preview-phone { min-height: 0; border-width: 6px; border-radius: 26px; padding: 22px 16px 18px; }
.preview-phone .bubble { background: #fff; border: 1px solid var(--border); border-radius: 16px 16px 16px 4px; padding: 10px 14px; box-shadow: var(--shadow-sm); }
.preview-phone .msg { word-break: break-word; white-space: pre-wrap; }
.preview-phone .sender { text-transform: uppercase; letter-spacing: 0.04em; }

/* ---- Status pills for sender-name requests ---- */
.status-pill.approved { background: rgba(16,185,129,0.1); color: #059669; }
.status-pill.approved::before { background: #059669; }
.status-pill.under_review { background: rgba(14,165,233,0.1); color: #0284c7; }
.status-pill.under_review::before { background: #0284c7; }
.status-pill.rejected { background: rgba(239,68,68,0.1); color: #dc2626; }
.status-pill.rejected::before { background: #dc2626; }
.status-pill.revoked { background: var(--gray-100); color: var(--gray-700); }
.status-pill.revoked::before { background: var(--gray-500); }

/* ---- Sender names page ---- */
.sn-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 22px; align-items: start; }
.sn-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.sn-card + .sn-card { margin-top: 18px; }
.sn-card h3 { font-family: var(--font); font-size: 16px; margin-bottom: 4px; }
.sn-card .sub { font-size: 13px; color: var(--gray-500); margin-bottom: 14px; }
.sn-list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sn-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.sn-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 0; border-top: 1px solid var(--border); }
.sn-item:first-of-type { border-top: 0; padding-top: 4px; }
.sn-avatar { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-bg); color: var(--primary); display: flex; align-items: center; justify-content: center; font-family: var(--font); font-weight: 700; font-size: 16px; }
.sn-item.is-rejected .sn-avatar, .sn-item.is-revoked .sn-avatar { background: var(--gray-100); color: var(--gray-500); }
.sn-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sn-name code { font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 15px; font-weight: 700; color: var(--dark); letter-spacing: 0.03em; }
.sn-meta { font-size: 12px; color: var(--gray-500); margin-top: 3px; }
.sn-quote { margin-top: 10px; padding: 8px 12px; border-left: 3px solid var(--gray-200); background: var(--gray-50); border-radius: 0 8px 8px 0; font-size: 13px; color: var(--gray-700); }
.sn-note { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.sn-note.warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.sn-note.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.sn-note strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.sn-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.sn-empty { text-align: center; padding: 34px 10px; color: var(--gray-500); }
.sn-empty h4 { font-family: var(--font); color: var(--dark); margin-bottom: 4px; }
.sn-active { text-align: center; }
.sn-active .label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-500); margin-bottom: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.sn-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: #059669; background: rgba(16,185,129,0.1); padding: 3px 9px; border-radius: 999px; text-transform: none; letter-spacing: 0; }
.sn-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #059669; }
.sn-phone { background: linear-gradient(180deg, var(--primary-bg), #fff); border: 6px solid var(--dark); border-radius: 26px; padding: 22px 16px 20px; max-width: 270px; margin: 6px auto 12px; text-align: left; }
.sn-phone .from { font-size: 11px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.sn-phone .bubble { background: #fff; border: 1px solid var(--border); border-radius: 16px 16px 16px 4px; padding: 10px 14px; font-size: 13px; line-height: 1.5; color: var(--gray-900); box-shadow: var(--shadow-sm); word-break: break-word; }
.sn-phone .when { font-size: 10px; color: var(--gray-500); margin-top: 6px; text-align: right; }
.sn-rules { list-style: none; display: grid; gap: 10px; font-size: 13px; color: var(--gray-700); }
.sn-rules li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.sn-rules li::before { content: ""; flex: 0 0 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--primary-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d9488' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }
.sn-steps { list-style: none; counter-reset: sn; display: grid; gap: 14px; }
.sn-steps li { counter-increment: sn; display: grid; grid-template-columns: 26px 1fr; gap: 12px; font-size: 13px; color: var(--gray-700); line-height: 1.45; }
.sn-steps li::before { content: counter(sn); width: 26px; height: 26px; border-radius: 50%; background: var(--gray-100); color: var(--gray-700); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.sn-steps strong { display: block; color: var(--gray-900); font-size: 13.5px; }
.sn-modal-preview { background: var(--gray-50); border: 1px dashed var(--gray-300); border-radius: 12px; padding: 14px; margin-top: 4px; }
.sn-modal-preview .from { font-size: 11px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.05em; }
.sn-counter { float: right; font-size: 12px; color: var(--gray-500); font-weight: 500; }
.sn-counter.ok { color: #059669; }
.sn-toast { position: fixed; right: 22px; bottom: 22px; z-index: 400; background: var(--dark); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-lg); display: none; max-width: 360px; }
.sn-toast.error { background: #b91c1c; }

@media (max-width: 1000px) {
    .sn-layout { grid-template-columns: 1fr; }
    .composer-side { position: static; }
}
@media (max-width: 600px) {
    .sn-item { grid-template-columns: auto 1fr; }
    .sn-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; }
    .pager { justify-content: center; }
}

/* Mobile: a closed sidebar must not cast a shadow onto the page edge */
@media (max-width: 968px) {
    .sidebar:not(.active) { box-shadow: none; }
}

/* Auth pages: tall forms (register) must not run under the "Back to home" link */
@media (min-width: 969px) { .auth-form-side { padding-top: 84px; } }
.form-progress { display: flex; gap: 6px; margin-bottom: 18px; }
.form-progress .step-dot { width: 32px; height: 4px; border-radius: 999px; background: var(--gray-200); }
.form-progress .step-dot.active { background: var(--primary); }

/* Contact avatars: five soft colours so a list of people is easy to scan */
.contact-avatar.c1 { background: #ccfbf1; color: #0f766e; }
.contact-avatar.c2 { background: #fef3c7; color: #b45309; }
.contact-avatar.c3 { background: #e0e7ff; color: #4338ca; }
.contact-avatar.c4 { background: #fce7f3; color: #be185d; }
.contact-avatar.c5 { background: #dbeafe; color: #1d4ed8; }

/* Campaign progress bar */
.progress-bar { height: 8px; background: var(--gray-100); border-radius: 999px; overflow: hidden; margin: 14px 0 16px; }
.progress-fill { height: 100%; min-width: 0; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 999px; transition: width 0.4s ease; }

/* ---- API key modal ---- */
.ak-modal { max-width: 540px; }
.ak-modal .modal-header { align-items: flex-start; }
.ak-sub { margin: 4px 0 0; font-size: 13px; color: var(--gray-500); }
.ak-modal .modal-body { padding: 22px 28px; }
.ak-modal .modal-footer { padding: 16px 28px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: var(--gray-50); border-radius: 0 0 18px 18px; }
.ak-scopes { display: grid; gap: 8px; }
.ak-modal .form-group .ak-scope { display: grid; position: relative; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; margin: 0; font-weight: 400; }
.ak-scope:hover { border-color: var(--gray-300); }
.ak-modal .ak-scope input { position: absolute; opacity: 0; pointer-events: none; }
.ak-scope-box { display: block; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--gray-300); background: #fff center / 13px no-repeat; transition: .15s; }
.ak-scope input:checked ~ .ak-scope-box { background-color: var(--primary); border-color: var(--primary); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E"); }
.ak-scope:has(input:checked) { border-color: var(--primary); background: var(--primary-bg); }
.ak-scope input:focus-visible ~ .ak-scope-box { box-shadow: 0 0 0 3px rgba(13,148,136,.25); }
.ak-scope-text strong { display: block; font-size: 14px; color: var(--gray-900); font-weight: 600; }
.ak-scope-text small { display: block; font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.ak-scope code { font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 11px; color: var(--gray-500); background: var(--gray-100); padding: 3px 7px; border-radius: 6px; }
.ak-error { margin-top: 4px; padding: 10px 14px; border-radius: 10px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-size: 13px; }
.ak-warning { padding: 12px 14px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 13px; line-height: 1.5; margin-bottom: 18px; }
.ak-field { margin-bottom: 16px; }
.ak-field-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--gray-900); }
.ak-field-head em { font-style: normal; font-weight: 400; color: var(--gray-500); }
.ak-copy { border: 1px solid var(--border); background: #fff; color: var(--primary); font: inherit; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 8px; cursor: pointer; transition: .15s; }
.ak-copy:hover { border-color: var(--primary); background: var(--primary-bg); }
.ak-copy.done { background: var(--primary); border-color: var(--primary); color: #fff; }
.ak-value { display: block; padding: 11px 14px; background: var(--gray-50); border: 1px solid var(--border); border-radius: 10px; font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 13px; color: var(--gray-900); word-break: break-all; user-select: all; }
.ak-code { margin: 0; padding: 14px 16px; background: var(--dark); color: #e2e8f0; border-radius: 10px; font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 12px; line-height: 1.6; overflow-x: auto; white-space: pre; }
.ak-foot { font-size: 12px; color: var(--gray-500); margin: 0; }
.ak-foot code { background: var(--gray-100); padding: 1px 6px; border-radius: 4px; }
.ak-toast { position: fixed; right: 22px; bottom: 22px; z-index: 400; background: var(--dark); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-lg); display: none; }
@media (max-width: 600px) {
    .ak-modal .modal-body, .ak-modal .modal-footer { padding-left: 18px; padding-right: 18px; }
    .ak-modal .form-group .ak-scope { grid-template-columns: 20px minmax(0, 1fr); }
    .ak-scope code { display: none; }
}
.ak-modal .modal-footer { position: sticky; bottom: 0; }


/* ==========================================================================
   Dashboard design pass: shell, lists, cards, tables, empty states
   ========================================================================== */

/* ---- Sidebar ---- */
.sidebar { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 6px; }
.sidebar .logo { margin-bottom: 16px; padding-bottom: 20px; }
.sidebar-wallet { margin: 0 4px 22px; padding: 16px 16px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(13,148,136,.28), rgba(20,184,166,.10)); border: 1px solid rgba(20,184,166,.28); }
.sidebar-wallet .sw-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.sidebar-wallet .sw-value { font-family: var(--font); font-size: 26px; font-weight: 700; color: #fff; line-height: 1.2; margin: 4px 0 10px; }
.sidebar-wallet .sw-btn { display: block; text-align: center; padding: 8px 12px; border-radius: 9px; background: #14b8a6; color: #04302c; font-size: 13px; font-weight: 700; text-decoration: none; transition: background .15s; }
.sidebar-wallet .sw-btn:hover { background: #2dd4bf; }
.sidebar-menu a { font-weight: 500; }
.sidebar-menu a.active { background: rgba(20,184,166,.16); }

/* ---- Topbar ---- */
.topbar { box-shadow: 0 1px 0 var(--border); border-bottom: 0; }
.topbar-cta { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; background: var(--primary); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; box-shadow: 0 1px 2px rgba(13,148,136,.3); transition: background .15s, transform .15s; }
.topbar-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }
@media (max-width: 600px) { .topbar-cta { padding: 9px 12px; } .topbar-user-info { display: none; } }

/* ---- Page frame ---- */
.dashboard-content { max-width: 2440px; }
.page-title { margin-bottom: 24px; }
.page-title h1 { font-size: 26px; letter-spacing: -0.01em; }
.dash-card, .campaign-card, .tpl-card, .composer-card, .stat-card { box-shadow: 0 1px 2px rgba(15,23,42,.04); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---- Filter bars and chips ---- */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-start; margin-bottom: 20px; }
.filter-bar-right { display: contents; }
.filter-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--gray-700); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; transition: .15s; }
.filter-pill:hover { border-color: var(--primary); color: var(--primary); }
.filter-pill .count { min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 999px; background: var(--gray-100); color: var(--gray-500); font-size: 11px; font-weight: 700; }
.filter-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.filter-pill.active .count { background: rgba(255,255,255,.22); color: #fff; }

/* ---- Status pills ---- */
.status-pill.scheduled { background: rgba(99,102,241,.10); color: #4f46e5; }
.status-pill.scheduled::before { background: #4f46e5; }
.status-pill.completed { background: rgba(16,185,129,.10); color: #059669; }
.status-pill.completed::before { background: #059669; }
.status-pill.draft { background: var(--gray-100); color: var(--gray-700); }
.status-pill.draft::before { background: var(--gray-400); }

/* ---- Campaigns ---- */
.campaign-card { padding: 22px 24px; border-radius: 16px; margin-bottom: 14px; }
.campaign-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.campaign-title h3 { font-family: var(--font); font-size: 17px; margin: 0; }
.campaign-head { margin-bottom: 12px; }
.campaign-info p { margin-top: 4px; font-size: 13px; color: var(--gray-500); }
.campaign-info p strong { color: var(--gray-700); }
.campaign-audience { text-align: right; }
.campaign-audience strong { display: block; font-family: var(--font); font-size: 22px; color: var(--dark); line-height: 1.1; }
.campaign-audience span { font-size: 12px; color: var(--gray-500); }
.campaign-msg { font-size: 13px; color: var(--gray-700); background: var(--gray-50); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.campaign-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.campaign-progress .progress-bar { flex: 1; margin: 0; }
.campaign-progress span { font-size: 12px; font-weight: 700; color: var(--gray-700); min-width: 38px; text-align: right; }
.campaign-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; padding-top: 16px; }
.campaign-stat strong { font-size: 18px; }
.campaign-stat strong.is-bad { color: var(--danger); }
@media (max-width: 700px) { .campaign-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .campaign-audience { text-align: left; } }

/* ---- Empty states ---- */
.empty-block { text-align: center; background: #fff; border: 1px dashed var(--gray-300); border-radius: 16px; padding: 52px 24px; color: var(--gray-500); }
.empty-block .empty-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--primary-bg); color: var(--primary); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.empty-block h3 { font-family: var(--font); font-size: 18px; color: var(--dark); margin-bottom: 6px; }
.empty-block p { font-size: 14px; margin-bottom: 18px; }
.empty-block .btn-primary { display: inline-flex; }

/* ---- Data tables ---- */
.table-card { padding: 0; overflow: hidden; }
.table-scroll { overflow-x: auto; }
.pro-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pro-table th { text-align: left; padding: 12px 20px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-500); background: var(--gray-50); border-bottom: 1px solid var(--border); white-space: nowrap; }
.pro-table td { padding: 14px 20px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; color: var(--gray-900); }
.pro-table tbody tr:last-child td { border-bottom: 0; }
.pro-table tbody tr:hover td { background: var(--gray-50); }
.pro-table .muted { color: var(--gray-500); white-space: nowrap; }
.pro-table .muted-dash { color: var(--gray-300); }
.pro-table .mono { font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 13px; color: var(--gray-700); }
.pro-table .col-actions { text-align: right; white-space: nowrap; }
.cell-person { display: flex; align-items: center; gap: 12px; }
.cell-person strong { display: block; font-weight: 600; font-size: 14px; line-height: 1.3; }
.cell-person small { display: block; font-size: 12px; color: var(--gray-500); }
.contact-avatar.sm { width: 38px; height: 38px; margin: 0; font-size: 13px; flex-shrink: 0; }
.row-btn { display: inline-block; padding: 6px 12px; margin-left: 4px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--gray-700); font: inherit; font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer; transition: .15s; }
.row-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.row-btn.danger:hover { border-color: #fecaca; color: #b91c1c; background: #fef2f2; }
.tag { display: inline-block; padding: 3px 10px; margin-right: 4px; border-radius: 999px; background: var(--primary-bg); color: var(--primary-dark); font-size: 12px; font-weight: 600; }

/* ---- Templates ---- */
.tpl-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tpl-card { display: flex; flex-direction: column; padding: 20px; border-radius: 16px; background: #fff; border: 1px solid var(--border); }
.tpl-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.tpl-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.tpl-cat { padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--gray-100); color: var(--gray-700); }
.tpl-cat-otp { background: #dbeafe; color: #1d4ed8; }
.tpl-cat-sales { background: #fef3c7; color: #b45309; }
.tpl-cat-alert { background: #fee2e2; color: #b91c1c; }
.tpl-cat-reminder { background: #e0e7ff; color: #4338ca; }
.tpl-cat-welcome { background: #ccfbf1; color: #0f766e; }
.tpl-used { font-size: 12px; color: var(--gray-500); }
.tpl-card h4 { font-family: var(--font); font-size: 16px; margin-bottom: 10px; }
.tpl-preview { flex: 1; font-size: 13.5px; line-height: 1.6; color: var(--gray-700); background: var(--gray-50); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; word-break: break-word; }
.tpl-preview .var { background: rgba(13,148,136,.12); color: var(--primary-dark); border-radius: 5px; padding: 0 5px; font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 12px; }
.tpl-meta { font-size: 12px; color: var(--gray-500); margin: 10px 0 14px; }
.tpl-actions { display: flex; gap: 8px; align-items: center; }
.tpl-actions .tpl-use { padding: 8px 18px; font-size: 13px; }
.btn-ghost-sm { padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--gray-700); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s; }
.btn-ghost-sm:hover { border-color: var(--gray-300); background: var(--gray-50); }
.btn-ghost-sm.danger { color: #b91c1c; margin-left: auto; }
.btn-ghost-sm.danger:hover { border-color: #fecaca; background: #fef2f2; }
.category-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.cat-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--gray-700); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s; }
.cat-chip:hover { border-color: var(--primary); color: var(--primary); }
.cat-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.cat-chip .count { padding: 1px 7px; border-radius: 999px; background: var(--gray-100); color: var(--gray-500); font-size: 11px; font-weight: 700; }
.cat-chip.active .count { background: rgba(255,255,255,.22); color: #fff; }

/* ---- Reports: schedule form ---- */
.schedule-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.schedule-card h3 { font-family: var(--font); font-size: 17px; margin-bottom: 4px; }
.schedule-card > p { font-size: 13px; color: var(--gray-500); margin-bottom: 18px; }
.schedule-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 14px; align-items: end; }
.schedule-form label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.schedule-form select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font: inherit; font-size: 14px; }
@media (max-width: 800px) { .schedule-form { grid-template-columns: 1fr; } }
.topbar-cta { white-space: nowrap; }
@media (max-width: 600px) {
    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat-mini { padding: 12px 14px; }
    .stat-mini .value { font-size: 22px; }
    .topbar-left { gap: 10px; }
}

/* ==========================================================================
   Design v2 for the app: flatter, calmer, same palette
   ========================================================================== */
:root { --shadow-xl: 0 12px 24px -12px rgba(15,23,42,.18); --radius: 12px; }
.btn-primary:hover, .btn-outline:hover, .btn-primary:active, .stat-card:hover, .tpl-card:hover, .campaign-card:hover { transform: none; }
.btn-primary:hover { box-shadow: none; }
.btn-primary, .btn-outline, .btn-danger { border-radius: 10px; font-weight: 600; letter-spacing: 0; }
.dash-card, .stat-card, .composer-card, .campaign-card, .tpl-card, .sn-card, .stat-mini, .pricing-card, .schedule-card, .api-key-card { border-radius: 14px; border-color: var(--border); box-shadow: none; }
.dash-card:hover, .composer-card:hover { box-shadow: none; }
.page-title h1 { font-weight: 800; letter-spacing: -0.03em; }
.dashboard-content { padding: 28px 32px 48px; }
.data-table th, .pro-table th { letter-spacing: .04em; }
.badge, .status-pill { font-weight: 600; }
.modal { border-radius: 16px; }
.modal-backdrop { backdrop-filter: none; background: rgba(15,23,42,.5); }
