/* =========================================================================
   SmartDoc — design tokens, base, app shell (sidebar / topbar / content), dashboard
   ========================================================================= */
:root {
  color-scheme: light;
  --font-ui: "Noto Sans Thai", "Leelawadee UI", "Thonburi", system-ui, sans-serif;
  --font-display: "Prompt", "Noto Sans Thai", "Leelawadee UI", system-ui, sans-serif;
  --font-doc: "THSarabunIT", "Sarabun", sans-serif;
  --font-icon: "Material Symbols Outlined";

  --bg: #f4f5fb;
  --surface: #ffffff;
  --surface-2: #f8f9fd;
  --surface-3: #eef0f8;
  --border: #e6e8f2;
  --border-strong: #d3d7e6;
  --text: #111433;
  --text-2: #4b5175;
  --muted: #8a8fb0;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-soft: rgba(99, 102, 241, 0.10);
  --primary-ring: rgba(99, 102, 241, 0.30);
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.13);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);
  --info: #0ea5e9;
  --overlay: rgba(10, 12, 36, 0.5);
  --sidebar-bg: linear-gradient(180deg, #14174a 0%, #0f1236 100%);
  --sidebar-text: #a7acd8;
  --sidebar-hover: rgba(255, 255, 255, 0.07);
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 1px 2px rgba(17, 20, 51, 0.05);
  --shadow: 0 1px 2px rgba(17, 20, 51, 0.04), 0 12px 32px -18px rgba(17, 20, 51, 0.22);
  --shadow-lg: 0 30px 60px -20px rgba(17, 20, 51, 0.35);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --navbar_size: 68px;
  --menu_size: 280px;
  --menu_collapse_size: 84px;
  --child_size: 240px;
  --control-h: 44px;

  /* legacy names — still referenced by server-side operator colours and module scripts */
  --main_color: var(--primary);
  --second_color: var(--accent);
  --third_color: var(--success);
  --forth_color: var(--danger);
  --white_color: var(--surface);
  --bg_color: var(--bg);
  --light_color: var(--text-2);
  --dark_color: var(--text);
  --gap_size: 8px;
  --p_size: 28px; /* only used by server-defined column widths: calc(var(--p_size)*N) */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0c1b;
    --surface: #121530;
    --surface-2: #171a3a;
    --surface-3: #1e2246;
    --border: #252a52;
    --border-strong: #353b6e;
    --text: #eceefe;
    --text-2: #b3b8dc;
    --muted: #7a80aa;
    --primary: #818cf8;
    --primary-hover: #a5b4fc;
    --primary-soft: rgba(129, 140, 248, 0.15);
    --primary-ring: rgba(129, 140, 248, 0.35);
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.14);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.14);
    --overlay: rgba(2, 3, 12, 0.65);
    --sidebar-bg: linear-gradient(180deg, #0b0d26 0%, #070818 100%);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -18px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0c1b;
  --surface: #121530;
  --surface-2: #171a3a;
  --surface-3: #1e2246;
  --border: #252a52;
  --border-strong: #353b6e;
  --text: #eceefe;
  --text-2: #b3b8dc;
  --muted: #7a80aa;
  --primary: #818cf8;
  --primary-hover: #a5b4fc;
  --primary-soft: rgba(129, 140, 248, 0.15);
  --primary-ring: rgba(129, 140, 248, 0.35);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.14);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.14);
  --overlay: rgba(2, 3, 12, 0.65);
  --sidebar-bg: linear-gradient(180deg, #0b0d26 0%, #070818 100%);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -18px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}

/* menu animations — names are referenced from common.js */
@keyframes animated_menubar_show { from { left: calc(-1*var(--menu_size)); } to { left: 0; } }
@keyframes animated_menubar_hide { from { left: 0; } to { left: calc(-1*var(--menu_size)); } }
@keyframes animated_menubar_expand { from { width: var(--menu_collapse_size); } to { width: var(--menu_size); } }
@keyframes animated_menubar_collapse { from { width: var(--menu_size); } to { width: var(--menu_collapse_size); } }
@keyframes animated_pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); } 50% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); } }
@keyframes animated_spin { to { transform: rotate(360deg); } }
@keyframes animated_fade_in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

input, select, textarea, button { font-family: inherit; font-size: inherit; color: inherit; }

