:root {
  --radius-sm: 16px;
  --radius-md: 22px;
  --radius-lg: 30px;
  --shadow-soft: 0 14px 32px rgba(0, 0, 0, 0.18);
  --shadow-mid: 0 20px 48px rgba(0, 0, 0, 0.26);
  --shadow-hard: 0 32px 82px rgba(0, 0, 0, 0.42);
  --transition-fast: 0.18s ease;
  --transition-mid: 0.28s ease;
  --bg-dark-1: #071018;
  --bg-dark-2: #0d1722;
  --bg-light-1: #eef6ff;
  --bg-light-2: #f7fbff;
  --text-dark: #eff8ff;
  --text-light: #182433;
  --line-dark: rgba(255, 255, 255, 0.08);
  --line-light: rgba(18, 46, 78, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  transition: background var(--transition-mid), color var(--transition-mid);
  overflow-x: hidden;
}

body.theme-dark {
  background:
    radial-gradient(circle at 15% 18%, rgba(0, 255, 191, 0.08), transparent 24%),
    radial-gradient(circle at 84% 10%, rgba(0, 162, 255, 0.1), transparent 18%),
    radial-gradient(circle at 70% 82%, rgba(120, 92, 255, 0.1), transparent 24%),
    linear-gradient(180deg, var(--bg-dark-1) 0%, #09111a 52%, var(--bg-dark-2) 100%);
  color: var(--text-dark);
}

body.theme-light {
  background:
    radial-gradient(circle at 18% 18%, rgba(0, 132, 255, 0.08), transparent 22%),
    radial-gradient(circle at 84% 12%, rgba(0, 214, 170, 0.08), transparent 20%),
    linear-gradient(180deg, var(--bg-light-1) 0%, var(--bg-light-2) 52%, #edf3fb 100%);
  color: var(--text-light);
}

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

button {
  border: none;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast);
}

button:hover {
  transform: translateY(-1px);
}

.hidden {
  display: none !important;
}

#appBgFx {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bgOrb {
  position: absolute;
  border-radius: 999px;
  filter: blur(54px);
  opacity: 0.56;
}

.orb1 {
  width: 260px;
  height: 260px;
  top: 72px;
  left: -30px;
  background: rgba(0, 255, 187, 0.14);
}

.orb2 {
  width: 330px;
  height: 330px;
  top: 140px;
  right: -70px;
  background: rgba(0, 174, 255, 0.14);
}

.orb3 {
  width: 300px;
  height: 300px;
  bottom: 30px;
  left: 36%;
  background: rgba(123, 97, 255, 0.12);
}

.gridGlow {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 92%);
}

.authShell,
.appShell {
  position: relative;
  z-index: 1;
}

.authShell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 24px;
}

.authWrap {
  width: 100%;
  max-width: 1280px;
  display: grid;
  grid-template-columns: 1.05fr 0.82fr;
  gap: 30px;
}

.authHero,
.authCard,
.topHeader,
.dashboardHero,
.mainCard,
.sideCard {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
}

.authHero,
.authCard,
.topHeader,
.dashboardHero,
.mainCard,
.sideCard {
  position: relative;
}

body.theme-dark .authHero,
body.theme-dark .authCard,
body.theme-dark .topHeader,
body.theme-dark .dashboardHero,
body.theme-dark .mainCard,
body.theme-dark .sideCard {
  background: linear-gradient(180deg, rgba(12, 20, 29, 0.94) 0%, rgba(10, 18, 28, 0.9) 100%);
  border: 1px solid var(--line-dark);
  backdrop-filter: blur(10px);
}

body.theme-light .authHero,
body.theme-light .authCard,
body.theme-light .topHeader,
body.theme-light .dashboardHero,
body.theme-light .mainCard,
body.theme-light .sideCard {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 251, 255, 0.94) 100%);
  border: 1px solid var(--line-light);
  backdrop-filter: blur(10px);
}

.authHero {
  padding: 38px;
}

.authCard {
  padding: 30px;
}

.authCardGlow {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(0, 255, 191, 0.18), transparent 30%, transparent 72%, rgba(0, 194, 255, 0.16));
  pointer-events: none;
}

.heroBadge,
.authMiniBadge,
.miniBadge,
.statusBadge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.heroBadge {
  background: rgba(0, 255, 191, 0.12);
  color: #81ffe0;
  border: 1px solid rgba(0, 255, 191, 0.18);
  margin-bottom: 18px;
}

