﻿/* Modern Invoice System CSS Framework */
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 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: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--gray-50);
    min-height: 100vh;
    scroll-behavior: smooth;
}

/* Layout Components */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-lg);
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 { gap: var(--spacing-sm); }
.gap-4 { gap: var(--spacing-md); }
.gap-6 { gap: var(--spacing-lg); }

/* Typography */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.text-4xl { font-size: var(--font-size-4xl); }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Color Classes */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-white { color: var(--white); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-gray-800 { color: var(--gray-800); }

/* Modern Table Styles */
.table-responsive {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.table th {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    color: var(--gray-800);
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: left;
    font-weight: 600;
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 10;
}

.table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.table tbody tr {
    transition: var(--transition-fast);
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Action Buttons in Tables */
.table-actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: var(--font-size-sm);
}

.btn-icon-view {
    background: var(--info);
    color: var(--white);
}

.btn-icon-edit {
    background: var(--warning);
    color: var(--white);
}

.btn-icon-delete {
    background: var(--danger);
    color: var(--white);
}

.btn-icon:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-lg);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background-color: rgba(6, 182, 212, 0.1);
    color: var(--info);
}

.badge-primary {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

/* Alert Styles */
.alert {
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    border: none;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    border-left: 4px solid;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border-left-color: var(--success);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #7f1d1d;
    border-left-color: var(--danger);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #78350f;
    border-left-color: var(--warning);
}

.alert-info {
    background-color: rgba(6, 182, 212, 0.1);
    color: #164e63;
    border-left-color: var(--info);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    margin: 0;
    padding: 0;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.modal-header {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    color: var(--gray-400);
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--gray-600);
    background: var(--gray-100);
}

.modal-body {
    padding: var(--spacing-xl);
}

.modal-footer {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-200);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

.loading-lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.visible {
    visibility: visible;
}

.invisible {
    visibility: hidden;
}

.opacity-0 {
    opacity: 0;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-100 {
    opacity: 1;
}

.pointer-events-none {
    pointer-events: none;
}

.cursor-pointer {
    cursor: pointer;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

.select-none {
    user-select: none;
}

/* Spacing Utilities */
.m-0 { margin: 0; }
.m-1 { margin: var(--spacing-xs); }
.m-2 { margin: var(--spacing-sm); }
.m-3 { margin: var(--spacing-md); }
.m-4 { margin: var(--spacing-lg); }
.m-5 { margin: var(--spacing-xl); }
.m-6 { margin: var(--spacing-2xl); }

.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); }
.mt-5 { margin-top: var(--spacing-xl); }
.mt-6 { margin-top: var(--spacing-2xl); }

.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); }
.mb-5 { margin-bottom: var(--spacing-xl); }
.mb-6 { margin-bottom: var(--spacing-2xl); }

.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); }
.p-5 { padding: var(--spacing-xl); }
.p-6 { padding: var(--spacing-2xl); }

/* Border Utilities */
.border {
    border: 1px solid var(--gray-200);
}

.border-0 {
    border: 0;
}

.border-t {
    border-top: 1px solid var(--gray-200);
}

.border-b {
    border-bottom: 1px solid var(--gray-200);
}

.rounded {
    border-radius: var(--radius-md);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-full {
    border-radius: 9999px;
}

/* Shadow Utilities */
.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.shadow-xl {
    box-shadow: var(--shadow-xl);
}

/* Background Utilities */
.bg-white {
    background-color: var(--white);
}

.bg-gray-50 {
    background-color: var(--gray-50);
}

.bg-gray-100 {
    background-color: var(--gray-100);
}

.bg-primary {
    background-color: var(--primary);
}

.bg-success {
    background-color: var(--success);
}

.bg-warning {
    background-color: var(--warning);
}

.bg-danger {
    background-color: var(--danger);
}* Mobile Navigation */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: var(--spacing-lg);
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        width: 100%;
        margin: 0;
    }
    
    .nav-link {
        display: block;
        width: 100%;
        padding: var(--spacing-lg);
        border-radius: var(--radius-md);
        margin-bottom: var(--spacing-sm);
        text-align: center;
        border: 1px solid var(--gray-200);
    }
    
    .nav-link.logout {
        margin-top: var(--spacing-lg);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* Tablet Styles */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-title {
        font-size: var(--font-size-2xl);
    }
}

/* Mobile Styles */
@media (max-width: 640px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .card-body {
        padding: var(--spacing-lg);
    }
    
    .page-title {
        font-size: var(--font-size-xl);
        text-align: center;
    }
    
    .page-subtitle {
        font-size: var(--font-size-base);
        text-align: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .btn-sm {
        width: auto;
    }
    
    .table-actions {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .table th,
    .table td {
        padding: var(--spacing-sm);
        font-size: var(--font-size-xs);
    }
}

/* Print Styles */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .navbar,
    .btn,
    .print-hide,
    .nav-toggle {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
        page-break-inside: avoid;
    }
    
    .table {
        box-shadow: none;
    }
    
    @page {
        margin: 1cm;
        size: A4;
    }
}

/* ===============================================\n   MODERN SIDEBAR NAVIGATION SYSTEM\n   =============================================== */
.navbar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    position: sticky;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition-normal);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 80px;
}

.nav-brand h2 {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.08);
    transform: translateY(-1px);
    text-decoration: none;
}

.nav-link.active {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.nav-link.logout {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: var(--white);
    font-weight: 600;
    margin-left: var(--spacing-md);
}

.nav-link.logout:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--gray-700);
    margin: 3px 0;
    transition: var(--transition-fast);
    border-radius: 2px;
}

/* Main Content */
.main-content {
    margin-top: 70px;
    padding: var(--spacing-xl) 0;
    min-height: calc(100vh - 70px);
}

.page-header {
    background: var(--white);
    padding: var(--spacing-xl) 0;
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--gray-200);
}

.page-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--spacing-sm);
}

.page-subtitle {
    color: var(--gray-600);
    font-size: var(--font-size-lg);
}

/* Card Components */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: var(--spacing-lg);
    font-weight: 600;
    font-size: var(--font-size-lg);
    border-bottom: 1px solid var(--gray-200);
}

.card-body {
    padding: var(--spacing-xl);
}

.card-footer {
    background: var(--gray-50);
    padding: var(--spacing-lg);
    border-top: 1px solid var(--gray-200);
}

