:root {
  --bg: #f4f8fc;
  --panel: #ffffff;
  --line: rgba(20, 52, 78, 0.16);
  --text: #13293d;
  --muted: #4e677b;
  --brand: #1f5c86;
  --brand-dark: #173f5c;
  --ok: #1b8a73;
  --danger: #c83f3f;
  --radius: 18px;
  --ui-shell-max-width: 1640px;
  --ui-shell-padding-y: 24px;
  --ui-shell-padding-x: 22px;
  --ui-base-font-size: 16px;
  --ui-topbar-padding-y: 20px;
  --ui-topbar-padding-x: 24px;
  --ui-sidebar-width: 280px;
  --ui-branch-min-width: 260px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--ui-base-font-size);
  color: var(--text);
  background: radial-gradient(circle at 15% 10%, #ffffff 0%, #eef5fb 48%, #e4eef7 100%);
}

.shell {
  max-width: var(--ui-shell-max-width);
  margin: 0 auto;
  padding: var(--ui-shell-padding-y) var(--ui-shell-padding-x) 48px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 32px rgba(14, 41, 62, 0.12);
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ok);
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
}

.stack {
  display: grid;
  gap: 12px;
}

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

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

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

.permission-top {
  align-items: end;
}

.permission-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.permission-checks label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.permission-checks input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.permission-submit {
  display: flex;
  justify-content: flex-end;
}

.permission-matrix-table th,
.permission-matrix-table td {
  text-align: center;
  vertical-align: middle;
}

.permission-matrix-table td:first-child,
.permission-matrix-table th:first-child {
  text-align: left;
  min-width: 240px;
}

.permission-matrix-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.permission-email-card summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.permission-email-card summary::-webkit-details-marker {
  display: none;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

button {
  border: none;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
}

#global-back-btn {
  white-space: nowrap;
}

.primary-btn {
  background: linear-gradient(140deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 8px 14px rgba(23, 63, 92, 0.22);
}

.secondary-btn {
  background: #ffffff;
  color: #163b58;
  border: 1px solid rgba(173, 196, 215, 0.92);
  box-shadow: 0 5px 10px rgba(15, 41, 61, 0.12);
}

.success-btn {
  background: var(--ok);
  color: #fff;
  box-shadow: 0 8px 14px rgba(16, 90, 74, 0.2);
}

.danger-btn {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 8px 14px rgba(161, 32, 32, 0.2);
}

#tip-entry-range-apply {
  background: #d32f2f;
  color: #fff;
  box-shadow: 0 8px 16px rgba(211, 47, 47, 0.28);
  animation: tip-range-apply-blink 1s steps(2, start) infinite;
}

#tip-entry-range-apply:hover {
  filter: brightness(1.06);
}

@keyframes tip-range-apply-blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
  100% {
    opacity: 1;
  }
}

#auth-screen,
#company-screen,
#branch-create-screen {
  max-width: 980px;
  margin: 32px auto;
  padding: 22px;
}

.auth-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.auth-segmented {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  align-self: flex-start;
}

.auth-segmented .seg-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}

.auth-segmented .seg-btn.active {
  background: linear-gradient(135deg, var(--brand-soft), rgba(255, 255, 255, 0.92));
  border-color: var(--line);
  color: var(--brand-dark);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.auth-mode-panel {
  display: contents;
}

.auth-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.auth-inline-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.84rem;
}

.auth-inline-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  min-width: 0;
  white-space: normal;
}

.auth-inline-options input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
}

.auth-card .row-actions {
  flex-wrap: wrap;
}

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

.nextviro-brand-auth {
  margin-bottom: 2px;
}

.nextviro-brand-top {
  margin-bottom: 8px;
}

.nextviro-brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.nextviro-brand-text {
  margin: 0;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: 0.01em;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: var(--ui-topbar-padding-y) var(--ui-topbar-padding-x);
}

.mobile-topbar-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1302;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(161, 192, 218, 0.86);
  background: linear-gradient(145deg, #ffffff, #eaf2fa);
  box-shadow: 0 12px 20px rgba(10, 35, 56, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.mobile-topbar-toggle img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(167, 197, 220, 0.82);
}

.mobile-topbar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1299;
  background: rgba(8, 27, 44, 0.46);
  backdrop-filter: blur(1.2px);
}

