/* CSS Custom Properties for Theme Management */
:root {
    /* SmartCalcs Light Orange Theme */
    --primary-color: #ff9966;
    --primary-gradient: linear-gradient(135deg, #ffb366 0%, #ffcc80 100%);
    --secondary-color: #ffb84d;
    --accent-color: #1a73e8;
    --blue-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --teal-gradient: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    --purple-gradient: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    --light-blue-gradient: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    
    /* Background Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.9);
    
    /* Text Colors */
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-inverse: #ffffff;
    
    /* Border Colors */
    --border-color: rgba(255, 255, 255, 0.2);
    --border-light: #e2e8f0;
    
    /* Shadow */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-glass: 0 8px 32px rgba(31, 38, 135, 0.37);
    
    /* Backdrop Blur */
    --backdrop-blur: blur(10px);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Typography - Updated for Universal Font */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.25);
    --bg-glass: rgba(30, 41, 59, 0.1);
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border-color: rgba(30, 41, 59, 0.2);
    --border-light: #334155;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-base), color var(--transition-base);
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 179, 102, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 204, 128, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: var(--font-size-4xl);
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Glassmorphism Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    transition: all var(--transition-base);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(31, 38, 135, 0.2);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-sm) 0;
    transition: all var(--transition-base);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 700;
    font-size: var(--font-size-xl);
    color: var(--primary-color);
}

