:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #d8dee8;
  --soft-line: #e8edf3;
  --teal: #0f766e;
  --teal-soft: #e6f5f2;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --amber: #b45309;
  --amber-soft: #fff4df;
  --rose: #be123c;
  --rose-soft: #fff0f3;
  --green: #15803d;
  --shadow: 0 18px 45px rgba(22, 32, 51, 0.08);
  --radius: 8px;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

/* Mobile product polish: keep the information hierarchy intentional instead of
   squeezing desktop panels into a narrow viewport. */
@media (max-width: 720px) {
  body:not(.is-logged-out) .main-panel {
    background:
      radial-gradient(circle at 100% 0, rgba(15, 118, 110, 0.08), transparent 230px),
      #f4f7f8;
  }

  body:not(.is-logged-out) .view.active {
    gap: 14px;
  }

  body:not(.is-logged-out) .panel {
    border: 0;
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(27, 45, 65, 0.075);
  }

  body:not(.is-logged-out) .field > span,
  body:not(.is-logged-out) fieldset.field > legend {
    color: #516074;
    font-size: 12px;
    font-weight: 800;
  }

  body:not(.is-logged-out) .field input,
  body:not(.is-logged-out) .field select,
  body:not(.is-logged-out) .field textarea {
    border-color: transparent;
    border-radius: 13px;
    background-color: #f3f6f8;
  }

  body:not(.is-logged-out) .field input:focus,
  body:not(.is-logged-out) .field select:focus,
  body:not(.is-logged-out) .field textarea:focus {
    border-color: #69b9b2;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
  }

  /* Employee search and personal points card */
  #queryView .two-column {
    gap: 14px;
  }

  #queryView .two-column > .panel:first-child {
    overflow: hidden;
    background:
      radial-gradient(circle at 94% -15%, rgba(63, 178, 166, 0.16), transparent 145px),
      #ffffff;
    padding: 17px;
  }

  #queryView .section-heading h3 {
    font-size: 20px;
    letter-spacing: -0.02em;
  }

  #queryView .section-heading p {
    margin-top: 4px;
    color: #758195;
    font-size: 12px;
  }

  #queryView .search-field {
    position: relative;
    margin-top: 14px;
  }

  #queryView .search-field input {
    min-height: 50px;
    padding-left: 42px;
  }

  #queryView .search-field::after {
    position: absolute;
    bottom: 16px;
    left: 15px;
    width: 13px;
    height: 13px;
    border: 2px solid #8491a4;
    border-radius: 50%;
    content: "";
    pointer-events: none;
  }

  #queryView .search-field::before {
    position: absolute;
    bottom: 14px;
    left: 28px;
    z-index: 1;
    width: 6px;
    height: 2px;
    border-radius: 99px;
    background: #8491a4;
    content: "";
    transform: rotate(45deg);
    pointer-events: none;
  }

  #queryView .employee-list {
    gap: 9px;
    margin-top: 15px;
  }

  #queryView .employee-card {
    position: relative;
    min-height: 70px;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    overflow: hidden;
    border: 1px solid #e7edf1;
    border-radius: 16px;
    background: #fbfcfd;
    padding: 10px;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  }

  #queryView .employee-card.active {
    border-color: #66b8b0;
    background: linear-gradient(135deg, #e9f8f5, #f7fcfb);
    box-shadow: inset 4px 0 0 #0f766e;
  }

  #queryView .employee-card:active {
    transform: scale(0.985);
  }

  #queryView .employee-card .avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(145deg, #edf2f7, #e5ebf2);
    font-size: 16px;
    line-height: 1;
  }

  #queryView .employee-card.active .avatar {
    background: #ffffff;
    color: #0f766e;
    box-shadow: 0 5px 14px rgba(15, 118, 110, 0.1);
  }

  #queryView .employee-meta strong {
    font-size: 15px;
  }

  #queryView .employee-meta span {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #738096;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #queryView .points-chip {
    min-width: 62px;
    border: 1px solid #e4eaf0;
    background: #ffffff;
    padding: 7px 8px;
    color: #263247;
    font-size: 12px;
  }

  #queryView .employee-card.active .points-chip {
    border-color: transparent;
    background: #0f766e;
    color: #ffffff;
  }

  #queryView .profile-panel {
    overflow: hidden;
    background: #ffffff;
    padding: 0 15px 16px;
  }

  #queryView .profile-header {
    position: relative;
    margin: 0 -15px 15px;
    background:
      radial-gradient(circle at 90% 10%, rgba(111, 234, 219, 0.26), transparent 110px),
      linear-gradient(135deg, #0d6862, #15978c);
    color: #ffffff;
    padding: 18px 16px;
  }

  #queryView .profile-header .avatar {
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(4, 75, 69, 0.2);
  }

  #queryView .profile-name h3 {
    color: #ffffff;
    font-size: 20px;
  }

  #queryView .profile-name p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
    line-height: 1.45;
  }

  #queryView .metric-grid {
    gap: 8px;
  }

  #queryView .metric {
    border: 0;
    border-radius: 14px;
    background: #f4f7f9;
    padding: 12px 7px;
  }

  #queryView .metric:first-child {
    background: #eaf8f5;
  }

  #queryView .metric:nth-child(2) {
    background: #fff7e8;
  }

  #queryView .metric:nth-child(3) {
    background: #edf3ff;
  }

  #queryView .metric strong {
    font-size: 21px;
  }

  #queryView .profile-rank-item {
    border: 0;
    border-radius: 14px;
    background: #f7f9fb;
    padding: 11px;
  }

  #queryView .profile-rank-item strong {
    color: #172238;
  }

  #queryView .progress-block {
    border-radius: 14px;
    background: #f7f9fb;
    padding: 12px;
  }

  #queryView .history-list {
    gap: 8px;
  }

  #queryView .history-item {
    align-items: center;
    border: 0;
    border-radius: 13px;
    background: #f7f9fb;
    padding: 11px;
  }

  /* Points grant: clear steps and a confirmation card */
  #grantView .grant-workbench {
    overflow: visible;
    border-radius: 22px;
    background: transparent;
    box-shadow: none;
  }

  #grantView .grant-panel,
  #grantView .grant-preview-panel {
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(27, 45, 65, 0.075);
  }

  #grantView .grant-heading {
    min-height: 82px;
    border: 0;
    background:
      radial-gradient(circle at 98% 0, rgba(38, 174, 161, 0.16), transparent 125px),
      linear-gradient(145deg, #ffffff, #f0faf8);
    padding: 16px;
  }

  #grantView .grant-heading h3 {
    font-size: 20px;
  }

  #grantView .grant-form {
    gap: 12px;
    background: #f6f8f9;
    padding: 12px;
  }

  #grantView .grant-form-section {
    border: 0;
    border-radius: 17px;
    background: #ffffff;
    padding: 14px;
    box-shadow: 0 5px 16px rgba(27, 45, 65, 0.045);
  }

  #grantView .grant-section-heading {
    margin-bottom: 13px;
  }

  #grantView .grant-section-heading > span {
    width: 35px;
    height: 35px;
    border-radius: 11px;
    background: linear-gradient(135deg, #0f766e, #27a99c);
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(15, 118, 110, 0.15);
  }

  #grantView .grant-section-heading strong {
    font-size: 15px;
  }

  #grantView .segmented span {
    min-height: 46px;
    border-color: transparent;
    border-radius: 13px;
    background: #f3f6f8;
  }

  #grantView .segmented input:checked + span {
    border-color: #58aca4;
    background: #e9f8f5;
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08);
  }

  #grantView .grant-form-footer {
    border: 0;
    border-radius: 17px;
    background: #ffffff;
    padding: 13px 14px;
  }

  #grantView .grant-operator {
    max-width: none;
  }

  #grantView .grant-preview-panel {
    margin-top: 14px;
  }

  #grantView .grant-preview-heading {
    background:
      radial-gradient(circle at 92% 0, rgba(116, 245, 229, 0.24), transparent 100px),
      linear-gradient(135deg, #0d6862, #15978c);
  }

  #grantView .grant-balance-flow,
  #grantView .grant-preview-tip {
    border: 0;
    background: #f4f7f9;
  }

  #grantView .grant-preview-details {
    border-color: #e8edf1;
  }

  #grantView .grant-preview-actions {
    border: 0;
  }

  #grantView .grant-preview-actions button {
    border-radius: 13px;
  }

  /* Rules catalogue */
  #rulesView .rules-toolbar {
    overflow: hidden;
    background:
      radial-gradient(circle at 94% 0, rgba(48, 178, 166, 0.18), transparent 145px),
      linear-gradient(145deg, #ffffff, #f2faf9);
    padding: 17px;
  }

  #rulesView .rules-toolbar .section-heading h3 {
    font-size: 20px;
  }

  #rulesView .rule-summary {
    gap: 8px;
  }

  #rulesView .rule-summary-item {
    border: 0;
    border-radius: 14px;
    background: #ffffff;
    padding: 12px 8px;
    box-shadow: 0 5px 15px rgba(27, 45, 65, 0.055);
  }

  #rulesView .rule-summary-item:nth-child(2) {
    background: #fff8e9;
  }

  #rulesView .rule-summary-item:nth-child(3) {
    background: #edf4ff;
  }

  #rulesView .rule-summary-item span {
    font-size: 10px;
  }

  #rulesView .rules-filters {
    border-radius: 18px;
    background: #ffffff;
    padding: 14px;
  }

  #rulesView .rule-card {
    position: relative;
    gap: 11px;
    overflow: hidden;
    border: 0;
    border-radius: 19px;
    padding: 16px;
    box-shadow: 0 10px 28px rgba(27, 45, 65, 0.075);
  }

  #rulesView .rule-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #0f766e, #56beb3);
    content: "";
  }

  #rulesView .rule-category {
    background: #e9f8f5;
    padding: 6px 10px;
  }

  #rulesView .rule-card-topline strong {
    color: #0f766e;
    font-size: 25px;
  }

  #rulesView .rule-card h3 {
    font-size: 18px;
  }

  #rulesView .rule-card p {
    color: #657185;
    font-size: 13px;
  }

  #rulesView .rule-detail-list {
    gap: 8px;
    border-radius: 14px;
    background: #f6f8fa;
    padding: 4px 12px 11px;
  }

  #rulesView .rule-card > .secondary-button {
    width: 100%;
    border-color: transparent;
    border-radius: 13px;
    background: #e9f8f5;
    color: #0f766e;
  }

  /* Ranking: reflow the score below the person so all rows remain tappable. */
  #rankingsView .rankings-toolbar {
    overflow: hidden;
    background:
      radial-gradient(circle at 100% 0, rgba(245, 183, 76, 0.18), transparent 150px),
      #ffffff;
    padding: 17px;
  }

  #rankingsView .rankings-toolbar .section-heading h3 {
    font-size: 22px;
  }

  #rankingsView .rank-tab {
    border: 0;
    border-radius: 12px;
    background: #f2f5f7;
  }

  #rankingsView .rank-tab.active {
    background: #0f766e;
    color: #ffffff;
    box-shadow: 0 7px 17px rgba(15, 118, 110, 0.18);
  }

  #rankingsView .rankings-workbench {
    overflow: visible;
    border-radius: 20px;
    background: transparent;
    box-shadow: none;
  }

  #rankingsView .ranking-list-column,
  #rankingsView .ranking-summary-panel {
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(27, 45, 65, 0.075);
  }

  #rankingsView .ranking-item {
    grid-template-columns: 40px 42px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 3px 9px;
    min-height: 80px;
    overflow: hidden;
    border: 1px solid #e6edf1;
    border-radius: 16px;
    background: #fbfcfd;
    padding: 10px;
  }

  #rankingsView .ranking-item.current {
    border-color: #5eb0a8;
    background: linear-gradient(135deg, #e9f8f5, #f8fcfb);
    box-shadow: inset 4px 0 0 #0f766e;
  }

  #rankingsView .ranking-item .rank-number {
    width: 40px;
    height: 40px;
    grid-row: 1 / 3;
    border-radius: 13px;
  }

  #rankingsView .ranking-item > .avatar {
    width: 42px;
    height: 42px;
    grid-row: 1 / 3;
    border-radius: 13px;
    font-size: 15px;
    line-height: 1;
  }

  #rankingsView .ranking-person {
    min-height: 38px;
    grid-column: 3;
    grid-row: 1;
  }

  #rankingsView .ranking-person strong {
    font-size: 15px;
  }

  #rankingsView .ranking-person span {
    margin-top: 3px;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #rankingsView .ranking-score {
    display: flex;
    width: auto;
    min-width: 0;
    align-items: baseline;
    gap: 6px;
    grid-column: 3;
    grid-row: 2;
    text-align: left;
  }

  #rankingsView .ranking-score strong {
    flex: 0 0 auto;
    font-size: 19px;
  }

  #rankingsView .ranking-score span {
    min-width: 0;
    overflow: hidden;
    color: #788499;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #rankingsView .ranking-summary-panel {
    margin-top: 14px;
  }

  #rankingsView .ranking-summary-header {
    background:
      radial-gradient(circle at 88% 0, rgba(115, 238, 222, 0.25), transparent 105px),
      linear-gradient(135deg, #0c6862, #15978c);
  }

  #rankingsView .ranking-period-banner,
  #rankingsView .ranking-feature-card,
  #rankingsView .ranking-mini-stats > div,
  #rankingsView .department-ranking-item {
    border: 0;
    box-shadow: 0 4px 14px rgba(27, 45, 65, 0.055);
  }

  #rankingsView .ranking-period-banner {
    background: #f4f7f9;
  }

  #rankingsView .ranking-mini-stats > div {
    background: #f7f9fb;
  }

  #rankingsView .department-ranking-block {
    border-color: #e8edf1;
  }

  #rankingsView .department-ranking-item {
    border-radius: 14px;
    background: #f9fafb;
    padding: 11px 9px;
  }

  #rankingsView .department-ranking-item.current {
    background: #e9f8f5;
    box-shadow: inset 3px 0 0 #0f766e;
  }

  /* Records and accounts become purpose-built information cards. */
  #recordsView > .panel:first-child,
  #accountsView > .panel:first-child {
    overflow: hidden;
    padding: 15px;
  }

  #recordsView .records-toolbar {
    position: relative;
    margin: -15px -15px 15px;
    background:
      radial-gradient(circle at 98% 0, rgba(42, 172, 159, 0.16), transparent 130px),
      linear-gradient(145deg, #ffffff, #f1faf8);
    padding: 16px;
  }

  #recordsView .record-actions button {
    border-radius: 13px;
  }

  #recordsView .record-actions .secondary-button {
    border-color: transparent;
    background: #e9f8f5;
    color: #0f766e;
  }

  #recordsTable,
  #accountsTable {
    gap: 12px;
  }

  #recordsTable tr,
  #accountsTable tr {
    position: relative;
    gap: 0 8px;
    overflow: hidden;
    border: 0;
    border-radius: 17px;
    background: #ffffff;
    padding: 11px 9px 8px;
    box-shadow: 0 7px 22px rgba(27, 45, 65, 0.08);
  }

  #recordsTable tr::before,
  #accountsTable tr::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #0f766e, #52b9af);
    content: "";
  }

  #recordsTable td,
  #accountsTable td {
    border-radius: 10px;
    padding: 8px 9px;
  }

  #recordsTable td::before,
  #accountsTable td::before {
    margin-bottom: 5px;
    color: #8490a2;
    font-size: 10px;
    letter-spacing: 0.02em;
  }

  #recordsTable td:first-child,
  #recordsTable td:nth-child(5),
  #accountsTable td:nth-child(2),
  #accountsTable td:last-child {
    background: #f6f8fa;
  }

  #recordsTable td:first-child,
  #accountsTable td:first-child {
    color: #172238;
    font-weight: 800;
  }

  #recordsTable td:nth-child(4),
  #recordsTable td:nth-child(7) {
    font-size: 16px;
    font-weight: 900;
  }

  #accountsView > .panel:first-child .section-heading {
    margin: -15px -15px 15px;
    background:
      radial-gradient(circle at 98% 0, rgba(80, 124, 225, 0.14), transparent 130px),
      linear-gradient(145deg, #ffffff, #f2f6ff);
    padding: 17px;
  }

  #accountsView .section-heading h3 {
    font-size: 20px;
  }

  #accountsTable td:last-child {
    margin-top: 3px;
    padding: 10px;
  }

  #accountsTable .account-actions {
    grid-template-columns: 1fr 0.72fr 1fr;
    gap: 7px;
  }

  #accountsTable .account-actions button {
    min-height: 40px;
    border-radius: 11px;
    font-size: 11px;
  }

  #recordsView > .pagination-panel,
  #accountsView > .pagination-panel,
  #rankingsView .ranking-pagination {
    border: 0;
    border-radius: 17px;
    background: #ffffff;
    box-shadow: 0 7px 22px rgba(27, 45, 65, 0.065);
  }

  body:not(.is-logged-out) .pagination-button,
  body:not(.is-logged-out) .pagination-page {
    border-radius: 10px;
  }

  body:not(.is-logged-out) .pagination-page {
    background: #0f766e;
  }

  body:not(.is-logged-out) .pagination-size select {
    border-color: transparent;
    border-radius: 10px;
    background-color: #f3f6f8;
  }
}

@media (max-width: 380px) {
  #queryView .employee-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  #queryView .points-chip {
    grid-column: 2;
    justify-self: start;
    min-width: 0;
    margin-top: -2px;
    padding: 4px 8px;
  }

  #rankingsView .ranking-item {
    grid-template-columns: 38px 38px minmax(0, 1fr);
    gap: 3px 7px;
    padding: 9px 8px;
  }

  #rankingsView .ranking-item .rank-number,
  #rankingsView .ranking-item > .avatar {
    width: 38px;
    height: 38px;
  }

  #accountsTable .account-actions {
    grid-template-columns: 1fr;
  }
}

/* Mobile welcome visual system v6: cleaner, brighter and more app-like. */
@media (max-width: 720px) {
  html,
  body {
    scrollbar-width: none;
  }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  body.is-logged-out {
    background:
      radial-gradient(circle at 88% 6%, rgba(54, 190, 174, 0.17), transparent 24%),
      radial-gradient(circle at 3% 60%, rgba(222, 178, 95, 0.09), transparent 28%),
      linear-gradient(180deg, #eaf4f1 0%, #f5f8f7 52%, #edf4f2 100%);
  }

  body.is-logged-out .mobile-login-welcome {
    padding: 9px 0 30px;
  }

  body.is-logged-out .mobile-login-hero {
    width: calc(100% - 18px);
    min-height: 508px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 33px;
    background:
      radial-gradient(circle at 91% 5%, rgba(175, 246, 234, 0.3), transparent 25%),
      radial-gradient(circle at 1% 104%, rgba(2, 49, 47, 0.7), transparent 42%),
      linear-gradient(148deg, #064b48 0%, #087068 47%, #20a496 100%);
    padding: 21px 20px 22px;
    box-shadow:
      0 27px 60px rgba(5, 72, 68, 0.27),
      0 8px 22px rgba(5, 72, 68, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }

  body.is-logged-out .mobile-login-hero::before {
    top: -145px;
    right: -95px;
    width: 320px;
    height: 320px;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
      0 0 0 38px rgba(255, 255, 255, 0.025),
      0 0 0 76px rgba(255, 255, 255, 0.014);
  }

  body.is-logged-out .mobile-login-hero::after {
    right: -84px;
    bottom: -128px;
    width: 280px;
    height: 280px;
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.018);
  }

  body.is-logged-out .welcome-mobile-brand {
    gap: 11px;
  }

  body.is-logged-out .welcome-mobile-brand > span {
    width: 44px;
    height: 44px;
    border-color: rgba(255, 255, 255, 0.22);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.09));
    font-size: 21px;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.19),
      0 8px 20px rgba(3, 53, 50, 0.13);
  }

  body.is-logged-out .welcome-mobile-brand strong {
    font-size: 14px;
    letter-spacing: 0.04em;
  }

  body.is-logged-out .welcome-mobile-brand small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 9px;
  }

  body.is-logged-out .welcome-mobile-medal {
    top: 24px;
    right: 19px;
    width: 76px;
    height: 88px;
    border-color: rgba(255, 255, 255, 0.25);
    border-radius: 25px;
    background:
      radial-gradient(circle at 82% 9%, rgba(255, 255, 255, 0.2), transparent 30%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.06));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      0 13px 30px rgba(2, 52, 49, 0.17);
  }

  body.is-logged-out .welcome-mobile-medal > span {
    font-size: 28px;
    text-shadow: 0 5px 15px rgba(1, 46, 43, 0.2);
  }

  body.is-logged-out .welcome-mobile-medal > small {
    right: -7px;
    bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    background: linear-gradient(145deg, #ffe29b, #f2bd56);
    color: #64440f;
    padding: 5px 8px;
    box-shadow: 0 8px 17px rgba(41, 68, 50, 0.2);
  }

  body.is-logged-out .mobile-login-kicker {
    margin-top: 57px;
    border-color: rgba(246, 209, 129, 0.25);
    background: rgba(246, 209, 129, 0.1);
    color: rgba(255, 229, 173, 0.84);
    padding: 7px 11px;
    font-size: 7px;
    letter-spacing: 0.15em;
  }

  body.is-logged-out .mobile-login-hero h2 {
    margin-top: 17px;
    color: #ffffff;
    font-size: clamp(32px, 9.4vw, 40px);
    line-height: 1.17;
    letter-spacing: -0.045em;
    text-shadow: 0 7px 25px rgba(2, 50, 47, 0.17);
  }

  body.is-logged-out .mobile-login-hero h2 strong {
    position: relative;
    display: inline-block;
    color: #ccfff7;
  }

  body.is-logged-out .mobile-login-hero h2 strong::after {
    position: absolute;
    right: 3px;
    bottom: -4px;
    left: 3px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(204, 255, 247, 0), rgba(204, 255, 247, 0.75), rgba(244, 200, 111, 0.45));
    content: "";
  }

  body.is-logged-out .mobile-login-hero > p {
    width: 86%;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    line-height: 1.72;
  }

  body.is-logged-out .welcome-actions {
    gap: 9px;
    margin-top: 22px;
  }

  body.is-logged-out .mobile-login-primary {
    min-height: 58px;
    border: 1px solid rgba(255, 255, 255, 0.64);
    border-radius: 19px;
    background: linear-gradient(145deg, #ffffff, #f2fbf9);
    color: #086c65;
    padding-left: 20px;
    font-size: 14px;
    box-shadow:
      0 17px 34px rgba(2, 47, 44, 0.25),
      inset 0 1px 0 #ffffff;
  }

  body.is-logged-out .mobile-login-primary em {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(145deg, #d8f1ed, #edf8f6);
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.05);
  }

  body.is-logged-out .mobile-register-entry {
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.065);
    color: rgba(255, 255, 255, 0.82);
    font-size: 11px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  }

  body.is-logged-out .mobile-login-security {
    width: max-content;
    max-width: 100%;
    min-height: 26px;
    margin: 10px auto 0;
    border-radius: 999px;
    background: rgba(1, 57, 53, 0.16);
    color: rgba(255, 255, 255, 0.58);
    padding: 0 10px 0 5px;
    font-size: 9px;
  }

  body.is-logged-out .mobile-login-security span {
    width: 18px;
    height: 18px;
    background: rgba(204, 255, 247, 0.12);
    color: #ccfff7;
  }

  body.is-logged-out .mobile-login-benefits {
    width: calc(100% - 24px);
    margin-top: 15px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 29px;
    background:
      radial-gradient(circle at 100% 0, rgba(35, 170, 155, 0.08), transparent 155px),
      rgba(255, 255, 255, 0.95);
    padding: 22px 17px 14px;
    box-shadow:
      0 21px 48px rgba(25, 66, 63, 0.11),
      inset 0 1px 0 #ffffff;
  }

  body.is-logged-out .mobile-login-benefits > .welcome-mobile-benefits-title {
    padding: 0 3px 18px;
  }

  body.is-logged-out .welcome-mobile-benefits-title small {
    color: #b47c20;
    font-size: 8px;
    letter-spacing: 0.18em;
  }

  body.is-logged-out .welcome-mobile-benefits-title strong {
    color: #173638;
    font-size: 18px;
    letter-spacing: -0.02em;
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) {
    min-height: 76px;
    grid-template-columns: 48px minmax(0, 1fr) 26px;
    gap: 0 12px;
    border-top-color: #e9f0ee;
    padding: 9px 3px;
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title)::after {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: #f0f6f4;
    color: #76938e;
    font-size: 17px;
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) > span {
    width: 43px;
    height: 43px;
    border-radius: 14px;
    font-size: 11px;
    box-shadow: 0 8px 18px rgba(22, 83, 78, 0.08);
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) > strong {
    color: #254143;
    font-size: 12px;
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) > small {
    color: #849391;
    font-size: 9px;
  }

  body.is-logged-out .welcome-mobile-footer {
    margin-top: 18px;
    color: #748884;
  }
}

