/* Model Lists header layout */
.ml-header { display: block; padding: 10px; color: #444; }
.ml-header__row { display: flex; justify-content: space-between; align-items: center; }
.ml-header__title { margin: 0; font-size: 18px; font-weight: 600; }
.ml-header__button { background-color: #f5f5f5; border: 1px solid #ccc; color: #333; font-size: 13px; padding: 6px 12px; border-radius: 4px; cursor: pointer; }

/* Main Footer Styling */
.main-footer {
    background: #0063b1 !important;
    padding: 15px;
    color: #ffffff;
}
/* Excel export button styling (keep header default colors) */
.excel-header {
    padding: 10px 10px;
}
.invoice-box .bottom_text{
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    line-height: 0px;
}

.excel-header .header-actions .btn {
    background-color: #0063b1;
    color: #fff;
    border-color: #0f6a38;
}
/* Bigger checkbox */
#dataTable .row-check,
#dataTable .check-all {
    width: 15px;
    height: 15px;
    cursor: pointer;
    transform: scale(1.3);
}
#dataTable tbody tr.selected {
    background-color: #e6f3ff !important;
}
/* Prevent text selection in checkbox column */
#dataTable td:first-child,
#dataTable th:first-child {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}
/* Center checkbox properly */
#dataTable td.text-center,
#dataTable th.text-center {
    vertical-align: middle;
}

.excel-header .header-actions .btn:hover {
    background-color: #0e6b39;
    color: #fff;
}

.modal-header {
    color: #fff;
    padding: 9px 15px;
    border-bottom: 1px solid #eee;
    background-color: #0063b1;
    -webkit-border-top-left-radius: 5px;
    -webkit-border-top-right-radius: 5px;
    -moz-border-radius-topleft: 5px;
    -moz-border-radius-topright: 5px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}
.modal-body {
    max-height: calc(100% - 120px);
    overflow-y: auto;
}
.removeRowBtn,
.addMoreBtn {
    padding-bottom: 0;
    padding-top: 0;
}

.sidebar-collapse .main-header a {
    align-items: center;
    align-content: center;
}

/* Increase collapsed sidebar width */
.sidebar-collapse .main-sidebar {
    width: 80px !important;
}

.sidebar-collapse .content-wrapper,
.sidebar-collapse .right-side,
.sidebar-collapse .main-footer {
    margin-left: 80px !important;
}

/* Remove sidebar-collapse margin on mobile */
@media (max-width: 767px) {
    .sidebar-collapse .content-wrapper,
    .sidebar-collapse .right-side,
    .sidebar-collapse .main-footer {
        margin-left: 0 !important;
    }
}

.fixed .main-header {
    top: 0;
    right: 0;
    left: 0;
    z-index: 10000 !important;
}

.sidebar-collapse .sidebar-menu > li > a {
    padding-left: 5px !important;
}

/* Utility and component classes extracted from inline styles */
.action-cards,
.print-cards {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 5px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.action-card,
.print-card {
    width: 100%;
    max-width: 27%;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}


.print-card-center {
    width: 100%;
    max-width: 40%;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Responsive: stack cards in a single column on mobile */
@media (max-width: 768px) {
    .action-card,
    .print-card,
    .print-card-center {
        max-width: 100%;
    }
}

.action-card__header,
.print-card__header {
    color: #fff;
    background-color: #0063b1;
    padding: 10px 14px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
}

.action-card__body,
.print-card__body {
    padding: 15px;
}

.action-btn-group,
.print-btn-group {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.btn-outline-success {
    border: 2px solid #0063b1;
    color: #0063b1;
    background: #fff;
}

/* Ensure outline success buttons keep contrast on hover/focus/active */
.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-success:active,
.btn-outline-success.active {
    background-color: #0063b1;
    color: #fff;
    border-color: #0f6a38;
}

.select-tall {
    height: 200pt;
}

.mt-20 { margin-top: 20px; }
.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }
.text-muted-700 { color: #777; }


#modal-bol .modal-content {
    max-height: 85vh;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
}

#modal-bol .modal-header,
#modal-bol .modal-footer {
    -webkit-box-flex: 0;
        -ms-flex: 0 0 auto;
            flex: 0 0 auto;
}

#modal-bol .modal-body {
    -webkit-box-flex: 1;
        -ms-flex: 1 1 auto;
            flex: 1 1 auto;
    overflow-y: auto;
}


/* ===== BOL modal styles synced from funaicorp ===== */
/* Signature canvas */
.signature-wrapper {
    position: relative;
    width: 400px;
    height: 200px;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.signature-pad {
    position: absolute;
    left: 0;
    top: 0;
    width: 500px;
    height: 200px;
    background-color: #fff;
}


 /* CSS for BOLs */
  #modal-bol .modal-dialog,
  #modal-bol .modal-content {
    /* 80% of window height */
    height: 95%;
  }


  #modal-bol  input {
      width: 100%;
      height: 100%;
      background: yellow;
  }

  #modal-bol .straight-bill-div input {
      background: #e0e0e0;
  }

  #modal-bol .straight-bill-div:first-of-type input {
      background: yellow;
  }

  .modal-body {
      /* 100% = dialog height, 120px = header + footer */
      max-height: calc(100% - 120px);
      overflow-y: auto;
  }




  #modal-bol .invoice-box {
    max-width: 1000px;
    margin: auto;
    padding: 8px;
