/* ============================================
   VARIABLES DE COLOR (LOGO)
   ============================================ */
:root {
  --color-primary: #244373;
  --color-secondary: #F48543;
  --color-accent: #F9C311;
  --color-primary-dark: #1a3359;
  --color-primary-light: #2d5a8f;
  --color-secondary-dark: #d96d33;
  --color-secondary-light: #f69a65;
}

/* ============================================
   ESTILOS BASE
   ============================================ */
#loading-bar .bar {
  background: #5c6032;
  height: 5px;
  position: fixed;
  top: 50px;
}

.navbar-inverse {
  background-color: var(--color-primary);
}

#loading-bar-spinner .spinner-icon {
  border-top-color: var(--color-primary);
  border-left-color: var(--color-primary);
}

.skin-blue .main-header .logo {
  background-color: var(--color-primary);
  color: #fff;
  border-bottom: 0 solid transparent;
}

.skin-blue .main-header .navbar {
  background-color: var(--color-primary);
}

.skin-blue .main-header .logo:hover {
  background-color: var(--color-primary);
}

.floating-button {
  position: fixed;
  bottom: 60px;
  right: 40px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--color-secondary);
  color: white;
  border: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.3s ease;
}

.floating-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(244, 133, 67, 0.4);
}

td {
  padding: 0;
}

td input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ccc;
}

.centered-modal .modal-dialog {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 1rem);
  margin: 0 auto;
}

.centered-modal .modal-content {
  margin: 0 auto;
}

.searchable-select {
  position: relative;
}

.searchable-select .dropdown-menu {
  display: block;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
}

.selected-item {
  margin-top: 5px;
  padding: 5px;
  background: #f8f9fa;
  border-radius: 4px;
}

.centered-form {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  padding: 20px;
}

.form-container {
  width: 100%;
  max-width: 400px;
  background: #f8f9fa;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #dee2e6;
}

.form-group {
  margin-bottom: 20px;
}

.input-with-icon {
  position: relative;
  width: 100%;
}

.input-with-icon i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
}

.input-with-icon input {
  width: 100%;
  padding: 12px 40px 12px 40px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 13px;
  transition: border-color 0.3s ease;
}

.input-with-icon input:focus {
  outline: none;
  border-color: var(--color-secondary);
}

/* ============================================
   ESTILOS GENERALES
   ============================================ */
.srm-dashboard-modern,
.order-detail-modern,
.order-new-modern,
.order-conversion-modern,
.doc-list-modern,
.fields-modern,
.users-modern,
.products-modern,
.dashboard-activities,
.activity-detail-modern,
.activity-new-modern,
.culture-products-modern,
.profile-modern,
.reports-container,
.workers-modern {
  padding: 20px;
  background: #f0f2f5;
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
}

/* ============================================
   BOTÓN FLUTUANTE (FAB)
   ============================================ */
.fab-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
  color: white;
  border: none;
  font-size: 28px;
  box-shadow: 0 6px 20px rgba(244, 133, 67, 0.4);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.fab-button:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 8px 30px rgba(244, 133, 67, 0.6);
}

/* ============================================
   KPI CARDS
   ============================================ */
.kpi-row {
  margin-bottom: 25px;
}

.kpi-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.kpi-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.kpi-icon {
  width: 55px;
  height: 55px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  margin-right: 15px;
  flex-shrink: 0;
}

.kpi-content {
  flex: 1;
}

.kpi-value {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: #2d3748;
  line-height: 1.2;
}

.kpi-label {
  display: block;
  font-size: 13px;
  color: #718096;
  font-weight: 500;
}

.kpi-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 100%;
}

/* Colores KPI */
.bg-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}

