/* ============================================
   Script Protector — Modern UI System
   Inspired by Linear / Vercel / Stripe design language
   ============================================ */

:root {
    /* Brand */
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #eff6ff;
    --primary-glow: rgba(59, 130, 246, 0.08);

    /* Surfaces */
    --bg: #fafafa;
    --bg-card: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-hover: #f0f0f0;
    --bg-sidebar: #fafafa;

    /* Borders */
    --border: #e5e5e5;
    --border-light: #f0f0f0;

    /* Text */
    --text: #0a0a0a;
    --text-secondary: #525252;
    --text-muted: #a3a3a3;

    /* Semantic */
    --success: #10b981;
    --success-bg: #ecfdf5;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;

    /* Radius — large and rounded */
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Shadows — softer, deeper */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    --shadow: 0 4px 6px rgba(0,0,0,0.04), 0 2px 4px rgba(0,0,0,0.03);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.05), 0 4px 6px rgba(0,0,0,0.03);
    --shadow-lg: 0 16px 32px rgba(0,0,0,0.06), 0 6px 12px rgba(0,0,0,0.03);
    --shadow-xl: 0 24px 48px rgba(0,0,0,0.08), 0 8px 20px rgba(0,0,0,0.04);

    /* Layout */
    --max-width: 1200px;
    --navbar-height: 68px;
    --sidebar-width: 240px;

    /* Transitions */
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 15px;
}

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

img, svg { display: block; max-width: 100%; }

/* ============================================
   SVG Icon System
   ============================================ */
.icon {
    width: 20px; height: 20px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

/* ============================================
   Navbar — glass morphism
   ============================================ */
.navbar {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    height: var(--navbar-height);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.4px;
}
.nav-logo svg { flex-shrink: 0; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-links > a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.nav-links > a:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.nav-btn {
    background: var(--text) !important;
    color: #fff !important;
    padding: 8px 20px !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 600 !important;
    transition: all var(--transition) !important;
}
.nav-btn:hover {
    background: #333 !important;
    color: #fff !important;
    transform: translateY(-1px);
}

.nav-btn-outline {
    color: var(--text-secondary) !important;
    padding: 8px 20px !important;
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--border) !important;
    background: transparent !important;
}
.nav-btn-outline:hover {
    color: var(--text) !important;
    border-color: #d4d4d4 !important;
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--text);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.01em;
}
.btn-primary:hover {
    background: #333;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-outline:hover {
    border-color: #d4d4d4;
    background: var(--bg-hover);
    transform: translateY(-1px);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--danger);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }

.btn-success {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border: none; border-radius: var(--radius-full);
    font-size: 14px; font-weight: 500; cursor: pointer;
    background: var(--success); color: #fff;
    transition: all var(--transition);
}
.btn-success:hover { background: #059669; transform: translateY(-1px); }

.btn-block { width: 100%; }

.btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition);
}
.btn-sm:hover { border-color: #d4d4d4; color: var(--text); background: var(--bg-hover); }
.btn-sm.btn-danger { color: var(--danger); border-color: #fecaca; }
.btn-sm.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn-sm.btn-success { color: var(--success); border-color: #a7f3d0; }
.btn-sm.btn-success:hover { background: var(--success-bg); border-color: var(--success); }

/* ============================================
   Hero — Homepage
   ============================================ */
.hero {
    text-align: center;
    padding: 120px 24px 100px;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--primary-light), transparent 70%);
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='grid' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 60 0 L 0 0 0 60' fill='none' stroke='%23e5e5e5' stroke-width='0.5'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='60' height='60' fill='url(%23grid)'/%3E%3C/svg%3E");
    opacity: 0.5; pointer-events: none; z-index: 0;
}
.hero-content { max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }

.hero h1 {
    font-size: 56px;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1.5px;
    color: var(--text);
    font-weight: 800;
}
.hero h1 span {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 40px;
    line-height: 1.7;
    max-width: 560px;
    margin-left: auto; margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-actions .btn-primary {
    padding: 14px 36px;
    font-size: 15px;
    border-radius: var(--radius);
}
.hero-actions .btn-outline {
    padding: 14px 36px;
    font-size: 15px;
    border-radius: var(--radius);
}

/* ============================================
   Sections
   ============================================ */
section { padding: 100px 24px; }

section h2 {
    text-align: center;
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.8px;
}

.section-desc {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 560px;
    margin: 0 auto 56px;
    line-height: 1.6;
}

.section-container { max-width: var(--max-width); margin: 0 auto; }

/* ============================================
   Value Cards
   ============================================ */
.value-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.value-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 44px 36px;
    text-align: left;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.value-card::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #6366f1);
    opacity: 0; transition: opacity var(--transition);
}
.value-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.value-card:hover::before { opacity: 1; }

.value-icon {
    width: 52px; height: 52px;
    background: var(--bg);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary);
    border: 1px solid var(--border);
}
.value-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}
.value-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.65;
}

