:root {
  --blue-500: #3b82f6;
  --blue-50: #eff6ff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --red-600: #dc2626;
  --white: #ffffff;
  --border: #dddddd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-top: 108px;
  background: var(--white);
  color: var(--gray-800);
  font-family: "Poppins", "Inter", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body:not(.auth-body) {
  display: flex;
  flex-direction: column;
}

.auth-body {
  padding-top: 0;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

* {
  -webkit-tap-highlight-color: transparent;
}

*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--gray-500, #6b7280);
  outline-offset: 1px;
}

::selection {
  background: var(--gray-300);
  color: var(--gray-800);
}

button {
  border: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  background: transparent;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 100%;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.topbar {
  max-width: none;
  height: 60px;
  margin: 0 auto;
  padding: 0 24px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-dashboard .topbar {
  max-width: none;
  padding-left: 10px;
}

.logo-link {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
}

.logo-box {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--blue-500);
  color: var(--white);
  border-radius: 2px;
}

.logo-box svg {
  width: 25px;
  height: 25px;
  stroke: currentColor;
  stroke-width: 1.8;
}

.logo-box img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  padding: 5px;
}

.logo-image-box {
  background: transparent;
  color: inherit;
}

.logo-image-box img {
  padding: 0;
}

.icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  vector-effect: non-scaling-stroke;
}

.user-wrap {
  position: relative;
}

.user-toggle,
.menu-toggle {
  display: none;
}

.user-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--gray-700);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
}

.user-button:hover,
.user-toggle:checked + .user-button {
  background: var(--gray-50);
  border-color: var(--gray-200);
}

.user-caret {
  width: 11px;
  height: 11px;
  color: var(--gray-600);
  stroke-width: 2.3;
  transition: transform 0.18s ease;
}

.user-toggle:checked + .user-button .user-caret {
  transform: rotate(180deg);
}

.user-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 41;
  cursor: default;
}

.user-toggle:checked ~ .user-backdrop {
  display: block;
}

.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  width: 132px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.12);
}

.user-toggle:checked ~ .dropdown {
  display: block;
}

.dropdown a {
  display: block;
  padding: 10px 16px;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.18s ease;
}

.dropdown a:hover {
  background: var(--gray-50);
}

.dropdown a.logout {
  color: var(--red-600);
}

.menu-bar {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--gray-700);
  color: var(--gray-100);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.menu-arrow {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
  transition: transform 0.28s ease;
}

.menu-toggle:checked ~ .navbar .menu-arrow {
  transform: rotate(180deg);
}

.overlay {
  position: fixed;
  top: 108px;
  left: 0;
  z-index: 44;
  width: 100%;
  height: calc(100vh - 108px);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  opacity: 0;
  visibility: hidden;
  transition: all 0.28s ease;
  cursor: pointer;
}

.menu-toggle:checked ~ .overlay {
  opacity: 1;
  visibility: visible;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.sidebar {
  position: fixed;
  top: 108px;
  left: -260px;
  z-index: 45;
  width: 220px;
  height: calc(100vh - 108px);
  padding: 32px 12px;
  overflow-y: auto;
  background: var(--gray-700);
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle:checked ~ .sidebar {
  left: 0;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--gray-300);
  font-size: 15px;
  font-weight: 400;
}

.sidebar-links a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border-radius: 6px;
  transition: all 0.18s ease;
}

.sidebar-links a:hover,
.sidebar-links a.active {
  color: var(--white);
  background: rgba(55, 65, 81, 0.5);
}

.sidebar-links a:hover .sidebar-icon,
.sidebar-links a.active .sidebar-icon {
  color: var(--white);
}

.sidebar-icon {
  width: 18px;
  height: 18px;
  color: var(--gray-300);
  stroke-width: 1.75;
}

.sidebar-text {
  min-width: 0;
  flex: 1;
}

.sidebar-link-arrow {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--gray-300);
  stroke-width: 2;
}

.sidebar-line {
  height: 1px;
  margin: 5px 8px;
  background: rgba(209, 213, 219, 0.35);
}

main {
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 108px - 72px);
  margin: 0 auto;
  padding: 0;
  flex: 1 0 auto;
}

