/* EPROC application styles — custom CSS only. Vendor CSS remains external. */
:root {
  --eproc-label: #f1f5f9;
  --eproc-input: #f8fafc;
  --eproc-placeholder: #a8b4c5;
}

.app-sidebar .nav-link p {
  margin-bottom: 0;
}
.app-sidebar .sidebar-wrapper {
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.app-sidebar .sidebar-wrapper .nav-link.active {
  scroll-margin-block: 0.75rem;
}
.brand-image {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.content-header h1 {
  font-size: 1.55rem;
}
.page-intro {
  background: linear-gradient(
    135deg,
    rgba(13, 110, 253, 0.09),
    rgba(13, 202, 240, 0.04)
  );
  border: 1px solid rgba(13, 110, 253, 0.1);
  border-radius: 0.8rem;
  padding: 1.15rem 1.25rem;
}
.dashboard-hero { background: linear-gradient(135deg, rgba(37, 99, 235, .16), rgba(15, 23, 42, .18)); }
.dashboard-kicker { display: block; margin-bottom: .35rem; color: #93c5fd; font-size: .65rem; font-weight: 800; letter-spacing: .14em; }
.dashboard-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.dashboard-stat { position: relative; display: flex; align-items: center; gap: .9rem; min-height: 116px; padding: 1.15rem; overflow: hidden; border: 1px solid rgba(148, 163, 184, .18); border-radius: .9rem; background: rgba(15, 23, 42, .78); box-shadow: 0 .75rem 1.8rem rgba(0, 0, 0, .12); }
.dashboard-stat::after { position: absolute; right: -1rem; bottom: -2rem; width: 6rem; height: 6rem; border-radius: 50%; background: currentColor; content: ""; opacity: .08; }
.dashboard-stat-icon { display: grid; flex: 0 0 2.8rem; width: 2.8rem; height: 2.8rem; place-items: center; border-radius: .75rem; background: currentColor; color: #fff; font-size: 1.25rem; }
.dashboard-stat > div:last-child { min-width: 0; }
.dashboard-stat-label, .dashboard-stat small { display: block; color: #a8b4c5; font-size: .75rem; }
.dashboard-stat strong { display: block; margin: .12rem 0; color: #f8fafc; font-size: 1.65rem; line-height: 1.1; }
.dashboard-stat small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-stat-primary { color: #60a5fa; }
.dashboard-stat-success { color: #34d399; }
.dashboard-stat-info { color: #22d3ee; }
.dashboard-stat-warning { color: #fbbf24; }
.dashboard-panel { padding: 1.15rem; border: 1px solid rgba(148, 163, 184, .18); border-radius: .9rem; background: rgba(15, 23, 42, .68); box-shadow: 0 .75rem 1.8rem rgba(0, 0, 0, .1); }
.dashboard-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: .95rem; border-bottom: 1px solid rgba(148, 163, 184, .14); }
.workflow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; padding-top: .85rem; }
.workflow-item { display: flex; align-items: center; gap: .7rem; min-width: 0; padding: .75rem; border: 1px solid transparent; border-radius: .7rem; color: inherit; text-decoration: none; transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.workflow-item:hover { border-color: rgba(96, 165, 250, .3); background: rgba(30, 41, 59, .55); transform: translateY(-1px); }
.workflow-icon { display: grid; flex: 0 0 2.2rem; width: 2.2rem; height: 2.2rem; place-items: center; border-radius: .6rem; background: rgba(148, 163, 184, .12); color: #cbd5e1; }
.workflow-icon-warning { background: rgba(251, 191, 36, .12); color: #fbbf24; }
.workflow-icon-success { background: rgba(52, 211, 153, .12); color: #34d399; }
.workflow-icon-danger { background: rgba(248, 113, 113, .12); color: #f87171; }
.workflow-item span:nth-child(2) { min-width: 0; }
.workflow-item strong, .workflow-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-item strong { color: #e2e8f0; font-size: .82rem; }
.workflow-item small { margin-top: .12rem; color: #94a3b8; font-size: .72rem; }
.workflow-item b { margin-left: auto; color: #f8fafc; font-size: 1.1rem; }
.module-list { padding-top: .5rem; }
.module-list a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem .35rem; border-bottom: 1px solid rgba(148, 163, 184, .1); color: #cbd5e1; text-decoration: none; font-size: .86rem; }
.module-list a:last-child { border-bottom: 0; }
.module-list a:hover { color: #93c5fd; }
.module-list strong { color: #f8fafc; }
.card {
  border: 0;
  box-shadow: 0 0.125rem 0.5rem rgba(25, 42, 70, 0.07);
}
.card-header {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}
.form-card .card-body {
  padding: 1.5rem;
}

.field-label {
  display: inline-block;
  margin-bottom: 0.42rem;
  color: var(--eproc-label);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 1.3;
  text-transform: uppercase;
}
.field-label.required::after {
  content: " *";
  color: var(--bs-danger);
}
.form-control,
.form-select {
  color: var(--eproc-input);
  background-color: rgba(15, 23, 42, 0.28);
  border-color: #d0d5dd;
  min-height: 2.55rem;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}
.form-control::placeholder {
  color: var(--eproc-placeholder);
  opacity: 1;
}
.form-control:focus,
.form-select:focus {
  color: #fff;
  background-color: rgba(15, 23, 42, 0.42);
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.12);
}
.select2-container--bootstrap-5 .select2-selection { min-height: 2.55rem; color: var(--eproc-input); background-color: rgba(15, 23, 42, 0.28); border-color: #d0d5dd; }
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered, .select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder { line-height: 2.35rem; color: var(--eproc-input); }
.select2-container--bootstrap-5 .select2-dropdown, .select2-container--bootstrap-5 .select2-search__field { color: #fff; background-color: #1f2937; }
.select2-container--bootstrap-5 .select2-results__option--highlighted { background-color: var(--bs-primary); }
.po-items-wrapper { border: 1px solid rgba(148, 163, 184, 0.22); border-radius: 0.65rem; }
.po-items-table { min-width: 960px; margin-bottom: 0; }
.po-items-table th { padding: 0.75rem 0.65rem; }
.po-items-table td { padding: 0.55rem 0.65rem; }
.section-heading { padding: 0.85rem 1rem; border: 1px solid rgba(13, 110, 253, 0.18); border-radius: 0.65rem 0.65rem 0 0; background: rgba(13, 110, 253, 0.05); }
textarea.form-control {
  min-height: 6rem;
}
.btn {
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}
.btn:active {
  transform: scale(0.97);
}
.btn-group form {
  display: inline-flex;
}
.btn-group {
  white-space: nowrap;
}
.btn-group .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.letter-spacing-1 {
  letter-spacing: 0.08em;
}
.confirm-modal-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 0.9rem;
  color: var(--bs-primary);
  background: rgba(13, 110, 253, 0.1);
  font-size: 1.25rem;
}
.confirm-modal-icon-success {
  color: var(--bs-success);
  background: rgba(25, 135, 84, 0.12);
}
.confirm-modal-icon-warning {
  color: #997404;
  background: rgba(255, 193, 7, 0.18);
}
.confirm-modal-icon-danger {
  color: var(--bs-danger);
  background: rgba(220, 53, 69, 0.1);
}
#appConfirmModal .modal-content {
  border-radius: 1.1rem;
}
#appConfirmModal .modal-footer .btn {
  min-width: 7rem;
}
#appConfirmModal .modal-body {
  line-height: 1.65;
}
.table thead th {
  white-space: nowrap;
  color: #475467;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}
.table td {
  vertical-align: middle;
}
.quotation-workflow-guide {
  border-left: 4px solid var(--bs-primary);
}
.workflow-step {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 600;
}
.workflow-dot {
  width: 0.65rem;
  height: 0.65rem;
  display: inline-block;
  border-radius: 50%;
}
.quotation-status-hint {
  max-width: 220px;
  margin-top: 0.2rem;
  color: var(--bs-secondary-color);
  line-height: 1.25;
}
.quotation-actions,
.datatable-actions {
  min-width: 5.5rem;
  text-align: right;
}
.quotation-actions .dropdown-toggle,
.datatable-actions .dropdown-toggle {
  min-width: 5.5rem;
  font-weight: 600;
}
.quotation-actions .dropdown-menu,
.datatable-actions .dropdown-menu {
  min-width: 14rem;
  padding: 0.4rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.quotation-actions .dropdown-item,
.datatable-actions .dropdown-item {
  padding: 0.55rem 0.7rem;
  border-radius: 0.35rem;
  font-size: 0.875rem;
}
.quotation-actions .dropdown-item:focus,
.quotation-actions .dropdown-item:hover,
.datatable-actions .dropdown-item:focus,
.datatable-actions .dropdown-item:hover {
  background-color: rgba(13, 110, 253, 0.1);
}
.quotation-actions form,
.datatable-actions form {
  margin: 0;
}
.notification-menu {
  width: 20rem;
  max-width: min(92vw, 20rem);
  padding: 0.35rem;
}
.notification-item {
  white-space: normal;
  border-radius: 0.35rem;
}
.notification-item.unread {
  background: rgba(13, 110, 253, 0.08);
}
.quotation-items-table {
  min-width: 980px;
}
.quotation-items-table th,
.quotation-items-table td {
  padding: 0.65rem 0.5rem;
}
.negotiation-items-table {
  min-width: 1120px;
}
.negotiation-items-table th,
.negotiation-items-table td {
  padding: 0.55rem 0.4rem;
}
.negotiation-total-preview {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(13, 110, 253, 0.2);
  border-radius: 0.5rem;
  background: rgba(13, 110, 253, 0.06);
}
.negotiation-history-detail {
  background: rgba(148, 163, 184, 0.06);
}
.negotiation-history-detail details summary {
  cursor: pointer;
  color: var(--bs-primary);
  font-weight: 600;
}
.negotiation-history-detail details[open] summary {
  margin-bottom: 0.75rem;
}
.quotation-item-image {
  width: 105px;
}
.product-image-preview {
  width: 78px;
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-thumb {
  width: 72px;
  height: 72px;
  padding: 0.2rem;
  object-fit: contain;
  background: transparent;
  border-color: rgba(148, 163, 184, 0.55);
}
.product-image-placeholder {
  width: 72px;
  height: 72px;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  border: 1px dashed rgba(148, 163, 184, 0.65);
  border-radius: 0.375rem;
  color: var(--bs-secondary-color);
  background: rgba(148, 163, 184, 0.08);
  text-align: center;
}
.product-image-placeholder i {
  font-size: 1.35rem;
}
.product-image-placeholder small {
  font-size: 0.62rem;
  line-height: 1.1;
}
@media (max-width: 767.98px) {
  .quotation-items-table {
    min-width: 900px;
  }
}
.dataTables_wrapper .dt-layout-row {
  align-items: center;
  gap: 0.75rem;
}
.dataTables_wrapper .dt-search input,
.dataTables_wrapper .dt-length select {
  border: 1px solid #d0d5dd;
  border-radius: 0.45rem;
  padding: 0.4rem 0.65rem;
}
.dataTables_wrapper .dt-info {
  color: #667085;
  font-size: 0.875rem;
}
.dataTables_wrapper .pagination {
  margin-bottom: 0;
}
.datatable-container {
  width: 100%;
  overflow: visible;
}
.datatable-container table {
  width: 100% !important;
}
.dtr-control {
  cursor: pointer;
}
.dt-empty {
  padding: 2.5rem 1rem !important;
  color: #667085;
}

.auth-page {
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
  background-image:
    linear-gradient(90deg, rgba(5, 12, 27, 0.78), rgba(8, 18, 38, 0.84)),
    url('../images/login-machining-workshop-2.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.auth-container { width: 100%; max-width: 520px; }
.login-card {
  margin: auto;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(96, 165, 250, 0.04);
}
.login-card-body { padding: 2rem 2.5rem 1.75rem; }
.login-header { margin-bottom: 1.5rem; }
.login-logo-wrap { min-height: 72px; display: grid; place-items: center; }
.login-logo { max-width: 230px; max-height: 72px; object-fit: contain; }
.login-eyebrow { color: #93c5fd; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.login-title { color: #f8fafc; font-size: 1.65rem; font-weight: 700; line-height: 1.25; }
.login-subtitle { color: #cbd5e1; font-size: .95rem; line-height: 1.55; }
.login-alert { display: flex; align-items: flex-start; gap: .1rem; border-radius: .7rem; font-size: .9rem; line-height: 1.45; }
.login-form { display: grid; gap: 1rem; }
.login-field .field-label { margin-bottom: .55rem; color: #e2e8f0; font-size: .8rem; }
.login-field .input-group-text { min-width: 3rem; justify-content: center; color: #93c5fd; background: rgba(15, 23, 42, 0.55); border-color: #64748b; }
.login-field .form-control { min-height: 3.25rem; background: rgba(15, 23, 42, 0.55); border-color: #64748b; font-size: .98rem; }
.login-field .form-control::placeholder { color: #94a3b8; }
.login-field .form-control:focus { border-color: #60a5fa; box-shadow: 0 0 0 .2rem rgba(59, 130, 246, .18); }
.login-password-toggle { min-width: 3.25rem; border-color: #64748b; color: #cbd5e1; }
.login-password-toggle:hover, .login-password-toggle:focus { color: #fff; border-color: #93c5fd; }
.login-submit { min-height: 3.25rem; font-weight: 600; letter-spacing: .01em; }
.login-card-footer { padding: .9rem 1.25rem; color: #94a3b8; background: rgba(15, 23, 42, 0.45); border-top: 1px solid rgba(148, 163, 184, 0.16); font-size: .78rem; }
.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #0d6efd;
  color: #fff;
  font-size: 1.8rem;
}

@media (max-width: 575.98px) {
  .auth-page { padding: .75rem 0 !important; }
  .login-card-body { padding: 1.5rem 1.1rem 1.25rem; }
  .login-header { margin-bottom: 1.15rem; }
  .login-form { gap: .85rem; }
  .login-title { font-size: 1.4rem; }
  .dataTables_wrapper .dt-layout-row {
    flex-direction: column;
    align-items: stretch;
  }
  .dataTables_wrapper .dt-layout-cell {
    text-align: left !important;
  }
}

/* Layout refinements: preserve AdminLTE theme colors, change spacing/alignment only. */
.page-intro { margin-bottom: 1rem; }
.page-intro h1, .page-intro h2 { margin-bottom: .25rem; font-weight: 600; }
.page-intro .btn { white-space: nowrap; }
.form-card .card-body, form.card > .card-body { padding: 1.5rem; }
.form-card .card-footer, form.card > .card-footer { padding: 1rem 1.5rem; }
.form-page { max-width: 1400px; }
.form-section { border-radius: .75rem; overflow: hidden; }
.form-section + .form-section { margin-top: 1rem; }
.form-section-header { display: flex; align-items: center; gap: .55rem; padding: .9rem 1.15rem; }
.form-section-header h2, .form-section-header h3 { margin: 0; font-size: .95rem; font-weight: 600; }
.form-section-body { padding: 1.15rem; }
.form-check.tax-option { min-height: 2.55rem; display: flex; align-items: center; gap: .55rem; padding: .55rem .75rem .55rem 2.15rem; }
.form-check.tax-option .form-check-input { margin-left: -1.4rem; margin-top: 0; }
.tax-field { display: flex; flex-direction: column; justify-content: flex-start; }
.tax-field > .field-label { display: block; min-height: 1.04rem; }
.tax-field .form-label { min-height: 1.05rem; }
.tax-section { margin-top: 1.5rem; padding-top: 1rem; }
.tax-section-title { display: flex; align-items: center; gap: .5rem; margin-bottom: .85rem; font-size: .95rem; font-weight: 600; }
.tax-section-title small { margin-left: auto; }
.tax-stack { max-width: 680px; }
.tax-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px); align-items: end; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid rgba(148, 163, 184, 0.18); }
.tax-row:first-child { padding-top: .15rem; }
.tax-row:last-child { border-bottom: 0; padding-bottom: .15rem; }
.tax-row .tax-option { min-height: 2.55rem; }
.tax-row .tax-rate .form-control { width: 100%; }
.tax-panel { align-items: flex-start; }
.tax-panel > [class*="col-"] { display: flex; flex-direction: column; justify-content: flex-start; }
.tax-panel .form-label { min-height: 1.1rem; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; padding-top: 1rem; margin-top: 1rem; }
.sidebar-menu .nav-header { margin-top: .85rem; padding: .65rem 1rem .35rem; font-size: .68rem; font-weight: 700; letter-spacing: .1em; }
.sidebar-menu .nav-header:first-child { margin-top: 0; }
@media (max-width: 1199.98px) { .dashboard-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .dashboard-summary { grid-template-columns: 1fr; gap: .75rem; } .dashboard-stat { min-height: 96px; } .workflow-grid { grid-template-columns: 1fr; } .dashboard-panel { padding: .9rem; } }
.sidebar-menu .nav-link { margin: .1rem .5rem; border-radius: .45rem; }
.sidebar-menu .nav-link.active { box-shadow: inset 3px 0 0 var(--bs-primary); }
@media (max-width: 767.98px) { .page-intro { padding: 1rem; } .form-card .card-body, form.card > .card-body { padding: 1rem; } }
@media (max-width: 575.98px) { .tax-row { grid-template-columns: 1fr; gap: .35rem; } .tax-section-title { align-items: flex-start; flex-wrap: wrap; } .tax-section-title small { width: 100%; margin-left: 1.55rem; } }
