/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4361ee;
    --secondary: #3a0ca3;
    --success: #2ec4b6;
    --danger: #ef476f;
    --warning: #ffbc42;
    --info: #118ab2;
    --dark: #073b4c;
    --light: #f8f9fa;
    --gray: #6c757d;
    --light-gray: #f1f3f5;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s ease;
}

/* Badge Styles */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    text-align: center;
}

.badge-info {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
}

.badge-success {
    background: rgba(76, 201, 240, 0.1);
    color: #0d9488;
}

.badge-danger {
    background: rgba(247, 37, 133, 0.1);
    color: var(--danger);
}

.badge-warning {
    background: rgba(248, 150, 30, 0.1);
    color: var(--warning);
}

.badge-secondary {
    background: rgba(108, 117, 125, 0.1);
    color: var(--gray);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    /* Prevent horizontal scroll at body level */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Login Page Styles */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    max-width: 400px;
    width: 100%;
}

.logo-section {
    padding: 30px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.logo {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    border-radius: 50%;
    background: #ffffff;
    padding: 5px;
    object-fit: cover;
}

.logo-section h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.logo-section p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.login-form {
    padding: 30px;
}

.auth-form {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dynamic Product Fields Styles */
#dynamicFields {
    margin-bottom: 1.5rem;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #edf2f7;
}

.dynamic-fields-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.dynamic-fields-row .form-group {
    margin-bottom: 0;
}

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.spec-item {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.form-group label i {
    color: var(--primary);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #edf2f7;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #f8fafc;
    color: var(--dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 40px;
    cursor: pointer;
    color: var(--gray);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.input-with-action {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-with-action input {
    flex: 1;
}

.btn-narrow {
    padding: 6px 12px !important;
    font-size: 0.85rem !important;
    gap: 4px !important;
}

/* Carousel Preview Grid */
.carousel-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.carousel-preview-item {
    position: relative;
    aspect-ratio: 16/9;
    background: #eee;
    border-radius: 8px;
    overflow: hidden;
}

.carousel-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-carousel-item {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(239, 71, 111, 0.8);
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-carousel-btn {
    width: 120px;
    height: 80px;
    border: 2px dashed var(--primary);
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--primary);
}

.add-carousel-btn i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.add-carousel-btn::after {
    content: 'Add Image';
    font-size: 0.75rem;
    font-weight: 600;
}

.add-carousel-btn:hover {
    background: #e9ecef;
    transform: scale(1.05);
}

/* Theme Selector */
.theme-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.theme-card {
    background: white;
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.theme-card:hover {
    border-color: #ddd;
    transform: translateY(-2px);
}

.theme-card.active {
    border-color: var(--primary);
    background: rgba(15, 100, 37, 0.05);
}

.theme-preview {
    width: 100%;
    height: 60px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.theme-card span {
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-info:hover {
    background: #3a0ca3;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #38b000;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #d00000;
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #e85d04;
    transform: translateY(-2px);
}

.btn:hover {
    transform: none !important;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* Standardized Mobile Friendly Buttons */
.btn-action {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    min-width: 100px;
}

@media (max-width: 768px) {
    .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .btn-action {
        min-width: 80px;
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .quick-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .quick-actions .btn {
        width: 100%;
    }
}

.version-info {
    margin-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray);
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 9999;
    display: none;
}

.loading.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    margin-bottom: 20px;
}



.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 600;
    box-shadow: var(--box-shadow);
    z-index: 9998;
    display: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    background: var(--success);
}

.notification.error {
    background: var(--danger);
}

.notification.warning {
    background: var(--warning);
}

/* 
=======================================================
                 SUPER ADMIN CSS
======================================================= 
*/

/* Add these styles to your existing style.css file */

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--dark);
    color: white;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: var(--transition);
    z-index: 9999;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    margin-top: 10px;
    font-size: 0.9rem;
}

.user-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.user-role {
    opacity: 0.8;
    font-size: 0.8rem;
}

.nav-links {
    list-style: none;
}

.nav-links li {
    margin-bottom: 5px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left: 4px solid var(--primary);
}

.nav-links a i {
    width: 20px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    background: var(--light-gray);
    min-height: 100vh;
    overflow-x: hidden;
    /* Prevent content from stretching and causing scroll */
}

.navbar {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-left h3 {
    color: var(--dark);
    margin: 0;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pos-date-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.pos-time {
    font-family: 'Courier New', Courier, monospace;
    /* Digital look */
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

.pos-date {
    font-size: 0.75rem;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.user-menu:hover {
    background: var(--light-gray);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-fullname {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-email {
    font-size: 0.8rem;
    color: var(--gray);
}

.content {
    padding: 30px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--dark);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Page Sections */
.page-section {
    display: none;
}

.page-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Welcome Section */
.welcome-section {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    box-shadow: var(--box-shadow);
}

.welcome-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.welcome-section h2 {
    color: var(--dark);
    margin-bottom: 5px;
    font-size: 1.5rem;
}

.welcome-section p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* Time Filter */
.time-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-icon {
    position: absolute;
    left: 12px;
    color: var(--primary);
    font-size: 0.9rem;
    pointer-events: none;
}

.filter-select {
    padding-left: 35px !important;
    height: 38px;
    min-width: 160px;
    background: var(--light-gray);
    border: none !important;
    font-weight: 500;
}

.custom-date-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.date-input {
    height: 38px;
    padding: 0 10px !important;
    min-width: 120px !important;
    font-size: 0.85rem !important;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

/* Bulk Action Bar */
.bulk-action-bar {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(7, 59, 76, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 30px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bulk-action-bar.active {
    bottom: 30px;
}

.bulk-info {
    font-weight: 600;
    font-size: 0.95rem;
}

#selectedCount {
    background: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 5px;
}

.bulk-buttons {
    display: flex;
    gap: 10px;
}

.selected-row {
    background-color: rgba(67, 97, 238, 0.08) !important;
}

.selected-row td {
    border-bottom: 1px solid rgba(67, 97, 238, 0.2);
}

.product-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.stat-card.highlight {
    background: linear-gradient(135deg, white 0%, #f0f4ff 100%);
    border: 2px solid rgba(67, 97, 238, 0.1);
}

.stat-card.highlight .value {
    color: var(--primary);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.sales {
    background: var(--success);
}

.stat-icon.profit {
    background: var(--primary);
}

.stat-icon.credit {
    background: var(--warning);
}

.stat-icon.expense {
    background: var(--danger);
}

.stat-icon.warning {
    background: var(--warning);
}

.stat-icon.info {
    background: var(--info);
}

.stat-icon.danger {
    background: var(--danger);
}

.stat-icon.success {
    background: var(--success);
}


.stat-info h3 {
    font-size: 1rem;
    color: var(--gray);
    margin-bottom: 5px;
}

.stat-info .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.stat-info .change {
    font-size: 0.9rem;
    margin-top: 5px;
}

.profit-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.online-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #2ecc71;
    border-radius: 50%;
    margin-left: 8px;
    box-shadow: 0 0 5px rgba(46, 204, 113, 0.6);
    vertical-align: middle;
}

.change.positive {
    color: var(--success);
}

.change.negative {
    color: var(--danger);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* Tables */
.table-container {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.table-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--light-gray);
}

.table-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-actions {
    display: flex;
    gap: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--light-gray);
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid var(--light-gray);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
}

tbody tr:hover {
    background: rgba(67, 97, 238, 0.05);
}

.text-center {
    text-align: center;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Filter Options */
.filter-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

/* Form Controls */
.form-control {
    padding: 10px 15px;
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    min-width: 150px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.form-check-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--gray);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(76, 201, 240, 0.2);
    color: var(--success);
}

.badge-warning {
    background: rgba(248, 150, 30, 0.2);
    color: var(--warning);
}

.badge-danger {
    background: rgba(247, 37, 133, 0.2);
    color: var(--danger);
}

.badge-info {
    background: rgba(72, 149, 239, 0.2);
    color: var(--info);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
}

.btn-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-edit {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
}

.btn-edit:hover {
    background: var(--primary);
    color: white;
}

.btn-delete {
    background: rgba(247, 37, 133, 0.1);
    color: var(--danger);
}

.btn-delete:hover {
    background: var(--danger);
    color: white;
}

.btn-view {
    background: rgba(76, 201, 240, 0.1);
    color: var(--success);
}

.btn-view:hover {
    background: var(--success);
    color: white;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 20px;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 24px 30px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #f8fafc, white);
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

.close-modal:not(.btn) {
    background: #ff6060;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--gray);
    transition: all 0.2s ease;
}

.close-modal:not(.btn):hover {
    background: #e2e8f0;
    color: var(--dark);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8fafc;
    border-radius: 0 0 20px 20px;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 100%;
        z-index: 1000;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .navbar-left h3 {
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        flex-direction: column;
    }

    .quick-actions .btn {
        width: 100%;
    }

    .filter-options {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box,
    .form-control {
        width: 100%;
    }

    .table-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .table-actions {
        justify-content: flex-start;
    }

    table {
        display: block;
        overflow-x: auto;
    }

    /* Mobile Modal Enhancements */
    .modal-content {
        max-width: 100%;
        margin: 10px;
        max-height: 95vh;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        flex-direction: column-reverse;
        padding: 15px 20px;
        gap: 8px;
    }

    .modal-footer .btn {
        width: 100% !important;
        margin: 0 !important;
        min-width: 0 !important;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }
}

/* Additional Colors */
.btn-secondary {
    background: var(--gray);
    color: white;
}

.btn-secondary:hover {
    background: var(--dark);
    color: white;
}

/* Status Colors */
.status-active {
    color: var(--success);
    font-weight: 600;
}

.status-inactive {
    color: var(--danger);
    font-weight: 600;
}

/* Utility Classes for Dynamic Borders */
.border-success {
    border-color: var(--success) !important;
}

.border-danger {
    border-color: var(--danger) !important;
}

/* Modal specific button adjustments */
.modal-footer .btn {
    min-width: 120px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.modal-footer .btn:active {
    transform: scale(0.98);
}

/* Shop Logo in Table */
.shop-logo-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-gray);
}

/* Loading Animation for Buttons */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
}


/* 
=======================================================
                 SHOP OWNER DASHBORD
======================================================= 
*/

/* Chart Row */
.chart-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    width: 100%;
}

.chart-header {
    margin-bottom: 20px;
}

.chart-header h4 {
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Top Products List */
.top-products-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.product-item:hover {
    background: rgba(67, 97, 238, 0.1);
}

.product-item .rank {
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.product-item .product-name {
    flex: 1;
    font-weight: 500;
}

.product-item .sold-count {
    color: var(--success);
    font-weight: 600;
    background: rgba(76, 201, 240, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Badge Colors */
.badge-danger {
    background: rgba(247, 37, 133, 0.2);
    color: var(--danger);
}

.badge-warning {
    background: rgba(248, 150, 30, 0.2);
    color: var(--warning);
}

.badge-success {
    background: rgba(76, 201, 240, 0.2);
    color: var(--success);
}

/* Shop Info in Sidebar */
.shop-info {
    margin-top: 10px;
    font-size: 0.9rem;
}

/* Responsive Design for Charts */
@media (max-width: 992px) {
    .chart-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .chart-row {
        grid-template-columns: 1fr !important;
        width: 100%;
        overflow: hidden;
    }

    .chart-container,
    .chart-container-modern {
        padding: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        flex-direction: column;
    }

    .quick-actions .btn {
        width: 100%;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: var(--gray);
}

.empty-state i {
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: 5px;
    font-size: 1rem;
}

.empty-state small {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Dashboard Deletion Styles */
.delete-top-product,
.delete-recent-sale {
    opacity: 0.6;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: none;
    background: rgba(239, 71, 111, 0.1);
    color: var(--danger);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.delete-top-product:hover,
.delete-recent-sale:hover {
    opacity: 1;
    transform: scale(1.1) rotate(5deg);
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 71, 111, 0.3);
}

.delete-top-product {
    margin-left: 10px;
    flex-shrink: 0;
}

/* 
=======================================================
                 SHOP PAGES DESIGNS
======================================================= 
*/

/* POS Page Specific */
.pos-page .pos-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.pos-page .product-grid-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.pos-page .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* POS Product Card - Flipkart Style Redesign */
.pos-page .product-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    /* More rectangular like Flipkart */
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: none;
    cursor: pointer;
}

.pos-page .product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #d0d0d0;
}

.pos-page .product-image-container {
    width: 100%;
    height: 180px;
    /* Taller image like Flipkart */
    position: relative;
    padding: 10px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-page .product-img-pos {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.pos-page .product-card:hover .product-img-pos {
    transform: scale(1.05);
}

.out-of-stock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    color: #e53935;
    padding: 5px 15px;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 2px;
    border: 1px solid #e53935;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pos-page .product-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid #f0f0f0;
    flex-grow: 1;
}

.product-category-type {
    font-size: 0.75rem;
    color: #878787;
    margin-bottom: 2px;
    text-transform: capitalize;
}

.pos-page .product-name {
    font-size: 0.9rem;
    color: #212121;
    font-weight: 400;
    margin-bottom: 4px;
    line-height: 1.2;
    height: 2.4em;
    /* Max 2 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-sku {
    font-size: 0.7rem;
    color: #9e9e9e;
    font-family: monospace;
}

.product-meta {
    margin: 5px 0;
}

.stock-status {
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stock-status.in-stock {
    color: #388e3c;
}

.stock-status.low-stock {
    color: #f57c00;
}

.stock-status.out-of-stock {
    color: #d32f2f;
}

.product-price-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
}

.pos-page .product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #212121;
}

.pos-page .add-to-cart-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 2px;
    background: #2874f0;
    /* Flipkart Blue */
    border: none;
    color: white;
    box-shadow: none;
}

.pos-page .add-to-cart-btn:hover {
    background: #1455c5;
    transform: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.pos-page .add-to-cart-btn:disabled {
    background: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
}

/* Stock Section Header Badge */
.product-count {
    display: flex;
    gap: 10px;
    align-items: center;
}

.count-badge,
.stock-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.count-badge {
    background: #f1f3f5;
    color: #495057;
}

.stock-badge {
    background: #e7f5ff;
    color: #1971c2;
    border: 1px solid #a5d8ff;
}

.pos-page .cart-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
}

.pos-page .cart-items {
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
    margin-bottom: 20px;
}

.pos-page .cart-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--light-gray);
}

/* Inventory Page Specific */
.inventory-page .inventory-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.inventory-page .stat-card .stat-icon.warning {
    background: var(--warning);
}

.inventory-page .stat-card .stat-icon.danger {
    background: var(--danger);
}

.inventory-page .stat-card .stat-icon.success {
    background: var(--success);
}

/* Sales Page Specific */
.sales-page .filter-section {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    box-shadow: var(--box-shadow);
}

.sales-page .date-filters {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.sales-page .date-input {
    flex: 1;
    min-width: 150px;
}

.sales-page .quick-filters {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.sales-page .sales-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.sales-page .chart-section {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.sales-page .chart-container {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.sales-page .chart-container:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* Credit Page Specific */
.credit-page .credit-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.credit-page .call-history {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-top: 20px;
    box-shadow: var(--box-shadow);
}

.expenses-page .expenses-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.expenses-page .summary-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.expenses-page .summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.expenses-page .summary-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.expenses-page .summary-card.danger {
    border-left: 4px solid var(--danger);
}

.expenses-page .summary-card.danger .summary-icon {
    background: rgba(239, 71, 111, 0.1);
    color: var(--danger);
}

.expenses-page .summary-card.warning {
    border-left: 4px solid var(--warning);
}

.expenses-page .summary-card.warning .summary-icon {
    background: rgba(255, 188, 66, 0.1);
    color: var(--warning);
}

.expenses-page .summary-card.success {
    border-left: 4px solid var(--success);
}

.expenses-page .summary-card.success .summary-icon {
    background: rgba(46, 196, 182, 0.1);
    color: var(--success);
}

.expenses-page .summary-card.info {
    border-left: 4px solid var(--info);
}

.expenses-page .summary-card.info .summary-icon {
    background: rgba(17, 138, 178, 0.1);
    color: var(--info);
}

.expenses-page .summary-info h3 {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 5px;
}

.expenses-page .summary-info .value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark);
}

.expenses-page .summary-info .period {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Expenses Chart */
.expenses-page .expense-chart {
    margin-bottom: 25px;
}

.expenses-page .chart-container {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Users Page Specific */
.users-page .users-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.users-page .permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

/* Settings Page Specific */
.settings-page .settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.settings-page .tab-btn {
    padding: 10px 20px;
    border: none;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.settings-page .tab-btn.active {
    background: var(--primary);
    color: white;
}

.settings-page .tab-content {
    display: none;
}

.settings-page .tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.settings-page .settings-card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.settings-page .logo-upload {
    display: flex;
    gap: 20px;
    align-items: center;
}

.settings-page .logo-preview img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--light-gray);
}

.settings-page .backup-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.settings-page .backup-card {
    background: var(--light);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--light-gray);
}

/* ======================================
   MOBILE CART ICON STYLES
   ====================================== */

/* Mobile Cart Toggle Button - Hidden on desktop */
.mobile-cart-toggle {
    display: none;
    position: relative;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.3);
}

.mobile-cart-toggle:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

.mobile-cart-toggle:active {
    transform: scale(0.95);
}

.mobile-cart-toggle i {
    font-size: 1.2rem;
}

/* Cart Count Badge */
.cart-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid white;
    animation: badgePulse 0.3s ease;
}

.cart-count-badge.active {
    display: flex;
}

@keyframes badgePulse {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Professional Cart Styling */
.price-changed-badge {
    display: inline-block;
    background: #ffd43b;
    color: #856404;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 6px;
    margin-left: 5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pos-page .cart-section {
    background: #fdfdfd;
    border: 1px solid #eef0f2;
}

.pos-page .cart-header {
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f3f5;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-close-btn {
    display: none;
    background: #f1f3f5;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #495057;
    cursor: pointer;
}

.pos-page .cart-header h4 {
    color: #1a1d23;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {

    /* Show mobile cart toggle button */
    .mobile-cart-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .pos-date-time {
        gap: 0;
    }

    .pos-time {
        font-size: 0.95rem;
    }

    .pos-date {
        font-size: 0.65rem;
    }

    /* POS Layout - Stack on mobile */
    .pos-page .pos-layout {
        grid-template-columns: 1fr;
        position: relative;
    }

    /* Cart Section - Hidden by default on mobile */
    .pos-page .cart-section.mobile-collapsible {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        /* Full width on smallest screens */
        max-width: 400px;
        height: 100vh;
        z-index: 999;
        background: white;
        box-shadow: -4px 0 15px rgba(0, 0, 0, 0.2);
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
        border-radius: 0;
        /* Remove radius for full screen effect */
    }

    .mobile-close-btn {
        display: flex;
    }

    .pos-page .cart-header {
        padding: 15px;
        margin: 0;
        background: white;
        position: sticky;
        top: 0;
        z-index: 10;
        border-bottom: 1px solid #eee;
    }

    /* Cart Section - Visible when active */
    .pos-page .cart-section.mobile-collapsible.active {
        right: 0;
    }

    /* Cart Backdrop - Show when cart is open */
    .cart-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .cart-backdrop.active {
        display: block;
        opacity: 1;
    }

    /* Product Grid - Full width on mobile */
    .pos-page .product-grid-section {
        width: 100%;
    }

    .sales-page .chart-section {
        grid-template-columns: 1fr;
    }

    .settings-page .logo-upload {
        flex-direction: column;
        align-items: flex-start;
    }

    .date-filters {
        flex-direction: column;
    }

    .date-input {
        width: 100%;
    }
}



/* Empty Cart State */
.empty-cart {
    padding: 40px 20px;
    text-align: center;
    color: #868e96;
}

.empty-cart-icon {
    width: 60px;
    height: 60px;
    background: #f1f3f5;
    color: #adb5bd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 15px;
}

.empty-cart h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 5px;
}

.empty-cart p {
    font-size: 0.9rem;
    margin: 0;
}

/* Cart Items */
.cart-item {
    background: white;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #eef0f2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.cart-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.08);
}

.cart-item-actions {
    display: flex;
    gap: 8px;
}

.cart-item-actions .btn {
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 0.75rem;
    border-radius: 6px;
}

.cart-item-info {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
    align-items: center;
}

.cart-item-name strong {
    display: block;
    color: #2d3436;
    font-size: 0.95rem;
}

.cart-item-name small {
    color: #636e72;
    font-size: 0.8rem;
}

.cart-quantity {
    width: 60px;
    height: 32px;
    padding: 4px;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #2d3436;
}

/* Payment Selection Grid */
.payment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.payment-card {
    position: relative;
    cursor: pointer;
}

.payment-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.payment-card .card-content {
    background: white;
    border: 2px solid #eef0f2;
    border-radius: 12px;
    padding: 12px 5px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.payment-card .card-content i {
    font-size: 1.2rem;
    color: #636e72;
}

.payment-card .card-content span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #636e72;
}

.payment-card:hover .card-content {
    border-color: #dee2e6;
    background: #f8f9fa;
}

.payment-card input:checked+.card-content {
    background: rgba(67, 97, 238, 0.05);
    border-color: var(--primary);
}

.payment-card input:checked+.card-content i,
.payment-card input:checked+.card-content span {
    color: var(--primary);
}

/* POS Action Grid */
.pos-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.pos-actions-grid .btn-lg {
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.25);
}

.secondary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.secondary-actions .btn {
    padding: 12px;
    border-radius: 10px;
    border: 2px solid #eef0f2;
    background: white;
    color: #636e72;
    font-weight: 600;
}

.secondary-actions .btn:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.btn-outline-secondary:hover {
    color: #2d3436;
}

.btn-outline-info:hover {
    color: var(--info);
    border-color: var(--info);
}

/* Pricing Summary Styling */
.cart-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 15px;
    margin: 15px 0;
    border: 1px solid #eef0f2;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: #636e72;
    font-size: 0.95rem;
}

.summary-row.total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px dashed #dee2e6;
    color: #1a1d23;
    font-weight: 800;
    font-size: 1.2rem;
}

.summary-row.total span:last-child {
    color: var(--primary);
}

.discount-input {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    padding: 4px 8px;
}

.discount-input input {
    border: none;
    width: 60px;
    text-align: right;
    font-weight: 600;
    outline: none;
}

.discount-input span {
    margin-left: 4px;
    color: #b2bec3;
    font-weight: 600;
}

/* Quick Price Modal */
.modal-content .form-row {
    display: flex;
    gap: 10px;
    margin: 0;
}

.modal-content .form-row .form-group {
    flex: 1;
    margin: 0;
}

/* Invoice Styles */
.invoice-items small.text-warning {
    display: block;
    font-size: 0.8rem;
    color: var(--warning);
    font-style: italic;
}

/* Add this CSS to your stylesheet */
/* Chart & Data Visualization Styles */
.chart-container-modern {
    background: white;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.chart-wrapper {
    position: relative;
    height: 350px;
    width: 100%;
    margin: 0 auto;
}

/* Base Responsive Grid Utilities */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -12px;
    margin-left: -12px;
}

.col-12 {
    width: 100%;
    padding: 0 12px;
}

.col-4 {
    width: 33.333%;
    padding: 0 12px;
}

.col-6 {
    width: 50%;
    padding: 0 12px;
}

.col-md-6 {
    width: 50%;
    padding: 0 12px;
}

.col-md-4 {
    width: 33.333%;
    padding: 0 12px;
}

.col-md-3 {
    width: 25%;
    padding: 0 12px;
}

@media (max-width: 768px) {

    .col-md-6,
    .col-md-4,
    .col-md-3,
    .col-4,
    .col-6 {
        width: 100% !important;
    }

    .chart-wrapper {
        height: 280px !important;
    }
}

/* ======================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ====================================== */

/* Mobile Menu Toggle - Show on mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    /* Sidebar - Hidden by default on mobile */
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Main content - Full width on mobile */
    .main-content {
        margin-left: 0;
    }

    /* Stats grid - Single column on small screens */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Buttons - Full width and better spacing */
    .btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .btn-sm {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .quick-actions .btn {
        width: 100%;
        margin-bottom: 5px;
    }

    /* Form controls - Better mobile sizing */
    .form-control,
    select,
    input,
    textarea {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    /* Date filter dropdown  - Full width on mobile */
    #dateFilterSelect {
        max-width: 100% !important;
        width: 100%;
    }

    /* Filter options - Stack vertically */
    .filter-options>div {
        flex-direction: column;
        width: 100%;
    }

    .filter-options label {
        width: 100%;
        margin-bottom: 8px;
    }

    /* Tables - Responsive scrolling */
    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 600px;
    }

    /* Modal - Full width on mobile */
    .modal-content {
        max-width: 95%;
        margin: 10px;
    }

    /* Form rows - Single column */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Section header - Stack vertically */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .section-header .btn {
        width: 100%;
    }

    /* Table header - Stack vertically */
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .table-actions {
        width: 100%;
        flex-direction: column;
    }

    .table-actions .btn {
        width: 100%;
    }

    /* User menu - Hide email on very small screens */
    .user-email {
        display: none;
    }

    /* Navbar - Better spacing */
    .navbar {
        padding: 10px 15px;
    }

    .navbar-left h3 {
        font-size: 1rem;
    }

    /* Content padding - Reduce on mobile */
    .content {
        padding: 15px;
    }

    /* Welcome section - Reduce padding */
    .welcome-section {
        padding: 20px;
    }

    .welcome-section h2 {
        font-size: 1.4rem;
    }

    /* Stat card - Better mobile layout */
    .stat-card {
        padding: 15px;
        gap: 15px;
    }

    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .stat-info h3 {
        font-size: 0.9rem;
    }

    .stat-info .value {
        font-size: 1.4rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {

    /* Further reduce padding */
    .content {
        padding: 10px;
        overflow-x: hidden;
    }

    .navbar {
        padding: 10px;
    }

    .welcome-section {
        padding: 15px;
    }

    .welcome-section h2 {
        font-size: 1.2rem;
    }

    .welcome-section p {
        font-size: 0.9rem;
    }

    /* Stat cards - Even smaller on very small screens */
    .stat-card {
        padding: 12px;
        gap: 10px;
    }

    /* Charts extra small fixes */
    .chart-container,
    .chart-container-modern {
        padding: 10px;
        border-radius: 12px;
    }

    .chart-wrapper {
        height: 250px !important;
    }

    .stat-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .stat-info h3 {
        font-size: 0.85rem;
    }

    .stat-info .value {
        font-size: 1.2rem;
    }

    /* Button text - Smaller */
    .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .btn-sm {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    /* Modal - Even smaller margin */
    .modal-content {
        margin: 5px;
        padding-bottom: 20px;
    }
}

/* ======================================
   PREMIUM PRODUCT MODAL REDESIGN
   ====================================== */
#productModal .modal-content {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background: #ffffff;
    /* overflow-y: auto; Removed for flex layout */
}

#productModal .modal-header {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white !important;
    padding: 25px 30px;
    border: none;
}

#productModal .modal-header h3 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: white !important;
}

#productModal .modal-header h3 i {
    color: rgba(255, 255, 255, 0.8);
}

#productModal .close-modal {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s;
}

#productModal .close-modal:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

#productModal .modal-body {
    padding: 30px;
}

#productModal .form-group label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#productModal .form-group label i {
    color: #4361ee;
    font-size: 0.9rem;
}

#productModal .form-group input,
#productModal .form-group select,
#productModal .form-group textarea {
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #f8fafc;
    width: 100%;
}

#productModal .form-group input:focus,
#productModal .form-group select:focus {
    border-color: #4361ee;
    background: white;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
    outline: none;
}

/* SKU Input Group */
.sku-input-group {
    display: flex;
    gap: 10px;
}

.sku-input-group input {
    flex: 1;
    text-transform: uppercase;
    font-weight: 700 !important;
    letter-spacing: 1px;
    color: #1a202c !important;
    background: #f1f5f9 !important;
}

.btn-generate {
    background: #edf2f7;
    color: #4361ee;
    border: none;
    border-radius: 12px;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.btn-generate:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    color: #3f37c9;
}

#productModal .modal-footer {
    padding: 20px 30px 30px;
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

#productModal #saveProductBtn {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    border: none;
    padding: 12px 25px;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 4px 14px 0 rgba(67, 97, 238, 0.39);
    color: white;
}

#productModal #saveProductBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.23);
    background: linear-gradient(135deg, #4895ef 0%, #4361ee 100%);
}

#productModal .btn-secondary {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    color: #4a5568;
    border-radius: 12px;
    padding: 12px 25px;
}

#productModal .btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e0;
}

/* Photo Upload Styling */
.photo-upload-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.photo-preview {
    width: 100%;
    height: 150px;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
    color: #718096;
    overflow: hidden;
    position: relative;
}

.photo-preview:hover {
    border-color: #4361ee;
    background: #f1f5f9;
    color: #4361ee;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.photo-preview i {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.photo-actions {
    display: flex;
    justify-content: flex-end;
}

/* Global Product Image Styles */
.product-img-inventory {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.product-img-pos {
    width: 100%;
    height: 140px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 15px;
}

.product-img-cart {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
    flex-shrink: 0;
}

/* Update Flex layouts for items with images */
.product-info-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.cart-item-info {
    flex: 1;
}

/* Sales Report Table Product List */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 280px;
}

.product-item-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    transition: all 0.2s;
}

.product-item-mini:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.product-thumb-sm {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    background: white;
    flex-shrink: 0;
}

.product-info-mini {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.product-name-mini {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.product-meta-mini {
    font-size: 0.75rem;
    color: var(--gray);
    display: block;
}

.custom-sale-placeholder {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(67, 97, 238, 0.05);
    border: 1px dashed var(--primary);
    border-radius: 6px;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.custom-sale-placeholder i {
    font-size: 1.1rem;
}

/* Modern Sale Details UI */
.sale-details-modern {
    color: var(--dark);
}

.extra-small {
    font-size: 0.7rem;
}

.ls-1 {
    letter-spacing: 1px;
}

.fs-7 {
    font-size: 0.85rem;
}

.profit-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.profit-up {
    background: #d1fae5;
    color: #065f46;
}

.profit-down {
    background: #fee2e2;
    color: #991b1b;
}

.price-steps {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--gray);
}

.step-label {
    color: #adb5bd;
}

.step-separator {
    color: #dee2e6;
    margin: 0 2px;
}

.step-value {
    color: #495057;
}

.info-card-modern {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.rounded-3 {
    border-radius: 12px !important;
}

.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}


/* Modern Utility Classes for Sale Details & General Layout */
.gap-3 {
    gap: 1rem !important;
}

.p-3 {
    padding: 1rem !important;
}

.pt-2 {
    padding-top: 0.5rem !important;
}

.pt-3 {
    padding-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.my-2 {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.bg-white {
    background-color: #fff !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.rounded-3 {
    border-radius: 12px !important;
}

.rounded-pill {
    border-radius: 50rem !important;
}

.border {
    border: 1px solid #dee2e6 !important;
}

.border-top {
    border-top: 1px solid #dee2e6 !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.flex-grow-1 {
    flex-grow: 1 !important;
}

.text-center {
    text-align: center !important;
}

.text-end {
    text-align: right !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.text-uppercase {
    text-transform: uppercase !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-info {
    color: var(--info) !important;
}

.text-muted {
    color: var(--gray) !important;
}

.fs-7 {
    font-size: 0.85rem !important;
}

.h5 {
    font-size: 1.25rem !important;
}

.opacity-10 {
    opacity: 0.1 !important;
}


/* Fix for long invoice numbers and text overflow */
.info-card-modern .fw-bold {
    word-break: break-all;
    overflow-wrap: anywhere;
    line-height: 1.2;
}

.sale-item-modern .product-img-wrapper img {
    background-color: #f1f3f5;
    padding: 5px;
}

.credit-badge-modern {
    background: #fff3bf;
    color: #e67700;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #ffd43b;
}

.paid-amount {
    color: #2f9e44;
}

.pending-amount {
    color: #e03131;
}


/* Additional styles for Credit Summary in Sale Details */
.bg-success-light {
    background-color: #ebfbee !important;
    color: #2b8a3e !important;
    border: 1px solid #c3fae8;
}

.bg-danger-light {
    background-color: #fff5f5 !important;
    color: #c92a2a !important;
    border: 1px solid #ffe3e3;
}

.rounded-pill {
    border-radius: 50rem !important;
}


/* Responsive Split Card for Mobile */
@media (max-width: 576px) {
    .credit-split-card {
        flex-direction: column;
    }

    .credit-side:first-child::after {
        display: none;
    }

    .credit-side {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
}


/* Modern Credit Summary Split Card */
.credit-split-card {
    display: flex;
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.credit-side {
    flex: 1;
    padding: 10px 15px;
    text-align: center;
    position: relative;
}

.credit-side.paid {
    background: #ebfbee;
}

.credit-side.pending {
    background: #fff5f5;
}

.credit-side:first-child::after {
    content: "";
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(0, 0, 0, 0.05);
}

.credit-label-sm {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    color: #868e96;
}

.credit-value-lg {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
}

.text-success-dark {
    color: #2b8a3e;
}

.text-danger-dark {
    color: #c92a2a;
}

.product-img-inventory {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
}

/* Final Mobile Responsive Tweaks */
@media (max-width: 992px) {

    .sales-page .chart-section,
    .pos-layout,
    .dashboard .chart-row {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

@media (max-width: 768px) {
    .navbar-right .pos-date-time {
        display: none;
        /* Hide time on small phones to save space */
    }

    .chart-container-modern {
        padding: 15px;
    }

    .table-container {
        margin: 0;
        border-radius: 4px;
        overflow-x: auto;
        /* Ensure tables scroll horizontally */
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .table-container table {
        min-width: 600px;
        /* Force scroll for wide tables */
    }
}


/* Sale Details & Invoice Mobile Refinements */
@media (max-width: 576px) {
    .sale-item-modern .d-flex.align-items-center {
        flex-direction: column;
        align-items: flex-start !important;
        padding: 12px !important;
    }

    .sale-item-modern .product-img-wrapper {
        margin-bottom: 12px;
        width: 60px !important;
        height: 60px !important;
    }

    .sale-item-modern .flex-grow-1 {
        width: 100%;
    }

    .sale-item-modern .d-flex.justify-content-between.align-items-start {
        flex-direction: column;
        gap: 8px;
    }

    .sale-item-modern .text-end {
        text-align: left !important;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .sale-item-modern .price-steps {
        flex-wrap: wrap;
        gap: 2px 8px;
    }

    .customer-info-modern .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .customer-info-modern .credit-split-card {
        margin-top: 15px;
        width: 100%;
    }
}


@media (max-width: 480px) {
    .mob-column {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .item-badges {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 5px;
    }

    .margin-label {
        margin-top: 0 !important;
    }

    .sale-details-modern .row.g-3>div {
        width: 100% !important;
    }
}


/* Invoice Modal Mobile Fixes */
@media (max-width: 576px) {
    .invoice {
        padding: 5px;
    }

    .invoice-header h3 {
        font-size: 1.2rem;
    }

    .invoice-items th,
    .invoice-items td {
        padding: 8px 4px;
        font-size: 0.8rem;
    }

    .invoice-totals {
        width: 100% !important;
    }
}


@media (max-width: 576px) {
    #saleDetailsModal .modal-content {
        padding: 15px 10px;
    }

    #saleDetailsModal .modal-body {
        padding: 10px 5px;
    }
}