body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  overflow-x: hidden;
  overflow-y: auto;
  background: #f5f1e6;
  color: #173f32;
  height: 100%;
  width: 100%;
}

a {
  color: #0e5a43;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #0a4433;
  text-decoration: none;
}

.padding-top {
  padding-top: 20px;
}

.login-page {
  width: 420px;
  margin: 4% auto;
  padding: 30px 28px 24px;
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid #e6ddcb;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(23, 63, 50, 0.12);
}

.login-page .text-center {
  margin-bottom: 18px;
}

.login-page h3 {
  margin-top: 0;
  color: #0f4f3c;
  font-weight: 700;
}

.login-page p {
  color: #5f685f;
}

.login-brand {
  text-align: center;
  margin-bottom: 20px;
}

.login-brand img {
  max-width: 100%;
  width: 290px;
  height: auto;
}

.box {
  padding: 20px;
  background-color: #f9f9f9;
  border: 1px solid #f2f2f2;
}

.page {
  position: relative;
  display: block;
  top: 50px;
  left: 0;
  padding: 35px 15px 20px 270px;
}

.bg-green {
  background-color: #a3c86d;
}

.bg-blue {
  background-color: #7acbee;
}

.bg-yellow {
  background-color: #fdd761;
}

.bg-red {
  background-color: #ff7857;
}

.panel {
  border-radius: 14px;
  border: 1px solid #e6ddcb;
  box-shadow: 0 10px 24px rgba(23, 63, 50, 0.07);
}

.panel-default > .panel-heading {
  background-color: #fcfbf7;
  border-bottom: 2px solid #d9a316;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 15px;
}

.panel-box {
  width: 100%;
  height: 100%;
  text-align: center;
  border: none;
}

.panel-value {
  width: 60%;
}

.panel-icon {
  padding: 30px;
  width: 40%;
  border-radius: 0;
  -webkit-border-radius: 3px 0 0 3px;
  -moz-border-radius: 3px 0 0 3px;
  border-radius: 3px 0 0 3px;
}

.panel-value {
  -webkit-border-radius: 0 3px 3px 0;
  -moz-border-radius: 0 3px 3px 0;
  border-radius: 0 3px 3px 0;
}

.panel-value h2 {
  margin-top: 30px;
}

.panel-icon i {
  line-height: 65px;
  font-size: 40px;
  color: #fff;
}

#header {
  position: fixed;
  z-index: 99;
  top: 0;
  left: 0;
  background: linear-gradient(90deg, #0c4b39 0%, #12624a 100%);
  width: 100%;
  min-height: 78px;
  box-shadow: 0 8px 20px rgba(13, 54, 42, 0.22);
}

header > .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 250px;
  min-height: 78px;
  padding: 10px 14px;
  background-color: rgba(255, 255, 255, 0.04);
}

header > .logo img {
  max-width: 100%;
  max-height: 58px;
}

.header-content {
  min-height: 78px;
  padding: 9px 20px 9px 0;
}

.header-date {
  color: #f4efe1;
  margin-left: 24px;
  line-height: 60px;
}

.info-menu {
  height: 60px;
  margin: 0;
  line-height: 60px;
  padding: 0 15px;
}

.mobile-menu-toggle {
  display: none;
}

.mobile-sidebar-backdrop {
  display: none;
  cursor: pointer;
}

.info-menu li.profile {
  position: relative;
}

.profile a.toggle {
  text-decoration: none;
  text-align: center;
  font-size: 14px;
  color: #173f32;
  position: relative;
  padding: 8px 12px 8px 0;
  margin: 0;
  background: #f8f3e8;
  border-radius: 30px;
  box-shadow: inset 0 0 0 1px rgba(217, 163, 22, 0.25);
}

.info-menu li.profile a img {
  width: 30px;
  height: 30px;
}

.dropdown-menu {
  margin-top: 4px;
  border-color: #fefefe;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(86, 96, 117, 0.15);
  -moz-box-shadow: 0 8px 24px rgba(86, 96, 117, 0.15);
  -webkit-box-shadow: 0 8px 24px rgba(86, 96, 117, 0.15);
}

.dropdown-menu li {
  margin: 0;
  padding: 0;
  display: block;
  line-height: 35px;
}

.dropdown-menu li a {
  text-decoration: none;
  display: block;
  font-size: 14px;
  position: relative;
  line-height: 30px;
  width: 100%;
  border-bottom: 1px solid #f4faf9;
}

