/* VNS 68 MAIN STYLESHEET */
@import "mobile.css";
@import "product.css";
:root{
    --primary-color: #199300;
    --secondary-color: #db8200;
    --muted-color: #6c757d;
    --link-color: #0065ff;
    --box-shadow: 0 0 8px 2px #d8d8d8;
    --border: 1px solid #cdcdcd;
    /* Extended design tokens */
    --brand-accent: #f4a261;
    --chat-own-bg: #e8f5e9;
    --chat-other-bg: #f9f2f4;
    --chat-text: #0e0e0e;
    --danger-highlight: #f00;
    --card-bg-light: #f7fafc;
    --card-border-light: #d9e4ec;
    --pos-link-color: #0a6ebd;
    --report-bar-a: #eceff1;
    --report-bar-b: #1976d2;
    --report-bar-c: #26a69a;
}

body{
    margin: 0;
    padding: 0;
    font-size: 16px;
    background-color: white;
}

body a{
    color: unset;
}

body a:hover{
    text-decoration: underline;
    color: black;
}

.custom-control-label{
    line-height: 24px;
}

.hover-underline:hover{
    text-decoration: underline;
}

.home-title-full{
    font-size: 32px;
    color: var(--secondary-color);
    border-bottom: var(--border);
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 20px;
}

.home-title-category .combo{
    font-size: 48px;
}

.home-title-category{
    font-size: 32px;
    color: var(--secondary-color);
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    margin-top: 40px;
    margin-bottom: 50px;
}

.home-title-category .title{
    position: relative;
}

.home-title-category .title:after{
    position: absolute;
    content: '';
    height: 3px;
    width: 80px;
    background-color: var(--secondary-color);
    bottom: -8px;
    left: 50%;
    transform: translate(-50%, 0);
}

#footer{
    margin-top: 50px;
    padding-top: 50px;
    padding-bottom: 50px;
    background-color: #f0f0f0;
}

.footer-top{
    padding-bottom: 30px;
}

.footer-top .list-footer .title{
    color: var(--secondary-color);
    text-transform: uppercase;
    margin-bottom: 25px;
    font-weight: bold;
}

.footer-top .list-footer .list .item{
    margin-bottom: 5px;
    display: block;
}

.footer-top .list-footer .list .item:hover{
    text-decoration: underline;
}

.footer-bottom{
    padding-top: 30px;
}

.footer-bottom .logo-and-license{
    display: flex;
    align-items: center;
    font-size: 14px;
}

.mobile-nav{
    display: flex;
    justify-content: start;
    align-items: center;
}

.mobile-nav .text-logo{
    margin: 0;
    flex-grow: 1;
    
}

.mobile-nav-user{
    font-weight: bold;
    color: white;
    display: none;
}

.header-fixed .mobile-nav-user{
    display: block;
}

.mobile-nav-toggle{
    display: none;
    font-size: 25px;
    color: var(--secondary-color);
    padding-right: 13px;
}

.text-logo{
    font-size: 25px;
    font-weight: 900;
    color: var(--primary-color);
    margin-right: 20px;
}

.text-logo span{
    color: var(--secondary-color);
}

.footer-bottom .company-information{
    margin-left: 30px;
}

#header-top{
    padding-top: 20px;
    padding-bottom: 20px;
}

#header-top .row{
    align-items: center;
    background-color: white;
}

.header-search{
    text-align: right;
}

.header-search .btn-search{
    background-color: var(--secondary-color);
    color: white;
    font-weight: bold;
}

.header-search .btn-search:hover{
    background-color: #f08f00;
}

.header-search .btn-search:focus{
    box-shadow: none;
}

.header-search .input-search:focus {
    box-shadow: none;
}

.header-top-right{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top-right .hot-line{
    color: var(--secondary-color);
    font-weight: bold;
    padding: 5px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    position: relative;
}

.header-top-right .hot-line:before{
    content: 'HOT LINE:';
    font-weight: bold;
    position: absolute;
    top: -15px;
    left: 5px;
    padding: 0px 5px;
    background-color: white;
    color: var(--primary-color);
}

.header-top-right .login-logout{
    font-weight: bold;
    color: black;
}

#header-bottom{
    background-color: var(--primary-color);
}