/* ============================================
   Steps
   ============================================ */
.steps-section { background: var(--bg-secondary); }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.step-card { text-align: center; }

.step-number {
    width: 48px; height: 48px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    color: var(--text);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    margin: 0 auto 20px;
    transition: all var(--transition);
}
.step-card:hover .step-number {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.step-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.step-card p { color: var(--text-secondary); font-size: 14px; line-height: 1.6; }

/* ============================================
   CTA Banner
   ============================================ */
.cta-banner {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-radius: var(--radius-xl);
    padding: 64px 56px;
    text-align: center;
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}
.cta-banner::after {
    content: "";
    position: absolute;
    top: -50%; right: -20%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(59,130,246,0.15), transparent 70%);
    pointer-events: none;
}
.cta-banner h2 {
    color: #fff;
    font-size: 30px;
    margin-bottom: 16px;
    position: relative; z-index: 1;
}
.cta-banner p {
    color: rgba(255,255,255,0.6);
    font-size: 16px;
    margin-bottom: 32px;
    position: relative; z-index: 1;
}
.cta-banner .btn-primary {
    background: #fff;
    color: #0a0a0a;
    position: relative; z-index: 1;
}
.cta-banner .btn-primary:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

/* ============================================
   Features Page
   ============================================ */
.features-hero {
    text-align: center;
    padding: 80px 24px 60px;
    background: radial-gradient(ellipse 60% 50% at 50% 0%, var(--primary-light), transparent);
}

.features-hero h1 {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.8px;
}
.features-hero p { color: var(--text-secondary); font-size: 18px; max-width: 600px; margin: 0 auto; }

.feature-section {
    padding: 80px 24px;
    border-bottom: 1px solid var(--border);
}
.feature-section:nth-child(even) { background: var(--bg-secondary); }
.feature-section:last-child { border-bottom: none; }

.feature-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 56px;
}
.feature-content.reverse { flex-direction: row-reverse; }
.feature-text { flex: 1; }
.feature-text h3 { font-size: 24px; font-weight: 700; margin-bottom: 16px; letter-spacing: -0.4px; }
.feature-text p { color: var(--text-secondary); font-size: 15px; line-height: 1.7; margin-bottom: 20px; }
.feature-text ul { list-style: none; padding: 0; }
.feature-text ul li { padding: 8px 0; color: var(--text-secondary); font-size: 14px; }
.feature-text ul li::before { content: "✓ "; color: var(--success); font-weight: 700; }
.feature-demo { flex: 1; min-width: 0; }

