/*
Theme Name: WMS Major Academy
Theme URI: https://wms.majoracademy.edu.vn/
Author: Major Academy
Description: Frontend for the Warehouse Management System.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: wms-major-academy
*/

:root {
  --wms-primary: #1a365d;
  --wms-primary-dark: #002147;
  --wms-button-dark: #0f172a;
  --wms-button-dark-hover: #111827;
  --wms-gold: #ffc107;
  --wms-orange: #f7931e;
  --wms-brand-gold: #f2b926;
  --wms-text: #111827;
  --wms-muted: #6b7280;
  --wms-surface: #f3f4f6;
  --wms-page: #f1f5f9;
  --wms-line: #e0e0e0;
  --wms-line-soft: #e2e8f0;
  --wms-hover: #e8edf4;
  --primary-color: #1a365d;
  --secondary-color: #f7931e;
  --accent-color: #14b8a6;
  --neutral-dark: #111827;
  --neutral-medium: #6b7280;
  --neutral-light: #f3f4f6;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--wms-page);
  color: var(--wms-text);
  font-family: 'Inter', 'Inter Fallback', sans-serif;
  font-size: 13px;
  line-height: 1.6;
}

/* Shared visual language from CRM Abacus. Keep WMS-specific markup independent,
 * but use the same typography, spacing, buttons, cards and data-table skin. */
h1, h2, h3, h4, h5, h6 {
  color: #111827;
  font-weight: 400;
  margin-bottom: .75rem;
}

h1 { font-size: clamp(1.75rem, 1.5rem + 1vw, 1.75rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.625rem, 1.3rem + .8vw, 1.625rem); font-weight: 700; line-height: 1.25; }
h3 { font-size: clamp(1.5rem, 1.2rem + .5vw, 1.5rem); font-weight: 600; line-height: 1.3; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.125rem; font-weight: 500; }
h6 { font-size: 13px; font-weight: 500; }

