.app-header {
  height: 52px;
  background: #006fbd;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 12px;
  width: 100%;
}

.app-header-left {
  width: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
}

.app-header-right {
  width: 56px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}

.app-header-title-wrap {
  flex: 1;
  min-width: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
}

.app-header-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
}

.app-header-subtitle {
  font-size: 10px;
  font-style: italic;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 3px;
  white-space: nowrap;
}

.app-header-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: background 0.2s;
}

.app-header-menu:hover {
  background: rgba(255, 255, 255, 0.15);
}

.app-header-menu:active {
  opacity: 0.6;
}

@media (max-width: 768px) {
  .app-header {
    height: 52px;
    padding: 0 8px;
  }

  .app-header-left,
  .app-header-right {
    width: 44px;
  }

  .app-header-title {
    font-size: 15px;
  }

  .app-header-subtitle {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.7);
  }

  .app-header-menu {
    width: 36px;
    height: 36px;
    font-size: 16px;
    border-radius: 6px;
    -webkit-tap-highlight-color: transparent;
  }

  .app-header-menu:hover {
    background: transparent;
  }

  .app-header-menu:active {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .app-header-menu {
    width: 32px;
    height: 32px;
    font-size: 15px;
    -webkit-tap-highlight-color: transparent;
  }
}
.dashboard-sync-banner {
  margin: 12px 16px 8px;
  padding: 10px 14px;
  border: 1px solid #f0b429;
  background: #fff7e6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-sync-banner-content {
  flex: 1;
}

.dashboard-sync-banner-title {
  font-size: 14px;
  font-weight: 700;
  color: #ad6800;
  margin-bottom: 2px;
}

.dashboard-sync-banner-text {
  font-size: 13px;
  line-height: 1.4;
  color: #8c5a00;
}

.dashboard-sync-banner-btn {
  min-width: 96px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: #1677ff;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 0 12px;
  cursor: pointer;
}

.dashboard-sync-banner-btn:hover {
  background: #0958d9;
}

.dashboard-section {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  background: #f3f6f9;
  border-bottom: 1px solid #d9e2ec;
  font-size: 14px;
  font-weight: 700;
  color: #0f5f9a;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.dashboard-grid {
  display: flex;
  flex-wrap: wrap; 
  justify-content: space-evenly;
  align-items: flex-start;
  gap: 28px;
  padding: 28px 24px 20px;
}

.dashboard-item {
  width: 100px; 
  text-align: center;
  cursor: pointer;
}

.dashboard-item-icon {
  font-size: 42px;
  color: #1677ff;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
}

.dashboard-item-label {
  font-size: 14px;
  color: #006fbd;
  line-height: 1.3;
}

.dashboard-item:hover .dashboard-item-icon {
  transform: scale(1.1);
  transition: 0.2s;
}

