:root {
  --ink: #171610;
  --muted: #6d675d;
  --line: #706b62;
  --paper: rgba(247, 242, 233, 0.82);
  --paper-solid: #f7f1e8;
  --soft: rgba(232, 226, 214, 0.78);
  --green: #3f7651;
  --green-soft: #dcebd6;
  --red: #b64138;
  --gold: #85713e;
}
@font-face {
        font-family: 'Vonca';
        src: url('../fonts/vonca-extrabold.otf') format('opentype');
        font-weight: 800; font-style: normal; font-display: swap;
    }
 @font-face {
        font-family: 'Open Sauce One';
        src: url('../fonts/OpenSauceOne-SemiBold.ttf') format('truetype');
        font-weight: 600; font-style: normal; font-display: swap;
    }
* { box-sizing: border-box; }
html:has(.nail-erp-app), body:has(.nail-erp-app) {margin: 0;min-height: 100%;background: #eee9df;overflow-x: hidden;max-width: 100vw;}
body:has(.nail-erp-app) .wp-site-blocks > header,
body:has(.nail-erp-app) .wp-site-blocks > footer,
body:has(.nail-erp-app) .wp-block-post-title { display: none; }
body:has(.nail-erp-app) .wp-site-blocks,
body:has(.nail-erp-app) main,
body:has(.nail-erp-app) .wp-block-post-content { margin: 0; padding: 0; max-width: none; }

.nail-erp-app {
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
  color: var(--ink);
  font-family: 'Vonca', 'Open Sauce One', serif, Helvetica, sans-serif;
  background: url('../images/bg.jpg') center center / cover no-repeat, #E9E3D9;
  /* background-size: cover; */
}

.nail-shell {min-height: 100vh;max-width: 100%;overflow-x: hidden;padding: clamp(10px, 1.4vh, 20px) 22px clamp(8px, 1.2vh, 18px);}
.view-login { padding: 0; }
.view-checkin {
  height: 100vh;
  overflow: hidden;
  padding: clamp(10px, 1.4vh, 20px) 22px clamp(8px, 1.2vh, 18px);
}
h1, h2, h3, .brand strong, .input-panel h1, .label {/* font-family: Georgia, "Times New Roman", serif; */letter-spacing: 0;}
button, input, select {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(250,247,239,.82);
  color: var(--ink);
}
button {
  padding: 10px 22px;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 24px rgba(0,0,0,.09);
}
button.primary, .tabs button.active, nav button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fffaf0;
}
button.danger { color: var(--red); }
button.wide, .wide {width: 100%;font-family: 'Vonca', 'Open Sauce One', serif, Helvetica, sans-serif;padding: 15px 0px;}
input, select { width: 100%; padding: 18px 22px; font-size: 22px; font-weight: 800; }
label { display: block; margin: 18px 0; font-weight: 900; }
label input, label select { margin-top: 10px; }
table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,.24); }
th, td { padding: 16px 14px; border-bottom: 1px solid rgba(81,76,68,.28); text-align: left; white-space: nowrap; }

