/* Malvón — Portal corporativo · sistema minimalista (redesign.md) */

@font-face {
  font-family: "MalvonWordmark";
  src: url("/brand-assets/Font%20Malvon/akaDora.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Raleway Fallback";
  src: local("Arial");
  size-adjust: 100%;
  ascent-override: 92%;
  descent-override: 22%;
  line-gap-override: 0%;
}

:root {
  --color-brand-red: #8e0800;
  --color-brand-taupe: #bfac98;
  --color-brand-black: #000000;
  --color-text: #f7f4f1;
  --color-text-soft: #bfac98;
  --color-muted: rgba(191, 172, 152, 0.68);
  --color-border: rgba(191, 172, 152, 0.12);
  --color-border-strong: rgba(191, 172, 152, 0.22);
  --color-accent: #8e0800;
  --color-accent-dark: #6a0600;
  --color-accent-soft: rgba(142, 8, 0, 0.14);
  --color-success: #34d399;
  --color-danger: #c41e1e;
  --color-login-error-text: #ffd0d0;
  --color-login-error-bg: rgba(196, 30, 30, 0.12);
  --font-sans: "Raleway", "Raleway Fallback", ui-sans-serif, system-ui, sans-serif;
  --header-h: 4.5rem;
  --radius-sm: 2px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  /* aliases for legacy vars */
  --bg-deep: #000000;
  --border: var(--color-border);
  --border-strong: var(--color-border-strong);
  --text: var(--color-text);
  --text-soft: var(--color-text-soft);
  --muted: var(--color-muted);
  --accent: var(--color-accent);
  --accent-2: var(--color-text-soft);
  --success: var(--color-success);
  --danger: var(--color-danger);
  --radius-lg: 2px;
}

* { box-sizing: border-box; }
*::selection { background: rgba(142, 8, 0, 0.45); color: #fff; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(142, 8, 0, 0.65) rgba(191, 172, 152, 0.08);
}

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--color-text);
  background: #000;
  overflow-x: hidden;
}

/* ===== App shell ===== */
.app-shell,
.app-page {
  width: min(1340px, 100%);
  margin: 0 auto;
  padding: calc(var(--header-h) + clamp(1.5rem, 4vw, 2.5rem)) clamp(1rem, 3vw, 2.5rem) clamp(2.5rem, 5vw, 3.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 4vw, 2.5rem);
}

/* ===== Header ===== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 0 clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--color-border);
  background: #000;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  color: inherit;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.brand-logo {
  display: block;
  height: 2.5rem;
  width: auto;
}

.brand-divider {
  width: 1px;
  height: 1.75rem;
  background: var(--color-border);
  flex-shrink: 0;
}

.brand-tagline {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
}

.brand-mark svg { width: 1rem; height: 1rem; }

.brand-name {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.brand-name em {
  font-style: normal;
  color: var(--color-muted);
  font-weight: 500;
  margin-left: 0.375rem;
}

.nav-pills {
  display: flex;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
  padding: 0.5rem 0.875rem;
  cursor: pointer;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.2s, background 0.2s;
}

.nav-pill + .nav-pill { border-left: 1px solid var(--color-border); }

.nav-pill:hover { color: var(--color-text); }

.nav-pill.active {
  color: var(--color-text);
  border-bottom: 2px solid var(--color-accent);
  margin-bottom: -1px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.25rem 0 1.5rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  border: 1px solid var(--color-border);
  background: transparent;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
}

.clock {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--color-text-soft);
  letter-spacing: 0.04em;
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--color-border);
  background: transparent;
}

@media (max-width: 880px) {
  .nav-pills { display: none; }
  .brand-tagline { display: none; }
  .brand-divider { display: none; }
}

/* ===== Hero ===== */
.hero {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  scroll-margin-top: calc(var(--header-h) + 1rem);
  animation: mvFadeUp 0.55s var(--ease-out) both;
}

.kicker,
.login-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  text-align: center;
  width: 100%;
}

.kicker-dot { display: none; }

