:root {
  --brand-primary: #0f766e;
  --brand-primary-dark: #0b4f4a;
  --brand-accent: #f59e0b;
  --bg-soft: #f4f7fb;
  --card-bg: #ffffff;
  --text-main: #1f2937;
  --text-soft: #64748b;
  --line-soft: #e2e8f0;
}

body {
  font-family: "Trebuchet MS", "Verdana", "Segoe UI", sans-serif;
  color: var(--text-main);
}

.content-wrapper,
.right-side {
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 35%),
    radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.1), transparent 30%),
    var(--bg-soft);
}

.box {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.box-header.with-border {
  border-bottom: 1px solid var(--line-soft);
}

.box-title {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.main-header .logo {
  background: linear-gradient(120deg, var(--brand-primary), var(--brand-primary-dark));
  font-weight: 700;
}

.main-header .logo.app-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  overflow: hidden;
}

.main-header .logo.app-brand-logo .logo-mini,
.main-header .logo.app-brand-logo .logo-lg {
  line-height: 1;
}

.main-header .logo.app-brand-logo .logo-lg {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.brand-logo-lg-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-logo-img,
.brand-logo-mini-img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.brand-logo-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  color: #f8fafc;
}

.brand-logo-text strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.brand-logo-text small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  opacity: 0.95;
}

.main-header .logo.app-brand-logo .logo-mini {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.sidebar-mini.sidebar-collapse .main-header .logo.app-brand-logo .logo-mini {
  display: flex !important;
}

.sidebar-mini.sidebar-collapse .main-header .logo.app-brand-logo .logo-lg {
  display: none !important;
}

@media (max-width: 991px) {
  .brand-logo-text strong {
    font-size: 13px;
  }

  .brand-logo-text small {
    font-size: 9px;
    letter-spacing: 0.5px;
  }
}

.skin-blue .main-header .navbar {
  background: linear-gradient(120deg, var(--brand-primary), var(--brand-primary-dark));
}

.skin-blue .main-sidebar {
  background: #0f172a;
}

.skin-blue .sidebar-menu > li > a {
  border-left: 3px solid transparent;
}

.skin-blue .sidebar-menu > li.active > a,
.skin-blue .sidebar-menu > li:hover > a {
  background: rgba(15, 118, 110, 0.2);
  border-left-color: var(--brand-accent);
}

.btn {
  border-radius: 10px;
  font-weight: 600;
  transition: none;
}

.btn:hover {
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
}

.btn-primary {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--brand-primary-dark);
  border-color: var(--brand-primary-dark);
}

.btn-success {
  background-color: #16a34a;
  border-color: #16a34a;
}

.btn-info {
  background-color: #0284c7;
  border-color: #0284c7;
}

.btn-report {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  border: 0;
  color: #fff;
  font-weight: 700;
  border-radius: 10px;
}

.btn-report:hover,
.btn-report:focus {
  color: #fff;
  opacity: 0.95;
}

.nav-tabs {
  border-bottom: 1px solid #d6dfe9;
}

.nav-tabs > li > a {
  border-radius: 10px 10px 0 0;
  font-weight: 700;
  color: #334155;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:focus,
.nav-tabs > li.active > a:hover {
  color: #0f766e;
  border: 1px solid #d6dfe9;
  border-bottom-color: #fff;
}

.well {
  border-radius: 12px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
}

.procenter-panel .table-responsive {
  width: 100%;
}

.procenter-panel .procenter-table,
.procenter-panel .procenter-table.dataTable,
.procenter-panel .dataTables_wrapper {
  width: 100% !important;
}

.procenter-panel .dataTables_wrapper .row {
  margin-left: 0;
  margin-right: 0;
}

.procenter-panel .dataTables_filter {
  text-align: right;
}

.cuentas-panel .table-responsive {
  width: 100%;
}

.cuentas-panel .cuentas-table,
.cuentas-panel .cuentas-table.dataTable,
.cuentas-panel .dataTables_wrapper {
  width: 100% !important;
}

.cuentas-panel .dataTables_wrapper .row {
  margin-left: 0;
  margin-right: 0;
}

.cuentas-panel .dataTables_filter {
  text-align: right;
}

.reportes-panel .table-responsive {
  width: 100%;
}

.reportes-panel table.dataTable,
.reportes-panel table.table,
.reportes-panel .dataTables_wrapper {
  width: 100% !important;
}

.reportes-panel .dataTables_wrapper .row {
  margin-left: 0;
  margin-right: 0;
}

.reportes-panel .dataTables_filter {
  text-align: right;
}

.btn-warning {
  background-color: #f59e0b;
  border-color: #f59e0b;
  color: #111827;
}

.btn-danger {
  background-color: #dc2626;
  border-color: #dc2626;
}

.table > thead > tr > th {
  border-bottom: 2px solid var(--line-soft);
  color: #334155;
  font-weight: 700;
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #f8fafc;
}

.dt-buttons {
  margin-bottom: 10px;
}

.dt-buttons .dt-button.btn-export {
  border: 0 !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  padding: 7px 12px !important;
  margin-right: 6px !important;
  text-shadow: none !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18) !important;
}