/*         border: 1px solid #eee; */
/*         box-shadow: 0 0 10px rgba(0, 0, 0, .15); */
    font-size: 14px;
    line-height: 24px;
    font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
/*         color: #555; */
    color: 	#000000;
  }

  #modal-bol .invoice-box table {
      width: 100%;
      line-height: inherit;
      text-align: left;
  }

  #modal-bol .invoice-box table td {
  /*         padding: 5px; */
      vertical-align: top;
  }

  #modal-bol .invoice-box table tr td:nth-child(2) {
      text-align: right;
  }

  #modal-bol .invoice-box table tr.top table td {
      padding-bottom: 0px;
  }

  #modal-bol .invoice-box table tr.top table td.title {
      width: 41%;
      font-size: 45px;
      /* line-height: 45px; */
      color: #333;
      padding: 0px
  }


  #modal-bol .invoice-box table tr.information td {
      background: #eee;
      border-top: 1px solid black;
      border-bottom: 1px solid black;
      font-weight: bold;
      text-align: center;
      padding: 0px;
  }

  #modal-bol .invoice-box table tr.content td {
    padding: 0px;
  }

  #modal-bol tr.border_bottom td {
    border-bottom:1px solid black;
  }

  #modal-bol tr.border_top td {
    border-top:1px solid black;
  }

  #modal-bol .invoice-box table .shipTo  {
      background: #eee;
      border-bottom: 1px solid black;
      border-top:1px solid black;
      border-right:1px solid black;
      font-weight: bold;
      text-align: center;
      padding: 0px;
  }

  #modal-bol .invoice-box table .shipDateTime {
      border-top:1px solid black;
      padding: 0px;
  }

  #modal-bol .shipDateTime table tr td:nth-child(1){
      text-align: right;
      font-weight: bold;
  }

  #modal-bol .shipDateTime table tr td:nth-child(2){
      text-align: left;
      border-bottom: 1px solid black;
  }

  #modal-bol .invoice-box table .seal {
    padding: 0px;
  }

  #modal-bol .seal table tr td:nth-child(1){
    text-align: right;
    font-weight: bold;
  }

  #modal-bol  .seal table tr td:nth-child(2){
    text-align: left;
    border-bottom: 1px solid black;
  }

  #modal-bol  .invoice-box table .frieght  {
    background: #eee;
    border-bottom: 1px solid black;
    border-right:1px solid black;
    font-weight: bold;
    text-align: center;
    padding: 0px;
  }



  #modal-bol .invoice-box table tr.details td {
    padding-bottom: 5px;
    color: red;
    font-weight: bold;
    text-align:left
  }

  #modal-bol .invoice-box table tr.details td small {

    color:black;
    font-weight: normal;
    font-size: 14px;
  }

  #modal-bol .invoice-box table tr.item td{
  /*         border-bottom: 1px solid #eee; */
      text-align: center;
  }

  #modal-bol .invoice-box table tr.content_items.last td {
    border-bottom: none;
  }



  #modal-bol .invoice-box table tr.total td:nth-child(1) {
    font-weight: bold;
    text-align: right;
  }

  #modal-bol .invoice-box table tr.grand_total td:nth-child(1)     {
    font-weight: bold;
    text-align: right;
  }

  #modal-bol .invoice-box table tr.detail td{
      padding: 4px;
      border: 1px solid black;
      text-align: left;
      font-size: 12px;
      /* cell-margin:10px; */
  }

  #modal-bol .invoice-box table tr.shipment_detail td{
      font-size: 12px;
      padding: 4px;
  }

  /* @media  only screen and (max-width: 600px) {
    .invoice-box table tr.top table td {
        width: 100%;
        display: block;
        text-align: center;
    }

    .invoice-box table tr.information table td {
        width: 100%;
        display: block;
        text-align: center;
    }
  } */

  /** RTL **/
  /* .rtl {
    direction: rtl;
    font-family: Tahoma, 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
  }

  .rtl table {
    text-align: right;
  }

  .rtl table tr td:nth-child(2) {
    text-align: left;
  } */

  #modal-bol input[type=radio] {
    height: 14px;
    width: auto;
  }

  #modal-bol .custom-invoice-box {
    max-width: 800px;
    margin: auto;
    padding: 5px 10px 10px 10px;
    /* border: 1px solid #eee; */
    /* box-shadow: 0 0 10px rgba(0, 0, 0, .15); */
    font-size: 12px;
    line-height: 14px;
    font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
    color: black;
  }

  #modal-bol .custom-invoice-box table {
    width: 100%;
    line-height: 14px;
    text-align: left;

  }

  #modal-bol .custom-invoice-box table td {
    padding: 0 5px;
    vertical-align: top;
  }



  #modal-bol .custom-invoice-box table tr.top table td {
    padding-bottom: 0px;
    font-size: 12px;
    border: 0;
  }

  #modal-bol .custom-invoice-box table tr.top table td.title {
    font-size: 45px;
    /*         line-height: 45px; */
    padding-left: 0px;
    color: black;
    width: 9%;
  }

  #modal-bol .cci_content table tr.information td {
    padding-bottom: 0px;

  }

  #modal-bol .cci_content {
    border-collapse: collapse;
    border: 1px solid black;

  }

  #modal-bol .cci_content td {
    border: 1px solid black;
  }

  .inner_content p,
  .cci_content p {
      text-align: center;
      font-size: 13px;
  }

  #modal-bol .inner_content {
    /*       border-collapse: collapse; */
    /*       border: 1px solid black; */
    border-spacing: 0 !important;
  }



  #modal-bol .inner_content td {
    border: 0px solid black;
  }



  .dataTables_filter { float: left !important; }