.code-block {
    background: #1a1a1a;
    border-radius: var(--radius);
    padding: 24px;
    font-family: "JetBrains Mono", "Cascadia Code", "Fira Code", "SF Mono", monospace;
    font-size: 13px;
    line-height: 1.8;
    color: #e5e5e5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    border: 1px solid #333;
}
.code-block.encrypted { color: #737373; font-size: 12px; }
.code-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
.code-label.encrypted-label { color: var(--primary); }

.layer-diagram { display: flex; flex-direction: column; gap: 2px; max-width: 700px; margin: 0 auto; }
.layer-row {
    display: flex; align-items: center; gap: 16px;
    padding: 18px 24px; border-radius: var(--radius);
}
.layer-row:nth-child(1) { background: #eff6ff; }
.layer-row:nth-child(2) { background: #dbeafe; }
.layer-row:nth-child(3) { background: #bfdbfe; }
.layer-row:nth-child(4) { background: #60a5fa; color: #fff; }
.layer-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.layer-info h4 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.layer-info p { font-size: 13px; opacity: 0.85; margin: 0; }

.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: var(--max-width);
    margin: 0 auto; padding: 0 24px;
}
.tech-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}
.tech-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 16px; color: var(--primary); }
.tech-card dl { margin: 0; }
.tech-card dt { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-top: 12px; }
.tech-card dd { font-size: 14px; font-weight: 500; margin-left: 0; margin-bottom: 4px; }

/* ============================================
   Pricing
   ============================================ */
.pricing-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 24px;
    text-align: center;
}
.pricing-page h1 { font-size: 34px; margin-bottom: 12px; letter-spacing: -0.6px; }
.pricing-page > p { color: var(--text-secondary); margin-bottom: 56px; font-size: 16px; }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 44px 32px;
    text-align: center;
    position: relative;
    transition: all var(--transition);
}
.pricing-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.pricing-card.featured {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-lg), 0 0 0 4px rgba(59,130,246,0.08);
}
.pricing-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.price { font-size: 48px; font-weight: 800; color: var(--text); margin-bottom: 28px; letter-spacing: -1px; }
.price span { font-size: 15px; font-weight: 400; color: var(--text-muted); }
.pricing-card ul { list-style: none; margin-bottom: 32px; }
.pricing-card li { padding: 12px 0; color: var(--text-secondary); font-size: 14px; border-bottom: 1px solid var(--border-light); }
.pricing-card li:last-child { border-bottom: none; }
.pricing-card li.disabled-feature { color: var(--text-muted); text-decoration: line-through; }

.badge {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    background: var(--text); color: #fff;
    padding: 5px 20px; border-radius: var(--radius-full);
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.3px;
}

/* ============================================
   FAQ
   ============================================ */
.faq-page { max-width: 760px; margin: 0 auto; padding: 80px 24px; }
.faq-page h1 { text-align: center; font-size: 34px; margin-bottom: 56px; letter-spacing: -0.6px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition);
}
.faq-item[open] { border-color: var(--primary); }

.faq-item summary {
    padding: 22px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background var(--transition);
    user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--bg-hover); }
.faq-item summary::after {
    content: "";
    width: 24px; height: 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    color: var(--text-muted);
    transition: all var(--transition);
    content: "+";
    line-height: 24px;
    text-align: center;
    flex-shrink: 0;
}
.faq-item[open] summary::after {
    content: "−";
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.faq-item .faq-answer {
    padding: 4px 28px 24px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

/* ============================================
   Auth Pages
   ============================================ */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - var(--navbar-height) - 100px);
    padding: 60px 24px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 44px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-sm);
}
.auth-card h2 { text-align: center; font-size: 26px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.4px; }
.auth-desc { color: var(--text-secondary); text-align: center; margin-bottom: 32px; font-size: 14px; }

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition);
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group small { color: var(--text-muted); font-size: 12px; margin-top: 6px; display: block; }

.form-error {
    color: var(--danger);
    font-size: 13px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--danger-bg);
    border-radius: var(--radius-sm);
    border: 1px solid #fecaca;
}
.form-success {
    color: var(--success);
    font-size: 13px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--success-bg);
    border-radius: var(--radius-sm);
    border: 1px solid #a7f3d0;
}

.hidden { display: none; }

.auth-links { text-align: center; margin-top: 28px; font-size: 14px; color: var(--text-secondary); }
.auth-links a { margin: 0 6px; font-weight: 500; }

/* ============================================
   App Layout — Sidebar + Main
   ============================================ */
.app-layout {
    display: flex;
    min-height: calc(100vh - var(--navbar-height));
}

