/*
Theme Name: InnovativeLedger
Theme URI: https://innovativeledger.com
Author: InnovativeLedger Team
Description: Modern AI-powered SaaS theme with interactive tool generator interface. Inspired by LogicBalls design with split-screen layout, real-time generation, and professional UI components.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: innovativeledger
Tags: saas, ai-tools, generator, accounting, professional, modern
*/

:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --secondary: #3B82F6;
    --success: #10B981;
    --warning: #F59E0B;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --text-dark: #1F2937;
    --text-gray: #6B7280;
    --text-light: #9CA3AF;
    --border: #E5E7EB;
    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.logo-img {
    height: 36px;
    width: auto;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 32px;
    align-items: center;
}

.main-nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--primary);
}

.header-cta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* Mobile Menu */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: 0.3s;
}

/* ============================================
   SPLIT SCREEN GENERATOR LAYOUT
   ============================================ */

.generator-container {
    display: grid;
    grid-template-columns: 500px 1fr;
    min-height: calc(100vh - 80px);
    background: var(--bg-white);
}

.generator-sidebar {
    background: var(--bg-light);
    border-right: 1px solid var(--border);
    padding: 32px 24px;
    overflow-y: auto;
    height: calc(100vh - 80px);
    position: sticky;
    top: 80px;
}

.generator-output {
    padding: 48px;
    overflow-y: auto;
}

.generator-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.generator-subtitle {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 32px;
}

.generator-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-badge {
    background: var(--bg-white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   FORM CONTROLS
   ============================================ */

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 14px;
}

.form-label .required {
    color: #EF4444;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
    background: var(--bg-white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-help {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

/* Tone Selector */
.tone-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.tone-btn {
    padding: 8px 12px;
    border: 2px solid var(--border);
    background: var(--bg-white);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.tone-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tone-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* AI Model Selector */
.model-selector {
    display: grid;
    gap: 8px;
}

.model-group {
    margin-bottom: 16px;
}

.model-group-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.model-option {
    padding: 12px;
    border: 2px solid var(--border);
    background: var(--bg-white);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.model-option:hover {
    border-color: var(--primary);
}

.model-option.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.model-name {
    font-weight: 600;
    font-size: 14px;
}

.model-provider {
    font-size: 12px;
    color: var(--text-gray);
}

.model-option.active .model-provider {
    color: rgba(255,255,255,0.8);
}

.model-badge {
    padding: 4px 8px;
    background: var(--warning);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Generate Button */
.generate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 24px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   OUTPUT AREA
   ============================================ */

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.output-title {
    font-size: 20px;
    font-weight: 700;
}

.output-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    padding: 8px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.output-content {
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    min-height: 400px;
    line-height: 1.8;
    font-size: 15px;
}

.output-placeholder {
    color: var(--text-light);
    text-align: center;
    padding: 80px 20px;
}

.output-placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   HERO SECTION (Homepage)
   ============================================ */

.hero-section {
    background: linear-gradient(135deg, #EEF2FF 0%, #F9FAFB 100%);
    padding: 100px 20px;
    text-align: center;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-gray);
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   FEATURES GRID
   ============================================ */

.features-section {
    padding: 80px 20px;
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-white);
    padding: 32px;
    border-radius: 16px;
    border: 2px solid var(--border);
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* ============================================
   TOOLS GRID (Category Page)
   ============================================ */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 40px 20px;
}

.tool-card {
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.3s;
    text-decoration: none;
    display: block;
}

.tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tool-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.tool-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.tool-card p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.5;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: var(--text-dark);
    color: var(--text-light);
    padding: 60px 20px 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    color: white;
    font-size: 22px;
    margin-bottom: 12px;
}

.footer-links h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 14px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .generator-container {
        grid-template-columns: 1fr;
    }
    
    .generator-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .tone-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .generator-output {
        padding: 24px 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