/* Stats Cards */
.stat-card {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
    border: 1px solid var(--gray-200);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.stat-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.stat-card.success::before {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.stat-card.warning::before {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
}

.stat-card.danger::before {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
}

.stat-card.info::before {
    background: linear-gradient(135deg, var(--info) 0%, #0891b2 100%);
}

.stat-number {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.stat-label {
    color: var(--gray-600);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: var(--font-size-sm);
}

/* Legacy Login Styles - Replaced by Modern Login Page Styles below */

/* Modern Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    gap: var(--spacing-sm);
    min-height: 44px;
    outline: none;
    box-shadow: var(--shadow-sm);
}

.btn:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-sm {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-xs);
    min-height: 36px;
}

.btn-lg {
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: var(--font-size-base);
    min-height: 52px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-800);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-300);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--white);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: var(--white);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: var(--white);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
}

/* Form Styles */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--gray-700);
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.form-control {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: var(--transition-fast);
    background: var(--white);
    color: var(--gray-900);
    min-height: 44px;
}

/* Form Input Styles */
.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Inter', -apple-system, sans-serif;
    transition: all 0.2s ease;
    background: white;
    color: #374151;
    box-sizing: border-box;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

.form-input::placeholder, .form-textarea::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: 'Inter', -apple-system, sans-serif;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-label i {
    width: 1rem;
    height: 1rem;
    color: #6b7280;
}

.form-group {
    margin-bottom: 1.25rem;
}

/* Form validation states */
.form-input:invalid, .form-textarea:invalid, .form-select:invalid {
    border-color: #ef4444;
}

.form-input:valid, .form-textarea:valid, .form-select:valid {
    border-color: #10b981;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--white);
}

.form-control:invalid {
    border-color: var(--danger);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-row {
    display: flex;
    gap: var(--spacing-lg);
    align-items: end;
}

.form-row .form-group {
    flex: 1;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-right: 40px;
    appearance: none;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-error {
    color: var(--danger);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.form-success {
    color: var(--success);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    color: white;
    padding: 20px;
    font-weight: 500;
}

.card-body {
    padding: 20px;
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.table th {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 500;
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e1e8ed;
}

.table tr:hover {
    background-color: #f8f9fa;
}

.table tr:last-child td {
    border-bottom: none;
}

/* Invoice Specific Styles */
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 30px;
    gap: 20px;
}

.company-info, .invoice-info, .customer-info {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    flex: 1;
}

.invoice-items {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
}

.items-table th {
    background: #2a5298;
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 500;
}

.items-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #e1e8ed;
}

.items-table input, .items-table select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.invoice-totals {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.totals-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 300px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px 0;
}

.total-row.grand-total {
    border-top: 2px solid #2a5298;
    font-weight: bold;
    font-size: 18px;
    color: #2a5298;
    margin-top: 15px;
    padding-top: 15px;
}

.amount-words {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    font-style: italic;
    color: #666;
}

/* Alert Styles */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background-color: #cce7ff;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Dashboard Styles */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #2a5298;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .navbar, .btn, .print-hide {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .table {
        box-shadow: none;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 10px;
    }
    
    .nav-menu {
        margin-top: 10px;
    }
    
    .nav-menu li {
        margin: 0 10px;
    }
    
    .main-content {
        margin-top: 120px;
    }
    
    .invoice-header {
        flex-direction: column;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Select */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: 'â–¼';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-buttons .btn {
    padding: 8px 15px;
    font-size: 12px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: black;
}

/* Autocomplete Styles */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item strong {
    color: #2a5298;
}

.suggestion-item small {
    color: #666;
    font-size: 11px;
}

.item-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-height: 150px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
}

/* ===============================================
   MODERN LOGIN PAGE STYLES
   =============================================== */

/* Login-specific body styles */
.login-body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

.login-page {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff05" points="0,1000 1000,0 1000,1000"/></svg>');
    pointer-events: none;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.6s ease-out;
    width: 100%;
    box-sizing: border-box;
}

/* Responsive styles for better mobile experience */
@media (max-width: 768px) {
    .login-container {
        max-width: 380px;
        margin: 0 1rem;
    }
    
    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }
    
    .login-logo h1 {
        font-size: 2rem !important;
    }
    
    .login-subtitle {
        font-size: 0.95rem !important;
    }
}

@media (max-width: 480px) {
    .login-container {
        max-width: 100%;
        margin: 0 0.75rem;
    }
    
    .login-card {
        padding: 1.5rem 1.25rem;
        border-radius: 12px;
    }
    
    .login-logo h1 {
        font-size: 1.75rem !important;
    }
    
    .login-subtitle {
        font-size: 0.9rem !important;
    }
    
    .login-form .form-input {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    .btn-login {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .login-container {
        margin: 0 0.5rem;
    }
    
    .login-card {
        padding: 1.25rem 1rem;
    }
    
    .login-logo h1 {
        font-size: 1.5rem !important;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo-icon {
    font-size: 3rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.login-logo h1 {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
    font-weight: 400;
}

.login-form {
    margin-bottom: 2rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form .form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.login-form .form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    box-sizing: border-box;
}

.login-form .form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

.btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* ===============================================
   SIMPLE FOOTER STYLES
   =============================================== */
.simple-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    margin-top: auto;
    padding: 1rem 0;
    width: 100vw;
    clear: both;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.footer-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
    width: 100%;
}

.footer-bottom {
    text-align: center !important;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}

.footer-bottom p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0 auto !important;
    font-weight: 400;
    text-align: center !important;
    width: 100%;
    display: block;
    padding: 0;
}

/* ===============================================
   MODERN DASHBOARD STYLES - Updated
   =============================================== */
.main-content {
    padding: 1.5rem;
    min-height: calc(100vh - 120px);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.75rem;
    }
}

/* Enhanced Dashboard Styles - Compact & Professional */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Simple Stats Grid - Clean 4-Metric Layout */
.simple-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 0;
}

@media (max-width: 1200px) {
    .simple-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .simple-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .simple-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 85px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Simplified layout responsive adjustments */
.simple-stats-grid .stat-card {
    padding: 1.5rem 1.25rem;
    min-height: 90px;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .simple-stats-grid .stat-card {
        padding: 1.25rem 1rem;
        min-height: 80px;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .simple-stats-grid .stat-card {
        padding: 1rem 0.875rem;
        min-height: 75px;
        flex-direction: row;
        text-align: left;
    }
}

.stat-card.customers::before {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.stat-card.items::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.stat-card.invoices::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.stat-card.revenue::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.stat-card.pending::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.stat-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(29, 78, 216, 0.08));
    color: #2563eb;
    font-size: 1.4rem;
}

.simple-stats-grid .stat-icon {
    width: 3.25rem;
    height: 3.25rem;
    font-size: 1.5rem;
    border-radius: 12px;
}

@media (max-width: 480px) {
    .simple-stats-grid .stat-icon {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.25rem;
        border-radius: 10px;
    }
}

.stat-card.customers .stat-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(29, 78, 216, 0.08));
    color: #2563eb;
}

.stat-card.items .stat-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.08));
    color: #059669;
}