.sidebar {
    width: var(--sidebar-width);
    min-height: calc(100vh - var(--navbar-height));
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 20px 12px;
    flex-shrink: 0;
    position: sticky;
    top: var(--navbar-height);
    align-self: flex-start;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-menu { display: flex; flex-direction: column; gap: 2px; flex: 1; }

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-decoration: none;
}
.sidebar-item:hover { background: var(--bg-hover); color: var(--text); }
.sidebar-item .icon { color: var(--text-muted); transition: color var(--transition); }
.sidebar-item:hover .icon { color: var(--text-secondary); }

.sidebar-item.active {
    background: var(--bg-card);
    color: var(--text);
    font-weight: 600;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border);
}
.sidebar-item.active .icon { color: var(--primary); }

.sidebar-section-label {
    padding: 24px 14px 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.sidebar-section-label:first-child { padding-top: 4px; }

.sidebar-menu hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 16px 14px;
}

.sidebar-logout { margin-top: auto; color: var(--text-muted) !important; }
.sidebar-logout:hover { color: var(--danger) !important; background: var(--danger-bg) !important; }
.sidebar-logout:hover .icon { color: var(--danger) !important; }

.plan-badge {
    padding: 12px 14px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}
.plan-badge strong { color: var(--text); font-weight: 600; }

.main-content {
    flex: 1;
    padding: 40px 48px;
    overflow-x: auto;
    background: var(--bg);
    max-width: 100%;
}

/* ============================================
   Dashboard/Stats
   ============================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}
.page-header h1 { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -0.5px; }

.dashboard h1 { font-size: 26px; font-weight: 700; margin-bottom: 32px; letter-spacing: -0.5px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -1px;
    line-height: 1;
}
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ============================================
   Tables
   ============================================ */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.table-container table,
.data-table { width: 100%; border-collapse: collapse; }
.table-container th,
.table-container td,
.data-table th,
.data-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}
.table-container th,
.data-table th {
    background: var(--bg);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.data-table td.loading,
.data-table td.empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.empty-state {
    padding: 56px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}
.empty-state a { font-weight: 600; }

/* ============================================
   Script List
   ============================================ */
.script-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}
.script-row:hover { background: var(--bg); }
.script-row:last-child { border-bottom: none; }
.script-info { display: flex; flex-direction: column; gap: 4px; }
.script-info strong { font-size: 15px; font-weight: 600; }
.script-id {
    color: var(--text-muted);
    font-size: 12px;
    font-family: "JetBrains Mono", "Cascadia Code", monospace;
}
.script-type { font-size: 12px; font-weight: 600; }
.script-type[data-type="sh"],
.script-type[data-type="bash"] { color: #10b981; }
.script-type[data-type="py"],
.script-type[data-type="python"] { color: #3b82f6; }

.script-status { font-size: 13px; font-weight: 500; }
.script-status.active { color: var(--success); }
.script-status.disabled { color: var(--text-muted); }
.script-actions { display: flex; gap: 8px; }

/* ============================================
   Script Detail
   ============================================ */
.detail-grid { display: flex; flex-direction: column; gap: 24px; }

.detail-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}
.detail-section h3 { font-size: 16px; font-weight: 600; margin-bottom: 20px; letter-spacing: -0.2px; }

.info-table { width: 100%; border-collapse: collapse; }
.info-table td { padding: 10px 0; font-size: 14px; }
.info-table td:first-child { color: var(--text-secondary); width: 120px; font-weight: 500; }
.info-table code {
    font-family: "JetBrains Mono", "Cascadia Code", monospace;
    font-size: 13px;
    background: var(--bg);
    padding: 3px 8px;
    border-radius: 6px;
}

.action-row { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

.danger-zone {
    border-color: #fecaca !important;
    background: var(--danger-bg) !important;
}
.danger-zone h3 { color: var(--danger); }
.danger-zone small { display: block; margin-top: 8px; color: var(--text-muted); font-size: 12px; }
.danger-zone p { margin-bottom: 16px; color: var(--text-secondary); font-size: 14px; }

/* ============================================
   Usage
   ============================================ */
.usage-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
}
.usage-plan h3 { font-size: 18px; font-weight: 600; margin-bottom: 20px; }
.plan-name { color: var(--primary); font-weight: 700; }

.progress-bar {
    height: 8px;
    background: var(--bg);
    border-radius: var(--radius-full);
    margin: 20px 0;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #6366f1);
    border-radius: var(--radius-full);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.usage-container .stats-grid { margin-top: 28px; margin-bottom: 0; }

/* ============================================
   Profile
   ============================================ */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.session-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    color: var(--text-secondary);
}
.session-row:last-child { border-bottom: none; }

/* ============================================
   Admin Pages
   ============================================ */
.admin-page h1 { font-size: 26px; font-weight: 700; margin-bottom: 32px; letter-spacing: -0.5px; }

.admin-nav { display: flex; gap: 10px; margin-bottom: 28px; }

/* Config cards */
.config-sections { display: flex; flex-direction: column; gap: 24px; }

.config-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}
.config-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 20px; }