.authMiniBadge,
.miniBadge {
  background: rgba(0, 162, 255, 0.12);
  color: #91e2ff;
  border: 1px solid rgba(0, 162, 255, 0.18);
}

.statusBadge.working {
  background: linear-gradient(135deg, rgba(0, 255, 170, 0.18), rgba(0, 194, 255, 0.16));
  color: #9affdf;
  border: 1px solid rgba(0, 255, 170, 0.24);
  box-shadow: 0 0 18px rgba(0, 255, 170, 0.14);
}

.authHero h1,
.authHeader h2,
.dashboardHeroIntro h4,
.topHeader h2 {
  margin: 0;
  line-height: 1.08;
}

.authHero h1 {
  font-size: clamp(34px, 4vw, 56px);
  max-width: 720px;
}

.authHero p,
.authHeader p,
.dashboardHeroIntro p,
.metaText {
  opacity: 0.82;
  line-height: 1.6;
}

.heroGlowCard {
  margin-top: 28px;
  padding: 20px;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}

body.theme-dark .heroGlowCard,
body.theme-dark .heroStatItem,
body.theme-dark .cardList > li,
body.theme-dark .timelineContent,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark .toolbarCard,
body.theme-dark .detailHeroCard,
body.theme-dark .detailChip {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

body.theme-light .heroGlowCard,
body.theme-light .heroStatItem,
body.theme-light .cardList > li,
body.theme-light .timelineContent,
body.theme-light input,
body.theme-light select,
body.theme-light textarea,
body.theme-light .toolbarCard,
body.theme-light .detailHeroCard,
body.theme-light .detailChip {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(19, 38, 66, 0.08);
}

.heroGlowLine {
  position: absolute;
  top: 0;
  left: -34%;
  width: 46%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 191, 0.7), transparent);
  animation: heroLineSlide 4.4s linear infinite;
}

@keyframes heroLineSlide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(280%);
  }
}

.heroStatGrid,
.dashboardRow,
.miniMetricGrid,
.workflowStats,
.sectionGrid,
.compactWorkGrid {
  display: grid;
  gap: 14px;
}