p { color: var(--neutral-dark); font-size: 13px; line-height: 1.6; }
.form-select, .form-control { font-size: 13px; }
.btn { border-radius: 12px; font-weight: 600; }
.btn-primary { background-color: var(--primary-color); border: none; color: #fff; }
.btn-primary:hover { background-color: var(--secondary-color); }
.text-primary { color: #1a365d !important; }

/* CRM button skin shared by the WMS pages. */
.wms-app .crm-btn,
.crm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid var(--wms-line-soft);
  border-radius: 12px;
  background: #fff;
  color: var(--wms-text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.wms-app .crm-btn:hover,
.crm-btn:hover {
  transform: translateY(-1px);
  background: #f8fafc;
  color: var(--wms-text);
  text-decoration: none;
}

.wms-app .crm-btn:focus-visible,
.crm-btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(23, 37, 84, .18);
}

.wms-app .crm-btn-dark,
.crm-btn-dark {
  border-color: var(--wms-button-dark) !important;
  background: var(--wms-button-dark) !important;
  color: #fff !important;
  box-shadow: none;
}

.wms-app .crm-btn-dark:hover,
.crm-btn-dark:hover {
  border-color: var(--wms-button-dark-hover) !important;
  background: var(--wms-button-dark-hover) !important;
  color: #fff !important;
  box-shadow: none;
}

.wms-app .crm-btn-ghost,
.crm-btn-ghost {
  border-color: var(--wms-line-soft);
  background: #fff;
  color: #0f172a;
}

.wms-app .card,
.wms-app .wms-dashboard-card,
.wms-app .wms-dashboard-panel,
.wms-app .wms-stat-card,
.wms-app .wms-admin-wrap,
.wms-app .wms-warehouse-wrap,
.wms-app .wms-assets-wrap {
  border: 1px solid #e0e0e0;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.wms-app .wms-page-title,
.wms-app .wms-dashboard-head h1,
.wms-app .wms-admin-title {
  color: #111827;
}

/* CRM table skin, applied to all WMS tables. */
.wms-app .wms-data-table,
.wms-app .wms-admin-table,
.wms-app .wms-inventory-table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

.wms-app .wms-data-table thead th,
.wms-app .wms-admin-table thead th,
.wms-app .wms-inventory-table thead th {
  background: #002147 !important;
  color: #fff !important;
  border: 1px solid #e0e0e0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 10px 12px;
  white-space: nowrap;
}

.wms-app .wms-data-table tbody,
.wms-app .wms-admin-table tbody,
.wms-app .wms-inventory-table tbody { background: #f3f4f6; }

.wms-app .wms-data-table tbody td,
.wms-app .wms-admin-table tbody td,
.wms-app .wms-inventory-table tbody td {
  background: #fff !important;
  border: 1px solid #e0e0e0;
  font-size: 12px;
  padding: 11px 12px;
  vertical-align: middle;
}

.wms-app .wms-data-table tbody tr:nth-child(even) td,
.wms-app .wms-admin-table tbody tr:nth-child(even) td,
.wms-app .wms-inventory-table tbody tr:nth-child(even) td { background: #f3f4f6 !important; }

.wms-app .wms-data-table tbody tr:hover td,
.wms-app .wms-admin-table tbody tr:hover td,
.wms-app .wms-inventory-table tbody tr:hover td { background: #e8edf4 !important; }

.wms-app .wms-data-table thead th:first-child,
.wms-app .wms-data-table tbody td:first-child,
.wms-app .wms-admin-table thead th:first-child,
.wms-app .wms-admin-table tbody td:first-child,
.wms-app .wms-inventory-table thead th:first-child,
.wms-app .wms-inventory-table tbody td:first-child { border-left: 0; }

.wms-app .wms-data-table thead th:last-child,
.wms-app .wms-data-table tbody td:last-child,
.wms-app .wms-admin-table thead th:last-child,
.wms-app .wms-admin-table tbody td:last-child,
.wms-app .wms-inventory-table thead th:last-child,
.wms-app .wms-inventory-table tbody td:last-child { border-right: 0; }

.wms-app .wms-data-table tbody tr:last-child td,
.wms-app .wms-admin-table tbody tr:last-child td,
.wms-app .wms-inventory-table tbody tr:last-child td { border-bottom: 0; }

.wms-app .wms-table-index {
  width: 52px;
  min-width: 52px;
  text-align: center !important;
  color: #64748b !important;
  font-weight: 700;
  white-space: nowrap;
}

.wms-app .wms-admin-btn,
.wms-app .wms-dashboard-action,
.wms-app .wms-tab,
.wms-app .wms-warehouse-tab {
  font-weight: 600;
}

.wms-app .wms-admin-btn-primary,
.wms-app .wms-admin-btn-dark,
.wms-app .wms-dashboard-action.primary {
  background: var(--wms-button-dark) !important;
  border-color: var(--wms-button-dark) !important;
  color: #fff !important;
}

.wms-app .wms-admin-btn-primary:hover,
.wms-app .wms-admin-btn-dark:hover,
.wms-app .wms-dashboard-action.primary:hover { background: var(--wms-button-dark-hover) !important; border-color: var(--wms-button-dark-hover) !important; }

.wms-app .wms-tab.is-active,
.wms-app .wms-tab:hover,
.wms-app .wms-warehouse-tab.is-active,
.wms-app .wms-warehouse-tab:hover {
  background: #ffc107 !important;
  color: #fff !important;
}

.wms-app {
  background: #f1f5f9;
}

.wms-app > .container-fluid {
  min-height: 0;
}

.wms-app .wms-dashboard-shell {
  min-height: calc(100vh - 140px);
}

.wms-progress-wrap {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #fff;
  color: #64748b;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .12);
  z-index: 1020;
}

.wms-item-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 20px 16px;
}

.wms-item-filter .form-select {
  width: auto;
  min-width: 150px;
  border-radius: 8px;
  border-color: #e2e8f0;
  font-size: 12px;
}

.wms-item-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 240px;
  padding: 8px 11px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.wms-item-search i {
  color: #94a3b8;
  font-size: 12px;
}

.wms-item-search input {
  width: 100%;
  border: 0;
  outline: 0;
  font-size: 12px;
}

.wms-admin-icon-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #1a365d;
}

.wms-admin-icon-btn:hover {
  border-color: #ffc107;
  background: #ffc107;
  color: #fff;
}

@media (max-width: 991.98px) {
  .wms-app .wms-dashboard-shell,
  .wms-app .wms-warehouse-page,
  .wms-app .wms-assets-page,
  .wms-app .wms-admin-page { border-radius: 0; }
}

@media (max-width: 767.98px) {
  .wms-item-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .wms-item-filter .form-select,
  .wms-item-search {
    width: 100%;
  }
}

a {
  color: var(--wms-primary);
  text-decoration: none;
  transition: color .2s ease;
}

a:hover {
  color: var(--wms-orange);
}

.wms-dashboard-shell {
  min-height: calc(100vh - 82px);
}

/* -------------------------------------------------------------------------
 * CRM Abacus visual parity layer
 *
 * WMS pages contain small, page-local style blocks for their layout. Keep
 * those blocks focused on layout and centralise the shared CRM palette here
 * so every WMS route follows the same visual language as the original app.
 * ------------------------------------------------------------------------- */
.wms-app,
.wms-app .wms-dashboard-shell,
.wms-app .wms-dashboard-page,
.wms-app .wms-warehouse-page,
.wms-app .wms-assets-page,
.wms-app .wms-import-page,
.wms-app .wms-admin-page {
  background: var(--wms-page) !important;
  color: var(--wms-text);
}

.wms-app h1,
.wms-app h2,
.wms-app h3,
.wms-app h4,
.wms-app h5,
.wms-app h6,
.wms-app .wms-page-title,
.wms-app .wms-dashboard-head h1,
.wms-app .wms-dashboard-panel h2,
.wms-app .wms-panel-head h2,
.wms-app .wms-admin-title,
.wms-app .wms-dashboard-card-value,
.wms-app .wms-stat-value {
  color: var(--wms-text) !important;
}

.wms-app .wms-dashboard-head p,
.wms-app .wms-dashboard-panel p,
.wms-app .wms-panel-head p,
.wms-app .wms-page-subtitle,
.wms-app .wms-admin-note,
.wms-app .wms-stat-label,
.wms-app .wms-dashboard-card-label,
.wms-app .wms-admin-table th,
.wms-app .wms-data-table th {
  color: var(--wms-muted) !important;
}

.wms-app .wms-dashboard-eyebrow,
.wms-app .wms-eyebrow {
  color: var(--wms-orange) !important;
}

.wms-app .wms-dashboard-check a,
.wms-app .wms-dashboard-quick,
.wms-app .wms-dashboard-quick:hover {
  color: var(--wms-orange) !important;
}

.wms-app .wms-dashboard-quick > i:last-child {
  color: #94a3b8 !important;
}

.wms-app .wms-dashboard-card-icon.orange,
.wms-app .wms-stat-icon.orange,
.wms-app .wms-import-note-icon {
  background: #fff7ed !important;
  color: var(--wms-orange) !important;
}

.wms-app .card,
.wms-app .wms-dashboard-card,
.wms-app .wms-dashboard-panel,
.wms-app .wms-stat-card,
.wms-app .wms-admin-wrap,
.wms-app .wms-warehouse-wrap,
.wms-app .wms-assets-wrap,
.wms-app .wms-account-card,
.wms-app .wms-import-panel,
.wms-app .wms-import-note,
.wms-app .wms-form-card,
.wms-app .wms-admin-card,
.wms-app .wms-mini-card {
  border-color: var(--wms-line) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05) !important;
}

.wms-app .wms-dashboard-card,
.wms-app .wms-dashboard-panel,
.wms-app .wms-stat-card,
.wms-app .wms-admin-wrap,
.wms-app .wms-warehouse-wrap,
.wms-app .wms-assets-wrap,
.wms-app .wms-account-card,
.wms-app .wms-import-panel,
.wms-app .wms-import-note,
.wms-app .wms-admin-card,
.wms-app .wms-mini-card {
  background: #fff !important;
}

.wms-app .wms-form-card {
  background: var(--wms-surface) !important;
}

/* The original CRM uses a dark navy table header, grey table surface and a
 * light blue hover state. Apply the same skin to every WMS data table. */
.wms-app .wms-data-table,
.wms-app .wms-admin-table,
.wms-app .wms-inventory-table {
  border-color: var(--wms-line) !important;
}

.wms-app .wms-data-table thead th,
.wms-app .wms-admin-table thead th,
.wms-app .wms-inventory-table thead th {
  background: var(--wms-primary-dark) !important;
  color: #fff !important;
  border-color: var(--wms-line) !important;
}

.wms-app .wms-data-table tbody,
.wms-app .wms-admin-table tbody,
.wms-app .wms-inventory-table tbody {
  background: var(--wms-surface) !important;
}

.wms-app .wms-data-table tbody td,
.wms-app .wms-admin-table tbody td,
.wms-app .wms-inventory-table tbody td {
  background: #fff !important;
  color: #334155 !important;
  border-color: var(--wms-line) !important;
}

.wms-app .wms-admin-table tbody tr:not(.wms-company-divider) td {
  border: 1px solid var(--wms-line-soft) !important;
}

.wms-app .wms-data-table tbody tr:nth-child(even) td,
.wms-app .wms-admin-table tbody tr:nth-child(even) td,
.wms-app .wms-inventory-table tbody tr:nth-child(even) td {
  background: var(--wms-surface) !important;
}

.wms-app .wms-data-table tbody tr:hover td,
.wms-app .wms-admin-table tbody tr:hover td,
.wms-app .wms-inventory-table tbody tr:hover td {
  background: var(--wms-hover) !important;
}

.wms-app .wms-tab.is-active,
.wms-app .wms-tab:hover,
.wms-app .wms-warehouse-tab.is-active,
.wms-app .wms-warehouse-tab:hover {
  background: var(--wms-gold) !important;
  color: #fff !important;
}

.wms-app .wms-admin-btn-primary,
.wms-app .wms-admin-btn-dark,
.wms-app .wms-dashboard-action.primary {
  background: var(--wms-button-dark) !important;
  border-color: var(--wms-button-dark) !important;
  color: #fff !important;
}

.wms-app .wms-admin-btn-primary:hover,
.wms-app .wms-admin-btn-dark:hover,
.wms-app .wms-dashboard-action.primary:hover {
  background: var(--wms-button-dark-hover) !important;
  border-color: var(--wms-button-dark-hover) !important;
  color: #fff !important;
}

.wms-app .wms-role-pill {
  background: var(--wms-button-dark) !important;
  border: 1px solid var(--wms-button-dark) !important;
  color: #fff !important;
}

.wms-app .wms-role-pill.super {
  background: var(--wms-gold) !important;
  border-color: var(--wms-gold) !important;
  color: var(--wms-button-dark) !important;
}

.wms-app .wms-admin-btn-light,
.wms-app .wms-dashboard-action:not(.primary) {
  background: #fff !important;
  border-color: var(--wms-line-soft) !important;
  color: #334155 !important;
}

.wms-app .wms-admin-btn-light:hover,
.wms-app .wms-dashboard-action:not(.primary):hover {
  background: var(--wms-surface) !important;
  color: var(--wms-primary) !important;
}

.wms-app .wms-admin-input,
.wms-app .wms-admin-search,
.wms-app .wms-item-search,
.wms-app .wms-asset-search,
.wms-app .form-control,
.wms-app .form-select {
  border-color: var(--wms-line-soft) !important;
}

.wms-app .wms-admin-input:focus,
.wms-app .form-control:focus,
.wms-app .form-select:focus {
  border-color: var(--wms-primary) !important;
  box-shadow: 0 0 0 .2rem rgba(26, 54, 93, .14) !important;
}

.wms-app .wms-admin-search .wms-admin-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.wms-app .wms-admin-icon-btn {
  border-color: var(--wms-line-soft) !important;
  color: var(--wms-primary) !important;
}

.wms-app .wms-admin-icon-btn:hover {
  border-color: var(--wms-gold) !important;
  background: var(--wms-gold) !important;
  color: #fff !important;
}

.wms-app .wms-admin-table tbody tr.wms-company-divider td,
.wms-app .wms-admin-table tbody tr.wms-company-divider:hover td {
  background: var(--wms-primary-dark) !important;
  color: #dbeafe !important;
  border-bottom-color: #2563eb !important;
}

/* One consistent navigation and table skin for TSCD, VTTS and VTTH. */
.wms-app .wms-operation-switcher {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--wms-line-soft);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .04);
}

.wms-app .wms-operation-switcher-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: max-content;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.wms-app .wms-operation-switcher-link i { color: #64748b; }
.wms-app .wms-operation-switcher-link small { color: #94a3b8; font-size: 10px; font-weight: 800; }
.wms-app .wms-operation-switcher-link:hover { background: #f8fafc; color: var(--wms-primary); }
.wms-app .wms-operation-switcher-link.is-active { background: var(--wms-button-dark); border-color: var(--wms-button-dark); color: #fff; box-shadow: 0 7px 15px rgba(15, 23, 42, .16); }
.wms-app .wms-operation-switcher-link.is-active i,
.wms-app .wms-operation-switcher-link.is-active small { color: #fff; }

.wms-app .wms-operation-table-wrap {
  overflow: auto !important;
  border: 1px solid var(--wms-line) !important;
  border-radius: 14px;
  background: var(--wms-surface);
  scrollbar-gutter: stable;
}

.wms-app .wms-operation-table {
  min-width: 980px;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
}

.wms-app .wms-operation-table thead th {
  background: var(--wms-primary-dark) !important;
  color: #fff !important;
  border: 1px solid var(--wms-line) !important;
  padding: 12px 14px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  white-space: nowrap;
}

.wms-app .wms-operation-table tbody td {
  background: #fff !important;
  color: #334155 !important;
  border: 1px solid var(--wms-line) !important;
  padding: 13px 14px !important;
  font-size: 12px !important;
  vertical-align: middle;
}

.wms-app .wms-operation-table tbody tr:nth-child(even) td { background: var(--wms-surface) !important; }
.wms-app .wms-operation-table tbody tr:hover td { background: var(--wms-hover) !important; }
.wms-app .wms-operation-table .wms-table-index { color: #64748b !important; font-weight: 800 !important; text-align: center !important; }
.wms-app .wms-table-note-cell { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 180px; }
.wms-app .wms-table-actions { display: inline-flex; flex: 0 0 auto; gap: 5px; }

@media (max-width: 575.98px) {
  .wms-app .wms-operation-switcher { border-radius: 10px; }
  .wms-app .wms-operation-switcher-link { padding: 9px 11px; }
  .wms-app .wms-operation-table { min-width: 820px; }
}

.wms-app .wms-center-display-id {
  background: var(--wms-surface) !important;
  color: var(--wms-text) !important;
}