.config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}
.config-row:last-child { border-bottom: none; }
.config-row label { font-size: 14px; color: var(--text-secondary); }
.config-row input {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    width: 220px;
    text-align: right;
    font-family: inherit;
    transition: all var(--transition);
    outline: none;
}
.config-row input:disabled { background: var(--bg); color: var(--text-muted); cursor: not-allowed; }
.config-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-row span { color: var(--text-secondary); }
.info-row code {
    font-family: "JetBrains Mono", "Cascadia Code", monospace;
    font-size: 13px;
    color: var(--text);
}

.config-card .btn-primary,
.config-card .btn-outline { margin-right: 10px; margin-top: 16px; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; margin-top: 8px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background: #374151; border-radius: 26px; transition: 0.2s;
}
.toggle-slider::before {
    content: ""; position: absolute; height: 20px; width: 20px;
    left: 3px; bottom: 3px; background: #9ca3af; border-radius: 50%; transition: 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: #3b82f6; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); background: #fff; }
.toggle-label { margin-left: 10px; font-size: 13px; color: #9ca3af; vertical-align: super; }
.toggle-desc { display: block; font-size: 12px; color: #6b7280; margin-top: 4px; }

/* ============================================
   Badges
   ============================================ */
.badge-success {
    background: var(--success-bg);
    color: #059669;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}
.badge-danger {
    background: var(--danger-bg);
    color: #dc2626;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

/* ============================================
   Filter & Add bars
   ============================================ */
.filter-bar input,
.filter-bar select,
.add-bar input,
.add-bar select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    background: var(--bg-card);
    outline: none;
    transition: border-color var(--transition);
}
.filter-bar input:focus,
.filter-bar select:focus,
.add-bar input:focus,
.add-bar select:focus { border-color: var(--primary); }
.filter-bar button,
.add-bar button { border-radius: var(--radius-sm); }

/* ============================================
   Pagination
   ============================================ */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 24px 0; }

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 48px 24px;
    text-align: center;
}
.footer-container { max-width: var(--max-width); margin: 0 auto; }
.footer-links { display: flex; gap: 36px; justify-content: center; margin-bottom: 20px; }
.footer-links a { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.footer-links a:hover { color: var(--text); }
.footer p { color: var(--text-muted); font-size: 13px; }

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }

/* ============================================
   RESPONSIVE — Tablet (<1024px)
   ============================================ */
@media (max-width: 1024px) {
    .value-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
    .tech-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-content { flex-direction: column !important; gap: 32px; }
    .profile-grid { grid-template-columns: 1fr; }
}

/* ============================================
   RESPONSIVE — Mobile (<768px)
   ============================================ */
@media (max-width: 768px) {
    :root { --navbar-height: 60px; }

    /* Navbar */
    .nav-container { padding: 0 16px; }
    .nav-logo { font-size: 16px; gap: 8px; }
    .nav-logo svg { width: 24px; height: 24px; }
    .nav-links > a { padding: 6px 8px; font-size: 13px; gap: 2px; }
    .nav-links { gap: 0; }
    .nav-btn, .nav-btn-outline { padding: 7px 14px !important; font-size: 13px !important; }

    /* Hero */
    .hero { padding: 72px 20px 60px; }
    .hero h1 { font-size: 32px; letter-spacing: -0.8px; }
    .hero-subtitle { font-size: 16px; margin-bottom: 28px; }
    .hero-actions .btn-primary,
    .hero-actions .btn-outline { padding: 12px 28px; font-size: 14px; width: 100%; justify-content: center; }

    /* Sections */
    section { padding: 60px 20px; }
    section h2 { font-size: 26px; }

    /* Value cards */
    .value-grid { grid-template-columns: 1fr; gap: 16px; }
    .value-card { padding: 32px 28px; }

    /* Steps */
    .steps-grid { grid-template-columns: 1fr; gap: 32px; }

    /* CTA */
    .cta-banner { padding: 40px 28px; border-radius: var(--radius-lg); }
    .cta-banner h2 { font-size: 22px; }

    /* Pricing */
    .pricing-page { padding: 48px 20px; }
    .pricing-page h1 { font-size: 28px; }
    .price { font-size: 40px; }

    /* FAQ */
    .faq-page { padding: 48px 20px; }
    .faq-page h1 { font-size: 28px; }

    /* Auth */
    .auth-page { padding: 40px 16px; }
    .auth-card { padding: 32px 24px; }

    /* Features */
    .features-hero { padding: 48px 20px 36px; }
    .features-hero h1 { font-size: 30px; }
    .feature-section { padding: 48px 20px; }

    /* Tables */
    .table-container th,
    .table-container td,
    .data-table th,
    .data-table td { padding: 12px 14px; font-size: 13px; }

    /* Sidebar */
    .sidebar {
        width: 68px;
        padding: 12px 8px;
        overflow: hidden;
    }
    .sidebar-item {
        padding: 12px;
        justify-content: center;
        gap: 0;
        border-radius: var(--radius);
    }
    .sidebar-item span,
    .sidebar-section-label,
    .plan-badge,
    .sidebar-menu hr { display: none; }
    .sidebar-item .icon { margin: 0; }

    /* Main content */
    .main-content { padding: 24px 20px; }
    .page-header { flex-direction: column; align-items: flex-start; }

    /* Stats */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { padding: 20px; }
    .stat-value { font-size: 28px; }

    /* Script detail */
    .detail-section { padding: 20px; }

    /* Usage */
    .usage-container { padding: 24px; }

    /* Footer */
    .footer-links { gap: 24px; flex-wrap: wrap; }

    /* Marketing: Stats Banner */
    .stat-number { font-size: 32px; }
    .stat-label { font-size: 13px; }

    /* Marketing: Logo Grid */
    .logo-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .logo-item { padding: 24px 16px; font-size: 14px; }

    /* Marketing: Recognition */
    .recognition-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .recognition-card { padding: 24px 18px; }
    .recognition-card h3 { font-size: 15px; }

    /* Marketing: Testimonials */
    .testimonials-grid { grid-template-columns: 1fr; gap: 16px; }

    /* Features: Perf Grid */
    .perf-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .perf-number { font-size: 32px; }
    .perf-card { padding: 24px 18px; }

    /* Features: Comparison Table */
    .compare-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .compare-table { font-size: 12px; min-width: 500px; }
    .compare-table th, .compare-table td { padding: 10px 12px; }

    /* Features: Compliance Grid */
    .compliance-grid { grid-template-columns: 1fr; gap: 12px; }
    .compliance-card { padding: 16px 20px; }
}

/* ============================================
   MARKETING SECTIONS — Stats / Logos / Awards / Testimonials
   ============================================ */

/* ---- Stats Banner ---- */
.stats-section {
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    padding: 60px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}
.stat-item { color: #fff; }
.stat-number {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
}
.stat-label {
    font-size: 15px;
    font-weight: 500;
    opacity: 0.85;
}

/* ---- Enterprise Logo Grid ---- */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 32px;
}
.logo-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 20px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all 0.2s;
    cursor: default;
}
.logo-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-card);
}

