/* Modern Dashboard Styles */
:root {
    --primary-color: #4f46e5;
    --secondary-color: #818cf8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --background-light: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-light);
    color: var(--text-primary);
    min-height: 100vh;
}

.main-content {
    margin-left: 16.666667%;  /* Equivalent to col-md-2 */
    padding: 2rem;
    min-height: 100vh;
    background-color: var(--background-light);
}

/* Dashboard Cards */
.dashboard-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: none;
    padding: 1.5rem;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Tables */
.table-modern {
    width: 100%;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.table-modern thead {
    background-color: var(--primary-color);
    color: white;
}

.table-modern th {
    padding: 1rem;
    font-weight: 600;
}

.table-modern td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.table-modern tbody tr:hover {
    background-color: lightgreen;
}

/* Buttons */
.btn-modern {
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-modern-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.btn-modern-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Forms */
.form-modern {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Invoice Form Styles */
.invoice-form {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.invoice-form-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.invoice-form-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.invoice-number {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: right;
}

.company-info {
    border-right: 2px solid rgba(255,255,255,0.3);
    padding-right: 2rem;
}

.invoice-details {
    padding-left: 2rem;
}

.invoice-form-body {
    padding: 2rem;
}

.customer-section {
    background: var(--background-light);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.items-section {
    margin-bottom: 2rem;
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.item-row {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.item-row:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.form-control-modern {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: white;
}

/* Line Items Styles */
.line-items {
    margin: 2rem 0;
}

.line-items-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 1fr auto;
    gap: 1rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.line-item-row {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: center;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.line-item-row:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.line-item-cell {
    padding: 0.5rem;
}

.totals-section {
    background: var(--background-light);
    border-radius: 10px;
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    margin-top: 2rem;
    width: 300px;
    margin-left: auto;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
    font-size: 1rem;
}

.total-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
    padding-top: 1rem;
}

.invoice-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.cancel-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    background: white;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: var(--background-light);
}

.save-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.add-item-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.add-item-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.remove-item-btn {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-item-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.form-control-modern:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Navigation */
.navbar-modern {
    background: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.sidebar {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    min-height: 100%;
    position: fixed;
    width: inherit;
    max-width: inherit;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.sidebar-modern .nav-link:hover,
.sidebar-modern .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* Status Badges */
.badge-modern {
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.875rem;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: white;
}

.badge-danger {
    background-color: var(--danger-color);
    color: white;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Statistics */
.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-card p {
    opacity: 0.9;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-card {
        margin-bottom: 1rem;
    }
    
    .sidebar-modern {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: all 0.3s ease;
    }
    
    .sidebar-modern.show {
        left: 0;
    }
}