.dt-actions .btn { margin-left: 6px; }

/* Hide sort icons on checkbox header cells */
th.no-sort.sorting:before,
th.no-sort.sorting:after,
th.no-sort.sorting_asc:before,
th.no-sort.sorting_asc:after,
th.no-sort.sorting_desc:before,
th.no-sort.sorting_desc:after {
    display: none !important;
}

/* Normalize checkbox column alignment */
table.dataTable thead th.text-center:first-child,
table.dataTable tbody td.text-center:first-child {
    width: 30px;
    vertical-align: middle;
    padding-right: 0% !important;
}

/* Table row click functionality styles */
table.dataTable tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

table.dataTable tbody tr:hover {
    background-color: #f5f5f5 !important;
}

table.dataTable tbody tr.selected {
    background-color: #e3f2fd !important;
}

/* Ensure interactive elements don't trigger row click */
table.dataTable tbody tr input,
table.dataTable tbody tr button,
table.dataTable tbody tr a,
table.dataTable tbody tr select,
table.dataTable tbody tr textarea {
    cursor: default;
}

table.dataTable tbody tr input[type="checkbox"] {
    cursor: pointer;
}

/* Mixed Pallet Merged Row Styles */
table.dataTable tbody tr.merged-row {
    background-color: #e8f5e8 !important;
    border-left: 4px solid #5cb85c;
}

table.dataTable tbody tr.merged-row:hover {
    background-color: #d4edda !important;
}

table.dataTable tbody tr.merged-row td {
    font-weight: 500;
}

/* Merged source rows (hidden) */
table.dataTable tbody tr.merged-source {
    opacity: 0.5;
    background-color: #f9f9f9 !important;
}

/* Merge details modal improvements */
#mergeDetailsModal .modal-dialog {
    max-width: 95%;
}

#merge_details_table tbody tr {
    cursor: default;
}

#merge_details_table tbody tr:hover {
    background-color: #f8f9fa !important;
}

/* Loading state for merge button */
.btn[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Better spacing for merge action buttons */
.dt-actions .btn {
    margin-left: 4px;
    margin-right: 2px;
}

/* Smooth transitions for table updates */
table.dataTable tbody tr {
    transition: all 0.3s ease;
}

/* Merged badge styling improvements */
.label.label-info {
    margin-left: 8px;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    vertical-align: middle;
}

/* Mixed Pallet Modal Fullscreen Styles */
#mixedPalletModal.fullscreen {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    z-index: 1050;
}

#mixedPalletModal.fullscreen .modal-dialog {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

#mixedPalletModal.fullscreen .modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

#mixedPalletModal.fullscreen .modal-header {
    flex: 0 0 auto;
    border-radius: 0;
}

#mixedPalletModal.fullscreen .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 15px;
    max-height: none;
}

#mixedPalletModal.fullscreen .modal-footer {
    flex: 0 0 auto;
    border-radius: 0;
}

/* Body class to prevent scrolling when modal is fullscreen */
body.mixed-pallet-modal-open {
    overflow: hidden;
}

/* Fullscreen toggle button positioning */
.fullscreen-toggle {
    position: absolute;
    top: 10px;
    right: 40px;
    z-index: 99;
}
html, body, .wrapper { height: 100%; }
.content-wrapper, .right-side {
    /* Use min-height instead of fixed height to prevent content clipping */
    min-height: calc(100vh - 50px);
    overflow-y: auto;
}

.main-sidebar {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
}

.sidebar-bottom {
    flex-shrink: 0;
}

div.dataTables_processing {
    z-index: 100;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    width: 200px !important;
    height: auto !important;
    padding: 10px !important;
    background: white !important;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.text-nowrap {
    white-space: nowrap;
}
/* Override AdminLTE primary color #3c8dbc with #0063b1 */
:root {
    --primary: #0063b1 !important;
    --primary-dark: #0155a0 !important;
}/* Override all AdminLTE primary color references */
.skin-blue .main-header .navbar {
    background-color: #0063b1 !important;
}
.skin-blue .main-header .logo {
    background-color: #0063b1 !important;
}

.skin-blue .main-header .logo:hover {
    background-color: #0155a0 !important;
}

.skin-blue .main-header li.user-header {
    background-color: #0063b1 !important;
}
.btn-primary {
    background-color: #0063b1 !important;
    border-color: #0063b1 !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background-color: #0155a0 !important;
    border-color: #0155a0 !important;
}
.text-primary {
    color: #0063b1 !important;
}

.bg-primary {
    background-color: #0063b1 !important;
}
.box-footer .btn-primary {
    background-color: #0063b1 !important;
    border-color: #0063b1 !important;
}

/* Override AdminLTE sidebar active state */
.sidebar-menu > li.active > a {
    background-color: #0063b1 !important;
}

.sidebar-menu > li > a:hover {
    background-color: #0063b1 !important;
}

/* Override AdminLTE treeview active state */
.treeview-menu > li.active > a {
    background-color: #0063b1 !important;
}
/* Override AdminLTE pagination */
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
    background-color: #0063b1 !important;
    border-color: #0063b1 !important;
}