.stat-card.invoices .stat-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.08));
    color: #d97706;
}

.stat-card.revenue .stat-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(220, 38, 38, 0.08));
    color: #dc2626;
}

.stat-card.pending .stat-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.08));
    color: #d97706;
}

.stat-content {
    flex: 1;
    text-align: left;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c !important;
    line-height: 1;
    margin-bottom: 0.25rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -0.02em;
}

.stat-label {
    color: #6b7280 !important;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0;
    line-height: 1.2;
}

.simple-stats-grid .stat-number {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.simple-stats-grid .stat-label {
    font-size: 0.85rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .simple-stats-grid .stat-number {
        font-size: 1.75rem;
    }
    
    .simple-stats-grid .stat-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .simple-stats-grid .stat-number {
        font-size: 1.5rem;
    }
    
    .simple-stats-grid .stat-label {
        font-size: 0.75rem;
    }
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    width: fit-content;
}

.stat-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: #059669 !important;
}

.stat-change.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706 !important;
}

/* Dashboard Grid - Compact Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: between;
    background: #f8fafc;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a202c !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.card-subtitle {
    color: #4a5568 !important;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

.card-action {
    color: #3b82f6 !important;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.card-body {
    padding: 1rem 1.25rem;
}

/* Enhanced Quick Actions - Compact */
.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.quick-action {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.quick-action:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.quick-action-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    background: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.quick-action span {
    font-weight: 600;
    color: #1a202c !important;
    font-size: 0.9rem;
    line-height: 1.2;
}

.quick-action small {
    color: #4a5568 !important;
    font-size: 0.7rem;
    margin-top: -0.25rem;
    line-height: 1.3;
}

/* Enhanced Invoice List - Compact */
.invoice-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.invoice-item:hover {
    background: #e2e8f0;
    border-color: #3b82f6;
    transform: translateX(2px);
}

.invoice-info {
    flex: 1;
}

.invoice-number {
    font-weight: 700;
    color: #1a202c !important;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.invoice-customer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #4a5568 !important;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.invoice-customer i {
    font-size: 0.7rem;
}

.invoice-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #6b7280 !important;
    font-size: 0.75rem;
}

.invoice-date i {
    font-size: 0.65rem;
}

.invoice-amount {
    font-weight: 700;
    font-size: 1rem;
    color: #059669 !important;
    margin-right: 0.75rem;
}

.invoice-actions {
    display: flex;
    gap: 0.4rem;
}

/* Top Customers - Compact */
.customer-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.customer-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.customer-item:hover {
    background: #e2e8f0;
    transform: translateX(2px);
    border-color: #3b82f6;
}

.customer-rank {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.customer-info {
    flex: 1;
}

.customer-name {
    font-weight: 600;
    color: #1a202c !important;
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
}

.customer-total {
    color: #4a5568 !important;
    font-size: 0.8rem;
}

.badge {
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-gold {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #92400e !important;
}

.badge-silver {
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    color: #374151 !important;
}

.badge-bronze {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: white !important;
}

/* Performance Metrics - Compact */
.performance-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.metric {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
}

.metric.warning {
    border-left-color: #f59e0b;
}

.metric-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
}

.metric.warning .metric-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.metric-label {
    color: #4a5568 !important;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.metric-value {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1a202c !important;
}

.card-badge {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6 !important;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Force all dashboard text to be dark and visible */
.dashboard-card h3,
.dashboard-card h4,
.dashboard-card p,
.dashboard-card span,
.dashboard-card div {
    color: #1a202c !important;
}

.dashboard-card .text-secondary,
.dashboard-card .text-muted {
    color: #4a5568 !important;
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
}

.empty-state .empty-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    font-size: 1.5rem;
}

.empty-state h4 {
    color: #1a202c !important;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #4a5568 !important;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Page Header Fixes */
.page-title {
    color: #1a202c !important;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: #4a5568 !important;
    font-size: 1rem;
    margin-bottom: 0;
}

/* Button improvements */
.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-outline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #4b5563 !important;
}

.btn-outline:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.btn-primary {
    background: #3b82f6;
    border: 1px solid #3b82f6;
    color: white !important;
}

.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.dashboard-card .card-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(29, 78, 216, 0.02));
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-action {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.card-action:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.quick-actions .card-body {
    padding: 1.5rem;
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    border-radius: 16px;
    background: rgba(59, 130, 246, 0.05);
    border: 2px solid transparent;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-weight: 600;
}

.quick-action:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--primary-color);
}

.quick-action-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.recent-invoices .card-body {
    padding: 0;
}

.invoice-list {
    max-height: 400px;
    overflow-y: auto;
}

.invoice-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s ease;
}

.invoice-item:hover {
    background: rgba(59, 130, 246, 0.02);
}

.invoice-item:last-child {
    border-bottom: none;
}

.invoice-info {
    flex: 1;
}