@media (max-width: 380px) {
  body.is-logged-out .mobile-login-hero {
    min-height: 500px;
    padding-right: 18px;
    padding-left: 18px;
  }

  body.is-logged-out .mobile-login-hero h2 {
    font-size: 31px;
  }

  body.is-logged-out .mobile-login-benefits {
    width: calc(100% - 20px);
  }
}

/* Desktop welcome v8 final cascade. */
@media (min-width: 861px) {
  body.is-logged-out {
    background:
      radial-gradient(circle at 9% 14%, rgba(30, 169, 156, 0.13), transparent 26%),
      radial-gradient(circle at 91% 67%, rgba(229, 176, 79, 0.12), transparent 25%),
      linear-gradient(145deg, #f1f8f6 0%, #f8faf9 46%, #f2f7f5 100%);
  }

  body.is-logged-out .mobile-login-welcome {
    min-height: 100vh;
    padding-bottom: 24px;
  }

  .welcome-site-header {
    width: min(calc(100% - 56px), 1320px);
    min-height: 72px;
    margin-top: 16px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 21px;
    background: rgba(255, 255, 255, 0.68);
    padding: 0 18px;
    box-shadow: 0 16px 40px rgba(27, 70, 69, 0.065), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
  }

  .welcome-brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(145deg, #075f59, #18a195);
    box-shadow: 0 12px 26px rgba(9, 107, 99, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

  .welcome-header-meta > span {
    border-radius: 999px;
    background: rgba(237, 247, 245, 0.78);
    padding: 8px 12px;
  }

  .welcome-header-meta button {
    min-height: 42px;
    border-radius: 13px;
    background: #ffffff;
    box-shadow: 0 9px 22px rgba(32, 70, 71, 0.08);
  }

  .welcome-content {
    width: min(calc(100% - 76px), 1280px);
    min-height: 555px;
    grid-template-columns: minmax(440px, 0.88fr) minmax(520px, 1.12fr);
    gap: clamp(48px, 6vw, 92px);
    padding: 40px 0 34px;
  }

  body.is-logged-out .mobile-login-hero {
    padding-left: 8px;
  }

  body.is-logged-out .mobile-login-kicker {
    border-color: rgba(15, 118, 110, 0.15);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 24px rgba(31, 71, 73, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
  }

  body.is-logged-out .mobile-login-hero h2 {
    max-width: 610px;
    margin-top: 24px;
    font-size: clamp(48px, 4.15vw, 64px);
    line-height: 1.12;
    text-wrap: balance;
  }

  body.is-logged-out .mobile-login-hero > p {
    max-width: 500px;
    margin-top: 24px;
    color: #64787a;
    font-size: 15px;
  }

  .welcome-actions {
    margin-top: 29px;
  }

  body.is-logged-out .mobile-login-primary {
    min-width: 225px;
    min-height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, #06675f, #159a8e);
    box-shadow: 0 17px 34px rgba(9, 111, 103, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }

  body.is-logged-out .mobile-register-entry {
    min-height: 58px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 27px rgba(32, 70, 71, 0.075), inset 0 1px 0 #ffffff;
    backdrop-filter: blur(10px);
  }

  body.is-logged-out .mobile-login-security {
    width: max-content;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    padding: 6px 12px 6px 6px;
    backdrop-filter: blur(8px);
  }

  .welcome-preview {
    min-height: 500px;
  }

  .welcome-preview::before {
    width: 500px;
    height: 500px;
    border-color: rgba(15, 118, 110, 0.1);
    box-shadow: 0 0 0 34px rgba(15, 118, 110, 0.018);
  }

  .welcome-preview-glow {
    top: 34px;
    right: 2%;
    bottom: 15px;
    left: 3%;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background:
      radial-gradient(circle at 79% 18%, rgba(245, 204, 123, 0.63), transparent 28%),
      radial-gradient(circle at 12% 88%, rgba(58, 184, 170, 0.28), transparent 30%),
      linear-gradient(145deg, #d8eeea 0%, #edf6f3 57%, #f5ecda 100%);
    box-shadow: 0 28px 65px rgba(29, 83, 79, 0.12);
  }

  .welcome-score-card,
  .welcome-activity-card {
    border-color: rgba(255, 255, 255, 0.96);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 30px 75px rgba(26, 67, 67, 0.17), inset 0 1px 0 #ffffff;
  }

  .welcome-score-card {
    top: 63px;
    right: 22px;
    left: 38px;
    min-height: 260px;
    border-radius: 30px;
    padding: 27px 29px;
  }

  .welcome-activity-card {
    right: 61px;
    bottom: 34px;
    left: 0;
    border-radius: 26px;
    padding: 20px 24px;
  }

  .badge-rank {
    top: 28px;
    left: -9px;
  }

  .badge-gift {
    right: -8px;
    bottom: 96px;
  }

  body.is-logged-out .mobile-login-benefits {
    width: min(calc(100% - 56px), 1320px);
    grid-template-columns: minmax(238px, 0.92fr) repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.65);
    padding: 8px;
    box-shadow: 0 18px 45px rgba(27, 70, 69, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(15px);
  }

  body.is-logged-out .mobile-login-benefits > div {
    min-height: 92px;
    border: 1px solid transparent;
    border-radius: 18px;
    padding: 15px 20px;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
  }

  body.is-logged-out .mobile-login-benefits > div + div {
    border-left-color: transparent;
  }

  body.is-logged-out .mobile-login-benefits > .welcome-mobile-benefits-title {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    background: linear-gradient(135deg, #0a665f, #138c83);
    padding-left: 24px;
  }

  body.is-logged-out .welcome-mobile-benefits-title small {
    color: rgba(255, 228, 171, 0.82);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.18em;
  }

  body.is-logged-out .welcome-mobile-benefits-title strong {
    color: #ffffff;
    font-size: 15px;
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) {
    background: rgba(255, 255, 255, 0.64);
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title):hover {
    border-color: rgba(15, 118, 110, 0.11);
    background: rgba(255, 255, 255, 0.94);
    transform: translateY(-2px);
  }

  body.is-logged-out .mobile-login-benefits > div:nth-of-type(2) > span {
    background: #e7f6f3;
    color: #0b776e;
  }

  body.is-logged-out .mobile-login-benefits > div:nth-of-type(3) > span {
    background: #fff4df;
    color: #a56a16;
  }

  body.is-logged-out .mobile-login-benefits > div:nth-of-type(4) > span {
    background: #f1edfb;
    color: #7256ae;
  }

  body.is-logged-out .welcome-mobile-footer {
    width: max-content;
    max-width: calc(100% - 40px);
    margin: 14px auto 0;
    color: #82928f;
    font-size: 10px;
  }
}

@media (min-width: 861px) and (max-width: 1100px) {
  .welcome-content {
    width: calc(100% - 48px);
    grid-template-columns: minmax(340px, 0.82fr) minmax(430px, 1.18fr);
    gap: 28px;
  }

  body.is-logged-out .mobile-login-hero h2 {
    font-size: 46px;
  }

  body.is-logged-out .mobile-login-benefits {
    width: calc(100% - 48px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.is-logged-out .mobile-login-benefits > .welcome-mobile-benefits-title {
    grid-column: 1 / -1;
    min-height: 72px;
  }
}

/* Desktop welcome v8: balanced widescreen composition and premium feature rail. */
@media (min-width: 861px) {
  body.is-logged-out {
    background:
      radial-gradient(circle at 9% 14%, rgba(30, 169, 156, 0.13), transparent 26%),
      radial-gradient(circle at 91% 67%, rgba(229, 176, 79, 0.12), transparent 25%),
      linear-gradient(145deg, #f1f8f6 0%, #f8faf9 46%, #f2f7f5 100%);
  }

  body.is-logged-out .mobile-login-welcome {
    min-height: 100vh;
    padding-bottom: 24px;
  }

  body.is-logged-out .mobile-login-welcome::before {
    top: -420px;
    left: -350px;
    width: 860px;
    height: 860px;
    border-color: rgba(15, 118, 110, 0.075);
    box-shadow:
      0 0 0 96px rgba(15, 118, 110, 0.021),
      0 0 0 192px rgba(15, 118, 110, 0.012);
  }

  body.is-logged-out .mobile-login-welcome::after {
    right: -260px;
    bottom: -400px;
    width: 760px;
    height: 760px;
    background: linear-gradient(145deg, rgba(29, 162, 149, 0.045), rgba(231, 181, 88, 0.045));
  }

  .welcome-site-header {
    width: min(calc(100% - 56px), 1320px);
    min-height: 72px;
    margin-top: 16px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 21px;
    background: rgba(255, 255, 255, 0.68);
    padding: 0 18px;
    box-shadow:
      0 16px 40px rgba(27, 70, 69, 0.065),
      inset 0 1px 0 rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
  }

  .welcome-brand-mark {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(145deg, #075f59, #18a195);
    box-shadow:
      0 12px 26px rgba(9, 107, 99, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

  .welcome-brand-mark::after {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 9px;
    height: 9px;
    border: 2px solid #f7fbfa;
    border-radius: 50%;
    background: #f0c468;
    content: "";
  }

  .welcome-header-meta > span {
    border-radius: 999px;
    background: rgba(237, 247, 245, 0.78);
    padding: 8px 12px;
  }

  .welcome-header-meta button {
    min-height: 42px;
    border-radius: 13px;
    background: #ffffff;
    box-shadow: 0 9px 22px rgba(32, 70, 71, 0.08);
  }

  .welcome-content {
    width: min(calc(100% - 76px), 1280px);
    min-height: 555px;
    grid-template-columns: minmax(440px, 0.88fr) minmax(520px, 1.12fr);
    gap: clamp(48px, 6vw, 92px);
    padding: 40px 0 34px;
  }

  body.is-logged-out .mobile-login-hero {
    padding-left: 8px;
  }

  body.is-logged-out .mobile-login-kicker {
    border-color: rgba(15, 118, 110, 0.15);
    background: rgba(255, 255, 255, 0.78);
    box-shadow:
      0 10px 24px rgba(31, 71, 73, 0.055),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
  }

  body.is-logged-out .mobile-login-hero h2 {
    max-width: 610px;
    margin-top: 24px;
    font-size: clamp(48px, 4.15vw, 64px);
    line-height: 1.12;
    text-wrap: balance;
  }

  body.is-logged-out .mobile-login-hero > p {
    max-width: 500px;
    margin-top: 24px;
    color: #64787a;
    font-size: 15px;
  }

  .welcome-actions {
    margin-top: 29px;
  }

  body.is-logged-out .mobile-login-primary {
    min-width: 225px;
    min-height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, #06675f, #159a8e);
    box-shadow:
      0 17px 34px rgba(9, 111, 103, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }

  body.is-logged-out .mobile-login-primary em {
    background: rgba(255, 255, 255, 0.17);
    transition: transform 180ms ease, background 180ms ease;
  }

  body.is-logged-out .mobile-login-primary:hover em {
    background: rgba(255, 255, 255, 0.24);
    transform: translateX(2px);
  }

  body.is-logged-out .mobile-register-entry {
    min-height: 58px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow:
      0 12px 27px rgba(32, 70, 71, 0.075),
      inset 0 1px 0 #ffffff;
    backdrop-filter: blur(10px);
  }

  body.is-logged-out .mobile-login-security {
    width: max-content;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    padding: 6px 12px 6px 6px;
    backdrop-filter: blur(8px);
  }

  .welcome-preview {
    min-height: 500px;
  }

  .welcome-preview::before {
    width: 500px;
    height: 500px;
    border-color: rgba(15, 118, 110, 0.1);
    box-shadow: 0 0 0 34px rgba(15, 118, 110, 0.018);
  }

  .welcome-preview::after {
    position: absolute;
    top: 23px;
    right: 24px;
    z-index: 4;
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: #557173;
    padding: 7px 11px;
    content: "实时积分看板";
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
    box-shadow: 0 9px 22px rgba(28, 70, 69, 0.08);
    backdrop-filter: blur(10px);
  }

  .welcome-preview-glow {
    top: 34px;
    right: 2%;
    bottom: 15px;
    left: 3%;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background:
      radial-gradient(circle at 79% 18%, rgba(245, 204, 123, 0.63), transparent 28%),
      radial-gradient(circle at 12% 88%, rgba(58, 184, 170, 0.28), transparent 30%),
      linear-gradient(145deg, #d8eeea 0%, #edf6f3 57%, #f5ecda 100%);
    box-shadow: 0 28px 65px rgba(29, 83, 79, 0.12);
  }

  .welcome-score-card,
  .welcome-activity-card {
    border-color: rgba(255, 255, 255, 0.96);
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
      0 30px 75px rgba(26, 67, 67, 0.17),
      inset 0 1px 0 #ffffff;
  }

  .welcome-score-card {
    top: 63px;
    right: 22px;
    left: 38px;
    min-height: 260px;
    border-radius: 30px;
    padding: 27px 29px;
  }

  .welcome-activity-card {
    right: 61px;
    bottom: 34px;
    left: 0;
    border-radius: 26px;
    padding: 20px 24px;
  }

  .welcome-floating-badge {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 42px rgba(26, 67, 67, 0.16);
  }

  .badge-rank {
    top: 28px;
    left: -9px;
  }

  .badge-gift {
    right: -8px;
    bottom: 96px;
  }

  body.is-logged-out .mobile-login-benefits {
    width: min(calc(100% - 56px), 1320px);
    grid-template-columns: minmax(238px, 0.92fr) repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.65);
    padding: 8px;
    box-shadow:
      0 18px 45px rgba(27, 70, 69, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(15px);
  }

  body.is-logged-out .mobile-login-benefits > div {
    min-height: 92px;
    border: 1px solid transparent;
    border-radius: 18px;
    padding: 15px 20px;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
  }

  body.is-logged-out .mobile-login-benefits > div + div {
    border-left: 1px solid transparent;
  }

  body.is-logged-out .mobile-login-benefits > .welcome-mobile-benefits-title {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    background: linear-gradient(135deg, #0a665f, #138c83);
    padding-left: 24px;
  }

  body.is-logged-out .welcome-mobile-benefits-title small {
    color: rgba(255, 228, 171, 0.82);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.18em;
  }

  body.is-logged-out .welcome-mobile-benefits-title strong {
    color: #ffffff;
    font-size: 15px;
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) {
    background: rgba(255, 255, 255, 0.64);
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title):hover {
    border-color: rgba(15, 118, 110, 0.11);
    background: rgba(255, 255, 255, 0.94);
    transform: translateY(-2px);
  }

  body.is-logged-out .mobile-login-benefits > div:nth-of-type(2) > span {
    background: #e7f6f3;
    color: #0b776e;
  }

  body.is-logged-out .mobile-login-benefits > div:nth-of-type(3) > span {
    background: #fff4df;
    color: #a56a16;
  }

  body.is-logged-out .mobile-login-benefits > div:nth-of-type(4) > span {
    background: #f1edfb;
    color: #7256ae;
  }

  body.is-logged-out .welcome-mobile-footer {
    width: max-content;
    max-width: calc(100% - 40px);
    margin: 14px auto 0;
    color: #82928f;
    font-size: 10px;
  }
}

@media (min-width: 861px) and (max-width: 1100px) {
  .welcome-content {
    width: calc(100% - 48px);
    grid-template-columns: minmax(340px, 0.82fr) minmax(430px, 1.18fr);
    gap: 28px;
  }

  body.is-logged-out .mobile-login-hero h2 {
    font-size: 46px;
  }

  body.is-logged-out .mobile-login-benefits {
    width: calc(100% - 48px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.is-logged-out .mobile-login-benefits > .welcome-mobile-benefits-title {
    grid-column: 1 / -1;
    min-height: 72px;
  }
}

/* Mobile welcome v7: richer depth, cleaner modules and more tactile actions. */
@media (max-width: 720px) {
  body.is-logged-out .mobile-login-welcome {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-bottom: 34px;
  }

  body.is-logged-out .mobile-login-welcome::before,
  body.is-logged-out .mobile-login-welcome::after {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    content: "";
    pointer-events: none;
    filter: blur(2px);
  }

  body.is-logged-out .mobile-login-welcome::before {
    top: 450px;
    left: -105px;
    width: 230px;
    height: 230px;
    background: rgba(255, 223, 158, 0.13);
  }

  body.is-logged-out .mobile-login-welcome::after {
    top: 590px;
    right: -115px;
    width: 260px;
    height: 260px;
    background: rgba(59, 181, 165, 0.1);
  }

  body.is-logged-out .mobile-login-hero {
    background:
      radial-gradient(circle at 92% 6%, rgba(190, 255, 244, 0.32), transparent 24%),
      radial-gradient(circle at 8% 84%, rgba(255, 220, 145, 0.1), transparent 29%),
      linear-gradient(146deg, #054744 0%, #08736b 51%, #25aa9b 100%);
    box-shadow:
      0 30px 65px rgba(4, 70, 66, 0.25),
      0 10px 24px rgba(4, 70, 66, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.19);
  }

  body.is-logged-out .welcome-mobile-brand > span {
    position: relative;
  }

  body.is-logged-out .welcome-mobile-brand > span::after {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 9px;
    height: 9px;
    border: 2px solid #157d74;
    border-radius: 50%;
    background: #ffdc8b;
    content: "";
    box-shadow: 0 3px 8px rgba(7, 58, 54, 0.28);
  }

  body.is-logged-out .welcome-mobile-medal {
    animation: mobileWelcomeFloat 5.5s ease-in-out infinite;
  }

  body.is-logged-out .mobile-login-kicker {
    position: relative;
    padding-left: 22px;
    backdrop-filter: blur(9px);
  }

  body.is-logged-out .mobile-login-kicker::before {
    position: absolute;
    top: 50%;
    left: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #f5c86d;
    content: "";
    transform: translateY(-50%);
    box-shadow: 0 0 0 4px rgba(245, 200, 109, 0.1);
  }

  body.is-logged-out .mobile-login-primary {
    position: relative;
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease;
  }

  body.is-logged-out .mobile-login-primary::before {
    position: absolute;
    top: -40%;
    left: -30%;
    width: 32%;
    height: 180%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    content: "";
    opacity: 0.55;
    transform: rotate(18deg);
    animation: mobileWelcomeShine 5s ease-in-out infinite;
    pointer-events: none;
  }

  body.is-logged-out .mobile-login-primary:active {
    transform: translateY(1px) scale(0.992);
    box-shadow: 0 10px 22px rgba(2, 47, 44, 0.22), inset 0 1px 0 #ffffff;
  }

  body.is-logged-out .mobile-register-entry {
    position: relative;
    width: 142px;
    padding-right: 23px;
    backdrop-filter: blur(10px);
    transition: background 180ms ease, transform 180ms ease;
  }

  body.is-logged-out .mobile-register-entry::after {
    position: absolute;
    top: 50%;
    right: 13px;
    color: rgba(255, 255, 255, 0.72);
    content: "›";
    font-size: 16px;
    transform: translateY(-52%);
  }

  body.is-logged-out .mobile-register-entry:active {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(0.985);
  }

  body.is-logged-out .mobile-login-security {
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
  }

  body.is-logged-out .mobile-login-benefits {
    border-color: rgba(255, 255, 255, 0.82);
    background:
      radial-gradient(circle at 96% 3%, rgba(43, 174, 158, 0.09), transparent 150px),
      linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 250, 0.95));
    padding: 23px 14px 12px;
    box-shadow:
      0 24px 55px rgba(25, 66, 63, 0.12),
      0 4px 12px rgba(25, 66, 63, 0.04),
      inset 0 1px 0 #ffffff;
  }

  body.is-logged-out .mobile-login-benefits > .welcome-mobile-benefits-title {
    position: relative;
    padding: 0 6px 17px;
  }

  body.is-logged-out .welcome-mobile-benefits-title::after {
    position: absolute;
    right: 6px;
    bottom: 20px;
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ecd092, #55b9ae);
    content: "";
    opacity: 0.72;
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) {
    min-height: 74px;
    margin-bottom: 9px;
    border: 1px solid #e9f0ee;
    border-radius: 18px;
    background: linear-gradient(105deg, rgba(243, 249, 247, 0.96), rgba(255, 255, 255, 0.92));
    padding: 9px 11px;
    box-shadow: 0 7px 17px rgba(25, 66, 63, 0.035);
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title):nth-of-type(2) {
    background: linear-gradient(105deg, rgba(235, 248, 245, 0.98), rgba(255, 255, 255, 0.94));
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title):nth-of-type(3) {
    background: linear-gradient(105deg, rgba(255, 249, 237, 0.98), rgba(255, 255, 255, 0.94));
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title):nth-of-type(4) {
    background: linear-gradient(105deg, rgba(244, 241, 254, 0.96), rgba(255, 255, 255, 0.94));
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title)::after {
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 5px 12px rgba(28, 73, 69, 0.07);
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) > span {
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow:
      0 9px 20px rgba(22, 83, 78, 0.09),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  body.is-logged-out .welcome-mobile-footer {
    width: max-content;
    max-width: calc(100% - 32px);
    margin: 19px auto 0;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    padding: 7px 12px;
    backdrop-filter: blur(8px);
  }
}

@keyframes mobileWelcomeFloat {
  0%,
  100% {
    transform: translateY(0) rotate(3deg);
  }

  50% {
    transform: translateY(-5px) rotate(1deg);
  }
}

@keyframes mobileWelcomeShine {
  0%,
  72% {
    left: -35%;
  }

  100% {
    left: 120%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.is-logged-out .welcome-mobile-medal,
  body.is-logged-out .mobile-login-primary::before {
    animation: none;
  }
}

@media (max-width: 720px) {
  body.is-logged-out .mobile-login-hero h2 strong::after {
    display: block;
  }

  body.is-logged-out .mobile-register-entry {
    width: 132px;
    margin-right: auto;
    margin-left: auto;
    border-radius: 999px;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: #fbfcfd;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--teal);
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
}

.brand-copy h1 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
}

.brand-copy p,
.section-heading p,
.eyebrow {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.nav-tabs {
  display: grid;
  gap: 8px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #344054;
  padding: 0 12px;
  text-align: left;
}

.nav-tab:hover,
.nav-tab.active {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.nav-tab.active {
  box-shadow: 0 8px 20px rgba(22, 32, 51, 0.06);
}

.nav-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.dot-teal {
  background: var(--teal);
}

.dot-blue {
  background: var(--blue);
}

.dot-green {
  background: var(--green);
}

.dot-amber {
  background: #d97706;
}

.dot-rose {
  background: var(--rose);
}

.dot-violet {
  background: #6d28d9;
}

.dot-slate {
  background: #475467;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #eef2f7;
}

.auth-panel {
  position: relative;
  width: min(100%, 460px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 24px;
  box-shadow: var(--shadow);
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: #344054;
  font-size: 20px;
  line-height: 1;
}

.auth-brand {
  margin-bottom: 22px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.auth-tab {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: #344054;
  font-weight: 800;
}

.auth-tab.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-submit {
  width: 100%;
}

.text-button {
  width: max-content;
  border: 0;
  background: transparent;
  color: var(--teal);
  padding: 0;
  font-weight: 700;
}

.text-button:hover {
  color: #0b5f59;
  text-decoration: underline;
}

.forgot-password-link {
  justify-self: end;
  margin-top: -5px;
}

.auth-form-heading h2 {
  margin: 0;
  font-size: 20px;
}

.auth-form-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.elevated-gate {
  z-index: 24;
  background: rgba(238, 242, 247, 0.92);
}

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

.auth-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.sidebar-summary {
  display: grid;
  gap: 6px;
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 16px;
}

.sidebar-summary span {
  color: var(--muted);
  font-size: 13px;
}

.sidebar-summary strong {
  font-size: 30px;
  line-height: 1;
}

.main-panel {
  min-width: 0;
  padding: 26px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  padding: 16px 12px 4px;
  border-top: 1px solid var(--soft-line);
  color: #71807d;
  font-size: 12px;
}

.site-footer a {
  color: #367d75;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .site-footer {
    flex-direction: column;
    gap: 5px;
    margin-top: 16px;
    padding-bottom: 88px;
    font-size: 11px;
  }
}

.topbar {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  align-items: end;
  gap: 24px;
  margin-bottom: 22px;
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--soft-line);
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 16px rgba(22, 32, 51, 0.05);
}

.topbar-controls .topbar-employee-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 7px;
}

.topbar-controls .topbar-employee-picker > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.topbar-controls .topbar-employee-picker select {
  min-width: 240px;
  min-height: 40px;
  border-color: transparent;
  border-radius: 8px;
  background-color: #f3f6f8;
}

.user-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.current-user {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  background: var(--teal-soft);
  padding: 5px 10px 5px 6px;
  color: var(--ink);
  text-align: left;
}

.current-user.login-entry {
  justify-content: center;
  min-width: 76px;
  padding: 0 12px;
  background: var(--blue-soft);
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}

.current-user.login-entry:hover,
.current-user.login-entry[aria-expanded="true"] {
  border-color: #93b4ff;
  background: #dbe8ff;
}

.user-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.user-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.user-copy small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  font-weight: 600;
}

.user-copy strong {
  max-width: 92px;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-button {
  min-height: 40px;
  border-color: transparent;
  background: #f8fafc;
}

.logout-button:hover {
  border-color: #f1aebc;
  background: var(--rose-soft);
  color: var(--rose);
}

.login-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 8;
  width: min(360px, calc(100vw - 52px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 16px;
  box-shadow: var(--shadow);
}

.topbar-login-form {
  display: grid;
  gap: 12px;
}

.login-popover-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.title-block h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.employee-picker,
.field {
  display: grid;
  gap: 7px;
}

.employee-picker span,
.field span,
.field legend {
  color: #475467;
  font-size: 13px;
  font-weight: 600;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.employee-picker select {
  min-width: 230px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.two-column,
.wide-column {
  display: grid;
  gap: 16px;
}

.two-column {
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
}

.wide-column {
  grid-template-columns: minmax(420px, 1.25fr) minmax(280px, 0.75fr);
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 20px;
  box-shadow: var(--shadow);
}

.compact-panel {
  align-self: start;
}

.section-heading,
.records-toolbar,
.rewards-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h3,
.profile-name h3 {
  margin: 0;
  font-size: 18px;
}

.search-field {
  margin-top: 16px;
}

.employee-list {
  display: grid;
  gap: 10px;
  max-height: 560px;
  margin-top: 14px;
  overflow: auto;
  padding-right: 2px;
}

.employee-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 10px;
  text-align: left;
}

.employee-card:hover,
.employee-card.active {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius);
  background: #eef2f7;
  color: #263247;
  font-weight: 800;
}

.employee-meta {
  min-width: 0;
}

.employee-meta strong,
.reward-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-meta span,
.history-item span,
.reward-card span,
.small-muted {
  color: var(--muted);
  font-size: 13px;
}

.points-chip {
  min-width: 78px;
  border-radius: 999px;
  background: #f2f4f7;
  padding: 7px 10px;
  color: #263247;
  font-weight: 700;
  text-align: center;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.profile-header .avatar {
  width: 58px;
  height: 58px;
  background: var(--blue-soft);
  color: #1d4ed8;
  font-size: 21px;
}

.profile-name p {
  margin: 5px 0 0;
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  padding: 14px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 25px;
  line-height: 1.1;
}

.profile-rank-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.profile-rank-item {
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fbfcfd;
  padding: 12px;
}

.profile-rank-item span,
.profile-rank-item em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.profile-rank-item strong {
  display: block;
  margin: 7px 0 4px;
  font-size: 18px;
  line-height: 1.1;
}

.progress-block {
  margin-top: 18px;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.progress-track {
  height: 10px;
  margin-top: 9px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.history-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border-top: 1px solid var(--soft-line);
  padding-top: 12px;
}

.history-item strong {
  overflow-wrap: anywhere;
}

.amount-positive {
  color: var(--green);
  font-weight: 800;
}

.amount-negative {
  color: var(--rose);
  font-weight: 800;
}

.grant-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border-color: #d4e1df;
  border-radius: 16px;
  background: #ffffff;
  padding: 0;
  box-shadow: 0 18px 44px rgba(22, 32, 51, 0.1);
}

.grant-panel {
  min-width: 0;
  overflow: hidden;
  padding: 0;
}

.grant-heading {
  display: flex;
  height: 86px;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid #dce8e6;
  background: linear-gradient(118deg, #ffffff, #f1faf8);
  padding: 19px 20px;
}

.grant-heading-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #0f766e, #15938a);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.2);
}

.grant-heading-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.grant-heading h3 {
  margin: 0;
  font-size: 19px;
}

.grant-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.grant-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
}

.grant-form-section {
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  background: #fbfcfe;
  padding: 14px;
}

.grant-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.grant-section-heading > span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
}

.grant-section-heading strong,
.grant-section-heading small {
  display: block;
}

.grant-section-heading strong {
  color: #263247;
  font-size: 14px;
}

.grant-section-heading small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.grant-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-top: 13px;
}

.grant-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 13px;
}

.grant-form .field {
  gap: 6px;
}

.grant-form select,
.grant-form input,
.grant-form textarea {
  border-radius: 10px;
  background-color: #ffffff;
}

.grant-form textarea {
  min-height: 82px;
  resize: vertical;
}

.points-input-wrap {
  position: relative;
}

.points-input-wrap input {
  padding-right: 54px;
}

.points-input-wrap small {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transform: translateY(-50%);
  pointer-events: none;
}

.grant-form-footer {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 14px;
  border-top: 1px solid var(--soft-line);
  padding: 3px 2px 0;
}

.grant-operator {
  max-width: 260px;
}

.grant-submit-button {
  min-width: 112px;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

.full-span {
  grid-column: 1 / -1;
}

fieldset.field {
  margin: 0;
  border: 0;
  padding: 0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.segmented label {
  position: relative;
  min-width: 0;
}

.segmented input {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: #344054;
  font-weight: 700;
}

.segmented input:checked + span {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
}

.form-actions,
.record-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 42px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 700;
}

.primary-button {
  background: var(--teal);
  color: #ffffff;
}

.primary-button:hover {
  background: #0b5f59;
}

.secondary-button {
  border-color: var(--line);
  background: #ffffff;
  color: #344054;
}

.danger-button {
  border-color: #fecdd3;
  background: var(--rose-soft);
  color: var(--rose);
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.grant-preview-panel {
  position: relative;
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid #d7e4e2;
  background: linear-gradient(180deg, #f8fbfa, #ffffff 70%);
  padding: 0;
  box-shadow: none;
}

.grant-preview-content {
  flex: 0 0 auto;
}

.grant-preview-heading {
  display: flex;
  height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #0f766e, #178a81);
  color: #ffffff;
  padding: 18px 20px;
}

.grant-preview-heading span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 11px;
  font-weight: 700;
}

.grant-preview-heading h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.grant-preview-heading em {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  padding: 5px 9px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.grant-preview-person {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 18px 18px 0;
}

.grant-preview-person > .grant-preview-avatar {
  position: relative;
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  background: linear-gradient(145deg, #0f766e, #24998e);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 8px 18px rgba(15, 118, 110, 0.2);
}

.grant-avatar-icon {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
}

.grant-avatar-icon::before,
.grant-avatar-icon::after {
  position: absolute;
  left: 50%;
  content: "";
  background: #ffffff;
  transform: translateX(-50%);
}

.grant-avatar-icon::before {
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.grant-avatar-icon::after {
  bottom: 2px;
  width: 21px;
  height: 11px;
  border-radius: 12px 12px 6px 6px;
}

.grant-preview-person strong,
.grant-preview-person span {
  display: block;
}

.grant-preview-person strong {
  font-size: 16px;
}

.grant-preview-person div > span {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grant-balance-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 16px 18px 0;
  border: 1px solid var(--soft-line);
  border-radius: 13px;
  background: #f8fafc;
  padding: 13px;
}

.grant-balance-flow div {
  min-width: 0;
}

.grant-balance-flow span,
.grant-balance-flow strong {
  display: block;
}

.grant-balance-flow div > span {
  color: var(--muted);
  font-size: 11px;
}

.grant-balance-flow strong {
  margin-top: 4px;
  font-size: 20px;
}

.grant-balance-after {
  text-align: right;
}

.grant-flow-arrow {
  color: #98a2b3;
  font-size: 20px;
}

.grant-delta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 18px 0;
  border-radius: 13px;
  padding: 14px;
}

.grant-delta-add {
  background: #ecfdf3;
  color: #067647;
}

.grant-delta-deduct {
  background: var(--rose-soft);
  color: var(--rose);
}

.grant-delta-card > span {
  font-size: 12px;
  font-weight: 800;
}

.grant-delta-card > strong {
  font-size: 23px;
}

.grant-delta-card small {
  font-size: 11px;
}

.grant-preview-details {
  display: grid;
  margin: 16px 18px 0;
  border-top: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
}

.grant-preview-details > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}

.grant-preview-details > div + div {
  border-top: 1px solid var(--soft-line);
}

.grant-preview-details span {
  color: var(--muted);
  font-size: 12px;
}

.grant-preview-details strong {
  max-width: 62%;
  font-size: 12px;
  text-align: right;
  overflow-wrap: anywhere;
}

.grant-preview-tip {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  margin: 14px 18px 18px;
  border-radius: 10px;
  background: #f2f4f7;
  padding: 10px;
}

.grant-preview-tip > span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
}

.grant-preview-tip p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.grant-preview-process {
  margin: 0 18px 16px;
  border: 1px solid var(--soft-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.82);
  padding: 13px;
}

.grant-process-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--soft-line);
  padding-bottom: 10px;
}

.grant-process-heading strong {
  color: #344054;
  font-size: 12px;
}

.grant-process-heading span {
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
}

.grant-process-list {
  display: grid;
  gap: 10px;
  margin-top: 11px;
}

.grant-process-list > div {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.grant-process-list > div > span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 10px;
  font-weight: 900;
}

.grant-process-list p,
.grant-process-list strong,
.grant-process-list small {
  display: block;
}

.grant-process-list p {
  margin: 0;
}

.grant-process-list strong {
  color: #475467;
  font-size: 11px;
}

.grant-process-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.grant-preview-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
  margin-top: auto;
  border-top: 1px solid #d7e4e2;
  background: #ffffff;
  padding: 16px 18px 18px;
}

.grant-preview-actions button {
  width: 100%;
}

.rules-toolbar,
.rules-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.rule-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  gap: 10px;
  width: min(100%, 420px);
}

.rule-summary-item {
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fbfcfd;
  padding: 12px;
}

.rule-summary-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.rule-summary-item strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  line-height: 1;
}

.rules-filters {
  align-items: end;
}

.rules-filters .field {
  min-width: 190px;
  flex: 1 1 190px;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 16px;
}

.rule-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 18px;
  box-shadow: var(--shadow);
}

.rule-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rule-category {
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.rule-card-topline strong {
  color: var(--green);
  font-size: 24px;
  line-height: 1;
}

.rule-card h3 {
  margin: 0;
  font-size: 18px;
}

.rule-card p {
  margin: 0;
  color: #344054;
  line-height: 1.55;
}

.rule-detail-list {
  display: grid;
  gap: 10px;
}

.rule-detail-list div {
  border-top: 1px solid var(--soft-line);
  padding-top: 10px;
}

.rule-detail-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.rule-detail-list strong {
  display: block;
  margin-top: 4px;
  color: #263247;
  font-size: 13px;
  line-height: 1.45;
}

.rewards-toolbar,
.mall-toolbar,
.mall-filters {
  margin-bottom: 16px;
}

.mall-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mall-toolbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  border-color: #d9e5e4;
  background: linear-gradient(118deg, #ffffff 0%, #fbfdfd 58%, #eef9f7 100%);
  padding: 18px 20px;
  box-shadow: 0 10px 28px rgba(22, 32, 51, 0.07);
}

.mall-toolbar::after {
  position: absolute;
  top: -70px;
  right: -40px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.05);
  content: "";
  pointer-events: none;
}

.mall-title-block {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.mall-title-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f766e, #15938a);
  color: #ffffff;
  box-shadow: 0 9px 20px rgba(15, 118, 110, 0.2);
}

.mall-title-mark svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.mall-title-block h3 {
  margin: 0;
  color: #152238;
  font-size: 20px;
  letter-spacing: 0.01em;
}

.mall-title-block p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.mall-title-block p i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #98a2b3;
}

.mall-userbar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 108px 156px;
  align-items: stretch;
  gap: 10px;
}

.mall-employee-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 54px;
  overflow: hidden;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 5px 15px rgba(22, 32, 51, 0.04);
}

.mall-employee-control > span {
  margin-left: 14px;
  border-right: 1px solid var(--soft-line);
  color: var(--muted);
  padding-right: 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mall-employee-control select {
  min-width: 0;
  height: 52px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  padding: 0 32px 0 12px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
}

.mall-cart-trigger {
  position: relative;
  display: grid;
  grid-template-columns: 38px auto auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border: 1px solid #b8d8d5;
  border-radius: 12px;
  background: linear-gradient(135deg, #f1fbfa, #ffffff);
  color: var(--ink);
  padding: 7px 12px 7px 8px;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mall-cart-trigger:hover {
  border-color: var(--teal);
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.14);
  transform: translateY(-1px);
}

.mall-cart-trigger-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--teal);
  color: #ffffff;
}

.mall-cart-trigger-icon svg,
.cart-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.mall-cart-trigger-copy {
  display: grid;
  min-width: 52px;
  text-align: left;
}

.mall-cart-trigger-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.mall-cart-trigger-copy strong {
  font-size: 14px;
  line-height: 1.25;
}

.mall-cart-count {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #e8eef5;
  color: #475467;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 900;
}

.mall-cart-count.has-items {
  background: var(--rose);
  color: #ffffff;
}

.mall-filters {
  align-items: end;
}

.mall-filters .field {
  min-width: 190px;
  flex: 1 1 190px;
}

.mall-products-panel {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.reward-balance {
  display: grid;
  min-height: 54px;
  align-content: center;
  border: 1px solid #cbdcff;
  border-radius: 12px;
  background: linear-gradient(145deg, #eef4ff, #f8faff);
  padding: 7px 13px;
  text-align: center;
}

.reward-balance small {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.reward-balance strong {
  margin-top: 1px;
  color: #1d4ed8;
  font-size: 18px;
  line-height: 1.15;
}

.reward-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.reward-card {
  display: grid;
  min-width: 0;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 8px 26px rgba(22, 32, 51, 0.07);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.reward-card:hover {
  border-color: #b7c4d4;
  box-shadow: 0 14px 34px rgba(22, 32, 51, 0.11);
  transform: translateY(-2px);
}

.mall-card {
  grid-template-rows: auto auto minmax(66px, auto) auto auto;
}

.reward-visual {
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-height: 96px;
  border-radius: 10px;
  padding: 13px;
  color: #ffffff;
  overflow: hidden;
}

.reward-visual span {
  color: #ffffff;
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
}

.reward-visual small {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  padding: 5px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.visual-vacation {
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.visual-benefit {
  background: linear-gradient(135deg, #b45309, #0f766e);
}

.visual-growth {
  background: linear-gradient(135deg, #2563eb, #6d28d9);
}

.visual-office {
  background: linear-gradient(135deg, #475467, #2563eb);
}

.visual-gift {
  background: linear-gradient(135deg, #be123c, #b45309);
}

.visual-life {
  background: linear-gradient(135deg, #15803d, #b45309);
}

.visual-health {
  background: linear-gradient(135deg, #0f766e, #15803d);
}

.reward-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reward-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.subtle-badge {
  background: #f2f4f7;
  color: #475467;
}

.reward-cost {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
}

.reward-cost small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.reward-info {
  min-width: 0;
}

.reward-name {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.reward-description {
  display: -webkit-box;
  min-height: 38px;
  margin-top: 4px;
  overflow: hidden;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.reward-card-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.reward-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.reward-actions button {
  min-height: 40px;
  padding: 0 8px;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

.reward-card button:disabled,
.cart-checkout:disabled,
.compact-button:disabled,
.cart-stepper button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

body.mall-cart-open {
  overflow: hidden;
}

.mall-cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(15, 23, 42, 0.38);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(2px);
  transition: opacity 0.25s ease;
}

.mall-cart-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mall-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 31;
  width: min(430px, calc(100vw - 20px));
  background: #ffffff;
  box-shadow: -24px 0 56px rgba(15, 23, 42, 0.2);
  transform: translateX(104%);
  visibility: hidden;
  transition: transform 0.28s ease, visibility 0.28s ease;
}

.mall-cart-drawer.open {
  visibility: visible;
  transform: translateX(0);
}

.mall-cart-panel {
  display: flex;
  height: 100%;
  min-width: 0;
  flex-direction: column;
  background: #ffffff;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--soft-line);
  padding: 22px 24px 18px;
}

.cart-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 12px;
  background: var(--teal-soft);
  color: var(--teal);
}

.cart-header h3 {
  margin: 0;
  font-size: 19px;
}

.cart-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.cart-close-button {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: #475467;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.cart-close-button:hover {
  border-color: #c5ceda;
  background: #f5f7fa;
  color: var(--ink);
}

.compact-button {
  min-height: 42px;
  padding: 0 12px;
}

.cart-list {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding: 18px 24px;
  scrollbar-width: thin;
}

.cart-empty {
  display: grid;
  min-height: 300px;
  place-items: center;
  align-content: center;
  gap: 9px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdfd, #f6f9fb);
  color: var(--muted);
  text-align: center;
}

.cart-empty > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 3px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--teal);
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(22, 32, 51, 0.1);
}

.cart-empty strong {
  color: #344054;
  font-size: 16px;
}

.cart-empty small {
  font-size: 13px;
}

.cart-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 11px 13px;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  background: #ffffff;
  padding: 13px;
  box-shadow: 0 5px 18px rgba(22, 32, 51, 0.05);
}

.cart-item-visual {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.cart-item-main {
  min-width: 0;
}

.cart-item-main > strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-main > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.cart-remove-button {
  margin-top: 5px;
  border: 0;
  background: transparent;
  color: var(--rose);
  padding: 0;
  font-size: 12px;
}

.cart-item-controls {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--soft-line);
  padding-top: 11px;
}

.cart-stepper {
  display: grid;
  grid-template-columns: 32px 36px 32px;
  align-items: center;
  gap: 4px;
}

.cart-stepper button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  font-size: 16px;
  font-weight: 900;
}

.cart-stepper button:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal);
}

.cart-stepper strong {
  text-align: center;
}

.cart-line-total {
  color: var(--ink);
  font-size: 14px;
}

.cart-summary {
  display: grid;
  gap: 10px;
  flex: 0 0 auto;
  margin: 0 24px;
  border-top: 1px solid var(--soft-line);
  padding-top: 16px;
}

.cart-summary-row,
.cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.cart-summary-row span,
.cart-total span {
  color: var(--muted);
}

.cart-summary-row strong {
  font-size: 14px;
}

.cart-total strong {
  font-size: 25px;
}

.cart-total strong small {
  color: var(--muted);
  font-size: 12px;
}

.cart-warning {
  margin: 12px 24px 0;
  border-radius: 10px;
  background: var(--rose-soft);
  color: var(--rose);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
}

.cart-footer-actions {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 10px;
  flex: 0 0 auto;
  padding: 18px 24px 24px;
}

.cart-checkout {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
}

.rankings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.rank-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 640px);
}

.rank-tab {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: #344054;
  padding: 0 12px;
  font-weight: 800;
}

.rank-tab:hover,
.rank-tab.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
}

.rankings-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  height: auto;
  min-height: 0;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border-color: #d4e1df;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 18px 44px rgba(22, 32, 51, 0.1);
}

.ranking-list-column {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  padding: 18px 18px 0;
}

.ranking-list {
  display: grid;
  min-height: 0;
  align-content: start;
  gap: 10px;
  overflow: visible;
  padding-right: 2px;
  scrollbar-width: thin;
}

.ranking-summary-panel {
  min-width: 0;
  min-height: 0;
  overflow: visible;
  border-left: 1px solid #d7e4e2;
  background: linear-gradient(180deg, #f8fbfa, #ffffff 70%);
  scrollbar-width: thin;
}

.pagination-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(22, 32, 51, 0.05);
}

.ranking-list-column .ranking-pagination {
  margin: 16px -18px 0;
  border-top: 1px solid var(--soft-line);
  background: #ffffff;
  padding: 14px 18px;
  box-shadow: none;
}

.pagination-total {
  margin-right: 4px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.pagination-total strong {
  color: var(--ink);
  font-size: 15px;
}

.pagination-button,
.pagination-page {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 6px;
  font-weight: 700;
}

.pagination-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: #475467;
}

.pagination-button:not(:disabled):hover {
  border-color: var(--teal);
  color: var(--teal);
}

.pagination-button:disabled {
  cursor: not-allowed;
  border-color: var(--soft-line);
  background: #f8fafc;
  color: #c3cad5;
}

.pagination-page {
  background: var(--ink);
  color: #ffffff;
  font-size: 14px;
}

.pagination-size {
  margin-left: 4px;
}

.pagination-size select {
  width: 128px;
  min-height: 36px;
  padding: 7px 30px 7px 12px;
  font-size: 13px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 56px 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.ranking-item.current {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.ranking-item:hover {
  border-color: #91c7c2;
  background: #f6fbfa;
  transform: translateY(-1px);
}

.ranking-item:focus-visible {
  border-color: var(--teal);
  outline: 3px solid rgba(15, 118, 110, 0.14);
  outline-offset: 1px;
}

.ranking-item > .avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
}

.rank-number {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius);
  background: #f2f4f7;
  color: #263247;
  font-weight: 900;
}

.rank-number.top {
  background: var(--amber-soft);
  color: var(--amber);
}

.ranking-person {
  display: flex;
  min-width: 0;
  min-height: 44px;
  flex-direction: column;
  justify-content: center;
}

.ranking-person strong {
  display: block;
  overflow: hidden;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-person span,
.ranking-score span {
  color: var(--muted);
  font-size: 13px;
}

.ranking-person span {
  margin-top: 4px;
  line-height: 1.2;
}

.ranking-score {
  min-width: 116px;
  text-align: right;
}

.ranking-score strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.ranking-summary-header {
  position: static;
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #0f766e, #178a81);
  color: #ffffff;
  padding: 18px;
}

.ranking-summary-header span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 700;
}

.ranking-summary-header h3 {
  margin: 4px 0 0;
  font-size: 21px;
}

.ranking-summary-header em {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  padding: 5px 9px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.ranking-summary-body {
  padding: 14px;
}

.ranking-summary-body > .ranking-summary-metric:first-child {
  border-top: 0;
}

.ranking-summary-title {
  margin: 0 0 14px;
  font-size: 18px;
}

.ranking-period-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d9e5e3;
  border-radius: 12px;
  background: #ffffff;
  padding: 11px 12px;
}

.ranking-period-banner span {
  color: var(--muted);
  font-size: 13px;
}

.ranking-period-banner strong {
  color: #344054;
  font-size: 15px;
  text-align: right;
}

.ranking-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.ranking-feature-card {
  min-width: 0;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  padding: 11px;
}

.ranking-feature-leader {
  border-color: #f1dfbd;
  background: linear-gradient(145deg, #fff9ed, #ffffff);
}

.ranking-feature-current {
  border-color: #b8dcd7;
  background: linear-gradient(145deg, #edf9f7, #ffffff);
}

.ranking-feature-label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ranking-feature-label > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
}

.ranking-feature-current .ranking-feature-label > span {
  background: var(--teal-soft);
  color: var(--teal);
}

.ranking-feature-label small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ranking-feature-card > strong {
  display: block;
  margin-top: 10px;
  overflow: hidden;
  color: #263247;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-feature-card > p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.ranking-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.ranking-mini-stats > div {
  min-width: 0;
  border: 1px solid var(--soft-line);
  border-radius: 10px;
  background: #ffffff;
  padding: 9px 8px;
  text-align: center;
}

.ranking-mini-stats > .ranking-mini-stat {
  display: grid;
  min-height: 66px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 10px;
  text-align: left;
}

.ranking-mini-stat-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: #e5f5f1;
  color: #167d72;
  font-size: 10px;
  font-weight: 900;
}

.ranking-mini-stat-champion .ranking-mini-stat-icon { background: #fff2d8; color: #9c6819; }
.ranking-mini-stat-current .ranking-mini-stat-icon { background: #e9eff8; color: #526e98; }
.ranking-mini-stat-copy { min-width: 0; }

.ranking-mini-stats span,
.ranking-mini-stats strong,
.ranking-mini-stats small {
  display: block;
}

.ranking-mini-stat-copy > span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.ranking-mini-stats strong {
  margin-top: 5px;
  overflow: hidden;
  color: #263247;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-mini-stat-copy > strong {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 6px;
}

.ranking-mini-stats small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.ranking-mini-stat-copy > strong > small {
  display: inline;
  flex: 0 0 auto;
  margin-top: 0;
  white-space: nowrap;
}

.ranking-summary-metric {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--soft-line);
  padding: 14px 0;
}

.ranking-summary-metric span {
  color: var(--muted);
}

.ranking-summary-metric strong {
  text-align: right;
}

.department-ranking-block {
  border-top: 1px solid var(--soft-line);
  margin-top: 14px;
  padding-top: 14px;
}

.department-ranking-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.department-ranking-heading h3,
.department-ranking-heading span {
  display: block;
}

.department-ranking-heading h3 {
  margin: 0;
  font-size: 18px;
}

.department-ranking-heading span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.department-ranking-heading em {
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  padding: 5px 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.department-ranking-list {
  display: grid;
  gap: 8px;
}

.department-ranking-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--soft-line);
  border-radius: 11px;
  background: #ffffff;
  padding: 9px;
}

.department-ranking-item.current {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.department-ranking-main {
  min-width: 0;
}

.department-ranking-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.department-ranking-main span,
.department-ranking-score span {
  color: var(--muted);
  font-size: 11px;
}

.department-ranking-main > span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.department-progress {
  display: block;
  height: 4px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.department-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #39a79d);
}

.department-ranking-score {
  min-width: 46px;
  text-align: right;
}

.department-ranking-score strong {
  display: block;
  font-size: 21px;
  line-height: 1.1;
}

.department-ranking-item > .rank-number {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 14px;
}

.records-toolbar {
  align-items: end;
  margin-bottom: 16px;
}

.records-toolbar .field {
  min-width: 210px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--soft-line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}

td {
  color: #263247;
  font-size: 14px;
}

.type-pill {
  display: inline-flex;
  min-width: 50px;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.type-reward {
  background: var(--teal-soft);
  color: var(--teal);
}

.type-deduct {
  background: var(--rose-soft);
  color: var(--rose);
}

.type-redeem {
  background: var(--amber-soft);
  color: var(--amber);
}

.account-table-wrap table {
  min-width: 860px;
}

.role-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.role-admin {
  background: var(--blue-soft);
  color: #1d4ed8;
}

.role-employee {
  background: var(--teal-soft);
  color: var(--teal);
}

.status-active {
  background: #ecfdf3;
  color: var(--green);
}

.status-disabled {
  background: var(--rose-soft);
  color: var(--rose);
}

.account-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.account-actions button {
  min-height: 34px;
  padding: 0 10px;
}

#accountsTable .account-actions {
  display: grid;
  min-width: 210px;
  grid-template-columns: repeat(2, minmax(96px, 1fr));
  gap: 7px;
}

#accountsTable .account-actions button {
  min-height: 35px;
  border-radius: 10px;
  font-size: 12px;
  white-space: nowrap;
}

#accountsTable .account-delete-button {
  border-color: #fecdd3;
  background: linear-gradient(145deg, #fff7f8, #fff0f2);
  color: #be123c;
}

#accountsTable .account-delete-button:hover:not(:disabled) {
  border-color: #fda4af;
  background: #ffe4e8;
  color: #9f1239;
  transform: translateY(-1px);
}

#accountsTable .account-delete-button:disabled {
  border-color: #e5e7eb;
  background: #f5f6f7;
  color: #a3a9b2;
  cursor: not-allowed;
}

.auth-panel.account-delete-panel {
  width: min(100%, 430px);
  border-color: rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at 100% 0, rgba(244, 63, 94, 0.08), transparent 155px),
    #ffffff;
  padding: 32px;
  text-align: center;
}

.account-delete-gate.is-open {
  display: grid !important;
}

.account-delete-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin: 2px auto 17px;
  border: 1px solid #fecdd3;
  border-radius: 19px;
  background: linear-gradient(145deg, #fff1f3, #ffe4e8);
  color: #be123c;
  font-size: 19px;
  font-weight: 900;
  box-shadow: 0 12px 25px rgba(190, 18, 60, 0.11);
}

.account-delete-heading {
  text-align: center;
}

.account-delete-heading h2 {
  color: #2b2025;
  font-size: 22px;
}

.account-delete-heading p {
  max-width: 330px;
  margin: 8px auto 0;
  color: #7b6e73;
  font-size: 12px;
  line-height: 1.7;
}

.account-delete-target {
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid #f1e3e6;
  border-radius: 14px;
  background: #fbf7f8;
  color: #4b3740;
  padding: 13px 15px;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-delete-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.account-delete-actions button {
  min-height: 46px;
  border-radius: 13px;
  font-weight: 900;
}

#confirmAccountDelete {
  border: 0;
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(190, 18, 60, 0.2);
}

#confirmAccountDelete:hover:not(:disabled) {
  background: linear-gradient(135deg, #d91743, #a91034);
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  html body:not(.is-logged-out) #accountsTable .account-actions {
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-panel.account-delete-panel {
    padding: 27px 22px 22px;
  }
}

@media (max-width: 380px) {
  html body:not(.is-logged-out) #accountsTable .account-actions {
    grid-template-columns: 1fr;
  }
}

.empty-state {
  display: none;
  padding: 28px 0 10px;
  color: var(--muted);
  text-align: center;
}

.empty-state.show {
  display: block;
}

.mobile-login-welcome {
  display: none;
}

.reward-visual-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  text-align: right;
}

.reward-visual .reward-visual-copy small {
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.reward-visual-copy strong {
  color: #ffffff;
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 32px));
  border-radius: var(--radius);
  background: #111827;
  color: #ffffff;
  padding: 12px 14px;
  box-shadow: 0 18px 38px rgba(17, 24, 39, 0.22);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

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

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-tabs {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .mall-toolbar {
    grid-template-columns: 1fr;
  }

  .two-column,
  .wide-column,
  .rankings-layout {
    grid-template-columns: 1fr;
  }

  .reward-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .grant-preview-panel {
    position: static;
    height: auto;
    border-top: 1px solid #d7e4e2;
    border-left: 0;
  }

  .grant-workbench {
    grid-template-columns: 1fr;
  }

  .rankings-workbench {
    height: auto;
    grid-template-columns: 1fr;
  }

  .ranking-list {
    overflow: visible;
  }

  .ranking-summary-panel {
    overflow: visible;
    border-top: 1px solid #d7e4e2;
    border-left: 0;
  }

  .ranking-summary-header {
    position: static;
  }

  .rules-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

@media (max-width: 720px) {
  .main-panel,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .section-heading,
  .records-toolbar,
  .rewards-toolbar,
  .rankings-toolbar,
  .rules-toolbar,
  .rules-filters,
  .mall-toolbar,
  .mall-filters,
  .mall-userbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 14px;
  }

  .mall-toolbar,
  .mall-userbar {
    grid-template-columns: 1fr;
  }

  .grant-section-grid,
  .grant-form-footer {
    grid-template-columns: 1fr;
  }

  .grant-operator {
    max-width: none;
  }

  .grant-form-footer .form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .mall-title-block p {
    flex-wrap: wrap;
    white-space: normal;
  }

  .topbar-controls {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    padding: 10px;
  }

  .topbar-controls .topbar-employee-picker {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    padding-left: 0;
  }

  .topbar-controls .topbar-employee-picker select {
    min-width: 0;
  }

  .topbar-controls .user-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .pagination-panel {
    flex-wrap: wrap;
  }

  .pagination-size {
    flex: 1 1 128px;
  }

  .pagination-size select {
    width: 100%;
  }

  .employee-picker select,
  .records-toolbar .field,
  .rules-filters .field,
  .mall-filters .field {
    min-width: 0;
  }

  .nav-tabs,
  .metric-grid,
  .profile-rank-grid,
  .grant-form,
  .reward-grid,
  .rules-grid,
  .rule-summary,
  .rank-tabs {
    grid-template-columns: 1fr;
  }

  .reward-actions {
    grid-template-columns: 1fr;
  }

  .login-popover {
    position: static;
    width: 100%;
    margin-top: 8px;
  }

  .login-popover-actions {
    grid-template-columns: 1fr;
  }

  .employee-card,
  .ranking-item,
  .department-ranking-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .points-chip,
  .ranking-score,
  .department-ranking-score {
    grid-column: 1 / -1;
    width: max-content;
    min-width: 0;
    text-align: left;
  }

  .inline-picker {
    display: grid;
    align-items: stretch;
  }

  .mall-cart-trigger {
    width: 100%;
  }
}

@media (max-width: 440px) {
  .mall-cart-drawer {
    width: 100vw;
  }

  .cart-header,
  .cart-list {
    padding-right: 18px;
    padding-left: 18px;
  }

  .cart-summary {
    margin-right: 18px;
    margin-left: 18px;
  }

  .cart-footer-actions {
    grid-template-columns: 1fr;
    padding-right: 18px;
    padding-left: 18px;
  }
}

/* Mobile application layout */
@media (max-width: 720px) {
  html {
    scroll-padding-top: 106px;
  }

  body {
    min-width: 0;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 18;
    display: block;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(216, 222, 232, 0.92);
    background: rgba(251, 252, 253, 0.96);
    padding: 9px 12px 7px;
    box-shadow: 0 8px 24px rgba(22, 32, 51, 0.08);
    backdrop-filter: blur(12px);
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 18px;
  }

  .brand-copy h1 {
    font-size: 16px;
  }

  .brand-copy p {
    display: none;
  }

  .nav-tabs {
    display: flex;
    width: 100%;
    grid-template-columns: none;
    gap: 6px;
    margin-top: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 0 0 3px;
    scroll-behavior: smooth;
    scrollbar-width: none;
  }

  .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .nav-tab {
    width: auto;
    min-width: 92px;
    min-height: 38px;
    flex: 0 0 auto;
    justify-content: center;
    gap: 7px;
    border-color: var(--soft-line);
    border-radius: 999px;
    background: #f5f7fa;
    padding: 0 11px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
  }

  .nav-tab:hover,
  .nav-tab.active {
    border-color: #9dcec9;
    background: var(--teal-soft);
    color: var(--teal);
    box-shadow: none;
  }

  .nav-dot {
    width: 7px;
    height: 7px;
  }

  .sidebar-summary {
    display: none;
  }

  .main-panel {
    padding: 14px 12px 28px;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 14px;
    padding: 0 0 12px;
  }

  .title-block {
    display: grid;
    gap: 2px;
  }

  .title-block h2 {
    font-size: 24px;
  }

  .title-block .eyebrow {
    margin: 0;
    font-size: 11px;
  }

  .topbar-controls {
    gap: 8px;
    border-radius: 14px;
    padding: 8px;
  }

  .topbar-controls .topbar-employee-picker {
    min-width: 0;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 6px;
  }

  .topbar-controls .topbar-employee-picker select {
    min-height: 42px;
    padding-right: 30px;
    font-size: 14px;
  }

  .topbar-controls .user-actions {
    gap: 8px;
  }

  .current-user,
  .logout-button {
    min-height: 42px;
  }

  .current-user {
    min-width: 0;
  }

  .user-copy strong {
    max-width: 140px;
  }

  .panel {
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 10px 26px rgba(22, 32, 51, 0.07);
  }

  select,
  input {
    min-height: 44px;
  }

  .primary-button,
  .secondary-button,
  .danger-button {
    min-height: 44px;
  }

  .two-column,
  .wide-column {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .employee-list {
    max-height: none;
    gap: 8px;
    margin-top: 12px;
    overflow: visible;
  }

  .employee-card {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    min-height: 64px;
    gap: 9px;
    padding: 8px;
  }

  .employee-card .avatar {
    width: 42px;
    height: 42px;
  }

  .employee-meta span,
  .history-item span,
  .reward-card span,
  .small-muted {
    font-size: 12px;
  }

  .points-chip {
    grid-column: auto;
    min-width: 66px;
    padding: 6px 8px;
    text-align: center;
  }

  .profile-header {
    margin-bottom: 14px;
  }

  .profile-header .avatar {
    width: 52px;
    height: 52px;
  }

  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .metric {
    min-width: 0;
    padding: 10px 8px;
    text-align: center;
  }

  .metric span {
    font-size: 11px;
  }

  .metric strong {
    margin-top: 6px;
    font-size: 20px;
  }

  .profile-rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .grant-workbench {
    border-radius: 14px;
  }

  .grant-heading,
  .grant-preview-heading {
    height: auto;
    min-height: 74px;
    padding: 14px;
  }

  .grant-form {
    gap: 10px;
    padding: 12px;
  }

  .grant-form-section {
    border-radius: 12px;
    padding: 12px;
  }

  .grant-section-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .grant-preview-person,
  .grant-balance-flow,
  .grant-delta-card,
  .grant-preview-details,
  .grant-preview-tip {
    margin-right: 14px;
    margin-left: 14px;
  }

  .grant-preview-process {
    display: none;
  }

  .grant-preview-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    padding: 12px 14px 14px;
    box-shadow: 0 -8px 22px rgba(22, 32, 51, 0.06);
  }

  .rules-toolbar,
  .rankings-toolbar {
    display: grid;
    gap: 12px;
  }

  .rule-summary {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .rule-summary-item {
    min-width: 0;
    padding: 10px 8px;
  }

  .rule-summary-item span {
    font-size: 10px;
  }

  .rule-summary-item strong {
    font-size: 20px;
  }

  .rules-filters,
  .mall-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .rules-filters .field,
  .mall-filters .field {
    min-width: 0;
  }

  .rules-filters .field:first-child,
  .mall-filters .field:first-child,
  .rules-filters .form-actions,
  .mall-filters .form-actions {
    grid-column: 1 / -1;
  }

  .rules-filters .form-actions,
  .mall-filters .form-actions {
    display: grid;
  }

  .rules-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .rule-card {
    gap: 10px;
    border-radius: 14px;
    padding: 14px;
  }

  .mall-toolbar {
    grid-template-columns: 1fr;
    gap: 14px;
    border-radius: 14px;
    padding: 14px;
  }

  .mall-title-mark {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 12px;
  }

  .mall-title-block h3 {
    font-size: 18px;
  }

  .mall-userbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mall-employee-control {
    min-height: 50px;
    grid-column: 1 / -1;
  }

  .mall-employee-control select {
    height: 48px;
    font-size: 13px;
  }

  .reward-balance,
  .mall-cart-trigger {
    min-height: 50px;
  }

  .mall-cart-trigger {
    width: 100%;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .mall-cart-trigger-icon {
    width: 34px;
    height: 34px;
  }

  .reward-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .reward-card.mall-card {
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    gap: 7px 12px;
    border-radius: 14px;
    padding: 12px;
  }

  .mall-card .reward-visual {
    min-height: 100%;
    grid-column: 1;
    grid-row: 1 / 4;
    align-items: end;
    padding: 10px;
  }

  .mall-card .reward-topline {
    grid-column: 2;
    grid-row: 1;
  }

  .mall-card .reward-info {
    grid-column: 2;
    grid-row: 2;
  }

  .mall-card .reward-card-footer {
    grid-column: 2;
    grid-row: 3;
  }

  .mall-card .reward-actions {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  .reward-visual span {
    font-size: 30px;
  }

  .reward-visual small,
  .reward-badge {
    padding: 4px 7px;
    font-size: 10px;
  }

  .reward-name {
    font-size: 16px;
  }

  .reward-description {
    min-height: 0;
    font-size: 12px;
  }

  .reward-cost {
    font-size: 23px;
  }

  .reward-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mall-cart-drawer {
    width: min(100vw, 430px);
  }

  .cart-empty {
    min-height: 220px;
  }

  .rank-tabs {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .rank-tab {
    min-height: 40px;
    padding: 0 8px;
    font-size: 13px;
  }

  .rankings-workbench {
    border-radius: 14px;
  }

  .ranking-list-column {
    padding: 12px 12px 0;
  }

  .ranking-list {
    gap: 8px;
  }

  .ranking-item {
    grid-template-columns: 40px 38px minmax(0, 1fr) 82px;
    min-height: 66px;
    gap: 8px;
    padding: 8px;
  }

  .ranking-item > .avatar {
    width: 38px;
    height: 38px;
  }

  .rank-number {
    width: 40px;
    height: 40px;
  }

  .ranking-person {
    min-height: 40px;
  }

  .ranking-person strong {
    font-size: 14px;
  }

  .ranking-person span,
  .ranking-score span {
    font-size: 10px;
    line-height: 1.25;
  }

  .ranking-score {
    width: 82px;
    min-width: 82px;
    grid-column: auto;
    text-align: right;
  }

  .ranking-score strong {
    font-size: 20px;
  }

  .ranking-summary-header {
    min-height: 74px;
    padding: 14px;
  }

  .ranking-summary-header h3 {
    font-size: 20px;
  }

  .ranking-summary-body {
    padding: 12px;
  }

  .ranking-mini-stats {
    grid-template-columns: 1fr;
  }

  .ranking-mini-stats > .ranking-mini-stat {
    display: grid;
    min-height: 62px;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    text-align: left;
  }

  .ranking-mini-stat-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    background: #e5f5f1;
    color: #167d72;
    font-size: 10px;
    font-weight: 900;
  }

  .ranking-mini-stat-copy strong { margin-top: 3px; }

  .department-ranking-item {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .department-ranking-score {
    width: auto;
    min-width: 46px;
    grid-column: auto;
    text-align: right;
  }

  #recordsView .records-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #recordsView .records-toolbar .field {
    min-width: 0;
  }

  #recordsView .record-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #recordsView .record-actions button {
    width: 100%;
  }

  #recordsView .table-wrap,
  #accountsView .table-wrap {
    overflow: visible;
  }

  #recordsView .table-wrap table,
  #accountsView .table-wrap table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  #recordsView thead,
  #accountsView thead {
    display: none;
  }

  #recordsTable,
  #accountsTable {
    display: grid;
    gap: 10px;
  }

  #recordsTable tr,
  #accountsTable tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--soft-line);
    border-radius: 12px;
    background: #ffffff;
    padding: 6px;
    box-shadow: 0 5px 16px rgba(22, 32, 51, 0.05);
  }

  #recordsTable td,
  #accountsTable td {
    display: block;
    min-width: 0;
    border: 0;
    padding: 7px 8px;
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  #recordsTable td::before,
  #accountsTable td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
  }

  #recordsTable td:first-child,
  #recordsTable td:nth-child(5),
  #accountsTable td:nth-child(2),
  #accountsTable td:last-child {
    grid-column: 1 / -1;
  }

  #accountsView > .panel:first-child .section-heading {
    margin-bottom: 12px;
  }

  .account-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .account-actions button {
    min-height: 38px;
    padding: 0 6px;
    font-size: 12px;
  }

  .pagination-panel,
  .ranking-list-column .ranking-pagination {
    display: grid;
    grid-template-columns: auto 36px 36px 36px minmax(92px, 1fr);
    gap: 7px;
    margin-top: 10px;
    padding: 12px;
  }

  .ranking-list-column .ranking-pagination {
    margin: 12px -12px 0;
  }

  .pagination-total {
    margin-right: 0;
    font-size: 12px;
  }

  .pagination-size {
    min-width: 0;
    margin-left: 0;
  }

  .pagination-size select {
    width: 100%;
    min-height: 36px;
  }
}

@media (max-width: 380px) {
  .main-panel {
    padding-right: 10px;
    padding-left: 10px;
  }

  .nav-tab {
    min-width: 88px;
    padding: 0 9px;
  }

  .ranking-item {
    grid-template-columns: 36px 36px minmax(0, 1fr);
  }

  .ranking-item > .rank-number,
  .ranking-item > .avatar {
    width: 36px;
    height: 36px;
  }

  .ranking-score {
    width: auto;
    min-width: 0;
    grid-column: 3;
    text-align: left;
  }

  .ranking-score strong,
  .ranking-score span {
    display: inline;
  }

  .ranking-score span {
    margin-left: 5px;
  }

  .reward-card.mall-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .pagination-panel,
  .ranking-list-column .ranking-pagination {
    grid-template-columns: auto 34px 34px 34px;
  }

  .pagination-size {
    grid-column: 1 / -1;
  }
}

/* Mobile visual refinement */
@media (max-width: 720px) {
  body.is-logged-out {
    background:
      radial-gradient(circle at 92% 5%, rgba(30, 154, 143, 0.12), transparent 30%),
      linear-gradient(180deg, #f2f8f7 0%, #f7f8fa 56%, #f3f5f8 100%);
  }

  body.is-logged-out .sidebar {
    position: relative;
    border-bottom: 0;
    background: transparent;
    padding: 18px 18px 8px;
    box-shadow: none;
    backdrop-filter: none;
  }

  body.is-logged-out .sidebar .nav-tabs,
  body.is-logged-out .sidebar-summary,
  body.is-logged-out .topbar,
  body.is-logged-out #queryView > .two-column {
    display: none;
  }

  body.is-logged-out .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(145deg, #08776f, #18a095);
    font-size: 20px;
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.24);
  }

  body.is-logged-out .brand-copy h1 {
    font-size: 18px;
    letter-spacing: 0.01em;
  }

  body.is-logged-out .main-panel {
    padding: 8px 16px 30px;
  }

  body.is-logged-out .mobile-login-welcome {
    display: block;
    max-width: 460px;
    margin: 0 auto;
  }

  .mobile-login-hero {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background:
      radial-gradient(circle at 86% 12%, rgba(255, 255, 255, 0.2), transparent 24%),
      linear-gradient(145deg, #075f59 0%, #0f8178 54%, #1ca89b 100%);
    color: #ffffff;
    padding: 26px 22px 22px;
    box-shadow: 0 22px 50px rgba(9, 95, 88, 0.24);
  }

  .mobile-login-hero::before,
  .mobile-login-hero::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    content: "";
    pointer-events: none;
  }

  .mobile-login-hero::before {
    right: -62px;
    bottom: -96px;
    width: 220px;
    height: 220px;
  }

  .mobile-login-hero::after {
    right: 48px;
    bottom: -82px;
    width: 146px;
    height: 146px;
  }

  .mobile-login-orbit {
    position: absolute;
    top: 20px;
    right: 20px;
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
    transform: rotate(7deg);
    backdrop-filter: blur(8px);
  }

  .mobile-login-orbit span {
    font-size: 31px;
    font-weight: 900;
    transform: rotate(-7deg);
  }

  .mobile-login-orbit i {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ffe3a5;
  }

  .mobile-login-orbit i:nth-child(2) {
    top: -4px;
    left: 10px;
  }

  .mobile-login-orbit i:nth-child(3) {
    right: -3px;
    bottom: 12px;
    width: 7px;
    height: 7px;
    background: #b9f3eb;
  }

  .mobile-login-kicker {
    position: relative;
    z-index: 1;
    display: inline-flex;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 10px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.13em;
  }

  .mobile-login-hero h2 {
    position: relative;
    z-index: 1;
    margin: 46px 0 0;
    font-size: 29px;
    line-height: 1.28;
    letter-spacing: 0.01em;
  }

  .mobile-login-hero h2 strong {
    color: #c9fff8;
    font-weight: 900;
  }

  .mobile-login-hero > p {
    position: relative;
    z-index: 1;
    width: 78%;
    margin: 13px 0 21px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 13px;
    line-height: 1.65;
  }

  .mobile-login-primary {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-radius: 15px;
    background: #ffffff;
    color: #075f59;
    padding: 0 9px 0 18px;
    font-size: 15px;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(2, 55, 51, 0.18);
  }

  .mobile-login-primary em {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 11px;
    background: var(--teal-soft);
    font-size: 20px;
    font-style: normal;
  }

  .mobile-register-entry {
    position: relative;
    z-index: 1;
    display: block;
    margin: 13px auto 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    padding: 3px 8px;
    font-size: 12px;
  }

  .mobile-login-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-top: 14px;
  }

  .mobile-login-benefits > div {
    min-width: 0;
    border: 1px solid rgba(216, 226, 232, 0.86);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.88);
    padding: 13px 8px 12px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(22, 32, 51, 0.06);
    backdrop-filter: blur(8px);
  }

  .mobile-login-benefits span {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    margin: 0 auto 8px;
    border-radius: 10px;
    background: var(--teal-soft);
    color: var(--teal);
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-login-benefits strong,
  .mobile-login-benefits small {
    display: block;
  }

  .mobile-login-benefits strong {
    font-size: 12px;
  }

  .mobile-login-benefits small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
  }

  .mobile-login-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 15px 0 0;
    color: #7a8699;
    font-size: 10px;
  }

  .mobile-login-security span {
    display: grid;
    width: 17px;
    height: 17px;
    place-items: center;
    border-radius: 50%;
    background: var(--teal-soft);
    color: var(--teal);
    font-size: 9px;
    font-weight: 900;
  }

  .auth-gate {
    align-items: end;
    justify-items: stretch;
    padding: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(5px);
  }

  .auth-panel {
    width: 100%;
    max-height: 92dvh;
    overflow-y: auto;
    border: 0;
    border-radius: 26px 26px 0 0;
    padding: 30px 20px max(24px, env(safe-area-inset-bottom));
    box-shadow: 0 -24px 60px rgba(15, 23, 42, 0.24);
  }

  .auth-panel::before {
    position: absolute;
    top: 10px;
    left: 50%;
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: #d8dee8;
    content: "";
    transform: translateX(-50%);
  }

  .auth-close {
    top: 20px;
    right: 18px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f2f4f7;
  }

  .auth-brand {
    margin-bottom: 20px;
    padding-right: 48px;
  }

  .auth-brand .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .auth-brand .brand-copy h1 {
    font-size: 18px;
  }

  .auth-brand .brand-copy p {
    display: block;
    margin-top: 4px;
    font-size: 11px;
  }

  .auth-tabs {
    gap: 4px;
    border-radius: 13px;
    background: #f2f4f7;
    padding: 4px;
  }

  .auth-tab {
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    background: transparent;
  }

  .auth-tab.active {
    background: #ffffff;
    box-shadow: 0 5px 14px rgba(22, 32, 51, 0.08);
  }

  .auth-form {
    gap: 13px;
  }

  .auth-form .field {
    gap: 6px;
  }

  .auth-form .field > span {
    font-size: 12px;
  }

  .auth-form input {
    min-height: 48px;
    border-color: transparent;
    border-radius: 13px;
    background: #f5f7fa;
  }

  .auth-form input:focus {
    border-color: #69b9b2;
    background: #ffffff;
  }

  .auth-submit {
    min-height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f766e, #16978c);
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.2);
  }

  #rewardsView .mall-toolbar {
    overflow: hidden;
    border: 0;
    border-radius: 22px;
    background:
      radial-gradient(circle at 94% 4%, rgba(42, 172, 159, 0.18), transparent 30%),
      linear-gradient(145deg, #ffffff 0%, #f0faf8 100%);
    padding: 18px;
    box-shadow: 0 14px 34px rgba(22, 92, 85, 0.1);
  }

  #rewardsView .mall-title-mark {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 15px;
  }

  #rewardsView .mall-title-block h3 {
    font-size: 21px;
  }

  #rewardsView .mall-title-block p {
    color: #748094;
  }

  #rewardsView .mall-userbar {
    gap: 9px;
  }

  #rewardsView .mall-employee-control {
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 18px rgba(22, 32, 51, 0.07);
  }

  #rewardsView .reward-balance {
    border: 0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(22, 32, 51, 0.07);
  }

  #rewardsView .mall-cart-trigger {
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #0d736b, #14978c);
    color: #ffffff;
    box-shadow: 0 9px 22px rgba(15, 118, 110, 0.2);
  }

  #rewardsView .mall-cart-trigger-icon {
    background: rgba(255, 255, 255, 0.15);
  }

  #rewardsView .mall-cart-trigger-copy small,
  #rewardsView .mall-cart-trigger-copy strong {
    color: #ffffff;
  }

  #rewardsView .mall-cart-count {
    background: #ffffff;
    color: var(--teal);
  }

  #rewardsView .mall-filters {
    border: 0;
    border-radius: 18px;
    background: #ffffff;
    padding: 14px;
    box-shadow: 0 9px 26px rgba(22, 32, 51, 0.07);
  }

  #rewardsView .mall-filters input,
  #rewardsView .mall-filters select {
    border-color: transparent;
    border-radius: 12px;
    background-color: #f4f6f9;
  }

  #rewardsView .mall-filters .form-actions button {
    border-color: transparent;
    border-radius: 12px;
    background: #f7f8fa;
  }

  #rewardsView .reward-grid {
    gap: 15px;
  }

  #rewardsView .reward-card.mall-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto;
    gap: 11px;
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0 13px 34px rgba(22, 32, 51, 0.1);
  }

  #rewardsView .mall-card .reward-visual {
    position: relative;
    min-height: 132px;
    isolation: isolate;
    grid-column: 1;
    grid-row: 1;
    align-items: end;
    border-radius: 16px;
    padding: 16px;
  }

  #rewardsView .mall-card .reward-visual::before,
  #rewardsView .mall-card .reward-visual::after {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    content: "";
  }

  #rewardsView .mall-card .reward-visual::before {
    top: -60px;
    right: -25px;
    width: 160px;
    height: 160px;
  }

  #rewardsView .mall-card .reward-visual::after {
    right: 86px;
    bottom: -48px;
    width: 104px;
    height: 104px;
  }

  #rewardsView .reward-visual-letter {
    position: relative;
    z-index: 1;
    font-size: 46px;
    text-shadow: 0 5px 16px rgba(0, 0, 0, 0.16);
  }

  #rewardsView .reward-visual-copy strong {
    font-size: 15px;
  }

  #rewardsView .mall-card .reward-topline {
    grid-column: 1;
    grid-row: 2;
  }

  #rewardsView .mall-card .reward-info {
    grid-column: 1;
    grid-row: 3;
  }

  #rewardsView .reward-name {
    font-size: 18px;
  }

  #rewardsView .reward-description {
    margin-top: 5px;
    color: #657185;
    font-size: 13px;
    line-height: 1.55;
  }

  #rewardsView .mall-card .reward-card-footer {
    grid-column: 1;
    grid-row: 4;
    border-top: 1px solid var(--soft-line);
    padding-top: 11px;
  }

  #rewardsView .reward-price-block {
    display: flex;
    width: 100%;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
  }

  #rewardsView .reward-cost {
    color: #152238;
    font-size: 28px;
  }

  #rewardsView .reward-stock {
    border-radius: 999px;
    background: #f2f4f7;
    padding: 5px 9px;
    font-size: 10px;
  }

  #rewardsView .mall-card .reward-actions {
    grid-column: 1;
    grid-row: 5;
    gap: 9px;
  }

  #rewardsView .reward-actions button {
    min-height: 46px;
    border-radius: 13px;
    font-size: 14px;
  }

  #rewardsView .reward-actions .primary-button {
    background: linear-gradient(135deg, #0e756d, #15988d);
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.17);
  }

  #rewardsView .reward-actions .secondary-button {
    border-color: #d8e1e9;
    background: #ffffff;
  }

  .mall-cart-panel {
    background: #f5f7f9;
  }

  .cart-header {
    border-bottom: 0;
    background: linear-gradient(145deg, #eff9f7, #ffffff);
    padding: 18px 18px 16px;
  }

  .cart-icon {
    border-radius: 14px;
    background: linear-gradient(145deg, #0f766e, #15988d);
    color: #ffffff;
  }

  .cart-list {
    gap: 11px;
    background: #f5f7f9;
    padding: 15px 16px;
  }

  .cart-item {
    border: 0;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 7px 22px rgba(22, 32, 51, 0.08);
  }

  .cart-summary {
    margin: 0 16px;
    border-top: 0;
    border-radius: 14px;
    background: #ffffff;
    padding: 14px;
  }

  .cart-warning {
    margin-right: 16px;
    margin-left: 16px;
  }

  .cart-footer-actions {
    gap: 9px;
    border-top: 1px solid var(--soft-line);
    background: #ffffff;
    padding: 14px 16px max(16px, env(safe-area-inset-bottom));
    box-shadow: 0 -10px 28px rgba(22, 32, 51, 0.08);
  }

  .cart-checkout {
    min-height: 48px;
    border-radius: 13px;
    background: linear-gradient(135deg, #0e756d, #15988d);
  }
}

/* Compact mobile ranking controls and optically centre every single-character avatar. */
@media (max-width: 720px) {
  #rankingsView .rankings-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 14px 15px;
  }

  #rankingsView .rankings-toolbar .section-heading {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
  }

  #rankingsView .rankings-toolbar .section-heading > div {
    display: flex;
    width: 100%;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }

  #rankingsView .rankings-toolbar .section-heading h3 {
    font-size: 20px;
    line-height: 1.15;
  }

  #rankingsView .rankings-toolbar .section-heading p {
    margin: 0;
    font-size: 11px;
    white-space: nowrap;
  }

  #rankingsView .rank-tabs {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  #rankingsView .rank-tab {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    border-radius: 11px;
    padding: 0 2px;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
  }

  #queryView .employee-card > .avatar,
  #queryView .profile-header > .avatar,
  #rankingsView .ranking-item > .avatar,
  #grantView .grant-preview-avatar {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-indent: 0 !important;
  }
}

