@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --rd-ink: #14213d;
  --rd-ink-soft: #263b5b;
  --rd-teal: #218c87;
  --rd-teal-dark: #176c68;
  --rd-coral: #e9785d;
  --rd-gold: #d5a83f;
  --rd-paper: #f4f6f1;
  --rd-white: #ffffff;
  --rd-panel: #fbfcf9;
  --rd-line: #dbe5de;
  --rd-muted: #6d7d76;
  --rd-success: #2d8964;
  --rd-danger: #b84f42;
  --rd-shadow-sm: 0 6px 18px rgba(20, 33, 61, .07);
  --rd-shadow-md: 0 18px 44px rgba(20, 33, 61, .10);
  --rd-shadow-lg: 0 28px 80px rgba(20, 33, 61, .15);
  --rd-radius-sm: 8px;
  --rd-radius-md: 14px;
  --rd-radius-lg: 20px;
  --rd-ease: 180ms ease;
}

html {
  min-height: 100%;
  background: var(--rd-paper);
}

body {
  min-height: 100vh;
  background: var(--rd-paper);
  color: var(--rd-ink);
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0;
}

body::selection {
  color: var(--rd-white);
  background: var(--rd-teal);
}

h1,
h2,
h3,
h4,
strong,
button {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0;
}

h1,
h2,
h3,
h4,
p {
  text-wrap: balance;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

input,
select,
textarea {
  color: var(--rd-ink);
  border: 1px solid var(--rd-line);
  border-radius: var(--rd-radius-sm);
  background: var(--rd-panel);
  box-shadow: inset 0 1px 1px rgba(20, 33, 61, .025);
  transition: border-color var(--rd-ease), box-shadow var(--rd-ease), background var(--rd-ease);
}

input:hover,
select:hover,
textarea:hover {
  border-color: #a9c5ba;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--rd-teal);
  outline: 0;
  background: var(--rd-white);
  box-shadow: 0 0 0 4px rgba(33, 140, 135, .13);
}

input::placeholder,
textarea::placeholder {
  color: #9aa9a2;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.button {
  min-height: 44px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: var(--rd-radius-sm);
  box-shadow: var(--rd-shadow-sm);
  font-weight: 700;
  transition: transform var(--rd-ease), background var(--rd-ease), border-color var(--rd-ease), box-shadow var(--rd-ease);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--rd-shadow-md);
}

.button:active {
  transform: translateY(0);
}

.button.primary {
  color: var(--rd-white);
  border-color: var(--rd-ink);
  background: var(--rd-ink);
}

.button.primary:hover {
  border-color: var(--rd-ink-soft);
  background: var(--rd-ink-soft);
}

.button.secondary {
  color: var(--rd-ink);
  border-color: var(--rd-line);
  background: var(--rd-white);
}

.button.secondary:hover {
  color: var(--rd-teal-dark);
  border-color: var(--rd-teal);
  background: #f2faf6;
}

.button.full {
  min-height: 52px;
}

.alert {
  border: 1px solid transparent;
  border-left-width: 4px;
  border-radius: var(--rd-radius-sm);
  box-shadow: var(--rd-shadow-sm);
}

.alert.success {
  color: #236b4d;
  border-color: #bfe5ce;
  border-left-color: var(--rd-success);
  background: #effaf3;
}

.alert.error {
  color: #934438;
  border-color: #f0c9c0;
  border-left-color: var(--rd-danger);
  background: #fff3ef;
}