.fixed-home-btn {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1306;
  border-radius: 999px;
  border: 1px solid rgba(139, 189, 230, 0.52);
  background: linear-gradient(165deg, #0f4377 0%, #1c5f99 100%);
  color: #f2f9ff;
  box-shadow: 0 14px 24px rgba(7, 28, 46, 0.35), inset 0 1px 0 rgba(207, 232, 252, 0.24);
  padding: 6px 12px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fixed-home-btn-icon {
  font-size: 1rem;
  line-height: 1;
}

.fixed-home-btn-text {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.personnel-notify-fab {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 10px;
  z-index: 1310;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(153, 186, 215, 0.9);
  background: linear-gradient(160deg, #ffffff 0%, #eaf4ff 100%);
  box-shadow: 0 14px 22px rgba(9, 34, 52, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.personnel-notify-icon {
  font-size: 1.55rem;
  line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(10, 35, 55, 0.2));
}

.personnel-notify-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  background: linear-gradient(150deg, #d93636 0%, #b61717 100%);
  border: 1px solid rgba(115, 13, 13, 0.52);
  box-shadow: 0 7px 12px rgba(131, 17, 17, 0.35);
}

.personnel-notify-popover {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 70px);
  left: 10px;
  right: 10px;
  z-index: 1311;
  border-radius: 16px;
  border: 1px solid rgba(95, 131, 159, 0.44);
  background: linear-gradient(165deg, rgba(248, 253, 255, 0.99) 0%, rgba(229, 241, 255, 0.99) 100%);
  box-shadow: 0 20px 30px rgba(8, 31, 49, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  max-height: min(62vh, 520px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.personnel-forms-fab {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 72px);
  left: 10px;
  z-index: 1309;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(153, 186, 215, 0.9);
  background: linear-gradient(160deg, #ffffff 0%, #eaf4ff 100%);
  box-shadow: 0 14px 22px rgba(9, 34, 52, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.personnel-forms-icon {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  color: #0f4f87;
  filter: drop-shadow(0 2px 2px rgba(10, 35, 55, 0.2));
}

.personnel-forms-popover {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 132px);
  left: 10px;
  right: 10px;
  z-index: 1311;
  border-radius: 16px;
  border: 1px solid rgba(95, 131, 159, 0.44);
  background: linear-gradient(165deg, rgba(248, 253, 255, 0.99) 0%, rgba(229, 241, 255, 0.99) 100%);
  box-shadow: 0 20px 30px rgba(8, 31, 49, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  max-height: min(56vh, 440px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.personnel-forms-popover-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid rgba(141, 174, 198, 0.48);
}

.personnel-forms-list {
  overflow: auto;
  padding: 8px;
  display: grid;
  gap: 8px;
}

.personnel-forms-item {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(112, 145, 172, 0.34);
  background: linear-gradient(160deg, #ffffff 0%, #edf6ff 100%);
  box-shadow: 0 8px 14px rgba(12, 39, 58, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 9px 10px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

.personnel-forms-item:hover {
  border-color: rgba(29, 111, 163, 0.52);
  background: linear-gradient(160deg, #fefeff 0%, #dfefff 100%);
}

.personnel-forms-item-icon {
  width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.personnel-notify-popover-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid rgba(141, 174, 198, 0.48);
}

.personnel-notify-list {
  overflow: auto;
  padding: 8px;
  display: grid;
  gap: 8px;
}

.personnel-notify-item {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(112, 145, 172, 0.34);
  background: linear-gradient(160deg, #ffffff 0%, #edf6ff 100%);
  box-shadow: 0 8px 14px rgba(12, 39, 58, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 9px;
  text-align: left;
  display: grid;
  gap: 4px;
}

.personnel-notify-item.unread {
  border-color: rgba(29, 111, 163, 0.54);
  background: linear-gradient(160deg, #fefeff 0%, #dfefff 100%);
}

.personnel-notify-item.read {
  opacity: 0.84;
}

.personnel-notify-item-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.personnel-notify-item-head strong {
  color: #12354e;
  font-size: 0.86rem;
  line-height: 1.25;
}

.personnel-notify-item-head small {
  font-size: 0.7rem;
  white-space: nowrap;
}

.personnel-notify-item-summary {
  font-size: 0.76rem;
  line-height: 1.22;
}

.company-code-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0;
}

.chip-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.branch-selector {
  min-width: var(--ui-branch-min-width);
  flex: 1 1 var(--ui-branch-min-width);
}

.device-scale-selector {
  min-width: 170px;
  flex: 0 1 190px;
}

.mobile-nav-controls {
  display: none;
  gap: 8px;
  width: 100%;
}

.mobile-page-selector-wrap {
  min-width: 0;
}

.layout {
  margin-top: 18px;
  display: grid;
  grid-template-columns: var(--ui-sidebar-width) 1fr;
  gap: 18px;
}

.sidebar {
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.nav-btn {
  text-align: left;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f3f8fc 100%);
  padding: 12px 14px;
  font-weight: 600;
  color: #173e5c;
  box-shadow: 0 6px 10px rgba(14, 40, 60, 0.1);
}

.nav-btn.active {
  background: linear-gradient(140deg, rgba(31, 92, 134, 0.18), rgba(23, 63, 92, 0.12));
  border-color: rgba(31, 92, 134, 0.38);
  color: #102f46;
}

.content {
  display: grid;
  gap: 12px;
}

.page {
  padding: 20px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

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

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

th {
  background: rgba(31, 92, 134, 0.1);
  color: #1a3c57;
}

.photo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.photo.empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(45, 36, 28, 0.06);
}

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

.tip-point-input {
  min-width: 110px;
}

.staff-preview-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 12px;
  align-items: start;
}

.staff-preview-detail {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  position: sticky;
  top: 10px;
}

.staff-hero {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: center;
}

.staff-hero-photo {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.staff-hero-photo.empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 36, 28, 0.06);
  color: var(--muted);
  font-size: 0.75rem;
}

.staff-detail-grid {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.staff-detail-grid div {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  display: grid;
  gap: 4px;
}

.staff-detail-grid small {
  color: var(--muted);
}

.staff-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.tip-entry-card-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.tip-entry-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px;
  display: grid;
  gap: 6px;
}

.tip-entry-card-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.tip-entry-card-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.tip-entry-card-title strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tip-entry-card-title .muted {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tip-entry-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 0.86rem;
}

.tip-entry-card-metrics > div {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tip-entry-card-metrics small {
  color: var(--muted);
}

.tip-entry-card-metrics strong {
  font-size: 0.86rem;
}

.tip-pickup-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.7px;
  color: #fff;
  background: linear-gradient(145deg, #ff3131, #b70000);
  border: 1px solid rgba(100, 0, 0, 0.35);
  box-shadow: 0 7px 16px rgba(183, 0, 0, 0.38), inset 0 1px 0 rgba(255, 235, 235, 0.28);
  text-shadow: 0 2px 3px rgba(40, 0, 0, 0.55);
}

.tip-pickup-banner--done {
  background: linear-gradient(145deg, #2f7d32, #1e5d23);
  border-color: rgba(12, 68, 18, 0.35);
  box-shadow: 0 7px 16px rgba(22, 87, 28, 0.34), inset 0 1px 0 rgba(230, 255, 233, 0.24);
  text-shadow: 0 2px 3px rgba(0, 35, 8, 0.5);
}

.approval-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #1f2a37;
  background: linear-gradient(145deg, #f2f4f7, #dfe6ee);
  border: 1px solid rgba(70, 86, 107, 0.2);
  box-shadow: 0 4px 10px rgba(20, 34, 52, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.approval-status-badge--pending {
  color: #5d4300;
  background: linear-gradient(145deg, #ffe7a3, #f6c64e);
  border-color: rgba(123, 90, 0, 0.35);
  box-shadow: 0 6px 12px rgba(184, 132, 0, 0.28), inset 0 1px 0 rgba(255, 246, 220, 0.7);
}

.approval-status-badge--approved {
  color: #0f4f22;
  background: linear-gradient(145deg, #b9f0c5, #56cf73);
  border-color: rgba(16, 98, 39, 0.32);
  box-shadow: 0 6px 12px rgba(39, 143, 63, 0.28), inset 0 1px 0 rgba(233, 255, 238, 0.66);
}

.approval-status-badge--rejected {
  color: #6d0e17;
  background: linear-gradient(145deg, #ffc2c8, #f25f6f);
  border-color: rgba(125, 18, 32, 0.34);
  box-shadow: 0 6px 12px rgba(181, 37, 56, 0.3), inset 0 1px 0 rgba(255, 231, 234, 0.62);
}

.tip-entry-leader-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tip-entry-position-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.tip-entry-position-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(87, 127, 159, 0.35);
  border-radius: 12px;
  padding: 8px 10px;
  background: linear-gradient(160deg, #ffffff 0%, #edf6ff 100%);
  box-shadow: 0 6px 10px rgba(14, 41, 62, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  font-weight: 700;
  color: #184666;
  min-height: 40px;
}

.tip-entry-position-chip input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1f5c86;
}

.tip-entry-position-chip:has(input:checked) {
  border-color: rgba(29, 92, 138, 0.58);
  background: linear-gradient(160deg, #dff0ff 0%, #cde6ff 100%);
  box-shadow: 0 8px 12px rgba(16, 50, 76, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.tip-entry-period-range-3d {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.08rem;
  font-weight: 900;
  color: #fef4ef;
  text-shadow:
    0 1px 0 #7f2c2c,
    0 2px 0 #7f2c2c,
    0 3px 0 #7f2c2c,
    0 4px 8px rgba(24, 24, 24, 0.3);
  background: linear-gradient(160deg, #d14836 0%, #9e1f1f 70%);
  border: 1px solid rgba(122, 28, 28, 0.45);
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 18px rgba(158, 31, 31, 0.26);
}

.tip-entry-leader-card {
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 12px;
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  display: grid;
  gap: 10px;
}

.tip-entry-leader-card.weekly {
  background: linear-gradient(135deg, rgba(253, 224, 71, 0.28), rgba(251, 191, 36, 0.14) 45%, rgba(255, 255, 255, 0.94));
}

.tip-entry-leader-card.monthly {
  background: linear-gradient(135deg, rgba(147, 197, 253, 0.25), rgba(56, 189, 248, 0.14) 45%, rgba(255, 255, 255, 0.94));
}

.tip-entry-leader-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.tip-entry-leader-head h4 {
  margin: 2px 0 0;
  font-size: 1rem;
}

.tip-entry-month-filter {
  display: grid;
  gap: 4px;
}

.tip-entry-month-filter small {
  color: var(--muted);
}

.tip-entry-leader-top {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  padding: 10px;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
}

.tip-entry-leader-top strong {
  display: block;
}

.tip-entry-leader-top .amount {
  margin-top: 3px;
  font-weight: 800;
  color: #0f4e84;
}

.tip-entry-leader-photo {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 2px solid rgba(251, 191, 36, 0.9);
  box-shadow: 0 6px 14px rgba(250, 204, 21, 0.32);
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
}

.tip-entry-leader-photo.empty {
  background: rgba(255, 255, 255, 0.92);
  color: #7b3f00;
}

.tip-entry-rank-list {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  padding-right: 2px;
}

.tip-entry-rank-row {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  padding: 8px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.assignment-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.assignment-summary-card {
  border: 1px solid rgba(24, 39, 55, 0.12);
  border-radius: 16px;
  box-shadow: 0 16px 28px rgba(16, 24, 40, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.assignment-summary-card summary {
  list-style: none;
  cursor: pointer;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.assignment-summary-card summary::-webkit-details-marker {
  display: none;
}

.assignment-summary-card summary small {
  color: rgba(27, 38, 50, 0.78);
  font-weight: 700;
  display: block;
}

.assignment-summary-card summary strong {
  font-size: 1.65rem;
  line-height: 1;
}

.assignment-summary-meta {
  display: grid;
  gap: 3px;
  text-align: right;
  font-size: 0.82rem;
  color: rgba(27, 38, 50, 0.85);
}

.assignment-summary-issued summary {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.94), rgba(253, 230, 138, 0.58), rgba(255, 255, 255, 0.92));
}

.assignment-summary-departed summary {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.9), rgba(167, 243, 208, 0.56), rgba(255, 255, 255, 0.92));
}

.assignment-summary-stock summary {
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.92), rgba(147, 197, 253, 0.5), rgba(255, 255, 255, 0.92));
}

.assignment-summary-content {
  padding: 10px 12px 12px;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.assignment-summary-block-grid {
  display: grid;
  gap: 8px;
}

.assignment-summary-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 236, 226, 0.78));
  display: grid;
  gap: 7px;
}

.assignment-summary-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.assignment-summary-block-head strong {
  font-size: 0.95rem;
}

.assignment-summary-block-head span {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--brand-dark);
}

.assignment-summary-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.assignment-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(38, 52, 68, 0.2);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.9);
}

.assignment-summary-list {
  display: grid;
  gap: 6px;
}

.assignment-summary-list-row {
  border: 1px dashed rgba(38, 52, 68, 0.23);
  border-radius: 9px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.assignment-summary-list-row strong {
  font-size: 0.82rem;
}

.assignment-summary-list-row span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.assignment-report-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.assignment-person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.assignment-person-column {
  border: 1px solid rgba(22, 58, 92, 0.22);
  border-radius: 16px;
  background: linear-gradient(165deg, #f9fcff 0%, #e7f0fb 56%, #dde8f5 100%);
  box-shadow:
    0 14px 24px rgba(16, 42, 68, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  padding: 8px;
  display: grid;
  gap: 8px;
}

.assignment-person-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(22, 58, 92, 0.18);
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.9), rgba(191, 219, 254, 0.65));
}

.assignment-person-head strong {
  color: #0f3554;
  font-size: 0.86rem;
  line-height: 1.2;
}

.assignment-person-head small {
  color: #2d5a7a;
  font-weight: 700;
  font-size: 0.74rem;
}

.assignment-person-list {
  display: grid;
  gap: 8px;
}

.assignment-report-card {
  border: 1px solid rgba(25, 46, 66, 0.2);
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(145deg, #ffffff 0%, #edf5ff 54%, #e4eefb 100%);
  box-shadow: 0 14px 26px rgba(15, 40, 64, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  display: grid;
  gap: 10px;
}

.assignment-report-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.assignment-report-head > div:first-child {
  min-width: 0;
}

.assignment-report-head h4 {
  margin: 0;
  color: #11324a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assignment-report-head small {
  color: #32516a;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assignment-report-badge {
  border: 1px solid rgba(18, 94, 145, 0.25);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(219, 234, 254, 0.85);
  color: #124564;
  font-weight: 800;
  font-size: 0.78rem;
  white-space: nowrap;
}

.assignment-report-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.assignment-report-metrics > div {
  border: 1px solid rgba(25, 46, 66, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px;
  display: grid;
  gap: 2px;
}

.assignment-report-metrics small {
  color: #48647a;
}

.assignment-report-metrics strong {
  color: #123b56;
}

.assignment-report-doc {
  border: 1px dashed rgba(25, 46, 66, 0.22);
  border-radius: 12px;
  padding: 8px;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.assignment-report-card.slim {
  padding: 9px;
  border-radius: 12px;
  background: linear-gradient(150deg, #ffffff 0%, #eef6ff 60%, #e6effa 100%);
  box-shadow: 0 10px 18px rgba(14, 38, 60, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.assignment-report-card.slim .assignment-report-head h4 {
  font-size: 0.84rem;
}

.assignment-report-card.slim .assignment-report-head small {
  font-size: 0.72rem;
}

.assignment-report-card.slim .assignment-report-badge {
  font-size: 0.72rem;
  padding: 3px 8px;
}

.assignment-report-card.slim .row-actions {
  gap: 5px;
}

.assignment-report-card.slim .row-actions .secondary-btn,
.assignment-report-card.slim .row-actions .danger-btn {
  padding: 5px 8px;
  font-size: 0.72rem;
}

.assignment-report-card.slim .assignment-report-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.assignment-report-card.slim .assignment-report-doc input[type="file"] {
  max-width: 100%;
  font-size: 0.74rem;
}

.tip-entry-rank-row .rank {
  font-weight: 800;
  color: #1e6fb1;
}

.tip-entry-rank-row .name-wrap {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.tip-entry-rank-row .name-wrap strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tip-entry-rank-row .amount {
  font-weight: 800;
  white-space: nowrap;
  color: #0f4e84;
}

.tip-entry-rank-row .muted {
  grid-column: 2 / 4;
  font-size: 0.78rem;
  color: #2c79b8;
}

/* Tip entry leader/ranking section text in blue */
.tip-entry-leader-card :is(h4, small, p, span, label) {
  color: #2c79b8;
}

.tip-entry-leader-card :is(strong) {
  color: #0f4e84;
}

.tip-entry-rank-row .name-wrap strong {
  color: #0f4e84;
}

.staff-search-wrap {
  grid-column: 1 / -1;
}

.staff-toolbar-panel {
  border: 1px solid rgba(31, 92, 134, 0.28);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(155deg, #ffffff 0%, #eef5fb 56%, #e3eef8 100%);
  color: #15354e;
  box-shadow:
    0 14px 24px rgba(13, 40, 63, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  display: grid;
  gap: 12px;
}

.staff-toolbar-head .eyebrow {
  color: #1f5c86;
}

.staff-toolbar-head h2 {
  color: #123750;
  text-shadow: none;
}

.staff-toolbar-sub {
  margin: 6px 0 0;
  color: #496479;
  font-size: 0.9rem;
}

.staff-toolbar-controls {
  display: grid;
  gap: 10px;
}

.staff-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.staff-scope-label {
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1c4a6c;
}

.staff-scope-label select {
  min-width: 130px;
}

.staff-toolbar-panel select {
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(179, 211, 234, 0.76);
  color: #153f5d;
}

.staff-toolbar-panel .secondary-btn {
  background: rgba(255, 255, 255, 0.92);
  color: #173f5e;
  border: 1px solid rgba(183, 214, 237, 0.74);
  box-shadow: 0 5px 10px rgba(8, 29, 45, 0.18);
}

.staff-toolbar-panel .secondary-btn:hover {
  background: #ffffff;
}

.staff-toolbar-panel .danger-btn {
  background: #d64141;
  color: #fff;
  box-shadow: 0 7px 13px rgba(170, 33, 33, 0.3);
}

.staff-selected-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(173, 201, 225, 0.88);
  background: #ffffff;
  color: #183f5c;
  padding: 7px 12px;
  font-weight: 700;
  font-size: 0.83rem;
}

.staff-card {
  border: 1px solid rgba(31, 92, 134, 0.24);
  border-radius: 14px;
  background: linear-gradient(155deg, #ffffff 0%, #eef5fb 56%, #e5eef7 100%);
  color: #12354f;
  padding: 11px;
  display: grid;
  gap: 8px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 14px 24px rgba(13, 40, 63, 0.14),
    0 5px 10px rgba(13, 40, 63, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.staff-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.75), transparent 44%),
    linear-gradient(180deg, rgba(31, 92, 134, 0.05), transparent 48%);
  pointer-events: none;
}

.staff-card:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 92, 134, 0.45);
  box-shadow:
    0 18px 30px rgba(13, 40, 63, 0.18),
    0 7px 14px rgba(13, 40, 63, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.staff-card.active {
  border-color: rgba(31, 92, 134, 0.52);
  box-shadow:
    0 0 0 2px rgba(31, 92, 134, 0.14),
    0 16px 26px rgba(13, 40, 63, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.staff-card.matched {
  border-color: rgba(31, 92, 134, 0.44);
  box-shadow:
    0 0 0 2px rgba(31, 92, 134, 0.11),
    0 15px 24px rgba(13, 40, 63, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.staff-card-top {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  align-items: center;
}

.staff-card-top h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #112f46;
  text-shadow: none;
}

.staff-card-top p {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: #3f5b70;
}

.staff-card-tip {
  border: 1px dashed rgba(209, 229, 245, 0.46);
  border-radius: 10px;
  padding: 8px;
  display: grid;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.staff-card-tip small {
  color: #4e677b;
}

.staff-card .photo {
  border: 1px solid rgba(213, 234, 250, 0.72);
  box-shadow: 0 4px 10px rgba(6, 24, 38, 0.35);
}

.staff-card .photo.empty {
  background: rgba(31, 92, 134, 0.08);
  color: #3d5b71;
}

.staff-card .muted {
  color: #496277;
}

.staff-card .secondary-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #183d5a;
}

.staff-card .danger-btn {
  background: #d64141;
  color: #fff;
}

.staff-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 20px;
}

.staff-modal {
  width: min(980px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.staff-modal-card {
  width: min(980px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.tip-entry-modal-head {
  background: #fff;
}

.staff-modal-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  align-items: start;
}

.staff-modal-hero {
  display: grid;
  gap: 8px;
  align-items: start;
}

.staff-modal-photo {
  width: 180px;
  height: 180px;
  border-radius: 14px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.staff-modal-photo.empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 36, 28, 0.06);
  color: var(--muted);
}

.staff-discipline-alert {
  border: 1px solid rgba(172, 60, 52, 0.35);
  border-radius: 10px;
  background: rgba(172, 60, 52, 0.08);
  color: #7f231d;
  padding: 8px 10px;
  display: grid;
  gap: 3px;
  width: 100%;
}

.staff-discipline-alert-icon {
  color: #c51f1a;
  font-size: 2.1rem;
  line-height: 1;
  font-weight: 900;
  animation: disciplineWarnBlink 0.9s steps(2, jump-none) infinite;
}

.staff-discipline-alert strong {
  font-size: 0.9rem;
}

@keyframes disciplineWarnBlink {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.2;
    transform: scale(1.08);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

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

.staff-modal-grid > div {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.staff-modal-grid small {
  color: var(--muted);
}

.coin-photo {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--muted);
  background: #fff;
}

.coin-photo.empty {
  background: rgba(45, 36, 28, 0.06);
}

.waiter-trend-chart {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 8px;
  background: #fff;
}

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

.profile360-summary-wrap {
  border: 1px solid rgba(31, 92, 134, 0.26);
  border-radius: 16px;
  background: linear-gradient(155deg, #ffffff 0%, #eef5fb 56%, #e4eef8 100%);
  box-shadow:
    0 18px 30px rgba(13, 40, 63, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.profile360-summary-wrap .profile360-grid {
  gap: 14px;
}

.profile360-summary-wrap .profile360-card {
  --p360-from: #ffffff;
  --p360-to: #edf4fb;
  border: 1px solid rgba(31, 92, 134, 0.24);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(155deg, var(--p360-from) 0%, var(--p360-to) 100%);
  color: #132f46;
  display: grid;
  gap: 10px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 14px 24px rgba(11, 30, 46, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.profile360-summary-wrap .profile360-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 255, 255, 0.78), transparent 44%),
    linear-gradient(180deg, rgba(31, 92, 134, 0.04), transparent 42%);
  pointer-events: none;
}

.profile360-summary-wrap .profile360-grid > .profile360-card:nth-child(4n + 2) {
  --p360-from: #ffffff;
  --p360-to: #edf8f5;
}

.profile360-summary-wrap .profile360-grid > .profile360-card:nth-child(4n + 3) {
  --p360-from: #ffffff;
  --p360-to: #eef5fb;
}

.profile360-summary-wrap .profile360-grid > .profile360-card:nth-child(4n + 4) {
  --p360-from: #ffffff;
  --p360-to: #f8f5ed;
}

.profile360-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.profile360-head h4 {
  margin: 0;
}

.profile360-summary-wrap .profile360-toggle summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 1;
  color: #12364f;
}

.profile360-summary-wrap .profile360-toggle summary strong,
.profile360-summary-wrap .profile360-head h4 {
  color: #102f45;
  text-shadow: none;
}

.profile360-summary-wrap .profile360-toggle summary .muted {
  color: #4d677b;
}

.profile360-toggle summary::-webkit-details-marker {
  display: none;
}

.profile360-summary-wrap .profile360-toggle .profile360-body {
  margin-top: 10px;
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.profile360-summary-wrap .tip-card {
  --p360-from: #ffffff;
  --p360-to: #fff5df;
}

.profile360-summary-wrap .leave-card {
  --p360-from: #ffffff;
  --p360-to: #eaf8fb;
}

.profile360-summary-wrap .discipline-card {
  --p360-from: #ffffff;
  --p360-to: #fff1f0;
}

.profile360-summary-wrap .profile360-card .panel-lite,
.profile360-summary-wrap .profile360-card .summary-line,
.profile360-summary-wrap .profile360-card .staff-modal-grid > div,
.profile360-summary-wrap .profile360-card .table-wrap {
  border: 1px solid rgba(173, 197, 219, 0.82);
  background: rgba(255, 255, 255, 0.95);
  color: #1f2f3d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.profile360-summary-wrap .profile360-card .staff-modal-grid small,
.profile360-summary-wrap .profile360-card .panel-lite .muted,
.profile360-summary-wrap .profile360-card .summary-line .muted {
  color: #4f6171;
}

.profile360-summary-wrap .profile360-card table th {
  background: #e8f0f7;
  color: #223545;
}

.profile360-summary-wrap .profile360-card table td {
  color: #1f2f3d;
}

.profile360-summary-wrap .profile360-card .row-actions .secondary-btn {
  background: #ffffff;
  color: #1b4665;
  border: 1px solid rgba(174, 197, 220, 0.92);
}

.profile360-summary-wrap .profile360-card .row-actions .danger-btn {
  background: #d64141;
  color: #fff;
}

.staff-modal-card > details.panel-lite.profile360-toggle {
  border: 1px solid rgba(31, 92, 134, 0.24);
  border-radius: 14px;
  background: linear-gradient(155deg, #ffffff 0%, #eef5fb 100%);
  color: #132f46;
  box-shadow: 0 12px 20px rgba(13, 40, 63, 0.12);
}

.staff-modal-card > details.panel-lite.profile360-toggle > summary {
  color: #12364f;
}

.staff-modal-card > details.panel-lite.profile360-toggle > summary .muted {
  color: #4d677b;
}

.staff-modal-card > details.panel-lite.profile360-toggle .table-wrap {
  border: 1px solid rgba(173, 197, 219, 0.82);
  background: rgba(255, 255, 255, 0.95);
}

.staff-modal-card > details.panel-lite.profile360-toggle th {
  background: #e8f0f7;
  color: #223545;
}

.staff-modal-card > details.panel-lite.profile360-toggle td {
  color: #1f2f3d;
}

.shift-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  overflow: visible;
  padding-bottom: 4px;
}

.shift-module-card {
  overflow: hidden;
}

.shift-module-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.shift-module-summary h3 {
  margin: 0;
}

.shift-module-summary::-webkit-details-marker {
  display: none;
}

.shift-module-body {
  margin-top: 10px;
}

.shift-summary-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.shift-summary-card summary {
  list-style: none;
  padding: 10px;
  cursor: pointer;
}

.shift-summary-card summary::-webkit-details-marker {
  display: none;
}

.shift-summary-card h3 {
  margin-bottom: 8px;
  font-size: 1rem;
  color: #f2f9ff;
}

.shift-top-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.shift-top-totals span,
.shift-status-row span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 6px;
  background: rgba(31, 108, 94, 0.05);
  display: grid;
  gap: 2px;
}

.shift-top-totals small,
.shift-status-row small {
  color: var(--muted);
  font-size: 0.68rem;
}

.shift-top-totals strong,
.shift-status-row strong {
  font-size: 0.9rem;
}

.shift-detail {
  border-top: 1px solid var(--line);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.shift-position-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: rgba(45, 36, 28, 0.03);
}

.shift-position-row h4 {
  margin: 0 0 6px;
}

.shift-status-row {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shift-position-table-wrap {
  margin: 0;
}

.shift-position-table th,
.shift-position-table td {
  font-size: 0.78rem;
  text-align: center;
  white-space: nowrap;
}

.shift-position-table th:first-child,
.shift-position-table td:first-child {
  text-align: left;
  min-width: 110px;
}

.panel-lite {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fafe 100%);
  box-shadow: 0 8px 16px rgba(14, 41, 62, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

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

.asset-switch-card {
  border: 1px solid rgba(37, 29, 23, 0.16);
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left;
  color: #1f1711;
  box-shadow: 0 14px 22px rgba(35, 22, 12, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transform: translateY(0);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.asset-switch-card small {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  font-weight: 700;
}

.asset-switch-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.02rem;
  line-height: 1.2;
}

.asset-switch-card p {
  margin: 6px 0 0;
  font-size: 0.84rem;
  color: rgba(24, 17, 12, 0.78);
}

.asset-switch-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 26px rgba(35, 22, 12, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.asset-switch-card.active {
  border-color: rgba(18, 95, 84, 0.55);
  box-shadow: 0 20px 30px rgba(13, 83, 74, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transform: translateY(-1px) scale(1.01);
}

.asset-switch-card-inv {
  background: linear-gradient(145deg, #fff8e8, #fce7c8 58%, #f6d7a7);
}

.asset-switch-card-count {
  background: linear-gradient(145deg, #edf8ff, #d8ecff 58%, #c7e2ff);
}

.asset-switch-card-transfer {
  background: linear-gradient(145deg, #eafcf0, #d7f5e3 58%, #c3ebd5);
}

.asset-switch-card-report {
  background: linear-gradient(145deg, #fff7ed, #ffedd5 58%, #fed7aa);
}

.asset-form-section {
  animation: assetCardReveal 0.2s ease;
}

.asset-inline-card {
  width: 100%;
  border: 1px solid rgba(23, 71, 100, 0.28);
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(145deg, #eff6ff, #dbeafe 58%, #c7ddff);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  text-align: left;
  box-shadow: 0 10px 18px rgba(30, 64, 175, 0.14);
}

.asset-inline-card small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #1e3a8a;
}

.asset-inline-card strong {
  display: block;
  margin-top: 3px;
}

.asset-inline-card span {
  background: rgba(30, 64, 175, 0.14);
  border: 1px solid rgba(30, 64, 175, 0.25);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 0.82rem;
}

.asset-inline-card.active {
  border-color: rgba(8, 47, 73, 0.45);
  box-shadow: 0 14px 22px rgba(8, 47, 73, 0.2);
}

.asset-product-detail {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.asset-product-detail summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(140px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: #f8fafc;
}

.asset-product-detail summary::-webkit-details-marker {
  display: none;
}

.asset-product-total {
  justify-self: end;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
}

.asset-product-detail .table-wrap {
  margin: 0;
  border-top: 1px solid var(--line);
}

@keyframes assetCardReveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-top-tools {
  display: grid;
  gap: 8px;
  min-width: 290px;
}

.home-top-tools .panel-lite {
  display: grid;
  gap: 2px;
}

.home-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.4fr;
  gap: 12px;
}

.home-col {
  display: grid;
  gap: 10px;
  align-content: start;
}

.home-col textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  min-height: 86px;
  resize: vertical;
}

.home-list {
  display: grid;
  gap: 8px;
  max-height: 58vh;
  overflow: auto;
  padding-right: 2px;
}

.home-message-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 6px;
  background: #fff;
}

.home-message-card.mine {
  box-shadow: inset 0 0 0 1px rgba(31, 108, 94, 0.22);
}

.home-message-card.home-thread-tone-0 {
  background: linear-gradient(145deg, #fff8ee, #fff1dd);
}

.home-message-card.home-thread-tone-1 {
  background: linear-gradient(145deg, #eef8ff, #ddefff);
}

.home-message-card.home-thread-tone-2 {
  background: linear-gradient(145deg, #f1fff4, #e2f6e9);
}

.home-message-card.home-thread-tone-3 {
  background: linear-gradient(145deg, #fff2fb, #f7e5f4);
}

.home-message-card p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.home-message-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.home-message-head > div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.home-type-chip {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.home-type-chip-note {
  background: rgba(175, 91, 36, 0.14);
  color: #6f3b16;
}

.home-type-chip-comment {
  background: rgba(31, 108, 94, 0.14);
  color: #1f6c5e;
}

.home-thread-id {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #4f4338;
  background: rgba(45, 36, 28, 0.09);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
}

.home-branch-tag {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(45, 36, 28, 0.06);
}

.home-reply-chip {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
}

.home-reply-thread {
  margin-top: 8px;
  border-top: 1px dashed var(--line);
  border-left: 3px solid rgba(31, 108, 94, 0.38);
  padding-top: 8px;
  padding-left: 10px;
  display: grid;
  gap: 8px;
}

.home-reply-title {
  font-weight: 700;
}

.home-inline-reply {
  margin-top: 6px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px;
  display: grid;
  gap: 8px;
}

.home-inline-reply textarea {
  width: 100%;
  min-height: 74px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 10px;
  resize: vertical;
}

.home-reply-item {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px;
  background: rgba(45, 36, 28, 0.03);
  display: grid;
  gap: 6px;
}

.home-reply-item.mine {
  box-shadow: inset 0 0 0 1px rgba(31, 108, 94, 0.22);
}

.home-reply-item.home-thread-tone-0 {
  background: rgba(255, 238, 213, 0.72);
}

.home-reply-item.home-thread-tone-1 {
  background: rgba(221, 239, 255, 0.72);
}

.home-reply-item.home-thread-tone-2 {
  background: rgba(226, 246, 233, 0.72);
}

.home-reply-item.home-thread-tone-3 {
  background: rgba(247, 229, 244, 0.72);
}

.home-reply-item p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.home-readers-detail {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(45, 36, 28, 0.02);
}

.home-readers-detail summary {
  cursor: pointer;
  font-weight: 600;
}

.home-readers-detail ul {
  margin: 8px 0 0;
  padding-left: 16px;
  display: grid;
  gap: 4px;
}

.leave-usage-list {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.leave-usage-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  display: grid;
  gap: 6px;
}

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

.tech-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  display: grid;
  gap: 6px;
  background: #fff;
}

.salary-approval-card {
  border-radius: 16px;
  padding: 12px;
  gap: 10px;
  border: 1px solid rgba(25, 63, 93, 0.18);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.97), rgba(236, 245, 252, 0.96));
  box-shadow: 0 14px 26px rgba(13, 40, 63, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.salary-approval-card--active {
  border-color: rgba(31, 92, 134, 0.42);
  background: linear-gradient(150deg, rgba(234, 247, 255, 0.98), rgba(223, 239, 252, 0.96));
  box-shadow: 0 16px 30px rgba(16, 55, 86, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.salary-approval-card--file-selected {
  border-color: rgba(27, 138, 115, 0.45);
  box-shadow: 0 16px 30px rgba(11, 86, 73, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.salary-approval-head {
  display: grid;
  gap: 5px;
}

.salary-approval-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.salary-approval-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #2f3b46;
  background: linear-gradient(140deg, rgba(240, 241, 244, 0.96), rgba(225, 231, 239, 0.98));
  border: 1px solid rgba(120, 139, 156, 0.25);
}

.salary-approval-chip--active {
  color: #0f3c5c;
  background: linear-gradient(140deg, rgba(196, 233, 255, 0.98), rgba(165, 215, 247, 0.96));
  border-color: rgba(31, 92, 134, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.salary-upload-panel {
  border: 1px dashed rgba(31, 92, 134, 0.36);
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(242, 248, 253, 0.92));
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.salary-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.salary-file-pick {
  white-space: nowrap;
}

.salary-file-name {
  min-height: 1.1em;
  word-break: break-word;
}

.salary-approval-actions {
  flex-wrap: wrap;
}

.tech-thumb {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.metric-card {
  border-radius: 14px;
  padding: 14px;
  color: #1f1711;
  border: 1px solid var(--line);
  display: grid;
  gap: 6px;
}

.metric-card small {
  font-weight: 700;
  opacity: 0.85;
}

.metric-card strong {
  font-size: 2rem;
  line-height: 1;
}

.metric-card p {
  margin: 0;
}

.metric-card-a {
  background: linear-gradient(145deg, #fff8e9, #f8e2c6);
}

.metric-card-b {
  background: linear-gradient(145deg, #ffe9e6, #ffd4cf);
}

.metric-card-c {
  background: linear-gradient(145deg, #e7f7f2, #d0ece4);
}

.dashboard-grid2 {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 12px;
}

.summary-line {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  display: grid;
  gap: 3px;
  background: #fff;
}

.report-item summary {
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.report-detail {
  margin-top: 10px;
}

.report-actions {
  display: inline-flex;
  gap: 6px;
}

.report-actions .secondary-btn,
.report-actions .danger-btn {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
}

.shift-date-row th {
  background: #fff;
}

.shift-date-cell {
  min-width: 260px;
  vertical-align: top;
}

.shift-date-stack {
  display: grid;
  gap: 8px;
}

.shift-date-stack label {
  font-size: 0.8rem;
  font-weight: 600;
}

.shift-weekend-col {
  background: rgba(176, 25, 25, 0.08) !important;
  border-left: 1px solid rgba(176, 25, 25, 0.25);
}

.shift-monthly-controls {
  flex-wrap: wrap;
}

.shift-monthly-controls label {
  display: grid;
  gap: 4px;
  font-size: 0.84rem;
  font-weight: 600;
}

.shift-month-col {
  min-width: 62px;
}

.shift-month-col small {
  color: var(--muted);
}

.shift-noncore-cell {
  background: #ffd7d7;
  color: #9c0006;
  font-weight: 700;
}

.shift-weekly-table {
  min-width: 1260px;
  width: max-content;
  table-layout: auto;
}

.shift-weekly-table th,
.shift-weekly-table td {
  white-space: nowrap;
  padding: 8px 6px;
  font-size: 0.8rem;
  vertical-align: middle;
}

.shift-weekly-table th:nth-child(1),
.shift-weekly-table td:nth-child(1) {
  width: 200px;
  min-width: 200px;
}

.shift-weekly-table th:nth-child(2),
.shift-weekly-table td:nth-child(2) {
  width: 120px;
  min-width: 120px;
}

.shift-weekly-table th:nth-child(3),
.shift-weekly-table td:nth-child(3) {
  width: 140px;
  min-width: 140px;
}

.shift-weekly-table th:nth-child(n + 4),
.shift-weekly-table td:nth-child(n + 4) {
  width: 115px;
  min-width: 115px;
}

.shift-weekly-table td:first-child,
.shift-weekly-table td:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.shift-cell-truncate {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.shift-weekly-table select[data-role="day"] {
  width: 100%;
  min-width: 0;
  font-size: 0.78rem;
  padding: 6px 4px;
}

.shift-weekly-table select[data-role="fullweek"] {
  width: 100%;
  min-width: 0;
  font-size: 0.78rem;
  padding: 6px 4px;
}

.shift-weekly-table td.shift-leave-cell {
  box-shadow: inset 0 0 0 1px rgba(131, 46, 46, 0.14);
}

.shift-weekly-table td.shift-leave-izinli {
  background: linear-gradient(145deg, #fff0d9 0%, #ffe2b8 100%) !important;
}

.shift-weekly-table td.shift-leave-ph {
  background: linear-gradient(145deg, #e9f5ff 0%, #d5ebff 100%) !important;
}

.shift-weekly-table td.shift-leave-annual {
  background: linear-gradient(145deg, #eafcf3 0%, #d3f6e7 100%) !important;
}

.shift-weekly-table td.shift-leave-raporlu {
  background: linear-gradient(145deg, #ffe8ef 0%, #ffd7e3 100%) !important;
}

.shift-weekly-table td.shift-leave-auto {
  border-left: 3px solid rgba(163, 57, 35, 0.56);
}

.shift-weekly-table select.shift-leave-select {
  font-weight: 800;
  color: #8a1f2d;
  border-color: rgba(160, 65, 92, 0.34);
  background: rgba(255, 255, 255, 0.86);
}

.shift-weekly-table select[data-auto-lock="1"] {
  cursor: not-allowed;
  opacity: 0.96;
}

body.ui-scale-desktop {
  --ui-shell-max-width: 1640px;
  --ui-shell-padding-y: 24px;
  --ui-shell-padding-x: 22px;
  --ui-base-font-size: 16px;
  --ui-topbar-padding-y: 20px;
  --ui-topbar-padding-x: 24px;
  --ui-sidebar-width: 280px;
  --ui-branch-min-width: 260px;
}

body.ui-scale-tablet {
  --ui-shell-max-width: 1200px;
  --ui-shell-padding-y: 18px;
  --ui-shell-padding-x: 16px;
  --ui-base-font-size: 15px;
  --ui-topbar-padding-y: 16px;
  --ui-topbar-padding-x: 16px;
  --ui-sidebar-width: 235px;
  --ui-branch-min-width: 220px;
}

body.ui-scale-tablet .topbar {
  flex-wrap: wrap;
  align-items: flex-start;
}

body.ui-scale-tablet .top-actions {
  width: 100%;
}

body.ui-scale-phone {
  --ui-shell-max-width: 460px;
  --ui-shell-padding-y: 12px;
  --ui-shell-padding-x: 8px;
  --ui-base-font-size: 14px;
  --ui-topbar-padding-y: 12px;
  --ui-topbar-padding-x: 12px;
  --ui-sidebar-width: 1fr;
  --ui-branch-min-width: 140px;
  max-width: 100vw;
  overflow-x: hidden;
}

body.ui-scale-phone .shell,
body.ui-scale-phone .layout,
body.ui-scale-phone .content,
body.ui-scale-phone .page,
body.ui-scale-phone .panel,
body.ui-scale-phone .panel-lite,
body.ui-scale-phone .shift-module-card,
body.ui-scale-phone .staff-toolbar-panel,
body.ui-scale-phone .staff-modal,
body.ui-scale-phone .staff-modal-card,
body.ui-scale-phone #auth-screen,
body.ui-scale-phone #company-screen,
body.ui-scale-phone #branch-create-screen {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body.ui-scale-phone .shell > *,
body.ui-scale-phone .page > *,
body.ui-scale-phone .panel > *,
body.ui-scale-phone .panel-lite > * {
  min-width: 0;
}

body.ui-scale-phone .page h1,
body.ui-scale-phone .page h2,
body.ui-scale-phone .page h3,
body.ui-scale-phone .page h4,
body.ui-scale-phone .page p,
body.ui-scale-phone .page strong,
body.ui-scale-phone .page small,
body.ui-scale-phone .page label,
body.ui-scale-phone .page span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.ui-scale-phone .topbar {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  right: 10px;
  left: auto;
  width: min(92vw, 392px);
  max-height: calc(100vh - 20px);
  overflow: auto;
  z-index: 1301;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.24s ease, opacity 0.2s ease;
}

body.ui-scale-phone.mobile-topbar-open .topbar {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

body.ui-scale-phone .topbar > div:first-child {
  width: 100%;
  min-width: 0;
}

body.ui-scale-phone #company-title,
body.ui-scale-phone #user-line,
body.ui-scale-phone .nextviro-brand-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.ui-scale-phone .nextviro-brand-logo {
  width: 40px;
  height: 40px;
}

body.ui-scale-phone .nextviro-brand-text {
  font-size: 0.82rem;
  line-height: 1.25;
}

body.ui-scale-phone .company-code-line {
  flex-wrap: wrap;
  row-gap: 6px;
}

body.ui-scale-phone .top-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
}

body.ui-scale-phone .branch-selector {
  min-width: 0;
  flex: 1 1 100%;
}

body.ui-scale-phone .device-scale-selector {
  flex: 1 1 100%;
}

body.ui-scale-phone .mobile-nav-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

body.ui-scale-phone .mobile-nav-controls .branch-selector {
  flex: 1 1 auto;
}

body.ui-scale-phone #mobile-back-home-btn {
  border-radius: 12px;
  min-height: 42px;
  padding: 10px 14px;
  white-space: nowrap;
}

body.ui-scale-phone #mobile-back-home-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

body.ui-scale-phone .top-actions .branch-selector,
body.ui-scale-phone .top-actions .device-scale-selector {
  width: 100%;
}

body.ui-scale-phone .top-actions select,
body.ui-scale-phone .top-actions input {
  min-width: 0;
}

body.ui-scale-phone #logout-btn {
  width: 100%;
  border-radius: 12px;
}

body.ui-scale-phone #global-back-btn {
  width: 100%;
  border-radius: 12px;
}

body.ui-scale-phone .mobile-topbar-toggle {
  display: inline-flex;
}

body.ui-scale-phone:not(.mobile-topbar-open) .mobile-topbar-overlay {
  display: none;
}

body.ui-scale-phone .layout {
  grid-template-columns: 1fr;
}

body.ui-scale-phone .sidebar {
  display: none;
}

body.ui-scale-phone .nav-btn {
  text-align: left;
  padding: 10px 12px;
  white-space: normal;
  line-height: 1.25;
}

body.ui-scale-phone .page {
  padding: 14px;
}

body.ui-scale-phone .auth-cols,
body.ui-scale-phone .grid2,
body.ui-scale-phone .grid3,
body.ui-scale-phone .dashboard-metrics,
body.ui-scale-phone .dashboard-grid2,
body.ui-scale-phone .assignment-summary-grid,
body.ui-scale-phone .profile360-grid,
body.ui-scale-phone .home-grid,
body.ui-scale-phone .asset-switch-grid,
body.ui-scale-phone .tech-board,
body.ui-scale-phone .staff-preview-layout,
body.ui-scale-phone .staff-modal-body,
body.ui-scale-phone .staff-modal-grid,
body.ui-scale-phone .shift-summary-grid {
  grid-template-columns: 1fr;
}

body.ui-scale-phone .home-top-tools {
  min-width: 0;
}

body.ui-scale-phone .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}

body.ui-scale-phone table {
  min-width: 640px;
}

body.ui-scale-phone th,
body.ui-scale-phone td {
  padding: 8px 7px;
  font-size: 0.78rem;
}

body.ui-scale-phone .shift-weekly-table {
  min-width: 980px;
}

body.ui-scale-phone .shift-module-body > .table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

body.ui-scale-phone .staff-modal-card {
  width: min(96vw, 430px);
  max-height: 90vh;
  padding: 12px;
}

body.ui-scale-phone .staff-modal-photo {
  width: 100%;
  max-width: 180px;
  height: auto;
  aspect-ratio: 1 / 1;
}

body.ui-scale-phone .tip-entry-leader-grid {
  grid-template-columns: 1fr;
}

body.ui-scale-phone .tip-entry-position-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.ui-scale-phone .tip-entry-position-chip {
  min-height: 36px;
  padding: 6px 8px;
  font-size: 0.72rem;
}

body.ui-scale-phone .tip-entry-leader-head {
  flex-direction: column;
  align-items: stretch;
}

body.ui-scale-phone .tip-entry-rank-row {
  grid-template-columns: 26px minmax(0, 1fr);
}

body.ui-scale-phone .tip-entry-rank-row .amount {
  grid-column: 2 / 3;
}

body.ui-scale-phone .tip-entry-rank-row .muted {
  grid-column: 2 / 3;
}

body.ui-scale-phone .tip-entry-period-range-3d {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  padding: 5px 8px;
}

body.ui-scale-phone .staff-toolbar-group {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
}

body.ui-scale-phone .salary-upload-panel {
  grid-template-columns: 1fr;
}

body.ui-scale-phone .salary-approval-actions .primary-btn,
body.ui-scale-phone .salary-approval-actions .secondary-btn,
body.ui-scale-phone .salary-approval-actions .danger-btn,
body.ui-scale-phone .salary-approval-actions .success-btn {
  width: 100%;
}

body.ui-scale-phone .staff-scope-label select,
body.ui-scale-phone .staff-toolbar-panel .secondary-btn,
body.ui-scale-phone .staff-toolbar-panel .danger-btn,
body.ui-scale-phone .staff-selected-pill {
  width: 100%;
  justify-content: center;
}

body.ui-scale-phone #auth-screen,
body.ui-scale-phone #company-screen,
body.ui-scale-phone #branch-create-screen {
  margin: 10px auto;
  padding: 14px;
}

@media (max-width: 980px) {
  .auth-cols,
  .grid2,
  .grid3,
  .layout {
    grid-template-columns: 1fr;
  }

  .dashboard-metrics,
  .dashboard-grid2,
  .assignment-summary-grid,
  .profile360-grid,
  .home-grid,
  .asset-switch-grid,
  .tip-entry-leader-grid {
    grid-template-columns: 1fr;
  }

  .home-list {
    max-height: none;
  }

  .asset-product-detail summary {
    grid-template-columns: 1fr;
  }

  .asset-product-total {
    justify-self: start;
  }

  .staff-toolbar-group {
    align-items: flex-end;
  }

  .permission-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .sidebar {
    position: static;
    max-height: none;
  }

  .nextviro-brand {
    align-items: flex-start;
  }

  .nextviro-brand-text {
    font-size: 0.92rem;
  }
}

/* Corporate Theme Layer: contrast-safe + 3D professional */
:root {
  --corp-bg-1: #061c35;
  --corp-bg-2: #0b315a;
  --corp-surface: #0e3a69;
  --corp-surface-soft: #12467c;
  --corp-border: rgba(156, 202, 237, 0.32);
  --corp-text: #ebf6ff;
  --corp-muted: #c5def1;
  --corp-dark-1: #1f5c86;
  --corp-dark-2: #173f5c;
  --corp-dark-border: rgba(196, 224, 244, 0.4);
  --corp-light-text: #f4f9fd;
}

body {
  background:
    radial-gradient(circle at 12% 9%, rgba(104, 164, 219, 0.2) 0%, rgba(6, 28, 53, 0) 38%),
    radial-gradient(circle at 84% 12%, rgba(87, 146, 214, 0.17) 0%, rgba(6, 28, 53, 0) 36%),
    linear-gradient(168deg, var(--corp-bg-1) 0%, var(--corp-bg-2) 52%, #144b84 100%);
  color: var(--corp-text);
}

h1,
h2,
h3,
h4 {
  color: #eef7ff;
  letter-spacing: 0.01em;
}

.muted {
  color: var(--corp-muted);
}

.eyebrow {
  color: #9fdbff;
}

/* Light surfaces => dark text */
.panel,
.panel-lite,
.summary-line,
.metric-card,
.tech-card,
.asset-switch-card,
.asset-inline-card,
.tip-entry-card,
.shift-summary-card,
.leave-usage-item,
.staff-preview-detail,
.auth-card,
.permission-checks,
.permission-email-card,
.staff-modal,
.staff-modal-card,
.table-wrap {
  color: var(--corp-text);
  border-color: var(--corp-border);
  background: linear-gradient(165deg, var(--corp-surface) 0%, var(--corp-surface-soft) 100%);
  box-shadow: 0 16px 26px rgba(4, 19, 35, 0.34), inset 0 1px 0 rgba(184, 220, 247, 0.2);
}

.panel-lite:hover,
.summary-line:hover,
.metric-card:hover,
.tech-card:hover,
.asset-switch-card:hover,
.asset-inline-card:hover,
.tip-entry-card:hover,
.shift-summary-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(13, 40, 63, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.table-wrap {
  background: linear-gradient(165deg, #103d6e 0%, #124a82 100%);
}

table th {
  background: rgba(206, 230, 249, 0.14);
  color: #eaf6ff;
}

table td {
  color: #eaf5ff;
}

/* Inputs/options readable everywhere */
input,
select,
textarea {
  background: rgba(255, 255, 255, 0.96);
  color: #12374f;
  border: 1px solid rgba(168, 194, 214, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(31, 92, 134, 0.52);
  box-shadow: 0 0 0 3px rgba(31, 92, 134, 0.12);
}

label {
  color: #e4f3ff;
}

/* Buttons = 3D corporate */
button {
  transition: transform 0.16s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary-btn {
  background: linear-gradient(145deg, #1f5c86 0%, #173f5c 100%);
  color: #fff;
  border: 1px solid rgba(18, 49, 73, 0.28);
  box-shadow: 0 10px 16px rgba(15, 43, 65, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.secondary-btn {
  background: #ffffff;
  color: #193f5c;
  border: 1px solid rgba(171, 196, 216, 0.92);
  box-shadow: 0 6px 12px rgba(14, 41, 62, 0.12);
}

.secondary-btn:hover {
  filter: brightness(1.02);
}

.success-btn {
  background: linear-gradient(145deg, #1f8a73 0%, #176657 100%);
  color: #fff;
  border: 1px solid rgba(18, 89, 74, 0.3);
  box-shadow: 0 9px 15px rgba(14, 70, 58, 0.24);
}

.danger-btn {
  background: linear-gradient(145deg, #d44747 0%, #b93636 100%);
  color: #fff;
  border: 1px solid rgba(126, 27, 27, 0.3);
  box-shadow: 0 9px 15px rgba(140, 28, 28, 0.24);
}

/* Dark surfaces => light text (contrast rule) */
.sidebar,
.staff-toolbar-panel,
.staff-card,
.profile360-summary-wrap {
  background: linear-gradient(155deg, var(--corp-dark-1) 0%, var(--corp-dark-2) 100%);
  color: var(--corp-light-text);
  border-color: var(--corp-dark-border);
  box-shadow: 0 18px 30px rgba(11, 32, 49, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.sidebar h1,
.sidebar h2,
.sidebar h3,
.staff-toolbar-panel h1,
.staff-toolbar-panel h2,
.staff-toolbar-panel h3,
.staff-card h1,
.staff-card h2,
.staff-card h3,
.profile360-summary-wrap h1,
.profile360-summary-wrap h2,
.profile360-summary-wrap h3,
.profile360-summary-wrap h4 {
  color: #ffffff;
}

.sidebar .muted,
.staff-toolbar-panel .muted,
.staff-card .muted,
.profile360-summary-wrap .muted {
  color: rgba(225, 241, 252, 0.92);
}

.sidebar .eyebrow,
.staff-toolbar-panel .eyebrow,
.profile360-summary-wrap .eyebrow {
  color: rgba(226, 241, 252, 0.95);
}

/* Staff modal > Personel 360 Özet summary texts should be blue */
.staff-modal-card .profile360-summary-wrap h3,
.staff-modal-card .profile360-summary-wrap .profile360-toggle summary,
.staff-modal-card .profile360-summary-wrap .profile360-toggle summary strong,
.staff-modal-card .profile360-summary-wrap .profile360-toggle summary small,
.staff-modal-card .profile360-summary-wrap .profile360-toggle summary .muted {
  color: #0f4e84 !important;
}

.staff-modal-card .profile360-summary-wrap .profile360-toggle summary .muted {
  color: #2c79b8 !important;
}

.sidebar .secondary-btn,
.staff-toolbar-panel .secondary-btn,
.staff-card .secondary-btn,
.profile360-summary-wrap .secondary-btn {
  background: #ffffff;
  color: #194260;
  border-color: rgba(174, 201, 223, 0.9);
}

.sidebar select,
.sidebar input,
.staff-toolbar-panel select,
.staff-toolbar-panel input,
.staff-card select,
.staff-card input,
.profile360-summary-wrap select,
.profile360-summary-wrap input {
  background: #ffffff;
  color: #133b56;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.92);
  color: #173f5c;
  border-color: rgba(182, 208, 229, 0.92);
}

.nav-btn.active {
  background: linear-gradient(145deg, #ffffff 0%, #eaf3fb 100%);
  color: #0f3551;
  border-color: rgba(197, 223, 243, 0.95);
  box-shadow: 0 8px 14px rgba(10, 35, 53, 0.22);
}

/* Specific request: Profile 360 > Genel Tip Performansı text black */
.tip-performance-card,
.tip-performance-card summary,
.tip-performance-card .profile360-body,
.tip-performance-card small,
.tip-performance-card strong,
.tip-performance-card h3 {
  color: #111111 !important;
}

/* Dashboard metric cards: colorful 3D + topic icons */
.dashboard-metrics .metric-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(137, 164, 186, 0.45);
  box-shadow: 0 14px 24px rgba(10, 39, 62, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateZ(0);
}

.dashboard-metrics .metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.48) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.dashboard-metrics .metric-card .metric-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dashboard-metrics .metric-card small {
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #1e6fb1 !important;
}

.dashboard-metrics .metric-card strong {
  font-size: 2.08rem;
  color: #0f4e84 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.dashboard-metrics .metric-card .muted {
  color: #2c79b8 !important;
}

.dashboard-metrics .metric-card p {
  color: #2c79b8 !important;
}

.dashboard-metrics .metric-card .metric-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 1.04rem;
  border: 1px solid rgba(93, 128, 154, 0.45);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(226, 239, 249, 0.96) 100%);
  box-shadow: 0 6px 10px rgba(18, 56, 84, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.dashboard-metrics .metric-card.metric-card-a {
  background: linear-gradient(145deg, #fff2d6 0%, #ffe6b8 100%);
}

.dashboard-metrics .metric-card.metric-card-b {
  background: linear-gradient(145deg, #ffe5e9 0%, #ffd6de 100%);
}

.dashboard-metrics .metric-card.metric-card-c {
  background: linear-gradient(145deg, #ddf4ef 0%, #cdeee5 100%);
}

.dashboard-metrics .metric-card.metric-card-a .metric-card-icon {
  background: linear-gradient(145deg, #fff7e5 0%, #ffe9bf 100%);
}

.dashboard-metrics .metric-card.metric-card-b .metric-card-icon {
  background: linear-gradient(145deg, #ffeef1 0%, #ffdce3 100%);
}

.dashboard-metrics .metric-card.metric-card-c .metric-card-icon {
  background: linear-gradient(145deg, #edfdf8 0%, #d7f3ea 100%);
}

.dashboard-metrics .metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 28px rgba(10, 39, 62, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.ui-scale-phone .dashboard-metrics .metric-card .metric-card-icon {
  width: 34px;
  height: 34px;
}

/* Personnel Portal: unified blue 3D card lane */
#page-personnel-portal .personnel-portal-tiles-shell {
  border-radius: 18px;
  border: 1px solid rgba(84, 130, 172, 0.45);
  padding: 12px;
  background: linear-gradient(165deg, #0a2c53 0%, #0f3f76 54%, #145391 100%);
  box-shadow:
    0 18px 30px rgba(7, 26, 46, 0.34),
    inset 0 1px 0 rgba(176, 215, 244, 0.2);
}

#page-personnel-portal .profile360-grid.personnel-portal-tiles-grid {
  grid-template-columns: repeat(auto-fit, minmax(186px, 1fr));
  gap: 10px;
}

#page-personnel-portal .profile360-card {
  border: 1px solid rgba(145, 194, 239, 0.38);
  border-radius: 14px;
  padding: 10px 10px 9px;
  background: linear-gradient(165deg, #0f3c72 0%, #13508d 100%);
  color: #eef7ff;
  box-shadow:
    0 12px 20px rgba(4, 19, 35, 0.32),
    inset 0 1px 0 rgba(196, 229, 251, 0.27);
  overflow: hidden;
  position: relative;
}

#page-personnel-portal .profile360-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 52%;
  background: linear-gradient(180deg, rgba(215, 236, 253, 0.22) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

#page-personnel-portal .profile360-card summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  gap: 2px;
  position: relative;
  z-index: 1;
}

#page-personnel-portal .profile360-card summary::-webkit-details-marker {
  display: none;
}

#page-personnel-portal .profile360-summary-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

#page-personnel-portal .profile360-icon {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  background: linear-gradient(155deg, rgba(244, 250, 255, 0.28) 0%, rgba(184, 222, 247, 0.22) 100%);
  border: 1px solid rgba(187, 224, 249, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

#page-personnel-portal .profile360-card summary strong {
  font-size: 0.88rem;
  line-height: 1.2;
  color: #f2f9ff !important;
}

#page-personnel-portal .profile360-card summary .muted {
  font-size: 0.75rem;
  color: rgba(223, 241, 255, 0.92) !important;
}

#page-personnel-portal .profile360-card .profile360-body {
  margin-top: 8px;
  padding: 8px;
  border-top: 1px solid rgba(179, 219, 247, 0.38);
  border-radius: 11px;
  background: linear-gradient(150deg, rgba(251, 253, 255, 0.98) 0%, rgba(232, 243, 255, 0.98) 100%);
  color: #12374f !important;
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 1;
}

#page-personnel-portal .profile360-card .profile360-body :is(small, strong, p, label, span, h3, h4, h5, h6, .muted) {
  color: #12374f !important;
}

#page-personnel-portal .profile360-card .staff-modal-grid {
  gap: 6px;
}

#page-personnel-portal .profile360-card .staff-modal-grid > div,
#page-personnel-portal .profile360-card .panel-lite {
  border-radius: 9px;
  padding: 7px;
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-tiles-shell {
  border-radius: 16px;
  padding: 9px;
  background: linear-gradient(165deg, #0a2d56 0%, #124779 56%, #1a5c97 100%);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scroll-snap-type: x mandatory;
  box-shadow:
    0 16px 24px rgba(6, 24, 44, 0.35),
    inset 0 1px 0 rgba(177, 216, 246, 0.22);
}

body.ui-scale-phone #page-personnel-portal .profile360-grid.personnel-portal-tiles-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, minmax(98px, auto));
  grid-auto-columns: 145px;
  gap: 8px;
  width: max-content;
  min-width: 100%;
  padding-bottom: 6px;
}

body.ui-scale-phone #page-personnel-portal .profile360-card {
  width: 145px;
  min-height: 98px;
  border-radius: 13px;
  scroll-snap-align: start;
  padding: 9px 8px;
}

body.ui-scale-phone #page-personnel-portal .profile360-card summary {
  min-height: 66px;
  align-content: center;
}

body.ui-scale-phone #page-personnel-portal .profile360-card summary strong {
  font-size: 0.81rem;
}

body.ui-scale-phone #page-personnel-portal .profile360-card summary .muted {
  font-size: 0.68rem;
}

body.ui-scale-phone #page-personnel-portal .profile360-icon {
  width: 24px;
  height: 24px;
  font-size: 0.88rem;
}

body.ui-scale-phone #page-personnel-portal .profile360-card .profile360-body {
  max-height: 52vh;
  overflow: auto;
}

/* Personnel portal request menu */
.personnel-portal-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 12px;
  align-items: start;
}

.personnel-portal-head-note {
  border: 1px solid rgba(98, 128, 154, 0.36);
  border-radius: 12px;
  padding: 12px 14px;
  background: linear-gradient(145deg, #ffffff 0%, #eef5fb 100%);
  box-shadow: 0 8px 14px rgba(12, 38, 56, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.personnel-news-slider {
  padding: 10px;
  border-radius: 14px;
}

.personnel-news-slider-track {
  position: relative;
  min-height: 220px;
}

.personnel-news-slide {
  display: none;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(102, 140, 168, 0.44);
  box-shadow: 0 12px 20px rgba(9, 34, 52, 0.24);
}

.personnel-news-slide.active {
  display: block;
}

.personnel-news-slide-img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  object-position: center;
  background: linear-gradient(160deg, #0f3559 0%, #143f68 100%);
  display: block;
}

.personnel-news-slide-caption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(160deg, rgba(7, 28, 48, 0.9) 0%, rgba(12, 46, 76, 0.86) 100%);
  border: 1px solid rgba(147, 190, 220, 0.35);
  color: #eef7ff;
  display: grid;
  gap: 4px;
}

.personnel-news-slide-caption strong,
.personnel-news-slide-caption small {
  color: #eef7ff !important;
}

.personnel-news-slider-dots {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.personnel-news-slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(109, 141, 166, 0.62);
  background: #d6e5f3;
  padding: 0;
}

.personnel-news-slider-dot.active {
  background: #1f5c86;
  border-color: rgba(17, 63, 95, 0.7);
  transform: scale(1.13);
}

.personnel-portal-menu-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.personnel-portal-floating-head {
  display: grid;
  gap: 3px;
}

.personnel-portal-floating-head strong {
  font-size: 1.02rem;
  color: #10344c;
}

.personnel-portal-menu-btn {
  border: 1px solid rgba(97, 124, 149, 0.38);
  border-radius: 12px;
  padding: 10px 11px;
  background: linear-gradient(145deg, #ffffff 0%, #eef5fb 100%);
  color: #11344c;
  font-weight: 700;
  box-shadow: 0 8px 14px rgba(12, 38, 56, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.personnel-portal-menu-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 18px rgba(12, 38, 56, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.personnel-portal-menu-btn.active {
  border-color: rgba(35, 118, 168, 0.62);
  background: linear-gradient(145deg, #e7f4ff 0%, #d9edff 100%);
  color: #0f3351;
  box-shadow: 0 13px 20px rgba(13, 66, 100, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.personnel-portal-menu-grid--floating .personnel-portal-menu-btn {
  border-radius: 16px;
  padding: 12px 10px;
  font-weight: 800;
  letter-spacing: 0.01em;
  border: 1px solid rgba(61, 118, 156, 0.45);
  background: linear-gradient(160deg, #ffffff 0%, #e5f1ff 55%, #d6e9ff 100%);
  box-shadow: 0 11px 18px rgba(12, 45, 68, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.personnel-portal-menu-grid--floating .personnel-portal-menu-btn.active {
  background: linear-gradient(160deg, #2a74a8 0%, #1e5a85 100%);
  color: #f7fbff;
  border-color: rgba(20, 67, 98, 0.58);
  box-shadow: 0 14px 22px rgba(11, 39, 58, 0.35), inset 0 1px 0 rgba(223, 244, 255, 0.35);
}

.personnel-portal-menu-btn--notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.portal-menu-badge {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(145deg, #d64242 0%, #bd2424 100%);
  box-shadow: 0 6px 12px rgba(124, 24, 24, 0.28);
}

.personnel-portal-section {
  margin-top: 8px;
}

.personnel-portal-form-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(7, 22, 36, 0.46);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

#page-personnel-portal .personnel-portal-section.portal-modal-open {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2501;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 56px);
  overflow: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(76, 117, 147, 0.42);
  border-radius: 16px;
  background: linear-gradient(175deg, #ffffff 0%, #f1f7ff 100%);
  box-shadow: 0 24px 44px rgba(8, 28, 45, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  animation: portalModalIn 0.2s ease;
}

.personnel-portal-modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -14px -14px 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(92, 131, 160, 0.35);
  background: linear-gradient(175deg, rgba(255, 255, 255, 0.98) 0%, rgba(237, 247, 255, 0.98) 100%);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.personnel-portal-modal-head strong {
  font-size: 1rem;
  color: #13354f;
}

.personnel-portal-modal-head .secondary-btn {
  min-width: 38px;
  height: 34px;
  border-radius: 10px;
  padding: 0;
  font-weight: 800;
}

@keyframes portalModalIn {
  from {
    opacity: 0;
    transform: translate(-50%, -46%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Personnel portal top profile compact layout */
#page-personnel-portal .personnel-portal-profile-card {
  padding: 10px;
}

#page-personnel-portal .personnel-portal-compact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

#page-personnel-portal .personnel-portal-compact-grid > div {
  border: 1px solid rgba(107, 138, 164, 0.32);
  border-radius: 10px;
  padding: 7px 8px;
  background: linear-gradient(155deg, #ffffff 0%, #f2f8ff 100%);
  display: grid;
  gap: 3px;
  min-height: 56px;
}

#page-personnel-portal .personnel-portal-compact-grid > div small {
  font-size: 0.72rem;
  color: #4c6a80;
  line-height: 1.12;
}

#page-personnel-portal .personnel-portal-compact-grid > div strong {
  font-size: 1rem;
  color: #133850;
  line-height: 1.2;
  word-break: break-word;
}

/* Requested: top personnel info fields in blue */
#page-personnel-portal .personnel-portal-compact-grid > div small {
  color: #2e79b6 !important;
}

#page-personnel-portal .personnel-portal-compact-grid > div strong {
  color: #0f4e84 !important;
}

#page-personnel-portal .personnel-portal-tip-note {
  padding: 8px 10px;
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-profile-card {
  padding: 8px;
}

body.ui-scale-phone #page-personnel-portal .personnel-news-slider {
  padding: 8px;
}

body.ui-scale-phone #page-personnel-portal .personnel-news-slide-img {
  height: 150px;
}

body.ui-scale-phone #page-personnel-portal .personnel-news-slide-caption {
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 8px 9px;
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-top-card {
  padding: 7px;
}

body.ui-scale-phone #page-personnel-portal .staff-hero {
  grid-template-columns: 48px 1fr;
  gap: 7px;
}

body.ui-scale-phone #page-personnel-portal .staff-hero-photo {
  width: 48px;
  height: 48px;
}

body.ui-scale-phone #page-personnel-portal .staff-hero h3 {
  font-size: 0.97rem;
  line-height: 1.15;
}

body.ui-scale-phone #page-personnel-portal .staff-hero .muted {
  font-size: 0.69rem;
  line-height: 1.15;
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-compact-grid > div {
  padding: 5px 6px;
  min-height: 44px;
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-compact-grid > div small {
  font-size: 0.61rem;
  line-height: 1.08;
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-compact-grid > div strong {
  font-size: 0.78rem;
  line-height: 1.12;
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-tip-note {
  margin-top: 5px !important;
  padding: 6px 7px;
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-tip-note small {
  font-size: 0.66rem;
  line-height: 1.14;
}

body.ui-scale-phone .personnel-portal-menu-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.ui-scale-phone #page-personnel-portal {
  padding-bottom: calc(190px + env(safe-area-inset-bottom, 0px));
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-floating-menu {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  z-index: 1203;
  margin: 0;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(86, 128, 160, 0.44);
  background: linear-gradient(165deg, rgba(248, 253, 255, 0.98) 0%, rgba(227, 240, 255, 0.98) 100%);
  box-shadow: 0 16px 28px rgba(8, 32, 51, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-floating-head {
  display: none;
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-menu-grid--floating {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-menu-grid--floating .personnel-portal-menu-btn {
  min-height: 46px;
  padding: 11px 6px;
  font-size: 0.85rem;
  line-height: 1.2;
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-section {
  max-height: calc(100vh - 240px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 9px;
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-section.portal-modal-open {
  left: 8px;
  right: 8px;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  transform: none;
  width: auto;
  max-height: none;
  border-radius: 14px;
  padding: 10px;
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-modal-head {
  margin: -10px -10px 8px;
  padding: 8px 10px;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-section form {
  gap: 8px;
}

body.ui-scale-phone #page-personnel-portal .personnel-portal-section h3 {
  font-size: 0.95rem;
}

body.ui-scale-phone .shift-module-body {
  max-height: calc(100vh - 230px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#page-personnel-portal-card .personnel-portal-card-head h2 {
  font-size: 1.12rem;
  line-height: 1.2;
}

#page-personnel-portal-card .personnel-portal-card-body {
  display: grid;
  gap: 10px;
}

body.ui-scale-phone #page-personnel-portal-card {
  padding: 10px;
}

body.ui-scale-phone #page-personnel-portal-card .personnel-portal-card-page {
  gap: 8px;
}

body.ui-scale-phone #page-personnel-portal-card .personnel-portal-card-head {
  padding: 8px;
}

body.ui-scale-phone #page-personnel-portal-card .personnel-portal-card-head h2 {
  font-size: 0.95rem;
}

body.ui-scale-phone #page-personnel-portal-card .personnel-portal-card-body {
  max-height: calc(100vh - 230px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px;
}

body.ui-scale-phone .personnel-portal-head {
  grid-template-columns: 1fr;
}

.portal-notice-list {
  gap: 10px;
}

.portal-notice-card {
  border: 1px solid rgba(106, 142, 170, 0.4);
  border-radius: 12px;
  padding: 11px 12px;
  background: linear-gradient(145deg, #ffffff 0%, #eff7ff 100%);
  box-shadow: 0 10px 16px rgba(12, 38, 56, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.portal-notice-card[data-personnel-notice-read] {
  cursor: pointer;
}

.portal-notice-card.is-unread {
  border-color: rgba(35, 115, 168, 0.5);
  background: linear-gradient(145deg, #fafdff 0%, #e8f3ff 100%);
}

.portal-notice-card.is-read {
  opacity: 0.86;
}

.portal-notice-card.notice-approved {
  border-color: rgba(39, 140, 88, 0.45);
  background: linear-gradient(145deg, #f3fff8 0%, #e5faee 100%);
}

.portal-notice-card.notice-rejected {
  border-color: rgba(183, 62, 62, 0.48);
  background: linear-gradient(145deg, #fff4f4 0%, #ffe8e8 100%);
}

.portal-notice-card.notice-warning {
  border-color: rgba(185, 129, 33, 0.5);
  background: linear-gradient(145deg, #fffaf0 0%, #fff0d8 100%);
}

.portal-notice-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.portal-notice-summary {
  margin-top: 7px;
  color: #1f435f;
  font-weight: 600;
}

.portal-notice-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Personnel portal notifications text color: blue */
#page-personnel-portal-notifications .portal-notice-card,
#page-personnel-portal-notifications .portal-notice-card :is(strong, small, p, span, label, .muted) {
  color: #1e6fb1 !important;
}

#page-personnel-portal-notifications .portal-notice-card .portal-notice-head strong,
#page-personnel-portal-notifications .portal-notice-card .portal-notice-summary,
#page-personnel-portal-notifications .portal-notice-card .portal-notice-actions strong {
  color: #0f4e84 !important;
}

#page-personnel-portal-notifications .portal-notice-card .secondary-btn {
  color: #0f4e84 !important;
  border-color: rgba(44, 121, 184, 0.45) !important;
  background: linear-gradient(155deg, #ffffff 0%, #eaf4ff 100%) !important;
}

.profile360-main-card .profile360-main-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.profile360-main-card .profile360-main-summary::-webkit-details-marker {
  display: none;
}

/* Personnel birthday celebration full-screen overlay */
.birthday-celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 244, 213, 0.32), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(255, 214, 224, 0.28), transparent 36%),
    linear-gradient(145deg, rgba(30, 13, 48, 0.88) 0%, rgba(19, 34, 64, 0.9) 100%);
  backdrop-filter: blur(6px);
}

.birthday-celebration-card {
  width: min(560px, 95vw);
  border-radius: 22px;
  padding: 24px 22px 20px;
  text-align: center;
  border: 1px solid rgba(254, 234, 192, 0.55);
  background: linear-gradient(155deg, #fff5d9 0%, #ffe9bf 52%, #ffdca7 100%);
  color: #3a2211;
  box-shadow:
    0 28px 44px rgba(10, 16, 30, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.birthday-celebration-card h2 {
  margin: 2px 0 8px;
  font-size: clamp(1.4rem, 4vw, 2.1rem);
  color: #5b2a0c;
}

.birthday-celebration-card h3 {
  margin: 0 0 8px;
  font-size: clamp(1.1rem, 3.5vw, 1.6rem);
  color: #7a2f1d;
}

.birthday-celebration-card p {
  margin: 0 0 10px;
  font-weight: 700;
  color: #4d2e1d;
}

.birthday-cake-emoji {
  font-size: clamp(2.2rem, 8vw, 4rem);
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 8px 10px rgba(66, 22, 8, 0.25));
}

.birthday-celebration-card .primary-btn {
  margin-top: 12px;
  min-width: 220px;
}

.waiter-sales-winner-overlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 20% 16%, rgba(255, 246, 208, 0.26), transparent 38%),
    radial-gradient(circle at 80% 14%, rgba(231, 221, 255, 0.2), transparent 36%),
    linear-gradient(145deg, rgba(8, 24, 46, 0.9) 0%, rgba(26, 42, 75, 0.92) 100%);
  backdrop-filter: blur(6px);
}

.waiter-sales-winner-card {
  position: relative;
  z-index: 2;
  width: min(640px, 95vw);
  border-radius: 20px;
  border: 1px solid rgba(255, 223, 141, 0.55);
  padding: 24px 20px 18px;
  text-align: center;
  background: linear-gradient(150deg, #fffef5 0%, #fff3ca 45%, #ffe3a6 100%);
  color: #3d2a09;
  box-shadow:
    0 26px 40px rgba(8, 14, 28, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.waiter-sales-winner-card h2 {
  margin: 0 0 8px;
  font-size: clamp(1.3rem, 3.1vw, 2rem);
  color: #6b3f0a;
}

.waiter-sales-winner-card p {
  margin: 0 0 10px;
  font-weight: 800;
  color: #4f3610;
}

.waiter-sales-winner-card .primary-btn {
  margin-top: 12px;
  min-width: 180px;
}

.winner-trophy {
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 8px 10px rgba(64, 35, 8, 0.28));
}

.winner-fireworks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.winner-firework {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: -5px;
  border-radius: 999px;
  background: hsl(var(--h), 96%, 61%);
  box-shadow:
    0 0 0 0 hsla(var(--h), 96%, 61%, 0.92),
    0 0 0 0 hsla(var(--h), 96%, 61%, 0.56),
    0 0 0 0 hsla(var(--h), 96%, 61%, 0.26);
  animation: winner-firework-pop 1.9s ease-out infinite;
  animation-delay: var(--delay);
}

@keyframes winner-firework-pop {
  0% {
    transform: scale(0.28);
    opacity: 0;
    box-shadow:
      0 0 0 0 hsla(var(--h), 96%, 61%, 0.9),
      0 0 0 0 hsla(var(--h), 96%, 61%, 0.56),
      0 0 0 0 hsla(var(--h), 96%, 61%, 0.26);
  }
  18% {
    opacity: 1;
  }
  65% {
    opacity: 1;
    box-shadow:
      0 0 0 12px hsla(var(--h), 96%, 61%, 0.62),
      0 0 0 26px hsla(var(--h), 96%, 61%, 0.36),
      0 0 0 44px hsla(var(--h), 96%, 61%, 0.14);
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
    box-shadow:
      0 0 0 16px hsla(var(--h), 96%, 61%, 0),
      0 0 0 34px hsla(var(--h), 96%, 61%, 0),
      0 0 0 56px hsla(var(--h), 96%, 61%, 0);
  }
}

.tip-payout-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 18% 15%, rgba(255, 255, 255, 0.22), transparent 35%),
    radial-gradient(circle at 84% 20%, rgba(214, 248, 255, 0.22), transparent 32%),
    linear-gradient(145deg, rgba(9, 25, 42, 0.9) 0%, rgba(14, 38, 61, 0.92) 100%);
  backdrop-filter: blur(4px);
}

.tip-payout-card {
  width: min(620px, 95vw);
  border-radius: 18px;
  padding: 22px 20px;
  border: 1px solid rgba(148, 204, 234, 0.5);
  background: linear-gradient(150deg, #ffffff 0%, #f1fbff 50%, #e5f4ff 100%);
  color: #16354e;
  box-shadow:
    0 24px 40px rgba(9, 20, 36, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.tip-payout-card h2 {
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 2.8vw, 1.8rem);
  color: #0f3e5d;
}

.tip-payout-card p {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #184768;
}

.tip-payout-card .primary-btn {
  margin-top: 10px;
  min-width: 180px;
}

.staff-broadcast-overlay {
  position: fixed;
  inset: 0;
  z-index: 10003;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 20% 16%, rgba(224, 248, 255, 0.26), transparent 38%),
    radial-gradient(circle at 82% 18%, rgba(255, 230, 192, 0.22), transparent 34%),
    linear-gradient(145deg, rgba(8, 25, 45, 0.9) 0%, rgba(14, 43, 70, 0.93) 100%);
  backdrop-filter: blur(5px);
}

.staff-broadcast-card {
  width: min(660px, 95vw);
  border-radius: 20px;
  padding: 24px 22px;
  border: 1px solid rgba(145, 215, 244, 0.5);
  background: linear-gradient(155deg, #ffffff 0%, #eef8ff 54%, #ddeefe 100%);
  color: #123a56;
  text-align: center;
  box-shadow:
    0 26px 42px rgba(8, 20, 36, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.staff-broadcast-card h2 {
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 3vw, 1.9rem);
  color: #0f3f62;
}

.staff-broadcast-card p {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #1b4c6e;
  white-space: pre-wrap;
}

.staff-broadcast-icon {
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 8px 10px rgba(16, 46, 70, 0.26));
}

.staff-broadcast-card .primary-btn {
  min-width: 170px;
}

/* Overlay form contrast safety
   - Light panel => dark text
   - Dark panel  => light text */
#page-personnel-portal .personnel-portal-section.portal-modal-open,
#page-personnel-portal .personnel-portal-section.portal-modal-open h1,
#page-personnel-portal .personnel-portal-section.portal-modal-open h2,
#page-personnel-portal .personnel-portal-section.portal-modal-open h3,
#page-personnel-portal .personnel-portal-section.portal-modal-open h4,
#page-personnel-portal .personnel-portal-modal-head,
#page-personnel-portal .personnel-portal-modal-head strong,
.birthday-celebration-card,
.birthday-celebration-card h2,
.birthday-celebration-card h3,
.birthday-celebration-card p,
.waiter-sales-winner-card,
.waiter-sales-winner-card h2,
.waiter-sales-winner-card p,
.tip-payout-card,
.tip-payout-card h2,
.tip-payout-card p,
.staff-broadcast-card,
.staff-broadcast-card h2,
.staff-broadcast-card p {
  color: #12374f;
}

#page-personnel-portal .personnel-portal-section.portal-modal-open .muted,
.birthday-celebration-card .muted,
.waiter-sales-winner-card .muted,
.tip-payout-card .muted,
.staff-broadcast-card .muted {
  color: #46637a;
}

.staff-modal-backdrop .staff-modal,
.staff-modal-backdrop .staff-modal-card,
.staff-modal-backdrop .staff-modal h1,
.staff-modal-backdrop .staff-modal h2,
.staff-modal-backdrop .staff-modal h3,
.staff-modal-backdrop .staff-modal h4,
.staff-modal-backdrop .staff-modal-card h1,
.staff-modal-backdrop .staff-modal-card h2,
.staff-modal-backdrop .staff-modal-card h3,
.staff-modal-backdrop .staff-modal-card h4 {
  color: #ebf6ff;
}

.staff-modal-backdrop .staff-modal .muted,
.staff-modal-backdrop .staff-modal-card .muted {
  color: #c5def1;
}

/* Force readable labels/inputs on light overlay forms (e.g. personnel portal request modals) */
#page-personnel-portal .personnel-portal-section.portal-modal-open label,
#page-personnel-portal .personnel-portal-section.portal-modal-open small,
#page-personnel-portal .personnel-portal-section.portal-modal-open .muted,
#page-personnel-portal .personnel-portal-section.portal-modal-open p,
#page-personnel-portal .personnel-portal-section.portal-modal-open strong {
  color: #12374f !important;
}

#page-personnel-portal .personnel-portal-section.portal-modal-open input,
#page-personnel-portal .personnel-portal-section.portal-modal-open select,
#page-personnel-portal .personnel-portal-section.portal-modal-open textarea {
  color: #12374f !important;
  background: #ffffff !important;
  border-color: rgba(136, 173, 201, 0.9) !important;
}

#page-personnel-portal .personnel-portal-section.portal-modal-open input[type="file"] {
  color: #12374f !important;
}

#page-personnel-portal .personnel-portal-section.portal-modal-open input[type="file"]::file-selector-button {
  color: #12374f !important;
  background: #f2f8ff !important;
  border: 1px solid rgba(136, 173, 201, 0.9) !important;
  border-radius: 8px;
  padding: 6px 10px;
  margin-right: 10px;
}

#page-personnel-portal .personnel-portal-section.portal-modal-open input[type="file"]::-webkit-file-upload-button {
  color: #12374f !important;
  background: #f2f8ff !important;
  border: 1px solid rgba(136, 173, 201, 0.9) !important;
  border-radius: 8px;
  padding: 6px 10px;
  margin-right: 10px;
}

/* Leave request preview cards: force dark card + white text */
#page-personnel-portal #portal-section-leave .panel-lite {
  background: linear-gradient(160deg, #123f6a 0%, #0f3356 100%) !important;
  border-color: rgba(151, 198, 232, 0.42) !important;
}

#page-personnel-portal #portal-section-leave .panel-lite small,
#page-personnel-portal #portal-section-leave .panel-lite .muted,
#page-personnel-portal #portal-section-leave .panel-lite strong {
  color: #f3f9ff !important;
}

/* Request history cards (Personnel Portal): dark card + white text */
#page-personnel-portal #portal-section-history .panel-lite {
  background: linear-gradient(160deg, #123f6a 0%, #0f3356 100%) !important;
  border-color: rgba(151, 198, 232, 0.42) !important;
}

#page-personnel-portal #portal-section-history .panel-lite,
#page-personnel-portal #portal-section-history .panel-lite summary,
#page-personnel-portal #portal-section-history .panel-lite :is(strong, small, p, span, label, a, .muted) {
  color: #f3f9ff !important;
}

#page-personnel-portal #portal-section-history .panel-lite .approval-status-badge {
  color: #ffffff !important;
}

/* Discipline warning records: PDF view link text should be blue */
#page-discipline-warning-form .panel-lite a,
#page-discipline-warning-form .panel-lite a.secondary-btn,
#page-discipline-warning-form .panel-lite .muted a {
  color: #0f4f82 !important;
}

#page-discipline-warning-form .panel-lite a.secondary-btn:hover {
  color: #0b3d63 !important;
}

/* Discipline record detail: "İmzalı Tutanak Dosyası" özel buton stili */
#page-discipline-warning-form .panel-lite a.discipline-signed-doc-btn {
  color: #ffffff !important;
  background: linear-gradient(160deg, #1b5d92 0%, #0f4f82 100%) !important;
  border: 1px solid rgba(153, 206, 244, 0.42) !important;
  box-shadow: 0 8px 16px rgba(9, 44, 74, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  text-shadow: 0 1px 1px rgba(6, 26, 44, 0.42);
}

#page-discipline-warning-form .panel-lite a.discipline-signed-doc-btn:hover {
  color: #ffffff !important;
  background: linear-gradient(160deg, #226ba6 0%, #12588f 100%) !important;
  border-color: rgba(176, 220, 252, 0.52) !important;
}

.decision-note-3d {
  display: inline-block;
  margin-top: 4px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #5a1d12;
  border: 1px solid rgba(183, 93, 68, 0.42);
  background: linear-gradient(145deg, #ffe6db 0%, #ffd4c3 100%);
  box-shadow: 0 8px 14px rgba(114, 41, 24, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.portal-shift-week-table {
  width: 100%;
  border-collapse: collapse;
}

.portal-shift-week-table th,
.portal-shift-week-table td {
  border: 1px solid rgba(132, 162, 186, 0.42);
  padding: 6px 5px;
  text-align: center;
  font-size: 0.77rem;
  font-weight: 700;
  white-space: nowrap;
}

.portal-shift-week-table th {
  background: rgba(31, 92, 134, 0.1);
  color: #f2f9ff;
}

.portal-shift-week-table td.portal-shift-open {
  background: linear-gradient(145deg, #eaf9ff 0%, #d8f0ff 100%);
  color: #11446a;
}

.portal-shift-week-table td.portal-shift-close {
  background: linear-gradient(145deg, #fdeeea 0%, #fbded5 100%);
  color: #7a2816;
}

.portal-shift-week-table td.portal-shift-middle {
  background: linear-gradient(145deg, #f1f3ff 0%, #e2e7ff 100%);
  color: #303e87;
}

.portal-shift-week-table td.portal-shift-leave {
  background: linear-gradient(145deg, #fff2dc 0%, #ffe5be 100%);
  color: #7a4a11;
}

.portal-shift-week-table td.portal-shift-ph {
  background: linear-gradient(145deg, #ecf8ff 0%, #d9efff 100%);
  color: #18527d;
}

.portal-shift-week-table td.portal-shift-annual {
  background: linear-gradient(145deg, #ecfbf3 0%, #daf7e8 100%);
  color: #155f41;
}

.portal-shift-week-table td.portal-shift-sick {
  background: linear-gradient(145deg, #ffe9f1 0%, #ffdce9 100%);
  color: #8b2048;
}

body.ui-scale-phone #page-personnel-portal .portal-shift-week-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

body.ui-scale-phone #page-personnel-portal .portal-shift-week-table th,
body.ui-scale-phone #page-personnel-portal .portal-shift-week-table td {
  padding: 4px 3px;
  font-size: 0.63rem;
  white-space: normal;
  word-break: break-word;
  line-height: 1.14;
}

body.ui-scale-phone #page-personnel-portal .portal-shift-week-table th {
  font-size: 0.62rem;
}

/* Global auto-contrast engine
   JS sets data-auto-contrast="dark|light" by reading effective background color. */
[data-auto-contrast="light"] {
  color: #12374f !important;
}

[data-auto-contrast="light"] :is(h1, h2, h3, h4, h5, h6, p, small, strong, label, summary, a, li) {
  color: #12374f !important;
}

[data-auto-contrast="light"] .muted {
  color: #46637a !important;
}

[data-auto-contrast="dark"] {
  color: #eef7ff !important;
}

[data-auto-contrast="dark"] :is(h1, h2, h3, h4, h5, h6, p, small, strong, label, summary, a, li) {
  color: #eef7ff !important;
}

[data-auto-contrast="dark"] .muted {
  color: #c9dded !important;
}

[data-auto-contrast] input,
[data-auto-contrast] select,
[data-auto-contrast] textarea {
  color: #12374f !important;
  background: #ffffff !important;
}