/* ---- Recognition / Awards ---- */
.recognition-section {
    background: var(--bg-secondary);
}
.recognition-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 32px;
}
.recognition-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
    transition: all 0.2s;
}
.recognition-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
}
.recognition-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
}
.recognition-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
}
.recognition-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* ---- Testimonials ---- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}
.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all 0.2s;
}
.testimonial-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-card);
}
.testimonial-stars {
    font-size: 16px;
    color: #f59e0b;
    margin-bottom: 14px;
}
.testimonial-text {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-primary);
    margin: 0 0 18px;
    font-style: italic;
}
.testimonial-author strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.testimonial-author span {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ---- Performance Benchmarks ---- */
.perf-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 32px;
}
.perf-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.2s;
}
.perf-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
}
.perf-number {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--primary);
    margin-bottom: 4px;
}
.perf-unit {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.perf-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ---- Comparison Table ---- */
.compare-table-wrapper {
    margin-top: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.compare-table th {
    background: var(--bg-secondary);
    padding: 14px 18px;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}
.compare-table th:first-child {
    text-align: left;
}
.compare-table th.highlight-col {
    background: var(--primary-light);
    color: var(--primary);
}
.compare-table td {
    padding: 12px 18px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}
.compare-table td:first-child {
    text-align: left;
    font-weight: 500;
    color: var(--text-primary);
}
.compare-table td.highlight-col {
    background: #fafcff;
    color: var(--primary);
    font-weight: 600;
}
.compare-table td.check {
    color: #16a34a;
    font-weight: 700;
}
.compare-table tr:last-child td {
    border-bottom: none;
}

/* ---- Compliance Grid ---- */
.compliance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
}
.compliance-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    transition: all 0.2s;
}
.compliance-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-card);
}
.compliance-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 800;
    font-size: 13px;
    border-radius: var(--radius);
    letter-spacing: 0.02em;
}
.compliance-card strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.compliance-card span {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ============================================
   ENCRYPT MODE SELECTOR CARDS
   ============================================ */

.scripts-page-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.scripts-page-header h1 {
    margin: 0;
    margin-right: auto;
    flex-shrink: 0;
}
.scripts-page-header .btn-primary {
    flex-shrink: 0;
    margin-left: 12px;
}
.mode-selector-card {
    display: flex;
    gap: 8px;
}

/* script row mode tag */
.mode-tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    line-height: 1.4;
}
.mode-tag-standard {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}
.mode-tag-advanced {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}
.mode-tag-ultra {
    background: #fce4ec;
    color: #c62828;
    border: 1px solid #ef9a9a;
}
.mode-card {
    cursor: pointer;
    position: relative;
}
.mode-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.mode-card-inner {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 20px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 16px;
}
.mode-card input[type="radio"]:checked + .mode-card-inner {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}
.mode-card:hover .mode-card-inner {
    border-color: var(--primary);
}
.mode-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.mode-card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.mode-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
}
.badge-recommend {
    background: #10b981;
    color: #fff;
}
.badge-elite {
    background: #8b5cf6;
    color: #fff;
}
.mode-sysreq {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ============================================
   RESPONSIVE — Small mobile (<480px)
   ============================================ */
@media (max-width: 480px) {
    .hero h1 { font-size: 28px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-value { font-size: 24px; }
    .stat-card { padding: 16px; }
    .main-content { padding: 20px 16px; }
    .btn-primary, .btn-outline, .btn-danger { padding: 10px 20px; font-size: 13px; }
    .sidebar { width: 52px; padding: 8px 4px; }
    .sidebar-item { padding: 10px 8px; border-radius: var(--radius); }

    /* Marketing: Stats Banner */
    .stat-number { font-size: 26px; }
    .logo-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .logo-item { padding: 20px 12px; font-size: 13px; }
    .recognition-grid { grid-template-columns: 1fr; gap: 12px; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .perf-grid { grid-template-columns: 1fr; gap: 12px; }
    .perf-number { font-size: 28px; }
    .compliance-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Guest Encrypt Section
   ============================================ */
.guest-encrypt-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 0;
    margin: 40px auto;
    max-width: 800px;
}
.guest-encrypt-box {
    max-width: 520px;
    margin: 24px auto 0;
}
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.upload-placeholder p {
    margin: 8px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
}
.upload-hint {
    font-size: 12px !important;
    color: var(--text-muted) !important;
}
.guest-encrypt-box .btn-primary {
    margin-top: 16px;
    width: 100%;
    padding: 12px;
    font-size: 16px;
}
.guest-result {
    margin-top: 16px;
    padding: 12px;
    background: var(--success-bg);
    border-radius: var(--radius-sm);
    color: var(--success);
    font-size: 14px;
}
.error-msg {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--danger-bg);
    color: var(--danger);
    border-radius: var(--radius-sm);
    font-size: 13px;
}
.guest-limit-hint {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* ── Arithmetic Captcha ─────────────────────────────────── */
.arithmetic-captcha {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}
.captcha-question {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    min-width: 100px;
    font-family: "JetBrains Mono", "Cascadia Code", monospace;
}
.captcha-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    outline: none;
    width: 80px;
    max-width: 120px;
    -moz-appearance: textfield;
}
.captcha-input::-webkit-outer-spin-button,
.captcha-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.captcha-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.captcha-reload {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}
.captcha-reload:hover {
    background: var(--bg-hover);
    color: var(--primary);
    border-color: var(--primary);
}
.disclaimer-group {
    margin-top: 4px;
}
.disclaimer-check {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.disclaimer-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* ── Legal Pages ─────────────────────────────────── */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px;
}
.legal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 48px;
    box-shadow: var(--shadow-sm);
}
.legal-card h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.4px;
    color: var(--text);
}
.legal-update {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 32px;
}
.legal-card h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 32px 0 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}
.legal-card h2:first-of-type {
    border-top: none;
    padding-top: 0;
}
.legal-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 14px;
}
.legal-card ol {
    padding-left: 22px;
    margin-bottom: 16px;
}
.legal-card ol li {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 8px;
}
.legal-card strong {
    color: var(--text);
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 16px 0;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}
.page-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}
.page-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    font-weight: 600;
    cursor: default;
}

