:root {
    --primary: #4361ee;
    --primary-dark: #3a0ca3;
    --secondary: #4cc9f0;
    --success: #4ade80;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 12px;
    --transition: all 0.3s ease;
}

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

button,
a,
[role="button"] {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    position: relative;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
}

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

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

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.95);
}

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

.btn-primary:hover, .btn-primary:active {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid rgba(67, 97, 238, 0.15);
}

.btn-outline:hover {
    background: rgba(67, 97, 238, 0.06);
    border-color: var(--primary);
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 4rem 0;
    color: white;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

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

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

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Dashboard Preview */
.dashboard-preview {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    color: var(--dark);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

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

.preview-stat small {
    display: block;
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 4px;
}

.preview-stat strong {
    font-size: 1.5rem;
    font-weight: 700;
}

.preview-stat .positive {
    color: var(--success);
}

.preview-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 200px;
    padding: 1rem 0;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--primary), var(--secondary));
    border-radius: 4px;
    min-height: 20px;
    animation: grow 1s ease-out;
}

@keyframes grow {
    from { height: 0; }
}

/* Features */
.features {
    padding: 6rem 0;
    background: white;
    border-radius: var(--radius);
    margin: 4rem 0;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark);
}

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

.feature-card {
    padding: 2rem;
    border-radius: var(--radius);
    background: var(--light);
    transition: var(--transition);
    text-align: center;
}

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

.feature-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

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

/* Demo Section */
.demo-section {
    text-align: center;
    padding: 4rem 0;
    color: white;
}

.demo-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.demo-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
}

.copyright {
    opacity: 0.6;
    font-size: 0.9rem;
}

/* Enhanced Landing Page Styles */
.landing-page {
    background: #fdfdfd;
}

.landing-page .navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    width: 100%;
}

.landing-page .nav-brand {
    color: var(--primary);
}

.landing-page .nav-links a:not(.btn) {
    color: var(--dark);
    font-weight: 500;
}

.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 6rem 2rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--dark);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 2.5rem;
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

.features-section {
    padding: 6rem 2rem;
    background: #f8fafc;
    text-align: center;
}

.features-section h2 {
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

.feature-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.cta-section {
    padding: 8rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    text-align: center;
    border-radius: 30px;
    margin: 4rem 2rem;
}

/* Mobile Responsive Sidebar */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.5rem;
    }

    .sidebar-toggle {
        display: block !important;
        background: none;
        border: none;
        color: var(--dark);
        font-size: 1.5rem;
        cursor: pointer;
    }

    .main-content {
        margin-left: 0;
        padding-top: 70px; /* Space for mobile header */
    }

    .mobile-header {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 999;
        align-items: center;
        padding: 0 1.5rem;
        justify-content: space-between;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .charts-container {
        grid-template-columns: 1fr;
    }

    .hero-section {
        grid-template-columns: 1fr;
        padding: 4rem 1.5rem;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-image {
        order: -1;
    }
}

.mobile-header {
    display: none;
}

.sidebar-toggle {
    display: none;
}
.landing-page .btn {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    transition: transform 0.2s, box-shadow 0.2s;
}

.landing-page .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.landing-page .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
}

.landing-page .btn-outline {
    border: 2px solid white;
    color: white;
}

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

/* Sidebar consistency improvements */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    border-radius: 8px;
    margin: 0 10px;
}

.nav-item.active {
    background: var(--primary);
    color: white;
    border-right: none;
}
.row-low-stock {
    background-color: rgba(239, 68, 68, 0.05);
}

.row-low-stock td {
    color: #ef4444;
}

.badge-danger i {
    margin-left: 4px;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
    background: var(--light);
}

.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid var(--gray-light);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray);
    cursor: pointer;
    display: none;
}

.user-info {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    font-size: 2.5rem;
    color: var(--primary);
}

.user-details {
    flex: 1;
}

.user-name {
    display: block;
    font-weight: 600;
    color: var(--dark);
}

.user-email {
    display: block;
    font-size: 0.875rem;
    color: var(--gray);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.5rem;
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

.nav-item:hover {
    background: var(--light);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    border-right: 4px solid var(--secondary);
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-light);
}