.nav-bar{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    margin-bottom: 0;
}

.nav-bar .nav-item{
    flex-shrink: 0;
    padding: 15px;
    text-transform: uppercase;
    list-style: none;
    color: white;
    font-weight: bold;
    transition: 0.4s;
}

.nav-bar .nav-item a{
    color: white;
}

.nav-bar .nav-item:hover, .nav-bar .nav-item.active{
    background-color: #006600;
}

.nav-bar .shopping-cart{
    flex-grow: 1;
    text-align: right;
    position: relative;
    padding-right: 35px;
}

.nav-bar .shopping-cart:hover{
    background-color: unset;
}

.nav-bar .shopping-cart .cart-icon{
    position: absolute;
    font-size: 32px;
    right: 0;
    top: 50%;
    transform: translate(0, -55%);
}

.nav-bar .shopping-cart .cart-icon .cart-count{
    display: none;
    position: absolute;
    padding: 0 6px;
    border-radius: 25px;
    top: 2px;
    right: -12px;
    background-color: red;
    font-size: 14px;
}

.header-fixed{
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    transition: 0.4s;
}

.nav-bar .nav-item.logo-fixed{
    display: none;
    animation-duration: 0.4s;
}

.header-fixed .nav-bar .nav-item.logo-fixed{
    padding: 8px;
    display: block;
}

.nav-bar .nav-item.logo{
    animation-duration: 0.4s;
}

.header-fixed .nav-bar .nav-item.logo{
    display: none;
}

div[class*="col-"] .small-form{
    margin: 0;
    width: 100%;
}

.small-form{
    width: 600px;
    max-width: 95%;
    margin: 30px auto;
    padding: 20px;
    box-shadow: var(--box-shadow);
    border-radius: 10px;
}

.normal-form .title, .small-form .title{
    font-weight: bold;
    text-transform: uppercase;
    color: var(--secondary-color);
    margin-bottom: 20px;
    text-align: center;
    font-size: 24px;
}

.normal-form{
    width: 100%;
    margin: 30px 0;
    padding: 20px;
    box-shadow: var(--box-shadow);
    border-radius: 10px;
}

.mobile-nav.header-fixed{
    background-color: var(--primary-color);
    padding-top: 3px;
    padding-bottom: 3px;
}

.mobile-nav.header-fixed .text-logo{
    color: white;
}

.mobile-nav-backdrop{
    display: none;
    position: fixed;
    height: 100%;
    width: 100%;
    background-color: #000000c4;
    top: 0;
    left: 0;
    z-index: 1001;
}

.mobile-nav-menu .text-logo{
    margin-right: 0;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.mobile-nav-menu.open{
    transform: translate(0 ,0);
}

.mobile-nav-menu{
    position: fixed;
    width: 75%;
    background-color: whitesmoke;
    height: 100%;
    transition: 0.4s;
    left: 0;
    top: 0;
    transform: translate(-100%, 0);
    z-index: 1002;
}

.mobile-nav-menu .mobile-nav-close{
    display: none;
    position: absolute;
    font-size: 30px;
    color: whitesmoke;
    right: 0;
    top: 0;
    transform: translate(100%, 0);
    padding: 0 20px 20px 8px
}

.mobile-nav-menu.open .mobile-nav-close{
    display: block;
}

.mobile-menu{
    padding-left: 0;
    margin-left: 20px;
    margin-right: 20px;
}

.mobile-menu .mobile-menu-item{
    list-style: none;
    padding: 5px;
    font-weight: bold;
    border-radius: 5px;
    transition: 0.4s;
    margin-bottom: 5px;
}

.mobile-menu .mobile-menu-item:hover{
    background-color: var(--primary-color);
    color: white;
}

.mobile-menu .mobile-menu-item:hover a{
    color: white;
    text-decoration: none;
}

.form-combodate .combodate{
    display: flex;
}

.breadcrumb-item{
    color: var(--muted-color);
}

.breadcrumb-item.active{
    color: var(--secondary-color);
    font-weight: bold;
}






















































/* ===== UX/UI Improvements ===== */

/* Header action button group */
.header-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}
@media (min-width: 768px) {
    .header-actions {
        flex-direction: row;
        align-items: center;
        width: auto;
    }
}