/* Logged-out welcome experience */
body.is-logged-out {
  background:
    radial-gradient(circle at 16% 16%, rgba(21, 151, 139, 0.11), transparent 28%),
    radial-gradient(circle at 88% 72%, rgba(224, 169, 71, 0.1), transparent 25%),
    #f5f8f7;
}

body.is-logged-out .app-shell {
  display: block;
  min-height: 100vh;
}

body.is-logged-out .sidebar,
body.is-logged-out .topbar,
body.is-logged-out #queryView > .two-column {
  display: none;
}

body.is-logged-out .main-panel {
  min-height: 100vh;
  padding: 0;
}

body.is-logged-out #queryView {
  min-height: 100vh;
}

body.is-logged-out .mobile-login-welcome {
  position: relative;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  flex-direction: column;
  isolation: isolate;
}

body.is-logged-out .mobile-login-welcome::before,
body.is-logged-out .mobile-login-welcome::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

body.is-logged-out .mobile-login-welcome::before {
  top: -310px;
  left: -240px;
  width: 700px;
  height: 700px;
  border: 1px solid rgba(15, 118, 110, 0.08);
  box-shadow:
    0 0 0 80px rgba(15, 118, 110, 0.025),
    0 0 0 160px rgba(15, 118, 110, 0.018);
}

