/* =====================================================================
   Kvill — Settings Modal Visual Layer
   Full-screen modal with sidebar nav, tabbed content.
   z-index: 9998 (below topup sheet at 10001, above shortcuts at 9999)

   Depends on: style.css tokens (--text-0..3, --bg-solid, --border, --canvas)
   ===================================================================== */


/* =====================================================================
   1. ICON SYSTEM (CSS mask-image)
   Base .icon class + all icon-* variants used by settings modal.
   ===================================================================== */

.icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  flex-shrink: 0;
  vertical-align: middle;
}

.icon-user {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}
.icon-shield {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3C/svg%3E");
}
.icon-wallet {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2.5'/%3E%3Cpath d='M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2.5'/%3E%3Cpath d='M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4'/%3E%3C/svg%3E");
}
.icon-chart {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='12' width='4' height='9' rx='1'/%3E%3Crect x='10' y='8' width='4' height='13' rx='1'/%3E%3Crect x='17' y='3' width='4' height='18' rx='1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='12' width='4' height='9' rx='1'/%3E%3Crect x='10' y='8' width='4' height='13' rx='1'/%3E%3Crect x='17' y='3' width='4' height='18' rx='1'/%3E%3C/svg%3E");
}
.icon-palette {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z'/%3E%3Ccircle cx='13.5' cy='6.5' r='.5' fill='%23000'/%3E%3Ccircle cx='17.5' cy='10.5' r='.5' fill='%23000'/%3E%3Ccircle cx='6.5' cy='12.5' r='.5' fill='%23000'/%3E%3Ccircle cx='8.5' cy='7.5' r='.5' fill='%23000'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z'/%3E%3Ccircle cx='13.5' cy='6.5' r='.5' fill='%23000'/%3E%3Ccircle cx='17.5' cy='10.5' r='.5' fill='%23000'/%3E%3Ccircle cx='6.5' cy='12.5' r='.5' fill='%23000'/%3E%3Ccircle cx='8.5' cy='7.5' r='.5' fill='%23000'/%3E%3C/svg%3E");
}
.icon-globe {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20'/%3E%3Cpath d='M2 12h20'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20'/%3E%3Cpath d='M2 12h20'/%3E%3C/svg%3E");
}
.icon-pencil {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z'/%3E%3Cpath d='m15 5 4 4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z'/%3E%3Cpath d='m15 5 4 4'/%3E%3C/svg%3E");
}
.icon-logout {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3C/svg%3E");
}
.icon-check {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.icon-external {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E");
}
.icon-arrow-up {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5'/%3E%3Cpath d='m5 12 7-7 7 7'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5'/%3E%3Cpath d='m5 12 7-7 7 7'/%3E%3C/svg%3E");
}
.icon-send {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z'/%3E%3Cpath d='m21.854 2.147-10.94 10.939'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z'/%3E%3Cpath d='m21.854 2.147-10.94 10.939'/%3E%3C/svg%3E");
}
.icon-mail {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E");
}
.icon-doc {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='8' y1='13' x2='16' y2='13'/%3E%3Cline x1='8' y1='17' x2='13' y2='17'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='8' y1='13' x2='16' y2='13'/%3E%3Cline x1='8' y1='17' x2='13' y2='17'/%3E%3C/svg%3E");
}
.icon-chevron {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  width: 14px; height: 14px;
}
.icon-x {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
  width: 12px; height: 12px;
}
.icon-settings {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.icon-keyboard {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='M6 8h.01M10 8h.01M14 8h.01M18 8h.01M6 12h.01M10 12h.01M14 12h.01M18 12h.01M8 16h8'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='M6 8h.01M10 8h.01M14 8h.01M18 8h.01M6 12h.01M10 12h.01M14 12h.01M18 12h.01M8 16h8'/%3E%3C/svg%3E");
}
.icon-sparkle {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3L12 3Z'/%3E%3Cpath d='M5 3v4M3 5h4M19 17v4M17 19h4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3L12 3Z'/%3E%3Cpath d='M5 3v4M3 5h4M19 17v4M17 19h4'/%3E%3C/svg%3E");
}
.icon-help {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
}


/* =====================================================================
   2. SETTINGS MODAL CSS VARIABLES
   Mapped to production tokens where possible, with sm-specific additions.
   ===================================================================== */

:root {
  /* Settings modal variables — Light */
  --sm-bg-2: #f5f5f7;
  --sm-bg-3: #ecedf0;
  --sm-text-3: #b0b3bf;
  --sm-overlay-bg: rgba(0, 0, 0, 0.4);
  --sm-card-border: rgba(0, 0, 0, 0.06);
  --sm-card-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.04);
  --sm-cta-bg: #1a1a1a;
  --sm-cta-text: #ffffff;
  --sm-cta-hover: #333333;
  --sm-chart-bar: rgba(0, 0, 0, 0.14);
  --sm-chart-bar-active: #1a1a1a;
  --sm-tooltip-bg: #1a1a1a;
  --sm-tooltip-text: #ffffff;
  --sm-pill-bg: rgba(0, 0, 0, 0.05);
  --sm-pill-active-bg: rgba(0, 0, 0, 0.08);
  --sm-avg-line: rgba(0, 0, 0, 0.12);
  --sm-input-bg: rgba(0, 0, 0, 0.04);
  --sm-input-border: rgba(0, 0, 0, 0.10);
  --sm-input-focus: rgba(41, 151, 255, 0.3);
  --sm-danger: #ef4444;
  --sm-danger-bg: rgba(239, 68, 68, 0.06);
  --sm-nav-section: #8b8fa3;
  --sm-modal-bg: #ffffff;
  --sm-modal-sidebar-bg: #f8f8fa;
  --sm-modal-shadow: 0 24px 80px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.06);
  --sm-kbd-bg: rgba(0,0,0,0.06);
  --sm-kbd-border: rgba(0,0,0,0.10);
  --sm-theme-card-bg: #f5f5f7;
  --sm-theme-card-border: rgba(0,0,0,0.08);
  --sm-theme-card-active-border: #1a1a1a;
  --sm-positive: #22c55e;
  --sm-positive-bg: rgba(34, 197, 94, 0.08);
  --sm-accent-dim: rgba(41, 151, 255, 0.08);

  /* Prototype variables mapped to production */
  --text-primary: var(--text-0);
  --text-secondary: var(--text-2);
  --text-tertiary: var(--text-3);
  --hover-bg: rgba(0,0,0,0.04);
  --active-bg: rgba(0,0,0,0.08);
  --divider: rgba(0,0,0,0.06);
  --scrollbar-thumb: rgba(0,0,0,0.12);
}