.hero-wordmark-host {
  margin-bottom: 0.75rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero-wordmark {
  font-family: "MalvonWordmark", var(--font-sans);
  font-size: clamp(3rem, 10vw, 5rem);
  line-height: 0.95;
  margin: 0;
  padding: 0;
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.04em;
  display: inline-block;
  color: var(--color-text);
  background: none;
  -webkit-text-fill-color: currentColor;
  filter: none;
  animation: none;
  transition: opacity 0.2s;
}

.hero-wordmark::after { display: none; }

.hero-wordmark:hover { opacity: 0.85; transform: none; }

.hero h1,
.login-title {
  margin: 0 0 0.75rem;
  width: 100%;
  max-width: none;
  text-align: center;
  font-size: clamp(1.625rem, 5.5vw, 2.125rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.hero h1 .gradient-word {
  color: var(--color-text);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.hero p.subtitle,
.login-lead {
  margin: 0 auto;
  width: 100%;
  max-width: 52ch;
  text-align: center;
  color: var(--color-text-soft);
  font-size: clamp(0.9375rem, 2.8vw, 1rem);
  line-height: 1.6;
}

.hero-search {
  margin: 1.5rem 0 0;
  width: 100%;
  max-width: 100%;
  position: relative;
}

.hero-search svg {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--color-muted);
  pointer-events: none;
}

.hero-search input {
  width: 100%;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--color-text);
  padding: 0.75rem 2.5rem 0.75rem 2.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: rgba(191, 172, 152, 0.04);
  outline: none;
  transition: border-color 0.2s;
}

.hero-search input::placeholder { color: var(--color-muted); }

.hero-search input:focus {
  border-color: var(--color-accent);
  box-shadow: none;
}

.hero-search kbd {
  position: absolute;
  right: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: ui-monospace, monospace;
  font-size: 0.6875rem;
  color: var(--color-muted);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: transparent;
}

/* ===== Section head ===== */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
  scroll-margin-top: calc(var(--header-h) + 1rem);
  animation: mvFadeUp 0.55s var(--ease-out) both;
  animation-delay: 0.05s;
}

.section-head h2 {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.section-head .legend {
  font-size: 0.75rem;
  color: var(--color-muted);
  font-family: ui-monospace, monospace;
}

.section-head .legend strong {
  color: var(--color-text-soft);
  font-weight: 600;
}

/* ===== Department cards ===== */
.tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tab {
  --dept: var(--color-accent);
  position: relative;
  text-decoration: none;
  color: var(--color-text);
  padding: 1.25rem 1.25rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 11rem;
  background: #000;
  border: 0;
  border-top: 3px solid var(--dept);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  transition: border-color 0.2s, background 0.2s;
  animation: mvFadeUp 0.55s var(--ease-out) both;
}

.tab::before,
.tab::after { display: none; }

.tab:hover {
  transform: none;
  border-color: var(--color-border);
  border-top-color: var(--dept);
  background: rgba(191, 172, 152, 0.03);
  box-shadow: none;
}

.tab:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--color-accent);
}

.tab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tab .icon-wrap {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--dept);
  background: transparent;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.tab .icon-wrap svg { width: 1.125rem; height: 1.125rem; }
.tab:hover .icon-wrap { transform: none; border-color: var(--color-border-strong); }

.tab .badge {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: 0.125rem 0.375rem;
  border: 1px solid var(--color-border);
  background: transparent;
}

.tab .badge.pulse {
  color: var(--color-success);
  border-color: rgba(52, 211, 153, 0.35);
}

.tab .badge.soon {
  color: var(--color-text-soft);
  border-color: var(--color-border-strong);
}

.tab h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tab p {
  margin: 0;
  color: var(--color-text-soft);
  font-size: 0.8125rem;
  line-height: 1.5;
  flex: 1;
}

.tab .cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.25rem;
  color: var(--color-text);
  font-size: 0.8125rem;
  font-weight: 600;
}

.tab .cta .arrow {
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--color-border);
  transition: border-color 0.2s;
}

.tab .cta .arrow svg { width: 0.75rem; height: 0.75rem; color: var(--color-text-soft); }
.tab:hover .cta .arrow { transform: none; border-color: var(--color-border-strong); }

.tab.is-disabled { cursor: not-allowed; opacity: 0.55; }
.tab.is-hidden { display: none; }

/* ===== Footer ===== */
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.75rem;
  animation: mvFadeUp 0.55s var(--ease-out) both;
  animation-delay: 0.1s;
}

.app-footer a {
  color: var(--color-text-soft);
  text-decoration: none;
  transition: color 0.2s;
}

.app-footer a:hover { color: var(--color-text); }

.app-footer .foot-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-footer .foot-dot { color: var(--color-border-strong); }

/* ===== Buttons ===== */
.it-btn,
.btn {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  padding: 0.5625rem 0.875rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  text-decoration: none;
}

.it-btn:hover,
.btn:hover {
  border-color: var(--color-border-strong);
  color: var(--color-text);
  background: rgba(191, 172, 152, 0.04);
}

.it-btn:active,
.btn:active { transform: none; }