.login-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 56px 18px;
  background: url(../images/bg.jpg) center center / cover no-repeat, #14120f;
}
.login-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  /* background: radial-gradient(ellipse at 50% 0%, rgba(0,0,0,.05), rgba(10,9,7,.55) 75%); */
  pointer-events: none;
}
.center-screen {
  min-height: calc(100vh - 68px);
  display: grid;
  place-items: center;
}
.view-checkin .center-screen {
  min-height: 0;
  height: calc(100vh - clamp(70px, 10vh, 110px));
  align-items: start;
  padding-top: 0;
}
.view-checkin .nail-shell { padding-top: 8px; }
.view-checkin .topbar { margin-bottom: 10px; }
.login-card, .check-card, .success-card, .panel, .modal {
  background: rgba(238,233,224,.42);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 34px;
  backdrop-filter: blur(8px);
}
.login-card {
  position: relative;
  z-index: 1;
  width: min(440px, 94vw);
  min-height: 0;
  padding: 40px 38px 30px;
  background: rgba(255,253,249,.96);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.38), 0 2px 0 rgba(255,255,255,.5) inset;
}
.login-brand { text-align: center; margin-bottom: 30px; }
.login-card h1 {
  margin: 22px 0 6px;
  font-size: 32px;
  letter-spacing: .5px;
  text-align: center;
}
.login-card p {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.app-mark {
  width: 68px;
  height: 68px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #2f95c9;
  color: white;
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(0,0,0,.22);
}
.field-group {
  display: block;
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 800;
  color: #4c473f;
}
.field-group > span {
  display: block;
  margin-bottom: 7px;
  letter-spacing: .3px;
}
.field-input {
  position: relative;
  display: flex;
  align-items: center;
}
.field-input input {
  width: 100%;
  padding: 13px 44px;
  border: 1px solid rgba(81,76,68,.28);
  border-radius: 13px;
  background: #fbf9f5;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field-input input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(23,22,16,.08);
}
.field-input input::placeholder { color: #a29c8f; font-weight: 600; }
.field-icon {
  position: absolute;
  left: 15px;
  font-size: 15px;
  opacity: .55;
  pointer-events: none;
}
.field-toggle {
  position: absolute;
  right: 6px;
  min-height: 0;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
  opacity: .55;
  cursor: pointer;
}
.field-toggle:hover { opacity: .9; }
.remember-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 4px 0 22px;
  font-size: 13px;
  font-weight: 700;
  color: #5a554b;
}
.remember-row input {
  width: 17px;
  height: 17px;
  padding: 0;
  accent-color: var(--ink);
}
.login-submit {
  min-height: 50px;
  border-radius: 13px;
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 14px 28px rgba(23,22,16,.22);
  font-size: 15px;
  letter-spacing: .4px;
}
.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 28px 0 18px;
  color: #a29c8f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.divider span { height: 1px; background: rgba(81,76,68,.18); }
.divider em { font-style: normal; }
.lang {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 0;
}
.flag-lang button {
  width: 52px;
  min-height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(81,76,68,.16);
  border-radius: 12px;
  background: #fbf9f5;
  box-shadow: none;
  transition: border-color .15s ease;
}
.flag-lang button.active {
  border-color: var(--ink);
  outline: none;
}
.lang-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: white;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}
.lang-en {
  background: linear-gradient(135deg, #264f9f, #c8323b);
}
.lang-vi {
  background: linear-gradient(135deg, #d8232a, #f2b705);
}
.app-toast {
  position: fixed;
  right: 24px;
  top: 24px;
  z-index: 100;
  width: min(420px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border: 1px solid rgba(182, 65, 56, .25);
  border-left: 5px solid var(--red);
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 52px rgba(0,0,0,.18);
  animation: toast-in .18s ease-out;
}
.app-toast.toast-success {
  border-color: rgba(63, 118, 81, .25);
  border-left-color: var(--green);
}
.toast-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff1ef;
  color: var(--red);
  font-size: 22px;
  font-weight: 900;
}
.toast-success .toast-icon {
  background: #e7f3e6;
  color: var(--green);
}
.app-toast strong {
  display: block;
  margin-top: 1px;
  font-size: 16px;
}
.app-toast p {
  margin: 4px 0 0;
  color: #6d675d;
  font-size: 14px;
  line-height: 1.4;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.topbar {
  min-height: 96px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  margin-bottom: 46px;
  align-content: flex-start;
}
.brand strong { display: block; font-size: 74px; line-height: .78; font-weight: 500; }
.brand span { display: block; font-size: 12px; letter-spacing: 10px; text-transform: uppercase; margin-left: 4px; }
.image-brand img {
  display: block;
  width: clamp(150px, 11vw, 250px);
  height: auto;
  max-height: 86px;
  object-fit: contain;
}
nav, .top-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.top-actions { justify-content: flex-end; margin-left: auto; }
.top-lang {
  display: flex;
  gap: 6px;
  margin: 0;
}
.top-lang.flag-lang button {
  width: 50px;
  min-height: 50px;
  border-radius: 14px;
}
.branch {min-height: 55px;display: inline-flex;align-items: center;padding: 0 22px;border: 1px solid var(--line);border-radius: 18px;font-weight: 900;background: rgba(247,242,233,.62);}
.icon-btn {min-width: 60px;mi;min-height: 55px;padding: 0;border-radius: 14px;font-size: 22px;background: rgba(247,242,233,.62);}
.msg-topbar-btn { position: relative; }
.msg-indicator-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--red, #b3392c);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  border: 2px solid var(--paper-solid, #fff);
}
.msg-floating {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 25;
}
.msg-bubble-btn {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fffaf0;
  font-size: 26px;
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
  cursor: pointer;
}
.msg-bubble-btn:hover { transform: translateY(-2px); }
.msg-picker {
  position: fixed;
  top: 92px;
  right: 24px;
  z-index: 26;
  width: 300px;
  max-height: 66vh;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: var(--paper-solid, #fff);
  box-shadow: 0 26px 64px rgba(28,24,18,.22);
  border: 1px solid rgba(81,76,68,.1);
  overflow: hidden;
}
.msg-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(81,76,68,.14);
}
.msg-picker-title { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.msg-picker-icon { font-size: 17px; }
.msg-picker-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--red, #b3392c);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.msg-picker-close {
  width: 30px;
  height: 30px;
  min-height: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(81,76,68,.08);
  color: #6d675d;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.msg-picker-close:hover { background: rgba(81,76,68,.16); color: var(--ink); }
.msg-picker-search {
  flex: none;
  margin: 10px 14px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(81,76,68,.2);
  border-radius: 999px;
  background: rgba(81,76,68,.05);
  font-size: 13px;
}
.msg-picker-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 8px 8px;
}
.msg-picker-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 6px 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background .12s ease;
}
.msg-picker-item + .msg-picker-item { margin-top: 2px; }
.msg-picker-item:hover { background: rgba(81,76,68,.06); }
.msg-picker-item.is-unread { font-weight: 900; }
.msg-picker-item.is-unread .msg-picker-name { color: var(--ink); }
.msg-picker-avatar {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(81,76,68,.12);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}
.msg-picker-item.is-unread .msg-picker-avatar { background: var(--ink); color: #fffaf0; }
.msg-picker-avatar .msg-dot {
  top: -1px;
  right: -1px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--paper-solid, #fff);
}
.msg-picker-name { flex: 1; min-width: 0; color: #6d675d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-picker-new {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(179,57,44,.12);
  color: var(--red, #b3392c);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.msg-picker-arrow { flex: none; color: rgba(81,76,68,.35); font-size: 18px; }
.msg-picker-empty { padding: 24px 10px; font-size: 13px; text-align: center; color: var(--muted); }
.account-btn {min-height: 55px;display: inline-flex;align-items: center;gap: 12px;padding: 3px 20px;align-content: center;justify-content: space-around;background: rgba(247,242,233,.62);}
.account-btn .chevron {color: #777065;font-size: 20px;line-height: 25px;top: 0px;}
.avatar {
  width: 45px;
  height: 45px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #31ace6;
  font-size: 24px;
  overflow: hidden;
}
.avatar img, .profile-avatar-large img { width: 100%; height: 100%; object-fit: cover; }
.user-menu { position: relative; }
.menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 275px;
  padding: 12px;
  background: #fbf6ed;
  border-radius: 18px;
  box-shadow: 0 22px 58px rgba(0,0,0,.2);
  z-index: 10;
}
.menu.show { display: grid; gap: 6px; }
.menu button {
  min-height: 54px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  justify-items: start;
  gap: 10px;
  padding: 9px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  font-size: 16px;
  text-align: left;
}
.menu button:hover { background: rgba(226,220,207,.72); }
.menu-icon { width: 28px; text-align: center; font-size: 18px; }
.notice {
  margin-bottom: 16px;
  padding: 14px 18px;
  border: 2px solid rgba(182,64,56,.42);
  border-radius: 14px;
  color: var(--red);
  background: rgba(255,255,255,.72);
  font-weight: 900;
}

.kiosk-header {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(6px, 1vh, 12px);
  margin-bottom: clamp(8px, 1.4vh, 20px);
}
.kiosk-actions {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.kiosk-header .brand strong { font-size: 92px; }
.kiosk-header .image-brand img {
  width: clamp(190px, 18vw, 340px);
  max-height: clamp(65px, 10vh, 145px);
}
.kiosk-lang {
  margin: 0;
  gap: 10px;
}

.profile-screen {
  min-height: calc(100vh - 180px);
  display: grid;
  align-content: start;
  justify-items: center;
  padding-top: 6px;
}
.profile-logo img {
  width: clamp(210px, 18vw, 350px);
  max-height: 130px;
}
.profile-card {
  width: min(500px, 94vw);
  padding: 26px 30px 28px;
  border: 1px solid #777776;
  border-radius: 30px;
  background: rgba(238,233,224,.42);
}
.profile-card-head {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  align-items: center;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(80,74,66,.35);
}
.profile-card-head h1 {
  margin: 0 0 5px;
  font-size: 26px;
}
.profile-card-head p {
  margin: 0;
  color: #6e675d;
  font-family: Arial, sans-serif;
  font-size: 17px;
}
.profile-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(221,216,204,.75);
  font-size: 28px;
}
.profile-card label {
  margin: 0 0 16px;
  font-size: 16px;
}
.profile-card input {
  min-height: 58px;
  margin-top: 8px;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 18px;
}
.profile-card .wide {
  width: 100%;
  min-height: 60px;
  margin-top: 14px;
  font-size: 18px;
  font-family: 'Vonca', 'Open Sauce One', serif, Helvetica, sans-serif;
}
.secondary {
  background: rgba(238,233,224,.85);
  color: var(--ink);
}
.photo-card { width: min(540px, 94vw); }
.profile-avatar-large {
  width: 184px;
  height: 184px;
  display: grid;
  place-items: center;
  margin: 22px auto;
  border: 4px solid var(--ink);
  border-radius: 50%;
  overflow: hidden;
  background: #31ace6;
  font-size: 86px;
}
.hidden-file { display: none !important; }
.photo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  font-family: 'Vonca', 'Open Sauce One', serif, Helvetica, sans-serif;
}
.photo-actions button {
  min-height: 60px;
  font-size: 17px;
  font-family: 'Vonca', 'Open Sauce One', serif, Helvetica, sans-serif;
}
.profile-card .muted:disabled {
  background: #8d8980;
  color: white;
  opacity: .86;
  cursor: not-allowed;
  font-family: 'Vonca', 'Open Sauce One', serif, Helvetica, sans-serif;
}
.check-card {
  width: min(500px, 94vw);
  max-height: 100%;
  padding: clamp(22px, 3vh, 42px);
  overflow: hidden;
}
.app-toast{font-family:serif, Helvetica, sans-serif}
.check-card h1 { margin: 0; font-size: clamp(27px, 3.1vh, 44px); text-align: center; }
.check-card h2, .check-card p { text-align: center; }
.check-card h2 {
  margin: clamp(5px, .9vh, 12px) 0;
  font-size: clamp(16px, 2.1vh, 28px);
}
.check-card p {margin: 0 0 clamp(10px, 1.6vh, 22px);font-family: arial;font-size: 14px;color: #888;}
.check-card label {
  margin: clamp(8px, 1.25vh, 18px) 0;
}
.check-card input {
  padding: clamp(20px, 1.7vh, 22px);
  font-size: clamp(19px, 2.3vh, 30px);
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(9px, 1.3vh, 16px);
  margin: clamp(10px, 1.5vh, 18px) 0;
}
.keypad button {
  min-height: clamp(40px, 6vh, 86px);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3.8vh, 23px);
  background: rgba(238,233,224,.92);
}
.check-card .primary.wide {
  min-height: clamp(62px, 7vh, 96px);
  margin-top: clamp(8px, 1.0vh, 18px);
  font-size: clamp(20px, 2.1vh, 30px);
  font-family: 'Vonca', 'Open Sauce One', serif, Helvetica, sans-serif;
}
.amount-keypad { grid-template-columns: repeat(4, 1fr); }
.amount-keypad .span-2 { grid-column: span 2; }
.keypad-spacer {
  display: block;
  min-height: clamp(40px, 6vh, 86px);
}
.success-card { width: min(620px, 94vw); text-align: center; }
.check {
  width: 150px;
  height: 150px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 86px;
}

.two-cols {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 28px;
  align-items: stretch;
}
.view-technician .nail-shell { padding-top: 10px; }
.view-technician .topbar { min-height: 64px; margin-bottom: 14px; }
.view-technician .panel { min-height: auto; padding: 15px 30px; }
.reception-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.panel { min-height: 520px; background: rgba(247,242,233,.72); }
.payment-panel h2 small { display: block; margin-top: 4px; font-family: Arial, Helvetica, sans-serif; font-size: 18px; }
.panel h2 {margin-top: 0;text-align: center;font-size: 23px;text-transform: uppercase;}
.input-panel h1 { font-size: 44px; margin: 12px 0 4px; }
.invoice-input-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 4px;
  padding: 6px 14px;
  border: 1px solid rgba(81,76,68,.3);
  border-radius: 14px;
  background: rgba(255,255,255,.8);
}
.invoice-input-row > span { font-size: 30px; font-weight: 900; color: var(--muted); }
.invoice-input-row input {
  flex: 0 0 auto;
  width: 210px;
  border: 0;
  background: transparent;
  font-size: 34px;
  font-weight: 900;
  color: var(--ink);
  outline: none;
  padding: 18px 10px;
}
.invoice-input-preview {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  font-size: 26px;
  font-weight: 900;
  color: var(--green, #3f7651);
}
.invoice-input-hint { margin: 4px 0 10px; font-size: 12px; color: var(--muted); }
.label { font-weight: 900; text-transform: uppercase; }
.cards { min-height: 380px; }
.payment-table {width: 100%;max-width: 100%;overflow-x: auto;-webkit-overflow-scrolling: touch;}
.payment-table table { min-width: 600px; }
.payment-table tfoot td { border-top: 2px solid var(--line); font-weight: 900; padding-top: 10px; }
.empty { color: var(--muted); text-align: center; padding: 58px 0; font-size: 24px; }
.list-panel footer { border-top: 2px solid var(--line); margin-top: 12px; padding-top: 12px; font-size: 16px; font-weight: 900; }
.tech-payment-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
  font-family: Arial, Helvetica, sans-serif;
}
.tech-payment-filter .date-mark {
  font-size: 18px;
  line-height: 1;
}
.tech-payment-filter .arrow {
  color: var(--muted);
  font-size: 20px;
  font-weight: 800;
}
.tech-payment-filter input[type="date"] {
  width: 152px;
  min-height: 40px;
  padding: 0 12px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: rgba(247,242,233,.72);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}
.tech-payment-filter button,
.payment-pager button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 900;
}
.payment-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 0;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 800;
}
.pager-buttons {
  display: flex;
  gap: 8px;
}
.payment-pager button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.view-technician .payment-table {
  min-height: 380px;
  font-family: arial;
}
.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.mini-card, .turn-card {
  margin-bottom: 14px;
  padding: 18px;
  border: 2px solid rgba(81,76,68,.48);
  border-radius: 16px;
  background: rgba(255,255,255,.42);
  box-shadow: 0 12px 24px rgba(0,0,0,.06);
}
.mini-card { display: grid; gap: 8px; }
.mini-card b { font-size: 21px; }
.text-action { border: 0; box-shadow: none; background: transparent; padding: 0; }