.page-dashboard main {
  min-height: auto;
  display: block;
  max-width: none;
  width: 100%;
}

.page-wrap {
  width: min(100%, 960px);
  max-width: 960px;
  margin: 16px auto 0;
  padding: 32px 24px 8px;
}

.page-dashboard .page-wrap {
  width: min(100%, 860px);
  max-width: 860px;
  margin: 16px auto 0;
  padding: 28px 24px 96px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.balance-card {
  margin-bottom: 32px;
}

.page-dashboard .balance-card {
  margin-bottom: 24px;
}

.total-sell-card {
  margin-bottom: 24px;
}

.total-sell-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.total-sell-value {
  margin: 0;
  color: var(--gray-800);
  font-size: 15.5px;
  font-weight: 500;
}

.summary-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue-500);
  font-size: 12px;
  font-weight: 500;
}

.summary-link .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2;
}

.summary-link:hover {
  color: #2563eb;
}

.page-dashboard .total-sell-value {
  font-size: 18px;
}

.page-dashboard .summary-link {
  font-size: 13px;
}

.page-dashboard .summary-link .icon {
  width: 12px;
  height: 12px;
}

.card-title {
  padding: 9px 16px;
  background: #f9f9f9;
  border-bottom: 1px solid var(--border);
}

.page-dashboard .card-title {
  padding: 10px 16px;
}

.card-title span,
.card-title p {
  margin: 0;
  color: var(--gray-700);
  font-size: 13.5px;
  font-weight: 500;
}

.page-dashboard .card-title span,
.page-dashboard .card-title p {
  font-size: 14px;
}

.card-body {
  padding: 20px 16px;
}

.page-dashboard .card-body {
  padding: 22px 16px;
}

.balance-line {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.balance-text {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--gray-800);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.4;
}

.page-dashboard .balance-text {
  font-size: 18px;
}

.balance-mask {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transform: translateY(-1px);
}

.balance-mask span {
  width: 5px;
  height: 5px;
  display: block;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.8;
}

.hidden {
  display: none;
}

.eye-button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--gray-700);
  line-height: 1;
  transition: color 0.18s ease;
}

.page-dashboard .eye-button {
  width: 30px;
  height: 30px;
}

.eye-button .icon {
  width: 15px;
  height: 15px;
}

.page-dashboard .eye-button .icon {
  width: 16px;
  height: 16px;
}

.eye-button .eye-off-icon {
  display: none;
}

.eye-button.is-hidden .eye-icon {
  display: none;
}

.eye-button.is-hidden .eye-off-icon {
  display: block;
}

.eye-button:hover {
  color: var(--gray-600);
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-header h2,
.page-title {
  margin: 0;
  color: var(--gray-800);
  font-size: 14px;
  font-weight: 600;
}

.page-dashboard .detail-header h2 {
  font-size: 15px;
}

.notice {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  padding: 11px 13px;
  background: rgba(250, 204, 21, 0.16);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: 4px;
  color: #854d0e;
  font-size: 12.5px;
  font-weight: 500;
}

.notice-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(234, 179, 8, 0.22);
  color: #a16207;
}

.notice-icon .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
}

.sell-button {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  background: var(--blue-500);
  border: 1px solid var(--blue-500);
  border-radius: 4px;
  color: var(--white);
  font-size: 12px;
  font-weight: 500;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.page-dashboard .sell-button {
  min-height: 32px;
  padding: 0 13px;
  font-size: 12.5px;
}

.sell-button:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.admin-add-button {
  min-height: 34px;
  padding: 0 14px;
}

.admin-price-modal {
  width: min(100%, 480px);
}

.admin-country-picker {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
}

.admin-country-picker:focus-within {
  border-color: #bfdbfe;
  box-shadow: 0 0 0 3px var(--blue-50);
}

.admin-country-button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  color: var(--gray-800);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}

.admin-country-name {
  min-width: 0;
  flex: 1;
}

.admin-country-list {
  width: 100%;
}

.admin-price-input-table {
  margin-top: 4px;
  border: 1px solid var(--border);
}

.admin-price-input-table th,
.admin-price-input-table td {
  padding: 12px;
}

.admin-price-input-table th {
  width: 38%;
}

.wait-time-group {
  margin: 14px 0 0;
}

