:root {
  color-scheme: light;
  --ink: #101828;
  --muted: #667085;
  --line: #e4e9f2;
  --surface: #ffffff;
  --soft: #f6f8fb;
  --navy: #0b1220;
  --navy-2: #111c31;
  --blue: #2563eb;
  --blue-2: #1d4ed8;
  --green: #12b76a;
  --orange: #f79009;
  --red: #f04438;
  --shadow: 0 18px 48px rgba(16, 24, 40, 0.09);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--soft);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  color: var(--muted);
}

.boot-mark,
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, transparent 35%, #22a3ff 36% 61%, transparent 62%),
    linear-gradient(45deg, #0c3c8c 0 46%, #087ee5 47% 100%);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.32);
}

.boot-mark {
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    transform: scale(0.92);
    opacity: 0.72;
  }
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(420px, 0.85fr);
  background: var(--navy);
}

.login-story {
  position: relative;
  overflow: hidden;
  padding: clamp(42px, 7vw, 104px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background:
    radial-gradient(circle at 18% 18%, rgba(29, 120, 255, 0.34), transparent 28%),
    radial-gradient(circle at 78% 72%, rgba(16, 185, 129, 0.15), transparent 34%),
    linear-gradient(145deg, #0a1120, #111f38 64%, #0b1629);
}

.login-story::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  right: -220px;
  top: -160px;
  box-shadow:
    0 0 0 62px rgba(255, 255, 255, 0.018),
    0 0 0 128px rgba(255, 255, 255, 0.012);
}

.login-brand,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.login-brand img,
.sidebar-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand-copy strong {
  display: block;
  font-size: 20px;
  letter-spacing: 0.08em;
}

.brand-copy span {
  font-size: 12px;
  color: #95a3ba;
  letter-spacing: 0.16em;
}

.login-message {
  max-width: 690px;
  position: relative;
  z-index: 1;
}

.login-message .eyebrow {
  color: #74a8ff;
}

.login-message h1 {
  margin: 14px 0 22px;
  font-size: clamp(42px, 5.3vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.055em;
  font-weight: 700;
}

.login-message p {
  max-width: 600px;
  color: #aab7ca;
  line-height: 1.8;
  font-size: 17px;
}

.login-feature-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.login-feature {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 12px;
  padding: 12px 15px;
  color: #dbe7f8;
  font-size: 13px;
}

.login-foot {
  color: #6f819d;
  font-size: 13px;
  position: relative;
  z-index: 1;
}

.login-panel {
  position: relative;
  background: #f8fafc;
  padding: clamp(36px, 7vw, 104px);
  display: grid;
  place-items: center;
}

.login-service-provider {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(520px, 100%);
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #71839f;
  font-size: 11px;
  line-height: 1.55;
  letter-spacing: 0.01em;
}

.login-service-provider strong {
  color: #d8e2f0;
  font-size: 12px;
  font-weight: 700;
}

.login-service-provider .service-copyright {
  margin-top: 12px;
}

.login-card {
  width: min(470px, 100%);
}

@media (min-width: 1051px) and (max-height: 1000px) {
  .login-panel {
    padding: 32px clamp(40px, 5vw, 72px);
  }
}

.login-card h2 {
  margin: 10px 0 10px;
  font-size: 34px;
  letter-spacing: -0.035em;
}

.login-card > p {
  margin: 0 0 36px;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: #344054;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #d7deea;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border 0.18s, box-shadow 0.18s;
}

.field textarea {
  min-height: 94px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #6f9bf3;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.login-button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 11px;
  background: var(--blue);
  color: #fff;
  font-weight: 650;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.25);
}

.login-error {
  min-height: 20px;
  margin: -8px 0 12px;
  color: #b42318;
  font-size: 13px;
  font-weight: 600;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 10px;
}

.captcha-image-button {
  height: 46px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d7deea;
  border-radius: 10px;
  background: #eef4ff;
}

.captcha-image-button img,
.reset-captcha-image {
  width: 100%;
  height: 100%;
  min-height: 46px;
  object-fit: cover;
}

.forgot-password {
  width: 100%;
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: #456cae;
  font-size: 12px;
}

.login-button:hover,
.button.primary:hover {
  background: var(--blue-2);
}

.login-help {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  color: #7a879b;
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(18, 183, 106, 0.11);
}

.workspace {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  padding: 25px 16px;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.sidebar-brand {
  padding: 0 11px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar nav {
  display: grid;
  gap: 5px;
  margin-top: 23px;
}

.nav-section {
  padding: 18px 12px 7px;
  color: #6f819e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #99a8bd;
  text-align: left;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.3), rgba(37, 99, 235, 0.1));
  box-shadow: inset 2px 0 #4f8cff;
}

.nav-icon {
  width: 23px;
  color: #7ea7f7;
  font-size: 12px;
  font-weight: 750;
}

.sidebar-user {
  margin-top: auto;
  padding: 14px 10px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 11px;
}

.avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #3275ed, #164cb8);
  color: #fff;
  font-weight: 700;
}