/* ---------- Reception columns ---------- */
.view-reception .nail-shell { padding-top: 10px; }
.view-reception .topbar { min-height: 64px; margin-bottom: 14px; }
.reception-grid .panel {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 130px);
  max-height: calc(100vh - 130px);
  padding: 14px 16px 16px;
  border-radius: 22px;
  overflow: hidden;
}
.reception-grid .panel h2 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.15;
  text-transform: none;
}
.reception-grid .payment-panel h2 small {
  margin-top: 2px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
}
.reception-grid .tabs {
  gap: 8px;
  margin-bottom: 12px;
}
.reception-grid .tabs button {
  min-height: 30px;
  padding: 0 8px;
  border-radius: 11px;
  box-shadow: none;
  font-size: 13px;
}
.rc-list {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: min-content;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
}
.rc-list-2 { grid-template-columns: 1fr 1fr; }
.rc-empty {
  grid-column: 1 / -1;
  padding: 26px 0;
  font-size: 14px;
}
.rc-card {
  padding: 8px 10px 10px;
  border: 1px solid rgba(81,76,68,.42);
  border-radius: 12px;
  background: rgba(255,255,255,.55);
  box-shadow: 0 6px 14px rgba(0,0,0,.05);
}
.rc-head {
  display: grid;
  grid-template-columns: 20px 1fr 20px;
  align-items: center;
  margin-bottom: 2px;
}
.rc-index {
  color: #9a938a;
  font-size: 11px;
  font-weight: 800;
}
.rc-head b {
  grid-column: 2;
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}
.rc-sub {
  margin: 0 0 6px;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.rc-status {
  margin: 0 0 6px;
  font-size: 13px;
  text-align: center;
}
.rc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin: 3px 0;
  font-size: 13px;
}
.rc-row span { color: #5d574e; font-weight: 700; }
.rc-row strong { font-weight: 900; white-space: nowrap; }
.rc-primary {
  width: 100%;
  min-height: 30px;
  margin-top: 8px;
  padding: 0 10px;
  border-color: var(--ink);
  border-radius: 10px;
  background: var(--ink);
  color: #fffaf0;
  box-shadow: none;
  font-size: 14px;
}
.rc-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.rc-circle {
  width: 26px;
  height: 26px;
  min-height: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.75);
  box-shadow: none;
  font-size: 13px;
}
.rc-circle.ok {
  border-color: rgba(63,118,81,.5);
  background: var(--green-soft);
  color: var(--green);
}
.reception-grid .pay-card.paid {
  border-color: rgba(63,118,81,.45);
  background: var(--green-soft);
}
.rc-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 8px 0 6px;
}
.rc-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 6px;
  border: 1px solid rgba(81,76,68,.35);
  border-radius: 9px;
  background: rgba(255,255,255,.7);
  font-size: 12px;
  font-weight: 800;
}
.radio {
  flex: none;
  border: 2px solid #9b958c;
  border-radius: 50%;
}
.rc-method .radio { width: 11px; height: 11px; }
.rc-method.active { border-color: var(--ink); background: #fff; }
.rc-method.active .radio,
.co-method.active .radio {
  border-color: var(--ink);
  background: radial-gradient(circle, var(--ink) 0 46%, transparent 47%);
}
.rc-pay-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-top: 8px;
}
.paid-badge {
  display: grid;
  place-items: center;
  min-height: 28px;
  border-radius: 10px;
  background: rgba(63,118,81,.16);
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}
.rc-edit {
  min-height: 28px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.85);
  box-shadow: none;
  font-size: 13px;
}

