@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --navbar-height: 70px;
    --bg-main: #f8fafc;
    --bg-navbar: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
    --navbar-text: #94a3b8;
    --navbar-text-hover: #ffffff;
    --border-color: #cbd5e1;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --transition-speed: 0.3s;

    /* Elegant Gradients */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --primary-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --danger-gradient: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

    /* Elegant Shadows */
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03), 0 10px 15px -3px rgba(0, 0, 0, 0.03);
    --card-shadow-hover: 0 15px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
}

html,
body {
    font-family: 'Cairo', sans-serif !important;
    background-color: var(--bg-main) !important;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
span,
p,
a,
button,
label,
input,
select,
textarea,
td,
th {
    font-family: 'Cairo', sans-serif !important;
}

a,
.btn-link {
    color: #6366f1;
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: #8b5cf6;
}

.btn-primary {
    color: #fff;
    background: var(--primary-gradient);
    border: none;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    background: var(--primary-gradient-hover);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #10b981;
}

.invalid {
    outline: 1px solid #ef4444;
}

.validation-message {
    color: #ef4444;
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjctxNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyYjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljg4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
    text-align: start;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====== PREMIUM GLASS DESIGN SYSTEM ====== */

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    margin-bottom: 2rem;
    animation: fadeIn 0.4s ease-out;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

/* Modern Page Header */
.page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-align: right;
}

.page-header h2,
.page-header h3 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Custom Table Layout */
.custom-table-container {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--card-shadow);
}

.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.6rem;
    margin: 0;
}

.custom-table th {
    color: var(--text-dark);
    font-weight: 700;
    padding: 1rem;
    border-bottom: 2px solid #e2e8f0;
    text-align: right;
    font-size: 0.9rem;
}

.custom-table tr {
    background: #ffffff;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.custom-table tr:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

.custom-table td {
    padding: 1.2rem 1rem;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-dark);
    font-size: 0.92rem;
    vertical-align: middle;
}

.custom-table td:first-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    border-right: 1px solid #f1f5f9;
}

.custom-table td:last-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    border-left: 1px solid #f1f5f9;
}

/* Premium Buttons */
.btn-premium {
    background: var(--primary-gradient);
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.6rem;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-premium:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(99, 102, 241, 0.3);
}

.btn-premium-success {
    background: var(--success-gradient);
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.6rem;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-premium-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(16, 185, 129, 0.3);
}

.btn-premium-danger {
    background: var(--danger-gradient);
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.6rem;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 6px -1px rgba(244, 63, 94, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-premium-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(244, 63, 94, 0.3);
}

.btn-premium-secondary {
    background: #ffffff;
    color: var(--text-dark) !important;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.65rem 1.6rem;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-premium-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Premium Inputs */
.premium-input {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-dark);
    border-radius: 10px;
    padding: 0.75rem 1.2rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    width: 100%;
}

.premium-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
    outline: none;
    background: #ffffff;
}

/* Status Badges */
.premium-badge {
    padding: 0.4rem 1.1rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.premium-badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.premium-badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.premium-badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.premium-badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: var(--kpi-color, #3b82f6);
}

.kpi-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
}