.price-input {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  outline: none;
  color: var(--gray-800);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
}

.price-input:focus {
  border-color: #bfdbfe;
  box-shadow: 0 0 0 3px var(--blue-50);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.46);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  width: min(100%, 420px);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  box-shadow: 0 24px 64px rgba(17, 24, 39, 0.2);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: #f9f9f9;
}

.modal-header h2 {
  margin: 0;
  color: var(--gray-800);
  font-size: 14px;
  font-weight: 600;
}

.modal-close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--gray-600);
  transition: background 0.18s ease, color 0.18s ease;
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.modal-body {
  padding: 18px 16px 20px;
}

.modal-notice {
  margin: 0 0 16px;
}

.field-label {
  display: block;
  margin-bottom: 9px;
  color: var(--gray-800);
  font-size: 13.5px;
  font-weight: 500;
}

.field-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.field-top .field-label {
  margin-bottom: 0;
}

.field-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue-500);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.field-link .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2;
}

.field-link:hover {
  color: #2563eb;
}

.phone-field {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  background: var(--white);
}

.phone-entry-wrap {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.phone-entry-wrap .phone-field {
  flex: 1;
}

.phone-edit-button {
  width: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  color: var(--gray-700);
  background: var(--white);
}

.phone-edit-button.hidden {
  display: none;
}

.phone-edit-button:hover {
  background: var(--gray-50);
}

.phone-edit-button .icon {
  width: 16px;
  height: 16px;
}

.phone-field:focus-within {
  border-color: #bfdbfe;
  box-shadow: 0 0 0 3px var(--blue-50);
}

.country-picker {
  position: relative;
  border-right: 1px solid var(--gray-200);
}

.country-button {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px 0 10px;
  color: var(--gray-800);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.country-button .user-caret {
  margin-left: auto;
}

.country-button.is-disabled {
  opacity: 0.72;
  cursor: default;
}

.phone-input:disabled,
.country-code-input:disabled {
  color: var(--gray-600);
}

.country-code-input {
  width: 42px;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--gray-800);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
}

.country-code-input.invalid {
  color: var(--red-600);
}

.phone-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 0;
  outline: none;
  color: var(--gray-800);
  font: inherit;
  font-size: 13px;
}

.country-list {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 75;
  display: none;
  width: 258px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.14);
}

.country-picker.open .country-list {
  display: block;
}

.country-search-wrap {
  position: relative;
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

.country-search-wrap svg {
  position: absolute;
  top: 50%;
  left: 20px;
  width: 14px;
  height: 14px;
  color: var(--gray-600);
  transform: translateY(-50%);
}

.country-search {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 30px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  outline: none;
  color: var(--gray-800);
  font: inherit;
  font-size: 12.5px;
}

.country-options {
  max-height: 230px;
  overflow-y: auto;
  padding: 5px;
}

.country-option {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 4px;
  color: var(--gray-700);
  font-size: 12.5px;
  text-align: left;
}

.country-option:hover {
  background: var(--gray-50);
}

.country-empty {
  margin: 0;
  padding: 12px 8px;
  color: var(--gray-600);
  font-size: 12.5px;
  font-weight: 500;
  text-align: center;
}

.country-option-code {
  margin-left: auto;
  color: var(--gray-600);
  font-weight: 500;
}

.modal-action {
  width: 100%;
  min-height: 36px;
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--blue-500);
  border-radius: 4px;
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
}

.modal-action:disabled {
  opacity: 0.82;
  cursor: default;
}

.modal-action:hover {
  background: #2563eb;
}

.loading-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: var(--white);
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
}

.sell-step {
  margin-top: 10px;
}

.sell-step .field-label {
  margin-bottom: 7px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-panel {
  padding: 42px 46px 38px;
}

.form-group {
  margin-bottom: 22px;
}

.form-input {
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  outline: none;
  color: var(--gray-800);
  font: inherit;
  font-size: 15px;
}

.password-field {
  position: relative;
}

.password-field .form-input {
  padding-right: 58px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--gray-600);
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: var(--gray-50);
  color: var(--gray-800);
}

.password-toggle .icon {
  width: 17px;
  height: 17px;
}

.password-toggle .eye-off-icon {
  display: none;
}