.turn-list {
  width: min(1500px, 96vw);
  margin: 20px auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.turn-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}
.turn-card span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-weight: 900;
}

.view-admin .nail-shell { padding-top: 10px; }
.view-turn .nail-shell { padding-top: 10px; }
.view-admin .topbar { min-height: 64px; margin-bottom: 14px; }
.admin-view { display: grid; gap: 12px; }
.admin-view .panel { padding: 14px 16px; }
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.metric {
  position: relative;
  min-height: 100px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
  background: rgba(255,255,255,.30);
}
.metric-clickable {
  width: 100%;
  box-shadow: none;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
.metric-clickable:hover { background: rgba(255,255,255,.55); }
.metric-clickable:active { transform: scale(.98); }
.metric-icon {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 15px;
  opacity: .55;
}
.metric h3 { margin: 20px 0 4px; font-size: 22px; }
.metric p { margin: 0; color: #6d675d; font-size: 13px; font-weight: 800; }
.net-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.35);
  font-size: 16px;
  font-weight: 900;
}
.net-bar small {
  display: inline-block;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
}
.dash-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 4px;
}
.dash-filter .date-mark { font-size: 16px; }
.dash-filter input[type="date"] {
  width: 148px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
}
.dash-filter .arrow { color: var(--muted); font-weight: 800; }
.dash-filter button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
}
.dash-filter .invoice-count {
  margin-left: auto;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.5);
  font-size: 13px;
  font-weight: 800;
}
.split-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0 4px;
}
.split-bar {
  height: 10px;
  border-radius: 6px;
  background: var(--green-soft);
  overflow: hidden;
}
.split-bar-fill { height: 100%; background: var(--gold); }
.split-caption {
  margin: 0;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  text-align: right;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 14px;
}
.panel-title h2 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.panel-title button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
}
.invoice-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.invoice-detail-actions select {
  min-height: 34px;
  width: auto;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
}
.icon-close {
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: rgba(255,255,255,.7);
  box-shadow: none;
  color: var(--muted);
  font-size: 18px;
}
.icon-close:hover { color: var(--red); }
.panel-toggle {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  font-size: 15px;
  font-weight: 900;
}
.payroll-history-collapsed { justify-self: start; padding: 4px 0; }
.payroll-history-panel .panel-toggle { margin-bottom: 12px; }
.payroll-history { display: grid; gap: 14px; margin-top: 12px; }
.payroll-card {
  padding: 14px 16px;
  border: 1px solid rgba(81,76,68,.3);
  border-radius: 16px;
  background: rgba(255,255,255,.4);
  overflow-x: scroll;
}
.payroll-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.payroll-card-period { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 14px; }
.payroll-print-btn {
  min-height: 26px;
  padding: 3px 10px;
  border: 1px solid rgba(81,76,68,.3);
  border-radius: 8px;
  background: rgba(255,255,255,.8);
  font-size: 11px;
  font-weight: 800;
  box-shadow: none;
}
.payroll-print-btn:hover { background: #fff; }
.payroll-date-ico { font-size: 14px; }
.payroll-card-meta { display: flex; align-items: baseline; gap: 10px; font-size: 13px; }
.payroll-card-meta strong { font-size: 15px; }
.payroll-card-meta small { color: var(--muted); font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: 700; }
.payroll-card table { font-size: 12.5px; }
.payroll-card tfoot td { border-top: 2px solid var(--line); font-weight: 900; }
.table-scroll { overflow-x: auto; }
.admin-view table { font-size: 12.5px; white-space: nowrap; }
.admin-view th, .admin-view td { padding: 9px 10px; }
.admin-view tfoot td { border-top: 2px solid var(--line); font-weight: 900; }
.comm-cell { white-space: nowrap; }
.comm-input {
  width: 52px;
  min-height: 30px;
  padding: 0 6px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}
.payroll-modal .table-scroll { max-height: 50vh; }
.payroll-gross-cell { white-space: nowrap; }
.payroll-gross-input {
  width: 90px;
  min-height: 30px;
  padding: 0 6px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}
.link-btn {
  background: none;
  border: none;
  color: var(--accent, #2f95c9);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.payroll-detail-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
  text-align: left;
}
.payroll-detail-rows > div {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--panel-alt, #f4f1ea);
  border-radius: 8px;
  font-size: 14px;
}

/* ---------- dashboard 2-col: Tech Breakdown / Income by Date ---------- */
.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.dash-grid-2 > .panel { min-height: 0; min-width: 0; align-self: start; height: auto; }
.dash-grid-2 .table-scroll { max-height: 46vh; overflow-y: auto; }
.income-panel .panel-title { margin-bottom: 10px; }
.income-panel .panel-title h2 {font-size: 15px;flex: 1 1 auto;}
.period-tabs { display: flex; flex: none; gap: 6px; }
.period-tabs button {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  box-shadow: none;
  font-size: 12px;
}
.income-scroll table { min-width: 0; width: 100%; }
.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
}
.status-pill.ok { background: var(--green-soft); color: var(--green); }
.status-pill.off { background: rgba(182,65,56,.14); color: var(--red); }
.settings-screen {
  min-height: calc(100vh - 150px);
  display: grid;
  place-items: center;
  padding: 4px 0;
}
.settings-panel {
  width: min(760px, 96vw);
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding: 20px 26px 22px;
  border: 1px solid #777776;
  border-radius: 24px;
  background: rgba(238,233,224,.42);
}
.settings-panel .profile-card-head { padding-bottom: 12px; margin-bottom: 12px; }
.settings-panel .profile-card-head h1 { font-size: 21px; }
.settings-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  font-family: arial;
}
.settings-cols label { margin: 10px 0; font-size: 13px; }
.settings-cols input,
.settings-cols select {
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}
.settings-cols input[type="color"] { padding: 4px; }
.settings-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.settings-group {
  margin: 0 0 4px;
  padding-top: 0;
  border-top: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
}
.settings-panel > .primary {
  width: auto;
  min-height: 44px;
  margin-top: 18px;
  padding: 0 28px;
  border-radius: 12px;
  font-size: 15px;
}
.users-view { display: grid; gap: 14px; }
.users-view h1 { margin: 0 0 4px; font-size: 19px; }
.users-view > .primary { justify-self: start; min-height: 40px; padding: 0 20px; border-radius: 12px; font-size: 14px; }
.users-view .panel { padding: 0; overflow: hidden; }
.users-view .panel h1 { padding: 16px 20px 0; }
.users-scroll { max-height: calc(100vh - 230px); overflow: auto; }
.users-view table { width: 100%; font-size: 13px; border-collapse: collapse; }
.users-view th, .users-view td { padding: 12px 20px; white-space: nowrap; }
.users-view td.col-name { white-space: normal; word-break: break-word; }
.users-view thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #ece7dc;
  color: #5b554c;
  font-size: 15px;
  font-weight: 900;
  text-transform: none;
  border-bottom: 1px solid rgba(81,76,68,.18);
  font-family: arial;
}
.users-view tbody tr { border-bottom: 1px solid rgba(81,76,68,.12); }
.users-view tbody tr:nth-child(even) { background: rgba(255,255,255,.28); }
.users-view td {font-weight: 700;font-family: arial;}
.users-view td strong { font-weight: 900; }
.row-actions { display: flex; gap: 8px; white-space: nowrap; }
.row-actions button {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 16px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

/* ---------- back-to-dashboard header button ---------- */
.back-btn {
  min-height: 55px;
  padding: 0 20px;
  border-radius: 18px;
  background: rgba(247,242,233,.62);
  box-shadow: none;
  font-size: 14px;
}

/* ---------- compact popup forms (user/brand) ---------- */
.compact-form { padding: 26px 28px 24px; }
.compact-form h2 { margin: 0 0 16px; font-size: 20px; text-align: center; }
.compact-form label { margin: 10px 0; font-size: 13px; font-weight: 900; }
.compact-form label input,
.compact-form label select { margin-top: 6px; }
.compact-form input,
.compact-form select {
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}
.compact-form .modal-actions { margin-top: 18px; }
.compact-form .modal-actions .primary {
  min-height: 42px;
  padding: 0 22px;
  border-radius: 12px;
  font-size: 14px;
}

/* ---------- user form / branding pickers ---------- */
.user-form { width: min(520px, 94vw); }
.user-form input:disabled { opacity: .55; cursor: not-allowed; }
.checkline.inline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.4);
  font-weight: 900;
  font-size: 13px;
}
.checkline.inline input { width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; accent-color: var(--ink); }
.user-photo-field { margin: 18px 0 6px; }
.field-label { display: block; margin-bottom: 10px; font-weight: 900; }
.user-photo-row { display: flex; align-items: center; gap: 16px; }
.user-photo-avatar {
  width: 80px;
  height: 80px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: #31ace6;
  font-size: 38px;
}
.user-photo-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-photo-drop {
  flex: 1;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 18px 12px;
  border: 2px dashed rgba(81,76,68,.4);
  border-radius: 16px;
  background: rgba(255,255,255,.4);
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.user-photo-drop small { color: var(--muted); font-family: Arial, Helvetica, sans-serif; font-weight: 700; }
.drop-icon { font-size: 22px; }

/* ---------- header brand selector ---------- */
.brand-select { position: relative; }
.branch-badge {
  min-height: 55px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border-radius: 18px;
  background: rgba(247,242,233,.62);
  box-shadow: none;
  font-size: 15px;
}
.branch-badge .chevron { color: #777065; font-size: 14px; }
.brand-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 6;
  min-width: 220px;
  padding: 8px;
  background: #fbf6ed;
  border-radius: 16px;
  box-shadow: 0 22px 58px rgba(0,0,0,.2);
}
.brand-menu button {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  text-align: left;
  font-size: 14px;
}
.brand-menu button:hover { background: rgba(226,220,207,.72); }
.brand-menu button.active { background: rgba(226,220,207,.9); font-weight: 900; }
.brand-menu em { color: var(--muted); font-style: normal; font-size: 12px; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,.42);
  backdrop-filter: blur(6px);
}
.modal {
  width: min(780px, 96vw);
  max-height: 90vh;
  overflow: auto;
  background: var(--paper-solid);
  border-color: rgba(255,255,255,.9);
  box-shadow: 0 24px 76px rgba(0,0,0,.28);
}
.wide-modal { width: min(1160px, 96vw); }
.chat-overlay { z-index: 30; }
.chat-modal {
  display: flex;
  flex-direction: column;
  width: min(350px, 96vw);
  height: min(560px, 82vh);
  max-height: none;
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
}
.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(81,76,68,.22);
  font-size: 16px;
}
.chat-head .close { float: none; font-size: 22px; }
.chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-empty { margin: auto; text-align: center; }
.chat-load-more {
  align-self: center;
  margin: 0 0 10px;
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid rgba(81,76,68,.3);
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.chat-load-more:disabled { opacity: .6; cursor: default; }
.chat-load-more:hover:not(:disabled) { background: rgba(81,76,68,.08); }
.chat-day-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}
.chat-day-separator span {
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(81,76,68,.1);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.chat-bubble-row {
  display: flex;
  flex-direction: column;
  max-width: 78%;
  margin-bottom: 10px;
}
.chat-bubble-row.mine { align-self: flex-end; align-items: flex-end; }
.chat-bubble-row.theirs { align-self: flex-start; align-items: flex-start; }
.chat-sender { margin-bottom: 2px; font-size: 11px; font-weight: 800; color: var(--muted); }
.chat-bubble {
  padding: 9px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
}
.chat-bubble-row.mine .chat-bubble { background: var(--ink); color: #fffaf0; border-bottom-right-radius: 4px; }
.chat-bubble-row.theirs .chat-bubble { background: rgba(81,76,68,.1); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-time { margin-top: 3px; font-size: 10px; color: var(--muted); }
.chat-input-row {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(81,76,68,.22);
}
.chat-input {
  flex: 1;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(81,76,68,.3);
  border-radius: 20px;
  font-size: 14px;
}
.chat-input-row .primary {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 20px;
}
.menu-badge {
  margin-left: auto;
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--red, #b3392c);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}
.close { float: right; font-size: 28px; color: var(--red); }
.line, .modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.choice {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 22px 0;
}
.choice button.active { outline: 3px solid var(--ink); }
.row-label {
  display: grid;
  grid-template-columns: 1fr 220px;
  align-items: center;
  gap: 18px;
}
.stats-grid, .turn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.payroll-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.payroll-status-badge.is-paid {
  background: #e3f3e6;
  color: #1e7a34;
}
.payroll-status-badge.is-pending {
  background: #fbe9e7;
  color: #a13d2c;
}
.confirm-modal {
  width: min(460px, 92vw);
  text-align: center;
}
.confirm-modal h2 {
  margin-top: 4px;
}
.confirm-modal p {
  margin: 10px 0 18px;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
.confirm-line {
  margin: 18px 0 22px;
  padding: 14px 16px;
  border: 1px solid rgba(81,76,68,.24);
  border-radius: 14px;
  background: rgba(255,255,255,.55);
}
.danger-fill {
  background: var(--red) !important;
  border-color: var(--red) !important;
  color: white !important;
}
.stats-modal {
  width: min(1120px, 96vw);
  padding: 28px 34px 34px;
}
.stats-modal h2 {
  margin: 0 44px 4px 0;
  text-align: left;
  font-size: 28px;
}
.stats-subtitle {
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(81,76,68,.24);
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  font-weight: 800;
}
.stats-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 16px 34px rgba(0,0,0,.12);
}
.stats-card h3 {
  margin: 0 0 14px;
  padding: 9px 12px;
  border-radius: 14px;
  background: #efede8;
  color: #777065;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  text-align: center;
  text-transform: uppercase;
}
.stats-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.stat-box {
  min-height: 86px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 12px 10px;
  border: 1px solid rgba(81,76,68,.22);
  border-radius: 14px;
  text-align: center;
}
.stat-box strong {
  display: block;
  font-size: 18px;
  line-height: 1.05;
  font-family: 'Open Sauce One', 'Segoe UI', Arial, sans-serif;
}
.stat-box span {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 900;
}
.stat-box.dark {
  background: var(--ink);
  color: #fffaf0;
}
.stat-box.green {
  background: var(--green);
  color: white;
}
.stat-box.gold {
  background: var(--gold);
  color: white;
}
.stat-box.light {
  background: #e8e3d8;
  color: var(--ink);
}
.turn-grid { grid-template-columns: repeat(2, 1fr); }

/* ---------- Checkout modal ---------- */
.checkout-modal {
  width: min(420px, 94vw);
  padding: 22px 24px 20px;
  border-radius: 22px;
}
.checkout-modal h2 {
  margin: 0 0 16px;
  font-size: 22px;
  text-align: center;
  text-transform: uppercase;
}
.co-tech {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(81,76,68,.22);
  border-radius: 12px;
  background: rgba(255,255,255,.7);
  font-size: 15px;
}
.co-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 14px;
}
.co-method {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.55);
  box-shadow: none;
  font-size: 15px;
}
.co-method .radio { width: 15px; height: 15px; }
.co-method.active {
  border-width: 2px;
  border-color: var(--ink);
  background: rgba(255,255,255,.9);
}
.co-service { margin: 0 0 12px; font-size: 17px; }
.co-tech-breakdown {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid rgba(81,76,68,.22);
  border-radius: 12px;
  background: rgba(255,255,255,.55);
}
.co-tech-breakdown-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--muted);
}
.co-tech-grid-head,
.co-tech-row {
  display: grid;
  grid-template-columns: 1fr 90px 110px 24px;
  align-items: center;
  gap: 10px;
}
.co-tech-grid-head {
  padding: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--muted);
}
.co-tech-grid-head span:nth-child(2) { text-align: right; }
.co-tech-row {
  padding: 8px 0;
  font-size: 14px;
  font-weight: 800;
}
.co-tech-row + .co-tech-row { border-top: 1px solid rgba(81,76,68,.15); }
.co-tech-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-tech-amount { color: var(--muted); text-align: right; }
.co-tech-tip-input,
.co-tech-amount-input {
  min-height: 34px;
  width: 100%;
  padding: 0 8px;
  border: 1px solid rgba(81,76,68,.3);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.co-tech-amount-input { text-align: right; }
.co-tech-remove {
  border: 0;
  background: transparent;
  color: var(--red, #b3392c);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: .75;
  justify-self: center;
}
.co-tech-remove:hover { opacity: 1; }
.checkout-modal .row-label {
  grid-template-columns: 1fr 150px;
  gap: 12px;
  margin: 10px 0;
  font-size: 15px;
}
.checkout-modal .row-label input {
  min-height: 40px;
  margin: 0;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 15px;
}
.co-add-gift {
  margin: 14px 0 4px;
  min-height: 44px;
  border-radius: 12px;
  background: rgba(219,214,204,.9);
  box-shadow: none;
  font-size: 15px;
}
.co-gift {
  display: grid;
  grid-template-columns: 1fr 96px auto;
  gap: 8px;
  margin: 14px 0 4px;
}
.co-gift input {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 14px;
}
.co-gift button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(219,214,204,.9);
  box-shadow: none;
  font-size: 14px;
}
.checkout-modal .row-label input:disabled {
  background: rgba(81,76,68,.08);
  color: var(--ink);
  opacity: 1;
}
.co-gift-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}
.gift-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.gift-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: .7;
}
.gift-chip button:hover { opacity: 1; }
.gift-chip-amount {
  width: 64px;
  min-height: 24px;
  padding: 0 4px;
  border: 1px solid rgba(63,118,81,.3);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font-size: 13px;
  font-weight: 800;
}
.giftcards-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}
.giftcard-search {
  min-height: 40px;
  min-width: 220px;
  padding: 0 14px;
  border: 1px solid rgba(81,76,68,.3);
  border-radius: 12px;
  font-size: 14px;
}
.giftcard-history-panel { padding: 16px 20px; }
.giftcard-history-panel h1 { margin: 0 0 14px; }
.giftcard-history-filter { margin: 0 0 14px; }
.giftcode-input-row {
  display: flex;
  gap: 8px;
}
.giftcode-input-row .giftcode-input { flex: 1; }
.giftcode-input-row button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(81,76,68,.3);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.giftcode-input-row button:hover { background: rgba(81,76,68,.08); }
.expense-cat-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.expense-cat-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(81,76,68,.08);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.giftcard-topup-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(81,76,68,.06);
  font-size: 14px;
}
.giftcard-topup-info strong { font-size: 16px; }
.co-summary {
  margin: 14px 0 4px;
  padding-top: 12px;
  border-top: 1px dashed rgba(81,76,68,.4);
}
.co-summary p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0;
  color: var(--muted);
  font-size: 15px;
}
.co-summary .co-total {
  margin-top: 10px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
}
.checkout-modal .modal-actions {
  justify-content: flex-end;
  gap: 14px;
  margin-top: 16px;
}
.checkout-modal .modal-actions .ghost {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 16px;
}
.checkout-modal .modal-actions .primary {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-size: 16px;
}