.kpi-value small {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* ====== GLOBAL MOBILE RESPONSIVENESS ====== */
@media (max-width: 768px) {
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 0;
    }

    table {
        white-space: nowrap;
    }

    body {
        font-size: 14px;
    }

    .container,
    .container-fluid {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    .card-body,
    .glass-card {
        padding: 0.75rem !important;
        border-radius: 12px !important;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    input.form-control:not(.luxury-input-inline),
    .pos-input,
    .premium-input {
        width: 100% !important;
        max-width: 100% !important;
    }

    .form-select {
        width: auto;
    }

    .page-header h2,
    h3 {
        font-size: 1.35rem !important;
    }

    .page-header {
        padding-bottom: 0.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    .btn-premium,
    .btn-premium-success,
    .btn-premium-danger,
    .btn-premium-secondary {
        width: 100%;
        margin-bottom: 10px;
    }

    .kpi-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
}

/* ========================================= */
/* DASHBOARD LAYOUT STYLES                   */
/* ========================================= */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
    overflow-x: hidden;
    max-width: 100%;
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-right: 260px;
    /* Sidebar width in RTL */
    transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    max-width: 100%;
}

.main-wrapper.expanded {
    margin-right: 70px;
}

/* Header */
.top-header {
    height: 70px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.menu-toggle-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Search Box */
.search-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 0.4rem 1rem;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.search-box:focus-within {
    background: #fff;
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.1);
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    font-size: 0.9rem;
    color: #334155;
    width: 200px;
}

.search-box i {
    color: #94a3b8;
}

/* Icon Buttons */
.icon-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.25rem;
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.badge-indicator {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-right: 0.5rem;
    border-right: 1px solid #e2e8f0;
    cursor: pointer;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.user-info .name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}

.user-info .role {
    font-size: 0.75rem;
    color: #64748b;
}

/* Main Content */
.app-content {
    flex: 1;
    padding: 2rem;
    overflow-x: hidden;
}

.content-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Utilize full screen width for all pages */
.app-content .container {
    max-width: 100% !important;
    width: 100% !important;
}

/* Footer */
.app-footer {
    padding: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

@media (max-width: 768px) {
    .main-wrapper {
        margin-right: 0 !important;
    }

    .top-header {
        height: 60px;
        padding: 0 0.85rem;
    }

    .header-left,
    .header-right {
        gap: 0.5rem;
    }

    .user-profile {
        gap: 0.35rem;
        padding-right: 0;
        border-right: none;
    }

    .avatar {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .app-content {
        padding: 0.75rem 0.5rem;
        padding-bottom: 110px !important;
        /* Prevent horizontal overflow across all pages */
        overflow-x: hidden;
    }

    .app-footer {
        padding-bottom: 100px !important;
    }

    /* ── Global card overflow fix ── */
    .glass-card,
    .card-glass,
    .card {
        overflow: hidden;
        word-break: break-word;
    }

    /* ── Prevent any element from overflowing body width ── */
    body {
        overflow-x: hidden;
    }

    /* ── Fix flex children from stretching beyond parent ── */
    .d-flex > * {
        min-width: 0;
    }

    /* ── Docs header responsive ── */
    .docs-header,
    .docs-header-cyan {
        padding: 1rem !important;
    }

    .docs-header h3,
    .docs-header-cyan h3,
    .docs-header h4,
    .docs-header-cyan h4 {
        font-size: 1.1rem !important;
    }

    /* ── Stat boxes responsive ── */
    .stat-box {
        padding: 1rem !important;
    }

    .stat-box h3 {
        font-size: 1.4rem !important;
    }

    /* ── Table in mobile: allow horizontal scroll ── */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
}

/* ========================================= */
/* ELEGANT MOBILE BOTTOM NAVIGATION BAR       */
/* ========================================= */

.mobile-bottom-nav {
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    z-index: 1050;
    pointer-events: none;
}

.mobile-bottom-nav .nav-container {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 6px;
    max-width: 500px;
    margin: 0 auto;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Nav Tab Items */
.mobile-bottom-nav .nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    background: none;
    border: none;
    padding: 4px 6px;
    flex: 1;
    position: relative;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav .tab-icon {
    font-size: 1.25rem;
    position: relative;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-bottom-nav .icon-solid {
    display: none;
}

.mobile-bottom-nav .icon-outline {
    display: block;
}

.mobile-bottom-nav .tab-label {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 2px;
    white-space: nowrap;
    transition: color 0.25s ease;
}

/* Active State */
.mobile-bottom-nav .nav-tab.active {
    color: #a78bfa;
}

.mobile-bottom-nav .nav-tab.active .tab-icon {
    transform: translateY(-2px) scale(1.15);
    color: #a78bfa;
    filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.6));
}

.mobile-bottom-nav .nav-tab.active .icon-solid {
    display: block;
}

.mobile-bottom-nav .nav-tab.active .icon-outline {
    display: none;
}

.mobile-bottom-nav .nav-tab.active .tab-label {
    color: #ffffff;
    font-weight: 700;
}

/* Active Indicator Pill */
.mobile-bottom-nav .nav-tab.active::after {
    content: '';
    position: absolute;
    top: 2px;
    width: 16px;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #a78bfa);
    border-radius: 99px;
    box-shadow: 0 0 8px #a78bfa;
}

/* Center Action Button (Plus / New Invoice) */
.mobile-bottom-nav .action-tab {
    position: relative;
    top: -14px;
    overflow: visible;
}

.mobile-bottom-nav .action-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.45), 0 0 0 5px rgba(15, 23, 42, 0.92);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-bottom-nav .action-tab:hover .action-circle,
.mobile-bottom-nav .action-tab:active .action-circle {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 25px rgba(139, 92, 246, 0.6), 0 0 0 5px rgba(15, 23, 42, 0.92);
}

.mobile-bottom-nav .action-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-top: 2px;
}

.mobile-bottom-nav .action-tab.active::after {
    display: none;
}

/* Sidebar Overlay Backdrop for Mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1080;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Sidebar Drawer */
@media (max-width: 768px) {
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 1200 !important; /* Higher than .sidebar-overlay (1080) and .mobile-bottom-nav (1050) */
        transform: translateX(100%) !important; /* Hidden off-screen on the right */
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: -6px 0 25px rgba(0, 0, 0, 0.5) !important;
        display: flex !important;
        flex-direction: column !important;
        visibility: visible !important;
    }

    .sidebar.mobile-open,
    .sidebar.open {
        transform: translateX(0) !important; /* Slide in smoothly on mobile when opened */
    }
}

/* ==========================================================================
   LUXURY DESIGN SYSTEM FOR HOME, LOGIN, AND STORE PAGES
   ========================================================================== */

/* Page Ambient Background */
.luxury-page-bg {
    background: #f8fafc radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    min-height: 100vh;
}

/* Glassmorphism Components */
.glass-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 0 15px rgba(99, 102, 241, 0.03);
    border-radius: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.15);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Modern Gradient Buttons */