.eyebrow {
  color: var(--rd-teal-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
}

.muted {
  color: var(--rd-muted);
}

.brand {
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 11px;
  box-shadow: 0 8px 20px rgba(20, 33, 61, .18);
  font-size: 20px;
}

.auth-page {
  isolation: isolate;
  background: #eaf1ec;
}

.auth-page::after {
  position: absolute;
  z-index: -1;
  right: -120px;
  bottom: -150px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(33, 140, 135, .15);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(33, 140, 135, .04), 0 0 0 60px rgba(33, 140, 135, .03);
  content: '';
}

.auth-panel {
  padding: 56px clamp(30px, 7vw, 100px);
  background: rgba(255, 255, 255, .94);
  box-shadow: 18px 0 55px rgba(20, 33, 61, .06);
}

.auth-panel .brand {
  margin-bottom: 84px;
}

.auth-panel h1 {
  max-width: 420px;
  color: var(--rd-ink);
  font-size: clamp(36px, 4vw, 58px);
  line-height: .98;
}

.auth-panel form {
  max-width: 420px;
}

.auth-panel label {
  margin: 19px 0;
  color: var(--rd-ink);
  font-size: 11px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.auth-panel input {
  min-height: 52px;
  margin-top: 8px;
}

.auth-panel .subtle-link {
  color: var(--rd-teal-dark);
  font-weight: 700;
  transition: color var(--rd-ease);
}

.auth-panel .subtle-link:hover {
  color: var(--rd-coral);
}

.auth-art {
  background: linear-gradient(142deg, #14213d 0%, #1b4650 58%, #218c87 130%);
}

.auth-art::after {
  position: absolute;
  right: 11%;
  bottom: 13%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rd-coral);
  box-shadow: 22px -7px 0 var(--rd-gold), 38px 11px 0 #b8e4cf;
  content: '';
}

.art-copy strong {
  max-width: 680px;
  font-size: clamp(48px, 6vw, 92px);
  line-height: .91;
}

.app-shell {
  min-height: 100vh;
  background: var(--rd-paper);
}

.sidebar {
  width: 274px;
  flex-basis: 274px;
  padding: 30px 18px 20px;
  background: linear-gradient(160deg, #14213d 0%, #183951 55%, #1f6661 135%);
  box-shadow: 16px 0 46px rgba(20, 33, 61, .13);
}

.sidebar::before {
  right: -60px;
  bottom: 11%;
  width: 180px;
  height: 180px;
  border-color: rgba(255, 255, 255, .16);
  box-shadow: 0 0 0 25px rgba(255, 255, 255, .04), 0 0 0 50px rgba(255, 255, 255, .025);
}

.sidebar .brand {
  padding: 0 12px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .15);
}

.sidebar .brand strong {
  color: var(--rd-white);
  font-size: 17px;
}

.sidebar .brand small {
  color: #b8cbc5;
}

.sidebar nav {
  gap: 7px;
  margin-top: 48px;
}

.sidebar nav a {
  position: relative;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 9px;
  color: #bdccc9;
  font-size: 13px;
  transition: background var(--rd-ease), color var(--rd-ease), transform var(--rd-ease);
}

.sidebar nav a:hover {
  color: var(--rd-white);
  background: rgba(255, 255, 255, .09);
  transform: translateX(3px);
}

.sidebar nav a.active {
  color: var(--rd-ink);
  border-color: #d8f2e3;
  background: #d8f2e3;
  box-shadow: 0 10px 22px rgba(8, 24, 42, .2);
}

.sidebar nav a.active::before {
  position: absolute;
  left: -18px;
  width: 4px;
  height: 26px;
  border-radius: 0 4px 4px 0;
  background: var(--rd-coral);
  content: '';
}

.sidebar-foot {
  color: #b8cbc5;
  border-top-color: rgba(255, 255, 255, .14);
}

.status-dot {
  background: #8de0ad;
  box-shadow: 0 0 0 4px rgba(141, 224, 173, .16);
}

.main-content {
  position: relative;
  padding: 38px clamp(22px, 5vw, 82px);
  background: radial-gradient(circle at 94% 0, #d8efe4 0, transparent 23%), radial-gradient(circle at 0 100%, #fff0df 0, transparent 19%), var(--rd-paper);
}

.main-content::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--rd-coral) 0 20%, var(--rd-teal) 20% 77%, var(--rd-gold) 77%);
  content: '';
}