[data-theme="dark"] {
  --sm-bg-2: #1e1e22;
  --sm-bg-3: #27272a;
  --sm-text-3: #52525b;
  --sm-overlay-bg: rgba(0, 0, 0, 0.6);
  --sm-card-border: rgba(255, 255, 255, 0.06);
  --sm-card-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.04);
  --sm-cta-bg: #ffffff;
  --sm-cta-text: #18181b;
  --sm-cta-hover: #e4e4e7;
  --sm-chart-bar: rgba(255, 255, 255, 0.08);
  --sm-chart-bar-active: #e4e4e7;
  --sm-tooltip-bg: #e4e4e7;
  --sm-tooltip-text: #18181b;
  --sm-pill-bg: rgba(255, 255, 255, 0.05);
  --sm-pill-active-bg: rgba(255, 255, 255, 0.08);
  --sm-avg-line: rgba(255, 255, 255, 0.08);
  --sm-input-bg: rgba(255, 255, 255, 0.06);
  --sm-input-border: rgba(255, 255, 255, 0.10);
  --sm-input-focus: rgba(41, 151, 255, 0.3);
  --sm-danger: #f87171;
  --sm-danger-bg: rgba(248, 113, 113, 0.08);
  --sm-nav-section: #52525b;
  --sm-modal-bg: #1c1c1f;
  --sm-modal-sidebar-bg: #141416;
  --sm-modal-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 8px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.06);
  --sm-kbd-bg: rgba(255,255,255,0.06);
  --sm-kbd-border: rgba(255,255,255,0.10);
  --sm-theme-card-bg: rgba(255,255,255,0.04);
  --sm-theme-card-border: rgba(255,255,255,0.08);
  --sm-theme-card-active-border: #ffffff;
  --sm-positive: #4ade80;
  --sm-positive-bg: rgba(74, 222, 128, 0.10);
  --sm-accent-dim: rgba(41, 151, 255, 0.10);

  --text-primary: var(--text-0);
  --text-secondary: var(--text-2);
  --text-tertiary: var(--text-3);
  --hover-bg: rgba(255,255,255,0.05);
  --active-bg: rgba(255,255,255,0.10);
  --divider: rgba(255,255,255,0.06);
  --scrollbar-thumb: rgba(255,255,255,0.12);
}