.btn-gradient-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff !important;
    border: none;
    font-weight: 700;
    border-radius: 0.85rem;
    box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.4);
    transition: all 0.3s ease;
}

.btn-gradient-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -4px rgba(79, 70, 229, 0.5);
}

.btn-gradient-primary:active {
    transform: translateY(0);
}

.btn-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    border: none;
    font-weight: 700;
    border-radius: 0.85rem;
    box-shadow: 0 8px 20px -4px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
}

.btn-gradient-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -4px rgba(16, 185, 129, 0.5);
}

.btn-gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff !important;
    border: none;
    font-weight: 700;
    border-radius: 0.85rem;
    box-shadow: 0 8px 20px -4px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
}

.btn-gradient-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -4px rgba(245, 158, 11, 0.5);
}

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, #4f46e5 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.gradient-text-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Modern Input Controls */
.luxury-input {
    border: 1.5px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 0.8rem 1.1rem;
    font-size: 0.95rem;
    background-color: rgba(255, 255, 255, 0.9);
    transition: all 0.25s ease;
}

.luxury-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    background-color: #ffffff;
    outline: none;
}

/* RTL Select Dropdown Arrow Alignment */
[dir="rtl"] select.form-select,
[dir="rtl"] select.luxury-input,
[dir="rtl"] .form-select {
    background-position: left 0.85rem center !important;
    padding-left: 2.4rem !important;
    padding-right: 1rem !important;
    text-align: right !important;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.15rem;
    transition: color 0.25s ease;
}