.dt-buttons .dt-button.btn-export:hover,
.dt-buttons .dt-button.btn-export:focus {
  opacity: 0.94;
}

.dt-buttons .dt-button.btn-copy {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
}

.dt-buttons .dt-button.btn-excel {
  background: linear-gradient(135deg, #16a34a, #15803d) !important;
}

.dt-buttons .dt-button.btn-csv {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

.dt-buttons .dt-button.btn-pdf {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
}

.btn-catalog-open {
  background: linear-gradient(135deg, #0f766e, #0b4f4a);
  border: 0;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.btn-catalog-open:hover,
.btn-catalog-open:focus {
  color: #fff;
  opacity: 0.95;
}

.modal-catalog .modal-dialog {
  width: 94vw !important;
  max-width: 1400px;
  margin: 20px auto;
}

.modal-catalog .modal-content {
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.36);
}

.catalog-modal-header {
  background: linear-gradient(135deg, #0f766e 0%, #0b4f4a 100%);
  color: #f8fafc;
  border-bottom: 0 !important;
}

.catalog-modal-header .modal-title {
  font-weight: 700;
  letter-spacing: 0.25px;
}

.catalog-modal-header .close {
  color: #fff;
  opacity: 0.85;
}

.modal-catalog .modal-body {
  padding: 14px 16px;
}

.modal-catalog .dataTables_wrapper,
.modal-catalog .dataTables_wrapper > .row,
.modal-catalog table.dataTable {
  width: 100% !important;
}

.modal-catalog .dataTables_wrapper .col-sm-6,
.modal-catalog .dataTables_wrapper .col-sm-12 {
  padding-left: 0;
  padding-right: 0;
}

.catalog-subtitle {
  margin: 4px 0 0;
  color: rgba(241, 245, 249, 0.92);
  font-size: 13px;
}

.catalog-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.catalog-tip {
  font-size: 12px;
  color: #475569;
}

.catalog-counter {
  background: #ecfeff;
  color: #0f766e;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.catalog-counter span {
  font-size: 14px;
}

.catalog-search-wrap {
  margin-bottom: 10px;
}

.catalog-search-label {
  width: 100%;
  font-weight: 600;
  color: #0f172a;
}

.catalog-search-input {
  width: 320px !important;
  max-width: 100%;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  padding: 7px 10px !important;
  margin-left: 8px !important;
}

.btn-add-item {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 0;
  color: #111827;
  font-weight: 700;
  border-radius: 10px;
  padding: 5px 10px;
}

.btn-add-item:hover,
.btn-add-item:focus {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #111827;
}

.btn-add-disabled,
.btn-add-disabled:hover {
  background: #e2e8f0 !important;
  color: #64748b !important;
}

.stock-pill {
  display: inline-block;
  min-width: 72px;
  text-align: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.stock-ok {
  background: #dcfce7;
  color: #166534;
}

.stock-low {
  background: #fef3c7;
  color: #92400e;
}

.stock-empty {
  background: #fee2e2;
  color: #991b1b;
}

.catalog-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.form-control,
.select2-container--default .select2-selection--single {
  border-radius: 10px;
  border-color: #cbd5e1;
  box-shadow: none;
}

.form-control:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.15);
}

.form-panel {
  min-height: 400px;
  height: auto !important;
  overflow: visible;
}

.form-actions-row {
  clear: both;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  padding-top: 4px;
}

.form-actions-row .btn {
  margin-right: 0;
}

.label.bg-green {
  background-color: #16a34a !important;
}

.label.bg-red {
  background-color: #dc2626 !important;
}

.small-box {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

.small-box > .small-box-footer {
  background: rgba(0, 0, 0, 0.14);
}

.dashboard-wrap {
  padding-top: 4px;
}

.dashboard-head {
  margin-bottom: 10px;
}

.dashboard-head h1 {
  margin: 0;
  font-size: 27px;
  font-weight: 800;
  color: #0f172a;
}

.dashboard-head p {
  margin: 4px 0 0;
  color: #64748b;
}

.dashboard-kpis {
  margin-bottom: 2px;
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 98px;
  padding: 14px 14px;
  border-radius: 14px;
  color: #fff;
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.2);
  text-decoration: none;
  margin-bottom: 14px;
}

.kpi-card:hover,
.kpi-card:focus {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: rgba(255, 255, 255, 0.18);
}

.kpi-meta span {
  display: block;
  font-size: 12px;
  opacity: 0.95;
  margin-bottom: 3px;
}

.kpi-meta strong {
  display: block;
  font-size: 23px;
  line-height: 1;
}

.kpi-sales {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

.kpi-buy {
  background: linear-gradient(135deg, #0284c7, #0369a1);
}

.kpi-stock {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.kpi-month {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.dashboard-kpis.secondary .mini-kpi {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 11px 12px;
  margin-bottom: 14px;
}

.dashboard-kpis.secondary .mini-kpi label {
  display: block;
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-kpis.secondary .mini-kpi strong {
  display: block;
  margin-top: 3px;
  color: #0f172a;
  font-size: 20px;
}

.dashboard-box {
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.11);
}

.dashboard-box .box-header {
  border-bottom: 1px solid #e2e8f0;
}

.dashboard-box .box-header .box-title {
  font-size: 14px;
  font-weight: 700;
}

.dashboard-box .box-body {
  min-height: 260px;
}

.dashboard-box canvas {
  width: 100% !important;
  height: 250px !important;
}

.dashboard-filter-box {
  margin-bottom: 8px;
}

.dashboard-filter-box .box-body {
  min-height: auto;
  padding: 12px 14px 10px;
}

.dashboard-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
}

.dashboard-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 68px;
}

.dashboard-filter-actions .text-muted {
  margin-left: 4px !important;
}

@media (max-width: 991px) {
  .dashboard-filter-actions {
    justify-content: flex-start;
    min-height: auto;
    padding-top: 8px;
  }
}

body.login-page {
  min-height: 100vh;
  margin: 0;
  padding: 20px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 6%, rgba(245, 158, 11, 0.22), transparent 34%),
    radial-gradient(circle at 8% 92%, rgba(15, 118, 110, 0.24), transparent 38%),
    linear-gradient(125deg, #04112b 0%, #111827 58%, #2b2f38 100%);
}

body.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.62)),
    url("../img/login-lubricentro-bg.svg") center center / cover no-repeat;
  opacity: 0.58;
}

body.login-page::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 30%, rgba(14, 165, 233, 0.14), transparent 35%),
    radial-gradient(circle at 75% 75%, rgba(245, 158, 11, 0.1), transparent 30%);
  pointer-events: none;
}

