.thick-table-border {
  border-left: 2px solid black;
  border-right: 2px solid black;
  border-top: 2px solid black;
  border-bottom: 2px solid black;
}

.text-custom {
  color: #5fbeaa;
}

.pointer {
  cursor: pointer;
}



/*
Hide Arrows From Input Number
 */

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}


.hiddenimg {
  display: none;
}

.product-img:hover ~ .hiddenimg {
  display: block;
  position: absolute;
  z-index: 2
}

/*
  Sticky Table Header
*/
.fix-header {
  overflow: auto;
  height: 500px;
}

.fix-header thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}


/*
  End Sticky Table Header
*/


@media print {
  a {
    text-decoration: none !important;
    color: black !important;
  }
}



.customer-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 15px;
  color: white;
}
.payment-card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}
.history-card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}
.amount-badge {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 8px 20px;
  font-weight: 600;
}
.info-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.info-item:last-child {
  border-bottom: none;
}

.btn-payment {
  background: linear-gradient(135deg, #28a745, #20c997);
  border: none;
  border-radius: 10px;
  padding: 12px 30px;
  font-weight: 600;
  transition: all 0.3s ease;
}
.btn-payment:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

/* GRN Page Specific Styles */
.grn-page .po-item {
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}
.grn-page .po-item:hover {
  border-color: #007bff;
  background-color: #f8f9fa;
}
.grn-page .po-item.selected {
  border-color: #007bff;
  background-color: #e7f1ff;
  border-left: 4px solid #007bff;
}
.grn-page .po-list-scroll {
  max-height: 400px;
  overflow-y: auto;
}
.grn-page .qty-receive { background-color: #d4edda; }
.grn-page .qty-accept { background-color: #cce5ff; }
.grn-page .qty-reject { background-color: #f8d7da; }
.grn-page .payment-opt {
  cursor: pointer;
  transition: all 0.2s ease;
}
.grn-page .payment-opt:hover,
.grn-page .payment-opt.active {
  border-color: #007bff !important;
  background-color: #f0f7ff;
}


/* ==============================================
   Sale / Shop View Page
   ============================================== */

:root {
    --shop-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shop-teal:   linear-gradient(135deg, #36b5a0 0%, #2d8f7b 100%);
    --shop-green:  linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    --shop-red:    linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    --shop-border: #eef2f7;
    --shop-muted:  #e3e8ee;
}

/* Product Catalog Card */
.product-catalog-card {
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid var(--shop-border);
    overflow: hidden;
}

/* ==============================================
   Auth Login Page
   ============================================== */

html:has(.auth-login-page.erp-login-page),
body:has(.auth-login-page.erp-login-page) {
    overflow: hidden;
    height: 100%;
}

.auth-login-page.erp-login-page {
    position: relative;
    z-index: 0;
    isolation: isolate;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-login-page.erp-login-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('/images/bg_image.jpg') no-repeat center center fixed;
    background-size: cover;
    z-index: -2;
}

.auth-login-page.erp-login-page::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: -1;
}

.auth-login-page.erp-login-page .row {
    width: 100%;
}

.erp-login-page .login-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.erp-login-page .login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

.erp-login-page .login-header {
    text-align: center;
    margin-bottom: 36px;
}

.erp-login-page .login-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.erp-login-page .login-header p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 0;
}

.erp-login-page .form-group {
    margin-bottom: 20px;
}

.erp-login-page .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.erp-login-page .input-wrapper {
    position: relative;
}

.erp-login-page .input-wrapper svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: #9ca3af;
    pointer-events: none;
    transition: fill 0.2s;
}

.erp-login-page .form-control {
    width: 100%;
    height: auto;
    padding: 12px 14px 12px 44px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #1f2937;
    background: #f9fafb;
    transition: all 0.2s ease;
    box-shadow: none;
}

.erp-login-page .form-control:focus {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.erp-login-page .form-control:focus + svg {
    fill: #667eea;
}

.erp-login-page .form-control.is-invalid {
    border-color: #ef4444;
}

.erp-login-page .form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.erp-login-page .invalid-feedback {
    display: block;
    font-size: 12px;
    color: #ef4444;
    margin-top: 6px;
    font-weight: 500;
}

.erp-login-page .btn-login {
    width: 100%;
    padding: 13px 24px;
    margin-top: 8px;
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.erp-login-page .btn-login:hover,
.erp-login-page .btn-login:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.erp-login-page .login-reset-link {
    font-size: 13px;
    color: #5b6b8c;
    text-decoration: none;
}

.erp-login-page .login-reset-link:hover,
.erp-login-page .login-reset-link:focus {
    color: #667eea;
    text-decoration: underline;
}

.erp-login-page .footer-text {
    text-align: center;
    margin-top: 24px;
    margin-bottom: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 480px) {
    .erp-login-page .login-card {
        padding: 36px 24px;
    }
}
.product-catalog-header {
    background: var(--shop-teal);
    padding: 12px 16px;
}
.product-catalog-header .catalog-title {
    color: rgba(255,255,255,0.85);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}
.product-catalog-header .catalog-count {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

/* Product Search */
.product-search-wrap .input-group {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    border: 1px solid var(--shop-muted);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.product-search-wrap .input-group-text {
    border: none;
    background: #fff;
}
.product-search-wrap .form-control {
    border: none;
    font-size: 13px;
    box-shadow: none;
}
.product-search-wrap .form-control:focus {
    box-shadow: inset 0 0 0 1px #667eea;
    background: #fff;
}

/* Product Table */
#product_table {
    border-collapse: separate;
    border-spacing: 0;
}
#product_table thead th {
    background: #f8f9fb;
    border-bottom: 2px solid var(--shop-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    padding: 10px 12px;
    font-weight: 600;
}
#product_table tbody tr {
    transition: background 0.15s ease, transform 0.15s ease;
}
#product_table tbody tr:hover {
    background: #f0f4ff !important;
    transform: scale(1.002);
}
#product_table tbody tr.table-danger:hover {
    background: #fde8e8 !important;
}
#product_table tbody td {
    padding: 10px 12px;
    vertical-align: middle;
    border-color: #f0f2f5;
}
.product-price-tag {
    background: var(--shop-purple);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    display: inline-block;
}
.product-list-scroll {
    max-height: 65vh;
    overflow-y: auto;
    overflow-x: visible !important;
    -webkit-overflow-scrolling: touch;
}
.product-list-scroll::-webkit-scrollbar { width: 5px; }
.product-list-scroll::-webkit-scrollbar-thumb { background: #c5cdd8; border-radius: 10px; }
.product-list-scroll::-webkit-scrollbar-track { background: transparent; }

/* Cart Card */
.cart-card {
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid var(--shop-border);
    overflow: hidden;
}
.cart-card .nav-tabs { border-bottom: 2px solid var(--shop-border); }
.cart-card .nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 13px;
    color: #6c757d;
    padding: 10px 16px;
    transition: color 0.2s;
}
.cart-card .nav-tabs .nav-link:hover,
.cart-card .nav-tabs .nav-link.active { color: #667eea; }
.cart-card .nav-tabs .nav-link.active { border-bottom-color: #667eea; font-weight: 600; }

.cart-empty-state { padding: 40px 20px; }
.cart-empty-state i { font-size: 3.5rem; color: #d5dce6; }

/* Submit Footer */
.submit-order-footer {
    background: linear-gradient(180deg, #f8f9fa 0%, #f1f3f5 100%);
    border-top: 1px solid var(--shop-border);
    padding: 16px 20px;
    text-align: right;
}
.btn-submit-glow {
    background: var(--shop-green);
    border: none;
    color: #fff;
    border-radius: 10px;
    padding: 10px 28px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(26,188,156,0.3);
    transition: box-shadow 0.2s, transform 0.2s;
}
.btn-submit-glow:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(26,188,156,0.45);
    transform: translateY(-1px);
    color: #fff;
}
.btn-submit-glow:disabled,
.btn-submit-glow:disabled:hover,
.btn-submit-glow:disabled:focus {
  opacity: 0.5;
  cursor: not-allowed;
  color: #fff !important;
}

/* Shop-page Modal Polish (scoped to shop modals only) */
#set_product_quantity .modal-content,
#search_products .modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.modal-header.modal-header-gradient {
    background: var(--shop-purple);
    border: none;
    padding: 14px 20px;
}
.modal-header.modal-header-gradient .modal-title { font-size: 15px; }

/* Badges */
.badge-category {
    background: linear-gradient(135deg, #e8eaf6 0%, #e3f2fd 100%);
    color: #3f51b5;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}
.badge-discount {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

/* Stock Indicators */
.stock-available { color: #27ae60; font-weight: 600; }
.stock-out {
    background: #ffeaea;
    color: #e74c3c;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 11px;
}

/* Previous Product Table */
#previous_product_table {
    border-collapse: separate;
    border-spacing: 0;
}
#previous_product_table thead th {
    background: var(--shop-purple);
    color: #fff;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 10px 14px;
    border: none;
    font-weight: 600;
}
#previous_product_table tbody tr { transition: background 0.15s ease; }
#previous_product_table tbody tr:hover { background: #f5f3ff !important; }
#previous_product_table tbody tr:nth-child(even) { background: #fafbff; }
#previous_product_table tbody td {
    padding: 10px 14px;
    vertical-align: middle;
    border-color: #f0f2f5;
}
.prev-price-badge {
    background: linear-gradient(135deg, #e8eaf6 0%, #ede7f6 100%);
    color: #5c35a0;
    font-weight: 700;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}
.prev-qty-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.prev-qty-group .btn-qty {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 12px;
    border: none;
    transition: opacity 0.15s, transform 0.15s;
}
.prev-qty-group .btn-qty-dec { background: var(--shop-red); color: #fff; }
.prev-qty-group .btn-qty-inc { background: var(--shop-purple); color: #fff; }
.prev-qty-group .btn-qty:hover { opacity: 0.85; transform: scale(1.1); }
.prev-qty-group .qty-input {
    width: 56px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    border-radius: 8px;
    border: 2px solid var(--shop-muted);
    background: #f8f9fb;
    padding: 3px 6px;
    height: 30px;
}
.btn-prev-delete {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: var(--shop-red);
    border: none;
    color: #fff;
    transition: opacity 0.15s, transform 0.15s;
}
.btn-prev-delete:hover { opacity: 0.85; transform: scale(1.1); color: #fff; }
.prev-empty-state { padding: 40px 20px; }
.prev-empty-state i { font-size: 2.5rem; color: #d5dce6; }


/* ==============================================
   Shop Top Bar
   ============================================== */
.shop-topbar {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid var(--shop-border);
    padding: 10px 16px;
}
.shop-topbar-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.topbar-field {
    display: flex;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    gap: 8px;
}
.topbar-field-end {
    justify-content: flex-end;
}
.topbar-field-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, #eef0fb 0%, #f3e8ff 100%);
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.topbar-field-body {
    flex: 1 1 0;
    min-width: 0;
}
.topbar-field-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #98a6ad;
    font-weight: 600;
    margin-bottom: 1px;
    line-height: 1;
    white-space: nowrap;
}
.topbar-field-body .form-control {
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid var(--shop-muted);
    height: 32px;
    padding: 2px 8px;
}
.topbar-field-body .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102,126,234,0.12);
}
.topbar-divider {
    width: 1px;
    height: 36px;
    background: linear-gradient(180deg, transparent 0%, #dde2e8 50%, transparent 100%);
    flex-shrink: 0;
}

/* Topbar Buttons */
.topbar-btn {
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: opacity 0.15s, transform 0.15s;
}
.topbar-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.topbar-btn-primary {
    background: var(--shop-purple);
    color: #fff;
}
.topbar-btn-primary:hover { color: #fff; }
.topbar-btn-info {
    background: linear-gradient(135deg, #36b5a0 0%, #2d8f7b 100%);
    color: #fff;
}
.topbar-btn-info:hover { color: #fff; }
.topbar-btn-warning {
    background: linear-gradient(135deg, #f9c851 0%, #f0ad4e 100%);
    color: #fff;
}
.topbar-btn-warning:hover { color: #fff; }
.topbar-btn-group {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.topbar-btn-text {
    display: inline;
}

/* Responsive: stack on smaller screens */
@media (max-width: 991.98px) {
    .shop-topbar-inner {
        gap: 8px;
    }
    .topbar-field {
        flex: 1 1 100%;
        min-width: 100%;
    }
    .topbar-field-end {
        justify-content: flex-start;
    }
    .topbar-divider { display: none; }
}
@media (max-width: 575.98px) {
    .shop-topbar { padding: 8px 10px; }
    .topbar-btn-text { display: none; }
    .topbar-field-icon { width: 28px; height: 28px; font-size: 12px; }
}


/* ============================================================
   Order History Modal � Timeline & Summary
   ============================================================ */

.order-timeline {
    position: relative;
}

.order-timeline::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 32px;
    bottom: 16px;
    width: 2px;
    background: #dee2e6;
}

.order-timeline-item {
    display: flex;
    margin-bottom: 1rem;
}

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

.order-timeline-indicator {
    width: 40px;
    text-align: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.order-timeline-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.order-timeline-content {
    flex-grow: 1;
}

.order-timeline-user {
    font-weight: 600;
    font-size: 0.9rem;
}

.order-activity-detail {
    font-size: 0.85rem;
}

.order-activity-detail p {
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: #343a40;
    font-size: 0.85rem;
}

.order-activity-detail ul {
    margin-bottom: 0;
    padding-left: 1.2rem;
}

.order-activity-detail ul li {
    padding: 2px 0;
    font-size: 0.84rem;
}


/* CRM Module Styles */

.badge-orange {
    color: #fff;
    background-color: #fd7e14;
}

.crm-stat-card {
    transition: transform 0.2s ease;
}

.crm-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ==============================================
   Order Filter Card (Top Bar)
   ============================================== */
.order-filter-card {
    background: #f8f9fc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 18px;
    margin-bottom: 0;
}
.order-filter-card label {
    font-weight: 600;
    font-size: 0.8rem;
    color: #4a5568;
    margin-bottom: 3px;
    white-space: nowrap;
}
.order-filter-card .form-control {
    border-radius: 6px;
    border: 1px solid #cbd5e0;
    font-size: 0.86rem;
}
.order-filter-card .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.15rem rgba(102, 126, 234, 0.2);
}

/* Filter Row Layout */
.order-filter-row {
    margin-left: -6px;
    margin-right: -6px;
}
.order-filter-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-left: 6px;
    padding-right: 6px;
    margin-bottom: 10px;
}
.order-filter-item label {
    margin-right: 0 !important;
}
.order-filter-item .form-control {
    width: 100%;
}
.order-filter-item .select2-container {
    width: 100% !important;
}

/* Action Buttons Area */
.order-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding-left: 6px;
    padding-right: 6px;
    /*margin-bottom: 10px;*/
}

/* Filter Buttons */
.order-filter-btn {
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: all 0.2s;
}
.order-filter-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}
.order-filter-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}
.order-filter-btn-primary:hover { color: #fff; }
.order-filter-btn-info {
    background: linear-gradient(135deg, #36b5a0 0%, #2d8f7b 100%);
    color: #fff;
}
.order-filter-btn-info:hover { color: #fff; }
.order-filter-btn-warning {
    background: linear-gradient(135deg, #f9c851 0%, #f0ad4e 100%);
    color: #fff;
}
.order-filter-btn-warning:hover { color: #fff; }
.order-filter-btn-group {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

/* Responsive: stack on smaller screens */
@media (max-width: 767.98px) {
    .order-filter-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .order-filter-actions .order-filter-btn {
        flex: 1;
        justify-content: center;
    }
}
@media (max-width: 575.98px) {
    .order-filter-card {
        padding: 10px 12px;
    }
    .order-filter-item {
        margin-bottom: 8px;
    }
    .order-filter-actions {
        width: 100%;
        margin-bottom: 0;
    }
    .order-filter-actions .order-filter-btn {
        width: 100%;
        justify-content: center;
    }
}