/* ---------- Turn Schedule modal ---------- */
.turn-modal {
  display: flex;
  flex-direction: column;
  width: min(1400px, 96vw);
  height: min(88vh, 900px);
  max-height: none;
  padding: 0;
  border-radius: 20px;
  overflow: visible;
}
.turn-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(81,76,68,.22);
}
.turn-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 20px;
}
.turn-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.turn-head-actions .primary {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 22px;
  font-size: 16px;
}
.turn-close {
  width: 44px;
  height: 44px;
  min-height: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(216,211,201,.85);
  box-shadow: none;
  color: #5b554c;
  font-size: 24px;
}
.turn-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}
.turn-col { padding: 16px 20px; overflow-y: auto; }
.turn-col + .turn-col { border-left: 1px solid rgba(81,76,68,.22); }
.turn-col h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px;
  color: #6d675d;
  font-size: 14px;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.turn-count {
  min-width: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(81,76,68,.12);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
}
.turn-col .rc-empty { padding: 18px 0; font-size: 14px; text-align: left; }
.turn-item {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 22px 14px 10px;
  border: 1px solid rgba(81,76,68,.3);
  border-radius: 14px;
  background: rgba(255,255,255,.9);
}
.turn-cancel-x {
  position: absolute;
  top: -9px;
  left: -5px;
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(81,76,68,.22);
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 17px;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.turn-cancel-x:hover {
  background: rgba(179,57,44,.1);
  border-color: rgba(179,57,44,.35);
  color: var(--red, #b3392c);
}
.turn-reorder {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(81,76,68,.25);
  border-radius: 10px;
  background: rgba(81,76,68,.04);
}
.turn-move {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6d675d;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.turn-move-up { border-bottom: 1px solid rgba(81,76,68,.25); }
.turn-move:hover:not(:disabled) { background: rgba(81,76,68,.12); color: var(--ink); }
.turn-move:active:not(:disabled) { background: rgba(81,76,68,.2); }
.turn-move:disabled { opacity: .3; cursor: not-allowed; }
.turn-item.is-working {
  grid-template-columns: 1fr auto auto;
  border-color: rgba(63,118,81,.4);
  background: var(--green-soft);
}
.turn-msg {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(81,76,68,.3);
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  cursor: pointer;
}
.turn-msg:hover { background: rgba(81,76,68,.08); }
.turn-msg.is-notified { background: var(--green-soft); border-color: rgba(63,118,81,.4); color: var(--green); }
.turn-msg.is-notified:hover { background: var(--green-soft); }
.msg-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red, #b3392c);
  border: 2px solid #fff;
}
.turn-item.is-readonly { grid-template-columns: auto 1fr; }
.turn-item.is-working.is-readonly { grid-template-columns: 1fr auto; }
.turn-board {
  width: min(1500px, 96vw);
  height: min(80vh, 880px);
  margin: 6px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(81,76,68,.22);
  border-radius: 22px;
  background: rgba(255,255,255,.55);
  box-shadow: 0 24px 60px rgba(43,38,30,.1);
  overflow: hidden;
}
.turn-board-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 24px 26px;
}
.turn-board-col + .turn-board-col { border-left: 1px solid rgba(81,76,68,.22); }
.turn-board-col h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  margin: 0 0 18px;
  color: #6d675d;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
}
.turn-board-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding-right: 6px;
  margin-right: -6px;
}
.turn-board-list .turn-item { margin-bottom: 0; padding: 16px 18px; }
.turn-board-list .turn-num { width: 34px; height: 34px; font-size: 15px; }
.turn-board-list .turn-info b { font-size: 17px; }
.turn-num {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  /* background: #ff6100; */
  color: #ff6f00;
  font-size: 20px;
  font-weight: 900;
}
.turn-info b { display: block; font-size: 16px; }
.turn-info small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
}
.turn-accept,
.turn-complete {
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 17px;
  box-shadow: none;
  font-size: 14px;
  white-space: nowrap;
}
.turn-accept { background: var(--green); color: #fff; }
.turn-complete { background: var(--green); color: #fff; }
.turn-tag { color: var(--green); font-size: 14px; font-weight: 900; }
.add-tech-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 66px;
  z-index: 5;
  width: 280px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 58px rgba(0,0,0,.22);
}
.tech-filter-input {
  width: 100%;
  min-height: 38px;
  margin-bottom: 8px;
  padding: 0 12px;
  border: 1px solid rgba(81,76,68,.3);
  border-radius: 10px;
  font-size: 14px;
  box-sizing: border-box;
}
.checkline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
}
.checkline.all {
  border-bottom: 1px solid rgba(81,76,68,.18);
  border-radius: 10px 10px 0 0;
}
.checkline:hover { background: rgba(238,233,224,.7); }
.checkline input {
  flex: none;
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--ink);
}
.add-tech-popover .primary.wide {
  min-height: 46px;
  margin-top: 8px;
  border-radius: 14px;
  font-size: 16px;
}
.add-tech-popover .primary.wide:disabled { opacity: .45; cursor: not-allowed; }
.is-working .turn-msg{display:none}
@media (max-width: 1100px) {
  .nail-shell { padding: 22px; }
  .view-checkin {
    padding: 10px 10px 8px;
  }
  .turn-board-col + .turn-board-col { border-left: 0; border-top: 1px solid rgba(81,76,68,.22); }
  .two-cols, .reception-grid, .summary-grid, .stats-grid, .turn-grid, .turn-list, .turn-board, .dash-grid-2 {
    grid-template-columns: 1fr;
  }
  .dash-grid-2 .table-scroll { max-height: 60vh; }
  .dash-filter { gap: 8px; }
  .dash-filter input[type="date"] { width: 132px; }
  .topbar {align-items: center;flex-wrap: wrap;margin-bottom: 28px;}
  .top-actions {width: auto;justify-content: center;gap: 2px;}
  .topbar nav { order: 3; width: 100%; }
  .brand strong { font-size: 44px; }
  .brand span { letter-spacing: 6px; }
  .row-label { grid-template-columns: 1fr; }
  .checkout-modal .row-label { grid-template-columns: 1fr 130px; }
  .reception-grid .panel, .panel { min-height: auto; }
  .reception-grid .panel { height: auto; max-height: none; overflow: visible; }
  .rc-list { overflow: visible; }
  .turn-modal { height: auto; max-height: 90vh; overflow: auto; }
  .turn-body { grid-template-columns: 1fr; overflow: visible; }
  .turn-col { overflow: visible; }
  .turn-col + .turn-col { border-left: 0; border-top: 1px solid rgba(81,76,68,.22); }
  .add-tech-popover { right: 10px; }
  table { display: block; overflow-x: auto; }
  .users-view table { display: table; min-width: 640px; }
  .users-scroll { max-height: calc(100vh - 300px); }
  .back-btn { min-height: 42px; padding: 0 14px; font-size: 13px; border-radius: 12px; }
}