[dir="rtl"] .input-icon-wrapper i {
    right: 1.1rem;
}

[dir="ltr"] .input-icon-wrapper i {
    left: 1.1rem;
}

[dir="rtl"] .input-icon-wrapper .form-control {
    padding-right: 3rem;
}

[dir="ltr"] .input-icon-wrapper .form-control {
    padding-left: 3rem;
}

.input-icon-wrapper .form-control:focus+i,
.input-icon-wrapper:focus-within i {
    color: #6366f1;
}

/* Floating Badges */
.badge-glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 0.4rem 0.9rem;
    border-radius: 50rem;
    font-weight: 600;
}

/* LOGIN PAGE STYLES */
.login-hero-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 15% 15%, rgba(79, 70, 229, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.12) 0%, transparent 45%),
        #0f172a;
    padding: 2rem 1rem;
}

.login-card-container {
    width: 100%;
    max-width: 1050px;
    border-radius: 1.75rem;
    overflow: hidden;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
}

.login-visual-side {
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    min-height: 520px;
}

.login-visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.92) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem;
}

.login-feature-chip {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50rem;
    padding: 0.5rem 1.1rem;
    font-size: 0.85rem;
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.login-form-side {
    background: #ffffff;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* HOME STOREFRONT STYLES */
.front-navbar {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: all 0.3s ease;
}

.hero-section-v2 {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    min-height: 480px;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.2);
    margin-bottom: 3.5rem;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    object-fit: cover;
    filter: brightness(0.65) saturate(1.1);
    transform: scale(1.02);
    transition: transform 10s ease;
}

.hero-section-v2:hover .hero-bg-img {
    transform: scale(1.06);
}

.hero-overlay-v2 {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.4) 60%, rgba(79, 70, 229, 0.5) 100%);
}

.hero-content-box {
    position: relative;
    z-index: 2;
    padding: 4rem 3rem;
    color: #ffffff;
    max-width: 750px;
}

.category-pill {
    padding: 0.6rem 1.4rem;
    border-radius: 50rem;
    background: #ffffff;
    color: #475569;
    border: 1.5px solid #e2e8f0;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.category-pill:hover {
    border-color: #6366f1;
    color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.category-pill.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.4);
}

/* LUXURY PRODUCT CARD */
.product-card-v2 {
    background: #ffffff;
    border-radius: 1.25rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-v2:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 35px -10px rgba(79, 70, 229, 0.15);
}

.product-img-wrapper {
    position: relative;
    height: 230px;
    overflow: hidden;
    background-color: #f8fafc;
}

.product-img-v2 {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card-v2:hover .product-img-v2 {
    transform: scale(1.08);
}

.product-badge-new {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.8rem;
    border-radius: 50rem;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.3);
    z-index: 2;
}

.product-badge-cat {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 0.5rem;
    z-index: 2;
}

.price-tag-v2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #4f46e5;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.price-currency {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}

/* Feature Cards */
.feature-box-v2 {
    background: #ffffff;
    border-radius: 1.25rem;
    padding: 1.5rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.04);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s ease;
}

.feature-box-v2:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.2);
}

.feature-icon-circle {
    width: 54px;
    height: 54px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* STORE EDIT DASHBOARD STYLES */
.store-preview-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 1.5rem;
    color: #ffffff;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 30px -10px rgba(15, 23, 42, 0.25);
}

.store-preview-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.upload-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 1.25rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-dropzone:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.03);
}