.invoice-number {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.invoice-customer {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.invoice-date {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.invoice-amount {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.invoice-actions {
    display: flex;
    gap: 0.5rem;
}

/* ===============================================
   CREATE INVOICE PAGE STYLES
   =============================================== */

/* Items Section */
.items-section {
    margin-bottom: 1.5rem;
}

.compact-items-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.85rem;
}

.compact-items-table thead {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.compact-items-table th {
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.compact-items-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.compact-items-table tbody tr:hover {
    background: #f8fafc;
}

.item-input {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.8rem;
    background: #fafbfc;
}

.item-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
}

.total-display {
    font-weight: 500;
    color: #1f2937;
}

.btn-remove {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s ease;
}

.btn-remove:hover {
    background: #dc2626;
}

.add-item-row {
    text-align: center;
    margin-top: 0.75rem;
}

.btn-add-item {
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn-add-item:hover {
    background: #059669;
}

/* Totals Section */
.totals-section {
    margin-top: 1.5rem;
}

.totals-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.totals-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.totals-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.9rem;
}

.totals-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.totals-table td:first-child {
    background: #f8fafc;
    font-weight: 500;
    color: #374151;
    width: 60%;
}

.totals-table td:last-child {
    text-align: right;
    font-weight: 500;
}

.grand-total-row {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    font-weight: 600;
}

.grand-total-row td {
    border: none;
    background: transparent;
    color: white;
}

.tax-rate-input {
    width: 50px;
    padding: 0.2rem 0.4rem;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    font-size: 0.8rem;
    text-align: center;
    margin: 0 0.3rem;
}

.amount-words {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 0.85rem;
    color: #374151;
}

.submit-section {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .totals-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .customer-row {
        grid-template-columns: 1fr;
    }
    
    .invoice-header {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .invoice-container {
        padding: 1rem;
    }
    
    .invoice-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .compact-items-table {
        font-size: 0.75rem;
    }
    
    .compact-items-table th,
    .compact-items-table td {
        padding: 0.4rem 0.3rem;
    }
    
    .submit-section {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 0.5rem;
    }
    
    .compact-items-table {
        min-width: 600px;
    }
    
    .items-section {
        overflow-x: auto;
        margin: 0 -1rem;
        padding: 0 1rem;
    }
}

.invoice-section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.section-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 8px;
    font-size: 0.875rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
    font-weight: 400;
}

.btn-add-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 10px;
}

/* Form Grid Layouts */
.form-grid {
    display: grid;
    gap: 1.25rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Compact form inputs */
.form-group {
    margin-bottom: 0;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.form-label i {
    width: 1rem;
    height: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: #fafbfc;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
    outline: none;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Company Selection */
.company-selection {
    position: relative;
}

.company-details {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 0.75rem;
    transition: all 0.3s ease;
}

.company-details.hidden {
    display: none;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.detail-label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.85rem;
    word-break: break-word;
}

/* Customer Form */
.customer-form {
    position: relative;
}

.delivery-section {
    background: rgba(59, 130, 246, 0.02);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.subsection-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subsection-title i {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--primary-color);
}
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Items Table */
.items-container {
    position: relative;
    overflow-x: auto;
}

.items-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 1rem;
}

.items-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.items-table th {
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: none;
    position: relative;
}

.items-table th i {
    margin-right: 0.3rem;
    font-size: 0.75rem;
}

.items-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

.items-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.02);
}

.items-table input,
.items-table select {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fafbfc;
    transition: all 0.2s ease;
}

.items-table input:focus,
.items-table select:focus {
    border-color: var(--primary-color);
    background: white;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Column widths */
.item-name-col { min-width: 180px; }
.serial-col { min-width: 100px; }
.hsn-col { min-width: 90px; }
.qty-col { min-width: 70px; }
.rate-col { min-width: 90px; }
.unit-col { min-width: 70px; }
.total-col { min-width: 100px; }
.action-col { width: 50px; text-align: center; }

.add-item-section {
    text-align: center;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.02);
    border: 2px dashed rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    margin-top: 1rem;
}

.btn-add-item-secondary {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 10px;
}

/* Totals Section */
.totals-container {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
}

.totals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.tax-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tax-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tax-label {
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 100px;
    font-size: 0.85rem;
}

.tax-input {
    width: 70px;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.tax-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.totals-display {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
}

.tax-row-display {
    background: rgba(59, 130, 246, 0.02);
    border-color: rgba(59, 130, 246, 0.1);
}

.grand-total-row {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    padding: 0.75rem;
}

.total-label {
    font-weight: 500;
    color: inherit;
}

.total-amount {
    font-weight: 600;
    font-size: 1rem;
    color: inherit;
}

.grand-total {
    font-size: 1.1rem;
}

.amount-words-container {
    background: white;
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.amount-words-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.amount-words {
    color: var(--text-secondary);
    font-weight: 500;
    font-style: italic;
    font-size: 0.9rem;
}

/* Submit Section */
.submit-container {
    text-align: center;
}

.submit-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.btn-submit {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    transition: all 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.submit-note {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .invoice-section {
        padding: 1.25rem 1rem;
        margin-bottom: 1.25rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }
    
    .totals-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .submit-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-submit {
        width: 100%;
        max-width: 300px;
    }
    
    .items-container {
        margin: 0 -1rem;
        padding: 0 1rem;
    }
    
    .items-table {
        font-size: 0.8rem;
    }
    
    .items-table th,
    .items-table td {
        padding: 0.5rem 0.3rem;
    }
    
    .tax-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .tax-label {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .invoice-section {
        padding: 1rem 0.75rem;
        border-radius: 12px;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .section-title i {
        width: 1.25rem;
        height: 1.25rem;
        font-size: 0.75rem;
    }
    
    .form-input,
    .form-textarea {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .delivery-section,
    .company-details {
        padding: 1rem;
    }
}
    gap: 0.5rem;
}

/* Autocomplete Suggestions */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-height: 180px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
    font-size: 0.85rem;
}

.suggestion-item:hover {
    background: rgba(59, 130, 246, 0.05);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.1rem;
}

.suggestion-item small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Responsive Design for Create Invoice */
@media (max-width: 1024px) {
    .invoice-section {
        padding: 1.5rem;
    }
    
    .totals-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .invoice-form {
        padding: 0 1rem;
    }
    
    .invoice-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .btn-add-item {
        width: 100%;
        justify-content: center;
    }
    
    .items-table {
        min-width: 800px;
    }
    
    .submit-actions {
        flex-direction: column;
    }
    
    .submit-actions .btn {
        width: 100%;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .tax-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .tax-input {
        width: 100px;
    }
}

@media (max-width: 480px) {
    .invoice-section {
        padding: 0.75rem;
        border-radius: 16px;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .section-title i {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .totals-container {
        padding: 1rem;
    }
    
    .total-row {
        padding: 0.5rem 0.75rem;
    }
    
    .items-table th,
    .items-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}

/* Container and Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-fluid {
    width: 100%;
    padding: 0 1rem;
}

/* Responsive Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -1rem;
}

.col {
    flex: 1;
    padding: 0 1rem;
}

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }

/* Mobile First Responsive Columns */
@media (max-width: 768px) {
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
}

@media (max-width: 480px) {
    .col-xs-12 { flex: 0 0 100%; max-width: 100%; }
    .row { margin: 0 -0.5rem; }
    .col { padding: 0 0.5rem; }
}

/* Visibility Utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

@media (max-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
}

@media (max-width: 480px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
}

/* Spacing Utilities */
.m-0 { margin: 0 !important; }
.m-1 { margin: 0.5rem !important; }
.m-2 { margin: 1rem !important; }
.m-3 { margin: 1.5rem !important; }
.m-4 { margin: 2rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.5rem !important; }
.p-2 { padding: 1rem !important; }
.p-3 { padding: 1.5rem !important; }
.p-4 { padding: 2rem !important; }

/* Text Utilities */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

.text-sm { font-size: 0.875rem !important; }
.text-base { font-size: 1rem !important; }
.text-lg { font-size: 1.125rem !important; }
.text-xl { font-size: 1.25rem !important; }

/* Flex Utilities */
.justify-start { justify-content: flex-start !important; }
.justify-center { justify-content: center !important; }
.justify-end { justify-content: flex-end !important; }
.justify-between { justify-content: space-between !important; }

.items-start { align-items: flex-start !important; }
.items-center { align-items: center !important; }
.items-end { align-items: flex-end !important; }

/* Width and Height Utilities */
.w-full { width: 100% !important; }
.w-auto { width: auto !important; }
.h-full { height: 100% !important; }
.h-auto { height: auto !important; }

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .text-md-center { text-align: center !important; }
    .text-md-left { text-align: left !important; }
    
    .w-md-full { width: 100% !important; }
    .p-md-2 { padding: 1rem !important; }
    .m-md-2 { margin: 1rem !important; }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .text-sm-center { text-align: center !important; }
    .w-sm-full { width: 100% !important; }
    .p-sm-1 { padding: 0.5rem !important; }
    .m-sm-1 { margin: 0.5rem !important; }
}
.page-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(59, 130, 246, 0.02) 100%);
    pointer-events: none;
}

.page-header-content {
    position: relative;
    z-index: 1;
}

.page-title {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    line-height: 1.2;
}

.page-title i {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 10px;
    font-size: 1rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .page-header {
        padding: 1.25rem 1.5rem;
        margin-bottom: 1.25rem;
        border-radius: 12px;
    }
    
    .page-title {
        font-size: 1.5rem;
        gap: 0.5rem;
    }
    
    .page-title i {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    .page-subtitle {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 1rem 1.25rem;
        margin-bottom: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .page-title {
        font-size: 1.35rem;
    }
    
    .page-subtitle {
        font-size: 0.8rem;
    }
}

.page-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Enhanced responsiveness for dashboard */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        min-height: auto;
    }
    
    .stat-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }
    
    .stat-number {
        font-size: 2.25rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .quick-action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.5rem 2rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-title i {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
    
    .page-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    /* Navigation responsive */
    .navbar {
        padding: 1rem 2rem;
    }
    
    .nav-brand h2 {
        font-size: 1.5rem;
    }
    
    /* Forms responsive */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-group-full {
        grid-column: 1;
    }
    
    /* Tables responsive */
    .table-responsive {
        overflow-x: auto;
    }
    
    .modern-table {
        min-width: 600px;
    }
    
    /* Cards responsive */
    .data-card, .form-card {
        margin: 1rem 0;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .search-box {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-action-grid {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
    
    .login-logo h1 {
        font-size: 2rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Corporate Footer Mobile */
    .corporate-footer {
        padding: 1.5rem 0 1rem;
        margin-top: 2rem;
    }
    
    .footer-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .footer-nav li {
        margin: 0;
    }
    
    /* Navigation mobile */
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    .nav-brand h2 {
        font-size: 1.25rem;
    }
    
    /* Buttons mobile */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Forms mobile */
    .form-input, .form-textarea, .form-select {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Action buttons mobile */
    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Invoice items mobile */
    .invoice-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .invoice-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* SIDEBAR NAVIGATION STYLES */
.sidebar-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 998; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.sidebar-overlay.active { opacity: 1; visibility: visible; }

/* Modern Sidebar */
.modern-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    overflow-x: hidden;
}

.modern-sidebar.active {
    transform: translateX(0);
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    width: 2rem;
    height: 2rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.sidebar-brand h2 {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}
    margin: 0;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s ease;
    display: none;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Sidebar Menu */
.sidebar-menu {
    padding: 1rem 0;
}

.menu-section {
    margin-bottom: 2rem;
}

.menu-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 1.5rem;
    margin-bottom: 0.75rem;
}

.menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    position: relative;
}

.menu-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    padding-left: 2rem;
}

.menu-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-right: 3px solid white;
}

.menu-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: white;
}

.menu-link i {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.logout-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

/* Top Header Bar */
.top-header {
    position: sticky;
    top: 0;
    z-index: 997;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #374151;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.sidebar-toggle:hover {
    background: #f3f4f6;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-name {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

/* Main Content Area */
.main-content-area {
    padding: 2rem;
    min-height: calc(100vh - 120px);
    background: #f9fafb;
}

/* Desktop Styles - Sidebar always visible */
@media (min-width: 1024px) {
    .modern-sidebar {
        transform: translateX(0);
        position: relative;
        width: 280px;
        height: 100vh;
        flex-shrink: 0;
    }
    
    body {
        display: flex;
        margin: 0;
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    .main-wrapper {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .main-content-area {
        flex: 1;
        overflow-y: auto;
    }
}

/* Tablet Styles */
@media (max-width: 1023px) and (min-width: 769px) {
    .sidebar-close {
        display: block;
    }
    
    .top-header {
        padding: 1rem 1.5rem;
    }
    
    .main-content-area {
        padding: 1.5rem;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .sidebar-close {
        display: block;
    }
    
    .modern-sidebar {
        width: 100%;
        max-width: 320px;
    }
    
    .top-header {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .user-info {
        padding: 0.25rem 0.75rem;
    }
    
    .user-name {
        display: none;
    }
    
    .main-content-area {
        padding: 1rem;
    }
}

/* ===============================================
   COMPACT INVOICE FORM LAYOUT
   =============================================== */
.compact-invoice-form {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.invoice-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    margin: 0;
}

/* Header Section */
.invoice-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.company-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.invoice-meta {
    display: flex;
    gap: 1.5rem;
}

.meta-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 120px;
}

/* Customer & Delivery Section */
.customer-delivery-section {
    margin-bottom: 1.5rem;
}

.customer-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.customer-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.delivery-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

/* Compact Form Inputs */
.compact-invoice-form .form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: #374151;
    margin: 0;
}

.compact-invoice-form .form-input,
.compact-invoice-form .form-select,
.compact-invoice-form .form-textarea {
    padding: 0.6rem 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    background: #fafbfc;
}

.compact-invoice-form .form-input:focus,
.compact-invoice-form .form-select:focus,
.compact-invoice-form .form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

.compact-invoice-form .form-textarea {
    resize: vertical;
    min-height: 60px;
}

/* Items Section */
.items-section {
    margin-bottom: 1.5rem;
}

.compact-items-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.85rem;
}

.compact-items-table thead {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.compact-items-table th {
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.compact-items-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.compact-items-table tbody tr:hover {
    background: #f8fafc;
}

.item-input {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.8rem;
    background: #fafbfc;
}

.item-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
}

.total-display {
    font-weight: 500;
    color: #1f2937;
}

.btn-remove {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s ease;
}

.btn-remove:hover {
    background: #dc2626;
}

.add-item-row {
    text-align: center;
    margin-top: 0.75rem;
}

.btn-add-item {
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn-add-item:hover {
    background: #059669;
}

/* Totals Section */
.totals-section {
    margin-top: 1.5rem;
}

.totals-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.totals-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.totals-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.9rem;
}

.totals-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.totals-table td:first-child {
    background: #f8fafc;
    font-weight: 500;
    color: #374151;
    width: 60%;
}

.totals-table td:last-child {
    text-align: right;
    font-weight: 500;
}

.grand-total-row {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    font-weight: 600;
}

.grand-total-row td {
    border: none;
    background: transparent;
    color: white;
}

.tax-rate-input {
    width: 50px;
    padding: 0.2rem 0.4rem;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    font-size: 0.8rem;
    text-align: center;
    margin: 0 0.3rem;
}

.amount-words {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 0.85rem;
    color: #374151;
}

.submit-section {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.compact-invoice-form .btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.compact-invoice-form .btn-secondary {
    background: #6b7280;
    color: white;
}

.compact-invoice-form .btn-secondary:hover {
    background: #4b5563;
}

.compact-invoice-form .btn-primary {
    background: #3b82f6;
    color: white;
}

.compact-invoice-form .btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .totals-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .customer-row {
        grid-template-columns: 1fr;
    }
    
    .invoice-header {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .invoice-container {
        padding: 1rem;
    }
    
    .invoice-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .compact-items-table {
        font-size: 0.75rem;
    }
    
    .compact-items-table th,
    .compact-items-table td {
        padding: 0.4rem 0.3rem;
    }
    
    .submit-section {
        flex-direction: column;
    }
    
    .compact-invoice-form .btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 0.5rem;
    }
    
    .compact-items-table {
        min-width: 600px;
    }
    
    .items-section {
        overflow-x: auto;
        margin: 0 -1rem;
        padding: 0 1rem;
    }
}
    .main-content {

/* ========== MODERN INVOICE FORM STYLES ========== */

.modern-invoice-form {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.invoice-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Top Row Layout */
.invoice-top-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.company-field label,
.invoice-number-field label,
.date-field label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.modern-invoice-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.modern-invoice-form .form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Customer Section */
.customer-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.customer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.customer-basic {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field-row .field.full-width {
    grid-column: 1 / -1;
}

.field label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 13px;
}

.delivery-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.delivery-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Items Section */
.items-section {
    margin-bottom: 30px;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.items-table th {
    background: #3b82f6;
    color: #fff;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.items-table td {
    padding: 8px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.table-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.table-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.total-display {
    font-weight: 600;
    color: #1f2937;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 4px;
    display: block;
    text-align: right;
}

.remove-btn {
    background: #ef4444;
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.add-item-btn {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.add-item-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Totals Section */
.totals-section {
    margin-top: 30px;
}

.totals-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

.totals-right {
    background: #f8fafc;
    padding: 24px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.totals-table {
    width: 100%;
    margin-bottom: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.total-row.grand-total {
    font-weight: 700;
    font-size: 16px;
    color: #1f2937;
    border-bottom: 2px solid #3b82f6;
    padding: 12px 0;
    margin-top: 8px;
}

.tax-input {
    width: 60px;
    padding: 4px 6px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    margin: 0 4px;
    box-sizing: border-box;
}

.amount-words {
    background: #fff;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    font-size: 14px;
}

.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-cancel {
    background: #6b7280;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #4b5563;
}

.btn-submit {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-submit:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Responsive Design for Modern Invoice Form */
@media (max-width: 1024px) {
    .customer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .totals-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .modern-invoice-form {
        padding: 10px;
    }
    
    .invoice-card {
        padding: 15px;
        border-radius: 8px;
    }
    
    .invoice-top-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .field-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-submit,
    .btn-cancel {
        width: 100%;
        margin-bottom: 8px;
        padding: 14px;
        font-size: 16px;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .items-table {
        min-width: 700px;
    }
}

@media (max-width: 480px) {
    .modern-invoice-form {
        padding: 5px;
    }
    
    .invoice-card {
        padding: 10px;
        margin-bottom: 15px;
        border-radius: 6px;
    }
    
    .items-table {
        min-width: 600px;
        font-size: 12px;
    }
    
    }
}

/* ========== NEW SIMPLE INVOICE FORM STYLES ========== */

.new-invoice-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: #f8f9fa;
    min-height: calc(100vh - 140px);
}

.invoice-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.page-subtitle {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
}

.simple-invoice-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: #34495e;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-input {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-input::placeholder {
    color: #95a5a6;
}

/* Items Table */
.items-container {
    margin-top: 10px;
}

.items-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    margin-bottom: 15px;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    min-width: 700px;
}

.items-table th {
    background: #3498db;
    color: #fff;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.items-table td {
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.table-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    transition: border-color 0.3s ease;
}

.table-input:focus {
    outline: none;
    border-color: #3498db;
}

.total-display {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    display: block;
    text-align: right;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.remove-btn {
    background: #e74c3c;
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.add-item-btn {
    background: #27ae60;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.add-item-btn:hover {
    background: #219a52;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

/* Summary Section */
.summary-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-bottom: 25px;
}

.amount-words {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.amount-words strong {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
}

.amount-words #amount_in_words {
    font-size: 15px;
    color: #34495e;
    font-weight: 500;
    text-transform: capitalize;
}

.totals-table {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

.total-row:last-child {
    border-bottom: none;
}

.total-row.grand-total {
    font-weight: 700;
    font-size: 16px;
    color: #2c3e50;
    border-top: 2px solid #3498db;
    padding-top: 12px;
    margin-top: 8px;
}

.tax-input {
    width: 50px;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    margin: 0 4px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.btn-cancel {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-cancel:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-submit {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 12px 35px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-submit:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Suggestions Dropdown */
.suggestions-dropdown {
    position: relative;
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-item strong {
    color: #2c3e50;
    display: block;
}

.suggestion-item small {
    color: #6c757d;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .new-invoice-container {
        padding: 10px;
    }
    
    .info-card {
        padding: 20px 15px;
    }
    
    .invoice-header {
        padding: 15px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .items-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-submit,
    .btn-cancel {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .new-invoice-container {
        padding: 5px;
    }
    
    .info-card {
        padding: 15px 10px;
        border-radius: 8px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    .items-table {
        font-size: 12px;
        min-width: 600px;
    }
    
    }
}

/* ========== CUSTOMER MANAGEMENT STYLES ========== */

.page-header-modern {
    background: #fff;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icon {
    width: 40px;
    height: 40px;
    color: #3498db;
    background: #e3f2fd;
    padding: 8px;
    border-radius: 10px;
}

.header-title h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.header-title p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn-primary {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background: #f8f9fa;
    color: #dc3545;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.3s ease;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Customer Form */
.customer-form-container {
    margin-bottom: 25px;
}

.form-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.form-header {
    background: #f8f9fa;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.customer-form {
    padding: 25px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-input::placeholder {
    color: #95a5a6;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Customer List */
.customers-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.list-header {
    background: #f8f9fa;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.list-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.customer-count {
    background: #3498db;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container i {
    position: absolute;
    left: 12px;
    color: #6c757d;
    width: 16px;
    height: 16px;
}

#searchInput {
    padding: 10px 15px 10px 35px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    width: 250px;
    transition: border-color 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #3498db;
}

.customers-list {
    padding: 25px;
}

.customer-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.customer-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.customer-card:last-child {
    margin-bottom: 0;
}

.customer-info {
    flex: 1;
}

.customer-name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.customer-name strong {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.customer-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 14px;
}

.detail-item i {
    width: 14px;
    height: 14px;
    color: #3498db;
}

.customer-actions {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

.action-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.action-btn.edit {
    background: #e8f5e8;
    color: #28a745;
}

.action-btn.edit:hover {
    background: #28a745;
    color: #fff;
}

.action-btn.delete {
    background: #f8e8e8;
    color: #dc3545;
}

.action-btn.delete:hover {
    background: #dc3545;
    color: #fff;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.empty-icon i {
    width: 40px;
    height: 40px;
    color: #6c757d;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 25px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header-modern {
        padding: 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .customer-card {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .customer-actions {
        justify-content: center;
        margin-left: 0;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .list-header {
        flex-direction: column;
        gap: 15px;
    }
    
    #searchInput {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .customer-form {
        padding: 20px 15px;
    }
    
    .customers-list {
        padding: 15px;
    }
    
    .customer-card {
        padding: 15px;
    }
    
    .customer-details {
        grid-template-columns: 1fr;
    }
}

/* ========== ITEM MANAGEMENT STYLES ========== */

.item-form-container {
    margin-bottom: 25px;
}

.item-form {
    padding: 25px;
}

.form-grid .form-group.span-2 {
    grid-column: span 2;
}

/* Items Grid Layout */
.items-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.items-table-container {
    padding: 0;
}

.table-wrapper {
    overflow-x: auto;
    background: #fff;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    min-width: 800px;
}

.items-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.items-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    border-bottom: 2px solid #e9ecef;
}

.items-table th i {
    margin-right: 6px;
    color: #3498db;
}

.items-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f1f3f4;
}

.items-table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.001);
}

.items-table td {
    padding: 15px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
}

.item-name-cell .name-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-name-cell .item-icon {
    background: #e3f2fd;
    color: #3498db;
    padding: 8px;
    border-radius: 8px;
    width: 16px;
    height: 16px;
}

.item-name-cell strong {
    color: #2c3e50;
    font-weight: 600;
    font-size: 15px;
}

.serial-cell, .hsn-cell {
    color: #6c757d;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.rate-cell .rate-value {
    background: #27ae60;
    color: #fff;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 14px;
}

.unit-cell .unit-badge {
    background: #3498db;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.date-cell {
    color: #6c757d;
    font-size: 13px;
}

.actions-cell {
    text-align: center;
}

.table-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.table-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.table-btn.edit {
    background: #e8f5e8;
    color: #28a745;
}

.table-btn.edit:hover {
    background: #28a745;
    color: #fff;
    transform: translateY(-1px);
}

.table-btn.delete {
    background: #f8e8e8;
    color: #dc3545;
}

.table-btn.delete:hover {
    background: #dc3545;
    color: #fff;
    transform: translateY(-1px);
}

.table-btn i {
    width: 14px;
    height: 14px;
}

/* Item Count Badge */
.item-count {
    background: #3498db;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Empty State for Items */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

/* Responsive Design for Items */
@media (max-width: 1200px) {
    .items-table {
        min-width: 700px;
    }
}

@media (max-width: 768px) {
    .items-table-container {
        padding: 10px;
    }
    
    .table-wrapper {
        border-radius: 8px;
        border: 1px solid #e9ecef;
        -webkit-overflow-scrolling: touch;
    }
    
    .items-table {
        min-width: 600px;
        font-size: 13px;
    }
    
    .items-table th,
    .items-table td {
        padding: 10px 8px;
    }
    
    .item-name-cell .item-icon {
        padding: 6px;
        width: 14px;
        height: 14px;
    }
    
    .table-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .table-btn {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 60px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .items-table {
        min-width: 500px;
        font-size: 12px;
    }
    
    .items-table th,
    .items-table td {
        padding: 8px 6px;
    }
    
    .rate-cell .rate-value {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .unit-cell .unit-badge {
        padding: 3px 6px;
        font-size: 11px;
    }
}

/* ===== CUSTOMER & COMPANY TABLE STYLES ===== */

/* Table Container Styles for Customer and Company Management */
.customers-table-container,
.companies-table-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    margin-top: var(--spacing-lg);
}

.customers-table-container .table-header,
.companies-table-container .table-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.customers-table-container .table-title,
.companies-table-container .table-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.customers-table-container .table-title h3,
.companies-table-container .table-title h3 {
    color: white;
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: 0;
}

.customers-table-container .count-badge,
.companies-table-container .count-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.customers-table-container .table-actions,
.companies-table-container .table-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.customers-table-container .search-box,
.companies-table-container .search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.customers-table-container .search-icon,
.companies-table-container .search-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--gray-400);
    z-index: 2;
}

.customers-table-container .search-input,
.companies-table-container .search-input {
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 10px 12px 10px 40px;
    font-size: var(--font-size-sm);
    width: 250px;
    transition: all 0.2s ease;
}

.customers-table-container .search-input:focus,
.companies-table-container .search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Data Table Styles */
.customers-table .data-table,
.companies-table .data-table,
.table-wrapper .data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.customers-table .data-table th,
.companies-table .data-table th,
.table-wrapper .data-table th {
    background: var(--gray-50);
    color: var(--gray-700);
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-align: left;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 2px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 10;
}

.customers-table .data-table td,
.companies-table .data-table td,
.table-wrapper .data-table td {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: top;
}

.customer-row,
.company-row {
    transition: background-color 0.2s ease;
}

.customer-row:hover,
.company-row:hover {
    background: var(--gray-50);
}

/* Table Cell Specific Styles */
.name-cell .name-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.name-cell .table-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
    flex-shrink: 0;
}

.name-cell .customer-name,
.name-cell .company-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: var(--font-size-base);
}

.name-cell .company-details .company-address {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    color: var(--gray-600);
    font-size: var(--font-size-sm);
}

.name-cell .address-icon {
    width: 14px;
    height: 14px;
}

.contact-cell .contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-cell .contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-cell .contact-icon {
    width: 16px;
    height: 16px;
    color: var(--gray-500);
}

.contact-cell .contact-item span {
    font-size: var(--font-size-sm);
    color: var(--gray-700);
}

.address-cell .address-text {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.address-cell .table-icon {
    width: 16px;
    height: 16px;
    color: var(--gray-500);
    margin-top: 2px;
}

.address-cell span {
    font-size: var(--font-size-sm);
    color: var(--gray-700);
    line-height: 1.4;
}

.gst-cell .gst-badge {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    font-family: 'Monaco', 'Courier New', monospace;
}

.bank-cell .bank-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bank-cell .bank-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bank-cell .bank-icon {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.bank-cell .bank-name strong {
    color: var(--gray-900);
    font-size: var(--font-size-sm);
}

.bank-cell .account-details,
.bank-cell .ifsc-details {
    font-size: var(--font-size-xs);
    color: var(--gray-600);
    margin-left: 24px;
}

.no-data {
    color: var(--gray-400);
    font-style: italic;
    font-size: var(--font-size-sm);
}

/* Actions Column */
.actions-column {
    width: 120px;
    text-align: center;
}

.actions-cell {
    text-align: center;
}

.actions-cell .action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.actions-cell .action-btn {
    background: none;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.actions-cell .edit-btn {
    color: var(--primary);
    border-color: var(--primary);
}

.actions-cell .edit-btn:hover {
    background: var(--primary);
    color: white;
}

.actions-cell .delete-btn {
    color: var(--danger);
    border-color: var(--danger);
}

.actions-cell .delete-btn:hover {
    background: var(--danger);
    color: white;
}

.actions-cell .action-btn i {
    width: 16px;
    height: 16px;
}

/* Company Form Specific Styles */
.company-form-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--spacing-lg);
    overflow-y: auto;
}

.company-form-container .form-card {
    background: white;
    border-radius: 12px;
    padding: 0;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.company-form-container .section-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--gray-700);
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: var(--spacing-xl) 0 var(--spacing-lg) 0;
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--gray-200);
}

.company-form-container .section-title i {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

/* Customer Form Container */
.customer-form-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--spacing-lg);
    overflow-y: auto;
}

/* Responsive Design for Tables */
@media (max-width: 768px) {
    .customers-table-container .table-header,
    .companies-table-container .table-header {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: flex-start;
    }
    
    .customers-table-container .search-input,
    .companies-table-container .search-input {
        width: 100%;
    }
    
    .customers-table .data-table,
    .companies-table .data-table {
        font-size: var(--font-size-sm);
    }
    
    .customers-table .data-table th,
    .companies-table .data-table th,
    .customers-table .data-table td,
    .companies-table .data-table td {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .contact-cell .contact-info {
        gap: 4px;
    }
    
    .actions-cell .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
    
    .actions-cell .action-btn {
        width: 32px;
        height: 32px;
        padding: 6px;
    }
}

@media (max-width: 640px) {
    .customers-table-container,
    .companies-table-container {
        border-radius: 8px;
        margin: var(--spacing-md) -var(--spacing-md);
    }
    
    .customers-table .data-table,
    .companies-table .data-table {
        min-width: 600px;
    }
    
    .customers-table-container .table-header,
    .companies-table-container .table-header {
        padding: var(--spacing-md);
    }
}

/* CRITICAL FIX FOR ACTION BUTTONS */
.table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 0 0 12px 12px;
}

.action-buttons {
    display: flex !important;
    gap: 8px !important;
    justify-content: center !important;
    align-items: center !important;
}

.action-btn {
    background: none !important;
    border: 1px solid var(--gray-300) !important;
    border-radius: 6px !important;
    padding: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
}

.edit-btn {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.edit-btn:hover {
    background: var(--primary) !important;
    color: white !important;
}

.delete-btn {
    color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.delete-btn:hover {
    background: var(--danger) !important;
    color: white !important;
}

.action-btn i {
    width: 16px !important;
    height: 16px !important;
}

.actions-column {
    width: 120px !important;
    text-align: center !important;
}

.actions-cell {
    text-align: center !important;
    vertical-align: middle !important;
}
/* CRITICAL FIX FOR ACTION BUTTONS */
.table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 0 0 12px 12px;
}

.action-buttons {
    display: flex !important;
    gap: 8px !important;
    justify-content: center !important;
    align-items: center !important;
}

.action-btn {
    background: none !important;
    border: 1px solid var(--gray-300) !important;
    border-radius: 6px !important;
    padding: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
}

.edit-btn {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.edit-btn:hover {
    background: var(--primary) !important;
    color: white !important;
}

.delete-btn {
    color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.delete-btn:hover {
    background: var(--danger) !important;
    color: white !important;
}

.action-btn i {
    width: 16px !important;
    height: 16px !important;
}

.actions-column {
    width: 120px !important;
    text-align: center !important;
}

.actions-cell {
    text-align: center !important;
    vertical-align: middle !important;
}

 / *   I n v o i c e   I t e m s   T a b l e   U n i t   C o l u m n   S t y l i n g   * / 
 . i t e m s - t a b l e   . u n i t - c o l   { 
         m i n - w i d t h :   8 0 p x ; 
         w i d t h :   8 0 p x ; 
 } 
 
 . i t e m s - t a b l e   . u n i t   { 
         b a c k g r o u n d :   # f 8 f a f c ; 
         b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
         b o r d e r - r a d i u s :   4 p x ; 
         f o n t - s i z e :   0 . 8 5 r e m ; 
         t e x t - a l i g n :   c e n t e r ; 
         c o l o r :   # 3 7 4 1 5 1 ; 
         f o n t - w e i g h t :   5 0 0 ; 
 } 
 
 . i t e m s - t a b l e   . u n i t : f o c u s   { 
         b a c k g r o u n d :   w h i t e ; 
         b o r d e r - c o l o r :   # 3 b 8 2 f 6 ; 
         b o x - s h a d o w :   0   0   0   2 p x   r g b a ( 5 9 ,   1 3 0 ,   2 4 6 ,   0 . 1 ) ; 
 } 
 
 / *   U n i t   f i e l d   r e s p o n s i v e   s t y l i n g   * / 
 @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
         . i t e m s - t a b l e   . u n i t - c o l   { 
                 m i n - w i d t h :   6 0 p x ; 
                 w i d t h :   6 0 p x ; 
         } 
         
         . i t e m s - t a b l e   . u n i t   { 
                 f o n t - s i z e :   0 . 8 r e m ; 
                 p a d d i n g :   0 . 4 r e m   0 . 3 r e m ; 
         } 
 } 
  
 /* Invoice Items Table Unit Column Styling */
.items-table .unit-col {
    min-width: 80px;
    width: 80px;
}

.items-table .unit {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
    color: #374151;
    font-weight: 500;
    padding: 0.5rem 0.25rem;
}

.items-table .unit:focus {
    background: white;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Unit field responsive styling */
@media (max-width: 768px) {
    .items-table .unit-col {
        min-width: 60px;
        width: 60px;
    }
    
    .items-table .unit {
        font-size: 0.8rem;
        padding: 0.4rem 0.3rem;
    }
}