.dashboard-item:hover .dashboard-item-label {
  color: #1677ff;
}
.customer-page {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.customer-table-wrap {
  flex: 1;
  width: 100%;
  min-height: 0;
  background: #fff;
  overflow: hidden;
}

.customer-page .ant-table-wrapper {
  width: 100%;
  height: 100%;
}

.customer-page .ant-spin-nested-loading,
.customer-page .ant-spin-container {
  height: 100%;
}

.customer-page .ant-table {
  width: 100%;
  border-radius: 0 !important;
}

.customer-page .ant-table-container {
  border-inline-start: none !important;
  border-radius: 0 !important;
  border-start-start-radius: 0 !important;
  border-start-end-radius: 0 !important;
}

.customer-page .ant-table-header {
  overflow: hidden !important;
  border-radius: 0 !important;
}

.customer-page .ant-table-thead > tr > th:first-child {
  border-start-start-radius: 0 !important;
}

.customer-page .ant-table-thead > tr > th:last-child {
  border-start-end-radius: 0 !important;
}

.customer-page .ant-table-thead > tr > th,
.customer-page .ant-table-tbody > tr > td {
  padding: 6px 8px;
  font-size: 13px;
  color: #000;
  vertical-align: top;
}

.customer-page .ant-table-thead > tr > th {
  font-weight: 700;
  background: lightgray;
  position: sticky;
  top: 0;
  z-index: 1;
}

.customer-page .ant-table-tbody > tr > td {
  background: #fff;
}

.customer-page .ant-table-cell {
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.customer-page .ant-table-thead > tr > th::before {
  display: none !important;
}

.customer-load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 0 14px;
  font-size: 13px;
  color: #666;
  background: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.customer-load-more span {
  color: #8c8c8c;
}

.customer-load-more.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .customer-load-more,
  .customer-page .ant-table-tbody > tr > td,
  .customer-page .ant-table-thead > tr > th {
    font-size: 10px !important;
  }
}
.delivery-page {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.delivery-table-wrap {
  flex: 1;
  width: 100%;
  min-height: 0;
  background: #fff;
  overflow: hidden;
}

.delivery-page .ant-table-wrapper {
  width: 100%;
  height: 100%;
}

.delivery-page .ant-spin-nested-loading,
.delivery-page .ant-spin-container {
  height: 100%;
}

.delivery-page .ant-table {
  width: 100%;
  border-radius: 0 !important;
}

.delivery-page .ant-table-container {
  border-inline-start: none !important;
  border-radius: 0 !important;
  border-start-start-radius: 0 !important;
  border-start-end-radius: 0 !important;
}

.delivery-page .ant-table-header {
  overflow: hidden !important;
  border-radius: 0 !important;
}

.delivery-page .ant-table-thead > tr > th:first-child {
  border-start-start-radius: 0 !important;
}

.delivery-page .ant-table-thead > tr > th:last-child {
  border-start-end-radius: 0 !important;
}

.delivery-page .ant-table-thead > tr > th,
.delivery-page .ant-table-tbody > tr > td {
  padding: 6px 8px;
  font-size: 14px;
  color: #000;
  vertical-align: top;
}

.delivery-page .ant-table-thead > tr > th {
  font-weight: 700;
  background: lightgray;
  position: sticky;
  top: 0;
  z-index: 1;
}

.delivery-page .ant-table-tbody > tr > td {
  background: #fff;
}

.delivery-page .ant-table-cell {
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.delivery-page .ant-table-thead > tr > th::before {
  display: none !important;
}

.delivery-load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 0 14px;
  font-size: 13px;
  color: #666;
  background: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.delivery-load-more.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .delivery-load-more,
  .delivery-page .ant-table-tbody > tr > td,
  .delivery-page .ant-table-thead > tr > th {
    font-size: 10px !important;
  }
}
.sync-progress-block {
  margin-bottom: 36px;
}

.sync-progress-title {
  font-size: 24px;
  margin-bottom: 12px;
}

.sync-progress-title-text {
  font-weight: 700;
}

.sync-progress-count {
  font-weight: 400;
}

.sync-progress-bar {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  border: 2px solid #2b73e0;
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  background: #fff;
}

.sync-progress-bar.error {
  border-color: #ff7875;
}

.sync-progress-box {
  flex: 1;
  height: 56px;
  background: #c8d8ea;
}

.sync-progress-box.active {
  background: #2b73e0;
}

.sync-progress-meta {
  margin-top: 12px;
  min-height: 32px;
}

.sync-progress-status {
  font-size: 14px;
  color: #555;
}

.sync-progress-success {
  font-size: 14px;
  color: #389e0d;
  font-weight: 600;
}

.sync-progress-error-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sync-progress-error-text {
  font-size: 14px;
  color: #cf1322;
  line-height: 1.4;
}
.sync-page-root {
  padding: 28px 36px 20px;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100%;
}

.sync-page-content {
  flex: 1;
}

.sync-page-title {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 26px;
}

.sync-page-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  margin-top: auto;
  border-top: 1px solid #e5e5e5;
}
html,
body,
#root {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

* {
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f3f3f3;
  color: #000;
}

button {
  font: inherit;
}

.app-page {
  min-height: 100vh;
  height: 100vh;
  background: #f3f3f3;
  display: flex;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

.app-card {
  width: 100%;
  max-width: 980px;
  height: 100%;
  background: #fff;
  border: 1px solid #222;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  width: 100%;
  min-height: 0;
}

.app-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.app-sidebar {
  position: absolute;
  top: 0;
  left: 0;
  width: 260px;
  height: 100%;
  background: #ffffff;
  border-right: 1px solid #d9d9d9;
  display: flex;
  flex-direction: column;
  z-index: 20;
  transition: transform 0.22s ease-out;
  box-shadow: 4px 0 18px rgba(0, 0, 0, 0.08);
}

.app-sidebar.closed {
  transform: translateX(-100%);
}

.app-sidebar.open {
  transform: translateX(0);
}

.app-sidebar-logo {
  height: 116px;
  padding: 18px 16px;
  border-bottom: 1px solid #ececec;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.app-sidebar-logo:hover {
  opacity: 0.9;
}

.app-sidebar-logo-image {
  max-width: 220px;
  /* max-height: 72px; */
  width: auto;
  height: auto;
  object-fit: contain;
  transform: scale(0.97);
}

.app-sidebar-user-card {
  margin: 16px 14px 0;
  padding: 14px 12px;
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fafafa;
}

.app-sidebar-user-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #1f1f1f;
  word-break: break-word;
}

.app-sidebar-user-row .label {
  min-width: 52px;
  font-weight: 700;
  color: #111;
}

.app-sidebar-role {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d9d9d9;
  font-size: 13px;
  font-weight: 700;
  color: #0f5f9a;
  text-transform: uppercase;
}

.app-sidebar-footer {
  margin-top: auto;
  padding: 13px;
  border-top: 1px solid #ececec;
  background: #fff;
}

.app-sidebar-logout {
  width: 100%;
  height: 42px;
  border-radius: 10px !important;
  font-size: 13px;
  font-weight: 700;
}

.app-sync-btn {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  border: none;
  border-radius: 50%;
  background: #4d6dff;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.app-table-wrap {
  background: #f5f5f5;
}

/* Scrollbar cho table */
.app-table-scroll .ant-table-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.app-table-scroll .ant-table-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 999px;
}