.dropdown-menu li a i {
  margin-right: 5px;
}

.dropdown-menu li.last a {
  border-bottom: 0;
}

.datepicker {
  text-align: center;
}

.sidebar {
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  padding: 78px 0 0;
  height: 100%;
  width: 250px;
  background: linear-gradient(180deg, #0f4d3b 0%, #173f32 100%);
  border-right: 1px solid #0d3429;
  text-align: center;
}

.sidebar ul li:hover,
.submenu ul li:hover {
  -webkit-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar ul li {
  display: block;
}

.sidebar ul li:hover,
ul.submenu {
  background-color: rgba(255, 255, 255, 0.05);
}

.sidebar ul li a:hover {
  color: #ffffff;
}

.sidebar ul li a,
ul.submenu li a {
  color: #d6dfd6;
  display: block;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
  text-decoration: none;
  text-align: left;
}

.sidebar ul li a span,
.sidebar ul li i {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 1.5px;
  text-shadow: 0 1px rgba(0, 0, 0, 1);
}

.sidebar ul li a i {
  color: #d9a316;
  padding: 15px 22px;
  text-align: center;
}

ul.submenu {
  display: none;
  position: relative;
}

ul.submenu li a:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

ul.submenu li a {
  padding-left: 45px;
}

ul.submenu li:before {
  content: "";
  display: block;
  position: absolute;
  z-index: 1;
  left: 25px;
  top: 0;
  bottom: 0;
  border: 1px dotted #d7d7d7;
  border-width: 0 0 0 1px;
}

ul.submenu li a:before {
  content: "";
  display: inline-block;
  position: absolute;
  width: 7px;
  left: 25px;
  top: 18px;
  border-top: 1px dotted #d7d7d7;
}

.sale_report_header {
  padding: 15px 0;
}

table td h6 {
  margin: 0 0 0.2em 0;
}

table tfoot tr td:first-child {
  border: 0;
}

table tfoot tr td:last-child {
  border-top: 1px solid #ccc;
}

table td h6,
table tfoot tr td:last-child {
  color: #000;
  _font-size: 1.2em;
  font-weight: normal;
}

.form-control {
  color: #646464;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
  -moz-transition: all 0.15s ease-out;
  -webkit-transition: all 0.15s ease-out;
  transition: all 0.15s ease-out;
}

.form-control:focus {
  background: #f8f8f8;
  border-color: #d9a316;
  outline: 0;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: 0 0 0 3px rgba(217, 163, 22, 0.12);
}

.btn {
  border-radius: 6px;
  -webkit-transition: all 300ms ease-in-out;
  -moz-transition: all 300ms ease-in-out;
  transition: all 300ms ease-in-out;
}

.btn-primary {
  color: #fff;
  background-color: #137458;
  border-color: #0f5d46;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus,
.btn-primary:active,
.btn-primary.active {
  color: #fff;
  background-color: #0f5d46;
  border-color: #0d4b39;
}

.btn-success {
  background-color: #2ecc71;
}

.btn-success:hover,
.btn-success:focus,
.btn-success.focus,
.btn-success:active,
.btn-success.active {
  background-color: #27ae60;
}

.btn-warning {
  background-color: #d9a316;
  border-color: #c69414;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning.focus,
.btn-warning:active,
.btn-warning.active {
  background-color: #b8860e;
  border-color: #c69414;
}

.btn-danger {
  background-color: #ed5153;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger.focus,
.btn-danger:active,
.btn-danger.active {
  background-color: #bb282a;
}

.btn-info {
  background-color: #137458;
  border-color: #0f5d46;
}

.btn-info:hover,
.btn-info:focus,
.btn-info.focus,
.btn-info:active,
.btn-info.active {
  background-color: #0f5d46;
  border-color: #0d4b39;
}

.input-group-addon {
  background-color: #fcfcfc;
  border: 1px solid #dbdbdb;
  border-radius: 0;
}

input[type=file] {
  text-indent: -99999px;
}

td img.img-thumbnail {
  width: 125px;
  height: 125px;
  vertical-align: top;
}

.img-avatar {
  width: 50px;
  height: 50px;
}

.jumbotron {
  margin-bottom: 0;
  background: linear-gradient(135deg, #fffdfa 0%, #f5f0e4 100%);
  border-radius: 14px;
}

.brand-hero {
  padding: 45px 20px;
}

.brand-hero img {
  width: 100%;
  max-width: 560px;
  height: auto;
}

.brand-hero p {
  margin-top: 18px;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5d665f;
}

.list-group-item:first-child,
.list-group-item:last-child {
  border-radius: 0;
}

.profile .jumbotron {
  border-radius: 3px 3px 0 0;
}

.profile .jumbotron h3 {
  color: white;
}

img.img-size-2 {
  width: 125px;
  height: 125px;
}

@media (max-width: 767px) {
  .login-page {
    width: calc(100% - 24px);
    margin: 18px auto;
    padding: 24px 18px;
  }

  .page {
    padding: 88px 15px 20px;
  }

  #header {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 18px;
    margin: 0;
  }

  header > .logo {
    width: auto;
    min-height: 72px;
    padding: 8px 6px;
    background: transparent;
    flex: 1 1 auto;
    justify-content: flex-start;
  }

  header > .logo img {
    max-height: 50px;
  }

  .header-content {
    min-height: auto;
    width: auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
  }

  .header-date {
    display: none;
  }

  .info-menu {
    height: auto;
    line-height: normal;
    padding: 0;
  }

  .profile a.toggle {
    padding: 6px 10px 6px 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .profile a.toggle span {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar {
    position: fixed;
    top: 72px;
    left: 0;
    width: 260px;
    height: calc(100vh - 72px);
    padding-top: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 1100;
    overflow-y: auto;
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  .mobile-sidebar-backdrop {
    position: fixed;
    inset: 72px 0 0 0;
    background: rgba(10, 28, 22, 0.35);
    z-index: 1090;
  }

  body.mobile-menu-open .mobile-sidebar-backdrop {
    display: block;
  }

  .brand-hero {
    padding: 24px 10px;
  }

  .brand-hero p {
    font-size: 14px;
    letter-spacing: 0.04em;
  }
}

.quotation-workspace .panel {
  min-height: 100%;
}

.quotation-panel {
  border-radius: 18px;
  overflow: hidden;
}

.quotation-panel-primary {
  border-top: 4px solid #d9a316;
}

.quotation-panel-secondary {
  border-top: 4px solid #137458;
}

.quotation-panel-heading {
  background: #fffdfa !important;
  padding-top: 18px !important;
  padding-bottom: 18px !important;
}

.quotation-code-badge {
  margin-top: 8px;
  display: inline-block;
  background: #137458;
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sale-origin-badge {
  margin-top: 8px;
  margin-left: 8px;
  display: inline-block;
  background: #f4e7bd;
  color: #7e5a00;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}

.quotation-header-actions .btn {
  margin-left: 6px;
}

.quotation-meta-grid .form-group label,
.quotation-summary-row label {
  color: #0f4f3c;
  font-weight: 700;
}

.quotation-items-card {
  margin-top: 8px;
  border: 1px solid #eadfc7;
  border-radius: 14px;
  background: #fffefb;
  padding: 18px 18px 8px;
}

.quotation-items-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.quotation-items-header h4 {
  margin: 0;
  color: #0f4f3c;
}

.quotation-items-count {
  color: #5d665f;
  font-weight: 700;
}

.quotation-items-table th {
  background: #f8f3e8;
  color: #0f4f3c;
}

.quotation-items-table td {
  vertical-align: middle !important;
}

.quotation-code {
  font-weight: 700;
  color: #137458;
}

.quotation-empty-state {
  text-align: center;
  color: #7a807c;
  padding: 12px 10px 18px;
}

.quotation-summary-row {
  margin-top: 18px;
}

.quotation-totals-box {
  border: 1px solid #eadfc7;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffdfa 0%, #f6f0e5 100%);
  padding: 16px 18px;
}

.quotation-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: #173f32;
}

.quotation-total-line:last-child {
  margin-bottom: 0;
}

.quotation-total-highlight {
  padding-top: 12px;
  border-top: 1px solid #dccdaf;
  font-size: 18px;
}

.quotation-form-actions {
  margin-top: 24px;
  text-align: right;
}

.quotation-search-toolbar {
  margin-bottom: 10px;
}

.quotation-search-helper {
  margin-bottom: 14px;
  padding: 12px 14px;
  background: #f1f8f5;
  color: #416a5c;
  border-radius: 12px;
  font-size: 13px;
}

.quotation-search-results {
  max-height: 700px;
  overflow-y: auto;
  border: 1px solid #eadfc7;
  border-radius: 12px;
  margin-bottom: 14px;
}

.quotation-search-results.is-hidden {
  display: none;
}

.quotation-search-results table {
  margin-bottom: 0;
}

.quotation-search-results thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.quotation-search-placeholder {
  padding: 35px 10px !important;
}

.quotation-recent-header {
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.quotation-recent-results {
  max-height: 700px;
  overflow-y: auto;
  border: 1px solid #eadfc7;
  border-radius: 12px;
}

.quotation-recent-results table {
  margin-bottom: 0;
}

.product-image-preview-card {
  border: 1px solid #eadfc7;
  border-radius: 14px;
  background: #fffefb;
  padding: 14px;
  text-align: center;
}

.product-image-preview-label {
  display: block;
  margin-bottom: 10px;
  color: #0f4f3c;
  font-weight: 700;
}

.product-image-preview {
  width: 100%;
  max-width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #dccdaf;
  background: #f6f0e5;
}

.product-profit-box {
  margin-top: 10px;
  border: 1px solid #eadfc7;
  border-radius: 14px;
  background: #fffefb;
  padding: 14px 16px;
  text-align: center;
}

.product-profit-label {
  display: block;
  color: #5f665f;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.product-profit-box strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  line-height: 1;
}

.product-profit-box small {
  display: block;
  margin-top: 6px;
  font-size: 14px;
}

.product-profit-box.is-positive {
  border-color: #b8dfc8;
  background: #f1fbf5;
  color: #1d6f43;
}

.product-profit-box.is-neutral {
  border-color: #eadfc7;
  background: #fffefb;
  color: #7b6b42;
}

.product-profit-box.is-negative {
  border-color: #e6bcbc;
  background: #fff3f3;
  color: #b64444;
}

.product-mobile-actions .btn {
  min-width: 170px;
}

.product-category-shortcuts {
  margin-top: 10px;
}

.product-category-shortcuts-label {
  display: block;
  margin-bottom: 8px;
  color: #5f665f;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.product-category-shortcut {
  margin: 0 6px 6px 0;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
}

.product-category-shortcut.is-active {
  background: #137458;
  border-color: #137458;
  color: #fff;
}

.product-category-shortcut-tone-1 {
  background: #fbe6e3;
  border-color: #efc9c1;
  color: #8f4e47;
}

.product-category-shortcut-tone-2 {
  background: #fdf1d9;
  border-color: #f0ddb0;
  color: #8a6a1e;
}

.product-category-shortcut-tone-3 {
  background: #e8f4df;
  border-color: #cde5bc;
  color: #4d7440;
}

.product-category-shortcut-tone-4 {
  background: #dff3f1;
  border-color: #bfe3dd;
  color: #2d6f68;
}

.product-category-shortcut-tone-5 {
  background: #e4ecfb;
  border-color: #c9d8f1;
  color: #48648f;
}

.product-category-shortcut-tone-6 {
  background: #f2e6fb;
  border-color: #decaef;
  color: #7a4f93;
}

.sale-barcode-card {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #eadfc7;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffdfa 0%, #f6f0e5 100%);
}

.sale-barcode-card label {
  display: block;
  margin-bottom: 8px;
  color: #0f4f3c;
  font-weight: 700;
}

.sale-barcode-card .help-block {
  margin: 8px 0 0;
}

.quotation-list-table .quotation-status,
.quotation-view-meta .quotation-status {
  display: inline-block;
  min-width: 90px;
}

.quotation-status-borrador {
  background: #c4a24a;
}

.quotation-status-enviada {
  background: #3f7db3;
}

.quotation-status-aprobada {
  background: #2d9b62;
}

.quotation-status-rechazada {
  background: #c94c4c;
}

.quotation-view-meta h4 {
  margin-top: 0;
  color: #0f4f3c;
}

.quotation-notes-box {
  margin-top: 18px;
  border: 1px solid #eadfc7;
  border-radius: 14px;
  padding: 16px;
  background: #fffefb;
}

.quotation-notes-box p {
  margin: 10px 0 0;
}

@media (max-width: 991px) {
  .quotation-header-actions {
    margin-top: 10px;
  }

  .quotation-header-actions .btn {
    margin: 0 6px 6px 0;
  }

  body.mobile-product-entry-page .sidebar {
    display: block;
  }

  body.mobile-product-entry-page #header {
    position: fixed;
  }

  body.mobile-product-entry-page .header-content {
    padding: 0;
    min-height: 0;
  }

  body.mobile-product-entry-page .info-menu {
    margin: 0;
  }

  body.mobile-product-entry-page .profile {
    margin-top: 4px;
  }

  body.mobile-product-entry-page .profile > a.toggle {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
  }

  body.mobile-product-entry-page .header-date {
    display: none;
  }

  body.mobile-product-entry-page .page {
    margin-left: 0;
    padding: 12px 12px 110px;
  }

  body.mobile-product-entry-page .container-fluid {
    padding-left: 0;
    padding-right: 0;
  }

  body.mobile-product-entry-page .col-md-10.col-md-offset-1 {
    padding-left: 0;
    padding-right: 0;
  }

  body.mobile-product-entry-page .quotation-panel {
    border-radius: 16px 16px 0 0;
  }

  body.mobile-product-entry-page .row {
    margin-left: 0;
    margin-right: 0;
  }

  body.mobile-product-entry-page .panel-body {
    padding-top: 14px;
  }

  body.mobile-product-entry-page .product-mobile-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    margin: 0;
    padding: 12px;
    background: rgba(255, 253, 250, 0.98);
    border-top: 1px solid #dccdaf;
    box-shadow: 0 -8px 24px rgba(22, 48, 40, 0.12);
    display: flex;
    gap: 10px;
  }

  body.mobile-product-entry-page .product-mobile-actions .btn {
    flex: 1;
    min-width: 0;
    margin: 0;
  }

  body.mobile-product-entry-page .quotation-search-helper {
    margin-bottom: 24px;
  }

  body.mobile-product-entry-page .mobile-category-shortcuts {
    display: block;
  }
}

@media (min-width: 992px) {
  .mobile-category-shortcuts {
    display: none;
  }
}

@media (max-width: 767px) {
  .sale-products-table {
    table-layout: fixed;
  }

  .sale-products-table td,
  .sale-products-table th {
    font-size: 13px;
    vertical-align: middle !important;
  }

  .sale-products-table .sale-mobile-hide {
    display: none;
  }

  .sale-products-table td strong {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    word-break: break-word;
  }

  .sale-products-table td small {
    font-size: 11px;
  }

  .sale-products-table .sale-action-col {
    width: 88px !important;
    min-width: 88px;
  }

  .sale-products-table .sale-add-product {
    white-space: nowrap;
    padding-left: 10px;
    padding-right: 10px;
    font-weight: 700;
  }

  #sale-form .quotation-items-card .table-responsive {
    overflow-x: visible;
  }

  #sale-form .quotation-items-table {
    table-layout: fixed;
  }

  #sale-form .quotation-items-table th,
  #sale-form .quotation-items-table td {
    font-size: 12px;
    vertical-align: top !important;
  }

  #sale-form .quotation-items-table th:nth-child(1),
  #sale-form .quotation-items-table td:nth-child(1) {
    width: 72px !important;
  }

  #sale-form .quotation-items-table th:nth-child(2),
  #sale-form .quotation-items-table td:nth-child(2) {
    width: auto !important;
  }

  #sale-form .quotation-items-table td:nth-child(2) strong {
    display: block;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
  }

  #sale-form .quotation-items-table th:nth-child(3),
  #sale-form .quotation-items-table td:nth-child(3),
  #sale-form .quotation-items-table th:nth-child(4),
  #sale-form .quotation-items-table td:nth-child(4),
  #sale-form .quotation-items-table th:nth-child(5),
  #sale-form .quotation-items-table td:nth-child(5) {
    width: 92px !important;
  }

  #sale-form .quotation-items-table th:nth-child(6),
  #sale-form .quotation-items-table td:nth-child(6) {
    width: 48px !important;
  }

  #sale-form .quotation-items-table .form-control {
    padding-left: 6px;
    padding-right: 6px;
    font-size: 12px;
  }

  #sale-form .quotation-items-table thead {
    display: none;
  }

  #sale-form .quotation-items-table,
  #sale-form .quotation-items-table tbody,
  #sale-form .quotation-items-table tr,
  #sale-form .quotation-items-table td {
    display: block;
    width: 100% !important;
  }

  #sale-form .quotation-items-table tr.sale-item-row {
    border: 1px solid #eadfc7;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
    background: #fffefb;
  }

  #sale-form .quotation-items-table td {
    border: 0 !important;
    padding: 0 0 8px !important;
    text-align: left !important;
  }

  #sale-form .quotation-items-table td:last-child {
    padding-bottom: 0 !important;
  }

  #sale-form .sale-item-mobile-label {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #6e766f;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  #sale-form .sale-item-code-cell,
  #sale-form .sale-item-name-cell {
    width: 100%;
  }

  #sale-form .sale-item-name-cell strong {
    display: block;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
    font-size: 14px;
  }

  #sale-form .sale-item-qty-cell,
  #sale-form .sale-item-price-cell,
  #sale-form .sale-item-total-cell,
  #sale-form .sale-item-remove-cell {
    width: 100%;
  }

  #sale-form .sale-item-inline-field {
    width: 50% !important;
    float: left;
    padding-right: 6px !important;
  }

  #sale-form .sale-item-price-cell.sale-item-inline-field {
    padding-right: 0 !important;
    padding-left: 6px !important;
  }

  #sale-form .sale-item-total-cell strong {
    font-size: 18px;
  }

  #sale-form .sale-item-total-cell {
    clear: both;
    padding-top: 8px !important;
  }

  #sale-form .sale-item-remove-cell {
    text-align: right !important;
    padding-top: 8px !important;
  }

  #sale-form .sale-item-remove-cell .btn {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ==========================================================
   iOS / Safari mobile fixes
   ========================================================== */

