/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --text: #1e293b;
    --text-light: #64748b;
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

.hidden { display: none !important; }

/* ========== NAVIGATION ========== */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary);
}

.nav-brand i {
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary);
}

.btn-primary-nav {
    background: var(--primary);
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-primary-nav:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ========== HERO SECTION ========== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 100px 0;
    color: white;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.highlight {
    color: #fbbf24;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fbbf24;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-align: center;
    justify-content: center;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--success);
    color: white;
}

.btn-primary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.trust-badges {
    display: flex;
    gap: 2rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Demo Card */
.demo-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.demo-card-header {
    background: #f8fafc;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.demo-controls {
    display: flex;
    gap: 0.5rem;
}

.demo-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e2e8f0;
}

.demo-title {
    color: var(--text);
    font-weight: 600;
}

.demo-card-body {
    padding: 2rem;
}

.demo-upload {
    text-align: center;
    padding: 2rem;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.demo-upload i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.demo-upload p {
    color: var(--text-light);
}

.demo-progress {
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    width: 70%;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.demo-status {
    color: var(--text-light);
    font-size: 0.875rem;
    text-align: center;
}

.demo-result {
    text-align: center;
    padding: 1rem;
    background: #f0fdf4;
    border-radius: 8px;
}

.demo-result i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.demo-result p {
    color: var(--success);
    font-weight: 600;
}

/* ========== FEATURES SECTION ========== */
.features {
    padding: 100px 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ========== HOW IT WORKS ========== */
.how-it-works {
    padding: 100px 0;
    background: var(--bg-light);
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 4rem;
}

.step {
    flex: 1;
    max-width: 300px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1.5rem;
}

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

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.step-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.step-image {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    color: var(--primary);
}

.step-arrow {
    color: var(--primary);
    font-size: 2rem;
}

/* ========== TEMPLATES ========== */
.templates {
    padding: 100px 0;
    background: white;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.template-card {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.template-card.featured {
    border: 2px solid var(--primary);
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10;
}

.template-preview {
    background: var(--bg-light);
    padding: 2rem;
    height: 250px;
}

.template-header {
    background: var(--primary);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.template-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.template-line {
    height: 12px;
    background: #cbd5e1;
    border-radius: 4px;
}

.template-line.short {
    width: 60%;
}

.template-line.medium {
    width: 80%;
}

.template-card h3 {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 1.25rem;
}

.template-card p {
    padding: 0 1.5rem 1rem;
    color: var(--text-light);
}

.template-badge {
    display: inline-block;
    margin: 0 1.5rem 1.5rem;
    background: var(--success);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* ========== PRICING ========== */
.pricing {
    padding: 100px 0;
    background: var(--bg-light);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.pricing-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border: 2px solid var(--primary);
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-bottom-left-radius: 12px;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
}

.pricing-header h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.price {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin: 1rem 0;
}

.currency {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-right: 0.25rem;
}

.amount {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary);
}

.price-subtitle {
    color: var(--text-light);
    font-size: 0.875rem;
}

.pricing-features {
    list-style: none;
    padding: 2rem;
}

.pricing-features li {
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features i {
    color: var(--success);
    font-size: 1.25rem;
}

.pricing-card .btn {
    margin: 0 2rem 2rem;
    width: calc(100% - 4rem);
}

.roi-calculator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
}

.roi-calculator h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.roi-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.roi-stat {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
}

.roi-stat strong {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fbbf24;
}

.roi-stat span {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ========== CONTACT ========== */
.contact {
    padding: 100px 0;
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    margin-top: 4rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-method {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-method i {
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
}

.contact-method strong {
    display: block;
    margin-bottom: 0.25rem;
}

.contact-method p {
    margin: 0;
    font-size: 0.875rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.social-link:hover {
    transform: translateY(-3px);
    background: var(--primary-dark);
}

.contact-form-container {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--text);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.8;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.75rem;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.6;
}

/* ========== AUTH PAGES (login / admin) ========== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 440px;
    width: 100%;
    padding: 2.5rem;
}

.auth-card .brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-card .brand i {
    font-size: 1.75rem;
    color: var(--primary);
    margin-right: 0.5rem;
}

.auth-card .brand h1 {
    display: inline-flex;
    align-items: center;
    font-size: 1.5rem;
    color: var(--text);
}

.auth-card .brand p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.35rem;
}

.auth-footnote {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Reusable form controls (shared with the contact form) */
.form-group select,
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.btn-block { width: 100%; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.btn-danger { background: var(--error); color: white; }
.btn-danger:hover { background: #dc2626; }

.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    display: none;
}

.alert.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Badges */
.badge-status {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-status.active { background: #ecfdf5; color: #065f46; }
.badge-status.disabled { background: #fef2f2; color: #991b1b; }

/* Dashboard shell (used by login.html + admin.html) */
.app-topbar {
    background: var(--bg-card);
    box-shadow: var(--shadow);
    padding: 1rem 0;
}

.app-topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-topbar .nav-brand { color: var(--primary); }

.app-content {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 20px;
}

.panel {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.75rem;
    margin-bottom: 1.75rem;
}

.panel h2 {
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
    color: var(--text);
}

/* Stat tiles */
.stat-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.stat-tile {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.25rem;
    text-align: center;
}

.stat-tile h3 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-tile p {
    color: var(--text-light);
    font-size: 0.85rem;
}

.stat-tile.limit-low h3 { color: var(--error); }

/* Template picker (checkbox chips) */
.template-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.template-picker label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text);
    background: var(--bg-light);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: normal;
}

.template-picker input { width: auto; }

/* Upload dropzone */
.upload-panel {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.75rem;
}

.file-label {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background: var(--bg-card);
    border: 2px dashed var(--primary);
    border-radius: 8px;
    cursor: pointer;
    color: var(--primary);
    font-weight: 600;
    transition: all 0.3s;
}

.file-label:hover { background: #eef2ff; }
.file-input { display: none; }

/* Data table (admin client list) */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th, .data-table td {
    text-align: left;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.data-table th {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.data-table tr.inactive { opacity: 0.5; }

.edit-panel {
    display: none;
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.edit-panel.open { display: block; }

.hint { font-size: 0.75rem; color: var(--text-light); }
.empty-state { text-align: center; color: var(--text-light); padding: 2rem; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .steps {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none; /* Mobile menu would need JavaScript */
    }

    .auth-card {
        padding: 1.75rem;
    }

    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