.logo {
    width: 32px;
    height: 32px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav-link {
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: var(--bg-glass);
}

/* Theme toggle removed as per user request */

/* Main Content */
.main-content {
    padding-top: 80px;
    min-height: 100vh;
}

/* Hero Section */
.hero {
    padding: var(--spacing-xl) 0;
    text-align: center;
    background: var(--primary-gradient);
    color: var(--text-inverse);
    margin-bottom: var(--spacing-xl);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(45deg, #ffffff, #f0f0f0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
}

.hero-description {
    font-size: var(--font-size-lg);
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* Sections */
.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.tools-section {
    padding: var(--spacing-xl) 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Animation Classes */
.animate {
    animation-duration: 0.8s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.fadeInUp {
    animation-name: fadeInUp;
}

.slideInUp {
    animation-name: slideInUp;
}

.slideInLeft {
    animation-name: slideInLeft;
}

.slideInRight {
    animation-name: slideInRight;
}

.bounceIn {
    animation-name: bounceIn;
}

/* Enhanced Hero Section */
.hero {
    position: relative;
    padding: calc(var(--spacing-xl) * 2) 0;
    text-align: center;
    background: var(--primary-gradient);
    color: var(--text-inverse);
    margin-bottom: var(--spacing-xl);
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 60px;
    height: 60px;
    top: 60%;
    right: 15%;
    animation: floatReverse 8s ease-in-out infinite;
    animation-delay: 2s;
}

.shape-3 {
    width: 40px;
    height: 40px;
    top: 30%;
    right: 30%;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation: floatReverse 10s ease-in-out infinite;
    animation-delay: 1s;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 50px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.gradient-text {
    background: linear-gradient(45deg, #ffffff, #f0f0f0, #e0e0e0);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

.highlight {
    color: var(--accent-color);
    font-weight: 700;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-lg);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.cta-button.primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.cta-button.primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cta-button.secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-button.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.cta-button.large {
    padding: var(--spacing-lg) calc(var(--spacing-lg) * 1.5);
    font-size: var(--font-size-lg);
}

.arrow-icon {
    font-size: var(--font-size-lg);
    transition: transform var(--transition-base);
}

.cta-button:hover .arrow-icon {
    transform: translateX(5px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-sm);
    animation: bounceIn 2s infinite alternate;
}

.scroll-arrow {
    font-size: var(--font-size-xl);
    animation: float 2s ease-in-out infinite;
}

/* Stats Section */
.stats-section {
    padding: var(--spacing-xl) 0;
    background: var(--bg-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    max-width: 1000px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--primary-color);
}

.stat-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.15);
}

.stat-number {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

.stat-label {
    font-size: var(--font-size-lg);
    font-weight: 500;
    color: var(--text-secondary);
}

/* Enhanced Section Headers */
.section-header {
    text-align: center;
    margin-bottom: calc(var(--spacing-xl) * 1.5);
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-top: var(--spacing-sm);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Tool Cards */
.tool-card {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.tool-card.hovered {
    transform: translateY(-8px) scale(1.02);
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.tool-badge {
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    background: var(--primary-color);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-badge.trending {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    animation: pulse 2s infinite;
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    transition: transform var(--transition-base);
}

.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(5deg);
}

.tool-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.tool-card:hover .tool-overlay {
    opacity: 0.05;
}

.tool-link {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--primary-color);
    font-weight: 600;
    padding: var(--spacing-md);
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.tool-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.link-arrow {
    font-size: var(--font-size-xl);
    transition: transform var(--transition-base);
}

.tool-link:hover .link-arrow {
    transform: translateX(5px);
}

/* Ripple Effect */
.card-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.3);
    pointer-events: none;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

/* Enhanced Features Section */
.features-section {
    padding: calc(var(--spacing-xl) * 2) 0;
    background: var(--bg-primary);
}

.feature-item {
    text-align: center;
    padding: var(--spacing-xl);
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

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

.feature-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: var(--spacing-lg);
}

.feature-icon {
    font-size: 3rem;
    position: relative;
    z-index: 2;
    transition: transform var(--transition-base);
}

.icon-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    opacity: 0.1;
    transition: all var(--transition-base);
}

.feature-item:hover .icon-bg {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.2;
}

.feature-item:hover .feature-icon {
    transform: scale(1.1);
}

.feature-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.feature-item:hover .feature-highlight {
    transform: scaleX(1);
}

/* CTA Section */
.cta-section {
    padding: calc(var(--spacing-xl) * 2) 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    text-align: center;
    color: white;
}

.cta-content h2 {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-md);
}

.cta-content p {
    font-size: var(--font-size-lg);
    opacity: 0.9;
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* Loading States */
body:not(.loaded) [data-animate] {
    opacity: 0;
    transform: translateY(30px);
}

body.loaded [data-animate] {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Advanced GST Invoice Styles */
.invoice-toolbar {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
}

.invoice-toolbar .btn {
    font-size: var(--font-size-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
}

/* Template Selector */
.template-card {
    margin-bottom: var(--spacing-lg);
}

.template-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
}

.template-option {
    cursor: pointer;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: all var(--transition-base);
    background: var(--bg-secondary);
}

.template-option:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.template-option.active {
    border-color: var(--primary-color);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.template-preview {
    text-align: center;
}

.template-header {
    font-weight: 600;
    font-size: var(--font-size-lg);
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.template-body {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* Card Actions */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.card-actions {
    display: flex;
    gap: var(--spacing-xs);
}

/* Logo Preview */
.logo-preview {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
}

.logo-preview img {
    border-radius: var(--radius-sm);
}

/* Input Groups */
.input-group {
    display: flex;
    gap: 0;
}

.input-group .form-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 1px solid var(--border-light);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-sm);
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: var(--spacing-md);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.modal-content.large-modal {
    max-width: 800px;
}

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

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    cursor: pointer;
    color: var(--text-secondary);
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-lg);
}

/* Customer Database */
.customer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.search-box {
    min-width: 250px;
}

.customers-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}

.customer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
    transition: background-color var(--transition-base);
}

.customer-item:hover {
    background: var(--bg-card);
}

.customer-item:last-child {
    border-bottom: none;
}

.customer-info {
    flex: 1;
}

.customer-name {
    font-weight: 600;
    font-size: var(--font-size-lg);
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.customer-details {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
}

.customer-gstin, .customer-phone {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.customer-address {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-actions .btn {
    margin-left: var(--spacing-xs);
    padding: 4px 8px;
    font-size: var(--font-size-xs);
}

.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
    font-style: italic;
}

/* Profile Management */
.profiles-list {
    max-height: 300px;
    overflow-y: auto;
}

.profile-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
    background: var(--bg-secondary);
}

.profile-name {
    font-weight: 500;
    color: var(--text-primary);
}

.profile-actions {
    display: flex;
    gap: var(--spacing-xs);
}

.profile-actions .btn {
    padding: 4px 12px;
    font-size: var(--font-size-sm);
}

/* Invoice Preview Templates */
.invoice-preview {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    min-height: 500px;
    padding: var(--spacing-lg);
    transition: all var(--transition-base);
}

.invoice-preview.template-professional {
    font-family: 'Segoe UI', sans-serif;
    color: #2d3748;
}

.invoice-preview.template-modern {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid var(--primary-color);
}

.invoice-preview.template-minimal {
    border: none;
    box-shadow: var(--shadow-sm);
    background: #fafafa;
}

.invoice-preview.template-classic {
    border: 2px solid #333;
    background: #fff;
    font-family: 'Times New Roman', serif;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-light);
}

/* Invoice Series Preview */
.preview-section {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.invoice-preview-number {
    font-family: 'Courier New', monospace;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--primary-color);
    padding: var(--spacing-sm);
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .invoice-toolbar {
        justify-content: center;
    }
    
    .template-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .customer-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .customer-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .customer-actions .btn {
        margin: 2px 0;
        width: 100%;
    }
    
    .modal-content {
        margin: var(--spacing-sm);
        max-height: calc(100vh - var(--spacing-lg));
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.tool-icon {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-md);
    display: block;
}

.tool-title {
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.tool-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}

.tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.feature-tag {
    background: var(--bg-glass);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    border: 1px solid var(--border-color);
}

.tool-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-gradient);
    color: var(--text-inverse);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-base);
    margin-top: auto;
}

.tool-link:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.arrow {
    transition: transform var(--transition-base);
}

.tool-link:hover .arrow {
    transform: translateX(5px);
}

/* Features Section */
.features-section {
    padding: var(--spacing-xl) 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.feature-item {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

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

.feature-icon {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-md);
    display: block;
}

.feature-item h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.feature-item p {
    color: var(--text-secondary);
}

/* Form Styles */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: var(--font-size-base);
    transition: all var(--transition-base);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    min-height: 44px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-inverse);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-inverse);
    border-color: var(--primary-color);
}

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

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

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-lg);
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: var(--spacing-md) 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th,
.table td {
    padding: var(--spacing-sm);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.table tr:hover {
    background: var(--bg-secondary);
}

/* Cards */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-md);
}

.card-header {
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    margin: 0;
    color: var(--text-primary);
}

.card-content {
    color: var(--text-secondary);
}

/* Result Summary */
.result-summary {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin: var(--spacing-md) 0;
}

.result-summary h3 {
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: var(--text-primary);
}

.result-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: var(--font-size-lg);
}