body.is-logged-out .mobile-login-welcome::after {
  right: -220px;
  bottom: -350px;
  width: 680px;
  height: 680px;
  background: rgba(15, 118, 110, 0.035);
}

.welcome-site-header {
  display: flex;
  width: min(100% - 64px, 1280px);
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(30, 62, 65, 0.08);
}

.welcome-brand,
.welcome-brand-copy,
.welcome-header-meta,
.welcome-header-meta > span {
  display: flex;
  align-items: center;
}

.welcome-brand {
  gap: 12px;
}

.welcome-brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, #086b64, #15978c);
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 11px 24px rgba(9, 107, 99, 0.22);
}

.welcome-brand-copy {
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
}

.welcome-brand-copy strong {
  color: #102a2c;
  font-size: 18px;
  letter-spacing: 0.03em;
}

.welcome-brand-copy small {
  color: #829092;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.welcome-header-meta {
  gap: 22px;
}

.welcome-header-meta > span {
  gap: 8px;
  color: #687a7c;
  font-size: 12px;
  font-weight: 700;
}

.welcome-header-meta > span i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1ba497;
  box-shadow: 0 0 0 5px rgba(27, 164, 151, 0.11);
}

.welcome-header-meta button {
  min-height: 40px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #0d6f68;
  padding: 0 17px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 7px 22px rgba(32, 70, 71, 0.06);
}

