/* ==========================================================================
   FontAwesome 5/6 Embedded Font Faces (Offline & Local Support)
   ========================================================================== */
@font-face {
    font-family: 'Font Awesome 5 Free';
    font-style: normal;
    font-weight: 900;
    font-display: block;
    src: url("/Assets/vendor/fontawesome/webfonts/fa-solid-900.woff2") format("woff2"),
         url("/Assets/vendor/fontawesome/webfonts/fa-solid-900.ttf") format("truetype");
}
@font-face {
    font-family: 'Font Awesome 5 Free';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url("/Assets/vendor/fontawesome/webfonts/fa-regular-400.woff2") format("woff2"),
         url("/Assets/vendor/fontawesome/webfonts/fa-regular-400.ttf") format("truetype");
}
@font-face {
    font-family: 'Font Awesome 5 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url("/Assets/vendor/fontawesome/webfonts/fa-brands-400.woff2") format("woff2"),
         url("/Assets/vendor/fontawesome/webfonts/fa-brands-400.ttf") format("truetype");
}

.fa, .fas, .far, .fal, .fad, .fab {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}
.fa, .fas {
    font-family: 'Font Awesome 5 Free' !important;
    font-weight: 900 !important;
}
.far {
    font-family: 'Font Awesome 5 Free' !important;
    font-weight: 400 !important;
}
.fab {
    font-family: 'Font Awesome 5 Brands' !important;
    font-weight: 400 !important;
}

/* ==========================================================================
   Smart Call Center ERP - Ultra-Modern Design System
   ========================================================================== */

:root {
    --cc-primary: #2563eb;
    --cc-primary-dark: #1d4ed8;
    --cc-primary-light: #eff6ff;
    --cc-secondary: #475569;
    --cc-success: #10b981;
    --cc-success-light: #ecfdf5;
    --cc-warning: #f59e0b;
    --cc-warning-light: #fffbeb;
    --cc-danger: #ef4444;
    --cc-danger-light: #fef2f2;
    --cc-info: #06b6d4;
    --cc-info-light: #ecfeff;
    --cc-dark: #0f172a;
    --cc-card-bg: #ffffff;
    --cc-body-bg: #f8fafc;
    --cc-border: #e2e8f0;
    --cc-border-focus: #93c5fd;
    --cc-radius-sm: 0.5rem;
    --cc-radius-md: 0.75rem;
    --cc-radius-lg: 1rem;
    --cc-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --cc-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --cc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --cc-shadow-glow: 0 0 15px rgba(37, 99, 235, 0.2);
}

* {
    box-sizing: border-box;
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

body.cc-app-body {
    background-color: var(--cc-body-bg);
    color: #1e293b;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-size: 0.92rem;
}

/* ==========================================================================
   Navbar Styling
   ========================================================================== */
.cc-navbar {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.cc-brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    border-radius: var(--cc-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.15rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.cc-brand-title {
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.cc-brand-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1;
}

.cc-nav-pill {
    color: #cbd5e1 !important;
    font-weight: 600;
    padding: 0.45rem 1rem !important;
    border-radius: var(--cc-radius-md);
    transition: all 0.2s ease;
}

.cc-nav-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
}

.cc-nav-pill.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(29, 78, 216, 0.9));
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.cc-live-clock {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #e2e8f0;
}

.cc-user-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.25rem 0.85rem 0.25rem 0.5rem;
    border-radius: 2rem;
}

.cc-user-avatar {
    width: 28px;
    height: 28px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.75rem;
}

.cc-btn-logout {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-weight: 700;
    border-radius: var(--cc-radius-md);
    transition: all 0.2s;
}

.cc-btn-logout:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

/* ==========================================================================
   3-Panel Layout
   ========================================================================== */