.password-toggle.is-hidden .eye-icon {
  display: none;
}

.password-toggle.is-hidden .eye-off-icon {
  display: block;
}

.form-input:focus {
  border-color: #bfdbfe;
  box-shadow: 0 0 0 3px var(--blue-50);
}

.form-submit {
  margin-top: 3px;
}

.auth-topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 24px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.auth-main {
  max-width: none;
  min-height: calc(100vh - 174px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 38px 20px;
}

.auth-wrap {
  width: min(100%, 460px);
}

.auth-wrap .card {
  border: 0;
  background: transparent;
  overflow: visible;
}

.auth-wrap .form-panel {
  padding: 0;
}

.auth-wrap .form-group {
  margin-bottom: 17px;
}

.auth-wrap .form-input {
  height: 46px;
  padding: 0 14px;
  font-size: 14px;
}

.auth-wrap .password-field .form-input {
  padding-right: 48px;
}

.auth-wrap .password-toggle {
  right: 9px;
  width: 32px;
  height: 32px;
}

.auth-wrap .password-toggle .icon {
  width: 16px;
  height: 16px;
}

.auth-heading {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding-top: 3px;
  text-align: center;
}

.auth-logo {
  width: 52px;
  height: 52px;
}

.auth-heading h1 {
  margin: 0;
  color: var(--gray-800);
  font-size: 18px;
  font-weight: 600;
}

.auth-switch {
  margin: 17px 0 0;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.auth-switch a {
  color: var(--blue-500);
  font-weight: 600;
}

.auth-switch a:hover {
  color: #2563eb;
}

.auth-alert {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  color: var(--red-600);
  font-size: 13px;
  font-weight: 500;
}

.auth-footer {
  margin-top: 0;
}

.field-note {
  min-height: 16px;
  margin: 7px 0 0;
  color: var(--gray-600);
  font-size: 11.5px;
  font-weight: 500;
}

.field-note.error {
  color: var(--red-600);
}

.field-note.success {
  color: #15803d;
}

.empty-table,
.price-table {
  width: 100%;
  border-collapse: collapse;
}

.empty-table td {
  height: 112px;
  padding: 20px;
  color: var(--gray-600);
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
}

.page-dashboard .empty-table td {
  height: 145px;
  font-size: 14px;
}

.search-box {
  position: relative;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 28px;
  width: 15px;
  height: 15px;
  color: var(--gray-600);
  transform: translateY(-50%);
}

.search-input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  outline: none;
  color: var(--gray-800);
  font: inherit;
  font-size: 13px;
}

.search-input:focus {
  border-color: #bfdbfe;
  box-shadow: 0 0 0 3px var(--blue-50);
}

.price-table th,
.price-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
}

.profile-table th,
.profile-table td {
  padding: 17px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 15px;
}

.profile-table tr:last-child th,
.profile-table tr:last-child td {
  border-bottom: 0;
}

.profile-table th {
  width: 38%;
  background: #f9f9f9;
  color: var(--gray-700);
  font-weight: 500;
}

.profile-table td {
  color: var(--gray-800);
  font-weight: 500;
  white-space: nowrap;
}

.compact-input {
  height: 42px;
  font-size: 13px;
}

.wide-action-button {
  width: 100%;
  min-height: 44px;
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-500);
  border: 1px solid var(--blue-500);
  border-radius: 4px;
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.wide-action-button:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.admin-stat-value {
  margin: 0;
  color: var(--gray-800);
  font-size: 18px;
  font-weight: 600;
}

.admin-user-table {
  min-width: 720px;
}

.admin-user-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-user-name p {
  margin: 0;
  color: var(--gray-800);
  font-weight: 600;
}

.user-edit-icon {
  width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--blue-500);
  border-radius: 4px;
  color: var(--white);
}

.user-edit-icon:hover {
  background: #2563eb;
}

.user-edit-icon .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}

.folder-action-button {
  width: 34px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  background: var(--blue-500);
  border-radius: 4px;
  color: var(--white);
}

.folder-action-button:hover {
  background: #2563eb;
}