.app-table-scroll .ant-table-body::-webkit-scrollbar-thumb {
  background: rgba(0, 111, 189, 0.4);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.app-table-scroll .ant-table-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 111, 189, 0.65);
}

/* Login page */
#components-login {
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(135deg, #eef5fb 0%, #f8fbff 55%, #eaf3fb 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  padding-top: 120px;
}

#components-login .login-form {
  width: 100%;
  max-width: 360px;
  padding: 32px 28px 28px;
  background: #fff;
  border: 1px solid #e6eef5;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(0, 111, 189, 0.14);
  animation: loginFadeScale 0.35s ease-out;
  transform-origin: center;
}

@keyframes loginFadeScale {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#components-login .ant-form-item:first-child {
  text-align: center;
  margin-bottom: 26px;
}

#components-login .ant-form-item:first-child img {
  max-width: 190px;
  height: auto !important;
  object-fit: contain;
  animation: loginLogoFade 0.45s ease-out;
}

@keyframes loginLogoFade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#components-login .ant-row,
#components-login .ant-col {
  width: 100%;
}

#components-login .ant-form-item {
  margin-bottom: 16px;
}

#components-login .ant-input-affix-wrapper {
  height: 42px;
  border-radius: 10px;
  border-color: #d9e5ef;
  background: #fbfdff;
}

#components-login .ant-input-affix-wrapper:hover,
#components-login .ant-input-affix-wrapper-focused {
  border-color: #006fbd;
  box-shadow: 0 0 0 2px rgba(0, 111, 189, 0.12);
}

