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

:root {
    --navy: #0f3460;
    --dark: #1a1a2e;
    --red: #e94560;
    --grey: #6c757d;
    --light: #f4f6f9;
    --white: #ffffff;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--dark);
    background: var(--white);
    line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--navy); }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
    background: var(--dark);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-content { display: flex; align-items: center; justify-content: space-between; }
.logo {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--white);
    letter-spacing: 2px;
}
.logo:hover { text-decoration: none; color: var(--red); }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { color: #ccc; font-size: 0.9rem; }
.nav-links a:hover { color: var(--white); text-decoration: none; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.btn:hover { text-decoration: none; opacity: 0.9; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: #d63050; }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-lg { padding: 14px 36px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-danger { background: #dc3545; color: var(--white); border: none; }
.btn-link { background: none; border: none; color: #ccc; cursor: pointer; font-size: 0.9rem; }
.btn-link:hover { color: var(--white); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--navy) 100%);
    color: var(--white);
    padding: 100px 0 80px;
    text-align: center;
}
.hero h1 { font-size: 3rem; margin-bottom: 16px; color: var(--white); }
.hero-sub { font-size: 1.2rem; color: #b0b8c8; max-width: 640px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn-outline { border-color: rgba(255,255,255,0.3); color: var(--white); }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,0.1); }

/* ── Features ─────────────────────────────────────────────── */
.features { padding: 80px 0; }
.features h2 { text-align: center; font-size: 2rem; margin-bottom: 48px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.feature-card {
    background: var(--light);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
}
.feature-icon {
    width: 48px; height: 48px; line-height: 48px;
    background: var(--red); color: var(--white);
    border-radius: 50%; font-weight: 800; font-size: 1.2rem;
    margin: 0 auto 16px;
}
.feature-card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.feature-card p { color: var(--grey); font-size: 0.95rem; }

/* ── Pricing ──────────────────────────────────────────────── */
.pricing { padding: 80px 0; background: var(--light); }
.pricing h2 { text-align: center; font-size: 2rem; margin-bottom: 48px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 960px; margin: 0 auto; }
.pricing-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px 32px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
}
.pricing-card.featured {
    border: 2px solid var(--red);
    box-shadow: var(--shadow-lg);
    transform: scale(1.03);
}
.pricing-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--red);
    color: var(--white);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.price { font-size: 2.4rem; font-weight: 800; color: var(--navy); margin: 12px 0 20px; }
.price span { font-size: 1rem; font-weight: 400; color: var(--grey); }
.pricing-card ul { list-style: none; margin-bottom: 28px; text-align: left; }
.pricing-card li { padding: 6px 0; color: var(--grey); font-size: 0.95rem; }
.pricing-card li::before { content: "\2713 "; color: var(--red); font-weight: 700; margin-right: 6px; }

/* ── Install Section ──────────────────────────────────────── */
.install-section { padding: 80px 0; text-align: center; }
.install-section h2 { font-size: 2rem; margin-bottom: 32px; }
.install-tabs { display: flex; gap: 0; justify-content: center; margin-bottom: 0; }
.install-tab {
    padding: 10px 28px; cursor: pointer;
    background: var(--light); border: 1px solid #ddd;
    font-weight: 600; font-size: 0.9rem; color: var(--grey);
}
.install-tab:first-child { border-radius: var(--radius) 0 0 0; }
.install-tab:last-child { border-radius: 0 var(--radius) 0 0; }
.install-tab.active { background: var(--dark); color: var(--white); border-color: var(--dark); }

.code-block {
    background: var(--dark);
    color: #e0e0e0;
    padding: 20px 32px;
    border-radius: 0 0 var(--radius) var(--radius);
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.95rem;
    text-align: left;
    max-width: 700px;
    margin: 0 auto;
    overflow-x: auto;
}

/* ── Auth Pages ───────────────────────────────────────────── */
.auth-page { display: flex; justify-content: center; padding: 60px 24px; }
.auth-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
}
.auth-card h2 { margin-bottom: 8px; }
.auth-sub { color: var(--grey); margin-bottom: 28px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; color: var(--navy); }
.form-group input, .form-group select {
    width: 100%; padding: 10px 14px;
    border: 1px solid #ddd; border-radius: var(--radius);
    font-size: 0.95rem;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--red); }
.auth-footer { text-align: center; margin-top: 20px; color: var(--grey); font-size: 0.9rem; }

.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.9rem; }
.alert-error { background: #fef2f2; color: #dc3545; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* ── Dashboard ────────────────────────────────────────────── */
.dashboard { padding: 40px 24px; }
.dashboard h1 { margin-bottom: 32px; }

.card {
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.card h2 { font-size: 1.3rem; margin-bottom: 16px; }

.license-item { margin-bottom: 16px; }
.license-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.license-key-box {
    display: flex; align-items: center; gap: 10px;
    background: var(--light); border: 1px solid #ddd; border-radius: var(--radius);
    padding: 12px 16px; overflow-x: auto;
}
.license-key-box code {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.8rem;
    word-break: break-all;
    flex: 1;
}

.badge {
    display: inline-block; padding: 3px 10px;
    border-radius: 20px; font-size: 0.75rem; font-weight: 600;
}
.badge-active { background: #d1fae5; color: #065f46; }
.badge-revoked { background: #fef2f2; color: #dc3545; }
.badge-plan { background: #dbeafe; color: #1e40af; }

.steps { padding-left: 20px; }
.steps li { margin-bottom: 16px; }
.steps .code-block { margin: 8px 0; border-radius: var(--radius); }

.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.download-item {
    display: block; padding: 20px;
    background: var(--light); border-radius: var(--radius);
    text-align: center; color: var(--dark);
}
.download-item:hover { background: #e8ecf2; text-decoration: none; }
.download-item strong { display: block; margin-bottom: 4px; }
.download-item span { font-size: 0.85rem; color: var(--grey); }

/* ── Admin ────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: var(--white); border: 1px solid #e5e7eb;
    border-radius: var(--radius); padding: 20px;
    text-align: center; box-shadow: var(--shadow);
}
.stat-value { font-size: 2rem; font-weight: 800; color: var(--navy); }
.stat-label { font-size: 0.85rem; color: var(--grey); }

.form-inline { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.form-inline .form-group { flex: 1; min-width: 150px; }
.form-inline small { display: block; color: var(--grey); font-size: 0.8rem; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th { background: var(--navy); color: var(--white); padding: 10px 12px; text-align: left; font-weight: 600; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #e5e7eb; }
.data-table tr:hover td { background: var(--light); }

.text-muted { color: var(--grey); font-size: 0.85rem; }
.hidden { display: none; }

/* ── Footer ───────────────────────────────────────────────── */
.footer { padding: 32px 0; text-align: center; color: var(--grey); font-size: 0.85rem; border-top: 1px solid #e5e7eb; margin-top: 60px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .pricing-card.featured { transform: none; }
    .form-inline { flex-direction: column; }
}