.folder-action-button .icon {
  width: 16px;
  height: 16px;
  stroke-width: 1.9;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-top: 4px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.status-badge.danger {
  background: #fef2f2;
  color: var(--red-600);
}

.status-badge.success {
  background: #f0fdf4;
  color: #15803d;
}

.status-badge.warning {
  background: #fffbeb;
  color: #b45309;
}

.status-badge.neutral {
  background: var(--gray-100);
  color: var(--gray-700);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: -4px;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 500;
}

.checkbox-row input {
  width: 15px;
  height: 15px;
  accent-color: var(--blue-500);
}

.modal-danger-form {
  padding-top: 0;
}

.danger-wide-button {
  width: 100%;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red-600);
  border-radius: 4px;
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
}

.danger-wide-button:hover {
  background: #b91c1c;
}

.admin-session-modal {
  width: min(100%, 620px);
}

.session-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.session-tab {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 600;
}

.session-tab.active,
.session-tab:hover {
  background: var(--blue-500);
  border-color: var(--blue-500);
  color: var(--white);
}

.session-tab .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}

.session-panel {
  display: none;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.session-panel.active {
  display: block;
}

.session-search-box {
  padding: 12px;
}

.session-scroll {
  max-height: 310px;
  overflow-y: auto;
}

.session-block {
  margin-bottom: 16px;
}

.session-block:last-child {
  margin-bottom: 0;
}

.settings-page {
  width: min(100%, 620px);
  margin: 16px auto 0;
  padding: 32px 24px 24px;
}

.settings-card {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 2px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-200);
}

.settings-card-head .icon {
  width: 18px;
  height: 18px;
  color: var(--gray-700);
}

.settings-card-head h1 {
  margin: 0;
  color: var(--gray-800);
  font-size: 16px;
  font-weight: 500;
}

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--gray-100);
  color: var(--gray-800);
  font-size: 14px;
  font-weight: 700;
}

.settings-section-title .icon {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.settings-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-700);
  font-size: 13.5px;
  font-weight: 500;
}

.settings-control {
  display: flex;
  align-items: center;
  padding: 7px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.settings-control:focus-within {
  border-color: var(--gray-600);
  box-shadow: 0 0 0 1px var(--gray-600);
}

.settings-control input,
.settings-field textarea {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--gray-800);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
}

.settings-control input {
  height: 38px;
  padding: 0 10px;
}

.settings-suffix {
  padding: 0 10px;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 500;
}

.unit-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  margin-right: 4px;
  background: var(--gray-100);
  border-radius: 2px;
}

.unit-toggle-btn {
  padding: 6px 14px;
  border: 0;
  background: transparent;
  color: var(--gray-600);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s ease, color 0.15s ease;
}

.unit-toggle-btn:hover {
  color: var(--gray-800);
}

.unit-toggle-btn.active {
  background: var(--gray-700);
  color: var(--white);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.reason-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gray-600);
  cursor: pointer;
  vertical-align: middle;
  transition: color 0.15s ease;
}

.reason-info-btn:hover {
  color: var(--gray-800);
}

.reason-info-btn .icon {
  width: 16px;
  height: 16px;
}

.reason-modal {
  max-width: 360px;
}

.reason-text {
  margin: 0 0 16px 0;
  padding: 12px 14px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 2px;
  color: var(--gray-800);
  font-size: 13.5px;
  line-height: 1.5;
}

.session-stat-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.session-stat-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 2px;
  background: var(--gray-50);
}

.session-stat-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.session-stat-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-800);
}

.session-stat-success .session-stat-value {
  color: #16a34a;
}

.session-stat-danger .session-stat-value {
  color: #dc2626;
}

.settings-field textarea {
  min-height: 96px;
  padding: 13px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 2px;
  resize: none;
}

.settings-field textarea:focus {
  border-color: var(--gray-600);
  box-shadow: 0 0 0 1px var(--gray-600);
}

.settings-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-file-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.settings-file-button:hover {
  background: var(--gray-100);
}

.settings-file-button .icon {
  width: 15px;
  height: 15px;
}

.settings-file-name {
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 500;
}

.settings-logo-preview {
  margin-top: 8px;
}

.settings-logo-preview img {
  height: 58px;
  width: auto;
  max-width: 160px;
  object-fit: cover;
}

.settings-help {
  margin: 6px 0 0;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 500;
}