.welcome-header-meta button:hover {
  border-color: rgba(15, 118, 110, 0.34);
  background: #ffffff;
  transform: translateY(-1px);
}

.welcome-content {
  display: grid;
  width: min(100% - 64px, 1280px);
  min-height: 590px;
  flex: 1;
  grid-template-columns: minmax(0, 0.9fr) minmax(480px, 1.1fr);
  align-items: center;
  gap: clamp(50px, 7vw, 110px);
  margin: 0 auto;
  padding: 54px 0 42px;
}

body.is-logged-out .mobile-login-hero {
  position: relative;
  overflow: visible;
  color: #153234;
}

body.is-logged-out .mobile-login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  padding: 8px 12px;
  color: #0f766e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  box-shadow: 0 8px 26px rgba(31, 71, 73, 0.05);
}

body.is-logged-out .mobile-login-kicker::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e0aa48;
  content: "";
}

body.is-logged-out .mobile-login-hero h2 {
  margin: 26px 0 0;
  color: #112c2f;
  font-size: clamp(42px, 4.3vw, 66px);
  font-weight: 900;
  line-height: 1.13;
  letter-spacing: -0.045em;
}

body.is-logged-out .mobile-login-hero h2 strong {
  position: relative;
  color: #0d7b72;
  font-weight: inherit;
}

body.is-logged-out .mobile-login-hero h2 strong::after {
  position: absolute;
  right: 2px;
  bottom: -7px;
  left: 2px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(27, 164, 151, 0.25), rgba(224, 170, 72, 0.22));
  content: "";
  transform: rotate(-1deg);
}

body.is-logged-out .mobile-login-hero > p {
  max-width: 520px;
  margin: 28px 0 0;
  color: #64777a;
  font-size: 16px;
  line-height: 1.85;
}

.welcome-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

body.is-logged-out .mobile-login-primary {
  display: flex;
  min-width: 215px;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #086c65, #15978b);
  color: #ffffff;
  padding: 0 10px 0 21px;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 15px 30px rgba(9, 111, 103, 0.23);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.is-logged-out .mobile-login-primary:hover {
  box-shadow: 0 18px 38px rgba(9, 111, 103, 0.28);
  transform: translateY(-2px);
}

body.is-logged-out .mobile-login-primary em {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 21px;
  font-style: normal;
}

body.is-logged-out .mobile-register-entry {
  min-height: 56px;
  border: 1px solid rgba(15, 118, 110, 0.17);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  color: #315c5d;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(32, 70, 71, 0.06);
}

body.is-logged-out .mobile-register-entry:hover {
  border-color: rgba(15, 118, 110, 0.35);
  background: #ffffff;
  color: #0f766e;
}

body.is-logged-out .mobile-login-security {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 21px;
  color: #829092;
  font-size: 11px;
}

body.is-logged-out .mobile-login-security span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #e3f4f1;
  color: #0f766e;
  font-size: 10px;
  font-weight: 900;
}

.welcome-preview {
  position: relative;
  min-height: 480px;
}

.welcome-preview::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 470px;
  height: 470px;
  border: 1px solid rgba(15, 118, 110, 0.08);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.welcome-preview-glow {
  position: absolute;
  top: 42px;
  right: 5%;
  bottom: 20px;
  left: 5%;
  border-radius: 48px;
  background:
    radial-gradient(circle at 75% 20%, rgba(242, 203, 127, 0.54), transparent 26%),
    linear-gradient(145deg, #d9efeb 0%, #ebf5f1 60%, #f2ead8 100%);
  filter: blur(1px);
  transform: rotate(-3deg);
}

.welcome-score-card,
.welcome-activity-card {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 28px 70px rgba(26, 67, 67, 0.16);
  backdrop-filter: blur(14px);
}

.welcome-score-card {
  top: 54px;
  right: 34px;
  left: 44px;
  min-height: 255px;
  border-radius: 28px;
  padding: 25px 27px;
  transform: rotate(1.2deg);
}

.welcome-score-head,
.welcome-score-main,
.welcome-progress-copy,
.welcome-activity-head,
.welcome-activity-item {
  display: flex;
  align-items: center;
}

.welcome-score-head {
  justify-content: space-between;
  gap: 18px;
}

.welcome-score-head > div {
  display: grid;
  gap: 5px;
}

.welcome-score-head > div > span {
  color: #1b3538;
  font-size: 16px;
  font-weight: 900;
}

.welcome-score-head small,
.welcome-score-main small,
.welcome-floating-badge small {
  color: #819092;
  font-size: 10px;
}

.welcome-preview-tag {
  border-radius: 999px;
  background: #e9f6f4;
  color: #0f766e;
  padding: 6px 9px;
  font-size: 9px;
  font-weight: 800;
}

.welcome-score-main {
  gap: 14px;
  margin-top: 25px;
}

.welcome-score-icon {
  display: grid;
  width: 51px;
  height: 51px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(145deg, #0b736b, #18a296);
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(14, 123, 114, 0.2);
}

.welcome-score-main > div {
  display: grid;
  gap: 1px;
}

.welcome-score-main strong {
  color: #152e31;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.welcome-score-rise {
  margin-left: auto;
  border-radius: 999px;
  background: #fff4dd;
  color: #a46512;
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 900;
}

.welcome-progress-copy {
  justify-content: space-between;
  margin-top: 24px;
  color: #718184;
  font-size: 10px;
}

.welcome-progress-copy strong {
  color: #0f766e;
}

.welcome-progress {
  height: 7px;
  overflow: hidden;
  margin-top: 8px;
  border-radius: 999px;
  background: #edf2f1;
}

.welcome-progress i {
  display: block;
  width: 80%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0e786f, #2fb2a5);
}

.welcome-activity-card {
  right: 74px;
  bottom: 40px;
  left: 5px;
  border-radius: 24px;
  padding: 20px 22px;
  transform: rotate(-1.4deg);
}

.welcome-activity-head {
  justify-content: space-between;
  margin-bottom: 11px;
}

.welcome-activity-head strong {
  color: #253d40;
  font-size: 12px;
}

.welcome-activity-head > span {
  color: #0f766e;
  font-size: 9px;
  font-weight: 800;
}

.welcome-activity-item {
  gap: 10px;
  min-height: 51px;
  border-top: 1px solid #edf1f1;
}

.welcome-activity-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 900;
}

.icon-gold {
  background: #fff2d9;
  color: #a66713;
}

.icon-teal {
  background: #e5f5f2;
  color: #0f766e;
}

.welcome-activity-item > div {
  display: grid;
  gap: 3px;
}

.welcome-activity-item > div strong {
  color: #2a4244;
  font-size: 10px;
}

.welcome-activity-item > div small {
  color: #8b9798;
  font-size: 8px;
}

.welcome-activity-item em {
  margin-left: auto;
  color: #0f766e;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.welcome-floating-badge {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  padding: 9px 12px 9px 9px;
  box-shadow: 0 16px 36px rgba(26, 67, 67, 0.14);
  backdrop-filter: blur(12px);
}

.welcome-floating-badge > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: #eef7f5;
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
}

.welcome-floating-badge > div {
  display: grid;
  gap: 2px;
}

.welcome-floating-badge strong {
  color: #2a4244;
  font-size: 10px;
}

.badge-rank {
  top: 20px;
  left: 0;
  transform: rotate(-4deg);
}

.badge-gift {
  right: 0;
  bottom: 105px;
  transform: rotate(4deg);
}

