:root {
  --brand-blue: #0f6ecf;
  --brand-red: #f04b4f;
  --brand-teal: #0f766e;
  --brand-gold: #d97706;
  --brand-green: #15803d;
  --navy: #0f172a;
  --sky: #dbeafe;
  --mist: #eff6ff;
  --ink: #1f2937;
  --muted: #6b7280;
  --bg: #f4f8fc;
  --card: #ffffff;
  --line: #d9e2ec;
  --ok: #1b7a45;
  --font-sans: "Segoe UI Variable", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-display: "Trebuchet MS", "Segoe UI", sans-serif;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 18px 40px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
}

.portal-bg {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 10% 10%, rgba(15, 110, 207, 0.18), transparent 35%),
    radial-gradient(circle at 95% 90%, rgba(240, 75, 79, 0.16), transparent 35%),
    linear-gradient(135deg, #f3f9ff 0%, #eef6ff 48%, #fff6f6 100%);
}

.portal-bg::before,
.portal-bg::after {
  content: '';
  position: fixed;
  inset: auto;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.7;
  z-index: 0;
}

body.portal-bg {
  display: grid;
  justify-items: center;
  align-content: start;
  padding: 24px 12px 32px;
}

.portal-bg::before {
  width: 360px;
  height: 360px;
  top: -90px;
  right: -70px;
  background: radial-gradient(circle, rgba(15, 110, 207, 0.28), rgba(15, 110, 207, 0.02) 70%);
  animation: bgDriftOne 14s ease-in-out infinite;
}

.portal-bg::after {
  width: 420px;
  height: 420px;
  left: -130px;
  bottom: -110px;
  background: radial-gradient(circle, rgba(240, 75, 79, 0.22), rgba(240, 75, 79, 0.02) 70%);
  animation: bgDriftTwo 18s ease-in-out infinite;
}

.auth-shell {
  width: min(680px, 100%);
  margin: 0 auto;
  padding: clamp(12px, 2vw, 28px) 18px 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
  align-content: start;
  justify-items: stretch;
  position: relative;
  z-index: 1;
}

.auth-panel,
.auth-aside {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.48));
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  padding: 24px;
  box-shadow:
    0 22px 56px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
}

.auth-panel {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.12);
  animation: authPanelEnter 700ms ease-out both, authPanelFloat 8s ease-in-out infinite 900ms;
}

.auth-panel::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-teal), var(--brand-red));
  background-size: 200% 100%;
  animation: authStripeFlow 5s linear infinite;
}

.auth-panel::after {
  content: '';
  position: absolute;
  inset: 10px 12px auto 12px;
  height: 72px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0));
  opacity: 0.8;
  pointer-events: none;
}

.auth-aside {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin-inline: auto;
  width: 100%;
  animation: authAsideEnter 900ms ease-out both, authAsideFloat 9s ease-in-out infinite 1s;
}

.auth-aside::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at top right, rgba(15, 110, 207, 0.10), transparent 35%);
}

.auth-hero,
.auth-highlights,
.auth-form,
.demo-box,
.auth-aside {
  width: 100%;
}

.auth-hero {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  justify-items: center;
  text-align: center;
}

.auth-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.auth-highlights article {
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0.40) 100%);
  padding: 12px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 16px 34px rgba(15, 23, 42, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  animation: highlightRise 900ms ease-out both, highlightPulse 5.5s ease-in-out infinite;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.auth-highlights article::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--brand-blue);
}

.auth-highlights article::after {
  content: '';
  position: absolute;
  inset: auto -18% -48% auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 110, 207, 0.12), transparent 70%);
  pointer-events: none;
}

.auth-highlights article.accent-blue {
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.8) 0%, #ffffff 72%);
}

.auth-highlights article.accent-blue::before {
  background: linear-gradient(180deg, var(--brand-blue), #68a8ff);
}

.auth-highlights article.accent-red {
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.82) 0%, #ffffff 72%);
}

.auth-highlights article.accent-red::before {
  background: linear-gradient(180deg, var(--brand-red), #f7a2a5);
}

.auth-highlights article.accent-gold {
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.84) 0%, #ffffff 72%);
}

.auth-highlights article.accent-gold::before {
  background: linear-gradient(180deg, var(--brand-gold), #f2c36d);
}

@keyframes authPanelEnter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes authAsideEnter {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authPanelFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

@keyframes authAsideFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(4px);
  }
}

