/* MobiVault360 - Main Styles */

/* Import Bootstrap */
@import 'bootstrap/dist/css/bootstrap.min.css';

/* Import Font Awesome */
@import '@fortawesome/fontawesome-free/css/all.min.css';

/* Custom CSS Variables */
:root {
    /* Palette:
       Dark Blue: #124170
       Teal: #26667F
       Green: #67C090
       Mint: #DDF4E7
    */
    --mv-primary: #124170;
    --mv-primary-dark: #0e3359;
    --mv-secondary: #26667F;
    --mv-success: #67C090;
    --mv-danger: #ef4444;
    --mv-warning: #f59e0b;
    --mv-info: #26667F;
    --mv-light: #DDF4E7;
    --mv-dark: #124170;

    --mv-sidebar-width: 260px;
    --mv-sidebar-collapsed-width: 70px;
    --mv-header-height: 60px;

    --mv-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Styles */
body {
    font-family: var(--mv-font-family);
    background-color: #f0f7f4;
    /* Very light mint tint for body to avoid eye strain, defaulting to near white but tinted */
    color: var(--mv-dark);
}

/* Override Bootstrap Primary */
.btn-primary {
    background-color: var(--mv-primary);
    border-color: var(--mv-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--mv-primary-dark);
    border-color: var(--mv-primary-dark);
}

.bg-primary {
    background-color: var(--mv-primary) !important;
}

.text-primary {
    color: var(--mv-primary) !important;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.25rem;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--mv-sidebar-width);
    background: linear-gradient(180deg, var(--mv-dark) 0%, #0e3359 100%);
    color: #fff;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
}

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

.nav-item {
    margin: 0.25rem 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background-color: var(--mv-primary);
}

.nav-link i {
    width: 1.25rem;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: var(--mv-sidebar-width);
    min-height: 100vh;
    transition: all 0.3s ease;
}

.main-header {
    height: var(--mv-header-height);
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-body {
    padding: 1.5rem;
}

/* Page Header */
.page-header {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.breadcrumb {
    margin: 0;
    padding: 0;
    background: transparent;
}

/* Table Styles */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-top: none;
    background-color: #f9fafb;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mv-secondary);
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

/* Form Styles */
.form-control:focus,
.form-select:focus {
    border-color: var(--mv-primary);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--mv-dark);
    margin-bottom: 0.5rem;
}

/* Badge Styles */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* POS Specific Styles */
.pos-container {
    height: calc(100vh - var(--mv-header-height));
    display: flex;
}

.pos-products {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.pos-cart {
    width: 380px;
    background: #fff;
    border-left: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.pos-category-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.pos-category-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 0.5rem;
    font-weight: 500;
    color: var(--mv-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pos-category-tab:hover,
.pos-category-tab.active {
    background: var(--mv-primary);
    color: #fff;
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.pos-product-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pos-product-card:hover {
    border-color: var(--mv-primary);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.pos-product-name {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.pos-product-price {
    color: var(--mv-primary);
    font-weight: 600;
    font-size: 1rem;
}

.pos-cart-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.pos-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.pos-cart-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.pos-cart-footer {
    padding: 1rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.pos-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Stats Widget */
.stat-widget {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    color: var(--mv-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Alert Styles */
.alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-content {
        margin-left: 0;
    }

    .pos-cart {
        width: 320px;
    }
}

@media (max-width: 767.98px) {
    .pos-container {
        flex-direction: column;
    }

    .pos-cart {
        width: 100%;
        height: auto;
        max-height: 50vh;
    }
}

/* Print Styles */
@media print {

    .sidebar,
    .main-header,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .main-body {
        padding: 0;
    }
}