body.is-logged-out .mobile-login-benefits {
  display: grid;
  width: min(100% - 64px, 1280px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: auto auto 0;
  border-top: 1px solid rgba(30, 62, 65, 0.09);
}

body.is-logged-out .mobile-login-benefits > div {
  position: relative;
  display: grid;
  min-height: 104px;
  grid-template-columns: 42px minmax(0, 1fr);
  align-content: center;
  gap: 4px 15px;
  padding: 18px 32px;
}

body.is-logged-out .mobile-login-benefits > div + div {
  border-left: 1px solid rgba(30, 62, 65, 0.09);
}

body.is-logged-out .mobile-login-benefits span {
  display: grid;
  width: 42px;
  height: 42px;
  grid-row: 1 / 3;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(31, 71, 73, 0.07);
}

body.is-logged-out .mobile-login-benefits strong,
body.is-logged-out .mobile-login-benefits small {
  display: block;
  text-align: left;
}

body.is-logged-out .mobile-login-benefits strong {
  align-self: end;
  color: #284244;
  font-size: 13px;
}

body.is-logged-out .mobile-login-benefits small {
  align-self: start;
  color: #829092;
  font-size: 10px;
  line-height: 1.4;
}

/* Refined authentication dialog */
.auth-gate {
  background: rgba(13, 36, 38, 0.52);
  backdrop-filter: blur(10px);
}

.auth-panel {
  overflow: hidden;
  width: min(100%, 480px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 30px 90px rgba(10, 35, 37, 0.28);
}

.auth-panel::after {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(20, 151, 139, 0.08);
  content: "";
  pointer-events: none;
}

.auth-close {
  z-index: 2;
  border: 0;
  border-radius: 50%;
  background: #f2f6f5;
}

.auth-panel .auth-brand .brand-mark {
  border-radius: 14px;
  background: linear-gradient(145deg, #086b64, #15978c);
  box-shadow: 0 10px 22px rgba(9, 107, 99, 0.2);
}

.auth-tabs {
  gap: 4px;
  border-radius: 14px;
  background: #f1f5f4;
  padding: 4px;
}

.auth-tab {
  border: 0;
  border-radius: 11px;
  background: transparent;
}

.auth-tab.active {
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(27, 61, 63, 0.08);
}

.auth-form input {
  min-height: 48px;
  border-color: transparent;
  border-radius: 13px;
  background: #f3f6f6;
}

.auth-form input:focus {
  border-color: #62b7af;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.09);
}

.auth-submit {
  min-height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, #086c65, #15978b);
  box-shadow: 0 11px 24px rgba(9, 111, 103, 0.2);
}

@media (max-width: 1080px) {
  .welcome-content {
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    gap: 30px;
  }

  .welcome-score-card {
    right: 22px;
    left: 28px;
  }

  .welcome-activity-card {
    right: 48px;
  }
}

@media (max-width: 860px) {
  .welcome-content {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 44px;
  }

  body.is-logged-out .mobile-login-hero {
    max-width: 640px;
    text-align: center;
    margin: 0 auto;
  }

  body.is-logged-out .mobile-login-hero > p,
  .welcome-actions,
  body.is-logged-out .mobile-login-security {
    justify-content: center;
    margin-right: auto;
    margin-left: auto;
  }

  .welcome-preview {
    width: min(100%, 600px);
    margin: 0 auto;
  }
}

@media (max-width: 720px) {
  body.is-logged-out .main-panel {
    padding: 0;
  }

  body.is-logged-out .mobile-login-welcome {
    display: flex;
    max-width: none;
    margin: 0;
    padding-bottom: 18px;
  }

  .welcome-site-header {
    width: calc(100% - 36px);
    min-height: 72px;
  }

  .welcome-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: 19px;
  }

  .welcome-brand-copy strong {
    font-size: 16px;
  }

  .welcome-brand-copy small,
  .welcome-header-meta > span {
    display: none;
  }

  .welcome-header-meta {
    gap: 0;
  }

  .welcome-header-meta button {
    min-height: 36px;
    border-radius: 11px;
    padding: 0 13px;
    font-size: 12px;
  }

  .welcome-content {
    display: block;
    width: calc(100% - 28px);
    min-height: 0;
    padding: 18px 0 0;
  }

  body.is-logged-out .mobile-login-hero {
    overflow: hidden;
    max-width: none;
    border-radius: 26px;
    background:
      radial-gradient(circle at 90% 8%, rgba(255, 255, 255, 0.2), transparent 23%),
      linear-gradient(145deg, #075f59 0%, #0f8178 56%, #1ca89b 100%);
    color: #ffffff;
    padding: 27px 21px 22px;
    text-align: left;
    box-shadow: 0 22px 50px rgba(9, 95, 88, 0.22);
  }

  body.is-logged-out .mobile-login-hero::after {
    position: absolute;
    right: -70px;
    bottom: -100px;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    content: "";
  }

  body.is-logged-out .mobile-login-kicker {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.82);
    padding: 7px 10px;
    font-size: 8px;
  }

  body.is-logged-out .mobile-login-hero h2 {
    margin-top: 44px;
    color: #ffffff;
    font-size: clamp(30px, 9.5vw, 40px);
    line-height: 1.22;
    letter-spacing: -0.035em;
  }

  body.is-logged-out .mobile-login-hero h2 strong {
    color: #c9fff8;
  }

  body.is-logged-out .mobile-login-hero h2 strong::after {
    display: none;
  }

  body.is-logged-out .mobile-login-hero > p {
    width: 92%;
    margin: 15px 0 0;
    color: rgba(255, 255, 255, 0.73);
    font-size: 13px;
    line-height: 1.7;
  }

  .welcome-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin: 23px 0 0;
  }

  body.is-logged-out .mobile-login-primary {
    width: 100%;
    min-height: 52px;
    border-radius: 15px;
    background: #ffffff;
    color: #086c65;
    box-shadow: 0 12px 28px rgba(2, 55, 51, 0.2);
  }

  body.is-logged-out .mobile-login-primary em {
    background: #e4f4f1;
  }

  body.is-logged-out .mobile-register-entry {
    min-height: 40px;
    border-color: transparent;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    padding: 0;
    box-shadow: none;
  }

  body.is-logged-out .mobile-login-security {
    justify-content: flex-start;
    margin: 13px 0 0;
    color: rgba(255, 255, 255, 0.62);
  }

  body.is-logged-out .mobile-login-security span {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
  }

  .welcome-preview {
    display: none;
  }

  body.is-logged-out .mobile-login-benefits {
    width: calc(100% - 28px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 13px;
    border-top: 0;
  }

  body.is-logged-out .mobile-login-benefits > div {
    min-height: 126px;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 6px;
    border: 1px solid rgba(216, 226, 232, 0.78);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.84);
    padding: 12px 9px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(22, 32, 51, 0.05);
  }

  body.is-logged-out .mobile-login-benefits > div + div {
    border-left: 1px solid rgba(216, 226, 232, 0.78);
  }

  body.is-logged-out .mobile-login-benefits span {
    width: 32px;
    height: 32px;
    grid-row: auto;
    margin: 0 auto 2px;
    border-radius: 10px;
    font-size: 9px;
  }

  body.is-logged-out .mobile-login-benefits strong,
  body.is-logged-out .mobile-login-benefits small {
    text-align: center;
  }

  body.is-logged-out .mobile-login-benefits strong {
    align-self: auto;
    font-size: 11px;
  }

  body.is-logged-out .mobile-login-benefits small {
    font-size: 8px;
  }

  .auth-panel {
    border-radius: 26px 26px 0 0;
    padding: 30px 20px max(24px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 390px) {
  .welcome-brand-copy small {
    display: none;
  }

  body.is-logged-out .mobile-login-benefits small {
    display: none;
  }

  body.is-logged-out .mobile-login-benefits > div {
    min-height: 92px;
  }
}

/* Desktop rewards center v2 */
@media (min-width: 1081px) {
  #rewardsView {
    position: relative;
  }

  #rewardsView .mall-toolbar {
    position: relative;
    min-height: 148px;
    grid-template-columns: minmax(300px, 0.82fr) minmax(600px, 1.18fr);
    gap: clamp(28px, 4vw, 64px);
    overflow: hidden;
    border: 0;
    border-radius: 24px;
    background:
      radial-gradient(circle at 88% 12%, rgba(129, 228, 211, 0.28), transparent 24%),
      radial-gradient(circle at 12% 105%, rgba(3, 61, 58, 0.7), transparent 38%),
      linear-gradient(125deg, #064f4b 0%, #0a7068 52%, #1da093 100%);
    padding: 28px 30px;
    box-shadow: 0 22px 46px rgba(7, 86, 81, 0.2);
  }

  #rewardsView .mall-toolbar::before,
  #rewardsView .mall-toolbar::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: transparent;
    content: "";
    pointer-events: none;
  }

  #rewardsView .mall-toolbar::before {
    top: -150px;
    left: 37%;
    width: 320px;
    height: 320px;
    box-shadow: 0 0 0 48px rgba(255, 255, 255, 0.025);
  }

  #rewardsView .mall-toolbar::after {
    top: auto;
    right: -90px;
    bottom: -175px;
    width: 330px;
    height: 330px;
    background: rgba(255, 255, 255, 0.025);
  }

  #rewardsView .mall-title-block {
    gap: 17px;
  }

  #rewardsView .mall-title-mark {
    width: 66px;
    height: 66px;
    flex-basis: 66px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 21px;
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      0 14px 28px rgba(1, 46, 43, 0.18);
    backdrop-filter: blur(10px);
  }

  #rewardsView .mall-title-mark svg {
    width: 32px;
    height: 32px;
  }

  #rewardsView .mall-title-block h3 {
    color: #ffffff;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.035em;
  }

  #rewardsView .mall-title-block p {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 13px;
  }

  #rewardsView .mall-title-block p i {
    background: rgba(255, 255, 255, 0.45);
  }

  #rewardsView .mall-userbar {
    grid-template-columns: minmax(250px, 1fr) 132px 174px;
    gap: 12px;
  }

  #rewardsView .mall-employee-control,
  #rewardsView .reward-balance,
  #rewardsView .mall-cart-trigger {
    min-height: 72px;
    border: 1px solid rgba(255, 255, 255, 0.23);
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(2, 52, 49, 0.16);
    backdrop-filter: blur(14px);
  }

  #rewardsView .mall-employee-control {
    background: rgba(255, 255, 255, 0.94);
  }

  #rewardsView .mall-employee-control > span {
    margin-left: 17px;
    padding-right: 15px;
    color: #6b7d7c;
    font-size: 11px;
    letter-spacing: 0.04em;
  }

  #rewardsView .mall-employee-control select {
    height: 70px;
    color: #203d3e;
    font-size: 14px;
  }

  #rewardsView .reward-balance {
    border-color: rgba(255, 230, 180, 0.6);
    background: linear-gradient(145deg, rgba(255, 246, 222, 0.98), rgba(255, 255, 255, 0.94));
    padding: 10px 16px;
  }

  #rewardsView .reward-balance small {
    color: #8c7043;
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  #rewardsView .reward-balance strong {
    margin-top: 4px;
    color: #9b6412;
    font-size: 24px;
  }

  #rewardsView .mall-cart-trigger {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 11px;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.94);
    padding: 9px 14px 9px 9px;
    color: #183638;
  }

  #rewardsView .mall-cart-trigger:hover {
    border-color: #ffffff;
    background: #ffffff;
    box-shadow: 0 18px 34px rgba(2, 52, 49, 0.2);
    transform: translateY(-2px);
  }

  #rewardsView .mall-cart-trigger-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(145deg, #0a7069, #1ba095);
  }

  #rewardsView .mall-cart-trigger-copy small {
    color: #82908f;
    font-size: 10px;
  }

  #rewardsView .mall-cart-trigger-copy strong {
    font-size: 14px;
  }

  #rewardsView .mall-cart-count {
    min-width: 26px;
    height: 26px;
    background: #e4f3f0;
    color: #0f766e;
  }

  #rewardsView .mall-cart-count.has-items {
    background: #c33152;
    color: #ffffff;
  }

  #rewardsView .mall-filters {
    display: grid;
    grid-template-columns: minmax(280px, 1.45fr) minmax(170px, 0.7fr) minmax(180px, 0.75fr) auto;
    gap: 12px;
    border: 1px solid #e1eae8;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    padding: 14px 16px;
    box-shadow: 0 10px 28px rgba(28, 67, 66, 0.07);
  }

  #rewardsView .mall-filters .field {
    min-width: 0;
  }

  #rewardsView .mall-filters .field > span {
    color: #657775;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
  }

  #rewardsView .mall-filters input,
  #rewardsView .mall-filters select {
    min-height: 48px;
    border: 1px solid transparent;
    border-radius: 13px;
    background-color: #f2f6f5;
    color: #294344;
  }

  #rewardsView .mall-filters input:focus,
  #rewardsView .mall-filters select:focus {
    border-color: #65b9b0;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
  }

  #rewardsView .mall-filters .form-actions {
    display: flex;
    align-items: end;
  }

  #rewardsView .mall-filters .form-actions button {
    min-height: 48px;
    border-color: transparent;
    border-radius: 13px;
    background: #eaf5f3;
    color: #0f766e;
    padding: 0 18px;
  }

  #rewardsView .reward-grid {
    gap: 20px;
  }

  #rewardsView .reward-card.mall-card {
    position: relative;
    gap: 12px;
    overflow: hidden;
    border: 1px solid #e1e9e7;
    border-radius: 22px;
    background: #ffffff;
    padding: 12px;
    box-shadow: 0 12px 32px rgba(27, 63, 63, 0.08);
  }

  #rewardsView .reward-card.mall-card:hover {
    border-color: #a9d1cc;
    box-shadow: 0 22px 46px rgba(24, 73, 69, 0.14);
    transform: translateY(-5px);
  }

  #rewardsView .mall-card .reward-visual {
    position: relative;
    min-height: 152px;
    isolation: isolate;
    overflow: hidden;
    border-radius: 18px;
    padding: 18px;
  }

  #rewardsView .mall-card .reward-visual::before,
  #rewardsView .mall-card .reward-visual::after {
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    content: "";
  }

  #rewardsView .mall-card .reward-visual::before {
    top: -82px;
    right: -36px;
    width: 210px;
    height: 210px;
  }

  #rewardsView .mall-card .reward-visual::after {
    right: 90px;
    bottom: -72px;
    width: 145px;
    height: 145px;
  }

  #rewardsView .reward-visual-letter {
    position: relative;
    z-index: 1;
    font-size: 54px;
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.17);
  }

  #rewardsView .reward-visual-copy {
    gap: 5px;
  }

  #rewardsView .reward-visual-copy strong {
    font-size: 15px;
  }

  #rewardsView .reward-topline {
    padding: 2px 2px 0;
  }

  #rewardsView .reward-badge {
    border-radius: 999px;
    background: #fff2d8;
    color: #9b6412;
    padding: 6px 10px;
    font-size: 10px;
  }

  #rewardsView .subtle-badge {
    background: #f0f4f3;
    color: #657775;
  }

  #rewardsView .reward-info {
    padding: 0 3px;
  }

  #rewardsView .reward-name {
    color: #173537;
    font-size: 19px;
    font-weight: 900;
  }

  #rewardsView .reward-description {
    min-height: 40px;
    margin-top: 6px;
    color: #718180;
    font-size: 12px;
    line-height: 1.6;
  }

  #rewardsView .reward-card-footer {
    border-top: 1px solid #edf1f0;
    padding: 13px 3px 0;
  }

  #rewardsView .reward-cost {
    color: #173537;
    font-size: 31px;
    letter-spacing: -0.035em;
  }

  #rewardsView .reward-cost small {
    color: #8a9695;
    font-size: 10px;
  }

  #rewardsView .reward-stock {
    border-radius: 999px;
    background: #f1f5f4;
    padding: 6px 9px;
    font-size: 10px;
  }

  #rewardsView .reward-actions {
    gap: 9px;
    padding-top: 2px;
  }

  #rewardsView .reward-actions button {
    min-height: 46px;
    border-radius: 13px;
    font-size: 12px;
    font-weight: 800;
  }

  #rewardsView .reward-actions .secondary-button {
    border-color: #dce7e5;
    background: #f7faf9;
    color: #496463;
  }

  #rewardsView .reward-actions .primary-button {
    border: 0;
    background: linear-gradient(135deg, #0a7069, #15978c);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.17);
  }

  #rewardsView .mall-cart-drawer {
    width: min(500px, calc(100vw - 32px));
    background: #f4f7f6;
    box-shadow: -30px 0 70px rgba(9, 39, 40, 0.25);
  }

  #rewardsView .mall-cart-panel {
    background: #f2f6f5;
  }

  #rewardsView .cart-header {
    border-bottom: 0;
    background:
      radial-gradient(circle at 90% 0, rgba(104, 220, 206, 0.24), transparent 130px),
      linear-gradient(135deg, #e9f6f3, #ffffff);
    padding: 24px;
  }

  #rewardsView .cart-icon {
    border-radius: 14px;
    background: linear-gradient(145deg, #0a7069, #1ba095);
    color: #ffffff;
    box-shadow: 0 9px 20px rgba(15, 118, 110, 0.17);
  }

  #rewardsView .cart-list {
    gap: 13px;
    padding: 18px 20px;
  }

  #rewardsView .cart-item {
    border: 0;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(27, 63, 63, 0.075);
  }

  #rewardsView .cart-summary {
    margin: 0 20px;
    border: 0;
    border-radius: 17px;
    background: #ffffff;
    padding: 16px;
  }

  #rewardsView .cart-footer-actions {
    gap: 10px;
    border-top: 1px solid #e1eae8;
    background: #ffffff;
    padding: 16px 20px;
    box-shadow: 0 -12px 30px rgba(27, 63, 63, 0.08);
  }

  #rewardsView .cart-checkout {
    border-radius: 14px;
    background: linear-gradient(135deg, #0a7069, #15978c);
  }
}

@media (min-width: 1081px) and (max-width: 1320px) {
  #rewardsView .reward-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #rewardsView .mall-toolbar {
    grid-template-columns: 1fr;
  }

  #rewardsView .mall-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #rewardsView .mall-filters .field:first-child,
  #rewardsView .mall-filters .form-actions {
    grid-column: 1 / -1;
  }

  #rewardsView .mall-filters .form-actions button {
    width: 100%;
  }
}