/* Chart Container */
.chart-container {
    position: relative;
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

/* Calculator Layout */
.calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
}

.calculator-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.calculator-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.calculator-form {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.calculator-results {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.footer-logo {
    width: 24px;
    height: 24px;
}

.footer-brand-text {
    font-weight: 700;
    font-size: var(--font-size-lg);
    color: var(--primary-color);
}

.footer-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: var(--text-secondary);
    transition: color var(--transition-base);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-light);
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        gap: var(--spacing-sm);
    }
    
    .nav-link {
        padding: var(--spacing-xs);
        font-size: var(--font-size-sm);
    }
    
    .hero {
        padding: var(--spacing-lg) 0;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .calculator-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 var(--spacing-sm);
    }
    
    .nav-brand .brand-text {
        display: none;
    }
    
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .tool-card,
    .calculator-form,
    .calculator-results {
        padding: var(--spacing-md);
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

.bg-primary { background: var(--bg-primary); }
.bg-secondary { background: var(--bg-secondary); }

.border { border: 1px solid var(--border-light); }
.border-none { border: none; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }

.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-light);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    margin: var(--spacing-sm) 0;
}

/* Success States */
.success {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    margin: var(--spacing-sm) 0;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .main-content {
        padding-top: 0 !important;
    }
}