.bg-success {
  background: linear-gradient(135deg, #48bb78, #38a169);
}

.bg-warning {
  background: linear-gradient(135deg, var(--color-accent), #d4a00e);
}

.bg-danger {
  background: linear-gradient(135deg, #fc8181, #e53e3e);
}

.bg-info {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
}

/* ============================================
   HEADERS
   ============================================ */
.page-header-modern,
.detail-header-modern,
.new-header-modern {
  background: white;
  padding: 18px 22px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 25px;
}

.detail-title,
.new-title,
.page-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-title i {
  color: var(--color-primary);
}

.new-title i {
  color: var(--color-secondary);
}

.page-title i {
  color: var(--color-secondary);
}

/* ============================================
   FILTROS Y BÚSQUEDA
   ============================================ */
.filter-bar-modern,
.search-modern,
.filters-activities,
.report-selector-modern,
.filters-modern {
  background: white;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 25px;
}

.filter-group,
.search-group {
  margin-bottom: 5px;
}

.filter-group label,
.search-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 4px;
}

.filter-group label i,
.search-group label i {
  color: var(--color-secondary);
  margin-right: 4px;
}




/* ============================================
   PANELES DE INFORMACIÓN
   ============================================ */
.detail-panel,
.info-panel-modern,
.section-modern,
.actions-activities,
.export-bar-modern,
.action-bar-modern,
.summary-cards,
.activity-types-grid {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.info-panel-modern {
  padding: 20px 22px;
  margin-bottom: 25px;
}

.info-group {
  margin-bottom: 12px;
}

.info-group:last-child {
  margin-bottom: 0;
}

.info-label-modern {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 6px;
}

.info-label-modern i {
  color: var(--color-secondary);
  margin-right: 5px;
}

/* ============================================
   EXPORT BAR
   ============================================ */
.export-bar-modern {
  padding: 12px 20px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.export-label {
  font-weight: 600;
  color: #4a5568;
  margin-right: 10px;
  font-size: 13px;
}

.export-label i {
  color: var(--color-secondary);
}

/* ============================================
   SECCIONES
   ============================================ */
.section-modern {
  padding: 20px 22px;
  margin-bottom: 25px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title i {
  color: var(--color-secondary);
}

/* ============================================
   ACTION BAR FINAL
   ============================================ */
.action-bar-modern {
  padding: 15px 22px;
  margin-bottom: 0;
}

/* ============================================
   INPUTS Y SELECTS
   ============================================ */
.select-modern,
.input-modern,
.input-field,
.input-edit,
.input-price,
.search-group .form-control,
.modal-supplier-order .input-modern,
.modal-supplier-order .select-modern,
.modal-field-value .input-modern,
.modal-field-card .select-modern,
.modal-field-row-product .select-modern,
.modal-field-row-product .input-modern {
  border-radius: 6px;
  border: 2px solid #e2e8f0;
  padding: 6px 10px;
  transition: all 0.3s ease;
  background: #f7fafc;
  width: 100%;
  font-size: 13px;
  height: 34px;
}

/* ===== SELECTS - TEXTO COMPLETO ===== */
.select-modern,
.modal-supplier-order .select-modern,
.modal-field-card .select-modern,
.modal-field-row-product .select-modern,
.search-group .form-control[type="select"] {
  padding: 6px 30px 6px 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  min-height: 34px;
  font-size: 13px;
  color: #2d3748;
}

.select-modern option,
.modal-supplier-order .select-modern option {
  padding: 4px 8px;
  white-space: normal;
  word-wrap: break-word;
  font-size: 13px;
}

/* Select en tablas */
.table-modern .select-modern,
.table-edit-modern .select-modern,
.table-detail-modern .select-modern {
  padding: 4px 24px 4px 6px;
  min-height: 28px;
  font-size: 12px;
  background-size: 8px;
  background-position: right 6px center;
  height: 28px;
}

.select-modern:focus,
.input-modern:focus,
.input-field:focus,
.input-edit:focus,
.input-price:focus,
.search-group .form-control:focus,
.modal-supplier-order .input-modern:focus,
.modal-supplier-order .select-modern:focus,
.modal-field-value .input-modern:focus,
.modal-field-card .select-modern:focus,
.modal-field-row-product .select-modern:focus,
.modal-field-row-product .input-modern:focus {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(244, 133, 67, 0.1);
  background: white;
  outline: none;
}

/* Select deshabilitado */
.select-modern:disabled,
.modal-supplier-order .select-modern:disabled {
  background-color: #e9ecef;
  cursor: not-allowed;
  opacity: 0.6;
}

.input-edit.text-center,
.input-price.text-center {
  text-align: center;
}

.input-edit.text-right {
  text-align: right;
}

textarea.input-edit {
  resize: vertical;
  min-height: 34px;
  font-size: 13px;
  padding: 6px 10px;
}

/* ============================================
   BOTONES
   ============================================ */
.btn-filter,
.btn-primary-modern,
.btn-upload,
.btn-save,
.btn-save-lg,
.btn-save-price,
.btn-add-line,
.btn-add-line-sm,
.btn-action.btn-primary,
.btn-validate,
.btn-action-success,
.modal-supplier-order .btn-save,
.btn-save-profile {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 18px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(244, 133, 67, 0.3);
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-filter:hover,
.btn-primary-modern:hover,
.btn-upload:hover,
.btn-save:hover,
.btn-save-lg:hover,
.btn-save-price:hover,
.btn-add-line:hover,
.btn-add-line-sm:hover,
.btn-action.btn-primary:hover,
.btn-validate:hover,
.btn-action-success:hover,
.modal-supplier-order .btn-save:hover:not(:disabled),
.btn-save-profile:hover:not(:disabled) {
  background: var(--color-secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(244, 133, 67, 0.4);
  color: white;
}

.btn-filter:disabled,
.btn-save:disabled,
.btn-save-price:disabled,
.btn-upload:disabled,
.btn-validate:disabled,
.btn-save-profile:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-save-lg {
  padding: 8px 24px;
  font-size: 14px;
  height: 38px;
}

.btn-back,
.btn-cancel,
.btn-cancel-price,
.modal-supplier-order .btn-cancel {
  background: #e2e8f0;
  color: #4a5568;
  border: none;
  border-radius: 6px;
  padding: 6px 16px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
  cursor: pointer;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-back:hover,
.btn-cancel:hover,
.btn-cancel-price:hover,
.modal-supplier-order .btn-cancel:hover:not(:disabled) {
  background: #cbd5e0;
  transform: translateY(-2px);
}

.btn-save,
.btn-back,
.btn-print {
  margin-right: 6px;
}

.btn-save:last-child,
.btn-back:last-child,
.btn-print:last-child {
  margin-right: 0;
}

.btn-cancel {
  margin-right: 8px;
}

.btn-export {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 13px;
  color: #4a5568;
  transition: all 0.3s ease;
  margin-right: 6px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-export:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  transform: translateY(-2px);
}

.btn-print {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 16px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-print:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(36, 67, 115, 0.4);
  color: white;
}

.btn-action {
  padding: 5px 12px;
  border-radius: 6px;
  border: none;
  color: white;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
}

.btn-action:hover {
  transform: scale(1.05);
}

.btn-action.btn-danger {
  background: #fc8181;
}

.btn-action.btn-danger:hover {
  background: #e53e3e;
}

.btn-action.btn-info {
  background: #63b3ed;
}

.btn-action.btn-info:hover {
  background: #3182ce;
}

.btn-action.btn-success {
  background: #48bb78;
}

.btn-action.btn-success:hover {
  background: #38a169;
}

.btn-action.btn-primary {
  background: var(--color-secondary);
}

.btn-action.btn-primary:hover {
  background: var(--color-secondary-dark);
}

.btn-action-sm {
  padding: 3px 8px;
  border-radius: 4px;
  border: none;
  color: white;
  font-size: 11px;
  transition: all 0.3s ease;
  cursor: pointer;
  height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.btn-action-sm:hover {
  transform: scale(1.1);
}

.btn-action-sm.btn-danger {
  background: #fc8181;
}

.btn-action-sm.btn-danger:hover {
  background: #e53e3e;
}

.btn-action-sm.btn-info {
  background: #63b3ed;
}

.btn-action-sm.btn-info:hover {
  background: #3182ce;
}

.btn-action-sm.btn-success {
  background: #48bb78;
}

.btn-action-sm.btn-success:hover {
  background: #38a169;
}

.btn-action-sm.btn-primary {
  background: var(--color-secondary);
}

.btn-action-sm.btn-primary:hover {
  background: var(--color-secondary-dark);
}

.btn-action-table {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  border: none;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 2px;
}

.btn-action-table:hover {
  transform: scale(1.1);
}

.btn-action-table i {
  font-size: 13px;
}

.btn-edit {
  background: #e8f0fe;
  color: #1a73e8;
}

.btn-edit:hover {
  background: #d2e3fc;
}

.btn-delete {
  background: #fce8e8;
  color: #d32f2f;
}

.btn-delete:hover {
  background: #f9d1d1;
}

.btn-view {
  background: #e3f2fd;
  color: #0d47a1;
}

.btn-view:hover {
  background: #bbdefb;
  transform: scale(1.1);
}

/* ============================================
   TABLAS
   ============================================ */
.table-modern-wrapper,
.table-modern,
.orders-table {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.table-toolbar {
  padding: 12px 18px;
  background: #f7fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.record-count,
.total-registers {
  font-size: 13px;
  color: #718096;
  display: inline-block;
  padding: 4px 16px;
  background: #f5f5f5;
  border-radius: 20px;
  font-weight: 600;
}

.record-count i,
.total-registers i {
  color: var(--color-secondary);
  margin-right: 4px;
}

.table-modern table,
.table-detail-modern,
.table-edit-modern {
  width: 100%;
  margin-bottom: 0;
  border-collapse: collapse;
}

.table-modern thead th,
.table-detail-modern thead th,
.table-edit-modern thead th,
.modal-supplier-order .table-modern thead th {
  background: #f7fafc;
  color: #4a5568;
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 2px solid var(--color-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-modern tbody td,
.table-detail-modern tbody td,
.table-edit-modern tbody td,
.modal-supplier-order .table-modern tbody td {
  padding: 10px 14px;
  vertical-align: middle;
  border-bottom: 1px solid #edf2f7;
  font-size: 13px;
}

.table-modern tbody tr:hover,
.row-modern:hover,
.product-row-detail:hover,
.edit-row:hover,
.line-row:hover,
.modal-supplier-order .row-modern:hover td {
  background: #f7fafc;
}

.order-link {
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
}

.order-link:hover {
  text-decoration: underline;
}

.total-row td,
.total-row-detail td,
.total-row-edit td {
  font-weight: 700;
  font-size: 14px;
  border-top: 2px solid #e2e8f0;
  padding: 12px 14px;
  background: #f7fafc;
}

/* ============================================
   TARJETAS DE PEDIDO
   ============================================ */
.order-card-full {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  transition: all 0.3s ease;
  width: 100%;
}

.order-card-full:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.order-card-header {
  padding: 14px 18px;
  position: relative;
  color: white;
}

.order-status-badge {
  position: absolute;
  top: 14px;
  right: 18px;
}

.badge-status {
  background: rgba(255, 255, 255, 0.25);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.order-code {
  font-size: 16px;
  font-weight: 700;
}

.order-code a {
  color: white;
  text-decoration: none;
  cursor: pointer;
  font-size: 16px;
}

.order-code a:hover {
  text-decoration: underline;
}

.order-date {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 3px;
}

.order-card-body {
  padding: 18px;
  background: #f7fafc;
}

.order-info-row {
  display: flex;
  align-items: center;
  padding: 3px 0;
  font-size: 13px;
}

.label-icon {
  color: #718096;
  font-weight: 500;
  margin-right: 6px;
  font-size: 13px;
}

.label-value {
  color: #2d3748;
  font-weight: 600;
  font-size: 13px;
}

.order-lines-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.line-tag {
  background: white;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  color: #4a5568;
  border: 1px solid #e2e8f0;
}

.line-tag.more {
  background: var(--color-secondary);
  color: white;
  border: none;
}

.order-card-footer {
  padding: 12px 18px;
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-group-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.order-total {
  font-size: 18px;
  font-weight: 700;
  color: #2d3748;
  background: #f0f2f5;
  padding: 3px 14px;
  border-radius: 6px;
}

/* ============================================
   ESTADOS Y BADGES
   ============================================ */
.status-badge,
.status-badge-detail,
.profile-badge {
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
}

.status-badge i,
.status-badge-detail i {
  margin-right: 3px;
}

/* Estados de color */
.status-0 {
  background: #e2e8f0;
  color: #4a5568;
}

.status-1 {
  background: #fefcbf;
  color: #975a16;
}

.status-2 {
  background: #bee3f8;
  color: #2a69ac;
}

.status-3 {
  background: #fed7d7;
  color: #9b2c2c;
}

.status-4 {
  background: #c6f6d5;
  color: #276749;
}

.status-active {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-inactive {
  background: #fce4ec;
  color: #c62828;
}

.status-nova {
  background: #e3f2fd;
  color: #0d47a1;
  border-left: 4px solid #0d47a1;
  box-shadow: 0 2px 8px rgba(13, 71, 161, 0.3);
}

.status-cancelada {
  background: #fce4ec;
  color: #c62828;
  border-left: 4px solid #c62828;
  box-shadow: 0 2px 8px rgba(198, 40, 40, 0.3);
}

.status-exportada {
  background: #fff3e0;
  color: #e65100;
  border-left: 4px solid #e65100;
  box-shadow: 0 2px 8px rgba(230, 81, 0, 0.3);
}

.status-realizada {
  background: #e8f5e9;
  color: var(--color-primary);
  border-left: 4px solid var(--color-primary);
  box-shadow: 0 2px 8px rgba(36, 67, 115, 0.3);
}

.status-autorizada {
  background: #f3e5f5;
  color: #6a1b9a;
  border-left: 4px solid #6a1b9a;
  box-shadow: 0 2px 8px rgba(106, 27, 154, 0.3);
}

.status-badge-detail {
  padding: 5px 16px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  margin-left: 8px;
}

/* Badges de perfil */
.profile-badge.admin {
  background: #fce4ec;
  color: #c62828;
}

.profile-badge.manager {
  background: #fff3e0;
  color: #e65100;
}

.profile-badge.user {
  background: #e8f5e9;
  color: #2e7d32;
}

.profile-badge.guest {
  background: #f3e5f5;
  color: #6a1b9a;
}

.badge-count {
  background: var(--color-secondary);
  color: white;
  border-radius: 50%;
  padding: 1px 8px;
  font-size: 12px;
  margin-left: 4px;
}

.year-badge {
  display: inline-block;
  padding: 2px 10px;
  background: #e8f0fe;
  color: #1a73e8;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12px;
}

.quality-badge,
.consum-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
}

.quality-badge {
  background: #fff3e0;
  color: #e65100;
}

.consum-badge {
  background: #e8f5e9;
  color: var(--color-primary);
}

/* ============================================
   CÓDIGOS Y ETIQUETAS
   ============================================ */
.field-code,
.user-code,
.product-code,
.doc-code {
  font-weight: 600;
  color: var(--color-primary);
  font-family: 'Courier New', monospace;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* ============================================
   INFO ROWS
   ============================================ */
.info-row {
  display: flex;
  padding: 5px 0;
  border-bottom: 1px solid #f7fafc;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  width: 160px;
  font-weight: 600;
  color: #4a5568;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 13px;
}

.info-label i {
  color: var(--color-secondary);
  width: 16px;
}

.info-label.highlight {
  font-weight: 700;
  color: var(--color-secondary);
  font-size: 13px;
}

.info-label.highlight i {
  color: var(--color-secondary);
}

.info-value {
  flex: 1;
  color: #2d3748;
  font-weight: 500;
  font-size: 13px;
}

.info-value.highlight-value {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 14px;
  background: #f0f0f0;
  padding: 2px 10px;
  border-radius: 4px;
}

.info-row-highlight {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-left: 4px solid var(--color-secondary);
}

.info-row-highlight .info-group {
  margin-bottom: 0;
}

/* ============================================
   DETALLE PANEL
   ============================================ */
.detail-header,
.modal-header-modern,
.modal-supplier-order .modal-header-modern {
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
}

.detail-header h4 {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
}

.btn-close-detail,
.close-modern,
.modal-supplier-order .close-modern {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 20px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  line-height: 1;
}

.btn-close-detail:hover,
.close-modern:hover,
.modal-supplier-order .close-modern:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
  opacity: 1;
}

.detail-body,
.modal-body-modern,
.modal-supplier-order .modal-body-modern {
  padding: 20px;
}

/* ============================================
   MODALES
   ============================================ */
.modal-modern,
.modal-worker-modern,
.modal-field-activity,
.modal-supplier-order {
  padding: 0;
  max-width: 950px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-title-modern,
.modal-supplier-order .modal-title-modern {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title-modern i,
.modal-supplier-order .modal-title-modern i {
  color: white;
}

.modal-footer-modern,
.modal-supplier-order .modal-footer-modern {
  padding: 12px 20px;
  background: #f9f9f9;
  border-top: 1px solid #eee;
  border-radius: 0 0 6px 6px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-modal {
  padding: 6px 16px;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
  cursor: pointer;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-modal:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn-modal:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   UPLOAD DE ARCHIVOS
   ============================================ */
.upload-area {
  border: 2px dashed #e2e8f0;
  border-radius: 8px;
  padding: 18px;
  background: #f7fafc;
  text-align: center;
  transition: all 0.3s ease;
}

.upload-area:hover {
  border-color: var(--color-secondary);
  background: #f0f8f0;
}

.upload-label {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
  color: white;
  padding: 6px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
}

.upload-label:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(244, 133, 67, 0.4);
}

.upload-hint {
  color: #a0aec0;
  font-size: 12px;
}

.file-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: #f7fafc;
  border-radius: 8px;
  transition: all 0.3s ease;
  border-left: 4px solid var(--color-secondary);
}

.file-item:hover {
  background: #edf2f7;
  transform: translateX(5px);
}

.file-icon {
  width: 32px;
  height: 32px;
  background: var(--color-secondary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-right: 12px;
  flex-shrink: 0;
}

.file-name {
  flex: 1;
  color: #2d3748;
  font-weight: 500;
  font-size: 13px;
}

.file-actions {
  display: flex;
  gap: 6px;
}

.btn-file-view {
  background: #bee3f8;
  color: #2a69ac;
  border: none;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-file-view:hover {
  background: #63b3ed;
  transform: scale(1.05);
}

.btn-file-delete {
  background: #fed7d7;
  color: #9b2c2c;
  border: none;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-file-delete:hover {
  background: #fc8181;
  transform: scale(1.05);
}

/* ============================================
   TABS
   ============================================ */
.tabs-modern {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-top: 20px;
}

.tabs-modern .nav-tabs {
  background: #f5f5f5;
  border-bottom: 2px solid var(--color-secondary);
}

.tabs-modern .nav-tabs>li>a {
  border: none;
  border-radius: 0;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 13px;
  color: #555;
  transition: all 0.3s ease;
}

.tabs-modern .nav-tabs>li>a:hover {
  background: #e8e8e8;
}

.tabs-modern .nav-tabs>li.active>a {
  background: var(--color-secondary);
  color: white;
  border: none;
}

.tabs-modern .nav-tabs>li.active>a:hover {
  background: var(--color-secondary-dark);
}

.tabs-modern .tab-content {
  padding: 18px;
}

/* ============================================
   ESTADOS VACÍOS
   ============================================ */
.empty-state,
.empty-modern,
.empty-files {
  text-align: center;
  padding: 40px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.empty-icon,
.empty-icon-small {
  font-size: 48px;
  color: #cbd5e0;
  margin-bottom: 15px;
}

.empty-icon-small {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

.empty-state h4 {
  color: #2d3748;
  margin-bottom: 8px;
  font-size: 16px;
}

.empty-state p,
.empty-modern p,
.empty-files p,
.empty-table p {
  color: #718096;
  margin: 0 0 12px 0;
  font-size: 13px;
}

.empty-modern {
  padding: 30px 20px !important;
}

.empty-modern .empty-icon {
  font-size: 36px;
  color: #ccc;
  display: block;
  margin-bottom: 8px;
}

.empty-modern .text-muted {
  color: #aaa;
  font-size: 12px;
}

.empty-table {
  text-align: center;
  padding: 30px 20px !important;
  background: #f7fafc;
}

/* ============================================
   PERFIL
   ============================================ */
.profile-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  width: 100%;
}

.profile-box {
  background: white;
  border-radius: 12px;
  padding: 35px 40px 40px 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 500px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
}

.profile-avatar i {
  font-size: 38px;
  color: white;
}

.profile-name {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #333;
}

.profile-role {
  margin: 4px 0 0 0;
  font-size: 14px;
  color: #888;
}

.form-title {
  margin: 0 0 22px 0;
  font-size: 17px;
  font-weight: 600;
  color: #333;
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-secondary);
}

.form-title i {
  color: var(--color-secondary);
  margin-right: 6px;
}

.input-icon {
  position: relative;
}

.input-icon i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  z-index: 1;
  font-size: 14px;
}

.input-field {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #fafafa;
  height: 38px;
}

.input-field:focus {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(244, 133, 67, 0.1);
  outline: none;
  background: white;
}

/* ============================================
   BOTONES DE ACCIÓN EN LÍNEAS
   ============================================ */
.btn-remove-line {
  background: #fed7d7;
  color: #9b2c2c;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-remove-line:hover {
  background: #fc8181;
  transform: scale(1.1);
  color: white;
}

.btn-update-price {
  background: var(--color-secondary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 26px;
}

.btn-update-price:hover:not(:disabled) {
  background: var(--color-secondary-dark);
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(244, 133, 67, 0.3);
}

.btn-update-price:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ============================================
   CHECKBOX
   ============================================ */
.checkbox-label,
.modal-supplier-order .checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  padding: 4px 10px;
  background: #f5f5f5;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 13px;
}

.checkbox-label:hover,
.modal-supplier-order .checkbox-label:hover {
  background: #e8e8e8;
}

.checkbox-label input[type="checkbox"],
.modal-supplier-order .checkbox-label input[type="checkbox"],
.checkbox-modern {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-secondary);
}

.checkbox-label i,
.modal-supplier-order .checkbox-label i {
  color: var(--color-secondary);
}

/* ============================================
   ACTIVITY TYPES GRID
   ============================================ */
.activity-types-grid {
  padding: 18px;
  margin-bottom: 20px;
}

.activity-types-grid .row {
  margin: 0 -4px;
}

.activity-types-grid .col-md-3,
.activity-types-grid .col-sm-4,
.activity-types-grid .col-xs-6 {
  padding: 4px;
}

.btn-activity-type {
  width: 100%;
  padding: 10px 6px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  color: #4a5568;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}

.btn-activity-type i {
  font-size: 18px;
  color: #a0aec0;
  transition: all 0.3s ease;
}

.btn-activity-type:hover {
  border-color: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(244, 133, 67, 0.1);
}

.btn-activity-type:hover i {
  color: var(--color-secondary);
}

.btn-activity-type.active {
  border-color: var(--color-secondary);
  background: #fff3e0;
  box-shadow: 0 2px 8px rgba(244, 133, 67, 0.15);
}

.btn-activity-type.active i {
  color: var(--color-secondary);
}

/* ============================================
   MODAL FIELD ACTIVITY
   ============================================ */
.modal-image-container {
  text-align: center;
  padding: 15px 0 8px 0;
  background: #f7fafc;
}

.modal-field-row {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.modal-field-label {
  width: 120px;
  font-weight: 600;
  color: #555;
  font-size: 13px;
}

.modal-field-label i {
  color: var(--color-secondary);
  margin-right: 4px;
  width: 16px;
}

.modal-field-value {
  flex: 1;
}

.modal-field-value .input-modern,
.modal-field-card .select-modern,
.modal-field-row-product .select-modern,
.modal-field-row-product .input-modern {
  border: none;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  padding: 4px 6px;
  background: transparent;
}

.modal-field-value .input-modern:focus,
.modal-field-card .select-modern:focus,
.modal-field-row-product .select-modern:focus,
.modal-field-row-product .input-modern:focus {
  border-bottom-color: var(--color-secondary);
  box-shadow: none;
}

.modal-field-card {
  margin: 8px 16px;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
}

.modal-field-label-card {
  display: block;
  font-weight: 600;
  color: #555;
  font-size: 12px;
  margin-bottom: 3px;
}

.modal-field-label-card i {
  color: var(--color-secondary);
  margin-right: 4px;
}

.modal-field-row-product {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  margin: 8px 0;
}

.modal-field-product {
  flex: 2;
}

.modal-field-quantity {
  flex: 1;
  min-width: 60px;
}

/* ============================================
   ALERTAS Y HELP BLOCK
   ============================================ */
.alert-box {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-box i {
  font-size: 16px;
}

.alert-danger {
  background: #fce4ec;
  color: #c62828;
  border-left: 4px solid #c62828;
}

.alert-warning {
  background: #fff3e0;
  color: #e65100;
  border-left: 4px solid #e65100;
}

.alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 4px solid #2e7d32;
}

.help-block {
  display: block;
  margin-top: 4px;
  color: #555;
  font-size: 12px;
}

.help-block i {
  margin-right: 4px;
}

/* ============================================
   FILA MODIFICADA
   ============================================ */
.row-modified {
  background: #fff8e1 !important;
}

.row-modified:hover td {
  background: #fff3cd !important;
}

.modified-indicator {
  display: inline-block;
  margin-left: 3px;
  font-size: 11px;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.detail-panel {
  animation: slideDown 0.3s ease;
}

/* ============================================
   LOADING Y REPORTS
   ============================================ */
.loading-modern {
  padding: 40px 0;
  color: #7f8c8d;
}

.loading-modern i {
  display: block;
  margin-bottom: 12px;
}

.card-summary {
  background: white;
  padding: 12px 18px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--color-secondary);
}

.card-success {
  border-left-color: #28a745;
}

.card-danger {
  border-left-color: #dc3545;
}

.card-info {
  border-left-color: #17a2b8;
}

.card-label {
  font-size: 11px;
  color: #7f8c8d;
  text-transform: uppercase;
  font-weight: 600;
}

.card-value {
  font-size: 22px;
  font-weight: bold;
  color: #2c3e50;
  margin-top: 4px;
}

/* ============================================
   RESPONSIVE GENERAL
   ============================================ */
@media (max-width: 768px) {

  .srm-dashboard-modern,
  .order-detail-modern,
  .order-new-modern,
  .order-conversion-modern,
  .doc-list-modern,
  .fields-modern,
  .users-modern,
  .products-modern,
  .dashboard-activities,
  .activity-detail-modern,
  .activity-new-modern,
  .culture-products-modern,
  .profile-modern,
  .reports-container,
  .workers-modern {
    padding: 10px;
  }

  .detail-header-modern,
  .new-header-modern,
  .page-header-modern,
  .info-panel-modern,
  .export-bar-modern,
  .section-modern,
  .action-bar-modern,
  .filter-bar-modern,
  .search-modern,
  .filters-activities,
  .report-selector-modern,
  .filters-modern,
  .activity-types-grid {
    padding: 12px 14px;
    margin-bottom: 12px;
  }

  .action-bar-modern {
    margin-bottom: 0;
  }

  .detail-title,
  .new-title,
  .page-title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .detail-header-modern .text-right,
  .new-header-modern .text-right,
  .page-header-modern .text-right,
  .action-bar-modern .text-right,
  .doc-list-modern .page-header-modern .text-right,
  .fields-modern .page-header-modern .text-right,
  .users-modern .page-header-modern .text-right,
  .activity-detail-modern .page-header-modern .text-right,
  .activity-new-modern .page-header-modern .text-right,
  .culture-products-modern .page-header-modern .text-right,
  .workers-modern .page-header-modern .text-right {
    text-align: left !important;
    margin-top: 8px;
  }

  .btn-save,
  .btn-back,
  .btn-print,
  .btn-cancel,
  .btn-save-lg,
  .btn-primary-modern,
  .btn-filter,
  .btn-export,
  .btn-add-line,
  .activity-detail-modern .btn-back,
  .activity-detail-modern .btn-edit,
  .activity-detail-modern .btn-validate,
  .activity-detail-modern .btn-cancel-action,
  .activity-detail-modern .btn-masterway,
  .modal-supplier-order .btn-modal,
  .btn-modal {
    width: 100%;
    margin-bottom: 6px;
    margin-right: 0 !important;
    justify-content: center;
  }

  .btn-save-lg,
  .btn-save:last-child,
  .btn-back:last-child,
  .btn-print:last-child {
    margin-bottom: 0;
  }

  .btn-export {
    margin-left: 0 !important;
  }

  .btn-cancel {
    margin-right: 0;
  }

  .export-bar-modern {
    flex-direction: column;
    align-items: stretch;
  }

  .export-label {
    margin-bottom: 8px;
  }

  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-add-line,
  .btn-add-line-sm {
    width: 100%;
    justify-content: center;
  }

  .info-group {
    margin-bottom: 8px;
  }

  .info-panel-modern .row>div {
    margin-bottom: 12px;
  }

  .info-panel-modern .row>div:last-child {
    margin-bottom: 0;
  }

  .info-row {
    flex-direction: column;
    padding: 6px 0;
  }

  .info-label {
    width: 100%;
    margin-bottom: 3px;
  }

  .info-label.highlight {
    font-size: 12px;
  }

  .info-value.highlight-value {
    font-size: 13px;
    padding: 2px 6px;
  }

  .info-row-highlight {
    padding: 6px 10px;
  }

  .info-row-highlight .col-md-6 {
    margin-bottom: 6px;
  }

  .info-row-highlight .col-md-6:last-child {
    margin-bottom: 0;
  }

  .table-modern,
  .table-detail-modern,
  .table-edit-modern,
  .table-modern-wrapper,
  .tabs-modern .table-modern {
    overflow-x: auto;
    font-size: 12px;
  }

  .table-modern thead th,
  .table-detail-modern thead th,
  .table-edit-modern thead th,
  .modal-supplier-order .table-modern thead th,
  .table-modern tbody td,
  .table-detail-modern tbody td,
  .table-edit-modern tbody td,
  .modal-supplier-order .table-modern tbody td {
    padding: 6px 8px;
    white-space: nowrap;
  }

  .modal-body-modern .row>div,
  .modal-supplier-order .modal-body-modern .row>div {
    margin-bottom: 12px;
  }

  .modal-body-modern .row>div:last-child,
  .modal-supplier-order .modal-body-modern .row>div:last-child {
    margin-bottom: 0;
  }

  .modal-footer-modern,
  .modal-supplier-order .modal-footer-modern {
    flex-direction: column;
  }

  .btn-modal {
    width: 100%;
    justify-content: center;
  }

  .upload-area {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .file-item {
    flex-wrap: wrap;
  }

  .file-name {
    width: 100%;
    margin: 6px 0;
  }

  .file-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .tabs-modern .nav-tabs>li {
    float: none;
    display: block;
  }

  .tabs-modern .nav-tabs>li>a {
    width: 100%;
  }

  .profile-box {
    padding: 24px 24px 28px 24px;
    max-width: 100%;
  }

  .profile-avatar {
    width: 70px;
    height: 70px;
  }

  .profile-avatar i {
    font-size: 34px;
  }

  .profile-name {
    font-size: 20px;
  }

  .status-badge-detail {
    font-size: 11px;
    padding: 2px 8px;
  }

  .btn-activity-type {
    padding: 8px 4px;
    font-size: 11px;
  }

  .btn-activity-type i {
    font-size: 16px;
  }

  .order-card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-group-actions {
    justify-content: center;
  }

  .order-total {
    text-align: center;
  }

  .order-card-body .row>div {
    margin-bottom: 8px;
  }

  .modal-field-row {
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
  }

  .modal-field-label {
    width: 100%;
  }

  .modal-field-row-product {
    flex-direction: column;
  }

  .modal-field-product,
  .modal-field-quantity {
    flex: 1;
  }

  .modal-field-card {
    margin: 6px 12px;
    padding: 6px 10px;
  }

  .checkbox-label {
    margin-top: 4px;
  }

  .total-registers {
    margin-top: 0;
  }

  .select-modern,
  .modal-supplier-order .select-modern {
    padding: 8px 32px 8px 10px;
    min-height: 38px;
    font-size: 14px;
  }

  .table-modern .select-modern,
  .table-edit-modern .select-modern {
    padding: 4px 24px 4px 6px;
    min-height: 30px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {

  .page-title,
  .detail-title,
  .new-title {
    font-size: 16px;
  }

  .modal-title-modern {
    font-size: 16px;
  }

  .detail-header-modern,
  .new-header-modern,
  .page-header-modern,
  .info-panel-modern,
  .export-bar-modern,
  .section-modern,
  .action-bar-modern,
  .filter-bar-modern,
  .search-modern,
  .filters-activities,
  .report-selector-modern,
  .filters-modern,
  .activity-types-grid {
    padding: 10px 12px;
    margin-bottom: 10px;
  }

  .action-bar-modern {
    margin-bottom: 0;
  }

  .table-modern table,
  .table-detail-modern,
  .table-edit-modern {
    font-size: 11px;
  }

  .table-edit-modern thead {
    display: none;
  }

  .table-edit-modern tbody td {
    display: block;
    width: 100% !important;
    padding: 6px 8px !important;
  }

  .table-edit-modern tbody td:before {
    content: attr(data-label);
    font-weight: 600;
    color: #4a5568;
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
  }

  .profile-box {
    padding: 16px 14px 20px 14px;
  }

  .profile-avatar {
    width: 60px;
    height: 60px;
  }

  .profile-avatar i {
    font-size: 28px;
  }

  .profile-name {
    font-size: 18px;
  }

  .profile-role {
    font-size: 12px;
  }

  .form-title {
    font-size: 15px;
    padding-bottom: 10px;
    margin-bottom: 18px;
  }

  .form-group label {
    font-size: 12px;
  }

  .input-field {
    font-size: 13px;
    padding: 8px 12px 8px 34px;
    height: 34px;
  }

  .btn-save-profile {
    font-size: 14px;
    padding: 10px;
  }

  .btn-activity-type {
    font-size: 10px;
    padding: 6px 3px;
  }

  .btn-activity-type i {
    font-size: 14px;
  }

  .modal-image-container i {
    font-size: 40px !important;
  }

  .select-modern,
  .modal-supplier-order .select-modern {
    padding: 8px 28px 8px 8px;
    min-height: 36px;
    font-size: 14px;
  }

  .table-modern .select-modern,
  .table-edit-modern .select-modern {
    padding: 3px 20px 3px 4px;
    min-height: 26px;
    font-size: 12px;
  }

  .btn-save,
  .btn-back,
  .btn-print,
  .btn-cancel,
  .btn-save-lg,
  .btn-export,
  .btn-filter,
  .btn-primary-modern {
    font-size: 12px;
    padding: 6px 12px;
    height: 30px;
  }

  .btn-save-lg {
    height: 34px;
    font-size: 13px;
  }

  .badge-count {
    font-size: 10px;
    padding: 1px 6px;
  }

  .order-code {
    font-size: 14px;
  }

  .order-total {
    font-size: 16px;
  }
}

/* ============================================
   UTILIDADES
   ============================================ */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

/* ============================================
   MODAL HEADER - CERRAR A LA IZQUIERDA
   ============================================ */
.modal-header-modern {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
  border-radius: 6px 6px 0 0;
}

.modal-header-modern .close-modern {
  order: -1;
  /* Mueve el botón de cerrar a la izquierda */
  margin-right: 12px;
  margin-left: 0;
  flex-shrink: 0;
}

.modal-header-modern .modal-title-modern {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.modal-header-modern .modal-title-modern small {
  font-size: 13px;
  font-weight: normal;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 8px;
}

/* ============================================
   BOTÓN CERRAR MODERN
   ============================================ */
.close-modern {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  font-size: 22px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modern:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .modal-header-modern {
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  .modal-header-modern .close-modern {
    margin-right: 10px;
  }

  .modal-header-modern .modal-title-modern {
    font-size: 16px;
    flex: 1;
    min-width: 0;
  }

  .modal-header-modern .modal-title-modern small {
    font-size: 12px;
    display: block;
    margin-left: 0;
    margin-top: 2px;
  }
}

@media (max-width: 480px) {
  .modal-header-modern {
    padding: 10px 12px;
  }

  .modal-header-modern .close-modern {
    width: 28px;
    height: 28px;
    font-size: 18px;
    margin-right: 8px;
  }

  .modal-header-modern .modal-title-modern {
    font-size: 14px;
  }

  .modal-header-modern .modal-title-modern small {
    font-size: 11px;
  }
}

/* ============================================
   MODAL DETALLE ENCOMENDA - SEPARACIÓN
   ============================================ */
.modal-info-row {
  margin-bottom: 15px;
}

.modal-info-group {
  margin-bottom: 15px;
}

.modal-info-value-lg {
  font-size: 15px;
  padding-top: 4px;
}

.modal-info-value-badge {
  padding-top: 4px;
}

.modal-observations-box {
  background: #f7fafc;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 400;
  margin-top: 4px;
}

.modal-table-spacing {
  margin-top: 20px;
}

/* ============================================
   IMPORTAÇÕES - ESTILOS ESPECÍFICOS
   ============================================ */
.importacoes-modern {
  padding: 20px;
  background: #f0f2f5;
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== SUMMARY CARDS ===== */
.card-summary {
  background: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #3498db;
}

.card-success {
  border-left-color: #28a745;
}

.card-warning {
  border-left-color: #ffc107;
}

.card-danger {
  border-left-color: #dc3545;
}

.card-info {
  border-left-color: #17a2b8;
}

.card-label {
  font-size: 12px;
  color: #7f8c8d;
  text-transform: uppercase;
  font-weight: 600;
}

.card-label i {
  margin-right: 4px;
}

.card-value {
  font-size: 24px;
  font-weight: bold;
  color: #2c3e50;
  margin-top: 5px;
}

/* ===== DOCUMENTOS MINI ===== */
.documentos-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.doc-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.doc-ok {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.doc-pending {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}

.doc-more {
  background: #e2e8f0;
  color: #4a5568;
  border: 1px solid #cbd5e0;
}

/* ===== PROGRESS BAR ===== */
.progress {
  background-color: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 600;
  transition: width 0.6s ease;
}

.progress-bar-success {
  background-color: #28a745;
}

.progress-bar-warning {
  background-color: #ffc107;
  color: #212529;
}

.progress-bar-danger {
  background-color: #dc3545;
}

.progress-bar-info {
  background-color: #17a2b8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .importacoes-modern {
    padding: 10px;
  }

  .card-summary {
    margin-bottom: 10px;
  }

  .card-value {
    font-size: 20px;
  }

  .doc-tag {
    font-size: 9px;
    padding: 1px 6px;
  }

  .documentos-mini {
    gap: 3px;
  }

  .modal-info-row {
    margin-bottom: 5px;
  }

  .modal-info-group {
    margin-bottom: 8px;
  }
}

@media (max-width: 480px) {
  .card-value {
    font-size: 18px;
  }

  .doc-tag {
    font-size: 8px;
    padding: 1px 4px;
  }

  .progress-bar {
    font-size: 10px;
  }
}

/* ============================================
   ESTADOS DO PEDIDO (OrderStatus)
   ============================================ */
.status-1 {
  background: linear-gradient(135deg, #a0aec0, #718096);
}

/* CRIADA */
.status-2 {
  background: linear-gradient(135deg, #63b3ed, #3182ce);
}

/* APPROVADA */
.status-3 {
  background: linear-gradient(135deg, #f6ad55, #ed8936);
}

/* ENVIADA */
.status-4 {
  background: linear-gradient(135deg, #48bb78, #38a169);
}

/* ENTREGUE */
.status-5 {
  background: linear-gradient(135deg, #fc8181, #e53e3e);
}

/* CANCELADA */

.status-7 {
  background: linear-gradient(135deg, #ffa07a, #e5533e);
  color: #fff;
}

/* COM INCIDENCIA*/

.status-8 {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
}

/* NAO ENTREGUE*/

/* ============================================
   ESTADOS DA LINHA (OrderDetailStatusID)
   ============================================ */
.status-line-1 {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}

/* PENDENTE */
.status-line-2 {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* SATISFEITA */
.status-line-3 {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* CANCELADA */
.status-line-4 {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* APROVADA */
.status-line-5 {
  background: #f8d7da;
  color: #856404;
  border: 1px solid #f5c6cb;
}

/* NAO SATISFEITA */

.order-header-row td {
  padding: 10px 15px;
  background-color: #f9f9f9;
  border-bottom: 2px solid #ddd;
}

.order-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.order-info-left {
  font-size: 15px;
  white-space: nowrap;
}

.order-info-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.order-status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 13px;
  background-color: #e0e0e0;
  color: #333;
}

.status-pending {
  background-color: #ffc107;
  color: #333;
}

.status-approved {
  background-color: #28a745;
  color: #fff;
}

.status-rejected {
  background-color: #dc3545;
  color: #fff;
}

.status-canceled {
  background-color: #6c757d;
  color: #fff;
}

.order-date-badge {
  font-size: 13px;
  color: #555;
}

.order-requester {
  font-size: 13px;
  color: #555;
}

.order-notes {
  font-size: 13px;
  color: #777;
  font-style: italic;
}

.btn-cancel {
  padding: 4px 14px;
  font-size: 13px;
  border-radius: 20px;
}

.order-header-subline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
  margin-top: 4px;
  border-top: 1px solid #e0e0e0;
  width: 100%;
  /* garante que ocupa toda a largura */
}

/* NOTAS - com quebra de texto */
.order-notes {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #fff9e6;
  padding: 4px 12px;
  border-radius: 4px;
  border-left: 4px solid #f0ad4e;
  font-size: 14px;
  color: #333;
  font-weight: 500;
  flex: 1 1 auto;
  /* permite crescer e encolher */
  min-width: 0;
  /* permite quebra de linha */
  max-width: 70%;
  /* limita para não esmagar os botões */
  word-wrap: break-word;
  /* quebra palavras longas */
  white-space: normal;
  /* permite quebra de linha */
  overflow-wrap: break-word;
}

.order-notes i {
  color: #f0ad4e;
  font-size: 16px;
  flex-shrink: 0;
  /* não encolhe o ícone */
}

.order-notes-text {
  font-weight: 600;
  color: #2c3e50;
  word-break: break-word;
}

/* AÇÕES - botões */
.order-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  /* impede que os botões encolham */
  white-space: nowrap;
  /* evita quebra de texto nos botões */
}

/* Botão Anular */
.btn-cancel {
  padding: 4px 14px;
  font-size: 12px;
  border-radius: 4px;
  background-color: #d9534f;
  border: none;
  color: #fff;
  white-space: nowrap;
}

.btn-cancel:hover {
  background-color: #c9302c;
}

.btn-cancel i {
  margin-right: 4px;
}

/* Botão Aprovar */
.btn-approve {
  padding: 4px 14px;
  font-size: 12px;
  border-radius: 4px;
  background-color: #5cb85c;
  border: none;
  color: #fff;
  white-space: nowrap;
}

.btn-approve:hover {
  background-color: #449d44;
}

.btn-approve i {
  margin-right: 4px;
}