/* Full-width table utility */
.table-full { width: 100%; }

/* Gap utilities (supplement Bootstrap 4) */
.gap-xs { gap: 4px; }
.gap-sm { gap: 8px; }
.gap-md { gap: 12px; }
.gap-lg { gap: 16px; }

/* Badge pill small */
.badge-pill-sm {
    border-radius: 999px;
    padding: 2px 8px;
    white-space: nowrap;
    font-size: 11px;
}

/* POS cart — sticky on mobile */
@media (max-width: 767px) {
    .pos-cart-col {
        position: sticky;
        bottom: 0;
        background: white;
        z-index: 100;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
        max-height: 42vh;
        overflow-y: auto;
        padding-top: 8px;
    }
}

/* Chat modal — responsive height */
.order-chat-modal-body {
    height: 82vh;
    min-height: min(600px, 75vh);
    overflow-y: auto;
}

/* ===== FAB — Tạo Job mới (hiển thị trên mọi màn hình: PC, mobile, Telegram) ===== */
/* Backup ngoài inline JS styles — đảm bảo hoạt động kể cả khi
   <style> tags inject qua innerHTML không được apply trong Telegram WebView */
.order-header-create {
    display: none !important;
}
.mobile-order-create-fab {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 1050;
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #2196f3;
    color: #fff;
    box-shadow: 0 4px 16px rgba(33, 150, 243, .45), 0 8px 24px rgba(15, 23, 42, .18);
    font-size: 22px;
    cursor: pointer;
    transition: background .18s, box-shadow .18s, transform .18s;
}
.mobile-order-create-fab:hover,
.mobile-order-create-fab:focus {
    color: #fff;
    text-decoration: none;
    background: #1976d2;
    box-shadow: 0 6px 20px rgba(33, 150, 243, .55), 0 10px 28px rgba(15, 23, 42, .22);
    transform: scale(1.07);
    outline: 0;
}
.mobile-order-create-fab:active {
    transform: scale(0.97);
}
.mobile-order-create-fab i {
    margin: 0;
}

/* ===== Page transition fade-in ===== */
@keyframes page-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.page-fadein {
    animation: page-fadein 0.18s ease-out both;
}
/* Giảm animation khi user có preference reduce-motion */
@media (prefers-reduced-motion: reduce) {
    .page-fadein { animation: none; }
}

