/* Dashboard, account header và notification center. */

/* Layout và component chỉ dùng trên website public. */

.adaptive-captcha {
padding: 14px;
  border: 1px solid rgba(191, 145, 48, 0.35);
  border-radius: 14px;
  background: rgba(247, 241, 219, 0.72);
}

.adaptive-captcha[hidden] {
display: none;
}

.adaptive-captcha p {
margin: 0 0 10px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.adaptive-captcha-widget {
min-height: 65px;
}

.sr-only {
position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-panel {
width: min(1040px, 100%);
}

.visually-hidden {
position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.logo-frame {
display: inline-grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 999px;
  background: #ffffff;
}

.logo-frame img {
display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
}

.status-pill {
display: inline-flex;
  min-height: var(--account-action-size);
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  border: 1px solid rgba(31, 49, 104, 0.12);
  color: var(--accent-strong);
  background: #f3f6fb;
  border-radius: 999px;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 700;
}

.welcome-pill {
max-width: 260px;
  overflow: hidden;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-meta {
--dashboard-account-action-size: 38px;
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, auto) auto auto auto;
  align-items: center;
  justify-content: end;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-account-meta .dashboard-account-action {
display: inline-grid;
  place-items: center;
  width: var(--dashboard-account-action-size);
  height: var(--dashboard-account-action-size);
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--accent-strong);
  background: rgba(31, 49, 104, 0.055);
  box-shadow: none;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-account-meta .dashboard-account-action:hover,
.dashboard-account-meta .dashboard-account-action:focus-visible {
border-color: var(--accent-strong);
  color: #ffffff;
  background: var(--accent-strong);
  box-shadow: 0 6px 14px rgba(31, 49, 104, 0.14);
  transform: translateY(-1px);
}

.dashboard-account-meta .status-pill {
min-height: var(--dashboard-account-action-size);
  border-color: rgba(15, 118, 110, 0.18);
  color: #155e5a;
  background: rgba(15, 118, 110, 0.07);
}

.dashboard-account-meta .dashboard-logout-button {
min-height: var(--dashboard-account-action-size);
  padding: 0 4px 0 12px;
  border: 0;
  border-left: 1px solid rgba(31, 49, 104, 0.12);
  border-radius: 0;
  color: #526079;
  background: transparent;
  box-shadow: none;
}

.dashboard-account-meta .dashboard-logout-button:hover,
.dashboard-account-meta .dashboard-logout-button:focus-visible {
color: var(--accent-strong);
  background: transparent;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-refresh-button {
flex: 0 0 var(--account-action-size);
}

.account-refresh-button svg {
width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-refresh-button.is-refreshing svg {
animation: loading-spin 0.8s linear infinite;
}

.account-refresh-button.refresh-success {
color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
}

.account-refresh-button.refresh-error {
color: #b42318;
  border-color: rgba(180, 35, 24, 0.4);
  background: rgba(180, 35, 24, 0.08);
}

.notification-center {
position: relative;
  flex: 0 0 auto;
}

.notification-trigger {
position: relative;
}

.notification-trigger svg {
width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-trigger.has-unread {
color: var(--accent-strong);
  border-color: rgba(212, 163, 63, 0.48);
  background: rgba(255, 248, 226, 0.9);
  box-shadow: 0 8px 20px rgba(154, 94, 15, 0.12);
}

#dashboard-view > .brand-row {
align-items: center;
}

@media (max-width: 900px) {
  #dashboard-view > .brand-row {
  display: grid;
      grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-account-meta {
  width: 100%;
      justify-content: start;
  }
}

.notification-trigger.is-open {
color: #ffffff;
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  box-shadow: 0 8px 20px rgba(31, 49, 104, 0.2);
}

.notification-badge {
position: absolute;
  top: -6px;
  right: -7px;
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  background: #c63d32;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(180, 35, 24, 0.25);
}

.notification-panel {
position: absolute;
  z-index: 80;
  top: calc(100% + 12px);
  right: 0;
  display: grid;
  width: min(410px, calc(100vw - 36px));
  max-height: min(590px, calc(100vh - 130px));
  overflow: hidden;
  border: 1px solid rgba(31, 49, 104, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(21, 33, 61, 0.22);
  backdrop-filter: blur(18px);
}

.notification-panel-header {
display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(31, 49, 104, 0.09);
  background:
    radial-gradient(circle at 100% 0, rgba(212, 163, 63, 0.14), transparent 42%),
    #ffffff;
}

.notification-panel-header .eyebrow {
font-size: 10px;
}

.notification-panel-header .heading-stack {
--heading-kicker-gap: 3px;
}

.notification-panel-header h2 {
margin: 0;
  color: var(--accent-strong);
  font-size: 21px;
}

.notification-panel-header-actions {
display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.notification-close,
.notification-backdrop {
display: none;
}

.notification-close {
flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(31, 49, 104, 0.12);
  border-radius: 11px;
  color: var(--accent-strong);
  background: #ffffff;
  box-shadow: none;
}

.notification-close svg {
width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.notification-tabs {
display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin: 12px 18px 0;
  padding: 4px;
  border: 1px solid rgba(31, 49, 104, 0.1);
  border-radius: 12px;
  background: #f4f6fa;
}

.notification-tab {
min-width: 0;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  color: #68738a;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 750;
}

.notification-tab:hover {
color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.7);
}

.notification-tab.is-active {
color: #ffffff;
  background: var(--accent-strong);
  box-shadow: 0 5px 14px rgba(31, 49, 104, 0.2);
}

.notification-retention-note {
margin: 7px 19px 9px;
  color: #8a93a5;
  font-size: 10px;
  line-height: 1.4;
  text-align: right;
}

.notification-read-all,
.notification-load-more {
width: auto;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  color: #31508f;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 750;
}

.notification-read-all:hover,
.notification-load-more:hover {
color: var(--accent-strong);
  background: transparent;
  text-decoration: underline;
}

.notification-read-all:disabled {
color: #98a2b3;
  background: transparent;
  opacity: 1;
}

.notification-list {
display: grid;
  min-height: 116px;
  max-height: min(360px, 46dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(49, 80, 143, 0.38) transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.notification-list::-webkit-scrollbar {
width: 6px;
}

.notification-list::-webkit-scrollbar-track {
background: transparent;
}

.notification-list::-webkit-scrollbar-thumb {
border-radius: 999px;
  background: rgba(49, 80, 143, 0.32);
}

.notification-item {
position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(31, 49, 104, 0.08);
  background: #ffffff;
  cursor: default;
}

.notification-item.is-unread {
background: linear-gradient(90deg, rgba(238, 243, 255, 0.94), #ffffff 72%);
}

.notification-item.success .notification-item-icon {
color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
}

.notification-item.warning .notification-item-icon {
color: #9a5b08;
  background: rgba(212, 163, 63, 0.14);
}

.notification-item.error .notification-item-icon {
color: #b42318;
  background: rgba(180, 35, 24, 0.09);
}

.notification-load-more {
justify-self: center;
  margin: 12px;
}

@media (max-width: 640px) {
  .notification-backdrop:not([hidden]) {
  position: fixed;
      z-index: 89;
      inset: 0;
      display: block;
      background: rgba(9, 17, 34, 0.5);
      backdrop-filter: blur(3px);
  }

  .notification-panel {
  position: fixed;
      z-index: 90;
      top: auto;
      right: max(12px, env(safe-area-inset-right));
      bottom: max(12px, env(safe-area-inset-bottom));
      left: max(12px, env(safe-area-inset-left));
      width: auto;
      height: min(620px, calc(100dvh - 24px));
      min-width: 0;
      max-width: none;
      max-height: calc(100dvh - 24px);
      grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
      border-radius: 24px;
      transform-origin: bottom center;
      animation: notification-panel-in 160ms ease-out both;
      overscroll-behavior: contain;
  }

  .notification-panel-header {
  align-items: flex-start;
      padding: 17px 16px 13px;
  }

  .notification-panel-header-actions {
  gap: 6px;
  }

  .notification-read-all {
  max-width: 116px;
      min-height: 36px;
      line-height: 1.35;
      text-align: right;
  }

  .notification-close {
  display: grid;
  }

  .notification-close:hover {
  color: var(--accent-strong);
      background: rgba(31, 49, 104, 0.06);
  }

  .notification-tabs {
  margin-right: 16px;
      margin-left: 16px;
  }

  .notification-retention-note {
  margin-right: 17px;
      margin-left: 17px;
  }

  .notification-item {
  padding: 14px 16px;
  }

  .notification-list {
  min-height: 0;
      max-height: none;
  }

  @media (hover: none) {
    .notification-trigger:not(.is-open):not(.has-unread):hover {
    color: var(--accent-strong);
          background: #ffffff;
    }

    .notification-trigger.has-unread:not(.is-open):hover {
    color: var(--accent-strong);
          border-color: rgba(212, 163, 63, 0.48);
          background: rgba(255, 248, 226, 0.9);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .notification-panel,
  .account-refresh-button.is-refreshing svg {
  animation: none;
  }
}
.history-table-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(31, 49, 104, 0.12);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(21, 33, 61, 0.06);
}

.history-table-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 20px;
  background: linear-gradient(90deg, rgba(31, 49, 104, 0.1), rgba(212, 163, 63, 0.08));
}

.history-table-title {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  color: var(--accent-strong);
  background: transparent;
  font-size: 18px;
  line-height: 1.4;
}

.history-title-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 11px;
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 6px 14px rgba(31, 49, 104, 0.18);
}

.history-title-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-clear-sort {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(31, 49, 104, 0.16);
  border-radius: 11px;
  color: #62708a;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 5px 12px rgba(31, 49, 104, 0.08);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.history-clear-sort svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-clear-sort.is-active:hover,
.history-clear-sort.is-active:focus-visible {
  color: #a32626;
  border-color: rgba(163, 38, 38, 0.28);
  background: #fff1f1;
  transform: translateY(-1px);
}

.history-clear-sort:focus-visible {
  outline: 2px solid rgba(31, 49, 104, 0.42);
  outline-offset: 2px;
}

.history-clear-sort:disabled {
  color: #a8b0c0;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: none;
  cursor: default;
  opacity: 0.62;
}

.history-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-color: rgba(31, 49, 104, 0.42) rgba(31, 49, 104, 0.08);
  scrollbar-width: thin;
}

.history-table-scroll:focus-visible {
  outline: 3px solid rgba(31, 49, 104, 0.3);
  outline-offset: -3px;
}

.history-table-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.history-table-scroll::-webkit-scrollbar-track {
  background: rgba(31, 49, 104, 0.06);
}

.history-table-scroll::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(31, 49, 104, 0.38);
  background-clip: padding-box;
}

.history-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ink);
  background: #ffffff;
}

.history-payment-table {
  min-width: 1160px;
}

.history-report-table {
  min-width: 1780px;
}

.history-table th,
.history-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(31, 49, 104, 0.1);
  text-align: left;
  vertical-align: top;
}

.history-table th {
  color: #4e5d7a;
  background: #f6f8fc;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.history-table td {
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.5;
}

.history-sort-button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding: 3px 2px;
  border: 0;
  border-radius: 7px;
  color: inherit;
  background: transparent;
  box-shadow: none;
  font-size: inherit;
  font-weight: inherit;
  white-space: nowrap;
}

.history-sort-button:hover,
.history-sort-button:focus-visible,
.history-sort-button.is-active {
  color: var(--accent-strong);
  background: rgba(31, 49, 104, 0.08);
  box-shadow: none;
}

.history-sort-button:focus-visible {
  outline: 2px solid rgba(31, 49, 104, 0.42);
  outline-offset: 1px;
}

.history-sort-icon {
  position: relative;
  display: inline-block;
  width: 12px;
  height: 16px;
  flex: 0 0 12px;
  color: #8390a8;
  font-size: 0;
}

.history-sort-icon::before,
.history-sort-icon::after {
  position: absolute;
  left: 2px;
  width: 0;
  height: 0;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
  transition: opacity 140ms ease, transform 140ms ease;
}

.history-sort-icon::before {
  top: 2px;
  border-bottom: 5px solid currentColor;
}

.history-sort-icon::after {
  bottom: 2px;
  border-top: 5px solid currentColor;
}

.history-sort-button.is-active .history-sort-icon {
  color: var(--accent);
}

.history-sort-button[data-sort-direction="asc"] .history-sort-icon::after,
.history-sort-button[data-sort-direction="desc"] .history-sort-icon::before {
  opacity: 0.22;
}

.history-sort-priority {
  display: none;
}

.history-table tbody tr:nth-child(even) td {
  background: rgba(244, 247, 251, 0.62);
}

.history-table tbody tr:last-child td {
  border-bottom: 0;
}

.history-table-row:hover td {
  background: rgba(212, 163, 63, 0.08);
}

.history-sequence-cell,
.history-code-cell {
  color: var(--accent-strong);
  font-weight: 400;
}

.history-nowrap-cell,
.history-time-cell {
  white-space: nowrap;
}

.history-email-cell {
  max-width: 260px;
  overflow-wrap: anywhere;
}

.history-status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  color: #526072;
  background: #edf1f6;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.history-tuvi-summary {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.history-muted-value {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.history-note-cell {
  min-width: 170px;
  color: var(--muted);
}

.history-tuvi-cell {
  min-width: 310px;
}

.history-tuvi-summary span {
  white-space: nowrap;
}

.history-status-success {
  color: #087566;
  background: #ddf5ef;
}

.history-status-processing {
  color: #8a5600;
  background: #fff2cf;
}

.history-status-pending {
  color: #315fba;
  background: #e8efff;
}

.history-status-cancelled,
.history-status-failed {
  color: #a32626;
  background: #feeaea;
}

.history-state {
  margin: 12px 16px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.history-state:empty {
  display: none;
}

.history-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border-top: 1px solid rgba(31, 49, 104, 0.08);
}

.history-page-list {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.history-page-number {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(31, 49, 104, 0.14);
  border-radius: 999px;
  color: var(--accent-strong);
  background: #f5f7fb;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.history-page-number:not(.is-current):hover,
.history-page-number:not(.is-current):focus-visible {
  color: var(--accent-strong);
  border-color: rgba(212, 163, 63, 0.72);
  background: #fff6dd;
  transform: translateY(-1px);
}

.history-page-number.is-current {
  color: #ffffff;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 6px 14px rgba(31, 49, 104, 0.18);
  opacity: 1;
}

.history-page-ellipsis {
  display: inline-grid;
  width: 22px;
  height: 34px;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.history-retry {
  min-height: 38px;
  padding: 0 14px;
}