/* Override AdminLTE badges */
.label-primary {
    background-color: #0063b1 !important;
}

/* Override AdminLTE progress bars */
.progress-bar-primary {
    background-color: #0063b1 !important;
}

/* Override AdminLTE callout */
.callout.callout-primary {
    border-left-color: #0063b1 !important;
}

.callout.callout-primary {
    background-color: #0063b1 !important;
}

/* Override AdminLTE alert */
.alert-primary {
    background-color: #0063b1 !important;
    border-color: #0063b1 !important;
}

/* Override AdminLTE input focus */
.form-control:focus {
    border-color: #0063b1 !important;
}

/* Override AdminLTE select2 */
.select2-container--default .select2-selection--single:focus {
    border-color: #0063b1 !important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #0063b1 !important;
}

/* Override AdminLTE checkbox accent */
input[type="checkbox"]:checked {
    accent-color: #0063b1 !important;
}

/* Override AdminLTE radio accent */
input[type="radio"]:checked {
    accent-color: #0063b1 !important;
}
*[style*="#3c8dbc"] {
    color: #0063b1 !important;
    background-color: #0063b1 !important;
    border-color: #0063b1 !important;
}

/* Login Page Styles */
.login-page-new {
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #0063b1;
}

.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Left Side - Logo Section */
.login-left {
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.logo-section {
    text-align: center;
}

.logo-text {
    color: #ffffff;
    font-size: 36px;
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.logo-region {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin: 10px 0 0 0;
    letter-spacing: 1px;
    opacity: 0.9;
    text-align: right;
}

.logo-skyworth {
    font-size: 84px;
    font-weight: 800;
    margin: 5px 0;
    letter-spacing: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

.logo-flag {
    height: 96px;
    width: auto;
    max-width: 100%;
}

.logo-image {
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto 20px auto;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.logo-wrapper .logo-image {
    margin: 0;
}

.logo-wrapper .logo-flag {
    height: 80px;
    width: auto;
}

/* Right Side - Login Card */
.login-right {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 40px;
}

.login-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Card Header */
.login-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #0063b1;
    margin: 0;
}

.language-selector {
    display: flex;
    align-items: center;
}

.language-dropdown {
    position: relative;
}

.language-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.language-dropdown-btn:hover {
    background-color: #f5f5f5;
}

.language-dropdown-btn:focus {
    outline: 2px solid #0063b1;
    outline-offset: 2px;
}

.language-icon {
    color: #999999;
    font-size: 18px;
}

.language-flag {
    font-size: 20px;
    margin-right: 8px;
}

.language-text {
    color: #333333;
    font-size: 14px;
    font-weight: 500;
}

/* Language switcher in header (blue background) */
.navbar-custom-menu .language-text {
    color: #ffffff;
}

.navbar-custom-menu .language-dropdown-btn:hover .language-text {
    color: #ffffff;
}

/* Remove hover effect on header language button */
.navbar-custom-menu .language-dropdown-btn {
    background: none !important;
}

.navbar-custom-menu .language-dropdown-btn:hover {
    background: none !important;
}

/* Make language switcher and settings button same size in header */
.navbar-custom-menu .language-selector,
.navbar-custom-menu .btn-default {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
}

/* Language switcher in login card (white background) */
.login-card-header .language-dropdown-btn:hover .language-text {
    color: #0063b1;
}

.language-chevron {
    color: #999999;
    font-size: 12px;
    margin-left: 4px;
}

.language-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 150px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    background-color: #ffffff;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.language-dropdown-menu.show {
    display: block;
}

.language-dropdown-menu .dropdown-item {
    display: block;
    padding: 10px 16px;
    color: #333333;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
    text-decoration: none;
}

.language-dropdown-menu .dropdown-item:hover {
    background-color: #0063b1;
    color: #ffffff;
}

.language-dropdown-menu .dropdown-item:focus {
    outline: none;
    background-color: #0063b1;
    color: #ffffff;
}

/* Test Environment Warning */
.test-environment-warning {
    background-color: #fff3cd;
    color: #856404;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    border: 1px solid #ffeeba;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form-group {
    margin: 0;
}

.login-input {
    height: 50px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background-color: #f5f5f5;
    padding: 12px 16px;
    font-size: 15px;
    color: #333333;
    transition: all 0.3s ease;
}

.login-input:focus {
    background-color: #ffffff;
    border-color: #0063b1;
    box-shadow: 0 0 0 3px rgba(0, 99, 177, 0.1);
    outline: none;
}

.login-input::placeholder {
    color: #999999;
    font-weight: 400;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #999999;
    font-size: 18px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #0063b1;
}

/* Login Options */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0063b1;
}

.remember-label {
    color: #666666;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    margin: 0;
}

.forgot-password {
    color: #0063b1;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #004a8a;
    text-decoration: underline;
}

/* Validation Errors */
.login-errors {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 10px;
}

.error-item {
    color: #721c24;
    font-size: 14px;
    margin: 4px 0;
}

.error-item:first-child {
    margin-top: 0;
}

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

/* Login Button */
.login-btn {
    background-color: #0063b1;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    height: 50px;
}

.login-btn:hover {
    background-color: #004a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 99, 177, 0.3);
}

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

.login-btn-icon {
    font-size: 18px;
}

/* Copyright */
.login-copyright {
    color: #ffffff;
    font-size: 14px;
    font-style: italic;
    text-align: left;
    margin-top: 30px;
    width: 100%;
    opacity: 0.9;
}

/* Back to Login */
.back-to-login {
    margin-top: 20px;
    text-align: center;
}

.back-link {
    color: #0063b1;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #004a8a;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .login-left {
        flex: 0 0 50%;
        justify-content: center;
    }

    .logo-section {
        text-align: center;
    }

    .login-right {
        flex: 0 0 50%;
        padding: 40px 50px;
    }

    .logo-image {
        max-width: 350px;
    }

    .logo-wrapper .logo-flag {
        height: 70px;
    }

    .logo-text {
        font-size: 40px;
    }

    .logo-skyworth {
        font-size: 60px;
    }
}

