/* ============================================
   EsnafBoekhouden - Modern SaaS Design
   Dark Sidebar + White Content Area
   ============================================ */

:root {
    /* Sidebar Colors */
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-active: #3b82f6;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    
    /* Content Colors */
    --content-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    
    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* Accent Colors */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    /* Dimensions */
    --sidebar-width: 260px;
    --header-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--content-bg);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--sidebar-bg);
    color: white;
    gap: 16px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   LAYOUT
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.sidebar-logo .icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    font-weight: 700;
}

.sidebar-logo span {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--sidebar-text);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}

.nav-item.active {
    background: var(--sidebar-active);
    color: white;
}

.nav-item .icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--sidebar-hover);
    border-radius: 10px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 11px;
    color: var(--sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.main-body {
    flex: 1;
    padding: 24px;
}

/* ============================================
   COMPONENTS
   ============================================ */

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

.card-body.no-padding {
    padding: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.1); }
.stat-icon.green { background: rgba(16, 185, 129, 0.1); }
.stat-icon.orange { background: rgba(245, 158, 11, 0.1); }
.stat-icon.red { background: rgba(239, 68, 68, 0.1); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.1); }

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-change {
    font-size: 12px;
    margin-top: 4px;
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

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

.btn-outline {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--content-bg);
    border-color: var(--primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 16px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 16px;
    text-align: left;
}

th {
    background: var(--content-bg);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    border-top: 1px solid var(--border-color);
    font-size: 14px;
}

tr:hover td {
    background: rgba(59, 130, 246, 0.02);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: #059669; }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.badge-info { background: rgba(6, 182, 212, 0.1); color: #0891b2; }
.badge-secondary { background: var(--content-bg); color: var(--text-secondary); }

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-primary);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-lg {
    max-width: 800px;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 20px;
}

.modal-close:hover {
    background: var(--content-bg);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.page-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Amount styling */
.amount {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.amount-positive { color: var(--success); }
.amount-negative { color: var(--danger); }

/* Action buttons in tables */
.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.action-btn.view {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.action-btn.edit {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.action-btn.delete {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
}

.auth-left {
    flex: 1;
    background: var(--sidebar-bg);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
}

.auth-left h1 {
    font-size: 36px;
    margin-bottom: 16px;
}

.auth-left p {
    font-size: 18px;
    color: var(--sidebar-text);
    margin-bottom: 40px;
}

.auth-right {
    flex: 1;
    background: white;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-box {
    width: 100%;
    max-width: 400px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.auth-logo .icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    font-weight: 700;
}

.auth-logo span {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .auth-left {
        display: none;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* SVG Icon Styling */
.nav-item .icon svg,
.stat-icon svg,
.feature-icon svg,
.empty-icon svg {
    width: 100%;
    height: 100%;
}

.nav-item .icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item .icon svg {
    width: 20px;
    height: 20px;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.empty-icon svg {
    width: 64px;
    height: 64px;
}

/* Updated Sidebar Styling */
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
    cursor: pointer;
    position: relative;
}

.nav-label {
    flex: 1;
}

.nav-add {
    opacity: 0;
    transition: opacity 0.15s;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item:hover .nav-add {
    opacity: 0.6;
}

.nav-add:hover {
    opacity: 1 !important;
    background: rgba(255,255,255,0.1);
}

.nav-add svg {
    width: 16px;
    height: 16px;
}

/* Scrollable sidebar nav */
.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.nav-section {
    margin-bottom: 16px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--sidebar-text);
    padding: 8px 12px 4px;
    opacity: 0.6;
}

/* Stats Grid Enhancements */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--content-bg);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--card-shadow);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.stat-icon.red { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.stat-icon.blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.stat-icon.orange { background: rgba(249, 115, 22, 0.1); color: #f97316; }
.stat-icon.purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Form Enhancements */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* Action Buttons */
.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn.view {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.action-btn.edit {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.action-btn.delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.action-btn:hover {
    filter: brightness(0.9);
}

/* Small buttons */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Variables for backgrounds */
:root {
    --success-bg: rgba(16, 185, 129, 0.05);
    --danger-bg: rgba(239, 68, 68, 0.05);
    --warning-bg: rgba(249, 115, 22, 0.05);
    --info-bg: rgba(59, 130, 246, 0.05);
}

/* Badge enhancements */
.badge-secondary {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Large Modal for Invoices */
.modal-large .modal-content {
    max-width: 900px;
    width: 95%;
}

.modal-large .modal-body {
    padding: 0;
}

/* Invoice Professional Styling */
.invoice-professional table th {
    font-weight: 600 !important;
}

/* Print styles */
@media print {
    .modal-overlay,
    .modal-header,
    .modal-footer {
        display: none !important;
    }
    
    .modal-content {
        box-shadow: none;
        max-width: 100%;
        width: 100%;
    }
    
    .invoice-professional {
        padding: 0 !important;
    }
}

/* Form Page Styles */
.form-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.form-page .card {
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.form-page .card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.form-page .card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.form-page .card-body {
    padding: 20px;
}

.form-page .form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: block;
}

.form-page .form-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-page .form-input:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Invoice Action Buttons */
.action-btn.send {
    background: #22c55e;
    color: white;
}
.action-btn.send:hover {
    background: #16a34a;
}
.action-btn.paid {
    background: #3b82f6;
    color: white;
}
.action-btn.paid:hover {
    background: #2563eb;
}

/* Nav Add Button */
.nav-item {
    position: relative;
}
.nav-add {
    margin-left: auto;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sidebar-hover);
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.15s;
}
.nav-item:hover .nav-add {
    opacity: 1;
}
.nav-add:hover {
    background: var(--primary);
}

/* ============================================
   LANDING PAGE STYLES
   ============================================ */
.landing-page {
    min-height: 100vh;
    background: #ffffff;
}

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

/* Navigation */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #e2e8f0;
}

.landing-nav .landing-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #1e293b;
    font-weight: 700;
    font-size: 20px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #3b82f6;
}

.nav-buttons {
    display: flex;
    gap: 12px;
}

/* Hero Section */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.hero .landing-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero-content p {
    font-size: 18px;
    color: #64748b;
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.hero-note {
    font-size: 14px;
    color: #94a3b8;
}

.dashboard-preview {
    background: #1e293b;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.preview-header {
    padding: 12px 16px;
    background: #0f172a;
}

.preview-dots {
    display: flex;
    gap: 8px;
}

.preview-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #334155;
}

.preview-dots span:first-child { background: #ef4444; }
.preview-dots span:nth-child(2) { background: #f59e0b; }
.preview-dots span:nth-child(3) { background: #10b981; }

.preview-content {
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.preview-stat {
    padding: 20px;
    border-radius: 12px;
    color: white;
}

.preview-stat span {
    font-size: 12px;
    opacity: 0.8;
    display: block;
    margin-bottom: 4px;
}

.preview-stat strong {
    font-size: 24px;
    font-weight: 700;
}

.preview-chart {
    grid-column: span 2;
    height: 120px;
    background: linear-gradient(to right, rgba(59,130,246,0.3), rgba(59,130,246,0.1));
    border-radius: 8px;
}

/* Features Section */
.features {
    padding: 100px 0;
}

.features h2, .pricing h2, .about h2, .faq h2, .contact h2 {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    color: #1e293b;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 18px;
    margin-bottom: 60px;
}

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

.feature-card {
    padding: 32px;
    background: #f8fafc;
    border-radius: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.feature-card p {
    color: #64748b;
    line-height: 1.6;
}

/* Pricing Section */
.pricing {
    padding: 100px 0;
    background: #f8fafc;
}

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

.pricing-card {
    background: white;
    border-radius: 16px;
    padding: 40px 32px;
    position: relative;
    border: 2px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.pricing-card.featured {
    border-color: #3b82f6;
    transform: scale(1.05);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: 32px;
}

.pricing-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.price {
    font-size: 48px;
    font-weight: 800;
    color: #1e293b;
}

.price span {
    font-size: 16px;
    font-weight: 400;
    color: #64748b;
}

.pricing-header p {
    color: #64748b;
    margin-top: 8px;
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.pricing-features li svg {
    width: 20px;
    height: 20px;
    color: #10b981;
}

.btn-block {
    width: 100%;
}

/* About Section */
.about {
    padding: 100px 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    color: #64748b;
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-top: 60px;
}

.about-stats .stat {
    text-align: center;
}

.about-stats .stat strong {
    display: block;
    font-size: 42px;
    font-weight: 800;
    color: #3b82f6;
}

.about-stats .stat span {
    color: #64748b;
}

/* FAQ Section */
.faq {
    padding: 100px 0;
    background: #f8fafc;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    padding: 28px;
    border-radius: 12px;
}

.faq-item h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.faq-item p {
    color: #64748b;
    line-height: 1.6;
}

/* Contact Section */
.contact {
    padding: 100px 0;
}

.contact-grid {
    max-width: 600px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: #3b82f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-item strong {
    display: block;
    color: #1e293b;
    margin-bottom: 4px;
}

.contact-item p {
    color: #64748b;
    margin: 0;
}

/* Footer */
.landing-footer {
    background: #0f172a;
    padding: 60px 0 30px;
    color: white;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: #94a3b8;
    margin-top: 16px;
}

.footer-brand .landing-logo {
    color: white;
}

.footer-links h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    color: #94a3b8;
}

.footer-links a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.2s;
}

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

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 30px;
    text-align: center;
}

.footer-bottom p {
    color: #64748b;
    margin: 0;
}

/* Responsive */
@media (max-width: 968px) {
    .hero .landing-container {
        grid-template-columns: 1fr;
    }
    .hero-image {
        display: none;
    }
    .features-grid, .pricing-grid {
        grid-template-columns: 1fr;
    }
    .pricing-card.featured {
        transform: none;
    }
    .faq-grid {
        grid-template-columns: 1fr;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .nav-links {
        display: none;
    }
    .about-stats {
        flex-direction: column;
        gap: 30px;
    }
}

/* Page View */
.page-view {
    min-height: 100vh;
    background: #ffffff;
}

.page-content {
    padding: 120px 0 60px;
    min-height: calc(100vh - 200px);
}

.page-body {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.page-body h1 {
    font-size: 32px;
    color: #1e293b;
    margin-bottom: 24px;
}

.page-body h2 {
    font-size: 24px;
    color: #1e293b;
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.page-body h3 {
    font-size: 18px;
    color: #334155;
    margin: 24px 0 12px;
}

.page-body p, .page-body br + br {
    margin-bottom: 16px;
}

.page-back {
    max-width: 800px;
    margin: 24px auto 0;
}

.page-back a {
    color: #3b82f6;
    text-decoration: none;
}

.page-back a:hover {
    text-decoration: underline;
}

/* Editor Toolbar */
.editor-toolbar {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    padding: 8px;
    background: #f1f5f9;
    border-radius: 8px 8px 0 0;
    border: 1px solid #e2e8f0;
    border-bottom: none;
}

.editor-toolbar button {
    padding: 6px 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    transition: all 0.15s;
}

.editor-toolbar button:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.editor-toolbar + textarea {
    border-radius: 0 0 8px 8px;
    border-top: none;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-secondary {
    background: #f1f5f9;
    color: #64748b;
}

/* Code style */
code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    color: #e11d48;
}

/* Trial Warning Banner */
.trial-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.trial-banner.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.trial-banner.urgent {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.trial-banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
    color: white;
    max-width: 1200px;
    width: 100%;
}

.trial-icon {
    font-size: 20px;
}

.trial-message {
    font-weight: 500;
    flex: 1;
}

.trial-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    padding: 0 8px;
}

.trial-close:hover {
    opacity: 1;
}

/* Expired Modal */
.expired-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.expired-modal {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 480px;
    text-align: center;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.expired-icon {
    margin-bottom: 20px;
}

.expired-modal h2 {
    color: #1e293b;
    margin-bottom: 12px;
}

.expired-modal p {
    color: #64748b;
    margin-bottom: 24px;
}

.expired-features {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    margin-bottom: 24px;
}

.expired-features ul {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.expired-features li {
    padding: 6px 0;
    color: #475569;
}

.expired-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Subscription Page */
.subscription-page {
    max-width: 1000px;
    margin: 0 auto;
}

.current-plan-card {
    border: 2px solid #3b82f6;
    border-radius: 16px;
}

.current-plan-card.expired {
    border-color: #ef4444;
}

.current-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.plan-name {
    font-size: 28px;
    font-weight: 700;
    color: #3b82f6;
}

.plan-status {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.plan-status.trial {
    background: #fef3c7;
    color: #92400e;
}

.plan-status.active {
    background: #dcfce7;
    color: #166534;
}

.plan-status.expired {
    background: #fee2e2;
    color: #991b1b;
}

.trial-countdown {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 12px;
    margin-bottom: 24px;
}

.countdown-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.countdown-circle.urgent {
    background: #fee2e2;
}

.countdown-circle .days {
    font-size: 36px;
    font-weight: 800;
    color: #f59e0b;
    line-height: 1;
}

.countdown-circle.urgent .days {
    color: #ef4444;
}

.countdown-circle .label {
    font-size: 12px;
    color: #64748b;
}

.countdown-info p {
    margin: 0 0 8px;
    color: #1e293b;
}

.expired-notice {
    background: #fee2e2;
    padding: 16px 20px;
    border-radius: 8px;
    color: #991b1b;
    margin-bottom: 24px;
}

/* Usage Stats */
.usage-stats h4 {
    margin-bottom: 16px;
    color: #64748b;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.usage-item {
    text-align: center;
}

.usage-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.usage-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.usage-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.usage-text {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

/* Plans Grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.plan-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.plan-card.current {
    border-color: #3b82f6;
    background: #f8fafc;
}

.plan-card.recommended {
    border-color: #3b82f6;
    transform: scale(1.02);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    color: white;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.plan-header {
    text-align: center;
    margin-bottom: 24px;
}

.plan-header h4 {
    font-size: 20px;
    color: #1e293b;
    margin-bottom: 12px;
}

.plan-price {
    font-size: 42px;
    font-weight: 800;
    color: #1e293b;
}

.plan-price span {
    font-size: 16px;
    font-weight: 400;
    color: #64748b;
}

.plan-desc {
    color: #64748b;
    font-size: 14px;
    margin-top: 8px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.plan-features li {
    padding: 10px 0;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

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

.subscription-note {
    text-align: center;
    margin-top: 32px;
    color: #94a3b8;
    font-size: 14px;
}

@media (max-width: 768px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
    .usage-grid {
        grid-template-columns: 1fr;
    }
    .trial-countdown {
        flex-direction: column;
        text-align: center;
    }
}

/* Landing Admin Section Grid */
.section-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.section-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.section-card:hover {
    border-color: #3b82f6;
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.section-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: white;
}

.section-icon svg {
    width: 24px;
    height: 24px;
}

.section-name {
    font-weight: 600;
    color: #1e293b;
}

.json-editor {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    background: #1e293b;
    color: #e2e8f0;
    border: none;
    padding: 16px;
}

@media (max-width: 768px) {
    .section-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
