﻿/* Global Styles */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #f8961e;
    --info-color: #4895ef;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f0f2f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #2d3436;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #1e293b;
}

/* Navigation Enhancements */
.navbar {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    margin: 0 2px;
}

/* Dropdown Styling */
.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    padding: 0.5rem;
    min-width: 240px;
}

.dropdown-menu-lg {
    min-width: 320px;
}

.dropdown-header {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    padding: 0.75rem 1rem;
}

.dropdown-item {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .dropdown-item:hover {
        background-color: #f1f5f9;
        transform: translateX(5px);
    }

    .dropdown-item i {
        width: 24px;
        font-size: 1rem;
    }

/* Cards */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    }

.card-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-weight: 600;
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Stats Cards */
.stat-card {
    border-radius: 16px;
    padding: 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

    .stat-card::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: rgba(255,255,255,0.1);
        transform: rotate(45deg);
        transition: all 0.6s ease;
    }

    .stat-card:hover::before {
        transform: rotate(45deg) translate(20%, 20%);
    }

    .stat-card i {
        font-size: 2.5rem;
        opacity: 0.8;
        position: relative;
        z-index: 1;
    }

    .stat-card .stat-value {
        font-size: 2.2rem;
        font-weight: 700;
        margin-bottom: 0.25rem;
        position: relative;
        z-index: 1;
    }

    .stat-card .stat-label {
        font-size: 0.9rem;
        opacity: 0.9;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        position: relative;
        z-index: 1;
    }

    /* Stat Card Colors */
    .stat-card.primary {
        background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    }

    .stat-card.success {
        background: linear-gradient(135deg, #4cc9f0 0%, #4361ee 100%);
    }

    .stat-card.warning {
        background: linear-gradient(135deg, #f8961e 0%, #f3722c 100%);
    }

    .stat-card.info {
        background: linear-gradient(135deg, #4895ef 0%, #4cc9f0 100%);
    }

/* Tables */
.table {
    margin-bottom: 0;
}

    .table thead th {
        background-color: #f8fafc;
        border-bottom: 2px solid #e2e8f0;
        color: #475569;
        font-weight: 600;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 1rem;
    }

    .table td {
        padding: 1rem;
        vertical-align: middle;
        border-bottom: 1px solid #e9ecef;
    }

.table-hover tbody tr:hover {
    background-color: #f1f5f9;
    transition: background-color 0.2s ease;
}

/* Buttons */
.btn {
    border-radius: 10px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .btn::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255,255,255,0.5);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .btn:active::after {
        width: 300px;
        height: 300px;
    }

.btn-primary {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    border: none;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
    }

.btn-outline-primary {
    border: 2px solid #4361ee;
    color: #4361ee;
}

    .btn-outline-primary:hover {
        background: linear-gradient(135deg, #4361ee, #3a0ca3);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
    }

/* Forms */
.form-control, .form-select {
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

    .form-control:focus, .form-select:focus {
        border-color: #4361ee;
        box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
        outline: none;
    }

.form-label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Badges */
.badge {
    padding: 0.5rem 0.8rem;
    font-weight: 500;
    border-radius: 8px;
    font-size: 0.75rem;
}

.badge-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.badge-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

/* Breadcrumb */
.breadcrumb {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.breadcrumb-item a {
    color: #4361ee;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: #64748b;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.98));
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid rgba(0,0,0,0.05);
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 2px 0;
    }

    .stat-card {
        margin-bottom: 1rem;
    }

        .stat-card .stat-value {
            font-size: 1.8rem;
        }

    .card-body {
        padding: 1.25rem;
    }

    .quick-actions-bar {
        overflow-x: auto;
        white-space: nowrap;
        padding: 1rem;
    }

        .quick-actions-bar .btn {
            margin-bottom: 0;
        }
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn, .breadcrumb, .quick-actions-bar, .top-bar {
        display: none !important;
    }

    .main-content {
        padding: 0 !important;
        margin: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Invoice Specific */
.invoice-box {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.invoice-header {
    border-bottom: 3px solid #4361ee;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
}

.invoice-title {
    color: #4361ee;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -1px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    border-radius: 5px;
    transition: all 0.3s ease;
}

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #64748b, #475569);
    }

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.5s ease forwards;
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #4361ee, #3a0ca3);
    transition: width 0.6s ease;
}

/* Tooltips */
.tooltip {
    font-family: 'Inter', sans-serif;
}

.tooltip-inner {
    background: #1e293b;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
}

/* Modal Styling */
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1.5rem;
}

/* Chart Containers */
.chart-container {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

/* Dashboard Widgets */
.widget {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

    .widget:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    }

.widget-title {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.widget-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

/* Search Box */
.search-box {
    position: relative;
}

    .search-box i {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
    }

    .search-box input {
        padding-left: 2.5rem;
    }

/* Product Cards */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    }

.product-image {
    height: 200px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-details {
    padding: 1.5rem;
}

.product-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #4361ee;
}

/* Customer Avatar */
.customer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
}

/* Activity Timeline */
.timeline {
    position: relative;
    padding: 1rem 0;
}

    .timeline::before {
        content: '';
        position: absolute;
        left: 1rem;
        top: 0;
        bottom: 0;
        width: 2px;
        background: linear-gradient(to bottom, #4361ee, #3a0ca3);
        opacity: 0.2;
    }

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1.5rem;
}

    .timeline-item::before {
        content: '';
        position: absolute;
        left: 0.6rem;
        top: 0.25rem;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #4361ee;
        border: 2px solid white;
        box-shadow: 0 2px 8px rgba(67, 97, 238, 0.3);
    }

.timeline-time {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.timeline-content {
    font-weight: 500;
}


