html { box-sizing: border-box; }
.desk-shell, .desk-shell * { box-sizing: border-box; }
body.desk-shell {
  margin: 0;
  background: #f3f6fb;
  color: #142033;
  font-family: "Segoe UI", Arial, sans-serif;
  overflow: hidden;
}
.desk-shell img { max-width: 100%; height: auto; display: block; }
.desk-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.25rem 0 1rem;
  background: #fff;
  border-bottom: 1px solid #d7e1ec;
}
.desk-logo { display: flex; align-items: center; width: 200px; }
.desk-logo img { width: 168px; height: auto; }
.desk-top-actions { display: flex; align-items: center; gap: 0.85rem; color: #142033; font-size: 0.92rem; white-space: nowrap; }
.desk-top .btn { background: #0a1f3d; color: #fff; border-radius: 999px; padding: 0.45rem 0.95rem; text-decoration: none; font-weight: 650; }
.desk-side {
  position: fixed;
  top: 72px;
  left: 0;
  width: 232px;
  height: calc(100vh - 72px);
  overflow: auto;
  background: #0a1f3d;
  color: #e7f1fb;
  padding: 1.15rem 0.75rem;
  z-index: 30;
}
.desk-main {
  position: fixed;
  top: 72px;
  left: 232px;
  right: 0;
  bottom: 0;
  margin: 0;
  overflow: auto;
  padding: 1.25rem 1.5rem 2rem;
  min-width: 0;
}
.desk-unlock .site-main { display: flex; justify-content: center; padding: 2.2rem 1rem 3rem; }
.desk-unlock .site-footer { margin-left: 0; }
.desk-side nav { display: flex; flex-direction: column; gap: 0.2rem; }
.desk-side nav a {
  color: #e7f1fb;
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
}
.desk-side nav a:hover,
.desk-side nav a.is-on { background: rgba(255,255,255,0.1); }
.desk-main h1, .login-card h1 { margin: 0 0 0.35rem; font-size: 1.65rem; color: #0a1f3d; }
.desk-main h2 { margin: 0 0 0.7rem; font-size: 1.02rem; color: #0a1f3d; }
.desk-main .lead, .login-card .lead { color: #5c6b7c; margin: 0 0 1rem; }
.desk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.9rem; }
.desk-card {
  background: #fff;
  border: 1px solid #d7e1ec;
  border-radius: 16px;
  padding: 1rem 1.1rem 1.15rem;
  margin-bottom: 0.9rem;
}
.desk-card ul { margin: 0; padding-left: 1.1rem; }
.desk-card li { margin: 0.45rem 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.7rem; }
.desk-card li .desk-actions { margin-top: 0; }
.table-scroll { overflow: auto; padding: 0; }
.desk-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.desk-main .desk-table input,
.desk-main .desk-table select,
.desk-main .desk-table textarea,
.desk-main .add-row input,
.desk-main .add-row select {
  width: 100%;
  max-width: none;
  min-width: 0;
}
.desk-main .desk-table textarea { min-height: 2.6rem; height: 2.6rem; resize: vertical; }
.desk-card.table-scroll > .desk-table th:first-child,
.desk-card.table-scroll > .desk-table td:first-child { padding-left: 1rem; }
.desk-card.table-scroll > .desk-table th:last-child,
.desk-card.table-scroll > .desk-table td:last-child { padding-right: 1rem; }
.desk-table th,
.desk-table td {
  text-align: left;
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid #e4ebf3;
  vertical-align: middle;
}
.desk-table th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5c6b7c;
  background: #f6f9fc;
  white-space: nowrap;
}
.desk-table tbody tr:hover { background: #f8fbfe; }
.desk-table .num { text-align: right; white-space: nowrap; }
.desk-table input,
.desk-table select,
.desk-table textarea {
  width: 100%;
  max-width: none;
  min-height: 0;
}
.desk-table textarea { min-height: 3.2rem; }
.desk-main a { color: #0a6bc4; }
.desk-main label, .login-card label { display: block; margin: 0.7rem 0 0.28rem; font-size: 0.84rem; font-weight: 650; color: #142033; }
.desk-main input,
.desk-main textarea,
.desk-main select,
.login-card input {
  width: 100%;
  max-width: 36rem;
  border: 1px solid #c5d3e2;
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  font: inherit;
  background: #fff;
  color: #142033;
}
.desk-main textarea { min-height: 5rem; }
.desk-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.75rem; }
.desk-main button,
.desk-main .btn,
.login-card button {
  border: 0;
  background: #0a6bc4;
  color: #fff;
  border-radius: 999px;
  padding: 0.48rem 0.95rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.desk-main button.quiet,
.desk-main .btn.quiet { background: #e8eef6; color: #0a1f3d; }
.pill { display: inline-block; border-radius: 999px; padding: 0.12rem 0.55rem; background: #e7f2fc; color: #0a1f3d; font-size: 0.8rem; }
.form-error { color: #9b1c1c; background: #fde8e8; border-radius: 10px; padding: 0.55rem 0.7rem; }
.form-ok { color: #0f6b3a; background: #e5f6ec; border-radius: 10px; padding: 0.55rem 0.7rem; }
.login-card { width: min(440px, 100%); margin-bottom: 2rem; }
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; margin-bottom: 1rem; }
.kpi {
  display: block;
  background: #fff;
  border: 1px solid #d7e1ec;
  border-radius: 16px;
  padding: 0.95rem 1rem 0.8rem;
  text-decoration: none;
  color: #142033;
}
.kpi span { display: block; color: #5c6b7c; font-size: 0.82rem; }
.kpi strong { display: block; margin-top: 0.2rem; font-size: 1.7rem; color: #0a1f3d; }
.kpi em { font-style: normal; color: #0a6bc4; font-size: 0.9rem; }
.service-card { text-decoration: none; color: inherit; display: block; }
.kicker { margin: 0 0 0.35rem; color: #0a6bc4; font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; }
.stat-line { margin: 0.2rem 0; }
.check { display: flex; gap: 0.45rem; align-items: center; font-weight: 500; }
.check input { width: auto; }
.desk-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.8rem; }
.desk-tabs button {
  background: #e8eef6;
  color: #0a1f3d;
}
.desk-tabs button.is-on { background: #0a1f3d; color: #fff; }
.tab-panel { display: none !important; }
.tab-panel.is-on { display: block !important; }
.holiday-add { margin-bottom: 0.4rem; }
.month-block { margin: 0 0 1.1rem; }
.month-block h2 { margin-bottom: 0.55rem; }
.holiday-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0.75rem; }
.holiday-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.85rem;
  align-items: start;
  background: #fff;
  border: 1px solid #d7e1ec;
  border-radius: 16px;
  padding: 0.85rem 0.95rem;
}
.holiday-day {
  background: #0a1f3d;
  color: #fff;
  border-radius: 12px;
  text-align: center;
  padding: 0.55rem 0.2rem 0.45rem;
}
.holiday-day strong { display: block; font-size: 1.35rem; line-height: 1; }
.holiday-day span { display: block; margin-top: 0.2rem; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: #9fd0f5; }
.holiday-card h3 { margin: 0 0 0.25rem; font-size: 1rem; color: #0a1f3d; }
.holiday-card p { margin: 0 0 0.4rem; color: #3e4c5c; }
.desk-main .desk-card input,
.desk-main .desk-card select,
.desk-main .desk-card textarea { max-width: none; }
.add-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(180px, 1.1fr) minmax(220px, 1.5fr) auto;
  gap: 0.75rem;
  align-items: end;
}
.add-row label { margin-top: 0; }
.add-row button { height: 42px; margin: 0; white-space: nowrap; }
.save-bar {
  margin-top: 0.2rem;
  background: #fff;
  border: 1px solid #d7e1ec;
  border-radius: 14px;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: flex-end;
}
.pager { display: flex; align-items: center; gap: 0.7rem; padding: 0.8rem 0.9rem 1rem; }
.pager span { color: #5c6b7c; }
.is-disabled { opacity: 0.45; pointer-events: none; }
@media (max-width: 900px) {
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .add-row { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  body.desk-shell { overflow: auto; }
  .desk-side { position: sticky; top: 72px; width: auto; height: auto; }
  .desk-main { position: static; margin-left: 0; padding: 1.1rem; }
  .desk-side nav { flex-direction: row; flex-wrap: wrap; }
  .add-row { grid-template-columns: 1fr; }
}