@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
        justify-content: center;
    }

    .login-left {
        flex: 0 0 auto;
        padding: 30px;
        min-height: auto;
        justify-content: center;
    }

    .logo-section {
        text-align: center;
    }

    .logo-image {
        max-width: 300px;
    }

    .logo-wrapper {
        flex-direction: row;
    }

    .logo-wrapper .logo-flag {
        height: 60px;
    }

    .logo-text {
        font-size: 32px;
    }

    .logo-skyworth {
        font-size: 48px;
        justify-content: center;
    }

    .login-right {
        width: 100%;
        padding: 30px;
        align-items: center;
        justify-content: center;
    }

    .login-card {
        max-width: 450px;
    }

    .login-copyright {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        justify-content: center;
    }

    .login-left {
        padding: 20px;
        justify-content: center;
    }

    .logo-section {
        text-align: center;
    }

    .logo-image {
        max-width: 250px;
    }

    .logo-wrapper {
        flex-direction: row;
    }

    .logo-wrapper .logo-flag {
        height: 50px;
    }

    .logo-text {
        font-size: 24px;
    }

    .logo-skyworth {
        font-size: 36px;
        justify-content: center;
    }

    .logo-flag {
        height: 32px;
    }

    .login-right {
        padding: 20px;
        justify-content: center;
    }

    .login-card {
        padding: 25px;
        max-width: 100%;
    }

    .login-title {
        font-size: 24px;
    }

    .login-card-header {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .login-container {
        justify-content: center;
    }

    .login-left {
        padding: 15px;
        justify-content: center;
    }

    .logo-section {
        text-align: center;
    }

    .logo-image {
        max-width: 200px;
    }

    .logo-wrapper {
        flex-direction: row;
        gap: 10px;
    }

    .logo-wrapper .logo-flag {
        height: 40px;
    }

    .logo-text {
        font-size: 18px;
        letter-spacing: 1px;
    }

    .logo-skyworth {
        font-size: 28px;
        letter-spacing: 2px;
        justify-content: center;
    }

    .logo-flag {
        height: 36px;
    }

    .login-right {
        padding: 15px;
        justify-content: center;
    }

    .login-card {
        padding: 20px;
        max-width: 100%;
    }

    .login-card-header {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }

    .login-title {
        font-size: 22px;
    }
}

/* Full-Screen Login Styles */
.login-container-fullscreen {
    min-height: 100vh;
    width: 100%;
    background-color: #0063b1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    overflow-x: hidden;
}

/* Header Logo */
.login-header {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    padding: 10px 20px;
    background-color: #ffffff;
}

.header-logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.header-logo {
    max-width: 250px;
    height: auto;
}

.header-tagline {
    color: #555555;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 1px;
}

/* Center Content */
.login-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 600px;
    flex: 1;
    position: relative;
}

