@import url('assets/icons/bootstrap-icons.css');

@font-face {
  font-family: Peyda;
  src: url('fonts/PeydaWeb-Regular.woff2?v=25') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: Peyda;
  src: url('fonts/PeydaWeb-Bold.woff2?v=25') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: block;
}

:root {
  font-synthesis: none;
  --ink: #12223a;
  --muted: #71819a;
  --navy: #06335d;
  --blue: #1676cf;
  --sky: #e9f4ff;
  --line: #dce7f1;
  --surface: #ffffff;
  --surface-soft: #f8fbfe;
  --orange: #e67a29;
  --green: #147a5b;
  --red: #bf4c43;
  --shadow: 0 20px 52px rgba(26, 65, 101, 0.1);
}

* { box-sizing: border-box; }

#root { width: 100%; max-width: 100%; overflow-x: clip; }

html { min-height: 100%; background: #edf5fb; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 0%, rgba(102, 193, 255, 0.28), transparent 24rem),
    radial-gradient(circle at 12% 100%, rgba(166, 222, 244, 0.32), transparent 27rem),
    #edf5fb;
  font: 14px/1.75 Peyda, Tahoma, sans-serif;
}

[hidden] { display: none !important; }

html,
body,
#root,
button,
input,
select,
textarea {
  font-family: Peyda, Tahoma, sans-serif;
}

button,
input,
select,
textarea { font: inherit; }

button { cursor: pointer; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible { outline: 3px solid rgba(22, 118, 207, 0.2); outline-offset: 2px; }

#login {
  position: relative;
  display: grid;
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
  padding: 36px 20px;
  background:
    linear-gradient(128deg, rgba(2, 34, 67, 0.96), rgba(10, 90, 156, 0.9)),
    #06335d;
}

#login::before,
#login::after {
  position: absolute;
  width: 42rem;
  height: 42rem;
  border-radius: 50%;
  content: '';
  pointer-events: none;
}

#login::before {
  top: -24rem;
  right: -18rem;
  border: 1px solid rgba(255, 255, 255, 0.17);
  box-shadow: 0 0 0 4rem rgba(255, 255, 255, 0.03), 0 0 0 10rem rgba(255, 255, 255, 0.025);
}

#login::after {
  bottom: -31rem;
  left: -20rem;
  background: radial-gradient(circle, rgba(121, 216, 255, 0.48), rgba(121, 216, 255, 0));
}

#login .box {
  position: relative;
  z-index: 1;
  width: min(450px, calc(100vw - 40px));
  max-width: 100%;
  min-width: 0;
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 30px 80px rgba(0, 18, 42, 0.3);
}

#login .box::before {
  display: block;
  width: 52px;
  height: 8px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), #ffc65d);
  content: '';
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.1px;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  margin-bottom: 27px;
  color: var(--navy);
  font-size: clamp(23px, 4vw, 29px);
  line-height: 1.35;
}

h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(22px, 2.7vw, 30px);
  line-height: 1.45;
}

h3 { margin-bottom: 8px; font-size: 16px; }

label {
  display: grid;
  gap: 7px;
  margin: 15px 0;
  color: #29415e;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d3e0ec;
  border-radius: 13px;
  color: var(--ink);
  background: #fbfdff;
  padding: 11px 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea { min-height: 98px; resize: vertical; }

input:hover,
select:hover,
textarea:hover { border-color: #afc9de; }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(22, 118, 207, 0.1);
  outline: 0;
}

input[type='date'],
input[type='month'],
input[type='time'],
input[type='number'],
#username,
#password,
#setupUser,
#setupPass,
#setupToken { direction: ltr; text-align: left; }

button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #1676cf, #07549f);
  padding: 10px 16px;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(13, 98, 175, 0.17);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

button:hover { filter: brightness(1.04); box-shadow: 0 12px 20px rgba(13, 98, 175, 0.25); transform: translateY(-1px); }
button:active { transform: translateY(0); }

#login button { width: 100%; min-height: 50px; margin-top: 9px; border-radius: 14px; }
#error,
#setupError { min-height: 24px; margin: 13px 0 0; color: var(--red); font-weight: 700; }

#app {
  min-height: 100dvh;
  padding-right: 274px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.7), rgba(241, 248, 253, 0.9)),
    #eef6fb;
}

#app > header {
  position: sticky;
  z-index: 3;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 80px;
  gap: 15px;
  border-bottom: 1px solid rgba(208, 223, 235, 0.9);
  background: rgba(255, 255, 255, 0.84);
  padding: 12px clamp(22px, 4vw, 50px);
  backdrop-filter: blur(18px);
}

#app > header div { display: grid; gap: 0; }
#app > header b { color: var(--navy); font-size: 16px; }
#app > header small { color: var(--muted); font-size: 12px; }

#app > header .header-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.header-identity > div { display: grid; min-width: 0; gap: 1px; }
.header-identity b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-identity img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: #fff;
  object-fit: contain;
  padding: 2px;
  box-shadow: 0 6px 15px rgba(10, 74, 122, .12);
}

#menu {
  display: none;
  min-width: 44px;
  min-height: 44px;
  color: var(--navy);
  background: var(--sky);
  box-shadow: none;
}

#logout {
  min-height: 40px;
  color: #b94b25;
  background: #fff2ec;
  box-shadow: none;
}

#app > header .header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

#installApp {
  min-height: 40px;
  color: #086a59;
  background: #e8f8f2;
  box-shadow: none;
}

#installApp i { margin-left: 4px; color: #0b7d67; }

#nav {
  position: fixed;
  z-index: 5;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  width: 274px;
  flex-direction: column;
  gap: 13px;
  overflow-y: auto;
  border-left: 1px solid rgba(203, 221, 235, 0.8);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(243, 249, 253, 0.98)),
    #fff;
  padding: 22px 14px 25px;
  box-shadow: -12px 0 40px rgba(42, 77, 110, 0.06);
}

.nav-brand { display: grid; gap: 2px; margin: 0 10px 2px; }
.nav-brand span { color: var(--navy); font-family: sans-serif; font-size: 13px; font-weight: 800; letter-spacing: 1.3px; }
.nav-brand small { color: #8297aa; font-size: 10px; }
.nav-group { display: grid; gap: 3px; padding: 12px 0 0; }
.nav-group + .nav-group { border-top: 1px solid #e4edf4; }
.nav-group-label { padding: 0 12px 5px; color: #8398aa; font-size: 10px; font-weight: 700; }

#nav button {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  border-radius: 13px;
  color: #405875;
  background: transparent;
  padding: 8px 13px;
  text-align: right;
  box-shadow: none;
}

#nav button i { width: 20px; color: #8095aa; font-size: 17px; text-align: center; }
#nav button:hover { color: var(--blue); background: #edf6ff; box-shadow: none; transform: none; }
#nav button.active { color: #075ca9; background: linear-gradient(90deg, #dcefff, #eef8ff); box-shadow: inset -3px 0 0 var(--blue); }
#nav button.active i { color: var(--blue); }

#content {
  width: min(100%, 1550px);
  min-height: calc(100dvh - 80px);
  margin: 0 auto;
  padding: clamp(23px, 3.2vw, 46px);
  transition: opacity 160ms ease;
}

/* Retain the current page during a slow request instead of repeatedly replacing it with a blank loader. */
#content.is-loading-view {
  opacity: .62;
  pointer-events: none;
}

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(8, 53, 94, 0.2);
  border-radius: 25px;
  color: #fff;
  background:
    linear-gradient(125deg, rgba(3, 43, 79, 0.98), rgba(11, 111, 186, 0.92)),
    var(--navy);
  padding: clamp(26px, 4vw, 42px);
  box-shadow: 0 22px 42px rgba(5, 61, 110, 0.2);
}

.hero::after {
  position: absolute;
  top: -150px;
  left: -90px;
  width: 330px;
  height: 330px;
  border: 50px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: '';
}