/* Evitar auto-zoom de Safari al hacer foco en inputs
   (Safari hace zoom cuando font-size < 16px)              */
@media (max-width: 767px) {
  .form-control,
  select,
  select.form-control,
  textarea,
  textarea.form-control,
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  input[type="search"],
  input[type="password"],
  input[type="date"],
  input[type="datetime-local"] {
    font-size: 16px !important;
  }

  /* Evitar delay de 300 ms en taps (mejor UX touch) */
  a,
  button,
  .btn,
  label {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
  }

  /* Scroll con inercia en iOS dentro de contenedores */
  .quotation-search-results,
  .quotation-recent-results,
  .sidebar,
  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }

  /* iPhone X+ / Dynamic Island – notch inferior (home indicator) */
  .product-mobile-actions {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .page {
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  /* Área de toque mínima de 44 px en botones de acción clave */
  .mobile-menu-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  /* Evitar que los inputs en la tabla de ventas/cotizaciones
     sean demasiado pequeños para tocar                        */
  #sale-form .form-control,
  #quotation-form .form-control {
    min-height: 38px;
  }

  /* Corrección de z-index del dropdown de usuario en header móvil */
  .dropdown-menu {
    z-index: 1200;
  }

  /* La barra lateral en móvil siempre empieza cerrada;
     refuerzo del translate en caso de que algún JS externo
     intente sobreescribir la propiedad                       */
  .sidebar:not(.sidebar--force-open) {
    transform: translateX(-100%);
  }
  body.mobile-menu-open .sidebar {
    transform: translateX(0) !important;
  }

  /* Evitar que el body haga scroll horizontal al abrir sidebar */
  body.mobile-menu-open {
    overflow: hidden;
  }
}

/* Safe-area padding para el encabezado fijo en
   iPhone con muesca lateral (landscape)          */
@supports (padding-left: env(safe-area-inset-left)) {
  @media (max-width: 767px) {
    #header {
      padding-left: calc(10px + env(safe-area-inset-left, 0px));
      padding-right: calc(10px + env(safe-area-inset-right, 0px));
    }
  }
}

/* Asegurar que tablas de productos/ventas/cotizaciones
   tengan scroll horizontal en móvil sin romper el layout */
@media (max-width: 767px) {
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 0;
  }

  /* Columnas de acciones (editar/borrar) – ancho mínimo táctil */
  .table td .btn-xs,
  .table td .btn-sm {
    min-width: 32px;
    min-height: 32px;
    padding: 4px 8px;
  }

  /* Imágenes de producto en tabla de listado */
  td img.img-thumbnail {
    width: 64px;
    height: 64px;
  }

  /* Login centrado y sin overflow horizontal */
  body:not(.mobile-product-entry-page) .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }
}