.it-btn.primary,
.btn.primary,
.btn-login-primary {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
}

.it-btn.primary:hover,
.btn.primary:hover,
.btn-login-primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
}

.btn-microsoft {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1.125rem;
  border-radius: var(--radius-sm);
  border: none;
  background: #fff;
  color: #000;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: none;
  transition: background 0.2s;
}

.btn-microsoft:hover { background: #f7f4f1; box-shadow: none; }
.btn-microsoft:active { transform: none; }
.btn-microsoft:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-microsoft.is-disabled { opacity: 0.55; pointer-events: none; }
.btn-microsoft svg { flex-shrink: 0; }

/* ===== Modals ===== */
.it-modal-backdrop,
#portal-access-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.88);
}

.it-modal-backdrop.show,
#portal-access-gate.pag-open { display: flex; }

body.portal-gate-open { overflow: hidden; }

.it-modal,
#portal-access-gate .pag-card,
.mv-modal {
  width: min(560px, 100%);
  background: #000;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: none;
  padding: 0;
  animation: mvFadeUp 0.55s var(--ease-out);
  overflow: hidden;
}

.mv-dept-bar,
#portal-access-gate .pag-dept-bar {
  height: 3px;
  background: var(--color-accent);
}

.it-modal h3,
#portal-access-gate .pag-title,
.mv-modal h3 {
  margin: 0 0 0.375rem;
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.it-modal > p,
#portal-access-gate .pag-sub {
  margin: 0 0 1.25rem;
  color: var(--color-text-soft);
  font-size: 0.9375rem;
  line-height: 1.6;
}

#portal-access-gate .pag-banner {
  padding: 1.75rem 1.5rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  background: #000;
}

#portal-access-gate .pag-banner .hero-wordmark {
  font-size: clamp(2.5rem, 10vw, 3.5rem);
  cursor: default;
  pointer-events: none;
}

#portal-access-gate .pag-body {
  padding: 1.5rem 1.5rem 1.75rem;
  text-align: left;
}

#portal-access-gate .pag-kicker {
  display: block;
  margin: 0 0 0.75rem;
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}

.it-error,
#portal-access-gate .pag-err,
.login-alert {
  color: var(--color-login-error-text);
  font-size: 0.8125rem;
  min-height: 0;
  margin: 0 0 1rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0;
  border: 0;
  border-left: 2px solid var(--color-accent);
  background: var(--color-login-error-bg);
  text-align: left;
  line-height: 1.45;
}

.it-error:empty,
#portal-access-gate .pag-err:not(.pag-show) { display: none; }

#portal-access-gate .pag-err.pag-show { display: block; }

.it-field { display: grid; gap: 0.375rem; margin-bottom: 0.875rem; }

.it-field label {
  font-size: 0.72rem;
  color: var(--color-text-soft);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.it-field input,
.it-select {
  font-family: inherit;
  font-size: 0.875rem;
  border: 1px solid var(--color-border);
  background: rgba(191, 172, 152, 0.04);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.75rem;
  outline: none;
  transition: border-color 0.2s;
}

.it-field input:focus,
.it-select:focus {
  border-color: var(--color-accent);
  box-shadow: none;
}

.it-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1.125rem;
  flex-wrap: wrap;
}

.it-actions.it-actions-single { justify-content: flex-start; margin-top: 1rem; }

.it-login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.125rem 0 1rem;
  color: var(--color-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.it-login-divider::before,
.it-login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.it-login-microsoft-hint {
  margin: 0.625rem 0 0;
  text-align: left;
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.it-modal { padding: 1.5rem 1.5rem 1.25rem; }

/* ===== IT Dashboard ===== */
.it-dashboard {
  position: fixed;
  inset: 0;
  color: var(--color-text);
  z-index: 2100;
  display: none;
  overflow: auto;
  padding: calc(var(--header-h) + 1rem) clamp(1rem, 3vw, 2rem) 2rem;
  background: #000;
}

.it-dashboard.show { display: block; }

.it-dashboard > div:first-of-type {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0.875rem 0;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#it-dashboard-heading {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.it-dashboard > p {
  max-width: 1340px;
  margin: 0.875rem auto 1.125rem !important;
  color: var(--color-muted) !important;
  font-size: 0.8125rem;
}

#it-dashboard-main,
#it-users-view,
#it-security-view {
  max-width: 1340px;
  margin: 0 auto;
}

.it-dashboard-toolbar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem 0;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
}