/* Animations */
@keyframes floatAnim {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.anim-float {
    animation: floatAnim 4s ease-in-out infinite;
}

/* Toast styling override */
.toast-custom {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* ========================================================== */
/* COMPREHENSIVE MOBILE RESOLUTION & RESPONSIVE ENGINE        */
/* ========================================================== */

@media (max-width: 768px) {

    /* 1. App Layout & Content Spacing */
    .app-content {
        padding: 0.75rem 0.5rem !important;
        padding-bottom: 95px !important;
        /* Mobile bottom nav space */
    }

    .container-fluid,
    .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .luxury-page-bg {
        padding-bottom: 2rem !important;
    }

    /* 2. Page Header Banners & Titles */
    .bg-dark.text-white.py-4,
    .store-preview-header,
    .receipt-header-banner,
    .sid-header,
    .bid-header {
        padding: 1.25rem 1rem !important;
        margin-bottom: 1rem !important;
        border-radius: 1rem !important;
    }

    .bg-dark .text-muted,
    .bg-dark p.text-muted {
        color: rgba(255, 255, 255, 0.75) !important;
    }

    .bg-dark.text-white.py-4 .container-fluid,
    .bg-dark.text-white.py-4 .container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        text-align: center;
    }

    .bg-dark.text-white.py-4 h2,
    .bg-dark.text-white.py-4 h3,
    .hero-content-box h1,
    h2.fw-bold,
    h3.fw-bold {
        font-size: 1.35rem !important;
        line-height: 1.3 !important;
    }

    .bg-dark.text-white.py-4 p,
    .hero-content-box p {
        font-size: 0.8rem !important;
    }

    .bg-dark.text-white.py-4 .btn,
    .store-preview-header .btn,
    .receipt-header-banner .btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.6rem 1rem !important;
        font-size: 0.9rem !important;
    }

    /* 3. Executive Stats Cards & Feature Cards */
    .glass-card,
    .feature-box-v2,
    .card {
        padding: 1rem 0.875rem !important;
        border-radius: 0.875rem !important;
    }

    /* Stat card icon wrappers only - DO NOT override general rounded-3 containers inside cards */
    .glass-card.p-3.d-flex.align-items-center > div:first-child.rounded-3,
    .glass-card.p-3.d-flex.align-items-center > div:first-child.rounded-circle,
    .feature-icon-circle {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        padding: 0.5rem !important;
        flex-shrink: 0 !important;
    }

    .glass-card .fs-3,
    .feature-icon-circle i {
        font-size: 1.25rem !important;
    }

    .glass-card h3 {
        font-size: 1.25rem !important;
    }

    .glass-card small {
        font-size: 0.75rem !important;
    }

    /* 4. Controls Bar, Search & Filters */
    .search-controls-bar,
    .controls-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }

    /* Prevent text squishing inside flex item containers */
    .d-flex>div,
    .d-flex>span {
        min-width: 0;
    }

    .d-flex>i,
    .d-flex>.rounded-circle,
    .d-flex>.badge {
        flex-shrink: 0 !important;
    }

    .input-icon-wrapper {
        max-width: 100% !important;
        width: 100% !important;
    }

    .form-control,
    .form-select,
    .luxury-input {
        font-size: 16px !important;
        /* Prevents auto-zoom on mobile browsers */
        min-height: 44px !important;
    }

    .btn-group.p-1 {
        display: inline-flex !important;
    }

    .btn-group.p-1 .btn {
        flex: 1 1 auto !important;
        text-align: center !important;
        white-space: nowrap !important;
    }

    /* 5. Responsive Tables & Action Buttons */
    .table-responsive {
        border-radius: 0.75rem !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin-bottom: 1rem !important;
    }

    .table-responsive table {
        font-size: 0.825rem !important;
        min-width: 580px;
    }

    .table-responsive th,
    .table-responsive td {
        padding: 0.6rem 0.5rem !important;
        vertical-align: middle !important;
    }

    .table-responsive .btn-sm {
        padding: 0.35rem 0.6rem !important;
        font-size: 0.75rem !important;
    }

    .table-responsive .badge {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
    }

    /* 6. Modals on Mobile */
    .modal-dialog {
        margin: 0.5rem !important;
        max-width: calc(100vw - 1rem) !important;
    }

    .modal-content {
        border-radius: 1.25rem !important;
    }

    .modal-body {
        padding: 1rem !important;
        max-height: 75vh !important;
        overflow-y: auto !important;
    }

    .modal-header,
    .modal-footer {
        padding: 0.875rem 1rem !important;
    }

    .modal-footer {
        flex-direction: column-reverse !important;
        gap: 0.5rem !important;
    }

    .modal-footer .btn {
        width: 100% !important;
        margin: 0 !important;
    }

    /* 7. Forms, Grid Layouts & Receipts */
    .receipt-page-container,
    .sid-container,
    .bid-container {
        margin: 0.5rem auto !important;
        padding: 0.5rem !important;
    }

    /* 8. POS Screen Mobile Tweaks */
    .pos-screen {
        flex-direction: column !important;
        height: auto !important;
        gap: 0.75rem !important;
    }

    .pos-left,
    .pos-right {
        width: 100% !important;
    }

    .numpad-grid {
        gap: 4px !important;
    }

    .np-btn {
        height: 44px !important;
        font-size: 1.1rem !important;
    }
}