/* =====================================================================
   3. SETTINGS MODAL — LAYOUT
   ===================================================================== */

/* Backdrop */
.settings-backdrop {
  position: fixed;
  inset: 0;
  background: var(--sm-overlay-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  animation: smBackdropIn 300ms cubic-bezier(0.32, 0.72, 0, 1) forwards;
  display: none;
}
.settings-backdrop.visible { display: block; }
@keyframes smBackdropIn { to { opacity: 1; } }
@keyframes smBackdropOut { to { opacity: 0; } }

/* Modal */
.settings-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: 720px;
  height: 80vh;
  max-height: 640px;
  background: var(--sm-modal-bg);
  border-radius: 14px;
  box-shadow: var(--sm-modal-shadow);
  display: none;
  overflow: hidden;
  z-index: 9999;
  opacity: 0;
  animation: smModalIn 350ms cubic-bezier(0.32, 0.72, 0, 1) forwards;
}
.settings-modal.visible { display: flex; }
@keyframes smModalIn {
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes smModalOut {
  to { transform: translate(-50%, -50%) scale(0.96); opacity: 0; }
}

/* Modal Sidebar Nav */
.settings-modal .sm-sidebar {
  width: 200px;
  min-width: 200px;
  background: var(--sm-modal-sidebar-bg);
  border-right: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  overflow-y: auto;
  scrollbar-width: none;
}
.settings-modal .sm-sidebar::-webkit-scrollbar { display: none; }

.sm-nav-section-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sm-nav-section);
  padding: 16px 16px 6px 16px;
  user-select: none;
}
.sm-nav-section-label:first-child { padding-top: 4px; }

.sm-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  margin: 0 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: background 50ms ease, color 50ms ease;
  user-select: none;
  border: none;
  background: none;
  width: calc(100% - 16px);
  text-align: left;
  font-family: inherit;
}
.sm-nav-item:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}
.sm-nav-item.active {
  background: var(--active-bg);
  color: var(--text-primary);
  font-weight: 500;
}
.sm-nav-item .icon { width: 16px; height: 16px; flex-shrink: 0; }

/* Modal Content */
.sm-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.sm-header {
  flex-shrink: 0;
  padding: 20px 24px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sm-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.sm-close {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--hover-bg);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background 50ms ease, color 50ms ease;
}
.sm-close:hover {
  background: var(--active-bg);
  color: var(--text-primary);
}

.sm-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 24px 32px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
.sm-body::-webkit-scrollbar { width: 4px; }
.sm-body::-webkit-scrollbar-track { background: transparent; }
.sm-body::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }

/* Tab content */
.sm-tab {
  display: none;
  animation: smTabFadeIn 200ms ease forwards;
}
.sm-tab.active { display: block; }
@keyframes smTabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}


/* =====================================================================
   4. FORM STYLES
   ===================================================================== */