@media (max-width: 640px) {
  .rc-list-2 { grid-template-columns: 1fr; }
  .co-gift { grid-template-columns: 1fr; }
  .invoice-input-row { flex-wrap: wrap; }
  .invoice-input-row input {flex: 1;width: auto;max-width: 85%;font-size: 30px;}
  .invoice-input-preview {
    flex: 1 1 100%;
    width: 100%;
    text-align: left;
    margin-top: 4px;
    font-size: 20px !important;
  }
  .view-technician .panel {
    /* min-height: 680px; */
    padding: 15px 10px;
    /* overflow-x: scroll; */
}
  .tech-payment-filter input[type="date"]{width: 140px !important;}
  .view-technician .panel{overflow-x: auto;}
  .users-view h1 { font-size: 16px; }
  .users-view .panel h1 { padding: 12px 14px 0; }
  .users-view table { font-size: 12px; min-width: 560px; }
  .users-view th, .users-view td { padding: 9px 12px; }
  .users-scroll { max-height: calc(100vh - 260px); }
  .row-actions button { min-height: 28px; padding: 0 10px; font-size: 11px; }
  .users-view > .primary { width: 100%; justify-self: stretch; text-align: center; }
  .compact-form { padding: 20px 18px 18px; }
  .user-photo-row { flex-direction: column; align-items: stretch; }
  .settings-screen { min-height: 0; padding: 0; }
  .settings-panel { max-height: none; padding: 16px 16px 18px; }
  .settings-cols { grid-template-columns: 1fr; gap: 4px; }
  .settings-row-2 { grid-template-columns: 1fr; }
  .settings-panel > .primary { width: 100%; }
  .view-admin .nail-shell { padding-top: 6px; }
  .view-turn .nail-shell { padding-top: 6px; }
  .turn-board { height: auto; max-height: none; }
  .admin-view { gap: 10px; }
  .admin-view .summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .split-cell { grid-column: 1 / -1; padding: 6px 2px 0; }
  .metric { min-height: 82px; padding: 12px 10px; }
  .metric-icon { top: 8px; font-size: 13px; }
  .metric h3 { margin: 16px 0 3px; font-size: 16px; }
  .metric p { font-size: 11px; }
  .net-bar { font-size: 13px; padding: 10px 14px; white-space: normal; }
  .net-bar small { font-size: 11px; }
  .dash-filter { padding: 6px 2px; }
  .dash-filter input[type="date"] { width: 118px; font-size: 12px; }
  .dash-filter button { min-height: 32px; padding: 0 10px; font-size: 12px; }
  .dash-filter .invoice-count { margin-left: 0; }
  .split-caption { font-size: 12px; }
  .admin-view .panel {padding: 10px 12px;overflow-y: scroll;}
  .panel-title h2 {font-size: 11px !important;}
  .panel-title button { min-height: 30px; padding: 0 10px; font-size: 12px; }
  .dash-grid-2 .table-scroll {max-height: 50vh;overflow-y: scroll;}
  .period-tabs button { min-height: 26px; padding: 0 9px; font-size: 11px; }
}