.hero .eyebrow { color: #ffca85; }
.hero h2 { position: relative; z-index: 1; color: #fff; }
.hero p:last-child { position: relative; z-index: 1; margin: 8px 0 0; color: rgba(255, 255, 255, 0.76); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.card,
.panel {
  border: 1px solid rgba(213, 228, 239, 0.95);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.card {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  padding: 20px;
}

.card::after {
  position: absolute;
  bottom: -24px;
  left: -24px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #eff8ff;
  content: '';
}

.card small,
.row small,
.muted { color: var(--muted); }
.card h3 { position: relative; z-index: 1; margin: 5px 0 0; color: #0e5eaa; font-size: 21px; line-height: 1.5; }
.card h3 + small { position: relative; z-index: 1; display: block; margin-top: 5px; }

.panel { padding: clamp(19px, 2.3vw, 27px); }
.panel > h3 { color: var(--navy); font-size: 18px; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}

.toolbar > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar input { min-height: 41px; }
.toolbar button { min-height: 41px; padding: 8px 13px; }

.split {
  display: grid;
  grid-template-columns: minmax(310px, 0.82fr) minmax(0, 1.5fr);
  align-items: start;
  gap: 18px;
}

.split > .grid { margin: 0; }

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid #e8eff5;
  padding: 16px 0;
}

.row:first-of-type { padding-top: 0; }
.row:last-child { border-bottom: 0; padding-bottom: 0; }
.row b { color: #1c3854; }
.row small { display: block; margin-top: 3px; }
.row > div:last-child { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; text-align: left; }
.row > div:last-child > b { color: #075ca9; white-space: nowrap; }
.row button { min-height: 34px; border-radius: 9px; padding: 6px 10px; font-size: 12px; }

.tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  color: #166c4f;
  background: #e9f8f0;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.tag.pending { color: #9b6a00; background: #fff4d8; }
.tag.late { color: #b6552a; background: #fff0e9; }
.tag.leave-tag { color: #176a5d; background: #e1f7f0; }
.danger { color: #a73e39 !important; background: #ffefee !important; box-shadow: none !important; }

form.panel { display: block; }
form.panel button[type='submit'] { width: 100%; margin-top: 7px; }

@media print {
  body { background: #fff; }
  #nav,
  #app > header,
  form,
  .toolbar button,
  #menu { display: none !important; }
  #app { padding: 0; background: #fff; }
  #content { width: 100%; min-height: 0; padding: 0; }
  .panel,
  .card { border: 1px solid #ddd; box-shadow: none; }
}

@media (max-width: 920px) {
  #app { padding-right: 0; }
  #app > header { padding: 12px 18px; }
  #menu { display: inline-flex; align-items: center; justify-content: center; }
  #nav {
    width: min(82vw, 290px);
    transform: translateX(105%);
    transition: transform 220ms ease;
  }
  #nav.open { transform: translateX(0); }
  #content { padding: 24px 18px 34px; }
}

@media (max-width: 670px) {
  #login { padding: 18px; }
  #login .box {
    width: calc(100vw - 36px);
    max-width: 100%;
    padding: 28px 22px;
    border-radius: 23px;
  }
  #app > header { min-height: 70px; gap: 9px; padding: 9px 13px; }
  #app > header b { font-size: 13px; }
  #app > header .header-actions { gap: 5px; }
  #installApp,
  #logout { min-height: 36px; padding: 7px 11px; font-size: 12px; }
  #installApp { padding-inline: 9px; }
  #content { padding: 18px 13px 28px; }
  .hero { border-radius: 20px; padding: 25px 20px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 11px; margin: 13px 0; }
  .card { min-height: 118px; border-radius: 16px; padding: 15px; }
  .card h3 { font-size: 17px; }
  .panel { border-radius: 17px; padding: 17px; }
  .split { grid-template-columns: 1fr; gap: 13px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar > div { align-items: stretch; }
  .toolbar > div input { flex: 1; }
  .toolbar > div button { flex: 1; }
  .row { grid-template-columns: 1fr; gap: 9px; padding: 14px 0; }
  .row > div:last-child { justify-content: flex-start; text-align: right; }
}

@media (max-width: 390px) {
  .grid { grid-template-columns: 1fr; }
  .toolbar > div button { flex: auto; }
}

/* Application views */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-head .eyebrow { margin-bottom: 2px; }
.page-description { max-width: 680px; margin: 5px 0 0; color: var(--muted); }
.page-actions,
.month-actions,
.button-row,
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.page-actions { justify-content: flex-end; }
.page-actions input,
.month-actions input { width: 155px; min-height: 42px; }
.month-actions select { min-width: 190px; min-height: 42px; border-radius: 11px; padding: 8px 11px; }

.button-secondary { color: #0760ad !important; background: #e6f3ff !important; box-shadow: none !important; }
.button-quiet { color: #48617e !important; background: #f0f5f9 !important; box-shadow: none !important; }
.button-warning { color: #825500 !important; background: #fff1cf !important; box-shadow: none !important; }
.button-small { min-height: 34px; border-radius: 9px; padding: 6px 10px; font-size: 12px; }
button:disabled { cursor: not-allowed; opacity: .58; filter: grayscale(.25); transform: none !important; }
.is-busy { position: relative; color: transparent !important; }
.is-busy::after { position: absolute; top: 50%; left: 50%; width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; content: ''; transform: translate(-50%, -50%); animation: spin .7s linear infinite; }

@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.loading,
.empty {
  display: grid;
  min-height: 150px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.loading span { width: 28px; height: 28px; border: 3px solid #cde5f7; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
.empty i { color: #9bbbd5; font-size: 32px; }
.empty p { margin: 0; }

.hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hero > div { position: relative; z-index: 1; }
.hero-mark { display: grid; width: 94px; height: 94px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 28px; color: #fff; background: rgba(255,255,255,.1); font-size: 43px; transform: rotate(-7deg); }

.metric-card { min-height: 146px; }
.metric-card > span { position: relative; z-index: 1; display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.metric-card.positive h3 { color: var(--green); }
.metric-card.warning h3 { color: var(--orange); }
.metric-card.danger h3 { color: #b64d43; }

.attendance-list { display: grid; gap: 10px; }
.attendance-item {
  display: grid;
  grid-template-columns: auto minmax(170px, 1fr) auto auto auto;
  align-items: center;
  gap: 13px;
  border: 1px solid #e0ebf3;
  border-radius: 16px;
  background: #fcfeff;
  padding: 14px 15px;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.attendance-item:hover { border-color: #bbd9ef; box-shadow: 0 10px 20px rgba(33, 89, 129, .06); transform: translateY(-1px); }
.avatar { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border-radius: 14px; color: #075da9; background: linear-gradient(135deg, #d8efff, #edf8ff); font-weight: 700; }
.avatar.large { width: 48px; height: 48px; border-radius: 16px; font-size: 17px; }
.avatar.xl { width: 68px; height: 68px; border-radius: 23px; font-size: 25px; }
.attendance-person b,
.attendance-time b { display: block; color: #183b5e; }
.attendance-person small,
.attendance-time small { color: var(--muted); font-size: 11px; }
.attendance-time { min-width: 105px; text-align: left; direction: ltr; }
.attendance-state { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 5px; }
.attendance-actions { display: flex; justify-content: flex-end; }
.attendance-item:has(.danger-tag) { border-color: #f0d4d1; background: #fffdfd; }
.attendance-item:has(.leave-tag) { border-color: #c9eadf; background: #fbfffd; }
.admin-correction-tag { color: #73560a; background: #fff3ca; }

.attendance-correction-layout { display: grid; width: min(100%, 1180px); grid-template-columns: minmax(0, 1fr); gap: 22px; margin: 0 auto; }
.attendance-correction-form-shell { width: min(100%, 920px); min-width: 0; margin: 0 auto; }
.attendance-correction-form { position: relative; overflow: hidden; border: 1px solid #d8e8f3; box-shadow: 0 16px 34px rgba(21, 75, 114, .08); }
.attendance-correction-form::before { position: absolute; top: 0; right: 0; left: 0; height: 4px; background: linear-gradient(90deg, #ffad42, #0b82cf 48%, #0d5fa8); content: ''; }
.attendance-correction-form .form-page-heading { margin-bottom: 17px; }
.correction-present-fields { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.correction-present-fields[hidden] { display: none; }
.correction-records { border-color: #d9e8f2; background: #f7fbfe; box-shadow: 0 14px 30px rgba(21, 75, 114, .06); }
.correction-records .records-heading { background: #fff; }
.correction-records > .list-filter-panel { background: #fff; }
.correction-list { gap: 12px; background: #f7fbfe; padding: 16px 18px 20px !important; }
.correction-row { display: grid; grid-template-areas: 'person details actions' 'note note actions'; grid-template-columns: minmax(190px, .82fr) minmax(0, 1.45fr) minmax(192px, .84fr); align-items: center; gap: 12px 20px; border: 1px solid #dce9f2; border-radius: 18px; background: #fff; padding: 17px 18px; box-shadow: 0 8px 20px rgba(30, 81, 119, .045); transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.correction-row:hover { border-color: #b9d8eb; box-shadow: 0 13px 25px rgba(30, 81, 119, .08); transform: translateY(-1px); }
.correction-person { display: flex; grid-area: person; min-width: 0; align-items: center; gap: 11px; }
.correction-person > div:last-child { min-width: 0; }
.correction-person h3 { overflow: hidden; margin: 0; color: var(--navy); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.correction-person p { overflow: hidden; margin: 3px 0 0; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.correction-details { display: grid; grid-area: details; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.correction-details > div { min-width: 0; border: 1px solid #e5eef5; border-radius: 11px; background: #f9fcfe; padding: 8px 10px; }
.correction-details dt { margin: 0 0 3px; color: #7190a6; font-size: 10px; font-weight: 700; }
.correction-details dd { overflow: hidden; margin: 0; color: #264e6d; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.correction-note { display: flex; grid-area: note; min-width: 0; align-items: flex-start; gap: 8px; border-radius: 11px; color: #55728c; background: #f5f9fc; padding: 9px 11px; }
.correction-note > i { margin-top: 2px; color: #2586c4; }
.correction-note > div { min-width: 0; }
.correction-note span { display: block; color: #7190a6; font-size: 10px; font-weight: 700; }
.correction-note p { overflow-wrap: anywhere; margin: 2px 0 0; font-size: 12px; line-height: 1.65; }
.correction-actions { display: grid; grid-area: actions; min-width: 0; justify-items: end; gap: 8px; }
.correction-action-head { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.admin-correction-label { color: #7a6333; background: #fff4d6; border-radius: 999px; padding: 4px 8px; font-size: 10px; font-weight: 700; }
.correction-updated-by { color: #6d879d; font-size: 11px; white-space: nowrap; }
.correction-updated-by i { margin-left: 4px; color: #2688c7; }
.correction-actions .record-actions { justify-content: flex-end; }
.correction-absent { border-right: 4px solid #c66a62; background: linear-gradient(105deg, #fff, #fffafa); }

.checkin-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 19px;
  border: 1px solid #b9dfef;
  border-radius: 20px;
  background: linear-gradient(105deg, #f8fdff, #e7f6ff);
  padding: 19px 22px;
  box-shadow: 0 12px 30px rgba(27, 111, 174, .07);
}

.checkin-card > div { display: flex; align-items: center; gap: 13px; }
.checkin-card h3 { margin: 0 0 2px; color: var(--navy); }
.checkin-card p { margin: 0; color: var(--muted); font-size: 12px; }
.checkin-card.done { border-color: #cdebdc; background: linear-gradient(105deg, #f8fffb, #eaf9f1); }
.checkin-card.not-ready { border-color: #d8e5ed; background: linear-gradient(105deg, #fbfdff, #f0f6fa); }

.device-security-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  border: 1px solid #c9e2ef;
  border-radius: 20px;
  background: linear-gradient(110deg, #fcfeff, #edf8ff);
  padding: 16px 19px;
  box-shadow: 0 10px 25px rgba(20, 89, 137, .055);
}

.device-security-card.approved { border-color: #c6e9d8; background: linear-gradient(110deg, #fbfffc, #ecfaf3); }
.device-security-card.pending { border-color: #f2ddb0; background: linear-gradient(110deg, #fffdf8, #fff4dd); }
.device-security-card.required { border-color: #f0d4d1; background: linear-gradient(110deg, #fffdfd, #fff2f1); }
.device-security-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; color: #0871bd; background: #dff2ff; font-size: 19px; }
.device-security-card.approved .device-security-icon { color: #087052; background: #ddf6e9; }
.device-security-card.pending .device-security-icon { color: #9a6805; background: #fff0cd; }
.device-security-card.required .device-security-icon { color: #aa5145; background: #ffebe8; }
.device-security-card h3 { margin: 1px 0 3px; color: var(--navy); font-size: 15px; }
.device-security-card p { margin: 0; color: var(--muted); font-size: 12px; }
.device-details { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.device-details span { border-radius: 8px; color: #54718a; background: rgba(255, 255, 255, .78); padding: 4px 7px; font-size: 10px; }
.device-details i { margin-left: 3px; color: #2587c5; }

.round-icon { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; border-radius: 14px; color: #0871bd; background: #e0f2ff; font-size: 19px; }
.filter-toolbar { align-items: flex-end; }
.filter-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 9px; }
.filter-fields label { min-width: 135px; flex: 1 1 135px; gap: 4px; margin: 0; font-size: 11px; }
.filter-fields input,
.filter-fields select { min-height: 40px; padding: 8px 10px; }
.filter-fields button { min-height: 40px; }

.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.panel-heading h3 { margin-bottom: 2px; }
.panel-heading p { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid > label { min-width: 0; }
.form-wide { grid-column: 1 / -1; }
.gps-capture-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 14px;
  border: 1px solid #b8dfef;
  border-radius: 16px;
  background: linear-gradient(120deg, #f8fdff, #e8f6fb);
  padding: 14px;
}
.gps-capture-copy { display: flex; min-width: 0; align-items: center; gap: 10px; }
.gps-capture-copy .round-icon { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 13px; font-size: 17px; }
.gps-capture-copy b { display: block; color: #164b72; font-size: 13px; }
.gps-capture-copy p { margin: 2px 0 0; color: #617d94; font-size: 11px; line-height: 1.7; }
.gps-capture-card .button-secondary { min-width: 168px; white-space: nowrap; }
label.checkbox-line { display: flex; min-height: 48px; align-items: center; gap: 9px; margin-top: 22px; color: #47627e; font-weight: 500; }
label.checkbox-line input { width: 17px; min-height: 17px; margin: 0; accent-color: var(--blue); }
label.checkbox-line span { display: grid; gap: 2px; }
label.checkbox-line b { color: #244b6a; font-size: 13px; }
label.checkbox-line small { color: #71889b; font-size: 11px; font-weight: 400; line-height: 1.65; }
.permission-selector {
  border: 1px solid #cde4f2;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fcff, #eef8fd);
  padding: 16px;
}
.permission-selector-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 13px; margin-bottom: 13px; }
.permission-selector h4 { margin: 0; color: var(--navy); font-size: 15px; }
.permission-selector p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.permission-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.permission-option {
  display: flex;
  min-height: 68px;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid #dbeaf4;
  border-radius: 13px;
  background: rgba(255, 255, 255, .88);
  padding: 11px;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.permission-option:hover { border-color: #9bcbe5; box-shadow: 0 7px 16px rgba(28, 97, 142, .07); transform: translateY(-1px); }
.viewer-permission-option { grid-column: 1 / -1; border-color: #a8d6c0; background: linear-gradient(120deg, #f2fcf7, #edf9ff); }
.viewer-permission-option b { color: #146346; }
.permission-option input { width: 17px; min-height: 17px; margin: 2px 0 0; accent-color: var(--blue); }
.permission-option span { display: grid; gap: 2px; }
.permission-option b { color: #214b6d; font-size: 12px; }
.permission-option small { color: #71889b; font-size: 10px; line-height: 1.55; }
.compact-form { align-self: start; }
.compact-form > h3 { margin-bottom: 15px; }

.form-details { margin-bottom: 18px; border: 1px solid #d8e8f4; border-radius: 18px; background: rgba(255,255,255,.79); box-shadow: 0 10px 26px rgba(28,72,111,.05); }
.form-details > summary { cursor: pointer; color: #17537e; padding: 16px 19px; font-weight: 700; list-style: none; }
.form-details > summary::-webkit-details-marker { display: none; }
.form-details > summary::before { display: inline-block; margin-left: 9px; color: var(--blue); content: '+'; font-size: 20px; line-height: .8; vertical-align: -1px; }
.form-details[open] > summary { border-bottom: 1px solid #e5eef6; }
.form-details[open] > summary::before { content: '−'; }
.form-details > .panel { border: 0; border-radius: 0 0 18px 18px; box-shadow: none; }
.edit-area { margin-bottom: 18px; }

.employee-grid,
.branch-grid,
.holiday-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.employee-card,
.branch-card,
.leave-card,
.holiday-card,
.location-card { border: 1px solid #dce9f3; border-radius: 19px; background: rgba(255,255,255,.95); box-shadow: 0 12px 30px rgba(22,65,99,.07); }
.employee-card { padding: 18px; }
.employee-card.is-inactive,
.branch-card.is-inactive { opacity: .62; }
.employee-top { display: flex; align-items: center; gap: 11px; }
.employee-top > div:nth-child(2) { min-width: 0; flex: 1; }
.employee-top h3 { margin: 0; color: var(--navy); font-size: 16px; }
.employee-top p { overflow: hidden; margin: 1px 0 0; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.online-dot,
.offline-dot { border-radius: 99px; padding: 3px 8px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.online-dot { color: #10734f; background: #e6f8ef; }
.offline-dot { color: #9b544d; background: #fff0ee; }
.employee-card dl,
.profile-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; }
.employee-card dl div,
.profile-info div { min-width: 0; border-top: 1px solid #edf2f6; padding-top: 8px; }
.employee-card dt,
.profile-info dt { color: #8294a9; font-size: 10px; }
.employee-card dd,
.profile-info dd { overflow: hidden; margin: 2px 0 0; color: #284864; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.card-actions { justify-content: flex-start; margin-top: 17px; }

.branch-grid { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.branch-card { padding: 20px; }
.branch-card-top { display: flex; align-items: center; gap: 12px; }
.branch-card h3 { margin: 0; color: var(--navy); font-size: 17px; }
.branch-card p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.branch-meta { display: grid; gap: 8px; margin-top: 18px; }
.branch-meta span { display: flex; align-items: center; gap: 7px; color: #4c6782; font-size: 12px; }
.branch-meta i { width: 16px; color: #3b8cc9; text-align: center; }

.leave-layout { grid-template-columns: minmax(320px, .92fr) minmax(0, 1.65fr); }
.leave-list-panel { min-width: 0; }
.filter-panel { margin: 0 0 15px; border: 1px solid #e1ebf3; border-radius: 13px; background: #f9fcff; }
.filter-panel > summary { cursor: pointer; padding: 10px 13px; color: #516c87; font-size: 12px; font-weight: 700; }
.filter-panel form { padding: 0 13px 13px; }
.leave-list { display: grid; gap: 10px; }
.leave-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 16px; }
.leave-card-main,
.location-card-main { display: flex; min-width: 0; align-items: center; gap: 11px; }
.leave-card-main > div:last-child,
.location-card-main > div:last-child { min-width: 0; }
.leave-card h3,
.location-card h3 { margin: 0; color: var(--navy); font-size: 15px; }
.leave-card p,
.location-card p { margin: 2px 0; color: #496782; font-size: 12px; }
.leave-card small,
.location-card small { color: var(--muted); font-size: 11px; }
.leave-card-side,
.location-card-side { display: flex; flex-wrap: wrap; align-content: flex-start; align-items: center; justify-content: flex-end; gap: 7px; }
.paid-status { color: #6d8195; font-size: 11px; white-space: nowrap; }
.leave-actions { grid-column: 1 / -1; margin-top: 0; padding-top: 12px; border-top: 1px solid #edf2f6; }
.danger-tag { color: #a14742; background: #ffefee; }

.payroll-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.payroll-panel { overflow-x: auto; padding: 0; }
.payroll-head,
.payroll-row { display: grid; min-width: 880px; grid-template-columns: minmax(175px, 1.4fr) repeat(5, minmax(108px, 1fr)); align-items: center; gap: 10px; }
.payroll-head { border-bottom: 1px solid #dbe8f2; color: #56718c; background: #f7fbfe; padding: 14px 20px; font-size: 11px; font-weight: 700; }
.payroll-row { border-bottom: 1px solid #edf2f6; padding: 15px 20px; }
.payroll-row:last-child { border-bottom: 0; }
.payroll-row > div { display: grid; gap: 2px; color: #264662; font-size: 12px; }
.payroll-row > div > span { display: none; color: #8293a4; font-size: 10px; }
.payroll-row b { font-size: 12px; }
.payroll-person small { color: var(--muted); font-size: 10px; }
.payable { color: #087351; }
.negative { color: #b64d43; }
.positive-money { color: #167a58; }
.payroll-lower { margin-top: 18px; }

.entitlement-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.entitlement-filter-fields { display: flex; min-width: 0; flex: 1 1 auto; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.entitlement-filter-fields > label { min-width: 165px; flex: 1 1 180px; gap: 5px; margin: 0; color: #46647d; font-size: 11px; }
.entitlement-filter-fields input, .entitlement-filter-fields select { min-height: 42px; margin-top: 4px; padding: 8px 11px; }
.entitlement-toolbar > button { min-height: 42px; margin: 0 !important; white-space: nowrap; }
.entitlement-branch-lock { display: flex; min-height: 48px; min-width: min(100%, 310px); flex: 1 1 265px; align-items: center; gap: 9px; border: 1px solid #cce6f4; border-radius: 12px; background: #f4fbff; padding: 8px 11px; }
.entitlement-branch-lock > i { color: #0b75b9; font-size: 19px; }
.entitlement-branch-lock div { display: grid; min-width: 0; gap: 1px; }
.entitlement-branch-lock small { color: #728ba0; font-size: 10px; }
.entitlement-branch-lock b { overflow: hidden; color: #16496e; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.entitlement-branch-lock > span { margin-right: auto; border-radius: 99px; color: #086696; background: #dceffa; padding: 3px 7px; font-size: 9px; white-space: nowrap; }
.entitlement-branch-banner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; margin-bottom: 17px; border: 1px solid #cce4f2; border-radius: 20px; background: linear-gradient(118deg, #fbfeff, #ebf7fe); padding: 16px 19px; box-shadow: 0 10px 25px rgba(19, 84, 128, .055); }
.entitlement-branch-banner h3 { margin: 2px 0 2px; color: #07446f; font-size: 18px; }
.entitlement-branch-banner p { margin: 0; color: #668096; font-size: 11px; line-height: 1.75; }
.entitlement-branch-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.entitlement-branch-meta > span:not(.tag) { border: 1px solid #d7e8f2; border-radius: 9px; color: #5c768c; background: rgba(255,255,255,.8); padding: 5px 7px; font-size: 10px; white-space: nowrap; }
.entitlement-branch-meta b { color: #184d72; }
.entitlement-table-panel { overflow: hidden; padding: 0; }
.entitlement-table-panel .records-heading { margin: 0; padding: 19px 21px 14px; }
.entitlement-table-scroll { overflow-x: auto; border-top: 1px solid #e1edf4; scrollbar-color: #9fc8e1 transparent; }
.entitlement-table { width: 100%; min-width: 940px; border-collapse: collapse; color: #264763; font-size: 11px; }
.entitlement-table th { color: #4d6b85; background: #f5faff; font-size: 10px; font-weight: 700; }
.entitlement-table th, .entitlement-table td { border-bottom: 1px solid #e6eef4; padding: 12px 13px; text-align: right; vertical-align: middle; }
.entitlement-table tbody tr:last-child td { border-bottom: 0; }
.entitlement-table tbody tr:hover td { background: #f9fcff; }
.entitlement-table td b, .entitlement-table td small { display: block; }
.entitlement-table td b { color: #204561; font-size: 11px; }
.entitlement-table td small { margin-top: 3px; color: #72889c; font-size: 9.5px; }
.entitlement-table .entitlement-index { width: 56px; color: #4b6c85; text-align: center; }
.entitlement-table .entitlement-employee { min-width: 250px; }
.entitlement-table .entitlement-net { color: #087150; background: #f0fbf5; font-weight: 800; white-space: nowrap; }
.entitlement-table td .empty { min-width: 0; margin: 4px 0; }

@media (max-width: 850px) {
  .entitlement-toolbar { align-items: stretch; flex-direction: column; }
  .entitlement-toolbar > button { width: 100%; }
  .entitlement-branch-banner { grid-template-columns: auto minmax(0, 1fr); }
  .entitlement-branch-meta { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 670px) {
  .entitlement-filter-fields { display: grid; grid-template-columns: 1fr; width: 100%; }
  .entitlement-filter-fields > label, .entitlement-branch-lock { min-width: 0; width: 100%; }
  .entitlement-branch-banner { gap: 10px; border-radius: 17px; padding: 15px; }
  .entitlement-branch-banner .round-icon { width: 39px; height: 39px; border-radius: 12px; font-size: 17px; }
  .entitlement-branch-banner h3 { font-size: 16px; }
  .entitlement-branch-meta { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .entitlement-branch-meta .tag { justify-self: start; }
  .entitlement-table-panel .records-heading { align-items: flex-start; flex-direction: column; padding: 16px; }
  .entitlement-table-panel .filter-count { align-self: flex-start; }
  .entitlement-table { min-width: 820px; font-size: 10px; }
  .entitlement-table th, .entitlement-table td { padding: 10px; }
}
.adjustment-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #e8eff5; padding: 13px 0; }
.adjustment-row:last-child { border-bottom: 0; }
.adjustment-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.adjustment-row > div:last-child { display: flex; align-items: center; gap: 10px; white-space: nowrap; }

.holiday-grid { grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); align-content: start; }
.holiday-card { display: flex; min-height: 144px; align-items: flex-start; justify-content: space-between; gap: 9px; padding: 17px; }
.holiday-card h3 { margin: 9px 0 1px; color: var(--navy); font-size: 16px; }
.holiday-card p { margin: 0; color: var(--muted); font-size: 12px; }
.holiday-date { display: inline-block; border-radius: 9px; color: #0965af; background: #e8f4ff; padding: 4px 8px; direction: ltr; font-size: 11px; font-weight: 700; }

.location-layout { grid-template-columns: minmax(310px, .85fr) minmax(0, 1.5fr); }
.location-list { display: grid; gap: 11px; }
.location-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px; }
.location-card-side { flex: 0 0 auto; }

.settings-wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(240px, .6fr); gap: 18px; align-items: start; }
.settings-note { border: 1px solid #cce8f8; border-radius: 20px; color: #365b78; background: linear-gradient(145deg, #e8f7ff, #f6fcff); padding: 25px; }
.settings-note i { display: inline-grid; width: 45px; height: 45px; place-items: center; border-radius: 15px; color: #0874c4; background: #fff; font-size: 21px; }
.settings-note h3 { margin: 15px 0 6px; color: var(--navy); }
.settings-note p { margin: 0; font-size: 13px; }

.profile-layout { grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); }
.profile-hero { display: flex; align-items: center; gap: 16px; }
.profile-hero h3 { margin: 0; color: var(--navy); font-size: 19px; }
.profile-hero p { margin: 3px 0 0; color: var(--muted); }
.profile-info { margin-top: 24px; }
.password-form { max-width: 540px; }

#toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; max-width: min(420px, calc(100vw - 32px)); border-radius: 13px; color: #fff; background: #126e55; padding: 12px 17px; box-shadow: 0 16px 38px rgba(11,45,73,.26); opacity: 0; pointer-events: none; transform: translateY(14px); transition: opacity .2s ease, transform .2s ease; }
#toast.show { opacity: 1; transform: translateY(0); }
#toast.error { background: #b64841; }
#toast.info { background: #176aa9; }
.error-panel { border-color: #f0c8c4; background: #fff9f8; }
.error-panel h3 { color: #a54842; }

@media print {
  .page-head .page-actions,
  .form-details,
  .payroll-lower,
  .adjustment-studio,
  .hero,
  .dashboard-metrics,
  #toast { display: none !important; }
  .payroll-panel { overflow: visible; }
  .payroll-head,
  .payroll-row { min-width: 0; }
}

@media (max-width: 1120px) {
  .payroll-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-wrap { grid-template-columns: 1fr; }
  .correction-row { grid-template-areas: 'person actions' 'details details' 'note note'; grid-template-columns: minmax(0, 1fr) auto; }
}

@media (max-width: 920px) {
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-actions { width: 100%; justify-content: flex-start; }
  .leave-layout,
  .location-layout,
  .profile-layout { grid-template-columns: 1fr; }
  .leave-layout .leave-form,
  .location-layout > form { order: 0; }
  .settings-wrap { grid-template-columns: 1fr; }
  .attendance-correction-form-shell { width: 100%; }
  .correction-list { padding: 12px !important; }
  .correction-row { grid-template-areas: 'person' 'details' 'note' 'actions'; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 15px; }
  .correction-actions { justify-items: stretch; }
  .correction-action-head { justify-content: space-between; }
  .correction-actions .record-actions { width: 100%; }
  .correction-actions .record-actions button { flex: 1; }
}

@media (max-width: 420px) {
  .correction-details { grid-template-columns: 1fr; }
}

@media (max-width: 670px) {
  .page-head { gap: 12px; margin-bottom: 15px; }
  .page-description { margin-top: 4px; font-size: 12px; }
  .page-actions,
  .month-actions { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .page-actions > *,
  .month-actions > * { width: 100% !important; }
  .page-actions > button:only-child { grid-column: 1 / -1; }
  .hero { min-height: 174px; align-items: flex-start; }
  .hero-mark { width: 65px; height: 65px; border-radius: 21px; font-size: 28px; }
  .dashboard-metrics,
  .payroll-metrics { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 116px; }
  .metric-card h3 { font-size: 16px; }
  .checkin-card { align-items: flex-start; flex-direction: column; padding: 17px; }
  .checkin-card > div { align-items: flex-start; }
  .checkin-card button { width: 100%; }
  .attendance-item { grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; }
  .attendance-state { grid-column: 2 / -1; justify-self: start; }
  .attendance-actions { grid-column: 2 / -1; justify-content: flex-start; }
  .attendance-time { min-width: 78px; font-size: 12px; }
  .filter-toolbar { align-items: stretch; }
  .filter-fields { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .filter-fields label { min-width: 0; }
  .filter-fields button { grid-column: 1 / -1; width: 100%; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .form-wide { grid-column: auto; }
  label.checkbox-line { margin-top: 15px; }
  .permission-options { grid-template-columns: 1fr; }
  .employee-grid,
  .branch-grid,
  .holiday-grid { grid-template-columns: 1fr; }
  .employee-card,
  .branch-card { border-radius: 17px; }
  .leave-card { grid-template-columns: 1fr; }
  .leave-card-side,
  .location-card-side { justify-content: flex-start; }
  .leave-actions { grid-column: auto; }
  .location-card { align-items: flex-start; flex-direction: column; }
  .location-card-side { width: 100%; }
  .payroll-panel { overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .payroll-head { display: none; }
  .payroll-list { display: grid; gap: 11px; }
  .payroll-row { min-width: 0; grid-template-columns: 1fr 1fr; gap: 10px 12px; border: 1px solid #dce9f3; border-radius: 17px; background: #fff; padding: 15px; box-shadow: 0 9px 24px rgba(22,65,99,.06); }
  .payroll-row > div > span { display: block; }
  .payroll-person { grid-column: 1 / -1; border-bottom: 1px solid #e8eff5; padding-bottom: 10px; }
  .payroll-row > div { font-size: 11px; }
  .payroll-row b { font-size: 11px; }
  .payroll-lower { grid-template-columns: 1fr; }
  .adjustment-row { align-items: flex-start; flex-direction: column; }
  .adjustment-row > div:last-child { width: 100%; justify-content: space-between; }
  .profile-info { grid-template-columns: 1fr; }
  .attendance-correction-layout { grid-template-columns: 1fr; }
  #toast { right: 16px; bottom: 16px; }
}

@media (max-width: 390px) {
  .dashboard-metrics,
  .payroll-metrics,
  .filter-fields,
  .page-actions,
  .month-actions { grid-template-columns: 1fr; }
  .attendance-item { grid-template-columns: auto minmax(0, 1fr); }
  .attendance-time { grid-column: 2; text-align: right; }
  .attendance-state,
  .attendance-actions { grid-column: 2; }
  .correction-present-fields { grid-template-columns: 1fr; }
}

/* Desktop records and dedicated form pages */
.page-create-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  border-radius: 14px;
  padding: 8px 15px 8px 10px;
}

.plus-symbol {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 9px;
  color: #0871bd;
  background: rgba(255, 255, 255, .88);
  font: 700 22px/1 Tahoma, sans-serif;
}

.back-action {
  min-height: 42px;
  color: #47647e;
  background: #edf4f8;
  box-shadow: none;
}

.section-kicker {
  display: block;
  margin-bottom: 3px;
  color: #1580c8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .35px;
}

.form-page-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.form-page-card {
  padding: clamp(22px, 3vw, 34px) !important;
}

.form-page-heading,
.records-heading,
.filter-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.form-page-heading { margin-bottom: 20px; }
.form-page-heading h3,
.records-heading h3,
.filter-heading h3 { margin: 0; color: var(--navy); font-size: 18px; }
.form-page-heading p,
.records-heading p,
.filter-heading p { margin: 3px 0 0; }

.form-page-card button[type='submit'],
.settings-form-card button[type='submit'] {
  width: auto;
  min-width: 205px;
  margin-top: 14px;
}

.form-submit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.form-submit-row button { min-width: 170px; }

.payroll-actions-panel {
  margin-bottom: 18px;
  border: 1px solid #d4e7f4;
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  padding: 12px;
  box-shadow: 0 10px 28px rgba(22, 65, 99, .05);
}

.payroll-actions-panel .month-actions { justify-content: flex-start; }
.payroll-actions-panel .month-actions select { width: min(100%, 290px); flex: 1 1 250px; }

.attendance-workspace { display: grid; gap: 17px; }
.attendance-workspace .checkin-card { margin: 0; }

.attendance-filter-panel {
  border-color: #cfe4f2;
  background: linear-gradient(130deg, rgba(255, 255, 255, .98), rgba(239, 249, 255, .98));
}

.filter-heading { margin-bottom: 17px; }

.filter-count {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  color: #286288;
  background: #e8f4fb;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.attendance-filter-form,
.filter-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(145px, 1fr)) auto;
  align-items: end;
  gap: 11px;
  border: 1px solid #dceaf4;
  border-radius: 15px;
  background: rgba(255, 255, 255, .78);
  padding: 13px;
}

.attendance-filter-form label,
.filter-band label { min-width: 0; margin: 0; }
.attendance-filter-form input,
.attendance-filter-form select,
.filter-band input,
.filter-band select { min-height: 42px; }

.filter-submit {
  min-height: 42px;
  white-space: nowrap;
}

.attendance-filter-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 7px; }
.attendance-filter-actions .filter-submit { flex: 1 1 auto; margin: 0; }
.device-request-row .record-meta span { white-space: normal; }

.records-panel { overflow: hidden; padding: 0; }

.records-heading {
  align-items: center;
  border-bottom: 1px solid #e5eef5;
  padding: 20px 23px 17px;
}

.records-panel > .filter-band {
  margin: 15px 23px 0;
}

.record-list { display: grid; }

.records-panel .record-list { padding: 4px 0; }
.records-panel .empty { margin: 0 23px; }

.directory-row {
  display: grid;
  grid-template-columns: minmax(220px, .88fr) minmax(315px, 1.45fr) minmax(145px, auto);
  align-items: center;
  gap: 20px;
  border-top: 1px solid #e7eff5;
  padding: 17px 23px;
  transition: background 160ms ease;
}

.directory-row:first-child { border-top: 0; }
.directory-row:hover { background: #f9fcff; }

.record-primary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.record-primary > div:last-child { min-width: 0; }
.record-primary h3 { overflow: hidden; margin: 0; color: var(--navy); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.record-primary p { overflow: hidden; margin: 2px 0 0; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.record-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 7px;
}

.record-meta span {
  overflow: hidden;
  max-width: 100%;
  border-radius: 9px;
  color: #58718a;
  background: #f3f8fb;
  padding: 5px 8px;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-meta b { color: #254965; }
.record-meta i { margin-left: 4px; color: #2588c8; }

.record-end {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.record-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.record-actions .button-small { margin: 0; }

.employee-row .record-meta,
.branch-row .record-meta { align-content: center; }
.branch-row .branch-meta { display: flex; gap: 7px; margin: 0; }
.branch-row .branch-meta span { display: inline-flex; align-items: center; }
.branch-row .branch-meta i { width: auto; }
.location-row .record-meta span[dir='ltr'] { direction: ltr; }

.holiday-row .record-meta { align-items: center; }
.holiday-row .record-primary .round-icon { color: #d27b12; background: #fff1da; }

.location-overview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 17px;
  border: 1px solid #b8dff2;
  border-radius: 22px;
  background: linear-gradient(115deg, #effaff, #e3f3ff 56%, #f8fdff);
  padding: 20px 23px;
  box-shadow: 0 14px 32px rgba(29, 101, 149, .08);
}

.location-overview-icon {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 18px;
  color: #0872bd;
  background: #fff;
  font-size: 24px;
  box-shadow: 0 8px 18px rgba(16, 100, 166, .1);
}

.location-overview h3 { margin: 0; color: var(--navy); font-size: 17px; }
.location-overview p { margin: 3px 0 0; color: #55718b; font-size: 12px; }
.location-overview-meta { margin-right: auto; border-radius: 11px; color: #23668f; background: rgba(255, 255, 255, .75); padding: 8px 10px; font-size: 11px; font-weight: 700; white-space: nowrap; }

.settings-studio {
  display: grid;
  grid-template-columns: minmax(265px, .78fr) minmax(0, 1.22fr);
  gap: 18px;
  align-items: stretch;
}

.settings-identity {
  display: flex;
  min-height: 390px;
  flex-direction: column;
  border: 1px solid #0a598e;
  border-radius: 23px;
  color: #eff8ff;
  background: linear-gradient(145deg, #06345f, #0d6bb0);
  padding: 29px;
  box-shadow: 0 20px 42px rgba(9, 74, 122, .2);
}

.settings-mark {
  display: grid;
  width: 65px;
  height: 65px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 21px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  font-size: 27px;
  font-weight: 700;
}

.settings-mark img { width: 100%; height: 100%; border-radius: inherit; object-fit: contain; }

.settings-identity > div:nth-child(2) { margin-top: 23px; }
.settings-identity .section-kicker { color: #9bdbff; }
.settings-identity h3 { margin: 0; color: #fff; font-size: 21px; }
.settings-identity p { margin: 4px 0 0; color: rgba(239, 248, 255, .76); }
.settings-identity dl { display: grid; gap: 10px; margin: auto 0 0; }
.settings-identity dl div { border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 10px; }
.settings-identity dt { color: #a6dffd; font-size: 11px; }
.settings-identity dd { margin: 2px 0 0; color: #fff; font-size: 13px; font-weight: 700; }
.settings-form-card { min-height: 390px; }

.profile-studio {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr);
  gap: 18px;
  align-items: start;
}

.profile-showcase {
  border: 1px solid #c9e3f2;
  border-radius: 23px;
  background: linear-gradient(145deg, #faffff, #e7f5ff);
  padding: clamp(23px, 3vw, 31px);
  box-shadow: var(--shadow);
}

.profile-showcase .profile-hero { align-items: center; }
.profile-showcase .avatar.xl { color: #fff; background: linear-gradient(135deg, #1676cf, #06457f); box-shadow: 0 10px 21px rgba(11, 85, 149, .19); }
.profile-showcase .profile-info { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 26px; }
.profile-showcase .profile-info div { border: 1px solid #dceaf4; border-radius: 13px; background: rgba(255, 255, 255, .8); padding: 10px; }
.profile-showcase .profile-info dd { white-space: normal; word-break: break-word; }
.profile-password { max-width: none; min-height: 100%; }

@media (max-width: 1180px) {
  .directory-row { grid-template-columns: minmax(210px, .9fr) minmax(260px, 1.25fr); }
  .record-end { grid-column: 1 / -1; justify-content: space-between; border-top: 1px dashed #e2ecf3; padding-top: 11px; }
  .record-actions { justify-content: flex-start; }
  .profile-showcase .profile-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .settings-studio,
  .profile-studio { grid-template-columns: 1fr; }
  .settings-identity { min-height: 0; }
  .location-overview { align-items: flex-start; }
  .location-overview-meta { margin-right: 0; margin-top: auto; }
}

@media (max-width: 670px) {
  .page-create-action,
  .back-action { width: 100%; justify-content: center; }
  .form-page-card { padding: 19px !important; }
  .form-page-heading,
  .records-heading,
  .filter-heading { align-items: flex-start; flex-direction: column; }
  .form-page-card button[type='submit'],
  .settings-form-card button[type='submit'],
  .form-submit-row button { width: 100%; min-width: 0; }
  .form-submit-row { display: grid; }
  .attendance-filter-form,
  .filter-band { grid-template-columns: 1fr; }
  .filter-submit { width: 100%; }
  .attendance-filter-actions { width: 100%; }
  .attendance-filter-actions .filter-submit { width: auto; }
  .device-security-card { grid-template-columns: auto minmax(0, 1fr); align-items: start; padding: 16px; }
  .device-security-card > .tag,
  .device-security-card > button { grid-column: 1 / -1; width: 100%; justify-content: center; }
  .device-details { display: grid; grid-column: 1 / -1; }
  .records-heading { padding: 17px; }
  .records-panel > .filter-band { margin: 12px 17px 0; }
  .records-panel .empty { margin: 0 17px; }
  .directory-row { grid-template-columns: 1fr; gap: 11px; padding: 16px 17px; }
  .record-meta { display: grid; grid-template-columns: 1fr 1fr; }
  .record-meta span { white-space: normal; }
  .record-end { grid-column: auto; align-items: flex-start; flex-direction: column; border-top: 0; padding-top: 0; }
  .record-actions { width: 100%; }
  .record-actions button { flex: 1; }
  .branch-row .branch-meta { display: grid; grid-template-columns: 1fr; }
  .location-overview { align-items: flex-start; flex-wrap: wrap; padding: 18px; }
  .location-overview-meta { width: 100%; margin: 0; text-align: center; }
  .settings-identity { padding: 24px; }
  .profile-showcase .profile-info { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .record-meta { grid-template-columns: 1fr; }
}

/* Employee security and the monthly adjustment workspace */
.activate-user {
  border-color: #bfe6d4;
  color: #0a714c;
  background: #eaf9f1;
}

.form-security-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-column: 1 / -1;
  align-items: center;
  gap: 12px;
  border: 1px solid #cce7f4;
  border-radius: 15px;
  background: linear-gradient(120deg, #f2fbff, #fbfdff);
  padding: 13px;
}

.form-security-icon,
.password-reset-note i {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: #0874bd;
  background: #dff3ff;
  font-size: 17px;
}

.form-security-note b { color: var(--navy); font-size: 13px; }
.form-security-note p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.form-security-note .button-secondary { min-height: 38px; white-space: nowrap; }

.password-reset-card { width: min(100%, 720px); margin: 0 auto; }
.password-reset-person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 19px;
  border: 1px solid #d5e8f4;
  border-radius: 16px;
  background: #f8fcff;
  padding: 13px;
}

.password-reset-person > div:last-child { min-width: 0; }
.password-reset-person b { display: block; overflow: hidden; color: var(--navy); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.password-reset-person p { margin: 2px 0; color: #4f6f89; font-size: 12px; }
.password-reset-person small { color: var(--muted); font-size: 11px; }

.password-reset-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  border-radius: 12px;
  color: #45657d;
  background: #f3f8fc;
  padding: 10px 12px;
  font-size: 12px;
}

.password-reset-note i {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: 14px;
}

.adjustment-studio {
  display: grid;
  grid-template-columns: minmax(335px, .9fr) minmax(430px, 1.1fr);
  align-items: start;
  gap: 18px;
  margin-top: 18px;
}

.adjustment-form-card,
.adjustment-history {
  overflow: hidden;
  padding: 0;
}

.adjustment-form-card.is-locked { border-color: #f0dcbd; }

.adjustment-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #e6eef4;
  padding: 20px 21px 16px;
}

.adjustment-title {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 11px;
}

.adjustment-title > div:last-child { min-width: 0; }
.adjustment-title h3 { margin: 0; color: var(--navy); font-size: 17px; }
.adjustment-title p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.adjustment-title .section-kicker { margin-bottom: 2px; }

.adjustment-title-icon {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: #076eb7;
  background: #e3f4ff;
  font-size: 17px;
}

.adjustment-title-icon.history { color: #495f77; background: #eff4f7; }

.payroll-edit-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.payroll-edit-status.open { color: #087452; background: #e9f8f0; }
.payroll-edit-status.locked { color: #9b6414; background: #fff3df; }

.adjustment-guide,
.adjustment-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 21px 0;
  border-radius: 11px;
  color: #46647e;
  background: #f1f8fc;
  padding: 9px 11px;
  font-size: 11px;
}

.adjustment-notice { color: #8b5d19; background: #fff7ea; }
.adjustment-notice.locked { border: 1px solid #f4dec0; }

.adjustment-form { padding: 0 21px 21px; }
.adjustment-form fieldset { min-width: 0; margin: 0; border: 0; padding: 0; }
.adjustment-form fieldset[disabled] { opacity: .58; }
.adjustment-form-grid { margin-top: 15px; }
.adjustment-form .form-submit-row { margin-top: 14px; }

.adjustment-history-lock {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 21px 3px;
  border: 1px solid #f1dfc5;
  border-radius: 11px;
  color: #875f23;
  background: #fff9f0;
  padding: 9px 11px;
  font-size: 11px;
}

.adjustment-list { display: grid; padding: 4px 21px 9px; }

.adjustment-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid #e8eff4;
  padding: 14px 0;
}

.adjustment-entry:last-child { border-bottom: 0; }

.adjustment-entry-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: #a54d46;
  background: #fff0ee;
  font-size: 16px;
}

.adjustment-entry.bonus .adjustment-entry-icon { color: #0a7652; background: #e7f8ef; }
.adjustment-entry-main { min-width: 0; }
.adjustment-entry-main b { display: block; overflow: hidden; color: var(--navy); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.adjustment-entry-main p { overflow: hidden; margin: 2px 0; color: #526f88; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.adjustment-entry-main small { display: block; color: var(--muted); font-size: 10px; }

.adjustment-entry-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.adjustment-amount { min-width: 105px; text-align: left; }
.adjustment-amount small { display: block; color: var(--muted); font-size: 9px; }
.adjustment-amount b { display: block; margin-top: 2px; font-size: 12px; white-space: nowrap; }

.adjustment-empty {
  display: grid;
  min-height: 174px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #6b8298;
  text-align: center;
}

.adjustment-empty i {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 15px;
  color: #7e9db4;
  background: #edf5fa;
  font-size: 19px;
}

.adjustment-empty p { max-width: 250px; margin: 0; font-size: 12px; }

@media (max-width: 920px) {
  .adjustment-studio { grid-template-columns: 1fr; }
}

@media (max-width: 670px) {
  .form-security-note { grid-template-columns: auto minmax(0, 1fr); }
  .form-security-note .button-secondary { grid-column: 1 / -1; width: 100%; }
  .adjustment-card-heading { align-items: flex-start; flex-direction: column; padding: 18px 17px 14px; }
  .adjustment-guide,
  .adjustment-notice,
  .adjustment-history-lock { margin-right: 17px; margin-left: 17px; }
  .adjustment-form { padding-right: 17px; padding-left: 17px; }
  .adjustment-list { padding-right: 17px; padding-left: 17px; }
  .adjustment-entry { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .adjustment-entry-end { grid-column: 1 / -1; justify-content: space-between; border-top: 1px dashed #e1ebf2; padding-top: 10px; }
  .adjustment-amount { text-align: right; }
}

/* Compact controls keep lists clean until a filter is actually needed. */
.page-secondary-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #cfe3f2;
  border-radius: 12px;
  color: #276088;
  background: #f4faff;
  padding: 9px 13px;
  box-shadow: none;
}

.page-secondary-action:hover { box-shadow: none; }
.page-secondary-action i { color: #0973be; font-size: 16px; }

.list-filter-panel {
  overflow: hidden;
  margin: 0;
  border-color: #d7e8f3;
  background: #f8fcff;
}

.attendance-filter-panel .list-filter-panel { margin-top: 2px; }
.records-panel > .list-filter-panel { margin: 15px 23px 0; }
.list-filter-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  color: #3f6583;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 700;
}

.list-filter-panel > summary::-webkit-details-marker { display: none; }
.list-filter-panel > summary span { display: inline-flex; align-items: center; gap: 7px; }
.list-filter-panel > summary > i { transition: transform 160ms ease; }
.list-filter-panel[open] > summary { border-bottom: 1px solid #dceaf4; color: #0a66ab; background: #edf7ff; }
.list-filter-panel[open] > summary > i { transform: rotate(180deg); }
.list-filter-panel .attendance-filter-form,
.list-filter-panel .filter-band { margin: 0; border: 0; border-radius: 0; background: transparent; }
.leave-records .filter-band { grid-template-columns: repeat(4, minmax(130px, 1fr)) auto; }
.personal-leave-plan { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(240px, .9fr); align-items: center; gap: 14px; margin-bottom: 16px; border: 1px solid #cce7d8; border-radius: 20px; background: linear-gradient(120deg, #fbfffd, #eef9ff); padding: 17px 20px; box-shadow: 0 12px 26px rgba(23, 99, 72, .06); }
.personal-leave-plan-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 15px; color: #126348; background: #e0f6e9; font-size: 21px; }
.personal-leave-plan h3 { margin: 2px 0 3px; color: #164b69; font-size: 15px; }
.personal-leave-plan p { margin: 0; color: #647f94; font-size: 11px; line-height: 1.7; }
.personal-leave-dates { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 7px; }
.personal-leave-date { display: grid; gap: 2px; min-width: 112px; border: 1px solid #d4e6ef; border-radius: 11px; background: #fff; padding: 8px 10px; }
.personal-leave-date b { color: #1c587e; font-size: 10px; }
.personal-leave-date small { color: #638098; font-size: 10px; }

.schedule-intro {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 16px;
  border: 1px solid #b9dff2;
  border-radius: 21px;
  background: linear-gradient(118deg, #f9fdff, #e6f5ff);
  padding: 19px 22px;
  box-shadow: 0 13px 29px rgba(22, 98, 151, .08);
}

.schedule-intro-icon {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 17px;
  color: #0671bb;
  background: #fff;
  font-size: 22px;
  box-shadow: 0 7px 16px rgba(12, 98, 158, .1);
}

.schedule-intro h3 { margin: 0; color: var(--navy); font-size: 18px; }
.schedule-intro p { margin: 3px 0 0; color: #5a748d; font-size: 12px; }
.schedule-total { margin-right: auto; border-radius: 999px; color: #086baf; background: rgba(255, 255, 255, .78); padding: 8px 11px; font-size: 11px; font-weight: 700; white-space: nowrap; }

.schedule-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 17px;
  border: 1px solid #d5e7f2;
  border-radius: 17px;
  background: rgba(255, 255, 255, .87);
  padding: 12px;
  box-shadow: 0 9px 22px rgba(22, 65, 99, .04);
}

.schedule-toolbar label { min-width: 185px; flex: 1 1 200px; margin: 0; }
.schedule-toolbar input,
.schedule-toolbar select { min-height: 42px; }
.schedule-toolbar button { min-height: 42px; }
.schedule-branch-name { display: inline-flex; min-height: 42px; align-items: center; gap: 8px; border-radius: 12px; color: #315d7d; background: #f0f8fd; padding: 9px 12px; font-size: 12px; font-weight: 700; }
.schedule-branch-name i { color: #147ec3; }

.leave-schedule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.leave-schedule-card { overflow: hidden; border: 1px solid #d8e8f2; border-radius: 20px; background: rgba(255, 255, 255, .95); box-shadow: 0 10px 24px rgba(22, 65, 99, .05); }
.leave-schedule-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; border-bottom: 1px solid #e5eef4; padding: 15px; }
.leave-schedule-card .record-primary { gap: 10px; }
.leave-schedule-card .avatar { width: 38px; height: 38px; font-size: 14px; }
.leave-schedule-card .record-primary h3 { font-size: 14px; }
.leave-schedule-card .record-primary p { font-size: 10px; }
.schedule-card-body { padding: 14px 15px 16px; }
.schedule-card-body > p { min-height: 18px; margin: 0 0 11px; color: #5b748d; font-size: 11px; }
.reserved-leave-days { display: grid; gap: 7px; margin: 0 0 11px; padding: 10px; border: 1px solid #d8e8f1; border-radius: 12px; background: #f7fbfe; }
.reserved-leave-days > span { color: #53758f; font-size: 10px; font-weight: 700; }
.reserved-leave-days > div { display: flex; flex-wrap: wrap; gap: 6px; }
.reserved-leave-days b { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 5px 8px; color: #1b567e; background: #e2f2fb; font-size: 10px; }
.reserved-leave-days b.approved { color: #126348; background: #e7f8ef; }
.reserved-leave-days small { color: inherit; font-size: 9px; font-weight: 500; }
.schedule-full-note { display: flex; align-items: center; gap: 7px; border-radius: 10px; padding: 10px; color: #176447; background: #edf9f2; font-size: 11px; font-weight: 700; }
.schedule-conflict { min-height: 0 !important; border-radius: 9px; padding: 8px 9px; color: #a24724 !important; background: #fff4e9; }
.schedule-date-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.schedule-date-fields label { gap: 5px; margin: 0; color: #476780; font-size: 11px; }
.schedule-date-fields input { min-height: 41px; padding: 7px 9px; font-size: 12px; }
.schedule-submit { display: flex; grid-column: 1 / -1; justify-content: flex-end; margin-top: 2px; }
.schedule-submit button { min-width: 225px; }

.dashboard-missing-card { display: flex; flex-direction: column; }
.dashboard-missing-toggle { position: relative; z-index: 1; align-self: flex-start; min-height: 31px; margin-top: auto; border: 0; border-radius: 9px; color: #0a639f; background: rgba(222, 242, 255, .94); padding: 5px 9px; font-size: 10px; font-weight: 700; }
.dashboard-missing-card.danger .dashboard-missing-toggle { color: #9d433e; background: rgba(255, 255, 255, .75); }
.dashboard-missing-toggle:hover { filter: brightness(.98); transform: translateY(-1px); }
.dashboard-missing-panel { margin-top: 2px; margin-bottom: 19px; border-color: #cfe4f1; background: linear-gradient(120deg, rgba(255, 255, 255, .98), rgba(241, 249, 254, .96)); }
.dashboard-missing-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 15px; border-bottom: 1px solid #dceaf3; }
.dashboard-missing-heading h3 { margin: 2px 0 3px; color: #0a426d; font-size: 17px; }
.dashboard-missing-heading p { max-width: 720px; margin: 0; color: #617c92; font-size: 12px; line-height: 1.8; }
.dashboard-missing-list { display: grid; gap: 8px; margin-top: 15px; }
.dashboard-missing-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; border: 1px solid #e0edf5; border-radius: 14px; background: rgba(255, 255, 255, .82); padding: 10px 12px; }
.dashboard-missing-row h4 { margin: 0; overflow: hidden; color: #1b4d71; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-missing-row p { margin: 2px 0 0; overflow: hidden; color: #6c8498; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.dashboard-metric-button { position: relative; width: 100%; border: 1px solid rgba(213, 228, 239, .95); text-align: right; font: inherit; cursor: pointer; transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.dashboard-metric-button > small,
.dashboard-metric-button > h3,
.dashboard-metric-button > span,
.dashboard-metric-button > i { position: relative; z-index: 1; }
.dashboard-metric-button:hover { border-color: #9fcee9; box-shadow: 0 15px 28px rgba(14, 87, 137, .12); transform: translateY(-2px); }
.dashboard-metric-button.is-active { border-color: #147fc0; box-shadow: 0 0 0 3px rgba(20, 127, 192, .12), 0 15px 28px rgba(14, 87, 137, .11); }
.dashboard-metric-button.danger.is-active { border-color: #c45d56; box-shadow: 0 0 0 3px rgba(196, 93, 86, .12); }
.metric-card-link-icon { position: absolute; top: 17px; left: 17px; color: #4080aa; font-size: 16px; transition: transform 160ms ease; }
.dashboard-metric-button:hover .metric-card-link-icon { transform: translate(-2px, -2px); }
.dashboard-detail-panel { margin-top: 2px; margin-bottom: 19px; border-color: #cfe4f1; background: linear-gradient(120deg, rgba(255, 255, 255, .98), rgba(241, 249, 254, .96)); }
.dashboard-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 15px; border-bottom: 1px solid #dceaf3; }
.dashboard-detail-heading h3 { margin: 2px 0 3px; color: #0a426d; font-size: 17px; }
.dashboard-detail-heading p { max-width: 720px; margin: 0; color: #617c92; font-size: 12px; line-height: 1.8; }
.dashboard-detail-panel .attendance-list,
.dashboard-detail-branch-list,
.dashboard-detail-panel .dashboard-missing-list { margin-top: 15px; }

.schedule-action-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px; margin: -7px 0 17px; }
.schedule-bulk-action { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: -7px 0 17px; border: 1px solid #b8dff2; border-radius: 18px; background: linear-gradient(120deg, #f8fdff, #e7f5fd); padding: 14px 16px; box-shadow: 0 10px 23px rgba(15, 95, 149, .06); }
.schedule-bulk-copy { min-width: 0; }
.schedule-bulk-copy h3 { margin: 1px 0 3px; color: #074c7f; font-size: 15px; }
.schedule-bulk-copy p { margin: 0; color: #5b788f; font-size: 11px; line-height: 1.7; }
.schedule-bulk-action .schedule-action-row { flex: 0 0 auto; margin: 0; }
.button-auto-schedule { min-height: 42px; border: 1px solid #0b73b6; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #0d8acd, #075a9f); padding: 9px 14px; box-shadow: 0 8px 17px rgba(8, 105, 169, .15); }
.button-auto-schedule:hover { box-shadow: 0 11px 21px rgba(8, 105, 169, .21); transform: translateY(-1px); }
.schedule-manual-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin: 22px 0 12px; }
.schedule-manual-heading h3 { margin: 1px 0 2px; color: var(--navy); font-size: 17px; }
.schedule-manual-heading p { margin: 0; color: #637e94; font-size: 11px; }

.schedule-calendar-panel { margin: 0 0 20px; border: 1px solid #cfe3ef; border-radius: 22px; background: linear-gradient(180deg, #fff, #f7fbfe); padding: 19px; box-shadow: 0 13px 28px rgba(22, 76, 112, .06); }
.schedule-calendar-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.schedule-calendar-heading h3 { margin: 1px 0 2px; color: #083f69; font-size: 19px; }
.schedule-calendar-heading p { max-width: 620px; margin: 0; color: #617b91; font-size: 11px; line-height: 1.75; }
.schedule-calendar-legend { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 7px 11px; color: #557187; font-size: 10px; white-space: nowrap; }
.legend-dot { display: inline-block; width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; vertical-align: middle; }
.legend-dot.scheduled { background: #197fc0; }
.legend-dot.taken { background: #168262; }
.legend-dot.requested { background: #d98d24; }
.legend-dot.holiday { background: #bc5c57; }
.schedule-calendar-scroll { overflow-x: auto; padding: 2px 1px 8px; scrollbar-color: #a7cee7 transparent; }
.schedule-calendar-grid { display: grid; min-width: 860px; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid #c9deec; border-radius: 15px; background: #c9deec; }
.schedule-calendar-weekday { color: #fff; background: linear-gradient(135deg, #0a5e98, #147fbd); padding: 8px 6px; text-align: center; font-size: 11px; font-weight: 700; }
.schedule-calendar-blank { min-height: 132px; background: #f8fbfd; }
.schedule-calendar-day { display: flex; min-width: 0; min-height: 132px; flex-direction: column; gap: 6px; background: #fff; padding: 9px; transition: background 160ms ease, box-shadow 160ms ease; }
.schedule-calendar-day.is-blackout { background: linear-gradient(145deg, #fffdfb, #fff5ed); }
.schedule-calendar-day.is-blackout .schedule-calendar-day-head small { color: #b96d3a; }
.schedule-calendar-day.is-today { box-shadow: inset 0 0 0 2px #147fbe; }
.schedule-calendar-day.has-events { background: #fdfeff; }
.schedule-calendar-day-head { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding-bottom: 5px; border-bottom: 1px solid #ebf1f5; }
.schedule-calendar-day-head b { color: #155a87; font-size: 14px; }
.schedule-calendar-day-head small { color: #7b94a7; font-size: 10px; }
.schedule-calendar-events { display: grid; align-content: start; gap: 5px; }
.schedule-calendar-event { display: grid; min-width: 0; gap: 1px; overflow: hidden; border-radius: 8px; padding: 5px 6px; font-size: 10px; line-height: 1.25; }
.schedule-calendar-event b, .schedule-calendar-event small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-calendar-event b { font-size: 10px; font-weight: 700; }
.schedule-calendar-event small { font-size: 8.5px; opacity: .84; }
.schedule-calendar-event.scheduled { color: #075f9b; background: #e0f2fd; }
.schedule-calendar-event.taken { color: #0e684c; background: #e0f6e9; }
.schedule-calendar-event.requested { color: #8f5710; background: #fff0d8; }
.schedule-calendar-event.holiday { color: #8d423e; background: #ffecea; }
.schedule-calendar-note { display: flex; align-items: flex-start; gap: 7px; margin: 12px 2px 0; color: #668096; font-size: 10px; line-height: 1.7; }
.schedule-calendar-note i { margin-top: 3px; color: #1480bd; }

@media (max-width: 850px) {
  .leave-records .filter-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .personal-leave-plan { grid-template-columns: auto minmax(0, 1fr); }
  .personal-leave-dates { grid-column: 1 / -1; }
}

@media (max-width: 670px) {
  #app > header .header-identity { gap: 8px; }
  .header-identity img { width: 36px; height: 36px; border-radius: 11px; }
  .header-identity b { font-size: 14px !important; }
  .gps-capture-card { align-items: stretch; flex-direction: column; }
  .gps-capture-card .button-secondary { width: 100%; min-width: 0; }
  .page-secondary-action { width: 100%; }
  .records-panel > .list-filter-panel { margin: 12px 17px 0; }
  .leave-records .filter-band { grid-template-columns: 1fr; }
  .personal-leave-plan { grid-template-columns: auto minmax(0, 1fr); padding: 16px; }
  .personal-leave-dates { grid-column: 1 / -1; }
  .personal-leave-date { flex: 1 1 135px; }
  .schedule-intro { align-items: flex-start; flex-wrap: wrap; padding: 17px; }
  .schedule-total { width: 100%; margin-right: 0; text-align: center; }
  .schedule-toolbar { display: grid; }
  .schedule-toolbar label { min-width: 0; }
  .schedule-toolbar button { width: 100%; }
  .schedule-branch-name { justify-content: center; }
  .leave-schedule-grid { grid-template-columns: 1fr; }
  .leave-schedule-card > header { flex-direction: column; }
  .schedule-date-fields { grid-template-columns: 1fr; }
  .schedule-submit { display: grid; }
  .schedule-submit button { width: 100%; min-width: 0; }
  .dashboard-missing-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-missing-heading .filter-count { align-self: flex-start; }
  .dashboard-detail-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-detail-heading .filter-count { align-self: flex-start; }
  .schedule-action-row { display: grid; grid-template-columns: 1fr 1fr; margin-top: -4px; }
  .schedule-action-row button { width: 100%; }
  .schedule-bulk-action { align-items: stretch; flex-direction: column; }
  .schedule-bulk-action .schedule-action-row { width: 100%; margin: 0; grid-template-columns: 1fr; }
  .schedule-calendar-panel { padding: 15px; border-radius: 18px; }
  .schedule-calendar-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .schedule-calendar-legend { white-space: normal; }
  .schedule-calendar-grid { min-width: 745px; }
  .schedule-calendar-day, .schedule-calendar-blank { min-height: 116px; }
  .schedule-manual-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .dashboard-missing-row { grid-template-columns: auto minmax(0, 1fr); }
  .dashboard-missing-row .tag { grid-column: 2; justify-self: start; }
}

/* Payroll entitlement approval workflow */
.entitlement-approval-panel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin: 0 0 17px; border: 1px solid #d1e6f2; border-radius: 20px; background: linear-gradient(120deg, #fcfeff, #eef8fd); padding: 16px 18px; box-shadow: 0 10px 25px rgba(19, 84, 128, .05); }
.entitlement-approval-panel.pending { border-color: #efd79f; background: linear-gradient(120deg, #fffef9, #fff6e3); }
.entitlement-approval-panel.approved { border-color: #bee5d1; background: linear-gradient(120deg, #fcfffd, #edf9f2); }
.entitlement-approval-panel.rejected { border-color: #f0ceca; background: linear-gradient(120deg, #fffdfd, #fff1ef); }
.entitlement-approval-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 15px; color: #0b75b9; background: #e1f3ff; font-size: 20px; }
.entitlement-approval-panel.pending .entitlement-approval-icon { color: #956004; background: #fff0cf; }
.entitlement-approval-panel.approved .entitlement-approval-icon { color: #0a7653; background: #def6e8; }
.entitlement-approval-panel.rejected .entitlement-approval-icon { color: #aa5148; background: #ffe9e7; }
.entitlement-approval-copy h3 { margin: 1px 0 3px; color: #07446f; font-size: 16px; }
.entitlement-approval-copy p { margin: 0; color: #637e94; font-size: 11px; line-height: 1.7; }
.entitlement-approval-facts { display: flex; flex-wrap: wrap; gap: 6px 11px; margin-top: 8px; color: #698297; font-size: 10px; }
.entitlement-approval-facts b { color: #254f70; }
.entitlement-approval-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px !important; border-radius: 9px; color: #705a40 !important; background: rgba(255, 255, 255, .75); padding: 6px 8px; }
.entitlement-approval-note i { margin-top: 2px; color: #b17a1b; }
.entitlement-approval-actions { display: grid; justify-items: end; gap: 9px; }
.entitlement-approval-tag { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 5px 9px; font-size: 10px; font-weight: 700; white-space: nowrap; color: #55728a; background: #edf5fa; }
.entitlement-approval-tag.pending { color: #91610b; background: #fff0d2; }
.entitlement-approval-tag.approved { color: #097151; background: #e3f7ec; }
.entitlement-approval-tag.rejected { color: #a44943; background: #ffefed; }
.entitlement-approval-tag.draft { color: #1a6e9f; background: #e4f4ff; }
.entitlement-branch-meta > span.entitlement-approval-tag { border: 0; padding: 5px 9px; font-size: 10px; }
.entitlement-review-controls { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; border-top: 1px solid rgba(185, 142, 52, .18); margin-top: 2px; padding-top: 12px; }
.entitlement-review-controls label { gap: 4px; margin: 0; color: #516f87; font-size: 11px; }
.entitlement-review-controls textarea { min-height: 62px; margin-top: 4px; padding: 9px 10px; resize: vertical; }
.entitlement-review-controls > div { display: flex; flex-wrap: wrap; gap: 8px; }
.entitlement-inbox { margin-bottom: 17px; }
.entitlement-inbox-list { display: grid; gap: 9px; margin-top: 13px; }
.entitlement-inbox-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; border: 1px solid #dcebf4; border-radius: 15px; background: #fbfdff; padding: 11px 13px; }
.entitlement-inbox-copy { min-width: 0; }
.entitlement-inbox-copy h4 { margin: 0; color: #134d76; font-size: 13px; }
.entitlement-inbox-copy p { margin: 2px 0 0; color: #667f94; font-size: 10px; }
.entitlement-inbox-copy small { display: block; overflow: hidden; margin-top: 4px; color: #936045; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.entitlement-inbox-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }

@media (max-width: 850px) {
  .entitlement-approval-panel { grid-template-columns: auto minmax(0, 1fr); }
  .entitlement-approval-actions { grid-column: 1 / -1; justify-items: start; }
  .entitlement-review-controls { grid-template-columns: 1fr; }
  .entitlement-review-controls > div { width: 100%; }
  .entitlement-review-controls button { flex: 1 1 170px; }
}

@media (max-width: 670px) {
  .entitlement-approval-panel { gap: 11px; border-radius: 17px; padding: 15px; }
  .entitlement-approval-icon { width: 40px; height: 40px; border-radius: 12px; font-size: 17px; }
  .entitlement-approval-copy { grid-column: 2; }
  .entitlement-approval-actions { grid-column: 1 / -1; width: 100%; }
  .entitlement-approval-actions > button { width: 100%; }
  .entitlement-inbox-row { grid-template-columns: auto minmax(0, 1fr); padding: 11px; }
  .entitlement-inbox-end { grid-column: 1 / -1; justify-content: flex-start; }
}