@media (min-width: 1321px) and (max-width: 1699px) {
  #rewardsView .reward-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1700px) {
  #rewardsView .reward-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Mobile application visual system v3 */
@media (max-width: 720px) {
  body:not(.is-logged-out) {
    background:
      radial-gradient(circle at 100% 0, rgba(34, 158, 145, 0.09), transparent 260px),
      linear-gradient(180deg, #edf4f2 0%, #f5f7f8 38%, #eef3f2 100%);
  }

  body:not(.is-logged-out) .app-shell {
    min-height: 100svh;
  }

  body:not(.is-logged-out) .sidebar {
    top: 0;
    border: 0;
    border-bottom: 1px solid rgba(203, 221, 218, 0.8);
    background: rgba(247, 251, 250, 0.94);
    padding: 11px 12px 9px;
    box-shadow: 0 10px 30px rgba(24, 65, 63, 0.09);
    backdrop-filter: blur(18px);
  }

  body:not(.is-logged-out) .brand {
    gap: 10px;
    padding: 0 2px;
  }

  body:not(.is-logged-out) .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: linear-gradient(145deg, #086c65, #18a095);
    font-size: 19px;
    box-shadow: 0 8px 20px rgba(9, 107, 99, 0.2);
  }

  body:not(.is-logged-out) .brand-copy h1 {
    color: #173537;
    font-size: 16px;
    letter-spacing: 0.02em;
  }

  body:not(.is-logged-out) .brand-copy p {
    display: block;
    margin-top: 2px;
    color: #829190;
    font-size: 9px;
  }

  body:not(.is-logged-out) .nav-tabs {
    gap: 8px;
    margin-top: 10px;
    padding: 0 1px 3px;
  }

  body:not(.is-logged-out) .nav-tab {
    min-width: 96px;
    min-height: 44px;
    gap: 7px;
    border: 1px solid rgba(220, 230, 229, 0.9);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.82);
    color: #5b6e6f;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 5px 14px rgba(25, 66, 65, 0.045);
  }

  body:not(.is-logged-out) .nav-tab.active,
  body:not(.is-logged-out) .nav-tab:hover {
    border-color: transparent;
    background: linear-gradient(135deg, #0a7069, #15978c);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(11, 116, 107, 0.2);
  }

  body:not(.is-logged-out) .nav-tab:active {
    transform: scale(0.97);
  }

  body:not(.is-logged-out) .nav-dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    opacity: 0.62;
  }

  body:not(.is-logged-out) .nav-tab.active .nav-dot {
    background: #ccfff7;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
    opacity: 1;
  }

  body:not(.is-logged-out) .main-panel {
    padding: 13px 11px 34px;
  }

  body:not(.is-logged-out) .topbar {
    display: grid;
    gap: 10px;
    margin: 0 0 15px;
    border: 0;
    padding: 0;
  }

  body:not(.is-logged-out) .title-block {
    position: relative;
    overflow: hidden;
    min-height: 83px;
    align-content: center;
    border-radius: 23px;
    background:
      radial-gradient(circle at 90% 5%, rgba(147, 236, 223, 0.28), transparent 34%),
      linear-gradient(135deg, #075c57, #0f7c73 58%, #23a294);
    padding: 17px 19px;
    box-shadow: 0 14px 32px rgba(7, 91, 85, 0.18);
  }

  body:not(.is-logged-out) .title-block::after {
    position: absolute;
    top: -48px;
    right: -24px;
    width: 130px;
    height: 130px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    content: "";
    box-shadow: 0 0 0 24px rgba(255, 255, 255, 0.035);
  }

  body:not(.is-logged-out) .title-block .eyebrow {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.6);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.13em;
  }

  body:not(.is-logged-out) .title-block h2 {
    position: relative;
    z-index: 1;
    margin: 5px 0 0;
    color: #ffffff;
    font-size: 24px;
    letter-spacing: -0.03em;
  }

  body:not(.is-logged-out) .topbar-controls {
    display: grid;
    width: 100%;
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    border: 1px solid rgba(223, 232, 231, 0.92);
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.94);
    padding: 10px;
    box-shadow: 0 9px 24px rgba(27, 63, 64, 0.065);
  }

  body:not(.is-logged-out) .topbar-controls .topbar-employee-picker {
    display: grid;
    min-width: 0;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 8px;
    padding: 0;
  }

  body:not(.is-logged-out) .topbar-controls .topbar-employee-picker > span {
    color: #738382;
    font-size: 10px;
    font-weight: 800;
  }

  body:not(.is-logged-out) .topbar-controls .topbar-employee-picker select {
    min-width: 0;
    min-height: 43px;
    border: 0;
    border-radius: 12px;
    background-color: #f2f6f5;
    color: #253f41;
    font-size: 13px;
    font-weight: 700;
  }

  body:not(.is-logged-out) .topbar-controls .user-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  body:not(.is-logged-out) .current-user {
    min-width: 0;
    min-height: 44px;
    border-radius: 13px;
    background: linear-gradient(135deg, #e8f6f3, #f3faf8);
    padding: 6px 11px 6px 6px;
  }

  body:not(.is-logged-out) .user-avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    background: linear-gradient(145deg, #0c736b, #1aa095);
  }

  body:not(.is-logged-out) .user-copy strong {
    max-width: 160px;
    color: #183638;
    font-size: 12px;
  }

  body:not(.is-logged-out) .logout-button {
    min-height: 44px;
    border: 0;
    border-radius: 13px;
    background: #fff1f3;
    color: #b42345;
    padding: 0 14px;
    font-size: 11px;
  }

  body:not(.is-logged-out) .view.active {
    display: block;
    animation: mobile-view-in 0.24s ease-out;
  }

  body:not(.is-logged-out) .panel {
    border: 1px solid rgba(225, 233, 232, 0.82);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    padding: 15px;
    box-shadow: 0 12px 30px rgba(29, 62, 64, 0.07);
  }

  body:not(.is-logged-out) .view.active > * + * {
    margin-top: 13px;
  }

  body:not(.is-logged-out) .field > span,
  body:not(.is-logged-out) fieldset.field > legend {
    color: #647675;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.03em;
  }

  body:not(.is-logged-out) input,
  body:not(.is-logged-out) select,
  body:not(.is-logged-out) textarea {
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 13px;
    background-color: #f2f6f5;
    color: #203b3d;
  }

  body:not(.is-logged-out) input:focus,
  body:not(.is-logged-out) select:focus,
  body:not(.is-logged-out) textarea:focus {
    border-color: #65b9b0;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.09);
  }

  body:not(.is-logged-out) .primary-button {
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, #0a716a, #15978c);
    box-shadow: 0 8px 18px rgba(12, 119, 110, 0.17);
  }

  body:not(.is-logged-out) .secondary-button,
  body:not(.is-logged-out) .danger-button {
    border-radius: 13px;
  }

  body:not(.is-logged-out) button:active {
    transform: scale(0.98);
  }

  /* Employee query */
  body:not(.is-logged-out) #queryView .two-column {
    gap: 13px;
  }

  body:not(.is-logged-out) #queryView .two-column > .panel:first-child {
    border-radius: 22px;
    background:
      radial-gradient(circle at 100% 0, rgba(55, 176, 163, 0.14), transparent 150px),
      #ffffff;
    padding: 17px;
  }

  body:not(.is-logged-out) #queryView .search-field input {
    border-radius: 15px;
    background: #f1f6f5;
  }

  body:not(.is-logged-out) #queryView .employee-card {
    min-height: 74px;
    border-color: #e4ecea;
    border-radius: 17px;
    background: #fbfdfc;
    box-shadow: 0 5px 16px rgba(27, 65, 64, 0.045);
  }

  body:not(.is-logged-out) #queryView .employee-card.active {
    border-color: transparent;
    background: linear-gradient(135deg, #e4f5f1, #f7fbfa);
    box-shadow:
      inset 4px 0 0 #0f766e,
      0 7px 20px rgba(15, 118, 110, 0.09);
  }

  body:not(.is-logged-out) #queryView .profile-panel {
    border-radius: 23px;
    padding-bottom: 17px;
  }

  body:not(.is-logged-out) #queryView .profile-header {
    border-radius: 22px 22px 0 0;
    background:
      radial-gradient(circle at 92% 0, rgba(149, 239, 226, 0.28), transparent 130px),
      linear-gradient(135deg, #075c57, #0f7d74 58%, #21a194);
    padding: 20px 17px;
  }

  body:not(.is-logged-out) #queryView .metric-grid {
    gap: 7px;
  }

  body:not(.is-logged-out) #queryView .metric {
    min-height: 75px;
    box-sizing: border-box;
    border-radius: 15px;
    padding: 12px 8px;
  }

  body:not(.is-logged-out) #queryView .metric span {
    font-size: 9px;
  }

  body:not(.is-logged-out) #queryView .metric strong {
    margin-top: 7px;
    font-size: 20px;
  }

  body:not(.is-logged-out) #queryView .profile-rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body:not(.is-logged-out) #queryView .profile-rank-item {
    min-height: 74px;
    box-sizing: border-box;
    border-radius: 15px;
    background: #f5f8f7;
    padding: 12px;
  }

  body:not(.is-logged-out) #queryView .progress-block {
    border-radius: 15px;
    background: linear-gradient(135deg, #f2f7f6, #f8faf9);
  }

  body:not(.is-logged-out) #queryView .history-item {
    min-height: 62px;
    border-radius: 15px;
    background: #f5f8f7;
    padding: 12px;
  }

  /* Grant workbench */
  body:not(.is-logged-out) #grantView .grant-panel,
  body:not(.is-logged-out) #grantView .grant-preview-panel {
    border-radius: 23px;
    box-shadow: 0 12px 30px rgba(29, 62, 64, 0.07);
  }

  body:not(.is-logged-out) #grantView .grant-heading {
    min-height: 88px;
    background:
      radial-gradient(circle at 96% 0, rgba(53, 183, 169, 0.2), transparent 135px),
      linear-gradient(145deg, #ffffff, #edf8f6);
    padding: 18px;
  }

  body:not(.is-logged-out) #grantView .grant-heading-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: linear-gradient(145deg, #0b7169, #1da093);
    color: #ffffff;
    box-shadow: 0 9px 20px rgba(15, 118, 110, 0.18);
  }

  body:not(.is-logged-out) #grantView .grant-form {
    gap: 11px;
    background: #f1f5f4;
    padding: 11px;
  }

  body:not(.is-logged-out) #grantView .grant-form-section {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 15px;
  }

  body:not(.is-logged-out) #grantView .grant-form-section::after {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, #0f766e, #68c9bf);
    content: "";
  }

  body:not(.is-logged-out) #grantView .grant-section-heading > span {
    width: 37px;
    height: 37px;
    border-radius: 12px;
  }

  body:not(.is-logged-out) #grantView .grant-preview-heading {
    min-height: 82px;
    background:
      radial-gradient(circle at 94% 0, rgba(142, 239, 225, 0.3), transparent 115px),
      linear-gradient(135deg, #075d58, #108076 60%, #20a093);
  }

  body:not(.is-logged-out) #grantView .grant-delta-card {
    border-radius: 16px;
  }

  body:not(.is-logged-out) #grantView .grant-process-list > div {
    border-radius: 14px;
    background: #f4f8f7;
    padding: 10px;
  }

  body:not(.is-logged-out) #grantView .grant-preview-actions {
    gap: 9px;
    background: #ffffff;
    padding: 13px;
  }

  /* Rules */
  body:not(.is-logged-out) #rulesView .rules-toolbar {
    border-radius: 23px;
    background:
      radial-gradient(circle at 95% 0, rgba(64, 186, 173, 0.18), transparent 145px),
      linear-gradient(145deg, #ffffff, #edf8f6);
    padding: 18px;
  }

  body:not(.is-logged-out) #rulesView .rule-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  body:not(.is-logged-out) #rulesView .rule-summary-item {
    min-height: 70px;
    box-sizing: border-box;
    border-radius: 15px;
    padding: 11px 7px;
  }

  body:not(.is-logged-out) #rulesView .rule-summary-item strong {
    font-size: 20px;
  }

  body:not(.is-logged-out) #rulesView .rules-filters,
  body:not(.is-logged-out) #rewardsView .mall-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    border-radius: 21px;
    padding: 14px;
  }

  body:not(.is-logged-out) #rulesView .rules-filters .field:first-child,
  body:not(.is-logged-out) #rewardsView .mall-filters .field:first-child,
  body:not(.is-logged-out) #rulesView .rules-filters .form-actions,
  body:not(.is-logged-out) #rewardsView .mall-filters .form-actions {
    grid-column: 1 / -1;
  }

  body:not(.is-logged-out) #rulesView .rule-card {
    border-radius: 21px;
    background:
      radial-gradient(circle at 100% 0, rgba(42, 164, 151, 0.08), transparent 120px),
      #ffffff;
    padding: 18px;
    box-shadow: 0 11px 28px rgba(29, 62, 64, 0.075);
  }

  body:not(.is-logged-out) #rulesView .rule-card::before {
    height: 5px;
    background: linear-gradient(90deg, #0b7169, #55c2b7, #e3b760);
  }

  body:not(.is-logged-out) #rulesView .rule-card-topline strong {
    color: #0d756d;
    font-size: 27px;
    letter-spacing: -0.03em;
  }

  body:not(.is-logged-out) #rulesView .rule-detail-list {
    border-radius: 15px;
    background: #f3f7f6;
  }

  /* Mall */
  body:not(.is-logged-out) #rewardsView .mall-toolbar {
    border-radius: 23px;
    background:
      radial-gradient(circle at 96% 0, rgba(244, 193, 93, 0.22), transparent 145px),
      linear-gradient(145deg, #ffffff, #eef8f6);
    padding: 18px;
  }

  body:not(.is-logged-out) #rewardsView .mall-title-mark {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 16px;
    background: linear-gradient(145deg, #0a7069, #1ba095);
    box-shadow: 0 9px 20px rgba(15, 118, 110, 0.18);
  }

  body:not(.is-logged-out) #rewardsView .mall-userbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  body:not(.is-logged-out) #rewardsView .mall-employee-control {
    grid-column: 1 / -1;
    border: 1px solid #e4ecea;
    border-radius: 15px;
    background: #ffffff;
  }

  body:not(.is-logged-out) #rewardsView .reward-balance,
  body:not(.is-logged-out) #rewardsView .mall-cart-trigger {
    min-height: 59px;
    border-radius: 15px;
  }

  body:not(.is-logged-out) #rewardsView .reward-balance {
    background: linear-gradient(145deg, #fff7e7, #ffffff);
  }

  body:not(.is-logged-out) #rewardsView .mall-cart-trigger {
    background: linear-gradient(135deg, #0a7069, #15978c);
    box-shadow: 0 9px 20px rgba(15, 118, 110, 0.18);
  }

  body:not(.is-logged-out) #rewardsView .mall-products-panel {
    border: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
  }

  body:not(.is-logged-out) #rewardsView .reward-card.mall-card {
    overflow: hidden;
    border: 1px solid rgba(226, 234, 232, 0.88);
    border-radius: 22px;
    background: #ffffff;
    padding: 12px;
    box-shadow: 0 12px 30px rgba(29, 62, 64, 0.08);
  }

  body:not(.is-logged-out) #rewardsView .mall-card .reward-visual {
    min-height: 145px;
    border-radius: 18px;
  }

  body:not(.is-logged-out) #rewardsView .reward-name {
    font-size: 18px;
  }

  body:not(.is-logged-out) #rewardsView .reward-actions button {
    min-height: 47px;
    border-radius: 13px;
  }

  /* Rankings */
  body:not(.is-logged-out) #rankingsView .rankings-toolbar {
    border-radius: 23px;
    background:
      radial-gradient(circle at 100% 0, rgba(243, 187, 79, 0.2), transparent 145px),
      linear-gradient(145deg, #ffffff, #f6f7f2);
    padding: 18px;
  }

  body:not(.is-logged-out) #rankingsView .rank-tabs {
    gap: 7px;
    border-radius: 15px;
    background: #eef3f2;
    padding: 5px;
  }

  body:not(.is-logged-out) #rankingsView .rank-tab {
    min-height: 39px;
    border-radius: 11px;
    background: transparent;
    font-size: 11px;
  }

  body:not(.is-logged-out) #rankingsView .rank-tab.active {
    background: #ffffff;
    color: #0f766e;
    box-shadow: 0 6px 16px rgba(27, 65, 64, 0.09);
  }

  body:not(.is-logged-out) #rankingsView .ranking-list-column,
  body:not(.is-logged-out) #rankingsView .ranking-summary-panel {
    border-radius: 23px;
  }

  body:not(.is-logged-out) #rankingsView .ranking-item {
    border-color: #e4ecea;
    border-radius: 17px;
    background: #fbfdfc;
    box-shadow: 0 5px 16px rgba(27, 65, 64, 0.045);
  }

  body:not(.is-logged-out) #rankingsView .ranking-item:nth-child(1) {
    border-color: #ead6a7;
    background: linear-gradient(135deg, #fff8e7, #ffffff);
  }

  body:not(.is-logged-out) #rankingsView .ranking-item:nth-child(2) {
    border-color: #dce4e7;
    background: linear-gradient(135deg, #f2f6f7, #ffffff);
  }

  body:not(.is-logged-out) #rankingsView .ranking-item:nth-child(3) {
    border-color: #ead7c6;
    background: linear-gradient(135deg, #fff3ea, #ffffff);
  }

  body:not(.is-logged-out) #rankingsView .ranking-item.current {
    border-color: #62b7ae;
    background: linear-gradient(135deg, #e4f5f1, #f8fbfa);
  }

  body:not(.is-logged-out) #rankingsView .ranking-summary-header {
    min-height: 86px;
    background:
      radial-gradient(circle at 92% 0, rgba(146, 239, 225, 0.3), transparent 120px),
      linear-gradient(135deg, #075d58, #0f7e75 58%, #20a093);
  }

  body:not(.is-logged-out) #rankingsView .ranking-feature-card,
  body:not(.is-logged-out) #rankingsView .ranking-mini-stats > div,
  body:not(.is-logged-out) #rankingsView .department-ranking-item {
    border-radius: 15px;
    background: #f4f8f7;
  }

  /* Records and accounts */
  body:not(.is-logged-out) #recordsView > .panel:first-child,
  body:not(.is-logged-out) #accountsView > .panel:first-child {
    border-radius: 23px;
    padding: 15px;
  }

  body:not(.is-logged-out) #recordsView .records-toolbar,
  body:not(.is-logged-out) #accountsView > .panel:first-child .section-heading {
    margin: -15px -15px 15px;
    border-radius: 23px 23px 0 0;
    padding: 18px;
  }

  body:not(.is-logged-out) #recordsView .records-toolbar {
    background:
      radial-gradient(circle at 98% 0, rgba(49, 178, 165, 0.18), transparent 135px),
      linear-gradient(145deg, #ffffff, #edf8f6);
  }

  body:not(.is-logged-out) #accountsView > .panel:first-child .section-heading {
    background:
      radial-gradient(circle at 98% 0, rgba(91, 126, 217, 0.17), transparent 135px),
      linear-gradient(145deg, #ffffff, #f0f4ff);
  }

  body:not(.is-logged-out) #recordsView .records-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  body:not(.is-logged-out) #recordsView .record-actions {
    grid-column: 1 / -1;
    gap: 8px;
  }

  body:not(.is-logged-out) #recordsTable,
  body:not(.is-logged-out) #accountsTable {
    gap: 11px;
  }

  body:not(.is-logged-out) #recordsTable tr,
  body:not(.is-logged-out) #accountsTable tr {
    border: 1px solid #e3ebe9;
    border-radius: 18px;
    background: #ffffff;
    padding: 12px 9px 9px;
    box-shadow: 0 8px 22px rgba(29, 62, 64, 0.07);
  }

  body:not(.is-logged-out) #recordsTable tr::before,
  body:not(.is-logged-out) #accountsTable tr::before {
    height: 4px;
    background: linear-gradient(90deg, #0d756d, #5bc4b9, #dfb461);
  }

  body:not(.is-logged-out) #recordsTable td,
  body:not(.is-logged-out) #accountsTable td {
    border-radius: 11px;
  }

  body:not(.is-logged-out) #recordsTable td:first-child,
  body:not(.is-logged-out) #recordsTable td:nth-child(5),
  body:not(.is-logged-out) #accountsTable td:nth-child(2),
  body:not(.is-logged-out) #accountsTable td:last-child {
    background: #f3f7f6;
  }

  body:not(.is-logged-out) #accountsTable .account-actions button {
    min-height: 41px;
    border-radius: 11px;
  }

  body:not(.is-logged-out) #recordsView > .pagination-panel,
  body:not(.is-logged-out) #accountsView > .pagination-panel,
  body:not(.is-logged-out) #rankingsView .ranking-pagination {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    padding: 12px;
    box-shadow: 0 8px 22px rgba(29, 62, 64, 0.065);
  }

  body:not(.is-logged-out) .pagination-button,
  body:not(.is-logged-out) .pagination-page {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  body:not(.is-logged-out) .pagination-page {
    background: linear-gradient(135deg, #0a716a, #15978c);
  }

  body:not(.is-logged-out) .toast {
    right: 14px;
    bottom: max(16px, env(safe-area-inset-bottom));
    left: 14px;
    border-radius: 15px;
    text-align: center;
  }
}

@keyframes mobile-view-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.is-logged-out) .view.active {
    animation: none;
  }
}

@media (max-width: 390px) {
  body:not(.is-logged-out) .main-panel {
    padding-right: 9px;
    padding-left: 9px;
  }

  body:not(.is-logged-out) .title-block {
    min-height: 78px;
    padding: 15px 17px;
  }

  body:not(.is-logged-out) #queryView .profile-rank-grid {
    grid-template-columns: 1fr;
  }

  body:not(.is-logged-out) #rewardsView .mall-card .reward-visual {
    min-height: 130px;
  }
}

/* Mobile welcome v2 */
.welcome-mobile-brand,
.welcome-mobile-medal,
.welcome-mobile-benefits-title,
.welcome-mobile-footer {
  display: none;
}

@media (max-width: 720px) {
  body.is-logged-out {
    background:
      radial-gradient(circle at 88% 8%, rgba(64, 178, 165, 0.15), transparent 25%),
      linear-gradient(180deg, #eaf3f1 0%, #f5f8f7 58%, #edf3f1 100%);
  }

  body.is-logged-out .mobile-login-welcome {
    min-height: 100svh;
    overflow: hidden;
    padding: 10px 0 24px;
  }

  body.is-logged-out .mobile-login-welcome::before {
    top: -270px;
    left: -330px;
    width: 650px;
    height: 650px;
    border-color: rgba(15, 118, 110, 0.07);
    box-shadow:
      0 0 0 62px rgba(15, 118, 110, 0.025),
      0 0 0 124px rgba(15, 118, 110, 0.018);
  }

  body.is-logged-out .mobile-login-welcome::after {
    right: -210px;
    bottom: -250px;
    width: 500px;
    height: 500px;
    background: rgba(202, 165, 96, 0.055);
  }

  body.is-logged-out .welcome-site-header {
    display: none;
  }

  body.is-logged-out .welcome-content {
    display: block;
    width: 100%;
    padding: 0;
  }

  body.is-logged-out .mobile-login-hero {
    width: calc(100% - 20px);
    min-height: 526px;
    overflow: hidden;
    box-sizing: border-box;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 32px;
    background:
      radial-gradient(circle at 92% 6%, rgba(155, 234, 223, 0.3), transparent 25%),
      radial-gradient(circle at 12% 88%, rgba(9, 77, 73, 0.58), transparent 36%),
      linear-gradient(150deg, #064e4b 0%, #0a6d66 48%, #26a596 100%);
    padding: 22px 21px 24px;
    color: #ffffff;
    text-align: left;
    box-shadow:
      0 24px 58px rgba(5, 73, 69, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.14);
  }

  body.is-logged-out .mobile-login-hero::before,
  body.is-logged-out .mobile-login-hero::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 50%;
    content: "";
    pointer-events: none;
  }

  body.is-logged-out .mobile-login-hero::before {
    top: -135px;
    right: -105px;
    width: 310px;
    height: 310px;
  }

  body.is-logged-out .mobile-login-hero::after {
    right: -70px;
    bottom: -120px;
    width: 260px;
    height: 260px;
  }

  .welcome-mobile-brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .welcome-mobile-brand > span {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
  }

  .welcome-mobile-brand > div {
    display: grid;
    gap: 3px;
  }

  .welcome-mobile-brand strong {
    color: #ffffff;
    font-size: 14px;
    letter-spacing: 0.03em;
  }

  .welcome-mobile-brand small {
    color: rgba(255, 255, 255, 0.58);
    font-size: 9px;
  }

  .welcome-mobile-medal {
    position: absolute;
    z-index: 2;
    top: 25px;
    right: 20px;
    display: grid;
    width: 78px;
    height: 92px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 25px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.07));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transform: rotate(7deg);
    backdrop-filter: blur(12px);
  }

  .welcome-mobile-medal > span {
    color: #ffffff;
    font-size: 27px;
    font-weight: 900;
    transform: rotate(-7deg);
  }

  .welcome-mobile-medal > small {
    position: absolute;
    right: -8px;
    bottom: 9px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: #f3cb79;
    color: #654616;
    padding: 4px 7px;
    font-size: 8px;
    font-weight: 900;
    transform: rotate(-7deg);
    box-shadow: 0 6px 14px rgba(20, 65, 62, 0.2);
  }

  .welcome-mobile-medal > i {
    position: absolute;
    top: -5px;
    left: 9px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #f7d487;
    box-shadow: 0 0 0 4px rgba(247, 212, 135, 0.12);
  }

  body.is-logged-out .mobile-login-kicker {
    position: relative;
    z-index: 2;
    margin-top: 58px;
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.68);
    padding: 7px 10px;
    font-size: 7px;
    letter-spacing: 0.13em;
    box-shadow: none;
  }

  body.is-logged-out .mobile-login-hero h2 {
    position: relative;
    z-index: 2;
    margin-top: 18px;
    color: #ffffff;
    font-size: clamp(32px, 9.4vw, 42px);
    line-height: 1.2;
    letter-spacing: -0.045em;
  }

  body.is-logged-out .mobile-login-hero h2 strong {
    color: #cafff7;
  }

  body.is-logged-out .mobile-login-hero > p {
    position: relative;
    z-index: 2;
    width: 82%;
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 12px;
    line-height: 1.75;
  }

  body.is-logged-out .welcome-actions {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 24px;
  }

  body.is-logged-out .mobile-login-primary {
    width: 100%;
    min-height: 56px;
    border-radius: 17px;
    background: #ffffff;
    color: #086c65;
    padding-left: 19px;
    font-size: 14px;
    box-shadow: 0 15px 30px rgba(2, 48, 45, 0.24);
  }

  body.is-logged-out .mobile-login-primary:active {
    box-shadow: 0 8px 18px rgba(2, 48, 45, 0.2);
    transform: scale(0.985);
  }

  body.is-logged-out .mobile-login-primary em {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: linear-gradient(145deg, #e2f3f0, #f1f8f7);
    color: #0f766e;
  }

  body.is-logged-out .mobile-register-entry {
    min-height: 38px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    padding: 0;
    font-size: 12px;
    box-shadow: none;
  }

  body.is-logged-out .mobile-login-security {
    position: relative;
    z-index: 2;
    justify-content: center;
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.48);
    font-size: 9px;
  }

  body.is-logged-out .mobile-login-security span {
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: #cafff7;
    font-size: 8px;
  }

  body.is-logged-out .mobile-login-benefits {
    position: relative;
    z-index: 5;
    display: block;
    width: calc(100% - 28px);
    box-sizing: border-box;
    margin: 14px auto 0;
    border: 1px solid rgba(218, 231, 228, 0.92);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.96);
    padding: 21px 18px 14px;
    box-shadow:
      0 18px 42px rgba(27, 67, 65, 0.1),
      inset 0 1px 0 #ffffff;
    backdrop-filter: blur(16px);
  }

  body.is-logged-out .mobile-login-benefits > .welcome-mobile-benefits-title {
    display: grid;
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 5px;
    border: 0;
    background: transparent;
    padding: 0 2px 17px;
    text-align: left;
    box-shadow: none;
  }

  body.is-logged-out .welcome-mobile-benefits-title small {
    display: block;
    color: #ba8732;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-align: left;
  }

  body.is-logged-out .welcome-mobile-benefits-title strong {
    color: #183638;
    font-size: 17px;
    line-height: 1.35;
    text-align: left;
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) {
    position: relative;
    display: grid;
    min-height: 72px;
    grid-template-columns: 46px minmax(0, 1fr) 24px;
    grid-template-rows: 1fr 1fr;
    align-items: center;
    gap: 0 12px;
    border: 0;
    border-top: 1px solid #edf1f0;
    border-radius: 0;
    background: transparent;
    padding: 8px 2px;
    text-align: left;
    box-shadow: none;
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title)::after {
    display: grid;
    width: 24px;
    height: 24px;
    grid-column: 3;
    grid-row: 1 / 3;
    place-items: center;
    border-radius: 8px;
    background: #f2f7f6;
    color: #7a9895;
    font-size: 17px;
    content: "›";
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) > span {
    width: 40px;
    height: 40px;
    grid-column: 1;
    grid-row: 1 / 3;
    margin: 0;
    border: 1px solid #e5efed;
    border-radius: 13px;
    background: linear-gradient(145deg, #edf7f5, #ffffff);
    color: #0f766e;
    font-size: 11px;
    box-shadow: 0 7px 16px rgba(22, 83, 78, 0.07);
  }

  body.is-logged-out .mobile-login-benefits > div:nth-child(3) > span {
    background: linear-gradient(145deg, #fff5e3, #ffffff);
    color: #a76b14;
  }

  body.is-logged-out .mobile-login-benefits > div:nth-child(4) > span {
    background: linear-gradient(145deg, #f0edff, #ffffff);
    color: #6c54b5;
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) > strong {
    align-self: end;
    grid-column: 2;
    grid-row: 1;
    color: #284244;
    font-size: 12px;
    text-align: left;
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) > small {
    display: block;
    align-self: start;
    grid-column: 2;
    grid-row: 2;
    overflow: hidden;
    color: #899596;
    font-size: 9px;
    line-height: 1.4;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.is-logged-out .welcome-mobile-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    color: #83918f;
    font-size: 9px;
  }

  body.is-logged-out .welcome-mobile-footer span {
    display: grid;
    width: 16px;
    height: 16px;
    place-items: center;
    border-radius: 50%;
    background: #dceeea;
    color: #0f766e;
    font-size: 8px;
    font-weight: 900;
  }
}

@media (max-width: 390px) {
  body.is-logged-out .mobile-login-hero {
    min-height: 506px;
  }

  body.is-logged-out .mobile-login-hero h2 {
    font-size: 31px;
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) {
    min-height: 68px;
  }
}

/* Employee directory pagination */
#queryView .employee-list {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

#queryView .employee-pagination {
  margin-top: 16px;
  border-top: 1px solid #e7eeec;
  background: transparent;
  padding: 14px 0 0;
  box-shadow: none;
}

#queryView .employee-pagination .pagination-size {
  margin-left: auto;
}

@media (max-width: 720px) {
  #queryView .employee-pagination {
    display: grid;
    grid-template-columns: auto 36px 36px 36px minmax(92px, 1fr);
    gap: 7px;
    padding: 13px 0 0;
  }

  #queryView .employee-pagination .pagination-size {
    min-width: 0;
    margin-left: 0;
  }

  #queryView .employee-pagination .pagination-size select {
    width: 100%;
  }
}

@media (max-width: 380px) {
  #queryView .employee-pagination {
    grid-template-columns: auto 34px 34px 34px;
  }

  #queryView .employee-pagination .pagination-size {
    grid-column: 1 / -1;
  }
}

/* Keep employee surname centered inside the avatar at every viewport size. */
.employee-card > .avatar,
.profile-header > .avatar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center;
  position: relative !important;
  box-sizing: border-box;
  padding: 0 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-indent: 0 !important;
}