@keyframes authStripeFlow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

@keyframes highlightRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes highlightPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-2px) scale(1.01);
  }
}

@keyframes cardGlow {
  0%,
  100% {
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  }

  50% {
    box-shadow: 0 16px 30px rgba(15, 110, 207, 0.12);
  }
}

.auth-motion-line {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.60);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}

.auth-motion-prefix {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-motion-text {
  min-width: 130px;
  display: inline-flex;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-blue);
  text-shadow: 0 0 18px rgba(15, 110, 207, 0.12);
  animation: authPulse 2.8s ease-in-out infinite, authTextSweep 6s linear infinite;
}

.auth-motion-text.is-teal {
  color: var(--brand-teal);
}

.auth-motion-text.is-red {
  color: var(--brand-red);
}

.auth-motion-text.is-gold {
  color: var(--brand-gold);
}

.auth-motion-text.is-green {
  color: var(--brand-green);
}

.auth-motion-text.is-blue {
  color: var(--brand-blue);
}

.brand-mark {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-blue);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

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

.auth-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-teal);
}

.auth-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-hero-pills span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.30));
  color: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 700;
}

.auth-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.auth-highlights article {
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  padding: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.auth-highlights article::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--brand-blue);
}

.auth-highlights article::after {
  content: '';
  position: absolute;
  inset: auto -18% -48% auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 110, 207, 0.12), transparent 70%);
  pointer-events: none;
}

.auth-highlights article.accent-blue {
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.8) 0%, #ffffff 72%);
}

.auth-highlights article.accent-blue::before {
  background: linear-gradient(180deg, var(--brand-blue), #68a8ff);
}

.auth-highlights article.accent-red {
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.82) 0%, #ffffff 72%);
}

.auth-highlights article.accent-red::before {
  background: linear-gradient(180deg, var(--brand-red), #f7a2a5);
}

.auth-highlights article.accent-gold {
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.84) 0%, #ffffff 72%);
}