.settings-submit-wrap {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}

.settings-submit {
  width: 100%;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--blue-500);
  border-radius: 2px;
  color: var(--white);
  font-size: 13.5px;
  font-weight: 500;
}

.settings-submit:hover {
  background: #2563eb;
}

.settings-submit .icon {
  width: 15px;
  height: 15px;
}

.settings-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 500;
}

.settings-notice.dismissible-notice {
  transition: opacity 0.2s ease, transform 0.2s ease, margin 0.2s ease, padding 0.2s ease, border-width 0.2s ease;
}

.settings-notice.is-dismissed {
  height: 0;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
}

.settings-notice p {
  flex: 1;
  margin: 0;
}

.notice-close {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 4px;
  color: currentColor;
  opacity: 0.72;
}

.notice-close:hover {
  background: rgba(17, 24, 39, 0.06);
  opacity: 1;
}

.notice-close .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.settings-notice-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
}

.settings-notice-icon .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

.settings-notice.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.settings-notice.success .settings-notice-icon {
  background: #dcfce7;
}

.settings-notice.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--red-600);
}

.settings-notice.error .settings-notice-icon {
  background: #fee2e2;
}

.price-table th {
  background: #f9f9f9;
  color: var(--gray-700);
  font-weight: 500;
}

.price-action-head,
.price-action-cell {
  width: 128px;
  text-align: right;
}

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

.country-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.flag-id {
  width: 26px;
  height: 18px;
  display: inline-block;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.08);
}

.flag-id::before,
.flag-id::after {
  content: "";
  display: block;
  height: 50%;
}

.flag-id::before {
  background: #ef4444;
}

.flag-id::after {
  background: #ffffff;
}

.flag-us,
.flag-my,
.flag-sg,
.flag-ca,
.flag-unknown {
  width: 26px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.08);
  font-size: 11px;
  line-height: 1;
}

.flag-us {
  background: linear-gradient(#ef4444 0 14%, #fff 14% 28%, #ef4444 28% 42%, #fff 42% 56%, #ef4444 56% 70%, #fff 70% 84%, #ef4444 84%);
}

.flag-my {
  background: linear-gradient(#ef4444 0 14%, #fff 14% 28%, #ef4444 28% 42%, #fff 42% 56%, #ef4444 56% 70%, #fff 70% 84%, #ef4444 84%);
}

.flag-sg {
  background: linear-gradient(#ef4444 0 50%, #ffffff 50%);
}

.flag-ca {
  background: linear-gradient(90deg, #ef4444 0 25%, #ffffff 25% 75%, #ef4444 75%);
}

.flag-unknown {
  background: var(--gray-100);
  color: var(--gray-600);
}

.flag-unknown::before {
  content: "?";
  font-size: 10px;
  font-weight: 600;
}

.flag-frame {
  width: 26px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 3px;
  background: var(--gray-50);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.08);
  font-size: 16px;
  line-height: 1;
}

.flag-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.country-code {
  color: var(--gray-600);
  font-weight: 500;
}

.price-value {
  color: var(--gray-800);
  font-weight: 600;
}

.activate-table td {
  font-weight: 500;
}

.activate-search-box {
  padding: 12px 14px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll .price-table {
  min-width: 660px;
}

.activate-table th,
.activate-table td {
  white-space: nowrap;
}

.activate-phone-cell {
  min-width: 156px;
}

.activate-empty-row td {
  height: 86px;
  color: var(--gray-600);
  text-align: center;
}

.activate-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}

.pagination-button {
  min-width: 34px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  background: var(--white);
  color: var(--gray-700);
  font-size: 12.5px;
  font-weight: 600;
}

.pagination-button:hover,
.pagination-button.active {
  background: var(--gray-700);
  border-color: var(--gray-700);
  color: var(--white);
}

.countdown-cell {
  color: var(--gray-800);
  font-weight: 600;
  white-space: nowrap;
}

.countdown-cell.is-finished {
  color: #15803d;
}

.price-detail-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  background: var(--blue-500);
  border: 1px solid var(--blue-500);
  border-radius: 4px;
  color: var(--white);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.price-detail-button:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: var(--white);
}

.price-detail-button .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}

.admin-price-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.price-delete-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  background: var(--red-600);
  border: 1px solid var(--red-600);
  border-radius: 4px;
  color: var(--white);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.price-delete-button:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.price-delete-button .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.46);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.confirm-backdrop.open {
  display: flex;
}