.sm-field-group { margin-bottom: 20px; }
.sm-field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-bottom: 6px;
  display: block;
}
.sm-field-input {
  width: 100%;
  height: 38px;
  background: var(--sm-input-bg);
  border: 1px solid var(--sm-input-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  padding: 0 12px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.sm-field-input:focus {
  border-color: #2997ff;
  box-shadow: 0 0 0 3px var(--sm-input-focus);
}
.sm-field-input::placeholder { color: var(--sm-text-3); }

.sm-section-divider {
  height: 1px;
  background: var(--divider);
  margin: 20px 0;
}

.sm-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  background: var(--sm-cta-bg);
  color: var(--sm-cta-text);
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 50ms ease, transform 80ms ease;
  letter-spacing: -0.01em;
}
.sm-btn-primary:hover { background: var(--sm-cta-hover); }
.sm-btn-primary:active { transform: scale(0.98); }

.sm-btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--sm-danger-bg);
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--sm-danger);
  cursor: pointer;
  transition: background 50ms ease;
}
.sm-btn-danger:hover { background: rgba(239, 68, 68, 0.12); }
.sm-btn-danger .icon { width: 15px; height: 15px; }


/* =====================================================================
   5. PROFILE TAB
   ===================================================================== */

.sm-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.sm-profile-header .sm-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--active-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
  user-select: none;
}
.sm-profile-info { flex: 1; min-width: 0; }
.sm-profile-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}
.sm-profile-name .sm-edit-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sm-text-3);
  transition: background 50ms ease, color 50ms ease;
}
.sm-profile-name .sm-edit-btn:hover {
  background: var(--hover-bg);
  color: var(--text-secondary);
}
.sm-profile-name .sm-edit-btn .icon { width: 13px; height: 13px; }
.sm-profile-email {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sm-profile-email .sm-change-link {
  font-size: 12px;
  color: #2997ff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
}
.sm-profile-email .sm-change-link:hover { text-decoration: underline; }
.sm-profile-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}


/* =====================================================================
   6. TOPUP TAB
   ===================================================================== */