@media (max-width: 640px) {
  .login-screen {
    place-items: start center;
    padding: 28px 10px;
  }
  .payroll-modal .table-scroll {
    max-height: 50vh;
    width: 100%;
    font-size: 11px;
}
  .turn-list{width:100%}
  .profile-screen,.settings-screen{display:block}
 .view-admin .modal{padding:10px}
 .view-admin .modal h2{font-size:14px}
  .login-card {
    width: min(100%, 440px);
    padding: 32px 24px 26px;
    border-radius: 22px;
  }
  .app-mark {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    font-size: 30px;
  }
  .login-card h1 {
    margin-top: 18px;
    font-size: 26px;
  }
  .login-card p {
    font-size: 12px;
  }
  .field-input input {
    padding: 12px 40px;
  }
  .divider {
    margin: 24px 0 16px;
  }
  .lang {
    gap: 10px;
  }
  .flag-lang button {
    width: 48px;
  }
  .view-checkin {
    padding: 8px 8px 6px;
  }
  .view-checkin .center-screen {
    height: calc(100vh - 112px);
  }
  .top-lang {
    display: flex;
    grid-template-columns: none;
  }
  .top-lang.flag-lang button {
    width: 38px;
    min-height: 38px;
    border-radius: 10px;
  }
  .top-lang .lang-icon { width: 24px; height: 24px; font-size: 9px; }
  .branch {
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 14px;
  }
  .icon-btn {
    min-width: 42px;
    min-height: 42px;
    border-radius: 12px;
    font-size: 17px;
  }
  .topbar .account-btn {
    min-height: 42px;
    padding: 5px 8px;
    gap: 7px;
    border-radius: 12px;
    font-size: 0;
  }
  .topbar .avatar {
    width: 30px;
    height: 30px;
    font-size: 16px;
    border-width: 2px;
  }
  .topbar .chevron { font-size: 14px; }
  .menu {
    width: min(240px, calc(100vw - 20px));
  }
  .profile-screen {
    min-height: calc(100vh - 100px);
    padding-top: 0;
  }
  .profile-logo img {
    width: 168px;
    max-height: 74px;
  }
  .profile-card {
    padding: 20px 22px 22px;
    border-radius: 24px;
  }
  .profile-card-head {
    grid-template-columns: 46px 1fr;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
  }
  .profile-icon {
    width: 42px;
    height: 42px;
    font-size: 23px;
  }
  .profile-card-head h1 {
    font-size: 21px;
  }
  .profile-card-head p {
    font-size: 15px;
  }
  .profile-card label {
    margin-bottom: 13px;
    font-size: 14px;
  }
  .profile-card input,
  .profile-card .wide,
  .photo-actions button {
    min-height: 52px;
  }
  .profile-avatar-large {
    width: 148px;
    height: 148px;
    margin: 16px auto;
  }
  .photo-actions {
    gap: 12px;
  }
  .check-card {
    width: min(100%, 400px);
    padding: 18px 22px;
    border-radius: 24px;
  }
  .check-card h1 {
    font-size: 20px;
  }
  .check-card h2 {
    font-size: 17px;
    margin: 4px 0;
  }
  .check-card p {
    margin-bottom: 10px;
    font-size: 13px;
  }
  .check-card label {
    margin: 8px 0;
    font-size: 18px;
  }
  .check-card input {
    padding: 12px 16px;
    font-size: 18px;
    border-radius: 14px;
  }
  .keypad {
    gap: 10px;
    margin: 10px 0;
  }
  .keypad button {
    min-height: 56px;
    padding: 8px;
    border-radius: 14px;
    font-size: 24px;
  }
  .check-card .primary.wide {
    min-height: 60px;
    font-size: 18px;
  }
     .turn-board{width: 100%;}
}
@media (max-width: 400px) {
      .tech-payment-filter input[type="date"] {
        width: 130px !important;
    }
  .view-technician .panel {
    /* min-height: 680px; */
    padding: 15px 5px;
    /* overflow-x: scroll; */
}
}