.auth-highlights article.accent-gold::before {
  background: linear-gradient(180deg, var(--brand-gold), #f2c36d);
}

.auth-highlights strong,
.auth-aside-block h3 {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
}

.auth-highlights p,
.auth-aside-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

h1, h2, h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 0 0 16px;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form input,
.grid-form input,
.grid-form select,
.grid-form textarea {
  width: 100%;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

.password-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.password-toggle {
  border: 1px solid #c8d5e6;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fbff;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.auth-remember input {
  width: 16px;
  height: 16px;
}

.auth-form input:focus,
.grid-form input:focus,
.grid-form select:focus,
.grid-form textarea:focus {
  outline: 2px solid rgba(15, 110, 207, 0.25);
  border-color: var(--brand-blue);
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(90deg, var(--brand-blue), #2384e9);
  color: #fff;
}

.btn-ghost {
  background: #fff;
  border: 1px solid #c8d5e6;
}

.form-error {
  min-height: 18px;
  color: #b42318;
  font-size: 13px;
  margin: 0;
}

.form-success {
  min-height: 18px;
  color: var(--ok);
  font-size: 13px;
  margin: 0;
}

.meta-line {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

.text-success {
  color: var(--brand-green);
}

.text-danger {
  color: var(--brand-red);
}

.demo-box {
  margin-top: 16px;
  border-top: 1px dashed #d0dbe8;
  padding-top: 12px;
}

.auth-aside {
  display: grid;
  gap: 14px;
  align-self: center;
}

.auth-aside-block {
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.auth-aside-block:nth-child(1) {
  transform: translateY(-6px);
}

.auth-aside-block:nth-child(2) {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.9) 0%, #ffffff 100%);
}

.auth-aside-block:nth-child(3) {
  background: linear-gradient(180deg, rgba(255, 248, 235, 0.95) 0%, #ffffff 100%);
}

.auth-aside-block::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-teal));
}

.auth-aside-label {
  margin: 0 0 6px;
  color: var(--brand-blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.auth-status-card {
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.auth-status-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

.demo-box ul,
.auth-aside ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.portal-dashboard-bg {
  background:
    radial-gradient(circle at top left, rgba(15, 110, 207, 0.16), transparent 34%),
    radial-gradient(circle at bottom right, rgba(240, 75, 79, 0.12), transparent 32%),
    linear-gradient(180deg, #f6f9fd 0%, #edf4fb 100%);
  min-height: 100vh;
}

.portal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

body.sidebar-hidden .portal-layout {
  grid-template-columns: 0 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96)),
    linear-gradient(180deg, rgba(15, 110, 207, 0.24), rgba(240, 75, 79, 0.16));
  color: #fff;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 12px 0 28px rgba(15, 23, 42, 0.12);
}

body.sidebar-hidden .sidebar {
  width: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border-right: 0;
  box-shadow: none;
  pointer-events: none;
}

body.sidebar-hidden .content {
  width: 100%;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 14px;
}

.sidebar-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f6ecf, #f04b4f);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 20px rgba(15, 110, 207, 0.24);
}

.sidebar-brand-copy {
  display: grid;
  gap: 2px;
}

.sidebar-brand-copy strong {
  font-size: 17px;
  letter-spacing: 0.2px;
}

.sidebar-brand-copy small {
  color: rgba(226, 232, 240, 0.72);
  font-size: 12px;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.topbar-menu-btn {
  min-width: 42px;
  padding-inline: 12px;
  font-size: 20px;
  line-height: 1;
}

.nav-item {
  text-align: left;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.nav-item.is-active {
  background: linear-gradient(90deg, var(--brand-blue), #2384e9);
  color: #fff;
  box-shadow: 0 10px 18px rgba(15, 110, 207, 0.24);
}

.nav-item:hover,
.nav-item:focus-visible {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

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

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 251, 255, 0.98));
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.topbar::after {
  content: '';
  position: absolute;
  inset: auto -12% -48% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 110, 207, 0.12), transparent 68%);
  pointer-events: none;
}

.topbar-copy {
  display: grid;
  gap: 4px;
}

.topbar-eyebrow {
  margin: 0;
  color: var(--brand-blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.role-pill {
  display: inline-block;
  margin: 0;
  background: #dbeafe;
  color: #1e3a8a;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}

.topbar-meta {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.topbar-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #dbe2ea;
  background: #ffffff;
  color: var(--navy);
}

.topbar-chip--live {
  background: rgba(15, 118, 110, 0.10);
  border-color: rgba(15, 118, 110, 0.20);
  color: #0f766e;
}

.topbar-chip--role {
  background: rgba(15, 110, 207, 0.10);
  border-color: rgba(15, 110, 207, 0.18);
  color: #0f6ecf;
}

.panel {
  display: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.98)),
    var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.panel.is-visible {
  display: block;
}

#overview,
#companyHub,
#documents,
#announcements,
#helpdesk,
#workflow,
#executive,
#accounts {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.99)),
    linear-gradient(135deg, rgba(15, 110, 207, 0.04), rgba(240, 75, 79, 0.03));
}

#companyHub {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.99)),
    linear-gradient(135deg, rgba(15, 110, 207, 0.06), rgba(15, 118, 110, 0.05));
}

#documents {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.99)),
    linear-gradient(135deg, rgba(217, 119, 6, 0.07), rgba(15, 110, 207, 0.04));
}

#announcements {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.99)),
    linear-gradient(135deg, rgba(244, 75, 79, 0.06), rgba(15, 110, 207, 0.04));
}

#helpdesk {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.99)),
    linear-gradient(135deg, rgba(15, 118, 110, 0.07), rgba(15, 110, 207, 0.04));
}

#workflow {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.99)),
    linear-gradient(135deg, rgba(15, 110, 207, 0.07), rgba(217, 119, 6, 0.04));
}

#executive {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.99)),
    linear-gradient(135deg, rgba(15, 23, 42, 0.05), rgba(15, 110, 207, 0.04));
}

#accounts {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.99)),
    linear-gradient(135deg, rgba(15, 110, 207, 0.06), rgba(240, 75, 79, 0.04));
}

.is-hidden {
  display: none;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow-card);
}

.card p {
  font-size: 24px;
  margin: 6px 0 0;
  font-weight: 700;
  color: var(--navy);
}

.grid-form {
  display: grid;
  gap: 12px;
}

.company-hub-snapshot {
  margin-bottom: 16px;
}

.hub-summary-card {
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  position: relative;
  overflow: hidden;
}