.employee-card > .avatar > .avatar-initial,
.profile-header > .avatar > .avatar-initial {
  position: absolute;
  top: 50%;
  left: 50%;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

/* Mobile application visual system v4: native-style dock and clearer hierarchy. */
@media (max-width: 720px) {
  body:not(.is-logged-out) {
    padding-bottom: calc(94px + env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at 92% 2%, rgba(44, 178, 163, 0.12), transparent 240px),
      radial-gradient(circle at 6% 72%, rgba(218, 171, 86, 0.07), transparent 230px),
      linear-gradient(180deg, #edf6f3 0%, #f6f8f7 40%, #eef4f2 100%);
  }

  body:not(.is-logged-out) .sidebar {
    position: sticky;
    z-index: 45;
    top: 0;
    min-height: 66px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(212, 228, 224, 0.82);
    background: rgba(248, 252, 251, 0.98);
    padding: 11px 15px;
    box-shadow: 0 8px 28px rgba(23, 71, 66, 0.08);
    /* A backdrop filter creates a containing block and would trap the fixed bottom dock. */
    backdrop-filter: none;
    filter: none;
    transform: none;
  }

  body:not(.is-logged-out) .sidebar .brand {
    min-height: 44px;
    gap: 11px;
    padding: 0;
  }

  body:not(.is-logged-out) .sidebar .brand::after {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    margin-left: auto;
    border: 1px solid #d9ebe7;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #62807b;
    padding: 0 9px;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.06em;
    content: "安全运行中";
  }

  body:not(.is-logged-out) .sidebar .brand-mark {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 14px;
    background: linear-gradient(145deg, #075f59, #15978b 62%, #35b0a4);
    font-size: 20px;
    box-shadow:
      0 10px 22px rgba(9, 107, 99, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

  body:not(.is-logged-out) .sidebar .brand-copy h1 {
    color: #173638;
    font-size: 16px;
    letter-spacing: 0.015em;
  }

  body:not(.is-logged-out) .sidebar .brand-copy p {
    display: block;
    margin-top: 3px;
    color: #82928f;
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  body:not(.is-logged-out) .nav-tabs {
    position: fixed;
    z-index: 80;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    display: flex;
    width: auto;
    min-height: 78px;
    box-sizing: border-box;
    align-items: stretch;
    gap: 4px;
    margin: 0;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 28px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 251, 250, 0.94));
    padding: 8px;
    box-shadow:
      0 22px 58px rgba(14, 52, 49, 0.22),
      0 4px 14px rgba(17, 77, 71, 0.08),
      inset 0 1px 0 #ffffff;
    backdrop-filter: blur(24px) saturate(1.25);
  }

  body:not(.is-logged-out) .nav-tab {
    display: flex;
    width: auto;
    min-width: 0;
    min-height: 60px;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
    border: 0;
    border: 2px solid transparent;
    border-radius: 20px;
    background: transparent;
    color: #748582;
    padding: 4px 1px 3px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
    transition:
      flex 0.22s ease,
      color 0.18s ease,
      background 0.18s ease,
      transform 0.2s ease,
      box-shadow 0.2s ease;
  }

  body:not(.is-logged-out) .nav-tab::before {
    display: grid;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    place-items: center;
    border-radius: 12px;
    background: #edf6f4;
    color: #167c73;
    font-size: 12px;
    font-weight: 900;
    content: attr(data-icon);
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.045);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  }

  body:not(.is-logged-out) .nav-tab:nth-child(2)::before {
    background: #fff5e5;
    color: #b67216;
  }

  body:not(.is-logged-out) .nav-tab:nth-child(3)::before {
    background: #ecf7e9;
    color: #3c8745;
  }

  body:not(.is-logged-out) .nav-tab:nth-child(4)::before {
    background: #f2edff;
    color: #7055b7;
  }

  body:not(.is-logged-out) .nav-tab:nth-child(5)::before {
    background: #fff1e8;
    color: #b9642b;
  }

  body:not(.is-logged-out) .nav-tab:nth-child(6)::before {
    background: #ebf3ff;
    color: #4876b8;
  }

  body:not(.is-logged-out) .nav-tab:nth-child(7)::before {
    background: #eef2f5;
    color: #506779;
  }

  body:not(.is-logged-out) .nav-tab:hover {
    border-color: transparent;
    background: #f1f8f6;
    color: #0b766e;
    box-shadow: none;
  }

  body:not(.is-logged-out) .nav-tab.active {
    flex: 1.3 1 0;
    border-color: rgba(255, 255, 255, 0.88);
    background:
      radial-gradient(circle at 86% 8%, rgba(151, 236, 223, 0.3), transparent 45%),
      linear-gradient(145deg, #075d57, #0f7d74 58%, #1ba094);
    color: #ffffff;
    box-shadow:
      0 13px 27px rgba(8, 105, 97, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transform: translateY(-9px);
  }

  body:not(.is-logged-out) .nav-tab.active::before {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.14),
      0 5px 13px rgba(4, 67, 62, 0.16);
    transform: translateY(-1px) scale(1.04);
  }

  body:not(.is-logged-out) .nav-tab.active:active {
    transform: translateY(-7px) scale(0.97);
  }

  body:not(.is-logged-out) .nav-tab .nav-dot {
    display: none;
  }

  body:not(.is-logged-out) .main-panel {
    padding: 13px 10px calc(20px + env(safe-area-inset-bottom));
  }

  body:not(.is-logged-out) .topbar {
    gap: 0;
    margin-bottom: 17px;
  }

  body:not(.is-logged-out) .title-block {
    min-height: 103px;
    align-content: start;
    border-radius: 27px;
    background:
      radial-gradient(circle at 93% 8%, rgba(164, 241, 229, 0.32), transparent 32%),
      radial-gradient(circle at 9% 115%, rgba(4, 65, 61, 0.52), transparent 42%),
      linear-gradient(138deg, #075853 0%, #0e7a71 58%, #29a99b 100%);
    padding: 20px 20px 35px;
    box-shadow:
      0 17px 38px rgba(7, 91, 85, 0.21),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }

  body:not(.is-logged-out) .title-block::before {
    position: absolute;
    right: 27px;
    bottom: -54px;
    width: 132px;
    height: 132px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
    content: "";
    box-shadow: 0 0 0 28px rgba(255, 255, 255, 0.025);
  }

  body:not(.is-logged-out) .title-block .eyebrow {
    color: rgba(255, 255, 255, 0.58);
    font-size: 8px;
    letter-spacing: 0.16em;
  }

  body:not(.is-logged-out) .title-block h2 {
    margin-top: 7px;
    font-size: 27px;
    line-height: 1.1;
  }

  body:not(.is-logged-out) .topbar-controls {
    position: relative;
    z-index: 3;
    width: calc(100% - 16px);
    margin: -20px auto 0;
    gap: 9px;
    border: 1px solid rgba(224, 234, 232, 0.96);
    border-radius: 21px;
    background: rgba(255, 255, 255, 0.96);
    padding: 10px;
    box-shadow:
      0 13px 30px rgba(28, 67, 64, 0.1),
      inset 0 1px 0 #ffffff;
    backdrop-filter: blur(18px);
  }

  body:not(.is-logged-out) .topbar-controls .topbar-employee-picker {
    min-height: 45px;
    border-radius: 14px;
    background: #f1f6f5;
    padding: 4px 5px 4px 11px;
  }

  body:not(.is-logged-out) .topbar-controls .topbar-employee-picker select {
    min-height: 37px;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(28, 67, 64, 0.045);
  }

  body:not(.is-logged-out) .current-user {
    border: 1px solid #e0efeb;
    background: linear-gradient(135deg, #e9f7f4, #f7fbfa);
  }

  body:not(.is-logged-out) .logout-button {
    border: 1px solid #fee2e6;
    background: #fff5f6;
  }

  body:not(.is-logged-out) .panel {
    border-color: rgba(219, 231, 228, 0.92);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow:
      0 13px 32px rgba(26, 66, 62, 0.075),
      inset 0 1px 0 rgba(255, 255, 255, 0.88);
  }

  body:not(.is-logged-out) #queryView .two-column > .panel:first-child {
    overflow: hidden;
    border-radius: 24px;
    background:
      radial-gradient(circle at 103% -5%, rgba(44, 176, 162, 0.16), transparent 150px),
      #ffffff;
    padding: 18px 17px;
  }

  body:not(.is-logged-out) #queryView .section-heading h3 {
    color: #193739;
    font-size: 21px;
    letter-spacing: -0.02em;
  }

  body:not(.is-logged-out) #queryView .section-heading p {
    display: inline-flex;
    min-height: 23px;
    align-items: center;
    border-radius: 999px;
    background: #eaf6f3;
    color: #0e756d;
    padding: 0 9px;
    font-size: 9px;
    font-weight: 900;
  }

  body:not(.is-logged-out) #queryView .search-field input {
    min-height: 50px;
    border: 1px solid #e3ecea;
    border-radius: 16px;
    background: #f3f7f6;
    padding-right: 15px;
    padding-left: 16px;
    font-size: 14px;
  }

  body:not(.is-logged-out) #queryView .employee-list {
    gap: 9px;
    margin-top: 14px;
  }

  body:not(.is-logged-out) #queryView .employee-card {
    min-height: 76px;
    border: 1px solid #e4ecea;
    border-radius: 19px;
    background: #fcfdfd;
    padding: 10px;
    box-shadow: 0 6px 18px rgba(28, 67, 64, 0.045);
  }

  body:not(.is-logged-out) #queryView .employee-card.active {
    border-color: #77c4ba;
    background:
      radial-gradient(circle at 100% 0, rgba(41, 170, 155, 0.13), transparent 100px),
      linear-gradient(135deg, #e8f7f4, #fbfdfc);
    box-shadow:
      inset 4px 0 0 #0f766e,
      0 10px 24px rgba(15, 118, 110, 0.1);
  }

  body:not(.is-logged-out) #queryView .employee-card .avatar {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: #eef4f7;
  }

  body:not(.is-logged-out) #queryView .employee-card.active .avatar {
    background: #ffffff;
    color: #0c756d;
    box-shadow: 0 7px 17px rgba(15, 118, 110, 0.12);
  }

  body:not(.is-logged-out) #queryView .points-chip {
    min-width: 70px;
    border: 1px solid #e3ebe9;
    border-radius: 999px;
    background: #ffffff;
    padding: 8px 10px;
    color: #314747;
    font-size: 13px;
    font-weight: 900;
  }

  body:not(.is-logged-out) #queryView .employee-card.active .points-chip {
    border-color: transparent;
    background: linear-gradient(135deg, #0a7169, #16998e);
    color: #ffffff;
    box-shadow: 0 7px 16px rgba(15, 118, 110, 0.18);
  }

  body:not(.is-logged-out) #queryView .employee-pagination,
  body:not(.is-logged-out) .pagination-panel {
    border-top-color: #e5edeb;
  }

  body:not(.is-logged-out) .pagination-page {
    background: linear-gradient(145deg, #087067, #18a095);
    box-shadow: 0 7px 15px rgba(15, 118, 110, 0.17);
  }

  body:not(.is-logged-out) .toast {
    bottom: calc(106px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  body:not(.is-logged-out) .sidebar .brand::after {
    display: none;
  }

  body:not(.is-logged-out) .nav-tabs {
    right: 7px;
    left: 7px;
    gap: 1px;
    padding: 5px;
  }

  body:not(.is-logged-out) .nav-tab {
    font-size: 8px;
  }

  body:not(.is-logged-out) .nav-tab::before {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
  }
}

/* Desktop welcome v8 authoritative cascade. */
@media (min-width: 861px) {
  body.is-logged-out {
    background:
      radial-gradient(circle at 9% 14%, rgba(30, 169, 156, 0.13), transparent 26%),
      radial-gradient(circle at 91% 67%, rgba(229, 176, 79, 0.12), transparent 25%),
      linear-gradient(145deg, #f1f8f6 0%, #f8faf9 46%, #f2f7f5 100%);
  }

  body.is-logged-out .mobile-login-welcome {
    min-height: 100vh;
    padding-bottom: 24px;
  }

  .welcome-site-header {
    width: min(calc(100% - 56px), 1320px);
    min-height: 72px;
    margin-top: 16px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 21px;
    background: rgba(255, 255, 255, 0.68);
    padding: 0 18px;
    box-shadow: 0 16px 40px rgba(27, 70, 69, 0.065), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
  }

  .welcome-brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(145deg, #075f59, #18a195);
    box-shadow: 0 12px 26px rgba(9, 107, 99, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

  .welcome-header-meta > span {
    border-radius: 999px;
    background: rgba(237, 247, 245, 0.78);
    padding: 8px 12px;
  }

  .welcome-header-meta button {
    min-height: 42px;
    border-radius: 13px;
    background: #ffffff;
    box-shadow: 0 9px 22px rgba(32, 70, 71, 0.08);
  }

  .welcome-content {
    width: min(calc(100% - 76px), 1280px);
    min-height: 555px;
    grid-template-columns: minmax(440px, 0.88fr) minmax(520px, 1.12fr);
    gap: clamp(48px, 6vw, 92px);
    padding: 40px 0 34px;
  }

  body.is-logged-out .mobile-login-hero {
    padding-left: 8px;
  }

  body.is-logged-out .mobile-login-kicker {
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 24px rgba(31, 71, 73, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
  }

  body.is-logged-out .mobile-login-hero h2 {
    max-width: 610px;
    margin-top: 24px;
    font-size: clamp(48px, 4.15vw, 64px);
    line-height: 1.12;
    text-wrap: balance;
  }

  body.is-logged-out .mobile-login-hero > p {
    max-width: 500px;
    margin-top: 24px;
    color: #64787a;
    font-size: 15px;
  }

  .welcome-actions {
    margin-top: 29px;
  }

  body.is-logged-out .mobile-login-primary {
    min-width: 225px;
    min-height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, #06675f, #159a8e);
    box-shadow: 0 17px 34px rgba(9, 111, 103, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }

  body.is-logged-out .mobile-register-entry {
    min-height: 58px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 27px rgba(32, 70, 71, 0.075), inset 0 1px 0 #ffffff;
    backdrop-filter: blur(10px);
  }

  body.is-logged-out .mobile-login-security {
    width: max-content;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    padding: 6px 12px 6px 6px;
    backdrop-filter: blur(8px);
  }

  .welcome-preview {
    min-height: 500px;
  }

  .welcome-preview::before {
    width: 500px;
    height: 500px;
    border-color: rgba(15, 118, 110, 0.1);
    box-shadow: 0 0 0 34px rgba(15, 118, 110, 0.018);
  }

  .welcome-preview-glow {
    top: 34px;
    right: 2%;
    bottom: 15px;
    left: 3%;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background:
      radial-gradient(circle at 79% 18%, rgba(245, 204, 123, 0.63), transparent 28%),
      radial-gradient(circle at 12% 88%, rgba(58, 184, 170, 0.28), transparent 30%),
      linear-gradient(145deg, #d8eeea 0%, #edf6f3 57%, #f5ecda 100%);
    box-shadow: 0 28px 65px rgba(29, 83, 79, 0.12);
  }

  .welcome-score-card,
  .welcome-activity-card {
    border-color: rgba(255, 255, 255, 0.96);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 30px 75px rgba(26, 67, 67, 0.17), inset 0 1px 0 #ffffff;
  }

  .welcome-score-card {
    top: 63px;
    right: 22px;
    left: 38px;
    min-height: 260px;
    border-radius: 30px;
    padding: 27px 29px;
  }

  .welcome-activity-card {
    right: 61px;
    bottom: 34px;
    left: 0;
    border-radius: 26px;
    padding: 20px 24px;
  }

  .badge-rank {
    top: 28px;
    left: -9px;
  }

  .badge-gift {
    right: -8px;
    bottom: 96px;
  }

  body.is-logged-out .mobile-login-benefits {
    width: min(calc(100% - 56px), 1320px);
    grid-template-columns: minmax(238px, 0.92fr) repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.65);
    padding: 8px;
    box-shadow: 0 18px 45px rgba(27, 70, 69, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(15px);
  }

  body.is-logged-out .mobile-login-benefits > div {
    min-height: 92px;
    border: 1px solid transparent;
    border-radius: 18px;
    padding: 15px 20px;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
  }

  body.is-logged-out .mobile-login-benefits > div + div {
    border-left-color: transparent;
  }

  body.is-logged-out .mobile-login-benefits > .welcome-mobile-benefits-title {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    background: linear-gradient(135deg, #0a665f, #138c83);
    padding-left: 24px;
  }

  body.is-logged-out .welcome-mobile-benefits-title small {
    color: rgba(255, 228, 171, 0.82);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.18em;
  }

  body.is-logged-out .welcome-mobile-benefits-title strong {
    color: #ffffff;
    font-size: 15px;
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) {
    background: rgba(255, 255, 255, 0.64);
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title):hover {
    border-color: rgba(15, 118, 110, 0.11);
    background: rgba(255, 255, 255, 0.94);
    transform: translateY(-2px);
  }

  body.is-logged-out .mobile-login-benefits > div:nth-of-type(2) > span {
    background: #e7f6f3;
    color: #0b776e;
  }

  body.is-logged-out .mobile-login-benefits > div:nth-of-type(3) > span {
    background: #fff4df;
    color: #a56a16;
  }

  body.is-logged-out .mobile-login-benefits > div:nth-of-type(4) > span {
    background: #f1edfb;
    color: #7256ae;
  }

  body.is-logged-out .welcome-mobile-footer {
    width: max-content;
    max-width: calc(100% - 40px);
    margin: 14px auto 0;
    color: #82928f;
    font-size: 10px;
  }
}

@media (min-width: 861px) and (max-width: 1100px) {
  .welcome-content {
    width: calc(100% - 48px);
    grid-template-columns: minmax(340px, 0.82fr) minmax(430px, 1.18fr);
    gap: 28px;
  }

  body.is-logged-out .mobile-login-hero h2 {
    font-size: 46px;
  }

  body.is-logged-out .mobile-login-benefits {
    width: calc(100% - 48px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.is-logged-out .mobile-login-benefits > .welcome-mobile-benefits-title {
    grid-column: 1 / -1;
    min-height: 72px;
  }
}

@media (min-width: 861px) and (max-width: 1100px) {
  body.is-logged-out .mobile-login-benefits {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.is-logged-out .mobile-login-benefits > .welcome-mobile-benefits-title {
    grid-column: 1 / -1;
  }
}

/* Mobile welcome v6 final cascade. Kept last so it wins over legacy mobile themes. */
@media (max-width: 720px) {
  html,
  body {
    scrollbar-width: none;
  }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  body.is-logged-out {
    background:
      radial-gradient(circle at 88% 6%, rgba(54, 190, 174, 0.17), transparent 24%),
      radial-gradient(circle at 3% 60%, rgba(222, 178, 95, 0.09), transparent 28%),
      linear-gradient(180deg, #eaf4f1 0%, #f5f8f7 52%, #edf4f2 100%);
  }

  body.is-logged-out .mobile-login-welcome {
    padding: 9px 0 30px;
  }

  body.is-logged-out .mobile-login-hero {
    width: calc(100% - 18px);
    min-height: 508px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 33px;
    background:
      radial-gradient(circle at 91% 5%, rgba(175, 246, 234, 0.3), transparent 25%),
      radial-gradient(circle at 1% 104%, rgba(2, 49, 47, 0.7), transparent 42%),
      linear-gradient(148deg, #064b48 0%, #087068 47%, #20a496 100%);
    padding: 21px 20px 22px;
    box-shadow:
      0 27px 60px rgba(5, 72, 68, 0.27),
      0 8px 22px rgba(5, 72, 68, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }

  body.is-logged-out .mobile-login-hero::before {
    top: -145px;
    right: -95px;
    width: 320px;
    height: 320px;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
      0 0 0 38px rgba(255, 255, 255, 0.025),
      0 0 0 76px rgba(255, 255, 255, 0.014);
  }

  body.is-logged-out .mobile-login-hero::after {
    right: -84px;
    bottom: -128px;
    width: 280px;
    height: 280px;
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.018);
  }

  body.is-logged-out .welcome-mobile-brand {
    gap: 11px;
  }

  body.is-logged-out .welcome-mobile-brand > span {
    width: 44px;
    height: 44px;
    border-color: rgba(255, 255, 255, 0.22);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.09));
    font-size: 21px;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.19),
      0 8px 20px rgba(3, 53, 50, 0.13);
  }

  body.is-logged-out .welcome-mobile-brand strong {
    font-size: 14px;
    letter-spacing: 0.04em;
  }

  body.is-logged-out .welcome-mobile-brand small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 9px;
  }

  body.is-logged-out .welcome-mobile-medal {
    top: 24px;
    right: 19px;
    width: 76px;
    height: 88px;
    border-color: rgba(255, 255, 255, 0.25);
    border-radius: 25px;
    background:
      radial-gradient(circle at 82% 9%, rgba(255, 255, 255, 0.2), transparent 30%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.06));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      0 13px 30px rgba(2, 52, 49, 0.17);
  }

  body.is-logged-out .welcome-mobile-medal > span {
    font-size: 28px;
    text-shadow: 0 5px 15px rgba(1, 46, 43, 0.2);
  }

  body.is-logged-out .welcome-mobile-medal > small {
    right: -7px;
    bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    background: linear-gradient(145deg, #ffe29b, #f2bd56);
    color: #64440f;
    padding: 5px 8px;
    box-shadow: 0 8px 17px rgba(41, 68, 50, 0.2);
  }

  body.is-logged-out .mobile-login-kicker {
    margin-top: 57px;
    border-color: rgba(246, 209, 129, 0.25);
    background: rgba(246, 209, 129, 0.1);
    color: rgba(255, 229, 173, 0.84);
    padding: 7px 11px;
    font-size: 7px;
    letter-spacing: 0.15em;
  }

  body.is-logged-out .mobile-login-hero h2 {
    margin-top: 17px;
    color: #ffffff;
    font-size: clamp(32px, 9.4vw, 40px);
    line-height: 1.17;
    letter-spacing: -0.045em;
    text-shadow: 0 7px 25px rgba(2, 50, 47, 0.17);
  }

  body.is-logged-out .mobile-login-hero h2 strong {
    position: relative;
    display: inline-block;
    color: #ccfff7;
  }

  body.is-logged-out .mobile-login-hero h2 strong::after {
    position: absolute;
    right: 3px;
    bottom: -4px;
    left: 3px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(204, 255, 247, 0), rgba(204, 255, 247, 0.75), rgba(244, 200, 111, 0.45));
    content: "";
  }

  body.is-logged-out .mobile-login-hero > p {
    width: 86%;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    line-height: 1.72;
  }

  body.is-logged-out .welcome-actions {
    gap: 9px;
    margin-top: 22px;
  }

  body.is-logged-out .mobile-login-primary {
    min-height: 58px;
    border: 1px solid rgba(255, 255, 255, 0.64);
    border-radius: 19px;
    background: linear-gradient(145deg, #ffffff, #f2fbf9);
    color: #086c65;
    padding-left: 20px;
    font-size: 14px;
    box-shadow:
      0 17px 34px rgba(2, 47, 44, 0.25),
      inset 0 1px 0 #ffffff;
  }

  body.is-logged-out .mobile-login-primary em {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(145deg, #d8f1ed, #edf8f6);
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.05);
  }

  body.is-logged-out .mobile-register-entry {
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.065);
    color: rgba(255, 255, 255, 0.82);
    font-size: 11px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  }

  body.is-logged-out .mobile-login-security {
    width: max-content;
    max-width: 100%;
    min-height: 26px;
    margin: 10px auto 0;
    border-radius: 999px;
    background: rgba(1, 57, 53, 0.16);
    color: rgba(255, 255, 255, 0.58);
    padding: 0 10px 0 5px;
    font-size: 9px;
  }

  body.is-logged-out .mobile-login-security span {
    width: 18px;
    height: 18px;
    background: rgba(204, 255, 247, 0.12);
    color: #ccfff7;
  }

  body.is-logged-out .mobile-login-benefits {
    width: calc(100% - 24px);
    margin-top: 15px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 29px;
    background:
      radial-gradient(circle at 100% 0, rgba(35, 170, 155, 0.08), transparent 155px),
      rgba(255, 255, 255, 0.95);
    padding: 22px 17px 14px;
    box-shadow:
      0 21px 48px rgba(25, 66, 63, 0.11),
      inset 0 1px 0 #ffffff;
  }

  body.is-logged-out .mobile-login-benefits > .welcome-mobile-benefits-title {
    padding: 0 3px 18px;
  }

  body.is-logged-out .welcome-mobile-benefits-title small {
    color: #b47c20;
    font-size: 8px;
    letter-spacing: 0.18em;
  }

  body.is-logged-out .welcome-mobile-benefits-title strong {
    color: #173638;
    font-size: 18px;
    letter-spacing: -0.02em;
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) {
    min-height: 76px;
    grid-template-columns: 48px minmax(0, 1fr) 26px;
    gap: 0 12px;
    border-top-color: #e9f0ee;
    padding: 9px 3px;
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title)::after {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: #f0f6f4;
    color: #76938e;
    font-size: 17px;
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) > span {
    width: 43px;
    height: 43px;
    border-radius: 14px;
    font-size: 11px;
    box-shadow: 0 8px 18px rgba(22, 83, 78, 0.08);
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) > strong {
    color: #254143;
    font-size: 12px;
  }

  body.is-logged-out .mobile-login-benefits > div:not(.welcome-mobile-benefits-title) > small {
    color: #849391;
    font-size: 9px;
  }

  body.is-logged-out .welcome-mobile-footer {
    margin-top: 18px;
    color: #748884;
  }
}

@media (max-width: 380px) {
  body.is-logged-out .mobile-login-hero {
    min-height: 500px;
    padding-right: 18px;
    padding-left: 18px;
  }

  body.is-logged-out .mobile-login-hero h2 {
    font-size: 31px;
  }

  body.is-logged-out .mobile-login-benefits {
    width: calc(100% - 20px);
  }
}