.heroStatGrid,
.dashboardRow {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workflowStats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.heroStatItem {
  padding: 16px 18px;
  border-radius: 18px;
}

.heroStatItem span,
.infoCardTitle {
  display: block;
  font-size: 12px;
  opacity: 0.74;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.authForm label {
  display: block;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}

.fieldWrap {
  margin-bottom: 14px;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
  color: inherit;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(0, 214, 170, 0.28);
  box-shadow: 0 0 0 4px rgba(0, 214, 170, 0.08), 0 0 18px rgba(0, 214, 170, 0.1);
}

.authButtons,
.statusStack {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.authButtons {
  margin-top: 18px;
}

.authButtons button {
  flex: 1;
  min-width: 160px;
}

.authError {
  min-height: 20px;
  margin-top: 14px;
  color: #ff879b;
  font-weight: 700;
}

.primaryBtn,
.secondaryBtn,
.ghostBtn,
.dangerBtn,
.logoutBtnModern,
.navBtn {
  padding: 12px 16px;
  border-radius: 16px;
  font-weight: 800;
}

.primaryBtn {
  background: linear-gradient(135deg, #00d47d, #10b981);
  color: #04130c;
  box-shadow: 0 0 0 1px rgba(0, 255, 170, 0.12), 0 0 18px rgba(0, 255, 170, 0.22);
}

.ghostBtn,
.navBtn {
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.secondaryBtn {
  background: linear-gradient(135deg, #2979ff, #00b7ff);
  color: #f7fbff;
  box-shadow: 0 0 0 1px rgba(65, 160, 255, 0.12), 0 0 18px rgba(0, 162, 255, 0.18);
}

.dangerBtn {
  background: linear-gradient(135deg, #ff5c79, #ff7a18);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 92, 121, 0.12), 0 0 18px rgba(255, 92, 121, 0.18);
}

body.theme-light .ghostBtn,
body.theme-light .navBtn {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(18, 46, 78, 0.08);
}

.logoutBtnModern {
  background: linear-gradient(135deg, #00d9ff, #00ffb2);
  color: #04131a;
  box-shadow: 0 0 18px rgba(0, 255, 170, 0.24);
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

body.theme-dark .sidebar {
  background: rgba(8, 15, 24, 0.84);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

body.theme-light .sidebar {
  background: rgba(255, 255, 255, 0.82);
  border-right: 1px solid rgba(18, 46, 78, 0.08);
  backdrop-filter: blur(12px);
}

.sidebarGlow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 255, 170, 0.05), transparent 40%, transparent 65%, rgba(0, 194, 255, 0.05));
}

.sidebarBrand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
}

.brandLogo {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-size: 22px;
  font-weight: 900;
  color: #04131a;
  background: linear-gradient(135deg, #00ffa3, #00c2ff);
  box-shadow: 0 0 24px rgba(0, 255, 170, 0.24);
}

.brandTitle {
  font-weight: 900;
  font-size: 18px;
}

.brandSub {
  font-size: 12px;
  opacity: 0.72;
  margin-top: 4px;
}

.sidebarNav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.navBtn {
  text-align: left;
}

body.theme-dark .navBtn.active {
  background: linear-gradient(135deg, rgba(0, 255, 170, 0.16), rgba(0, 194, 255, 0.12));
  border-color: rgba(0, 255, 170, 0.22);
  color: #c8fff0;
  box-shadow: inset 0 0 0 1px rgba(0, 255, 170, 0.06);
}

body.theme-light .navBtn.active {
  color: #1067c7;
  background: linear-gradient(135deg, rgba(0, 160, 130, 0.09), rgba(0, 125, 255, 0.08));
  border-color: rgba(0, 125, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(0, 125, 255, 0.05);
}

.sidebarFooter {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.mobileFooterBar {
  display: none;
}

.content {
  min-width: 0;
  padding: 24px;
}

.topHeader,
.dashboardHero,
.mainCard,
.sideCard {
  padding: 20px;
}

.topHeader {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.dashboardHero {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 18px;
  margin-bottom: 18px;
}

.dashboardHeroIntro h4 {
  font-size: 24px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.miniMetricGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.miniMetricCard,
.infoCard {
  min-width: 0;
  border-radius: 20px;
  padding: 16px 18px;
}

body.theme-dark .miniMetricCard,
body.theme-dark .infoCard {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

body.theme-light .miniMetricCard,
body.theme-light .infoCard {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(18, 46, 78, 0.08);
}

.miniMetricCard b,
.infoCardValue {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.tone-green {
  box-shadow: inset 0 0 0 1px rgba(0, 255, 170, 0.12), 0 0 22px rgba(0, 255, 170, 0.08);
}

.tone-blue {
  box-shadow: inset 0 0 0 1px rgba(0, 162, 255, 0.12), 0 0 22px rgba(0, 162, 255, 0.08);
}

.tone-purple {
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.12), 0 0 22px rgba(168, 85, 247, 0.08);
}

.tone-cyan {
  box-shadow: inset 0 0 0 1px rgba(0, 214, 170, 0.12), 0 0 22px rgba(0, 214, 170, 0.08);
}

.tone-amber {
  box-shadow: inset 0 0 0 1px rgba(255, 179, 0, 0.14), 0 0 22px rgba(255, 179, 0, 0.08);
}

.tone-red {
  box-shadow: inset 0 0 0 1px rgba(255, 92, 121, 0.14), 0 0 22px rgba(255, 92, 121, 0.08);
}

.miniMetricCard small {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  opacity: 0.78;
}

.dashboardRow {
  margin-bottom: 18px;
}

.sectionGrid,
.sectionSingle,
.compactWorkGrid {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.9fr);
  align-items: start;
}

.sectionSingle {
  grid-template-columns: minmax(0, 1fr);
}

.contentDivider {
  display: none;
}

.sectionHead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.sectionHead h3 {
  margin: 0;
}

.cardList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.cardList > li {
  padding: 16px;
  border-radius: 18px;
  min-width: 0;
}

.mailboxBtn,
.messageBtn {
  width: 100%;
  text-align: left;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0;
}

.mailboxBtn:hover,
.messageBtn:hover {
  transform: none;
}

.mailboxBtn {
  display: grid;
  gap: 6px;
}

.richCard {
  display: grid;
  gap: 12px;
}

.richCardHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.chipRow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.statsGrid {
  display: grid;
  gap: 10px;
}

.statsGrid.compact {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.statTile {
  border-radius: 16px;
  padding: 12px 14px;
}

body.theme-dark .statTile {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body.theme-light .statTile {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(19, 38, 66, 0.08);
}

.statTile span {
  display: block;
  font-size: 12px;
  opacity: 0.72;
  margin-bottom: 6px;
}

.statTile b {
  display: block;
  font-size: 16px;
  line-height: 1.3;
}

.cardChip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
}

.cardChip.is-good {
  color: #9affdf;
  background: rgba(0, 255, 170, 0.12);
  border-color: rgba(0, 255, 170, 0.2);
}

.cardChip.is-muted {
  color: inherit;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.cardChip.is-cyan {
  color: #8de7ff;
  background: rgba(0, 162, 255, 0.12);
  border-color: rgba(0, 162, 255, 0.18);
}

.cardChip.is-purple {
  color: #dab4ff;
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.18);
}

.cardChip.is-amber {
  color: #ffd97c;
  background: rgba(255, 179, 0, 0.12);
  border-color: rgba(255, 179, 0, 0.18);
}

.mailboxBtn.active,
.messageBtn.active {
  box-shadow: inset 0 0 0 1px rgba(0, 255, 170, 0.14), 0 10px 24px rgba(0, 255, 170, 0.06);
}

.mailboxBtn .richCard,
.messageBtn {
  border-radius: 16px;
  padding: 2px;
}

body.theme-dark .mailboxBtn.active,
body.theme-dark .messageBtn.active {
  background: linear-gradient(135deg, rgba(0, 255, 170, 0.08), rgba(0, 194, 255, 0.08));
  border-color: rgba(0, 255, 170, 0.18);
}

body.theme-light .mailboxBtn.active,
body.theme-light .messageBtn.active {
  background: linear-gradient(135deg, rgba(0, 255, 170, 0.08), rgba(0, 125, 255, 0.08));
  border-color: rgba(0, 125, 255, 0.14);
}

.cardTitle {
  font-weight: 800;
  margin-bottom: 6px;
}

.cardMeta,
.cardStats {
  font-size: 14px;
  opacity: 0.82;
  line-height: 1.55;
}

.timelineList {
  display: grid;
  gap: 12px;
}

.timelineItem {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.timelineDot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  margin-top: 8px;
  box-shadow: 0 0 18px rgba(0, 255, 220, 0.2);
}

.timelineDot.work {
  background: #00d48a;
}

.timelineDot.warning {
  background: #ffb300;
}

.timelineDot.danger {
  background: #ff6178;
}

.timelineContent {
  border-radius: 16px;
  padding: 12px 14px;
}

.timelineTitle {
  font-weight: 800;
}

.timelineMeta {
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.74;
}

.timelineText {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.86;
}

.detailCard,
.detailHeroCard,
.detailPreview,
.emptyStateCard {
  border-radius: 18px;
  padding: 14px 16px;
}

body.theme-dark .detailCard,
body.theme-dark .detailHeroCard,
body.theme-dark .detailPreview,
body.theme-dark .emptyStateCard {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

body.theme-light .detailCard,
body.theme-light .detailHeroCard,
body.theme-light .detailPreview,
body.theme-light .emptyStateCard {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(19, 38, 66, 0.08);
}

.detailPreview {
  margin-top: 14px;
  line-height: 1.55;
  opacity: 0.9;
  min-height: 140px;
}

#employeeMailboxClaimPanel {
  margin-bottom: 14px;
}

.employeeMailboxHint {
  margin-bottom: 14px;
}

.employeeMailboxHint .cardMeta b {
  color: inherit;
}

#mailboxListSummary + #mailboxList,
#mailboxListSummary + .listPaginationBar + #mailboxList,
#mailboxMessageList + .detailPreview {
  margin-top: 12px;
}

#mailboxMessageList {
  margin-top: 12px;
}

.mailboxActionCard + .mailboxActionCard {
  margin-top: 12px;
}

.previewHead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.previewBody {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.messagePreviewLine {
  margin-top: 8px;
  font-size: 13px;
  opacity: 0.76;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compactCardList > li {
  padding: 12px;
}

.toolbarCard {
  border-radius: 20px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.compactToolbar {
  margin-bottom: 12px;
}

.toolbarGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.toolbarGrid.singleRow {
  grid-template-columns: minmax(0, 1fr);
}

.fieldLabel {
  display: block;
  font-size: 13px;
  font-weight: 800;
  opacity: 0.84;
}

.toolbarPills,
.detailBadgeRow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toolbarPills {
  margin-top: 12px;
}

.filterChip,
.detailChip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: inherit;
}

.filterChip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex: 0 1 auto;
  min-width: 132px;
  white-space: normal;
  text-align: center;
}

body.theme-light .filterChip {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(18, 46, 78, 0.08);
}

.filterChip.active {
  background: linear-gradient(135deg, rgba(0, 255, 170, 0.18), rgba(0, 194, 255, 0.16));
  border-color: rgba(0, 255, 170, 0.24);
  box-shadow: inset 0 0 0 1px rgba(0, 255, 170, 0.08), 0 10px 22px rgba(0, 255, 170, 0.06);
}

.detailBadgeRow {
  margin-top: 14px;
}

.detailChip.is-good {
  color: #9affdf;
  border-color: rgba(0, 255, 170, 0.24);
  box-shadow: inset 0 0 0 1px rgba(0, 255, 170, 0.06);
}

.detailChip.is-muted {
  opacity: 0.82;
}

.listSummaryBar {
  margin-bottom: 12px;
  font-size: 13px;
  opacity: 0.78;
}

.listPaginationBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.paginationActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.topGapSmall {
  margin-top: 14px;
}

.stickyCard {
  position: sticky;
  top: 20px;
}

#mailboxList,
#employeeList,
#assignmentList,
#aliasList,
#telegramList,
#linkMapList,
#workflowQueue,
#inboxList {
  min-width: 0;
}

.panelForm {
  display: grid;
  gap: 10px;
}

.panelForm input,
.panelForm select,
.panelForm textarea,
.authForm input {
  width: 100%;
}

.panelForm label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.86;
}

.formStatus {
  min-height: 20px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.9;
}

.formStatus.success {
  color: #8affd7;
}

.formStatus.error {
  color: #ff9aac;
}

.actionRow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

#mailboxSection .mainCard,
#mailboxSection .sideCard,
#teamSection .mainCard,
#teamSection .sideCard {
  display: flex;
  flex-direction: column;
}

#mailboxSection .sideCard > .detailHeroCard,
#mailboxSection .sideCard > .toolbarCard,
#mailboxSection .sideCard > .detailPreview,
#mailboxSection .sideCard > .detailCard,
#mailboxSection .sideCard > .panelForm,
#mailboxSection .sideCard > .formStatus {
  flex: 0 0 auto;
}

.role-employee #statusCards,
.role-employee .employeeSimplifyHide,
.role-employee #workflowSection,
.role-employee [data-target="overviewSection"],
.role-employee [data-target="workflowSection"] {
  display: none !important;
}

.role-employee #mailboxSection {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
}

.role-employee #mailboxSection .mainCard,
.role-employee #mailboxSection .sideCard {
  border-radius: 26px;
}

.role-employee #mailboxSection .mainCard::before,
.role-employee #mailboxSection .sideCard::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(0, 255, 170, 0.05), transparent 35%, transparent 72%, rgba(0, 194, 255, 0.05));
}

.role-employee #mailboxListSummary {
  margin-top: 4px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
}

body.theme-dark.role-employee #mailboxListSummary {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

body.theme-light.role-employee #mailboxListSummary {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(19, 38, 66, 0.08);
}

.role-employee #mailboxList {
  gap: 14px;
}

.role-employee #mailboxList > li,
.role-employee #mailboxMessageList > li {
  padding: 0;
  background: transparent !important;
  border: none !important;
}