.it-dashboard-toolbar label {
  font-size: 0.6875rem !important;
  color: var(--color-muted) !important;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.it-dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 1rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #000;
}

.it-dashboard-tab {
  font-family: inherit;
  border: 0;
  border-right: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-muted);
  border-radius: 0;
  padding: 0.5625rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.it-dashboard-tab:last-child { border-right: 0; }

.it-dashboard-tab:hover { color: var(--color-text-soft); background: transparent; }

.it-dashboard-tab:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--color-accent);
}

.it-dashboard-tab.is-active {
  color: var(--color-text);
  border-bottom: 2px solid var(--color-accent);
  background: transparent;
  box-shadow: none;
}

.it-dashboard-tab-panel .it-list { max-height: min(62vh, 720px); }

.it-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 1.125rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

@media (max-width: 1100px) { .it-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .it-grid { grid-template-columns: 1fr; } }

.it-card {
  position: relative;
  background: #000;
  border: 0;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  padding: 1rem 1.125rem;
  overflow: hidden;
  transition: background 0.2s;
}

.it-card::after { display: none; }
.it-card:hover { transform: none; border-color: var(--color-border); background: rgba(191, 172, 152, 0.03); }

.it-card h4 {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  color: var(--color-muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.it-card strong {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--color-text);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.it-section {
  margin-bottom: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.it-section h3 {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}

.it-list {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: auto;
  background: #000;
}

.it-list table,
.it-access-table,
.it-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.it-list th,
.it-access-table th,
.it-users-table th {
  padding: 0.625rem 0.5rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #000;
  position: sticky;
  top: 0;
  z-index: 2;
}

.it-list td,
.it-access-table td,
.it-users-table td {
  padding: 0.625rem 0.5rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: middle;
}

.it-list tr:hover td,
.it-access-table tr:hover td,
.it-users-table tr:hover td {
  background: rgba(191, 172, 152, 0.03);
}

.it-chart-box {
  padding: 1rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.it-chart-title {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.it-otp-help,
.it-otp-empty {
  margin: 0 0 0.75rem;
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.it-menu-wrap { position: relative; }

.it-menu-btn {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  display: grid;
  place-items: center;
}

.it-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.375rem);
  min-width: 10rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #000;
  display: none;
  flex-direction: column;
  z-index: 10;
}

.it-menu-panel.is-open { display: flex; }

.it-menu-item {
  font-family: inherit;
  font-size: 0.8125rem;
  text-align: left;
  padding: 0.625rem 0.875rem;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.it-menu-item:last-child { border-bottom: 0; }
.it-menu-item:hover { background: rgba(191, 172, 152, 0.04); }

.it-access-expand-btn,
.mv-icon-btn {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.it-access-detail-panel {
  padding: 0.75rem;
  border-top: 1px solid var(--color-border);
  background: rgba(191, 172, 152, 0.02);
}

.it-access-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.it-access-detail-item dt {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 0.25rem;
}

.it-access-detail-item dd {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-soft);
  word-break: break-word;
}

.it-access-tag {
  display: inline-flex;
  padding: 0.125rem 0.375rem;
  border: 1px solid var(--color-border);
  font-size: 0.6875rem;
  color: var(--color-text-soft);
}

.it-access-tag.warn {
  border-color: rgba(196, 30, 30, 0.35);
  color: var(--color-login-error-text);
}

.it-access-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.it-users-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.875rem;
  margin-bottom: 0.875rem;
  align-items: end;
  padding: 1rem 0;
  border: 0;
  border-top: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
}

.it-users-submit-wrap label { visibility: hidden; }
.it-btn-small { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.it-session-banner.hidden { display: none !important; }
.hidden { display: none !important; }

.it-security-hero {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.25rem;
  margin-bottom: 1.125rem;
  padding: 1rem 0;
  border-top: 1px solid var(--color-border);
}

.it-security-score-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
}

.it-security-score-ring { width: 100%; height: 100%; transform: rotate(-90deg); }

.it-security-score-track,
.it-security-score-bar {
  fill: none;
  stroke-width: 10;
}

.it-security-score-track { stroke: var(--color-border); }

.it-security-score-bar {
  stroke: var(--color-accent);
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 0.8s ease;
}

.it-security-score-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
}

.it-security-score-value {
  font-size: 2.625rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.it-security-score-suffix {
  font-size: 0.75rem;
  color: var(--color-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.it-security-kicker {
  margin: 0 0 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}

.it-security-grade {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
}

.it-security-summary,
.it-security-updated {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.it-security-updated { margin-top: 0.625rem; font-size: 0.75rem; }

.it-security-signals { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.it-security-signal {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-soft);
  font-size: 0.75rem;
}

.it-security-signal strong { color: var(--color-text); font-weight: 600; }

.it-security-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.it-security-control {
  padding: 0.875rem;
  border: 0;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: #000;
  min-height: 9rem;
}

.it-security-control-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.625rem;
  margin-bottom: 0.5rem;
}

.it-security-control h4 {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text);
}

.it-security-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.375rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--color-border);
  white-space: nowrap;
}

.it-security-badge.is-ok {
  color: #b7f5d0;
  border-color: rgba(52, 211, 153, 0.35);
}

.it-security-badge.is-warn {
  color: var(--color-text-soft);
  border-color: var(--color-border-strong);
}

.it-security-badge.is-risk {
  color: var(--color-login-error-text);
  border-color: rgba(196, 30, 30, 0.35);
}

.it-security-control p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.it-security-control-detail {
  margin-top: 0.625rem !important;
  color: var(--color-text-soft) !important;
}

/* ===== Dept hub page ===== */
.dept-page {
  min-height: 100dvh;
  background: #000;
  color: var(--color-text);
  font-family: var(--font-sans);
}

.dept-page .dept-main {
  width: min(1340px, 100%);
  margin: 0 auto;
  padding: calc(var(--header-h) + clamp(1.5rem, 4vw, 2.5rem)) clamp(1rem, 3vw, 2.5rem) clamp(2.5rem, 5vw, 3.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 4vw, 2.5rem);
}

.dept-page .dept-hero {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  animation: mvFadeUp 0.55s var(--ease-out) both;
}

.dept-page .dept-hero h1 {
  margin: 0 0 0.75rem;
  width: 100%;
  text-align: center;
}

.dept-page .dept-hero .subtitle {
  margin: 0 auto;
  text-align: center;
}

.dept-page .dept-head {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 0;
  border-bottom: 0;
  margin-bottom: 0;
  animation: mvFadeUp 0.55s var(--ease-out) both;
}

.dept-page .dept-head h1 {
  margin: 0 0 0.75rem;
  width: 100%;
  text-align: center;
  font-size: clamp(1.625rem, 5.5vw, 2.125rem);
  font-weight: 700;
}

.dept-page .dept-head .lead {
  margin: 0 auto;
  max-width: 52ch;
  text-align: center;
  color: var(--color-text-soft);
  font-size: clamp(0.9375rem, 2.8vw, 1rem);
  line-height: 1.6;
}

.dept-page .section-head {
  margin-top: 0;
}

.dept-page #hub-apps.tabs {
  width: 100%;
}

.dept-page .dept-actions,
.dept-page .actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
}

.dept-page .dept-empty {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  border-top: 0;
  animation: mvFadeUp 0.55s var(--ease-out) both;
}

.dept-page .dept-empty h1 {
  margin: 0 0 0.75rem;
  width: 100%;
  text-align: center;
  font-size: clamp(1.625rem, 5.5vw, 2.125rem);
  font-weight: 700;
}

.dept-page .dept-empty .lead {
  margin: 0 auto;
  max-width: 52ch;
  text-align: center;
}

.dept-page .dept-empty .note {
  margin: 1rem auto 0;
  max-width: 52ch;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.dept-page .dept-footer {
  margin-top: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.75rem;
  text-align: center;
  width: 100%;
}

/* ===== Scrollbar (Malvon global) ===== */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(142, 8, 0, 0.65) rgba(191, 172, 152, 0.08);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: rgba(191, 172, 152, 0.08);
}

*::-webkit-scrollbar-thumb {
  background: rgba(142, 8, 0, 0.65);
  border-radius: 0;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(106, 6, 0, 0.85);
  border-radius: 0;
}

*::-webkit-scrollbar-corner {
  background: rgba(191, 172, 152, 0.08);
}

.malvon-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(142, 8, 0, 0.65) rgba(191, 172, 152, 0.08);
}

/* ===== Animations ===== */
@keyframes mvFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  .tab:hover { transform: none; }
}

@media (max-width: 760px) {
  .app-shell, .app-page { padding-left: 1rem; padding-right: 1rem; }
  .tab { min-height: 10rem; padding: 1rem; }
  .tab .icon-wrap { width: 2rem; height: 2rem; }
  .tab h2 { font-size: 1rem; }
  .tab p { font-size: 0.75rem; }
  .it-security-hero { grid-template-columns: 1fr; }
  .it-users-form-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .it-users-form-grid { grid-template-columns: 1fr 1fr; }
}