.cc-panel {
    background-color: var(--cc-card-bg);
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius-lg);
    box-shadow: var(--cc-shadow-sm);
    height: calc(100vh - 85px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.cc-panel:hover {
    box-shadow: var(--cc-shadow-md);
}

.cc-panel-header {
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid var(--cc-border);
    background: #ffffff;
    font-weight: 700;
    font-size: 0.98rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.cc-panel-body {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.cc-panel-footer {
    padding: 0.85rem 1.15rem;
    border-top: 1px solid var(--cc-border);
    background-color: #f8fafc;
    flex-shrink: 0;
}

/* Search Box */
.cc-search-box {
    position: relative;
}

.cc-search-box .form-control {
    border-radius: var(--cc-radius-md);
    padding: 0.65rem 2.75rem 0.65rem 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1.5px solid var(--cc-border);
    transition: all 0.2s;
}

.cc-search-box .form-control:focus {
    border-color: var(--cc-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.cc-search-box .search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.05rem;
}

/* Customer Card */
.cc-customer-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1.5px solid #bae6fd;
    border-radius: var(--cc-radius-md);
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--cc-shadow-sm);
}

.cc-customer-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 8px rgba(2, 132, 199, 0.3);
}

/* Smart Address Cards */
.address-card {
    border: 2px solid var(--cc-border);
    border-radius: var(--cc-radius-md);
    padding: 0.75rem 0.95rem;
    margin-bottom: 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    background-color: #ffffff;
}

.address-card:hover {
    border-color: var(--cc-primary);
    background-color: var(--cc-primary-light);
    transform: translateY(-1px);
}

.address-card.selected {
    border-color: var(--cc-primary);
    background-color: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.badge-default {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 2rem;
}

.badge-last {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 2rem;
}

/* Categories Bar (4 Equal Columns Grid with Sleek Design) */
.cc-categories-wrapper {
    background: #ffffff;
    border-bottom: 1.5px solid var(--cc-border);
    padding: 0.55rem 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.cc-categories-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    width: 100%;
}

@media (max-width: 992px) {
    .cc-categories-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.category-pill {
    width: 100%;
    min-height: 38px;
    padding: 0.38rem 0.55rem;
    border-radius: 0.6rem;
    font-weight: 700;
    font-size: 0.83rem;
    border: 1.2px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #475569;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    position: relative;
    user-select: none;
}

.category-pill i {
    font-size: 0.85rem;
    color: #3b82f6;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.category-pill .category-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    max-width: 100%;
}

.category-pill:hover {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #93c5fd;
    color: #1d4ed8;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 8px -1px rgba(37, 99, 235, 0.15);
}

.category-pill:hover i {
    color: #1d4ed8;
}

.category-pill.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #1e40af;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.32);
    transform: translateY(-1px);
}

.category-pill.active i {
    color: #ffffff !important;
}

.category-pill .badge-children {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.3rem;
    border-radius: 0.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

.category-pill.active .badge-children {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Breadcrumbs Styling */
#categoryBreadcrumbContainer {
    background: #f8fafc;
    border-radius: var(--cc-radius-sm);
    padding: 0.35rem 0.65rem;
}

#categoryBreadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0.35rem;
}

#categoryBreadcrumbs .breadcrumb-item a {
    color: var(--cc-primary);
    text-decoration: none;
    transition: color 0.15s;
}

#categoryBreadcrumbs .breadcrumb-item a:hover {
    color: var(--cc-primary-dark);
    text-decoration: underline;
}

#categoryBreadcrumbs .breadcrumb-item.active {
    color: #334155;
}

/* Product Item Cards */
.item-card {
    background-color: #ffffff;
    border: 1.5px solid var(--cc-border);
    border-radius: var(--cc-radius-md);
    padding: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
}

.item-card:hover {
    transform: translateY(-3px);
    border-color: var(--cc-primary);
    box-shadow: var(--cc-shadow-md);
}

.item-card .item-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.item-card .item-price {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--cc-success);
}

/* Segmented Toggle for Order Type */
.cc-toggle-group {
    display: flex;
    background-color: #e2e8f0;
    padding: 4px;
    border-radius: var(--cc-radius-md);
    margin-bottom: 1rem;
}