@media (max-width: 576px) {

    .bg-dark.text-white.py-4 h2,
    .bg-dark.text-white.py-4 h3 {
        font-size: 1.2rem !important;
    }

    .table-responsive table {
        min-width: 520px;
    }
}

/* ========================================================== */
/* FORM CONTROLS, RADIO BUTTONS & SWITCH PRECISION LAYOUT     */
/* ========================================================== */

.form-check {
    display: flex !important;
    align-items: center !important;
    gap: 0.6rem !important;
    margin-bottom: 0.5rem;
    min-height: auto !important;
}

.form-check-input,
input[type="radio"].form-check-input,
input[type="checkbox"].form-check-input {
    width: 1.25rem !important;
    height: 1.25rem !important;
    max-width: 1.25rem !important;
    min-width: 1.25rem !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
    margin-bottom: 0 !important;
    font-size: 0.95rem;
}

.form-switch .form-check-input {
    width: 2.5rem !important;
    max-width: 2.5rem !important;
    height: 1.35rem !important;
    border-radius: 2rem !important;
}

@media (min-width: 992px) {
    .claims-list-wrapper {
        margin-top: 54px !important;
    }
}

@media (max-width: 991px) {
    .claims-list-wrapper {
        margin-top: 0 !important;
    }

    .save-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        padding: 1rem !important;
    }

    .save-bar-divider {
        width: 100% !important;
        height: 1px !important;
        margin: 0.25rem 0 !important;
    }

    .btn-save-invoice {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.75rem 1.5rem !important;
    }
}

/* ========================================================== */
/* STORE & STOREFRONT MOBILE OPTIMIZATION ENGINE              */
/* ========================================================== */

.floating-cart-btn-wrapper {
    bottom: 20px;
    left: 20px;
}

@media (max-width: 768px) {
    .floating-cart-btn-wrapper {
        bottom: 86px !important;
        left: 12px !important;
    }

    .hero-section-v2 {
        min-height: 360px !important;
        border-radius: 1.25rem !important;
        margin-bottom: 2rem !important;
    }

    .hero-content-box {
        padding: 2rem 1.25rem !important;
    }

    .hero-content-box h1.display-3 {
        font-size: 1.85rem !important;
        margin-bottom: 0.75rem !important;
    }

    .hero-content-box .d-flex.flex-wrap.gap-3 .btn {
        width: 100% !important;
        justify-content: center !important;
    }

    .feature-box-v2 {
        padding: 1rem 0.75rem !important;
        gap: 0.75rem !important;
        border-radius: 1rem !important;
    }

    .feature-icon-circle {
        width: 42px !important;
        height: 42px !important;
        font-size: 1.2rem !important;
    }

    .feature-box-v2 h6 {
        font-size: 0.85rem !important;
    }

    .feature-box-v2 small {
        font-size: 0.7rem !important;
    }
}