.hub-summary-card::before,
.department-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-red));
}

.hub-summary-card h3,
.department-card-head h4,
.hub-article-head strong {
  color: var(--navy);
}

.hub-summary-card p {
  color: var(--navy);
}

.hub-summary-card--workflow::before { background: linear-gradient(180deg, #0f6ecf, #7cc3ff); }
.hub-summary-card--leave::before { background: linear-gradient(180deg, #0f766e, #2dd4bf); }
.hub-summary-card--tickets::before { background: linear-gradient(180deg, #f04b4f, #fb7185); }
.hub-summary-card--notifications::before { background: linear-gradient(180deg, #d97706, #fbbf24); }
.hub-summary-card--companyHub::before { background: linear-gradient(180deg, #15803d, #86efac); }

.hub-summary-card--workflow { background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 58%, #ffffff 100%); border-color: #93c5fd; }
.hub-summary-card--leave { background: linear-gradient(180deg, #ccfbf1 0%, #ecfeff 58%, #ffffff 100%); border-color: #5eead4; }
.hub-summary-card--tickets { background: linear-gradient(180deg, #ffe4e6 0%, #fff1f2 58%, #ffffff 100%); border-color: #fda4af; }
.hub-summary-card--notifications { background: linear-gradient(180deg, #fef3c7 0%, #fffbeb 58%, #ffffff 100%); border-color: #fcd34d; }
.hub-summary-card--companyHub { background: linear-gradient(180deg, #dcfce7 0%, #ecfdf5 58%, #ffffff 100%); border-color: #86efac; }

.hub-summary-card:hover,
.hub-summary-card:focus-visible {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  outline: none;
}

.company-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 18px;
}

.finance-summary {
  margin-bottom: 16px;
}

.finance-tools {
  margin-bottom: 18px;
}

.finance-receipt-preview {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.finance-receipt-preview img,
.finance-receipt-preview iframe {
  width: 100%;
  min-height: 180px;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  background: #fff;
}

.finance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.finance-grid .company-hub-panel {
  min-width: 0;
}

.finance-grid .grid-form {
  gap: 10px;
}

.finance-grid .grid-form label {
  font-size: 13px;
}

.finance-grid .grid-form input,
.finance-grid .grid-form select,
.finance-grid .grid-form textarea {
  width: 100%;
}

.finance-period-actions,
.finance-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.finance-inline-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.company-hub-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe2ea;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.company-hub-departments-panel {
  margin-bottom: 18px;
}

.department-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.department-card {
  border: 1px solid #dbe2ea;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  padding: 14px;
  display: grid;
  gap: 14px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  position: relative;
  padding-left: 18px;
}

.department-card.is-featured {
  border-color: #93c5fd;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.1);
}

.department-card--finance::before { background: linear-gradient(180deg, #d97706, #fbbf24); }
.department-card--hr::before { background: linear-gradient(180deg, #0f766e, #2dd4bf); }
.department-card--operations::before { background: linear-gradient(180deg, #0f6ecf, #60a5fa); }
.department-card--it::before { background: linear-gradient(180deg, #f04b4f, #fb7185); }
.department-card--projects::before { background: linear-gradient(180deg, #15803d, #4ade80); }
.department-card--management::before { background: linear-gradient(180deg, #334155, #94a3b8); }
.department-card--admin::before { background: linear-gradient(180deg, #0f6ecf, #f04b4f); }
.department-card--employee::before { background: linear-gradient(180deg, #0ea5e9, #14b8a6); }

.department-card--finance { background: linear-gradient(180deg, #fff3d6 0%, #fffaf0 52%, #ffffff 100%); border-color: #fcd34d; }
.department-card--hr { background: linear-gradient(180deg, #dffaf6 0%, #effdfb 52%, #ffffff 100%); border-color: #5eead4; }
.department-card--operations { background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 52%, #ffffff 100%); border-color: #93c5fd; }
.department-card--it { background: linear-gradient(180deg, #ffe4e6 0%, #fff1f2 52%, #ffffff 100%); border-color: #fda4af; }
.department-card--projects { background: linear-gradient(180deg, #dcfce7 0%, #f0fdf4 52%, #ffffff 100%); border-color: #86efac; }
.department-card--management { background: linear-gradient(180deg, #e2e8f0 0%, #f8fafc 52%, #ffffff 100%); border-color: #cbd5e1; }
.department-card--admin { background: linear-gradient(180deg, #e0e7ff 0%, #eef2ff 52%, #ffffff 100%); border-color: #a5b4fc; }
.department-card--employee { background: linear-gradient(180deg, #cffafe 0%, #ecfeff 52%, #ffffff 100%); border-color: #67e8f9; }

.department-card:hover,
.department-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  border-color: #93c5fd;
  outline: none;
}

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

.department-card-head h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.department-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.department-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
}

.department-metric {
  border-radius: 12px;
  padding: 10px;
  background: rgba(15, 110, 207, 0.08);
  border: 1px solid rgba(15, 110, 207, 0.14);
}

.department-metric strong {
  display: block;
  font-size: 18px;
  color: var(--brand-blue);
}

.department-metric span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.hub-action {
  border: 1px solid #cfd8e3;
  border-radius: 999px;
  padding: 8px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--navy);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.hub-action:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.hub-article-list {
  display: grid;
  gap: 14px;
}

.hub-article {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #dbe2ea;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.hub-article-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.hub-article p {
  margin: 0;
  color: var(--muted);
}

.hub-article details {
  margin-top: 10px;
}

.hub-article summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
}

.bullet-list {
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--slate-700);
  display: grid;
  gap: 8px;
}

.grid-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: #334155;
}

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

.portal-tools {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dbe2ea;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.portal-tools label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #334155;
}

.portal-tools input,
.portal-tools select {
  width: 100%;
  border: 1px solid #cfd8e3;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

.profile-modern {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: start;
}

.profile-avatar-block {
  border: 1px solid #dbe2ea;
  border-radius: var(--radius-md);
  padding: 10px;
  background: #f8fbff;
  display: grid;
  gap: 10px;
}

.avatar-preview {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #cfe2ff;
  background: #eaf2ff;
}

.announcement-preview {
  width: min(360px, 100%);
  border-radius: 10px;
  border: 1px solid #dbe2ea;
  object-fit: cover;
}

.table-wrap {
  margin-top: 14px;
  overflow: auto;
  border: 1px solid #dbe2ea;
  border-radius: var(--radius-md);
  background: #fff;
}

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

th, td {
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  padding: 10px;
}

.doc-list,
.ticket-list,
.admin-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.doc-list li,
.ticket-list li,
.admin-list li,
.notice {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px;
  background: #fff;
}

.doc-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.doc-list a {
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 600;
}

.doc-viewer {
  margin-top: 16px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 12px;
}

#docViewerFrame {
  width: 100%;
  min-height: 520px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
}

#docPinInput {
  max-width: 220px;
}

#docPinManager {
  margin-top: 16px;
  border: 1px dashed #bfdbfe;
  border-radius: 12px;
  padding: 12px;
  background: #f8fbff;
}

#securityViewPanel {
  margin-top: 18px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  padding: 12px;
  background: #fbfdff;
}

.status {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-pending-manager-approval,
.status-pending-hr-review,
.status-open,
.status-awaiting-user {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}

.status-approved,
.status-resolved,
.status-in-progress {
  background: #ecfdf3;
  color: #166534;
  border-color: #bbf7d0;
}

.status-rejected {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

#announcementForm {
  margin-bottom: 14px;
  border: 1px dashed #bfd6ef;
  border-radius: 12px;
  padding: 12px;
  background: #f8fbff;
}

.audit-action {
  font-weight: 700;
  color: #0f3d77;
}

.action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.notice-actions {
  margin-top: 10px;
}

.ticket-history {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  background: #f8fbff;
}

.record-history {
  margin-top: 12px;
}

.ticket-history summary {
  cursor: pointer;
  font-weight: 700;
  color: #0f3d77;
}

.ticket-detail-toggle {
  margin-top: 8px;
}

.ticket-detail-toggle summary {
  cursor: pointer;
  font-weight: 700;
  color: #0f3d77;
  font-size: 13px;
}

.ticket-detail-block {
  margin-top: 8px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: rgba(15, 118, 110, 0.06);
  border-radius: 10px;
  display: grid;
  gap: 6px;
}

.ticket-detail-block p {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.ticket-detail-block small {
  color: var(--muted);
}

.ticket-history-item {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.ticket-history-item p {
  margin: 6px 0 0;
}

.notification-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.notification-select {
  display: grid;
  justify-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  min-width: 64px;
}

.notification-copy p {
  margin: 6px 0;
}

.ticket-list li .action-group {
  margin-top: 10px;
}

.chat-message {
  display: grid;
  gap: 8px;
}

.chat-message.is-mine {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.chat-message.is-theirs {
  background: #fff;
}

.chat-message-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.chat-message p {
  margin: 0;
  white-space: pre-wrap;
}

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

.chat-attachment {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 700;
}

.doc-pin-modal-card {
  width: min(420px, 96vw);
}

.doc-sign-modal-card {
  width: min(860px, 96vw);
}

.leave-workflow-preview-wrap {
  margin-top: 8px;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
}

.draft-editor {
  min-height: 240px;
  border: 1px solid #cfd8e3;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  white-space: pre-wrap;
  line-height: 1.7;
  outline: none;
  font-family: inherit;
}

.draft-editor:focus {
  border-color: #0f6ecf;
  box-shadow: 0 0 0 3px rgba(15, 110, 207, 0.14);
}

#leaveWorkflowPreviewFrame {
  width: 100%;
  min-height: 420px;
  border: 0;
  background: #fff;
}

.btn-mini {
  font-size: 12px;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.btn-danger {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal.is-hidden {
  display: none;
}

.modal-card {
  width: min(620px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid #dbe2ea;
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.28);
  padding: 18px;
}

.modal-head {
  margin-bottom: 8px;
}

.operations-record-modal-card {
  width: min(880px, 96vw);
}

.operations-record-details {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.operations-record-details p {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.operations-record-notes-wrap {
  margin-top: 8px;
  margin-bottom: 6px;
}

@media (max-width: 980px) {
  body.portal-bg {
    padding: 12px 12px 28px;
  }

  .auth-shell {
    width: 100%;
    grid-template-columns: 1fr;
    align-content: start;
    padding: 0;
  }

  .auth-panel,
  .auth-aside {
    max-width: none;
    justify-self: stretch;
  }

  .auth-highlights {
    grid-template-columns: 1fr;
  }

  .auth-hero-pills {
    justify-content: center;
  }

  .portal-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
    max-height: none;
    overflow: visible;
    z-index: 20;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  body.sidebar-hidden .portal-layout {
    grid-template-columns: 1fr;
  }

  body.sidebar-hidden .sidebar {
    display: none;
  }

  .sidebar-brand {
    padding-bottom: 8px;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nav-item {
    font-size: 13px;
  }

  .logoutBtn,
  #logoutBtn {
    width: 100%;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

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

  .profile-modern {
    grid-template-columns: 1fr;
  }

  .password-field {
    grid-template-columns: 1fr;
  }

  .avatar-preview {
    width: 140px;
    height: 140px;
  }

  .portal-tools {
    grid-template-columns: 1fr;
  }

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

  .notification-row {
    grid-template-columns: 1fr;
  }

  .notification-select {
    justify-items: start;
  }
}

@keyframes authPulse {
  0%,
  100% {
    transform: translateY(0);
    filter: saturate(1);
  }

  50% {
    transform: translateY(-1px);
    filter: saturate(1.15);
  }
}

@keyframes authTextSweep {
  0% {
    letter-spacing: 0.02em;
    opacity: 0.88;
  }

  50% {
    letter-spacing: 0.08em;
    opacity: 1;
  }

  100% {
    letter-spacing: 0.02em;
    opacity: 0.88;
  }
}

@keyframes bgDriftOne {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(-18px, 18px, 0) scale(1.08);
  }
}

@keyframes bgDriftTwo {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(16px, -14px, 0) scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-motion-text,
  .portal-bg::before,
  .portal-bg::after,
  .auth-panel,
  .auth-aside,
  .auth-highlights article,
  .auth-aside-block,
  .auth-panel::before {
    animation: none;
  }
}

  @media (max-width: 980px) {
    .auth-panel,
    .auth-aside,
    .auth-highlights article,
    .auth-aside-block,
    .auth-motion-line,
    .auth-hero-pills span {
      backdrop-filter: blur(14px) saturate(150%);
      -webkit-backdrop-filter: blur(14px) saturate(150%);
    }
  }