.topbar {
  align-items: center;
  margin-bottom: 38px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--rd-line);
}

.topbar h1 {
  margin-top: 9px;
  color: var(--rd-ink);
  font-size: clamp(30px, 3vw, 43px);
  line-height: 1;
}

.topbar .eyebrow {
  color: var(--rd-teal-dark);
}

.user-chip {
  min-height: 43px;
  border-color: var(--rd-line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .75);
  box-shadow: var(--rd-shadow-sm);
}

.user-chip a {
  color: var(--rd-coral);
  font-weight: 700;
}

.user-menu {
  position: relative;
  z-index: 20;
}

.user-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 7px 10px 7px 8px;
  border: 1px solid var(--rd-line);
  border-radius: 12px;
  color: var(--rd-ink);
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--rd-shadow-sm);
  cursor: pointer;
  font: 700 13px 'Space Grotesk', sans-serif;
}

.user-avatar {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 9px;
  color: var(--rd-white);
  background: linear-gradient(145deg, var(--rd-teal), var(--rd-teal-dark));
  box-shadow: 0 4px 10px rgba(33, 140, 135, .25);
  font-size: 12px;
}

.user-menu-name {
  padding: 0 3px;
  color: var(--rd-ink);
}

.user-menu-chevron {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: var(--rd-white);
  background: var(--rd-teal);
  font-size: 14px;
  line-height: 1;
  transition: transform var(--rd-ease);
}

.user-menu.open .user-menu-chevron {
  transform: rotate(180deg);
}

.user-menu-toggle:hover,
.user-menu.open .user-menu-toggle {
  border-color: #9fcabd;
  background: #fff;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  display: grid;
  width: 185px;
  padding: 7px;
  border: 1px solid var(--rd-line);
  border-radius: 11px;
  background: var(--rd-white);
  box-shadow: var(--rd-shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity var(--rd-ease), transform var(--rd-ease);
}

.user-menu.open .user-menu-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.user-menu-dropdown a {
  padding: 11px 12px;
  border-radius: 7px;
  color: var(--rd-ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.user-menu-dropdown a:hover {
  background: #eef8f2;
}

.user-menu-dropdown .logout-link {
  color: var(--rd-coral);
  border-top: 1px solid #edf1ed;
}

.delete-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 33, 61, .48);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--rd-ease);
}

.delete-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.delete-modal-card {
  position: relative;
  width: min(100%, 410px);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-top: 5px solid var(--rd-coral);
  border-radius: var(--rd-radius-lg);
  background: var(--rd-white);
  box-shadow: 0 30px 90px rgba(20, 33, 61, .28);
  text-align: center;
  transform: translateY(10px) scale(.98);
  transition: transform var(--rd-ease);
}

.delete-modal.open .delete-modal-card {
  transform: translateY(0) scale(1);
}

.delete-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: var(--rd-muted);
  background: transparent;
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
}

.delete-modal-close:hover {
  color: var(--rd-coral);
  background: #fff1ee;
}

.delete-modal-icon {
  display: grid;
  width: 43px;
  height: 43px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 13px;
  color: #a4493d;
  background: #fff0eb;
  font: 700 23px 'Space Grotesk';
}

.delete-modal-card h2 {
  margin: 0 0 8px;
  color: var(--rd-ink);
  font-size: 23px;
}

.delete-modal-message {
  margin: 0 auto 21px;
  color: var(--rd-muted);
  font-size: 14px;
  line-height: 1.5;
}

.delete-modal-password {
  margin: 0 0 18px;
  text-align: left;
}