.sm-topup-balance { text-align: center; margin-bottom: 28px; }
.sm-topup-balance-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}
.sm-topup-balance-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 48px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.sm-topup-balance-amount .sm-currency {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-tertiary);
  margin-left: 3px;
}
.sm-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.sm-preset-btn {
  height: 44px;
  border: 1px solid var(--sm-card-border);
  border-radius: 10px;
  background: var(--sm-input-bg);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 50ms ease, border-color 80ms ease, transform 80ms ease;
  user-select: none;
  font-variant-numeric: tabular-nums;
}
.sm-preset-btn:hover { background: var(--hover-bg); border-color: var(--sm-text-3); }
.sm-preset-btn.selected { border-color: var(--text-primary); background: var(--active-bg); }
.sm-preset-btn:active { transform: scale(0.97); }
.sm-topup-custom-row { display: flex; gap: 8px; margin-bottom: 20px; }
.sm-topup-custom-input {
  flex: 1;
  height: 44px;
  background: var(--sm-input-bg);
  border: 1px solid var(--sm-input-border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 0 14px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  font-variant-numeric: tabular-nums;
}
.sm-topup-custom-input:focus { border-color: #2997ff; box-shadow: 0 0 0 3px var(--sm-input-focus); }
.sm-topup-custom-input::placeholder { color: var(--sm-text-3); font-weight: 500; }
.sm-topup-custom-currency {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--sm-text-3);
  background: var(--sm-input-bg);
  border: 1px solid var(--sm-input-border);
  border-radius: 10px;
  user-select: none;
}
.sm-topup-cta {
  width: 100%;
  height: 48px;
  background: var(--sm-cta-bg);
  color: var(--sm-cta-text);
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 50ms ease, transform 80ms ease;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.sm-topup-cta:hover { background: var(--sm-cta-hover); }
.sm-topup-cta:active { transform: scale(0.98); }
.sm-topup-disclaimer { font-size: 11.5px; color: var(--sm-text-3); text-align: center; }

/* Trust line — minimal, clean */
.sm-topup-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 20px;
  opacity: 0.5;
  transition: opacity 200ms ease;
}
.sm-topup-trust:hover { opacity: 0.65; }
.sm-trust-shield { color: var(--text-primary, #1a1d2e); flex-shrink: 0; width: 16px; height: 16px; }
[data-theme="dark"] .sm-trust-shield { color: #e4e4e7; }
.sm-trust-text { font-size: 13px; color: var(--text-primary, #1a1d2e); }
[data-theme="dark"] .sm-trust-text { color: #e4e4e7; }
.sm-tbank-logo { height: 16px; flex-shrink: 0; }
.sm-tbank-dark { display: block; }
.sm-tbank-light { display: none; }
/* tbank-dark used in both themes */


/* =====================================================================
   7. SPENDING TAB
   ===================================================================== */

.sm-accomplishment-strip {
  background: var(--sm-bg-2);
  border: 1px solid var(--sm-card-border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  text-align: center;
}
.sm-accomplishment-period { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 6px; }
.sm-accomplishment-value { font-size: 15px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.01em; margin-bottom: 2px; }
.sm-accomplishment-cost { font-size: 12px; font-weight: 400; color: var(--text-tertiary); }

.sm-period-selector {
  display: flex;
  gap: 0;
  background: var(--sm-pill-bg);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 20px;
  position: relative;
}
.sm-period-pill {
  flex: 1;
  padding: 7px 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color 120ms ease;
  position: relative;
  z-index: 1;
  user-select: none;
}
.sm-period-pill:hover { color: var(--text-secondary); }
.sm-period-pill.active { color: var(--text-primary); font-weight: 600; }
.sm-period-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  height: calc(100% - 6px);
  background: var(--sm-pill-active-bg);
  border-radius: 8px;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1), width 200ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* Chart */
.sm-section { margin-bottom: 24px; }
.sm-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sm-section-title { font-size: 13px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.01em; }
.sm-section-meta { font-size: 11px; font-weight: 400; color: var(--text-tertiary); }

.sm-chart-container {
  position: relative;
  height: 110px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding-bottom: 20px;
}
.sm-chart-avg-line {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  border-top: 1px dashed var(--sm-avg-line);
  pointer-events: none;
  z-index: 1;
}
.sm-chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}
.sm-chart-bar {
  width: 100%;
  max-width: 18px;
  border-radius: 3px 3px 1px 1px;
  background: var(--sm-chart-bar);
  transition: background 80ms ease;
  cursor: pointer;
  position: relative;
  min-height: 2px;
  transform-origin: bottom;
  animation: smBarGrow 400ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.sm-chart-bar.today { background: #2997ff; }
.sm-chart-bar:hover { background: var(--sm-chart-bar-active); }
.sm-chart-bar.today:hover { background: #2997ff; filter: brightness(1.15); }
.sm-chart-bar-label {
  position: absolute;
  bottom: -16px;
  font-size: 9px;
  font-weight: 500;
  color: var(--sm-text-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.sm-chart-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--sm-tooltip-bg);
  color: var(--sm-tooltip-text);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 9px;
  border-radius: 7px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 80ms ease;
  z-index: 10;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.sm-chart-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--sm-tooltip-bg);
}
.sm-chart-bar-col:hover .sm-chart-tooltip { opacity: 1; }
@keyframes smBarGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

/* Presentation list */
.sm-pres-list { display: flex; flex-direction: column; gap: 1px; }
.sm-pres-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 50ms ease;
  cursor: pointer;
}
.sm-pres-item:hover { background: var(--hover-bg); }
.sm-pres-icon {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: var(--hover-bg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text-tertiary);
}
.sm-pres-icon .icon { width: 15px; height: 15px; }
.sm-pres-info { flex: 1; min-width: 0; }
.sm-pres-title {
  font-size: 13px; font-weight: 500; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3;
}
.sm-pres-meta { font-size: 11px; color: var(--text-tertiary); line-height: 1.3; margin-top: 1px; }
.sm-pres-cost { text-align: right; flex-shrink: 0; }
.sm-pres-cost-amount {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.sm-show-all-btn {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  width: 100%; padding: 8px 0; margin-top: 2px;
  background: none; border: none; font-family: inherit;
  font-size: 12px; font-weight: 500; color: var(--text-tertiary);
  cursor: pointer; border-radius: 8px;
  transition: background 50ms ease, color 50ms ease;
}
.sm-show-all-btn:hover { background: var(--hover-bg); color: var(--text-secondary); }
.sm-show-all-btn .icon { width: 12px; height: 12px; transition: transform 200ms ease; }
.sm-show-all-btn.expanded .icon { transform: rotate(180deg); }

/* Transaction history */
.sm-tx-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 10px 10px;
  background: none; border: none; font-family: inherit;
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  cursor: pointer; border-radius: 8px;
  transition: background 50ms ease; letter-spacing: -0.01em;
}
.sm-tx-toggle:hover { background: var(--hover-bg); }
.sm-tx-toggle .icon { width: 14px; height: 14px; color: var(--text-tertiary); transition: transform 200ms ease; }
.sm-tx-toggle.expanded .icon { transform: rotate(180deg); }
.sm-tx-body { display: none; }
.sm-tx-body.expanded { display: block; }
.sm-tx-group-header {
  font-size: 11px; font-weight: 500; color: var(--text-tertiary);
  padding: 12px 10px 4px; letter-spacing: 0.02em;
}
.sm-tx-group-header:first-child { padding-top: 4px; }
.sm-tx-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 8px;
  transition: background 50ms ease; cursor: default;
}
.sm-tx-item:hover { background: var(--hover-bg); }
.sm-tx-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sm-tx-dot.topup { background: var(--sm-positive-bg); color: var(--sm-positive); }
.sm-tx-dot.usage { background: var(--hover-bg); color: var(--text-tertiary); }
.sm-tx-dot .icon { width: 14px; height: 14px; }
.sm-tx-info { flex: 1; min-width: 0; }
.sm-tx-desc { font-size: 12.5px; color: var(--text-primary); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-tx-time { font-size: 11px; color: var(--text-tertiary); line-height: 1.3; margin-top: 1px; }
.sm-tx-amount-col { text-align: right; flex-shrink: 0; }
.sm-tx-amount { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.3; letter-spacing: -0.01em; }
.sm-tx-amount.positive { color: var(--sm-positive); }
.sm-tx-amount.neutral { color: var(--text-secondary); }
.sm-tx-balance { font-size: 10px; color: var(--sm-text-3); font-variant-numeric: tabular-nums; margin-top: 1px; }
.sm-tx-requests { font-size: 10px; color: var(--sm-text-3); margin-top: 1px; }


/* =====================================================================
   8. APPEARANCE TAB
   ===================================================================== */

.sm-theme-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px;
}
.sm-theme-card {
  border: 2px solid var(--sm-theme-card-border);
  border-radius: 10px; padding: 0; cursor: pointer;
  transition: border-color 120ms ease, transform 80ms ease;
  overflow: hidden; background: none;
  font-family: inherit; text-align: center;
}
.sm-theme-card:hover { border-color: var(--sm-text-3); }
.sm-theme-card.active { border-color: var(--sm-theme-card-active-border); }
.sm-theme-card:active { transform: scale(0.97); }
.sm-theme-preview {
  height: 72px; border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.sm-theme-preview-light { background: #f0f2f7; }
.sm-theme-preview-light::after {
  content: ''; display: block; width: 36px; height: 36px; border-radius: 8px;
  background: #ffffff; box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.sm-theme-preview-dark { background: #08090a; }
.sm-theme-preview-dark::after {
  content: ''; display: block; width: 36px; height: 36px; border-radius: 8px;
  background: #1e1e22; box-shadow: 0 1px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.sm-theme-preview-auto { background: linear-gradient(135deg, #f0f2f7 50%, #08090a 50%); }
.sm-theme-preview-auto::after {
  content: ''; display: block; width: 36px; height: 36px; border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 50%, #1e1e22 50%);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.sm-theme-card-label {
  padding: 10px; font-size: 12px; font-weight: 500;
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.sm-theme-card.active .sm-theme-card-label { color: var(--text-primary); font-weight: 600; }
.sm-theme-card-label .icon-check { width: 13px; height: 13px; display: none; }
.sm-theme-card.active .sm-theme-card-label .icon-check { display: inline-block; }


/* =====================================================================
   9. LANGUAGE TAB
   ===================================================================== */

.sm-lang-section-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }
.sm-lang-options { display: flex; gap: 8px; }
.sm-lang-btn {
  flex: 1; height: 40px;
  border: 1px solid var(--sm-card-border); border-radius: 8px;
  background: none; font-family: inherit; font-size: 13px; font-weight: 400;
  color: var(--text-secondary); cursor: pointer;
  transition: border-color 80ms ease, background 50ms ease;
}
.sm-lang-btn:hover { background: var(--hover-bg); border-color: var(--sm-text-3); }
.sm-lang-btn.active { border-color: var(--text-primary); background: var(--active-bg); color: var(--text-primary); font-weight: 500; }


/* =====================================================================
   10. SHORTCUTS TAB
   ===================================================================== */

.sm-shortcuts-grid { display: flex; flex-direction: column; gap: 2px; }
.sm-shortcut-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 10px; border-radius: 8px; transition: background 50ms ease;
}
.sm-shortcut-row:hover { background: var(--hover-bg); }
.sm-shortcut-label { font-size: 13px; color: var(--text-primary); }
.sm-shortcut-keys { display: flex; gap: 4px; }
.sm-shortcut-keys kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 24px; padding: 0 6px;
  background: var(--sm-kbd-bg); border: 1px solid var(--sm-kbd-border);
  border-radius: 5px; font-family: inherit; font-size: 11px; font-weight: 500;
  color: var(--text-secondary); user-select: none;
}


/* =====================================================================
   11. HELP TAB
   ===================================================================== */

.sm-help-links { display: flex; flex-direction: column; gap: 2px; }
.sm-help-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px; border-radius: 8px;
  text-decoration: none; color: var(--text-primary);
  transition: background 50ms ease; cursor: pointer;
}
.sm-help-link:hover { background: var(--hover-bg); }
.sm-help-link-icon {
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--hover-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary); flex-shrink: 0;
}
.sm-help-link-icon .icon { width: 15px; height: 15px; }
.sm-help-link-text { font-size: 13px; font-weight: 500; }
.sm-help-link-desc { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }
.sm-help-link .icon-external { width: 13px; height: 13px; color: var(--sm-text-3); margin-left: auto; }
.sm-version-block { text-align: center; padding: 24px 0 0 0; color: var(--sm-text-3); font-size: 12px; }




/* =====================================================================
   13. MOBILE NAV (horizontal scroll, hidden on desktop)
   ===================================================================== */

.sm-mobile-nav {
  display: none;
  overflow-x: auto;
  gap: 2px;
  padding: 12px 20px 0 20px;
  flex-shrink: 0;
  scrollbar-width: none;
}
.sm-mobile-nav::-webkit-scrollbar { display: none; }
.sm-mobile-nav-item {
  flex-shrink: 0; padding: 6px 12px; border-radius: 6px;
  font-family: inherit; font-size: 12px; font-weight: 500;
  color: var(--text-tertiary); background: none; border: none;
  cursor: pointer; white-space: nowrap;
  transition: background 50ms ease, color 50ms ease;
}
.sm-mobile-nav-item:hover { background: var(--hover-bg); color: var(--text-secondary); }
.sm-mobile-nav-item.active { background: var(--active-bg); color: var(--text-primary); font-weight: 600; }


/* =====================================================================
   14. MOBILE RESPONSIVE (<640px)
   ===================================================================== */

@media (max-width: 640px) {
  .settings-modal {
    width: 100%; height: 100%; max-height: 100%; border-radius: 0;
    transform: translate(-50%, -50%);
    animation: smModalInMobile 300ms cubic-bezier(0.32, 0.72, 0, 1) forwards;
  }
  @keyframes smModalInMobile {
    from { opacity: 0; transform: translate(-50%, -48%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
  }
  .settings-modal .sm-sidebar { display: none; }
  .sm-content { width: 100%; }
  .sm-mobile-nav { display: flex !important; }
  .sm-body { padding: 16px 16px 28px 16px; }
  .sm-preset-grid { grid-template-columns: repeat(2, 1fr); }
}