/* Trang in "Bảng lương theo từng thợ" (nút 🖨 ở Payroll History) — ẩn hoàn toàn ở chế độ xem
   bình thường, chỉ hiện khi in (window.print()); toàn bộ app còn lại bị ẩn lúc in để chỉ xuất
   ra đúng nội dung bảng lương. */
#nail-print-payroll { display: none; }
@media print {
  body > *:not(#nail-print-payroll) { display: none !important; }
  #nail-print-payroll {
    display: block !important;
    font-family: Arial, Helvetica, sans-serif;
    color: #171610;
  }
  .print-payroll-header { text-align: center; margin-bottom: 18px; }
  .print-payroll-header h1 { margin: 0; font-size: 20px; letter-spacing: 4px; }
  .print-payroll-header h2 { margin: 4px 0; font-size: 22px; color: #85713e; letter-spacing: 2px; }
  .print-payroll-header p { margin: 6px 0 0; font-size: 12px; color: #6d675d; border-bottom: 1px solid #85713e; padding-bottom: 10px; }
  /* Mỗi khối 1 thợ không bị cắt giữa chừng qua trang khác. */
  .print-tech-block { break-inside: avoid; page-break-inside: avoid; margin: 18px 0; }
  /* Tối đa 3 thợ / trang A4 (tiết kiệm giấy, dễ cắt cho vào phong bì) — ép ngắt trang cưỡng
     bức sau mỗi 3 khối, trừ khối cuối cùng để không tạo trang trắng thừa. */
  .print-tech-block:nth-of-type(3n):not(:last-of-type) { break-after: page; page-break-after: always; }
  .print-tech-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
  .print-tech-head h2 { margin: 0; font-size: 16px; }
  .print-tech-head h2 small { font-weight: 400; color: #6d675d; font-size: 11px; }
  .print-tech-total { font-weight: 800; color: #85713e; font-size: 13px; }
  /* Reset lại 2 thuộc tính bị rule ".table { display:block; overflow-x:auto }" (dùng cho
     mobile, ở @media max-width:1100px) vô tình ăn theo khi in — khổ A4 (~794px) rơi đúng vào
     breakpoint đó nên bảng bị chuyển thành cuộn ngang thay vì hiển thị bảng đầy đủ. */
  .print-invoice-table {
    display: table !important;
    overflow: visible !important;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 9.5px;
  }
  .print-invoice-table th, .print-invoice-table td {
    padding: 4px 3px;
    text-align: right;
    border-bottom: 1px solid #e5ded1;
    /* Rule toàn cục "th, td { white-space: nowrap }" (dùng cho các bảng khác trong app) khiến
       chữ tràn ra ngoài ô, đè lên cột bên cạnh thay vì tự xuống dòng — phải reset lại ở đây. */
    white-space: normal !important;
    overflow-wrap: break-word;
    line-height: 1.25;
  }
  .print-invoice-table th:nth-child(1), .print-invoice-table th:nth-child(2), .print-invoice-table th:nth-child(3),
  .print-invoice-table td:nth-child(1), .print-invoice-table td:nth-child(2), .print-invoice-table td:nth-child(3) { text-align: left; }
  /* table-layout: fixed cần khai báo trước độ rộng từng cột, nếu không sẽ chia đều 12 cột
     bằng nhau — không hợp lý vì cột "#"/"Comm %" cần ít chỗ hơn "Invoice"/"Date". Cân đều hơn
     và dựa theo độ dài tiêu đề viết tắt thực tế (Gift Cert./Gift Card/Owner Net cần nhỉnh hơn). */
  .print-invoice-table col.c-num { width: 3%; }
  .print-invoice-table col.c-invoice { width: 10%; }
  .print-invoice-table col.c-date { width: 12%; }
  .print-invoice-table col.c-service { width: 8%; }
  .print-invoice-table col.c-tip { width: 6%; }
  .print-invoice-table col.c-discount { width: 8%; }
  .print-invoice-table col.c-gift,
  .print-invoice-table col.c-giftcard { width: 9%; }
  .print-invoice-table col.c-comm { width: 6%; }
  .print-invoice-table col.c-salary { width: 8%; }
  .print-invoice-table col.c-net { width: 10%; }
  .print-invoice-table col.c-status { width: 8%; }
  .print-invoice-table thead th { background: #f7f1e8; font-weight: 800; border-bottom: 1px solid #85713e; }
  .print-invoice-table tfoot td { font-weight: 800; border-top: 2px solid #171610; border-bottom: none; }
  .print-status-paid { color: #3f7651; font-weight: 700; }
  @page { size: A4; margin: 10mm 8mm; }
}