.login-shell {
  width: 100%;
  max-width: 1040px;
  min-height: 560px;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  position: relative;
  z-index: 1;
  box-shadow: 0 28px 64px rgba(2, 6, 23, 0.52);
}

.login-brand {
  width: 43%;
  padding: 42px 34px 34px;
  color: #f8fafc;
  background:
    radial-gradient(circle at 14% 8%, rgba(245, 158, 11, 0.45), transparent 32%),
    radial-gradient(circle at 84% 92%, rgba(2, 132, 199, 0.32), transparent 34%),
    linear-gradient(162deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  position: relative;
}

.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0) 45%),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 16px
    );
  pointer-events: none;
}

.login-brand::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -40px;
  top: -40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.login-brand-logo {
  width: 116px;
  height: 116px;
  border-radius: 22px;
  display: inline-block;
  margin-bottom: 20px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.login-brand h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.login-brand p {
  margin: 0 0 22px;
  color: rgba(241, 245, 249, 0.92);
  font-size: 15px;
}

.brand-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
}

.brand-bullets li {
  margin-bottom: 10px;
  font-size: 14px;
  color: rgba(248, 250, 252, 0.95);
}

.brand-bullets i {
  color: var(--brand-accent);
  margin-right: 8px;
}

.login-form-panel {
  width: 57%;
  background: #f8fafc;
  padding: 48px 50px;
  display: flex;
  align-items: center;
}

