:root {
  --ems-navy: #111b3d;
  --ems-navy-2: #1f3482;
  --ems-blue: #dce8f6;
  --ems-blue-soft: #eef6ff;
  --ems-gold: #ffc20f;
  --ems-green: #2f8b1f;
  --ems-red: #f71313;
  --ems-ink: #111827;
  --ems-muted: #64748b;
  --ems-line: #d6e2f0;
  --ems-shadow: 0 12px 28px rgba(17, 27, 61, 0.16);
}

body {
  color: var(--ems-ink) !important;
  background: var(--ems-blue) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 auto 0 0;
  width: 258px;
  background: var(--ems-navy);
  z-index: 0;
}

.ems-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 258px;
  padding: 28px 14px 18px;
  background: var(--ems-navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 22px;
  z-index: 10;
  overflow-y: auto;
}

.ems-admin-profile {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 5px 8px 16px;
}

.ems-admin-photo {
  width: 62px;
  height: 62px;
  border: 2px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ems-gold);
  color: var(--ems-navy);
  font-size: 24px;
  font-weight: 900;
}

.ems-admin-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 900;
}

.ems-admin-role {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
}

.ems-nav-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ems-nav-title {
  margin: 0 0 5px 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.ems-nav-link {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.ems-nav-link:hover,
.ems-nav-link.active {
  outline: 1px solid rgba(255, 255, 255, 0.86);
  color: #fff;
}

.ems-nav-link.active {
  background: var(--ems-gold);
  color: #070b16;
  outline: 0;
}

.ems-nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.13);
  font-size: 13px;
  font-weight: 900;
}

.ems-nav-link.active .ems-nav-icon {
  background: #29345f;
  color: #fff;
}

.ems-logout {
  margin-top: auto;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ems-red);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.app-shell {
  width: auto !important;
  max-width: none !important;
  margin: 0 0 0 258px !important;
  padding: 0 32px 40px !important;
}

.topbar {
  min-height: 64px !important;
  margin: 0 -32px 28px !important;
  padding: 0 28px !important;
  background: var(--ems-blue-soft) !important;
  border-top: 6px solid #84c8ed;
  box-shadow: none !important;
}

.brand-mark {
  width: 42px !important;
  height: 42px !important;
  border-radius: 8px !important;
  background: var(--ems-navy-2) !important;
  color: #fff !important;
  box-shadow: 0 5px 12px rgba(17, 27, 61, 0.12) !important;
}

h1 {
  font-size: 26px !important;
}

.subtitle,
.hint {
  color: var(--ems-muted) !important;
}

.nav-actions {
  display: none !important;
}

.panel,
.data-panel,
.modal,
.summary-item,
.details-card,
.employee-list-panel,
.assign-box {
  border: 1px solid var(--ems-line) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: var(--ems-shadow) !important;
}

.tabs {
  border-color: var(--ems-line) !important;
  background: #fff !important;
}

.tab-btn.active,
.btn.primary,
.btn.secondary:hover {
  background: var(--ems-navy-2) !important;
  color: #fff !important;
}

.btn.gold,
.tab-card.gold {
  background: var(--ems-gold) !important;
  color: #070b16 !important;
}

.btn.secondary {
  border: 1px solid var(--ems-line) !important;
  background: #fff !important;
  color: var(--ems-ink) !important;
}

.btn.danger {
  background: #fff0f0 !important;
  color: #b42318 !important;
  border: 1px solid #ffc7c7 !important;
}

input,
select,
textarea {
  border-color: #cdd9e8 !important;
  border-radius: 8px !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ems-navy-2) !important;
  box-shadow: 0 0 0 3px rgba(31, 52, 130, 0.16) !important;
}

th {
  background: #e6eef8 !important;
  color: #05070c !important;
}

tbody tr:nth-child(even) {
  background: #e4eef9 !important;
}

tbody tr:nth-child(odd) {
  background: #fff !important;
}

.badge.active {
  background: #dcfce7 !important;
  color: #166534 !important;
}

@media (max-width: 900px) {
  body::before {
    display: none;
  }

  .ems-sidebar {
    position: static;
    width: 100%;
    max-height: none;
  }

  .app-shell {
    margin: 0 !important;
    padding: 0 14px 32px !important;
  }

  .topbar {
    margin: 0 -14px 22px !important;
    padding: 14px !important;
  }
}