.demo-badge {
    background: var(--warning);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-logout {
    width: 100%;
    background: var(--danger);
    color: white;
    justify-content: center;
}

.btn-logout:hover {
    background: #dc2626;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.top-bar h1 {
    font-size: 2rem;
    color: var(--dark);
}

.current-date {
    color: var(--gray);
    font-size: 0.9rem;
}

.period-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.period-btn {
    padding: 8px 16px;
    border: 1px solid var(--gray-light);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
}

.period-btn:hover {
    border-color: var(--primary);
}

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

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

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
}

.stat-icon.profit {
    color: var(--success);
}

.stat-icon.growth {
    color: var(--warning);
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.stat-change {
    font-size: 0.875rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change .fa-arrow-up {
    color: var(--success);
}

/* Charts */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    font-size: 1.25rem;
    color: var(--dark);
}

.chart-select {
    padding: 8px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 6px;
    background: white;
    color: var(--dark);
    font-size: 0.875rem;
}

.chart-wrapper {
    height: 300px;
    position: relative;
}

/* Tables */
.table-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.table-header h3 {
    font-size: 1.25rem;
    color: var(--dark);
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--light);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--gray-light);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-light);
    color: var(--dark);
}

tbody tr:hover {
    background: var(--light);
}

.empty-state {
    text-align: center;
    padding: 3rem !important;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.table-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.875rem;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-box {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-box h4 {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Content Grid for Sales Page */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.form-card, .preview-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-light);
}

.form-header h2 {
    font-size: 1.5rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.calculated-fields {
    background: var(--light);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 2rem 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.calc-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.calc-field.profit {
    background: var(--primary);
    color: white;
}

.calc-field strong {
    font-size: 1.25rem;
}

.form-submit {
    margin-top: 2rem;
}

/* Preview Card */
.quick-stats-preview {
    margin-bottom: 2rem;
}

.stats-grid-small {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-small {
    text-align: center;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
}

.stat-small span {
    display: block;
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 4px;
}

.stat-small strong {
    display: block;
    font-size: 1.25rem;
    color: var(--dark);
}

.recent-sales {
    margin-bottom: 2rem;
}

.recent-list {
    max-height: 300px;
    overflow-y: auto;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-light);
}

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

.recent-item .product {
    font-weight: 600;
}

.recent-item .amount {
    color: var(--success);
    font-weight: 600;
}

.empty-recent {
    text-align: center;
    padding: 2rem;
    color: var(--gray);
}

.empty-recent i {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.quick-actions {
    margin-top: 2rem;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.modal.active {
    display: flex;
    pointer-events: auto;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: var(--radius);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: slideIn 0.3s ease;
    pointer-events: auto;
}

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

.modal-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.modal-icon.success {
    color: var(--success);
}

.modal h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.modal p {
    color: var(--gray);
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Modal Header & Close Button */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    padding-bottom: 1rem;
}

.modal-header h2 {
    font-size: 1.25rem;
    color: var(--dark);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--dark);
    transform: rotate(90deg);
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-body p {
    color: var(--gray);
    line-height: 1.6;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader {
    text-align: center;
}

.loader i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1rem;
    animation: spin 2s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .period-selector {
        justify-content: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .calculated-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}


/* Add to existing style.css */

/* Landing Page Styles */
.landing-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 6rem 0;
    min-height: 80vh;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

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

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.features-section {
    padding: 6rem 0;
    background: white;
    border-radius: 30px;
    margin: 2rem 0;
    color: var(--dark);
}

.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark);
}

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

.feature-card {
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

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

.feature-card p {
    color: var(--gray);
    line-height: 1.6;
}

.cta-section {
    text-align: center;
    padding: 6rem 0;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-copyright {
    opacity: 0.6;
    font-size: 0.9rem;
}

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

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

.auth-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.auth-logo i {
    font-size: 2.5rem;
    color: white;
}

.auth-header h1 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--gray);
}

.auth-form {
    margin-top: 2rem;
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    color: var(--gray);
    font-size: 0.9rem;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-light);
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-home:hover {
    color: var(--primary);
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background: var(--success);
    color: white;
    border-radius: 8px;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease;
}

.notification.error {
    background: var(--danger);
}

.notification.info {
    background: var(--primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Profit Colors */
.profit-positive {
    color: var(--success) !important;
}

.profit-negative {
    color: var(--danger) !important;
}

/* Stat Change Colors */
.stat-change.positive {
    color: var(--success);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 3rem 0;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .auth-card {
        padding: 2rem;
    }
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    /* Layout adjustments */
    .container {
        padding: 0 15px;
    }
    
    body {
        font-size: 14px;
    }
    
    /* Buttons sizing */
    .btn {
        padding: 10px 16px;
        font-size: 14px;
        min-height: 44px; /* Touch target size */
    }
    
    .btn-sm {
        padding: 8px 12px;
        min-height: 40px;
    }
    
    /* Form improvements */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    input, select, textarea {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
    }
    
    label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    /* Tables become scrollable on mobile */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 13px;
    }
    
    th, td {
        padding: 12px 8px;
    }
    
    /* Modal adjustments */
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
        margin: 10px;
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    /* Card spacing */
    .card {
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Stats grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        display: flex;
        gap: 1rem;
        align-items: center;
        min-height: 80px;
    }
    
    .stat-icon {
        font-size: 1.5rem;
        min-width: 40px;
    }
    
    /* Navigation */
    .sidebar-nav {
        padding: 1rem 0;
    }
    
    .nav-item {
        padding: 0.75rem 1rem;
        font-size: 14px;
    }
    
    .nav-item i {
        margin-right: 0.5rem;
    }
    
    /* Header */
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .header-content .btn {
        width: 100%;
    }
    
    /* Content spacing */
    .content {
        padding: 1rem 0;
    }
    
    /* Main padding */
    .main {
        padding: 0;
    }
    
    /* Badge adjustments */
    .badge {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    /* Quick stats */
    .quick-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* Modal actions */
    .modal-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    /* Notification positioning */
    .notification {
        right: 10px !important;
        left: 10px !important;
        max-width: none;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .container {
        padding: 0 12px;
    }
    
    body {
        font-size: 13px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 12px;
        font-size: 13px;
        gap: 6px;
    }
    
    .btn-block {
        width: 100%;
    }
    
    /* Forms */
    input, select, textarea {
        font-size: 16px;
        padding: 10px;
        min-height: 40px;
    }
    
    /* Headers */
    h1 {
        font-size: 1.25rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    h3 {
        font-size: 1rem;
    }
    
    /* Tables */
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 10px 6px;
    }
    
    /* Remove column widths to allow wrapping */
    .table-responsive {
        max-width: 100%;
    }
    
    /* Stat cards - stack icon and text better */
    .stat-card {
        flex-direction: column;
        text-align: center;
        min-height: auto;
        padding: 1rem 0.5rem;
    }
    
    .stat-icon {
        font-size: 1.25rem;
        min-width: auto;
        margin: 0;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    /* Sidebar nav items */
    .nav-item span {
        display: none;
    }
    
    .nav-item {
        padding: 0.5rem 0.75rem;
        justify-content: center;
    }
    
    /* Modal */
    .modal-content {
        margin: 0;
        border-radius: 12px 12px 0 0;
        max-height: 85vh;
        width: 100%;
    }
    
    .modal {
        padding: 0;
    }
    
    /* Form row */
    .form-row {
        grid-template-columns: 1fr !important;
    }
    
    /* Badge */
    .badge {
        padding: 3px 6px;
        font-size: 11px;
    }
    
    /* Quick stat */
    .quick-stat {
        padding: 0.75rem;
    }
    
    .quick-stat-value {
        font-size: 1rem;
    }
    
    /* User section */
    .user-section {
        display: none;
    }
    
    /* Header adjustments */
    .header-content h1 {
        font-size: 1.25rem;
    }
    
    .header-content .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* Inventory Page Enhancements */
.card-lg {
    margin-top: 2rem;
}

.table-hover tbody tr {
    transition: background-color 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: var(--light);
}

table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

table td {
    vertical-align: middle;
}

/* Action buttons in tables */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    min-height: auto;
    gap: 4px;
}

.btn-sm i {
    font-size: 0.875rem;
}

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

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

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

/* Text utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--gray);
    font-size: 0.875rem;
}

/* Modal improvements */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
}

.modal-md {
    max-width: 500px;
}

.modal-sm {
    max-width: 350px;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    border-top: 1px solid var(--gray-light);
    padding: 1.5rem;
}

.btn-block {
    width: 100%;
}

/* Form layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--dark);
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Stat card improvements */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid var(--gray-light);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
}

/* Top bar styling */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
}

.top-bar-left h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

/* Mobile improvements for inventory */
@media (max-width: 768px) {
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .top-bar .btn {
        width: 100%;
    }
    
    table {
        font-size: 13px;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
    }
    
    .btn-sm {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .modal-md,
    .modal-sm {
        max-width: 90vw;
    }
}