/* ===== Mobile Bottom Navigation Bar & Mobile Native Overhaul ===== */
@media (max-width: 991.98px) {
  /* Adjust page container to not be blocked by bottom bar */
  .page-content {
    padding-bottom: 72px !important;
  }

  /* Bottom Bar styling */
  .mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background-color: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1045;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.03);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-bottom-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #707579; /* Telegram inactive tab color */
    font-size: 10px;
    font-weight: 500;
    flex: 1;
    height: 100%;
    text-decoration: none !important;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-bar-item i {
    font-size: 22px;
    margin-bottom: 2px;
    transition: transform 0.1s ease;
  }

  .mobile-bottom-bar-item.active {
    color: #24a1de; /* Telegram signature blue active tab color */
    font-weight: 600;
  }

  .mobile-bottom-bar-item:active i {
    transform: scale(0.9);
  }

  /* Adjust FAB button bottom position to sit above bottom bar */
  .mobile-order-create-fab {
    bottom: 76px !important;
  }

  /* Mobile Job Card Container */
  .mobile-job-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0;
  }

  /* Card styling */
  .mobile-job-card {
    border: 1px solid #e2e8f0;
    border-left: 4px solid #9e9e9e;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    margin-bottom: 0 !important;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .mobile-job-card:active {
    transform: scale(0.995);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
  }

  /* Link wrapper */
  .mobile-job-card-link-wrapper {
    color: inherit !important;
    text-decoration: none !important;
  }

  /* Status border color-coding */
  .mobile-job-card.status-border-1 { border-left-color: #38c172 !important; } /* Success/Green */
  .mobile-job-card.status-border-2 { border-left-color: #3490dc !important; } /* Primary/Blue */
  .mobile-job-card.status-border-3 { border-left-color: #e3342f !important; } /* Danger/Red */
  .mobile-job-card.status-border-4 { border-left-color: #f6993f !important; } /* Warning/Orange */
  .mobile-job-card.status-border-5 { border-left-color: #6c757d !important; } /* Secondary/Gray */

  /* Header */
  .mobile-job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px 6px 12px;
    border-bottom: 1px dashed #f1f5f9;
  }

  .mobile-job-card-status-badge .badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
  }

  .mobile-job-card-priority-badge {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    background-color: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
  }

  .mobile-job-card-priority-badge.level-urgent {
    color: #ffffff;
    background-color: #e3342f; /* Red */
  }

  .mobile-job-card-priority-badge.level-high {
    color: #ffffff;
    background-color: #f6993f; /* Orange */
  }

  /* Body */
  .mobile-job-card-body {
    padding: 12px;
  }

  .mobile-job-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px 0;
    line-height: 1.4;
  }

  .mobile-job-card-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 10px;
  }

  /* Details Grid */
  .mobile-job-card-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 8px 10px;
  }

  .detail-item {
    font-size: 11px;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .detail-item i {
    font-size: 12px;
    color: #94a3b8;
  }

  /* Footer */
  .mobile-job-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding: 10px 12px;
    background-color: #fafafa;
    gap: 12px;
  }

  .mobile-job-card-actions-wrapper {
    flex-grow: 1;
    overflow: hidden;
  }

  .mobile-job-card-actions {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;

  }

  .mobile-job-card-actions::-webkit-scrollbar {
    display: none; /* Hide scrollbar for inline action items */
  }

  .mobile-job-card-actions .btn {
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
  }

  .mobile-job-card-selects {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
  }

  .compact-select {
    font-size: 11px;
    height: 28px !important;
    padding: 2px 6px;
    border-radius: 6px;
    border-color: #cbd5e1;
    color: #334155;
    flex-grow: 1;
    width: 50%;
  }

  /* Chat button */
  .mobile-job-chat-btn {
    position: relative;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    color: #475569 !important;
    padding: 0;
  }

  .mobile-job-chat-btn i {
    font-size: 16px;
  }

  .chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ef4444; /* Red badge */
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    line-height: 1;
    min-width: 16px;
    text-align: center;
    border: 1px solid #ffffff;
  }

  /* Fullscreen Modal on Mobile */
  .modal-mobile-fullscreen .modal-dialog {
    margin: 0;
    max-width: 100%;
    height: 100%;
  }

  .modal-mobile-fullscreen .modal-content {
    border: 0;
    border-radius: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .modal-mobile-fullscreen .modal-header {
    border-radius: 0;
  }

  .modal-mobile-fullscreen .modal-body {
    flex-grow: 1;
    overflow-y: auto;

  }
}

/* Page Transitions keyframes */
@keyframes slide-in-left {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes slide-in-right {
  from { transform: translateX(-40px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.page-slide-left {
  animation: slide-in-left 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-slide-right {
  animation: slide-in-right 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Pull-to-refresh indicator */
.pull-to-refresh-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-50px);
  width: 160px;
  height: 40px;
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.pull-to-refresh-indicator.refreshing {
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ptr-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e2e8f0;
  border-top-color: #199300; /* --primary-color */
  border-radius: 50%;
  animation: ptr-spin 0.8s linear infinite;
  display: none;
}

.pull-to-refresh-indicator.refreshing .ptr-spinner {
  display: block;
}

.ptr-text {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

@keyframes ptr-spin {
  to { transform: rotate(360deg); }
}