.confirm-dialog {
  width: min(100%, 360px);
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  box-shadow: 0 24px 64px rgba(17, 24, 39, 0.2);
}

.confirm-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  background: #fef2f2;
  border-radius: 4px;
  color: var(--red-600);
}

.confirm-icon .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.confirm-content h2 {
  margin: 0 0 7px;
  color: var(--gray-800);
  font-size: 16px;
  font-weight: 600;
}

.confirm-content p {
  margin: 0;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.confirm-cancel,
.confirm-submit {
  min-height: 38px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

.confirm-cancel {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
}

.confirm-cancel:hover {
  background: var(--gray-100);
}

.confirm-submit {
  background: var(--red-600);
  border: 1px solid var(--red-600);
  color: var(--white);
}

.confirm-submit:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.price-modal {
  width: min(100%, 440px);
}

.price-country-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.price-country-head p {
  margin: 0 0 3px;
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 500;
}

.price-country-head strong {
  display: block;
  color: var(--gray-800);
  font-size: 13.5px;
  font-weight: 600;
}

.price-detail-table {
  border: 1px solid var(--border);
}

.price-detail-table th,
.price-detail-table td {
  padding: 13px 14px;
}

.price-detail-table th {
  width: 45%;
}

.price-detail-table td {
  color: var(--gray-800);
  font-weight: 600;
}

.footer {
  position: relative;
  left: 0;
  bottom: 0;
  width: 100%;
  margin-top: 18px;
  padding: 12px 16px;
  background: #dbeafe;
  text-align: center;
  flex: 0 0 auto;
}

.page-dashboard .footer {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 30;
  margin-top: 0;
}

.footer p {
  margin: 0;
  font-size: 11.5px;
  font-weight: 500;
}

.page-profile .page-wrap {
  padding-top: 22px;
  padding-bottom: 10px;
}

.page-profile .footer {
  margin-top: 0;
}

.footer .help-title {
  color: var(--gray-800);
  margin-bottom: 4px;
}

.footer .help-link {
  color: #2563eb;
}

.footer .help-link a {
  color: inherit;
  text-decoration: underline;
}

.footer .help-link a:hover {
  color: var(--gray-800);
}

@media (max-width: 767px) {
  .topbar {
    padding: 0 18px 0 10px;
  }

  .logo-link span {
    display: none;
  }

  main {
    max-width: none;
  }

  .page-wrap {
    width: 100%;
    margin-top: 14px;
    padding: 18px 28px 8px;
  }

  .page-dashboard main {
    min-height: auto;
  }

  .page-dashboard .page-wrap {
    width: 100%;
    padding: 18px 28px 88px;
  }

  .page-dashboard .balance-card,
  .total-sell-card {
    margin-bottom: 14px;
  }

  .page-dashboard .card-title {
    padding: 8px 12px;
  }

  .page-dashboard .card-title span,
  .page-dashboard .card-title p {
    font-size: 13px;
  }

  .page-dashboard .card-body {
    padding: 15px 12px;
  }

  .page-dashboard .balance-text,
  .page-dashboard .total-sell-value {
    font-size: 16px;
  }

  .page-dashboard .detail-header h2 {
    font-size: 14px;
  }

  .page-dashboard .sell-button {
    min-height: 30px;
    padding: 0 11px;
    font-size: 12px;
  }

  .page-dashboard .empty-table td {
    height: 112px;
    font-size: 13px;
  }

  .detail-header {
    align-items: center;
  }

  .price-table th,
  .price-table td {
    padding: 12px;
  }

  .price-action-head,
  .price-action-cell {
    width: 94px;
  }

  .price-detail-button {
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
  }

  .form-panel {
    padding: 32px 20px 28px;
  }

  .phone-field {
    grid-template-columns: 124px minmax(0, 1fr);
  }

  .country-list {
    width: min(258px, calc(100vw - 48px));
  }

  .settings-page {
    padding: 28px 24px 18px;
  }

  .settings-card {
    padding: 20px;
  }
}