::selection { background: var(--primary-ring); }

* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

.material-symbols-outlined, .icon {
  font-family: var(--font-icon);
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

.hidden {
  content-visibility: hidden !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  visibility: hidden !important;
}

/* ---------------------------------------------------------- shell / layout */
#container {
  position: relative;
  width: calc(100vw + var(--menu_size));
  height: 100dvh;
  left: calc(-1*var(--menu_size));
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

.main_column {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(139, 92, 246, 0.07), transparent 60%),
    radial-gradient(700px 380px at 0% 0%, rgba(99, 102, 241, 0.06), transparent 60%),
    var(--bg);
}

/* ----------------------------------------------------------------- sidebar */
#menubar {
  position: relative;
  width: var(--menu_size);
  height: 100%;
  padding: 18px 14px 16px 14px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--sidebar-text);
  background: var(--sidebar-bg);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  container-type: inline-size;
  container-name: menubar;
  z-index: 4;
}

.sidebar_brand {
  order: -2;
  margin: 0 0 6px 0;
  padding: 2px 6px 18px 6px;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar_mark {
  width: 42px;
  height: 42px;
  display: flex;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-family: var(--font-icon);
  font-size: 23px;
  background: var(--grad);
  border-radius: 13px;
  box-shadow: 0 10px 24px -8px rgba(124, 92, 246, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  user-select: none;
}

.sidebar_name { min-width: 0; line-height: 1.2; }

.sidebar_title {
  color: #fff;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .05em;
  white-space: nowrap;
}

.sidebar_subtitle { margin-top: 3px; font-size: 12px; white-space: nowrap; }

.sidebar_section {
  order: -1;
  padding: 14px 12px 6px 12px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  white-space: nowrap;
}

.menubar_list {
  position: relative;
  min-height: 44px;
  padding: 0 12px;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 14px;
  color: var(--sidebar-text);
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  transition: background-color .15s, color .15s;
}

.menubar_list:hover { color: #fff; background-color: var(--sidebar-hover); }

.menubar_list.active {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 22px -10px rgba(124, 92, 246, 0.9);
}

/* separate the administration modules from the document registers */
.menubar_list:is(#structure_menu, #office_menu, #member_menu, #position_menu, #authority_menu):not(:is(#structure_menu, #office_menu, #member_menu, #position_menu, #authority_menu) ~ .menubar_list) {
  margin-top: 34px;
  overflow: visible;
}

.menubar_list:is(#structure_menu, #office_menu, #member_menu, #position_menu, #authority_menu):not(:is(#structure_menu, #office_menu, #member_menu, #position_menu, #authority_menu) ~ .menubar_list)::after {
  content: "การตั้งค่าระบบ";
  position: absolute;
  top: -26px;
  left: 12px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  white-space: nowrap;
}

.menubar_symbol {
  width: 24px;
  flex-shrink: 0;
  font-family: var(--font-icon);
  font-size: 22px;
  line-height: 1;
}

.menubar_list.active .menubar_symbol { font-variation-settings: "FILL" 1; }

.menubar_label {
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  user-select: none;
  pointer-events: none;
}

.menubar_amount {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  display: flex;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background-color: #ef4444;
  border-radius: 999px;
  animation: animated_pulse 2.4s ease-in-out infinite;
}

.menubar_list.active .menubar_amount { color: #6366f1; background: #fff; animation: none; }

/* main.js appends a fresh badge on every refresh — only the newest one is meaningful */
.menubar_amount:not(:last-child) { display: none; }

.sidebar_user {
  order: 2;
  margin-top: auto;
  padding: 10px;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--sidebar-border);
  border-radius: 16px;
  cursor: pointer;
  transition: background-color .15s;
}

.menubar_list + .sidebar_user, .sidebar_section + .sidebar_user { margin-top: auto; }

.sidebar_user:hover { background: rgba(255, 255, 255, 0.1); }

#navbar_avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: cover;
  object-position: center top;
  background-color: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  user-select: none;
}

.navbar_profile {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

#navbar_username {
  overflow: hidden;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#navbar_position {
  overflow: hidden;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar_user_more { flex-shrink: 0; font-family: var(--font-icon); font-size: 20px; }

@container menubar (max-width: 130px) {
  .sidebar_brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .sidebar_name, .sidebar_user_more, .navbar_profile, .menubar_label { display: none; }
  .sidebar_section { padding: 10px 0 2px 0; color: transparent; font-size: 0; border-top: 1px solid var(--sidebar-border); margin: 6px 10px 0 10px; }
  .menubar_list { justify-content: center; padding: 0; }
  .menubar_amount { position: absolute; top: 3px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; }
  .menubar_list:is(#structure_menu, #office_menu, #member_menu, #position_menu, #authority_menu)::after { content: ""; left: 10px; right: 10px; top: -17px; height: 1px; background: var(--sidebar-border); }
  .sidebar_user { justify-content: center; padding: 8px 0; background: transparent; border-color: transparent; }
}

/* ------------------------------------------------------------------ topbar */
.navbar {
  position: relative;
  height: var(--navbar_size);
  padding: 0 16px;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  z-index: 3;
}

#navbar_burger, #navbar_expand, .navbar_icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-2);
  font-family: var(--font-icon);
  font-size: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  transition: background-color .15s, color .15s, border-color .15s;
}

#navbar_burger:hover, #navbar_expand:hover, .navbar_icon:hover { color: var(--primary); border-color: var(--primary-ring); }

#navbar_expand { display: none; }

.navbar_heading { min-width: 0; margin-left: 4px; line-height: 1.25; }

.navbar_crumb { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .03em; }

.navbar_crumb > span { margin: 0 2px; opacity: .6; }

#navbar_title {
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.navbar_user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar_date {
  display: none;
  padding: 8px 14px;
  color: var(--text-2);
  font-size: 13px;
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.navbar_date::before { content: "calendar_today"; margin-right: 8px; font-family: var(--font-icon); font-size: 15px; vertical-align: -2px; color: var(--primary); }

/* ----------------------------------------------------------------- content */
#display {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px 16px 48px 16px;
  overflow-x: hidden;
  overflow-y: auto;
}

.display {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 18px;
  animation: animated_fade_in .3s ease-out;
}

.card {
  position: relative;
  width: 100%;
  padding: 20px;
  flex-shrink: 0;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card.quard, .card.triple, .card.double { width: 100%; }

.card_menu { margin-bottom: 16px; display: flex; gap: 24px; color: var(--text-2); overflow-x: auto; }
.card_menu::-webkit-scrollbar { display: none; }
.card_menu_item { padding: 8px 0; flex-shrink: 0; cursor: pointer; user-select: none; }
.card_menu_item.active { color: var(--primary); border-bottom: 2px solid var(--primary); }

#tooltip {
  visibility: hidden;
  position: absolute;
  padding: 6px 10px;
  color: #fff;
  font-size: 12.5px;
  background-color: #111433;
  border-radius: 8px;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  z-index: 20;
}

#tooltip.show { visibility: visible; opacity: 1; }

/* ---------------------------------------------------------------- loading */
.loading_background {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 50%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  touch-action: none;
  z-index: 30;
}

.loading_container {
  width: 72px;
  height: 72px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
}

.loading_container img { display: none; }

.loading_container::after {
  content: "";
  width: 30px;
  height: 30px;
  border: 3px solid var(--primary-soft);
  border-top-color: var(--primary);
  border-right-color: #8b5cf6;
  border-radius: 50%;
  animation: animated_spin .8s linear infinite;
}

/* -------------------------------------------------------------- dashboard */
.dashboard_hero {
  position: relative;
  width: 100%;
  padding: 26px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: #fff;
  background:
    radial-gradient(500px 260px at 92% 120%, rgba(255, 255, 255, 0.18), transparent 60%),
    radial-gradient(420px 240px at 10% -40%, rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(120deg, #4f46e5 0%, #6d5bf3 45%, #9061f9 100%);
  border-radius: 24px;
  box-shadow: 0 24px 48px -24px rgba(99, 102, 241, 0.75);
  overflow: hidden;
}

.dashboard_hero::after {
  content: "mark_email_read";
  position: absolute;
  right: -18px;
  bottom: -70px;
  color: rgba(255, 255, 255, 0.09);
  font-family: var(--font-icon);
  font-size: 240px;
  transform: rotate(-12deg);
  pointer-events: none;
}

.dashboard_heading { position: relative; min-width: 0; z-index: 1; }

.dashboard_greeting { font-size: 14px; opacity: .85; }

.dashboard_greeting_name {
  margin: 2px 0 6px 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
}

.dashboard_date { font-size: 14px; opacity: .85; }

.dashboard_hero #system_year.form_input_container { position: relative; width: 190px; margin: 0; z-index: 1; }

.dashboard_hero #system_year .form_input_label { color: rgba(255, 255, 255, 0.85); }

.dashboard_hero #system_year .form_input_extend {
  color: #fff;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}

.dashboard_hero #system_year .form_input_extend > div:last-child { color: #fff; }

.dashboard_section_title {
  width: 100%;
  margin: 6px 0 -4px 2px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.dashboard_grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.dashboard_grid > .card { width: auto; }

.dashboard_chart_card {
  padding: 20px 20px 12px 20px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}

.dashboard_chart_card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.dashboard_chart_card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--chip-color, var(--primary));
}

.dashboard_chart_title {
  position: relative;
  margin-bottom: 12px;
  padding-left: 56px;
  display: flex;
  flex-direction: column;
  min-height: 46px;
  justify-content: center;
}

.dashboard_chart_title > span:first-child { color: var(--text-2); font-size: 13.5px; font-weight: 500; }

.dashboard_chart_title > span:last-child {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.dashboard_chart_title > span:last-child::after {
  content: " วันนี้";
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 500;
}

.dashboard_chart_title::before {
  content: attr(data-icon);
  position: absolute;
  top: 2px;
  left: 0;
  width: 44px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-family: var(--font-icon);
  font-size: 22px;
  background: var(--chip-color, var(--primary));
  border-radius: 14px;
  box-shadow: 0 10px 18px -10px var(--chip-color, var(--primary));
}

.dashboard_chart { width: 100% !important; max-height: 140px; }

.dashboard_hold_label { color: var(--text); font-family: var(--font-display); font-size: 17px; font-weight: 600; }

.dashboard_hold_hint { margin: 2px 0 16px 0; color: var(--muted); font-size: 13px; }

#dashboard_hold {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  counter-reset: hold;
}

#dashboard_hold:empty::before {
  content: "ไม่มีผู้ที่มีหนังสือค้างเกษียนเกิน 3 ฉบับ";
  grid-column: 1 / -1;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.dashboard_hold_item {
  position: relative;
  padding: 14px 14px 14px 16px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  counter-increment: hold;
}

.dashboard_hold_item::before {
  content: counter(hold);
  position: absolute;
  top: -8px;
  left: -8px;
  width: 22px;
  height: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--grad);
  border-radius: 50%;
}

.dashboard_hold_image {
  width: 46px;
  height: 46px;
  object-fit: cover;
  object-position: center top;
  background: var(--surface-3);
  border-radius: 50%;
}

.dashboard_hold_name {
  overflow: hidden;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dashboard_hold_amount {
  padding: 3px 10px;
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--danger-soft);
  border-radius: 999px;
}

/* -------------------------------------------------------------- responsive */
@media screen and (min-width: 640px) {
  .dashboard_grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media screen and (min-width: 768px) {
  .navbar_date { display: block; }
  .card.quard, .card.triple { width: calc(50% - 9px); }
  .dashboard_hero { padding: 32px 36px; }
  .dashboard_greeting_name { font-size: 30px; }
}

@media screen and (min-width: 992px) {
  #navbar_burger { display: none; }
  #navbar_expand { display: flex; }
  #container { width: 100vw; left: 0; }
  #menubar { left: 0; }
  .navbar { padding: 0 32px 0 24px; }
  #display { padding: 28px 32px 56px 32px; }
  .display { gap: 22px; }
  .card { padding: 24px 26px; }
  .card.quard { width: calc(100%/3 - 44px/3); }
  .card.triple, .card.double { width: calc(50% - 11px); }
  .dashboard_grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}

.password_toggle {
  position: absolute;
  right: 4px;
  bottom: 0;
  width: 38px;
  height: var(--control-h);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  color: var(--muted);
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.password_toggle:hover, .password_toggle:focus-visible { color: var(--primary); }

.password_toggle > .icon { font-size: 20px; }

:has(> .password_toggle) > input { padding-right: 44px; }

@media screen and (min-width: 1400px) {
  .card.quard { width: calc(25% - 16.5px); }
  .dashboard_grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