.login-form-card {
  width: 100%;
}

.login-form-title {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 28px;
  font-weight: 800;
}

.login-form-subtitle {
  margin: 0 0 28px;
  color: #64748b;
}

.login-form-card .form-group {
  margin-bottom: 16px;
}

.login-form-card .has-feedback {
  position: relative;
}

.login-form-card .form-control {
  height: 46px;
  border-radius: 12px;
  padding-left: 14px;
}

.login-password-input {
  padding-right: 44px !important;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #64748b;
  border-radius: 8px;
  z-index: 2;
}

.password-toggle-btn:hover,
.password-toggle-btn:focus {
  background: rgba(15, 118, 110, 0.12);
  color: var(--brand-primary);
  outline: none;
}

.login-options-row {
  margin-top: -4px;
  margin-bottom: 12px;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.login-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand-primary);
}

.login-form-card .form-control-feedback {
  top: 7px;
  right: 12px;
  color: #64748b;
}

.login-submit {
  height: 46px;
  border-radius: 12px;
  font-size: 15px;
  letter-spacing: 0.2px;
}

.main-header .logo,
.main-header .navbar,
.main-sidebar,
.content-wrapper,
.sidebar-menu > li > a,
.small-box,
.small-box .icon,
.box,
.box * {
  transition: none !important;
  animation: none !important;
}

.app-toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 99999;
  width: 360px;
  max-width: calc(100vw - 24px);
}

.app-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.2);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.app-toast-success {
  border-left: 6px solid #16a34a;
}

.app-toast-error {
  border-left: 6px solid #dc2626;
}

.app-toast-warning {
  border-left: 6px solid #f59e0b;
}

.app-toast-info {
  border-left: 6px solid #0284c7;
}

.app-toast-icon {
  width: 22px;
  font-size: 20px;
  line-height: 1;
  margin-top: 2px;
}

.app-toast-success .app-toast-icon {
  color: #16a34a;
}

.app-toast-error .app-toast-icon {
  color: #dc2626;
}

.app-toast-warning .app-toast-icon {
  color: #f59e0b;
}

.app-toast-info .app-toast-icon {
  color: #0284c7;
}

.app-toast-content {
  flex: 1;
  min-width: 0;
}

.app-toast-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.app-toast-text {
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
  color: #334155;
}

.app-toast-progress {
  width: 100%;
  height: 3px;
  margin-top: 8px;
  background: rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  overflow: hidden;
}

.app-toast-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
}

.app-toast-success .app-toast-progress span {
  background: #16a34a;
}

.app-toast-error .app-toast-progress span {
  background: #dc2626;
}

.app-toast-warning .app-toast-progress span {
  background: #f59e0b;
}

.app-toast-info .app-toast-progress span {
  background: #0284c7;
}

@media (max-width: 900px) {
  .login-shell {
    max-width: 580px;
    min-height: auto;
    flex-direction: column;
  }

  .login-brand,
  .login-form-panel {
    width: 100%;
  }

  .login-brand {
    padding: 28px 24px;
  }

  .login-form-panel {
    padding: 30px 24px;
  }

  body.login-page {
    overflow: auto;
  }
}