.logo-text-fullscreen {
    color: #ffffff;
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 30px 0;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.test-environment-warning-fullscreen {
    background-color: #fff3cd;
    color: #856404;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    border: 1px solid #ffeeba;
    width: 100%;
    max-width: 400px;
}

/* Login Trigger Button */
.login-trigger-btn-fullscreen {
    background-color: #ffffff;
    color: #0063b1;
    border: none;
    border-radius: 30px;
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    min-width: 200px;
}

.login-trigger-btn-fullscreen:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Full-Screen Form Styles */
.login-form-fullscreen {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 400px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* Form Close Button */
.form-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #0063b1;
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.form-close-btn:hover {
    background-color: #004a8a;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 99, 177, 0.4);
}

.form-close-btn:active {
    transform: scale(0.95);
}

.login-form-group-fullscreen {
    margin: 0;
}

.login-input-fullscreen {
    height: 50px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background-color: #f5f5f5;
    padding: 12px 16px;
    font-size: 15px;
    color: #333333;
    transition: all 0.3s ease;
    width: 100%;
}

.login-input-fullscreen:focus {
    background-color: #ffffff;
    border-color: #0063b1;
    box-shadow: 0 0 0 3px rgba(0, 99, 177, 0.1);
    outline: none;
}

.login-input-fullscreen::placeholder {
    color: #999999;
    font-weight: 400;
}

.password-input-wrapper-fullscreen {
    position: relative;
}

.password-toggle-fullscreen {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #999999;
    font-size: 18px;
    transition: color 0.3s ease;
}

.password-toggle-fullscreen:hover {
    color: #0063b1;
}

.login-options-fullscreen {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.remember-me-fullscreen {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-checkbox-fullscreen {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0063b1;
}

.remember-label-fullscreen {
    color: #666666;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    margin: 0;
}

.forgot-password-fullscreen {
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    text-decoration: underline;
    transition: color 0.3s ease;
    text-align: center;
    display: block;
    margin-top: 20px;
}

.forgot-password-fullscreen:hover {
    color: #e0e0e0;
}

.login-errors-fullscreen {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 10px;
}

.error-item-fullscreen {
    color: #721c24;
    font-size: 14px;
    margin: 4px 0;
}

.error-item-fullscreen:first-child {
    margin-top: 0;
}

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

.alert-danger-fullscreen {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 10px;
    color: #721c24;
}

.alert-success-fullscreen {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 10px;
    color: #155724;
}

.back-link-fullscreen {
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    text-decoration: underline;
    transition: color 0.3s ease;
    text-align: center;
    display: block;
    margin-top: 20px;
}

.back-link-fullscreen:hover {
    color: #e0e0e0;
}

.login-btn-fullscreen {
    background-color: #0063b1;
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    height: 50px;
    width: 100%;
}

.login-btn-fullscreen:hover {
    background-color: #004a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 99, 177, 0.3);
}

.login-btn-fullscreen:active {
    transform: translateY(0);
}

.account-info {
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    font-style: italic;
    text-align: center;
    max-width: 500px;
    line-height: 1.5;
    padding: 20px;
}

/* Footer */
.login-footer {
    background-color: #ffffff;
    color: #333333;
    font-size: 14px;
    font-weight: bold;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
    width: 100%;
}

/* Mobile Responsive for Full-Screen */
@media (max-width: 768px) {
    .login-container-fullscreen {
        padding: 0;
    }

    .header-logo {
        max-width: 150px;
    }

    .logo-text-fullscreen {
        font-size: 36px;
        letter-spacing: 2px;
    }

    .login-form-fullscreen {
        padding: 25px 20px;
        max-width: 100%;
    }

    .login-trigger-btn-fullscreen {
        padding: 14px 40px;
        font-size: 16px;
        min-width: 180px;
    }

    .account-info {
        font-size: 13px;
        margin-top: 25px;
    }
}

@media (max-width: 480px) {
    .login-container-fullscreen {
        padding: 0;
    }

    .header-logo {
        max-width: 120px;
    }

    .logo-text-fullscreen {
        font-size: 28px;
        letter-spacing: 1px;
    }
}

/* Mobile - reduce test environment banner text size */
@media (max-width: 767px) {
    .test-env-banner span {
        font-size: 12px !important;
    }

    .navbar-custom-menu .btn-default i {
        color: #ffffff !important;
    }
}

/* ============================================
   COMPREHENSIVE RESPONSIVE IMPROVEMENTS
   ============================================ */

/* Global responsive adjustments for all devices */
@media (max-width: 1920px) {
    /* Large desktop optimizations */
    .content-wrapper {
        min-height: calc(100vh - 50px);
    }
}

/* Desktop (1536px - 1919px) */
@media (max-width: 1919px) and (min-width: 1536px) {
    .box {
        margin-bottom: 20px;
    }
    
    .dataTables_wrapper {
        padding: 15px;
    }
}

/* Standard laptop (1280px - 1535px) */
@media (max-width: 1535px) and (min-width: 1280px) {
    .box-header {
        flex-wrap: wrap;
    }
    
    .box-header .pull-right {
        margin-top: 10px;
    }
    
    .nav-tabs > li > a {
        padding: 10px 15px;
        font-size: 13px;
    }
}

/* Small laptop (1024px - 1279px) */
@media (max-width: 1279px) and (min-width: 1024px) {
    .sidebar-mini.sidebar-collapse .main-sidebar {
        width: 50px !important;
    }
    
    .sidebar-mini.sidebar-collapse .content-wrapper,
    .sidebar-mini.sidebar-collapse .right-side,
    .sidebar-mini.sidebar-collapse .main-footer {
        margin-left: 50px !important;
    }
    
    .box-header .box-title {
        font-size: 16px;
    }
    
    .btn-sm {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    /* Header adjustments */
    .main-header .navbar {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Box adjustments */
    .box-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .box-header .pull-right {
        width: 100%;
        margin-top: 15px;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .box-header .btn {
        margin: 5px 5px 5px 0;
    }
    
    /* DataTables adjustments */
    .dataTables_length,
    .dataTables_filter {
        width: 100%;
        text-align: left !important;
        margin-bottom: 10px;
    }
    
    .dataTables_filter {
        float: none !important;
    }
    
    .dataTables_info {
        text-align: center !important;
        margin-top: 10px;
    }
    
    .dataTables_paginate {
        text-align: center !important;
        margin-top: 10px;
    }
    
    /* Form adjustments */
    .form-horizontal .control-label {
        text-align: left;
        margin-bottom: 5px;
    }
    
    .form-horizontal .form-group {
        margin-bottom: 15px;
    }
}

/* Large mobile (481px - 767px) */
@media (max-width: 767px) and (min-width: 481px) {
    /* Content wrapper */
    .content-wrapper {
        margin-left: 0 !important;
        padding: 10px;
    }
    
    /* Header */
    .main-header {
        height: auto;
        min-height: 50px;
    }
    
    .main-header .navbar {
        padding: 10px;
    }
    
    .logo {
        width: 100% !important;
        text-align: center;
        padding: 10px !important;
    }
    
    .logo-mini {
        display: none !important;
    }
    
    .logo-lg {
        display: block !important;
    }
    
    /* Box adjustments */
    .box {
        margin-bottom: 15px;
        border-radius: 0;
    }
    
    .box-header {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .box-header .box-title {
        font-size: 16px;
        margin-bottom: 10px;
        width: 100%;
    }
    
    .box-header .pull-right {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        margin-top: 10px;
    }
    
    .box-header .btn {
        flex: 1;
        min-width: 80px;
        font-size: 12px;
        padding: 8px 12px;
        white-space: nowrap;
    }
    
    .box-body {
        padding: 15px;
    }
    
    /* DataTables - responsive table */
    .table-responsive {
        border: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table.dataTable {
        font-size: 12px;
    }
    
    table.dataTable thead th {
        font-size: 11px;
        padding: 8px 5px;
        white-space: nowrap;
    }
    
    table.dataTable tbody td {
        padding: 8px 5px;
        font-size: 12px;
    }
    
    /* DataTables controls */
    .dataTables_wrapper {
        padding: 10px;
    }
    
    .dataTables_length,
    .dataTables_filter {
        width: 100%;
        text-align: center !important;
        margin-bottom: 15px;
    }
    
    .dataTables_length label,
    .dataTables_filter label {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    
    .dataTables_length select,
    .dataTables_filter input {
        width: 100%;
        max-width: 200px;
    }
    
    .dataTables_filter {
        float: none !important;
    }
    
    .dataTables_info {
        text-align: center !important;
        font-size: 11px;
        margin: 15px 0;
        padding: 10px;
    }
    
    .dataTables_paginate {
        text-align: center !important;
        margin: 10px 0;
    }
    
    .dataTables_paginate .pagination {
        margin: 0;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .dataTables_paginate .pagination li {
        margin: 2px;
    }
    
    .dataTables_paginate .pagination li a,
    .dataTables_paginate .pagination li span {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* Tabs */
    .nav-tabs {
        border-bottom: 1px solid #ddd;
        flex-wrap: wrap;
    }
    
    .nav-tabs > li {
        width: 100%;
        margin-bottom: 0;
    }
    
    .nav-tabs > li > a {
        margin-right: 0;
        border-radius: 0;
        padding: 12px 15px;
        display: block;
        text-align: center;
    }
    
    .nav-tabs > li.active > a {
        border-top: 3px solid #3c8dbc;
        border-left: 1px solid #ddd;
        border-right: 1px solid #ddd;
        border-bottom: 1px solid #fff;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-control {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .form-horizontal .control-label {
        text-align: left;
        margin-bottom: 8px;
        font-size: 13px;
        font-weight: 600;
    }
    
    .btn {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .btn-sm {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    /* Modals */
    .modal-dialog {
        margin: 10px auto;
        width: auto;
        max-width: 95%;
    }
    
    .modal-lg .modal-dialog {
        max-width: 95%;
    }
    
    .modal-body {
        padding: 15px;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .modal-footer .btn {
        flex: 1;
        min-width: 80px;
        font-size: 12px;
    }
    
    /* Alerts */
    .alert {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    /* Filter box */
    .filter-box {
        margin-bottom: 15px;
    }
    
    .filter-box .row {
        margin: 0;
    }
    
    .filter-box .col-sm-3,
    .filter-box .col-sm-6 {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Standard mobile (376px - 480px) */
@media (max-width: 480px) and (min-width: 376px) {
    .content-wrapper {
        padding: 8px;
    }
    
    .box-header {
        padding: 12px;
    }
    
    .box-header .box-title {
        font-size: 14px;
    }
    
    .box-header .btn {
        font-size: 11px;
        padding: 6px 10px;
        min-width: 60px;
    }
    
    table.dataTable {
        font-size: 11px;
    }
    
    table.dataTable thead th {
        font-size: 10px;
        padding: 6px 3px;
    }
    
    table.dataTable tbody td {
        padding: 6px 3px;
        font-size: 11px;
    }
    
    .dataTables_length select,
    .dataTables_filter input {
        max-width: 150px;
        font-size: 12px;
    }
    
    .dataTables_info {
        font-size: 10px;
    }
    
    .dataTables_paginate .pagination li a,
    .dataTables_paginate .pagination li span {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    .modal-body {
        padding: 12px;
    }
    
    .form-control {
        font-size: 13px;
        padding: 8px 10px;
    }
}

/* Small mobile (320px - 375px) */
@media (max-width: 375px) {
    .content-wrapper {
        padding: 5px;
    }
    
    .box {
        margin-bottom: 10px;
    }
    
    .box-header {
        padding: 10px;
    }
    
    .box-header .box-title {
        font-size: 13px;
    }
    
    .box-header .btn {
        font-size: 10px;
        padding: 5px 8px;
        min-width: 50px;
    }
    
    .box-body {
        padding: 10px;
    }
    
    /* DataTables - hide less important columns on very small screens */
    table.dataTable {
        font-size: 10px;
    }
    
    table.dataTable thead th,
    table.dataTable tbody td {
        padding: 5px 2px;
        font-size: 10px;
    }
    
    /* Hide non-essential columns via CSS */
    .hide-on-mobile {
        display: none !important;
    }
    
    .dataTables_length select,
    .dataTables_filter input {
        max-width: 120px;
        font-size: 11px;
    }
    
    .dataTables_info {
        font-size: 9px;
        padding: 8px;
    }
    
    .dataTables_paginate .pagination li a,
    .dataTables_paginate .pagination li span {
        padding: 4px 6px;
        font-size: 10px;
    }
    
    /* Modals */
    .modal-dialog {
        margin: 5px auto;
        max-width: 98%;
    }
    
    .modal-body {
        padding: 10px;
        max-height: 65vh;
    }
    
    .modal-footer {
        padding: 10px;
    }
    
    .modal-footer .btn {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    /* Forms */
    .form-control {
        font-size: 12px;
        padding: 8px;
    }
    
    .btn {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    /* Header */
    .main-header .navbar {
        padding: 8px;
    }
    
    .test-env-banner span {
        font-size: 11px !important;
    }
}

/* Prevent horizontal scroll on all devices */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

.content-wrapper,
.right-side,
.main-footer {
    overflow-x: hidden;
    max-width: 100%;
}

/* Ensure tables don't cause horizontal scroll */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
}

/* DataTables horizontal scroll container */
.dataTables_wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* Ensure DataTable table allows horizontal scroll */
.dataTables_wrapper table {
    min-width: 100%;
}

/* DataTables container for wide tables */
.dataTables_wrapper .dataTables_scrollBody {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Force table to maintain width when columns extend */
table.dataTable {
    min-width: 100%;
    table-layout: auto;
}

/* Prevent text wrapping in table cells to allow horizontal scroll */
table.dataTable td,
table.dataTable th {
    white-space: nowrap;
    max-width: none;
}

/* Allow text wrapping for specific columns if needed */
table.dataTable td.wrap-text,
table.dataTable th.wrap-text {
    white-space: normal;
    word-wrap: break-word;
}

/* Responsive signature canvas for mobile */
@media (max-width: 768px) {
    .signature-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        height: 150px !important;
    }
    
    .signature-pad {
        width: 100% !important;
        max-width: 100% !important;
        height: 150px !important;
    }
}

/* Responsive BOL modal */
@media (max-width: 768px) {
    #modal-bol .invoice-box {
        font-size: 11px;
        line-height: 18px;
        padding: 5px;
    }
    
    #modal-bol .invoice-box table tr td {
        padding: 2px 3px;
    }
    
    #modal-bol .invoice-box table tr.top table td.title {
        font-size: 24px;
    }
}

/* Responsive action cards */
@media (max-width: 768px) {
    .action-cards,
    .print-cards {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-card,
    .print-card,
    .print-card-center {
        max-width: 100%;
    }
    
    .action-btn-group,
    .print-btn-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .action-btn-group .btn,
    .print-btn-group .btn {
        width: 100%;
    }
}

/* Ensure all modals are responsive */
.modal {
    z-index: 1050;
}

.modal-dialog {
    margin: 30px auto;
}

@media (max-width: 768px) {
    .modal-dialog {
        margin: 10px auto;
        width: auto;
    }
    
    .modal-content {
        border-radius: 0;
    }
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination {
        margin: 5px 0;
    }
    
    .pagination > li > a,
    .pagination > li > span {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Responsive badges and labels */
@media (max-width: 768px) {
    .badge,
    .label {
        font-size: 10px;
        padding: 3px 6px;
    }
}

/* Responsive input groups */
@media (max-width: 768px) {
    .input-group {
        width: 100%;
    }
    
    .input-group .form-control {
        width: 100%;
    }
}

/* Responsive dropdowns */
@media (max-width: 768px) {
    .dropdown-menu {
        min-width: 150px;
        font-size: 13px;
    }
    
    .dropdown-menu > li > a {
        padding: 8px 12px;
    }
}

/* Responsive tooltips */
@media (max-width: 768px) {
    .tooltip-inner {
        font-size: 11px;
        padding: 5px 8px;
    }
}

/* Responsive alerts */
@media (max-width: 768px) {
    .alert {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .alert h4 {
        font-size: 14px;
    }
}

/* Responsive progress bars */
@media (max-width: 768px) {
    .progress {
        height: 15px;
    }
    
    .progress-bar {
        font-size: 10px;
        line-height: 15px;
    }
}

/* Responsive well and panel components */
@media (max-width: 768px) {
    .well,
    .panel {
        margin-bottom: 15px;
        padding: 15px;
    }
}

/* Responsive callout */
@media (max-width: 768px) {
    .callout {
        padding: 15px;
    }
    
    .callout h4 {
        font-size: 16px;
    }
}

/* Ensure footer is responsive */
@media (max-width: 768px) {
    .main-footer {
        padding: 10px;
        font-size: 12px;
        text-align: center;
    }
}

/* Responsive breadcrumb */
@media (max-width: 768px) {
    .breadcrumb {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .breadcrumb > li + li:before {
        padding: 0 5px;
    }
}