.cc-toggle-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 0.88rem;
    color: #64748b;
    border-radius: var(--cc-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.cc-toggle-btn.active {
    background-color: #ffffff;
    color: #0f172a;
    box-shadow: var(--cc-shadow-sm);
}

/* Cart Table & Rows */
.cart-item-row {
    border-bottom: 1px solid var(--cc-border);
    padding: 0.75rem 0;
    transition: background-color 0.15s;
}

.cart-item-row:hover {
    background-color: #f8fafc;
}

.cart-item-row:last-child {
    border-bottom: none;
}

.qty-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border-radius: var(--cc-radius-sm);
    border: 1px solid var(--cc-border);
    background-color: #ffffff;
    color: #0f172a;
    cursor: pointer;
    transition: all 0.15s;
}

.qty-btn:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.qty-input {
    width: 44px;
    height: 28px;
    text-align: center;
    font-weight: 700;
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius-sm);
    outline: none;
}

.qty-input:focus {
    border-color: var(--cc-primary);
}

/* Checkout Summary Breakdown */
.cc-summary-box {
    background: #f8fafc;
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius-md);
    padding: 0.85rem;
    margin-bottom: 0.85rem;
}

.cc-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
    color: #64748b;
    font-weight: 600;
}

.cc-summary-total {
    border-top: 1.5px dashed var(--cc-border);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}

.btn-submit-order {
    width: 100%;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: var(--cc-radius-md);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.05rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-submit-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
}

/* ==========================================================================
   Orders Board & KPI Cards
   ========================================================================== */
.kpi-card {
    background: #ffffff;
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius-lg);
    padding: 1.15rem;
    box-shadow: var(--cc-shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

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

.kpi-icon-box {
    width: 52px;
    height: 52px;
    border-radius: var(--cc-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.kpi-blue { background: #eff6ff; color: #2563eb; }
.kpi-amber { background: #fffbeb; color: #f59e0b; }
.kpi-emerald { background: #ecfdf5; color: #10b981; }
.kpi-rose { background: #fef2f2; color: #ef4444; }

.kpi-value {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
}

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

/* Status Badges */
.badge-order-sent {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-order-converted {
    background: #d1fae5;
    color: #047857;
    border: 1px solid #a7f3d0;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-order-cancelled {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-right: 2rem;
    list-style: none;
    margin: 1.5rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 5px;
    bottom: 5px;
    right: 9px;
    width: 2px;
    background-color: var(--cc-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: -2rem;
    top: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--cc-primary);
    border: 4px solid #ffffff;
    box-shadow: 0 0 0 2px var(--cc-primary);
}

.timeline-item.success::before {
    background-color: var(--cc-success);
    box-shadow: 0 0 0 2px var(--cc-success);
}

.timeline-item.danger::before {
    background-color: var(--cc-danger);
    box-shadow: 0 0 0 2px var(--cc-danger);
}

.timeline-content {
    background: #f8fafc;
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius-md);
    padding: 0.75rem 1rem;
}

/* Modals */
.modal-content {
    border-radius: var(--cc-radius-lg);
    border: 1px solid var(--cc-border);
    box-shadow: var(--cc-shadow-lg);
    overflow: hidden;
}

.modal-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--cc-border);
    padding: 1rem 1.25rem;
}

.modal-footer {
    background: #f8fafc;
    border-top: 1px solid var(--cc-border);
    padding: 0.85rem 1.25rem;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Preset Comments Grid & Chips (Item Notes Popup) */
.preset-comments-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding: 6px 4px;
    margin-bottom: 8px;
    scrollbar-width: thin;
}

.preset-comment-chip {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: right;
    gap: 6px;
    word-break: break-word;
    line-height: 1.3;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.preset-comment-chip i {
    font-size: 13px;
    color: var(--cc-primary);
}

.preset-comment-chip:hover {
    background: #e0e7ff;
    border-color: var(--cc-primary);
    color: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.preset-comment-chip:active {
    transform: scale(0.96);
    background: var(--cc-primary);
    color: #ffffff;
    border-color: #4338ca;
}

.preset-comment-chip:active i {
    color: #ffffff !important;
}