.delete-modal-password label {
  color: var(--rd-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.delete-modal-password input {
  min-height: 48px;
  margin-top: 7px;
}

.delete-modal-hint {
  margin: 7px 0 0;
  color: var(--rd-muted);
  font-size: 11px;
}

.delete-modal-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.delete-modal-actions .button {
  min-width: 132px;
}

.delete-modal-actions .delete-confirm {
  color: #fff;
  border-color: var(--rd-coral);
  background: var(--rd-coral);
}

.delete-modal-actions .delete-confirm:hover {
  border-color: #bb5948;
  background: #bb5948;
}

@media (max-width: 430px) {
  .delete-modal-card {
    padding: 27px 19px 21px;
  }

  .delete-modal-actions {
    flex-direction: column-reverse;
  }

  .delete-modal-actions .button {
    width: 100%;
  }
}

.page-actions {
  align-items: center;
  margin: -8px 0 30px;
}

.page-actions p {
  margin: 0;
}

.stats-grid {
  gap: 18px;
  margin-bottom: 30px;
}

.stat-card {
  min-height: 154px;
  padding: 25px 23px;
  overflow: hidden;
  border: 1px solid var(--rd-line);
  border-top: 4px solid var(--rd-teal);
  border-radius: var(--rd-radius-md);
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--rd-shadow-md);
  transition: transform var(--rd-ease), box-shadow var(--rd-ease);
}

.stat-card:nth-child(2) {
  border-top-color: var(--rd-coral);
}

.stat-card:nth-child(3) {
  border-top-color: var(--rd-gold);
}

.stat-card:nth-child(4) {
  border-top-color: #73847e;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--rd-shadow-lg);
}

.stat-card span {
  color: var(--rd-muted);
  font-size: 11px;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.stat-card strong {
  color: var(--rd-ink);
  font-size: 40px;
  line-height: 1;
}

.content-section,
.panel,
.stat {
  border: 1px solid var(--rd-line);
  border-radius: var(--rd-radius-md);
  background: rgba(255, 255, 255, .91);
  box-shadow: var(--rd-shadow-md);
}

.content-section {
  padding: 27px;
}

.section-heading,
.panel-head {
  margin-bottom: 23px;
}

.section-heading h2,
.panel-head h2 {
  color: var(--rd-ink);
  font-size: 24px;
}

.table-wrap {
  margin: 0 -5px;
  border: 1px solid #e2ebe5;
  border-radius: 10px;
  background: #fcfdfb;
}

.table-wrap table {
  overflow: hidden;
  border-radius: 10px;
}

th,
td {
  padding: 16px 13px;
  border-bottom-color: var(--rd-line);
}

th {
  color: var(--rd-muted);
  background: #f1f6f2;
  font-size: 10px;
}

tbody tr {
  transition: background var(--rd-ease);
}

tbody tr:hover td {
  background: #eef9f3;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.badge {
  border-radius: 6px;
  font-size: 10px;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.form-grid {
  gap: 12px 23px;
}

.form-grid label,
.toolbar label {
  color: var(--rd-ink);
  font-size: 11px;
  letter-spacing: .45px;
  text-transform: uppercase;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.toolbar input {
  min-height: 48px;
  margin-top: 8px;
  border-radius: 9px;
  background: #fbfdfb;
}

.form-grid textarea {
  min-height: 106px;
}

.form-grid .wide-field {
  grid-column: 1 / -1;
}

.form-actions {
  gap: 12px;
  margin-top: 28px;
}

.table-controls {
  border-color: var(--rd-line);
  border-radius: 10px;
  background: #f1f6f2;
}

.table-pagination button {
  border-color: var(--rd-line);
  border-radius: 6px;
  background: var(--rd-white);
  color: var(--rd-ink);
  font-weight: 700;
  transition: all var(--rd-ease);
}

.table-pagination button:hover,
.table-pagination button.active {
  border-color: var(--rd-teal);
  background: var(--rd-teal);
  color: var(--rd-white);
}

.qr-panel {
  padding: 34px;
  border-top: 4px solid var(--rd-teal);
}

.qr-panel h2 {
  margin-top: 8px;
  color: var(--rd-ink);
}

.qr-panel .qr-image {
  padding: 12px;
  border: 1px solid var(--rd-line);
  border-radius: 14px;
  background: var(--rd-white);
  box-shadow: var(--rd-shadow-md);
}

.public-qr-page {
  padding-top: 38px;
  background: radial-gradient(circle at 10% 0, #d8efe4 0, transparent 27%), var(--rd-paper);
}

.public-qr-header {
  margin-bottom: 42px;
}

.public-qr-card {
  border: 1px solid var(--rd-line);
  border-top: 5px solid var(--rd-teal);
  border-radius: var(--rd-radius-lg);
  box-shadow: var(--rd-shadow-lg);
}

.public-qr-card h1 {
  color: var(--rd-ink);
}

.public-qr-card .qr-image {
  padding: 14px;
  border: 1px solid var(--rd-line);
  border-radius: 14px;
  background: var(--rd-white);
}

.live-clock {
  color: var(--rd-teal-dark);
}

.mobile-attendance {
  background: linear-gradient(145deg, #14213d 0%, #1c514e 100%) !important;
}

.mobile-attendance-card {
  border-top: 5px solid var(--rd-teal) !important;
  border-radius: var(--rd-radius-lg) !important;
  box-shadow: var(--rd-shadow-lg) !important;
}

.mobile-attendance-card h1 {
  color: var(--rd-ink);
}

.attendance-action {
  min-height: 68px !important;
  border-radius: 12px !important;
  transition: transform var(--rd-ease), box-shadow var(--rd-ease) !important;
}

.attendance-action:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px rgba(20, 33, 61, .18) !important;
}

.attendance-action.check-in {
  background: var(--rd-teal) !important;
}

.attendance-action.check-out {
  background: var(--rd-coral) !important;
}

.employee-report {
  border-top: 5px solid var(--rd-teal);
  border-radius: var(--rd-radius-md);
  box-shadow: var(--rd-shadow-lg);
}

.report-heading {
  border-bottom-color: var(--rd-line);
}

.report-heading h2 {
  color: var(--rd-ink);
}

.report-profile > div,
.report-stats > div {
  border: 1px solid #e0ebe4;
  border-radius: 10px;
  background: #f2f8f3;
}

.report-stats > div:last-child {
  background: #e1f4e9;
}

.report-stats strong {
  color: var(--rd-ink);
}

.report-stats > div:last-child strong {
  color: var(--rd-teal-dark);
}

.salary-payment-form {
  padding: 9px;
  border: 1px solid var(--rd-line);
  border-radius: 9px;
  background: #f5faf6;
}

.salary-payment-form input,
.salary-payment-form select {
  min-height: 39px;
  border-radius: 7px;
}

.salary-payment-form .button {
  min-height: 39px;
}

.report-toolbar .toolbar {
  padding: 11px;
  border: 1px solid var(--rd-line);
  border-radius: 10px;
  background: #f5faf6;
}

.report-toolbar .toolbar input {
  background: var(--rd-white);
}

.salary-page .main-content {
  background: radial-gradient(circle at 90% 0, #d5eee4 0, transparent 28%), radial-gradient(circle at 0 90%, #fff0df 0, transparent 22%), var(--rd-paper);
}

.salary-page .salary-payment-form {
  min-width: 630px;
  padding: 10px;
  border: 1px solid #cfe1d7;
  border-radius: 11px;
  background: linear-gradient(135deg, #f3faf5, #fff);
  box-shadow: 0 8px 18px rgba(20, 33, 61, .06);
}

.salary-page .salary-payment-form input,
.salary-page .salary-payment-form select {
  min-height: 40px;
  border-radius: 7px;
  background: #fff;
}

.salary-page .salary-payment-form input[name="amount"] {
  border-color: #8fc5ad;
  font-weight: 700;
}

.salary-page .salary-payment-form .button {
  min-height: 40px;
  background: var(--rd-teal);
  border-color: var(--rd-teal);
}

.salary-page .salary-payment-form .button:hover {
  background: var(--rd-teal-dark);
}

.salary-page .content-section:nth-of-type(2) {
  border-top: 4px solid var(--rd-teal);
}

.salary-page .content-section:nth-of-type(3) {
  border-top: 4px solid var(--rd-coral);
}

.salary-page .content-section:nth-of-type(2) .section-heading h2,
.salary-page .content-section:nth-of-type(3) .section-heading h2 {
  font-size: 25px;
}

.salary-page .content-section:nth-of-type(2) td:nth-child(7) {
  color: var(--rd-teal-dark);
  font-size: 14px;
}

.salary-page .content-section:nth-of-type(3) td:nth-child(3) {
  color: var(--rd-teal-dark);
  font-weight: 700;
}

.salary-page .page-actions {
  align-items: stretch;
  gap: 28px;
  padding: 22px 25px;
  border: 1px solid var(--rd-line);
  border-left: 5px solid var(--rd-coral);
  border-radius: var(--rd-radius-md);
  background: rgba(255, 255, 255, .84);
  box-shadow: var(--rd-shadow-md);
}

.salary-page .salary-period-copy {
  flex: 1;
  align-self: center;
}

.salary-page .salary-period-copy p {
  margin: 7px 0 2px;
  color: var(--rd-ink);
  font-size: 16px;
  font-weight: 700;
}

.salary-page .salary-period-copy small {
  color: var(--rd-muted);
  font-size: 12px;
}

.salary-page .page-actions .toolbar {
  display: flex;
  align-items: flex-end;
  gap: 11px;
  margin: 0;
}

.salary-page .page-actions .toolbar label {
  min-width: 180px;
  margin: 0;
}

.salary-page .page-actions .toolbar .button {
  min-width: 114px;
}

.monthly-report-page .main-content {
  background: radial-gradient(circle at 90% 0, #d8eee4 0, transparent 27%), radial-gradient(circle at 0 82%, #fff0df 0, transparent 20%), var(--rd-paper);
}

.monthly-report-page .content-section {
  border-top: 4px solid var(--rd-teal);
}

.monthly-report-page .content-section > .toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin: -2px 0 21px;
  padding-bottom: 21px;
  border-bottom: 1px solid var(--rd-line);
}

.monthly-report-page .content-section > .toolbar label {
  min-width: 180px;
  margin: 0;
}

.monthly-report-page .content-section > .toolbar input {
  min-height: 50px;
  background: #fff;
}

.monthly-report-page .content-section > .toolbar .button {
  min-width: 120px;
}

.monthly-report-page .content-section > .muted {
  margin: 0 0 18px;
  padding-left: 2px;
  font-size: 13px;
}

.monthly-report-page .table-controls {
  margin-top: 16px;
  border-color: #cfe2d7;
  background: #edf7f0;
}

.monthly-report-page .table-wrap {
  border-color: #d5e4db;
  background: #fff;
}

.monthly-report-page th {
  color: var(--rd-ink);
  background: #e7f2eb;
}

.monthly-report-page td:first-child {
  min-width: 175px;
}

.monthly-report-page td:first-child .subtle-link {
  color: var(--rd-ink);
  font-size: 14px;
}

.monthly-report-page td:nth-child(4) {
  color: var(--rd-success);
  font-weight: 700;
}

.monthly-report-page td:nth-child(5) {
  color: #9a7424;
  font-weight: 700;
}

.monthly-report-page td:nth-child(7) {
  color: var(--rd-coral);
  font-weight: 700;
}

@media (max-width: 760px) {
  .monthly-report-page .content-section > .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .monthly-report-page .content-section > .toolbar label,
  .monthly-report-page .content-section > .toolbar .button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .salary-page .page-actions {
    gap: 18px;
    padding: 19px 16px;
  }

  .salary-page .page-actions .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .salary-page .page-actions .toolbar label,
  .salary-page .page-actions .toolbar .button {
    width: 100%;
  }

  .salary-page .salary-payment-form {
    min-width: 440px;
  }
}

.empty-state {
  color: var(--rd-muted) !important;
  background: #fbfdfb;
}

@media (max-width: 1100px) {
  .sidebar {
    width: 238px;
    flex-basis: 238px;
  }

  .main-content {
    padding-right: 34px;
    padding-left: 34px;
  }

  .salary-payment-form {
    min-width: 640px;
  }
}

@media (max-width: 760px) {
  .auth-panel {
    padding: 34px 25px;
  }

  .auth-panel .brand {
    margin-bottom: 58px;
  }

  .auth-panel h1 {
    font-size: 42px;
  }

  .auth-art {
    min-height: 330px;
    padding: 36px 26px;
  }

  .art-copy strong {
    font-size: 48px;
  }

  .main-content {
    padding: 25px 15px;
  }

  .main-content::before {
    height: 3px;
  }

  .topbar {
    align-items: flex-start;
    margin-bottom: 28px;
  }

  .topbar h1 {
    font-size: 31px;
  }

  .user-chip {
    min-height: 39px;
    padding: 8px 10px;
  }

  .page-actions {
    gap: 15px;
  }

  .content-section {
    padding: 19px 15px;
  }

  .section-heading h2,
  .panel-head h2 {
    font-size: 21px;
  }

  .stats-grid {
    gap: 11px;
  }

  .stat-card {
    min-height: 125px;
    padding: 18px 15px;
  }

  .stat-card strong {
    font-size: 30px;
  }

  .table-controls {
    padding: 10px;
  }

  .table-search {
    width: 100%;
    max-width: none !important;
  }

  .table-pagination {
    justify-content: flex-start;
  }

  .table-wrap {
    margin-right: -4px;
    margin-left: -4px;
  }

  th,
  td {
    padding: 12px 9px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .wide-field {
    grid-column: auto;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .button {
    width: 100%;
    justify-content: center;
  }

  .qr-panel {
    padding: 24px 17px;
  }

  .employee-report {
    padding: 20px 15px;
  }

  .report-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-meta {
    text-align: left;
  }

  .report-profile,
  .report-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .report-stats > div:last-child {
    grid-column: 1 / -1;
  }

  .salary-payment-form {
    min-width: 430px;
  }
}

@media (max-width: 430px) {
  .auth-panel h1 {
    font-size: 36px;
  }

  .art-copy strong {
    font-size: 42px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 112px;
  }

  .report-profile,
  .report-stats {
    grid-template-columns: 1fr;
  }

  .report-stats > div:last-child {
    grid-column: auto;
  }

  .public-qr-page {
    padding: 22px 15px;
  }

  .public-qr-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 5mm;
  }

  html,
  body {
    width: 210mm;
    min-height: 297mm;
    background: #fff !important;
  }

  body {
    color: #14213d;
    font-size: 9px;
  }

  .app-shell,
  .main-content {
    display: block !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .sidebar,
  .topbar,
  .no-print,
  .table-controls,
  .alert {
    display: none !important;
  }

  .employee-report {
    width: 200mm;
    min-height: 0;
    margin: 0 auto;
    padding: 0 !important;
    border-top: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
    background: #fff !important;
  }

  .employee-report .report-heading {
    display: flex;
    min-height: 0;
    margin-bottom: 3mm;
    padding: 0 0 2mm;
    border-bottom: 1px solid #14213d;
    line-height: 1.05;
  }

  .employee-report .report-heading h2 {
    display: inline;
    margin: 0 2mm 0 0;
    font-size: 15px;
  }

  .employee-report .report-heading h3 {
    display: inline;
    margin: 0 2mm 0 0;
    font-size: 11px;
  }

  .employee-report .report-heading p,
  .employee-report .report-meta span {
    display: inline;
    font-size: 7px;
  }

  .employee-report .report-meta strong {
    font-size: 12px;
  }

  .employee-report .report-profile,
  .employee-report .report-stats {
    gap: 1.2mm;
    margin-bottom: 2mm;
  }

  .employee-report .report-profile > div,
  .employee-report .report-stats > div {
    min-height: 10mm;
    padding: 1.5mm;
    border: 1px solid #dbe5de;
    border-radius: 2mm;
  }

  .employee-report .report-profile span,
  .employee-report .report-stats span,
  .employee-report .report-stats small {
    font-size: 6px;
  }

  .employee-report .report-profile strong,
  .employee-report .report-stats strong {
    margin-top: .5mm;
    font-size: 9px;
  }

  .employee-report h3 {
    margin: 2mm 0 1mm;
    font-size: 10px;
  }

  .employee-report > p {
    margin: 0 0 1.5mm;
    font-size: 6px;
  }

  .employee-report .table-wrap {
    overflow: visible;
    border: 1px solid #cfdcd4;
    border-radius: 0;
  }

  .employee-report table {
    width: 100%;
    table-layout: fixed;
  }

  .employee-report th,
  .employee-report td {
    padding: 1mm 1.2mm;
    font-size: 7px;
    line-height: 1.05;
    white-space: nowrap;
  }

  .employee-report th {
    color: #14213d;
    background: #eaf3ed !important;
    font-size: 6px;
  }

  .employee-report tfoot th {
    background: #dff1e6 !important;
    font-size: 8px;
  }

  .employee-report .report-footer {
    margin-top: 2mm;
    font-size: 6px;
  }

  .employee-report tr,
  .employee-report .report-profile,
  .employee-report .report-stats {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

.employee-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 360px;
}

.employee-actions .button {
  min-height: 36px;
  padding: 8px 11px;
  font-size: 12px;
}

.employee-actions form {
  margin: 0;
}

.employee-detail-header {
  position: relative;
  overflow: hidden;
  padding: 25px 28px 22px;
  border-top: 4px solid var(--rd-teal);
}

.employee-detail-header::after {
  position: absolute;
  right: -45px;
  bottom: -75px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(33, 140, 135, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 20px rgba(33, 140, 135, .035), 0 0 0 40px rgba(33, 140, 135, .025);
  content: '';
  pointer-events: none;
}

.employee-detail-header .section-heading {
  position: relative;
  z-index: 1;
  align-items: flex-start;
  margin-bottom: 20px;
}

.employee-detail-header .section-heading h2 {
  margin: 7px 0 5px;
  font-size: 30px;
}

.employee-detail-header .section-heading p {
  margin: 0;
}

.employee-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.employee-detail-actions .button {
  min-height: 42px;
  padding: 10px 14px;
  font-size: 12px;
}

.employee-detail-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--rd-line);
}

.employee-detail-meta div {
  min-width: 0;
}

.employee-detail-meta span {
  display: block;
  margin-bottom: 5px;
  color: var(--rd-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
}

.employee-detail-meta strong {
  display: block;
  overflow: hidden;
  color: var(--rd-ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-detail-header > form {
  position: relative;
  z-index: 1;
  margin: 0;
}

@media (max-width: 760px) {
  .employee-detail-header {
    padding: 21px 17px 18px;
  }

  .employee-detail-header .section-heading {
    gap: 17px;
  }

  .employee-detail-actions {
    justify-content: flex-start;
  }

  .employee-detail-meta {
    grid-template-columns: 1fr;
  }

  .employee-detail-meta strong {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.button.danger {
  color: #9a453b;
  border-color: #efc7c0;
  background: #fff4f1;
}

.button.danger:hover {
  color: #fff;
  border-color: #b84f42;
  background: #b84f42;
}

@media (max-width: 760px) {
  .employee-actions {
    min-width: 320px;
  }
}