#components-login .site-form-item-icon {
  color: #006fbd;
}

#components-login .login-form-button {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  background: #006fbd;
  border-color: #006fbd;
  font-weight: 700;
}

#components-login .login-form-button:hover,
#components-login .login-form-button:focus {
  background: #005fa3;
  border-color: #005fa3;
}

@media (max-width: 768px) {
  .app-page {
    padding: 0;
    height: 100vh;
  }

  .app-card {
    max-width: 100%;
    width: 100%;
    border: none;
  }

  .app-sidebar {
    width: 248px;
    box-shadow: 6px 0 20px rgba(0, 0, 0, 0.14);
  }

  .app-sidebar-logo {
    height: 92px;
    padding: 14px 12px;
    -webkit-tap-highlight-color: transparent;
  }

  .app-sidebar-logo:hover {
    opacity: 1;
  }

  .app-sidebar-logo-image {
    max-width: 132px;
    max-height: 52px;
  }

  .app-sidebar-user-card {
    margin: 12px 10px 0;
    padding: 12px 10px;
    border-radius: 8px;
  }

  .app-sidebar-user-row {
    font-size: 10px;
    margin-bottom: 6px;
    gap: 4px;
  }

  .app-sidebar-user-row .label {
    min-width: 46px;
  }

  .app-sidebar-role {
    margin-top: 8px;
    padding-top: 8px;
    font-size: 10px;
  }

  .app-sidebar-footer {
    padding: 10px;
  }

  .app-sidebar-logout {
    height: 38px;
    font-size: 10px;
    border-radius: 8px !important;
  }

  .app-overlay {
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(1px);
  }
  
  .app-sync-btn {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    font-size: 15px;
    background: #4d6dff;
    box-shadow: 0 2px 6px rgba(77, 109, 255, 0.35);
  }

  .app-sync-btn:active {
    transform: scale(0.95);
  }

  #components-login {
    padding: 20px;
    align-items: flex-start;
    padding-top: 140px;
  }

  #components-login .login-form {
    max-width: 340px;
    padding: 28px 24px 24px;
    border-radius: 14px;
    animation: loginFadeMobile 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  }

  #components-login .ant-form-item:first-child img {
    max-width: 175px;
  }
}

@media (max-width: 480px) {
  .app-sidebar {
    width: 194px;
  }

  .app-sidebar-logo {
    height: 84px;
    padding: 12px 10px;
  }

  .app-sidebar-logo-image {
    max-width: 118px;
    max-height: 46px;
    transform: scale(0.97);
  }

  .app-sidebar-user-card {
    margin: 10px 8px 0;
    padding: 10px 9px;
  }

  .app-sidebar-user-row {
    font-size: 10px;
    line-height: 1.4;
  }

  .app-sidebar-user-row .label {
    min-width: 42px;
  }

  .app-sidebar-role {
    font-size: 10px;
  }

  .app-sidebar-footer {
    padding: 8px;
  }

  .app-sidebar-logout {
    height: 36px;
    font-size: 10px;
  }

  .app-sync-btn {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    font-size: 14px;
    background: #4d6dff;
    box-shadow: 0 2px 6px rgba(77, 109, 255, 0.35);
  }

  .app-sync-btn:active {
    transform: scale(0.95);
  }

  #components-login {
    padding: 18px;
    align-items: flex-start;
    padding-top: 90px;
  }

  #components-login .login-form {
    max-width: 100%;
    padding: 28px 22px 24px;
    border-radius: 14px;
  }

  #components-login .ant-form-item:first-child {
    margin-bottom: 22px;
  }

  #components-login .ant-form-item:first-child img {
    max-width: 165px;
  }

  #components-login .ant-input-affix-wrapper,
  #components-login .login-form-button {
    height: 40px;
    border-radius: 9px;
  }
}

@keyframes loginFadeMobile {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