.role-employee .mailboxBtn .richCard,
.role-employee .messageBtn {
  padding: 14px;
  border-radius: 18px;
}

body.theme-dark.role-employee .mailboxBtn .richCard,
body.theme-dark.role-employee .messageBtn {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-light.role-employee .mailboxBtn .richCard,
body.theme-light.role-employee .messageBtn {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(19, 38, 66, 0.08);
}

.role-employee .mailboxBtn.active,
.role-employee .messageBtn.active {
  box-shadow: 0 14px 30px rgba(0, 255, 170, 0.08);
}

.role-employee .mailboxBtn.active .richCard,
.role-employee .messageBtn.active {
  box-shadow: inset 0 0 0 1px rgba(0, 255, 170, 0.18), 0 0 0 1px rgba(0, 194, 255, 0.1);
}

.role-employee #mailboxMessageList {
  gap: 10px;
}

.role-employee #mailboxPreview {
  margin-top: 16px;
  min-height: 180px;
}

.role-employee #inboxList,
.role-employee #activityList {
  gap: 14px;
}

.role-employee .topHeader {
  margin-bottom: 16px;
}

.muted {
  opacity: 0.82;
}

.cardTitle,
.cardMeta,
.cardStats,
.detailPreview,
.previewBody,
.detailChip,
.listSummaryBar,
.miniMetricCard,
.infoCardValue,
.timelineTitle,
.timelineText,
.navBtn {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 1280px) {
  .authWrap,
  .dashboardHero,
  .sectionGrid,
  .sectionSingle,
  .compactWorkGrid {
    grid-template-columns: 1fr;
  }

  .role-employee #mailboxSection {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .appShell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    padding: 14px;
  }

  .stickyCard {
    position: static;
    top: auto;
  }

  .heroStatGrid,
  .dashboardRow,
  .toolbarGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebarNav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .navBtn {
    text-align: center;
    padding: 11px 12px;
  }

  .content {
    padding: 16px 16px 108px;
  }

  .sidebarFooter {
    display: none;
  }

  .mobileFooterBar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
    border-radius: 18px;
    backdrop-filter: blur(14px);
  }

  body.theme-dark .mobileFooterBar {
    background: rgba(8, 15, 24, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
  }

  body.theme-light .mobileFooterBar {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(18, 46, 78, 0.08);
    box-shadow: 0 18px 36px rgba(18, 46, 78, 0.12);
  }

  .mobileFooterBar .ghostBtn,
  .mobileFooterBar .logoutBtnModern {
    min-height: 48px;
  }
}