/* ============================================
   Upload Progress
   ============================================ */
.upload-progress {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.progress-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    border-radius: 4px;
    transition: width 0.15s ease;
}
.progress-text {
    font-size: 12px;
    color: #64748b;
    min-width: 36px;
    text-align: right;
}

/* ============================================
   Toast Notifications
   ============================================ */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    max-width: 360px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}
.toast-enter { transform: translateX(0); }
.toast-success { background: #16a34a; }
.toast-error { background: #dc2626; }
.toast-info { background: #2563eb; }

/* ============================================
   Modal
   ============================================ */
#modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.modal-box {
    background: #fff;
    border-radius: 12px;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: modalIn 0.2s ease-out;
}
@keyframes modalIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.modal-title {
    padding: 20px 24px 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}
.modal-body {
    padding: 16px 24px;
}
.modal-msg {
    margin: 0;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
}
.modal-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
    outline: none;
    box-sizing: border-box;
}
.modal-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.modal-btns {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 0 24px 20px;
}
.modal-btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    transition: all 0.15s;
}
.modal-btn:hover { background: #f3f4f6; }
.modal-btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.modal-btn-primary:hover { background: #1d4ed8; }

/* ============================================
   User Badge (navbar VIP/Free tag)
   ============================================ */
.user-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    vertical-align: middle;
    margin-left: 4px;
}
.user-badge-vip {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1c1917;
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.3);
}
.user-badge-free {
    background: #e5e7eb;
    color: #6b7280;
}

/* ============================================
   Profile Info Table
   ============================================ */
.info-table {
    width: 100%;
    border-collapse: collapse;
}
.info-table tr:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}
.info-table td {
    padding: 10px 0;
    font-size: 14px;
}
.info-label {
    color: var(--text-muted);
    width: 90px;
    white-space: nowrap;
}
.badge-vip {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1c1917;
}
.badge-free {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    background: #e5e7eb;
    color: #6b7280;
}