.sidebar-user-copy {
  min-width: 0;
  flex: 1;
}

.sidebar-user-copy strong,
.sidebar-user-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-copy strong {
  font-size: 13px;
}

.sidebar-user-copy span {
  color: #7688a5;
  font-size: 11px;
  margin-top: 3px;
}

.logout-button {
  background: none;
  border: 0;
  color: #71829b;
  font-size: 18px;
}

.main-shell {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  height: 72px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  backdrop-filter: blur(14px);
  z-index: 10;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-toggle {
  display: none;
}

.breadcrumb {
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb strong {
  color: var(--ink);
  font-weight: 650;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-action {
  border: 1px solid var(--line);
  background: #fff;
  color: #475467;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13px;
}

.content {
  padding: 34px;
  max-width: 1540px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 26px;
}

.page-header h1 {
  margin: 5px 0 7px;
  font-size: 28px;
  letter-spacing: -0.035em;
}

.page-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.button {
  min-height: 40px;
  padding: 9px 15px;
  border-radius: 9px;
  font-weight: 620;
  font-size: 13px;
  border: 1px solid transparent;
}

.button.primary {
  background: var(--blue);
  color: #fff;
}

.button.secondary {
  background: #fff;
  color: #344054;
  border-color: var(--line);
}

.button.danger {
  background: #fff5f5;
  color: #b42318;
  border-color: #fecdca;
}

.button.small {
  min-height: 32px;
  padding: 6px 10px;
}

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

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 19px 20px;
  box-shadow: 0 3px 12px rgba(16, 24, 40, 0.025);
}

.stat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.stat-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.stat-value {
  margin-top: 15px;
  font-size: 29px;
  font-weight: 730;
  letter-spacing: -0.04em;
}

.section-title {
  margin: 32px 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title h2 {
  margin: 0;
  font-size: 17px;
}

.section-title .eyebrow {
  margin-bottom: 5px;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
}

.application-zone + .application-zone {
  margin-top: 8px;
}

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

.app-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  transition: transform 0.18s, box-shadow 0.18s, border 0.18s;
}

.app-card:hover {
  transform: translateY(-2px);
  border-color: #c9d7ee;
  box-shadow: var(--shadow);
}

.app-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.app-icon {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.status-badge,
.role-badge,
.app-count {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 650;
}

.status-badge.active {
  background: #ecfdf3;
  color: #027a48;
}

.status-badge.disabled {
  background: #f2f4f7;
  color: #667085;
}

.status-badge.pending {
  background: #fff7e8;
  color: #b54708;
}

.app-card h3 {
  margin: 18px 0 7px;
  font-size: 16px;
}

.app-card p {
  color: var(--muted);
  line-height: 1.55;
  font-size: 12px;
  margin: 0;
}

.app-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 18px;
}

.launch-link {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 650;
  font-size: 13px;
  padding: 0;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.month-picker {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #344054;
}

.work-hours {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px 17px;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  background: #f5f8ff;
  color: #344054;
  font-size: 12px;
}

.work-hours strong {
  color: #175cd3;
}

.work-hours small {
  margin-left: auto;
  color: var(--muted);
}

.schedule-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.calendar-weekdays,
.schedule-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
}

.calendar-weekdays span {
  padding: 12px;
  border-right: 1px solid var(--line);
  background: #f8fafc;
  color: #667085;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.calendar-cell {
  min-height: 170px;
  padding: 11px;
  border: 0;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

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

.calendar-member-count {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #667085;
  font-size: 10px;
  font-weight: 650;
}

.calendar-cell:hover {
  background: #f7faff;
}

.calendar-cell.weekend {
  background: #fffaf3;
}

.calendar-empty {
  background: #f8fafc;
  pointer-events: none;
}

.calendar-day {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 750;
}

.calendar-members {
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.calendar-members .calendar-member {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0 4px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #244a86;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  word-break: break-all;
  box-sizing: border-box;
}

.calendar-member.tone-0 { background: #eaf2ff; border-color: #cfe0ff; color: #2459b8; }
.calendar-member.tone-1 { background: #ecfdf3; border-color: #c6f1d5; color: #087443; }
.calendar-member.tone-2 { background: #fff4e8; border-color: #ffddb5; color: #a24b0b; }
.calendar-member.tone-3 { background: #f3efff; border-color: #ddd2ff; color: #6941c6; }
.calendar-member.tone-4 { background: #fff0f5; border-color: #ffd0df; color: #b42362; }
.calendar-member.tone-5 { background: #eafafa; border-color: #c8eeee; color: #0e7090; }

.calendar-cell:hover .calendar-member {
  box-shadow: 0 3px 9px rgba(36, 73, 134, 0.08);
}

.calendar-members small {
  color: #b0b8c5;
}

.employee-check-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.schedule-select-all {
  grid-column: 1 / -1;
  border-color: #9dbcf7;
  background: #f3f7ff;
}

.schedule-select-all strong {
  color: #1849a9;
}

.quick-schedule-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

#quick-schedule-count {
  margin-left: auto;
  color: #475467;
  font-size: 12px;
  font-weight: 650;
}

.quick-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.quick-date-item {
  position: relative;
  cursor: pointer;
}

.quick-date-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.quick-date-item span {
  display: grid;
  place-items: center;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #344054;
}

.quick-date-item small {
  color: #98a2b3;
}

.quick-date-item.weekend span {
  background: #fffbf2;
}

.quick-date-item input:checked + span {
  border-color: #3973db;
  background: #eaf2ff;
  color: #1849a9;
  box-shadow: inset 0 0 0 1px #3973db;
}

.modal-note {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 12px;
}

.request-type {
  color: #175cd3;
  font-weight: 650;
}

.date-swap-arrow {
  display: inline-block;
  margin: 0 6px;
  color: #2563eb;
  font-weight: 800;
}

.self-swap-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 750;
}

.self-swap-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.self-swap-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 1px;
  border-radius: 13px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 20px;
  font-weight: 800;
}

.schedule-hint {
  margin: 12px 0 18px;
  padding: 11px 13px;
  border-radius: 11px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  line-height: 1.65;
}

@media (max-width: 640px) {
  .self-swap-flow {
    grid-template-columns: 1fr;
  }
  .self-swap-icon {
    width: 100%;
    height: 32px;
    margin: 0;
  }
}

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

.salary-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(16, 24, 40, 0.025);
}

.salary-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.salary-card-head span,
.salary-card-head small {
  display: block;
}

.salary-card-head span {
  font-weight: 700;
}

.salary-card-head small {
  margin-top: 3px;
  color: var(--muted);
}

.salary-net {
  margin: 24px 0 18px;
}

.salary-net span,
.salary-net strong {
  display: block;
}

.salary-net span {
  color: var(--muted);
  font-size: 11px;
}

.salary-net strong {
  margin-top: 5px;
  color: #175cd3;
  font-size: 28px;
}

.salary-detail {
  display: grid;
  gap: 7px;
  margin: 0 0 18px;
}

.salary-detail div {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid #edf0f5;
}

.salary-detail dt,
.salary-detail dd {
  margin: 0;
  font-size: 12px;
}

.salary-detail dt {
  color: var(--muted);
}

.salary-note {
  min-height: 38px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.salary-empty {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.panel-toolbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 17px;
  border-bottom: 1px solid var(--line);
}

.search {
  width: min(340px, 100%);
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 12px;
  outline: none;
}

.search:focus {
  border-color: #83a7ee;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  padding: 13px 16px;
  background: #f8fafc;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

td {
  padding: 14px 16px;
  border-top: 1px solid #edf0f5;
  vertical-align: middle;
}

tbody tr:hover {
  background: #fbfcfe;
}

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

.person .avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.person strong,
.person span {
  display: block;
}

.person span,
.subtle {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.role-badge.super {
  background: #fff4e8;
  color: #b54708;
}

.role-badge.admin {
  background: #eef4ff;
  color: #175cd3;
}

.role-badge.employee {
  background: #f2f4f7;
  color: #475467;
}

.app-count {
  background: #f0f5ff;
  color: #2d5fbd;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.empty-state {
  padding: 68px 24px;
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}

.empty-state.compact {
  min-height: 190px;
  display: grid;
  align-content: center;
}

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

.department-access-note {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px 17px;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  background: #f5f8ff;
  color: #344054;
  font-size: 12px;
}

.department-access-note strong {
  color: #175cd3;
}

.department-access-note small {
  margin-left: auto;
  color: var(--muted);
}

.department-card {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.department-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.department-card h3 {
  margin: 0 0 5px;
  font-size: 15px;
}

.department-code {
  color: #98a2b3;
  font-size: 11px;
}

.member-count {
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
}

.member-count strong {
  color: var(--ink);
  font-size: 24px;
  margin-right: 5px;
}

.department-apps {
  min-height: 66px;
  display: flex;
  align-content: flex-start;
  gap: 6px;
  flex-wrap: wrap;
  margin: 15px 0;
  padding-top: 14px;
  border-top: 1px solid #edf0f5;
}

.department-apps span {
  height: fit-content;
  padding: 5px 8px;
  border-radius: 7px;
  background: #eef4ff;
  color: #2459b8;
  font-size: 10px;
}

.department-apps small {
  color: #98a2b3;
}

.department-permission-list {
  display: grid;
  gap: 18px;
}

.department-permission-list section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.department-permission-list h4 {
  margin: 0;
  padding: 11px 14px;
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
}

.department-permission-row {
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 14px;
  border-top: 1px solid #edf0f5;
}

.department-permission-row select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 6px 9px;
}

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

.role-card {
  padding: 22px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.role-card h3 {
  margin: 14px 0 8px;
}

.role-card p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.role-symbol {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #eef4ff;
  color: var(--blue);
  font-weight: 800;
}

.audit-action {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: #344054;
}

.coming-soon {
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
  text-align: center;
}

.coming-soon-card {
  max-width: 550px;
  padding: 48px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.coming-soon-icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1f6feb, #7c3aed);
  color: #fff;
  font-weight: 800;
}

.modal {
  border: 0;
  padding: 0;
  border-radius: 16px;
  width: min(760px, calc(100vw - 28px));
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.3);
}

.modal::backdrop {
  background: rgba(10, 17, 31, 0.6);
  backdrop-filter: blur(3px);
}

.modal-card {
  background: #fff;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 24px 17px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: #f2f4f7;
  color: #667085;
  font-size: 21px;
}

.modal-body {
  padding: 22px 24px 5px;
  max-height: 65vh;
  overflow: auto;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 17px 24px 22px;
}

.account-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid #fecdca;
  border-radius: 12px;
  background: #fff8f7;
}

.account-danger-zone > div {
  display: grid;
  gap: 4px;
}

.account-danger-zone strong {
  color: #912018;
}

.account-danger-zone span {
  color: #667085;
  font-size: 13px;
}

.account-danger-zone .button {
  flex: 0 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.field.full {
  grid-column: 1 / -1;
}

.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.check-card {
  display: flex;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.check-card input {
  margin-top: 2px;
}

.check-card strong,
.check-card span {
  display: block;
}

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

.permission-app {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fbfcfe;
}

.permission-app-head {
  min-height: 66px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
}

.permission-app-head select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  color: #344054;
  background: #fff;
}

.app-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.app-toggle input {
  margin-top: 3px;
}

.app-toggle strong,
.app-toggle small {
  display: block;
}

.app-toggle strong {
  font-size: 14px;
}

.app-toggle small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.permission-groups {
  padding: 4px 14px 14px;
  display: grid;
  gap: 11px;
}

.permission-group {
  padding-top: 10px;
  border-top: 1px solid #edf0f5;
}

.permission-group h4 {
  margin: 0 0 8px;
  color: #475467;
  font-size: 11px;
}

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

.permission-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 7px;
  color: #344054;
  font-size: 12px;
}

.permission-options label:hover {
  background: #eef4ff;
}

.permission-empty {
  padding: 0 14px 13px;
}

.check-card strong {
  font-size: 13px;
}

.check-card span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: 390px;
  padding: 13px 16px;
  border-radius: 11px;
  background: #101828;
  color: #fff;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.25);
  transform: translateY(90px);
  opacity: 0;
  transition: 0.22s ease;
  font-size: 13px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.error {
  background: #7a271a;
}

@media (max-width: 1050px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .app-grid,
  .department-grid,
  .salary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-story {
    min-height: 360px;
  }
  .login-panel {
    padding-block: 64px;
    gap: 34px;
  }
}

@media (max-width: 760px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.22s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-shell {
    grid-column: 1;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .topbar {
    height: 64px;
    padding: 0 18px;
  }
  .content {
    padding: 22px 16px 34px;
  }
  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .stats-grid,
  .app-grid,
  .department-grid,
  .role-grid,
  .salary-grid {
    grid-template-columns: 1fr;
  }
  .form-grid,
  .check-grid,
  .employee-check-grid {
    grid-template-columns: 1fr;
  }
  .calendar-weekdays,
  .schedule-calendar {
    min-width: 820px;
  }
  .schedule-panel {
    overflow-x: auto;
  }
  .header-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
  .permission-options {
    grid-template-columns: 1fr 1fr;
  }
  .login-story {
    padding: 38px 26px;
  }
  .login-message h1 {
    font-size: 42px;
  }
  .login-panel {
    padding: 46px 24px;
  }
  .login-service-provider {
    width: 100%;
  }
}