@media (max-width: 760px) {
  .authWrap {
    gap: 18px;
  }

  .sidebar {
    gap: 14px;
  }

  .sidebarBrand {
    padding: 12px;
  }

  .miniMetricGrid,
  .workflowStats,
  .heroStatGrid,
  .dashboardRow {
    grid-template-columns: 1fr;
  }

  .topHeader {
    flex-direction: column;
  }

  .previewHead {
    flex-direction: column;
  }

  .richCardHead {
    flex-direction: column;
  }

  .sidebarNav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .actionRow {
    display: grid;
    grid-template-columns: 1fr;
  }

  .toolbarPills {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .role-employee #mailboxSection .sectionHead {
    align-items: flex-start;
  }

  .actionRow > * {
    width: 100%;
  }

  .listPaginationBar,
  .paginationActions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cardList > li,
  .compactCardList > li {
    padding: 12px;
  }

  .previewBody {
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .authShell {
    padding: 14px;
  }

  .authHero,
  .authCard,
  .topHeader,
  .dashboardHero,
  .mainCard,
  .sideCard {
    padding: 14px;
    border-radius: 22px;
  }

  .sidebarNav {
    grid-template-columns: 1fr;
  }

  .mobileFooterBar {
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .toolbarGrid {
    grid-template-columns: 1fr;
  }

  .toolbarPills {
    grid-template-columns: 1fr;
  }

  .role-employee #mailboxListSummary {
    padding: 10px 12px;
  }

  .heroStatItem,
  .miniMetricCard,
  .infoCard,
  .statTile {
    padding: 12px 14px;
  }

  .dashboardHeroIntro h4,
  .topHeader h2,
  .authHeader h2 {
    font-size: 22px;
  }

  .authHero h1 {
    font-size: 30px;
  }

  .brandLogo {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .cardChip,
  .detailChip,
  .filterChip,
  .miniBadge,
  .statusBadge {
    justify-content: flex-start;
  }

  .detailPreview {
    min-height: 120px;
    padding: 12px 14px;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 12px 12px 104px;
  }

  .sidebar {
    padding: 12px;
  }

  .topHeader,
  .dashboardHero,
  .mainCard,
  .sideCard,
  .authHero,
  .authCard {
    padding: 12px;
  }

  .heroStatGrid,
  .miniMetricGrid,
  .workflowStats,
  .dashboardRow,
  .toolbarGrid {
    grid-template-columns: 1fr;
  }

  .heroBadge,
  .authMiniBadge,
  .miniBadge,
  .statusBadge {
    min-height: 32px;
    padding: 7px 11px;
    font-size: 11px;
  }

  .mobileFooterBar {
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    padding: 8px;
    gap: 8px;
  }
}