/* Global scrollbar hiding class */
.no-scrollbar {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.no-scrollbar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

@media (max-width: 767px) {
    .category-pills-bar {
        flex-wrap: wrap !important;
        overflow: visible !important;
        padding-bottom: 0.5rem !important;
    }

    .category-pill {
        padding: 0.4rem 0.85rem !important;
        font-size: 0.8rem !important;
        white-space: nowrap !important;
        flex-shrink: 0;
    }
}

/* ========================================================== */
/* GLOBAL MOBILE RESPONSIVE FIXES - ALL PAGES                 */
/* ========================================================== */

/* --- General Page Header Fix on Mobile --- */
@media (max-width: 576px) {

    /* Fix page title font size */
    h2.fw-bold.text-primary,
    h2.fw-bold {
        font-size: 1.25rem !important;
    }

    /* Fix "create" button full width and no text cut */
    .btn-lg {
        font-size: 0.9rem !important;
        padding: 0.6rem 1rem !important;
        white-space: normal !important;
        word-break: keep-all !important;
    }

    /* Make all action buttons smaller */
    .btn-sm {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.6rem !important;
    }

    /* Glass card padding on mobile */
    .glass-card {
        border-radius: 0.75rem !important;
        padding: 0.75rem !important;
    }

    /* Fix container padding */
    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

/* --- DATA TABLE: Hide heavy columns on mobile, show compact view --- */
@media (max-width: 767px) {

    /* Make all tables horizontally scrollable */
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Items table - hide units/prices and image columns on mobile */
    table.table th:nth-child(5),
    table.table td:nth-child(5),
    table.table th:nth-child(6),
    table.table td:nth-child(6) {
        display: none !important;
    }

    /* Compact table cells */
    table.table th,
    table.table td {
        padding: 0.5rem 0.4rem !important;
        font-size: 0.8rem !important;
        white-space: nowrap !important;
    }

    /* Keep name column wrappable */
    table.table td:nth-child(2) {
        white-space: normal !important;
        min-width: 100px !important;
        max-width: 150px !important;
    }

    /* Shrink action buttons in table */
    table.table .btn-group {
        display: flex;
        flex-direction: column;
        gap: 0.2rem !important;
    }

    table.table .btn-group .btn {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.4rem !important;
        border-radius: 0.35rem !important;
    }

    /* --- Invoice/Receipt pages table fixes --- */
    /* Hide less important columns */
    .table th.d-none-mobile,
    .table td.d-none-mobile {
        display: none !important;
    }

    /* --- Page header area on mobile --- */
    .d-flex.flex-column.flex-md-row {
        gap: 0.75rem !important;
    }

    /* Fix search bar width */
    .input-icon-wrapper {
        min-width: unset !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Fix view toggle buttons row */
    .btn-group.rounded-pill {
        width: 100%;
    }

    .btn-group.rounded-pill .btn {
        flex: 1;
    }

    /* Fix pagination on mobile */
    .pagination {
        flex-wrap: wrap !important;
        gap: 0.25rem !important;
    }

    .page-link {
        padding: 0.35rem 0.6rem !important;
        font-size: 0.8rem !important;
    }

    /* Fix form layouts inside modals and pages */
    .row.g-3>[class*="col-"] {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Fix badge display */
    .badge {
        font-size: 0.7rem !important;
    }
}

/* --- Specific fix: Items page "Create" button text overflow --- */
@media (max-width: 576px) {

    a[href="/itemcreate"],
    a[href="/saleinvoicecreate"],
    a[href="/buyinvoicecreate"],
    a[href="/itemcreate"] span {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 200px !important;
        display: inline-block !important;
    }

    /* Fix top header section */
    .d-flex.justify-content-between.align-items-md-center {
        align-items: flex-start !important;
    }

    /* Make create button full width on smallest screens */
    .btn.btn-primary.btn-lg.w-100 {
        max-width: 100% !important;
    }
}

/* --- Customers, Suppliers, Users list tables --- */
@media (max-width: 767px) {

    /* Hide address/email columns on small screens */
    .table th:nth-child(3):not(.keep-mobile),
    .table td:nth-child(3):not(.keep-mobile) {
        display: none !important;
    }

    .table th:nth-child(4):not(.keep-mobile),
    .table td:nth-child(4):not(.keep-mobile) {
        display: none !important;
    }
}

/* --- Sales & Purchase Invoice Pages Mobile Adjustments --- */
@media (max-width: 767px) {

    .sil-page,
    .bil-page {
        padding: 16px 10px !important;
    }

    .sil-header,
    .bil-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .sil-title,
    .bil-title {
        font-size: 20px !important;
    }

    .sil-title-icon,
    .bil-title-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }

    .btn-new-inv {
        width: 100% !important;
        justify-content: center !important;
        padding: 10px 16px !important;
        font-size: 14px !important;
    }

    .sil-stats,
    .bil-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .sil-stat,
    .bil-stat {
        padding: 12px 10px !important;
    }

    .sil-stat-val,
    .bil-stat-val {
        font-size: 16px !important;
    }
}

/* --- Input Icon Wrapper & Helper Classes --- */
.inset-0 {
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
}

.input-icon-wrapper {
    position: relative;
    width: 100%;
}

.input-icon-wrapper .form-control {
    padding-right: 2.75rem;
}

/* Store Edit Page & Global Mobile Nav Clearance Tweaks */
@media (max-width: 767px) {
    /* Items table: prevent horizontal overflow */
    .glass-card .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Prevent glass-card from causing page-level horizontal overflow */
    .glass-card {
        overflow: hidden;
        padding: 1rem !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Ensure content is never cut off or covered by the fixed mobile bottom navigation bar */
    body,
    .main-wrapper,
    .app-content,
    .content-container,
    .luxury-page-bg,
    .sil-page,
    .bil-page {
        padding-bottom: 120px !important;
    }

    /* Fix image preview height on mobile */
    .store-preview-img-box {
        height: 180px !important;
    }

    /* Min-width fix for flex children */
    .min-w-0 {
        min-width: 0 !important;
    }

    /* Status cards - prevent text overflow/overlap in flex containers */
    .store-status-card .d-flex.align-items-center {
        overflow: hidden !important;
    }

    .store-status-card .d-flex.align-items-center > div:last-child {
        min-width: 0 !important;
        flex: 1 1 0% !important;
        overflow: hidden !important;
    }

    .store-status-card .d-flex.align-items-center span,
    .store-status-card .d-flex.align-items-center small {
        display: block !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
    }

    /* Notice box - keep icon+title row intact */
    .glass-card .d-flex.align-items-center.gap-2.mb-2 {
        flex-wrap: nowrap !important;
    }

    /* Delete button - stay inside card */
    .glass-card .btn.w-100 {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ========================================================== */
/* CARD VIEW RESPONSIVE ENGINE (Suppliers, Customers, Users)  */
/* ========================================================== */
.supplier-card,
.customer-card,
.item-card {
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden !important;
}

.supplier-card:hover,
.customer-card:hover,
.item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08) !important;
}

.item-img-container {
    height: 180px;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid #e2e8f0;
}

.item-img-container img {
    transition: transform 0.3s ease;
}

.item-card:hover .item-img-container img {
    transform: scale(1.04);
}

.contact-info-box {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: unset !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
}

.contact-info-box .contact-item {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    min-width: 0 !important;
    width: 100% !important;
}

@media (max-width: 767px) {
    .supplier-card,
    .customer-card,
    .item-card {
        padding: 1rem !important;
        border-radius: 14px !important;
        margin-bottom: 0.75rem !important;
    }

    .contact-info-box {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
        gap: 0.5rem !important;
    }

    .supplier-avatar,
    .customer-avatar {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        font-size: 1.1rem !important;
    }
}