:root {
  --bg: #eef3f8;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-soft: rgba(255, 255, 255, 0.66);
  --line: rgba(11, 66, 110, 0.10);
  --line-strong: rgba(11, 66, 110, 0.24);
  --text: #13202f;
  --muted: #617487;
  --accent: #f06a2a;
  --accent-strong: #d75417;
  --primary: #0b426e;
  --primary-strong: #0a314f;
  --focus-ring: rgba(240, 106, 42, 0.22);
  --focus-line: rgba(240, 106, 42, 0.52);
  --hover-line: rgba(11, 66, 110, 0.22);
  --hover-surface: rgba(255, 255, 255, 0.94);
  --nav-text: #f5f5f7;
  --header-bg: #f5f5f7;
  --header-text: #13202f;
  --footer-bg: #0a314f;
  --footer-text: rgba(255, 255, 255, 0.82);
  --danger: #b42318;
  --danger-soft: #fff1f1;
  --shadow: 0 28px 80px rgba(10, 49, 79, 0.12);
  --radius: 28px;
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 22%),
    radial-gradient(circle at top right, rgba(11, 66, 110, 0.10), transparent 26%),
    linear-gradient(180deg, #fbfbfc 0%, var(--bg) 100%);
  color: var(--text);
}

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

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px 1fr;
}

.settings-focus-shell {
  min-height: 100vh;
}

.main-settings-only {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 24px;
}

.masthead-settings-only {
  margin-top: 8px;
}

.sidebar {
  padding: 28px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(11, 15, 25, 0.98) 0%, rgba(21, 27, 39, 0.96) 100%);
  backdrop-filter: blur(24px);
  color: var(--nav-text);
}

.brand {
  margin-bottom: 28px;
}

.brand h1 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.brand p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.8rem;
}

.brand-mark {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-weight: 600;
  font-size: 1.18rem;
}

.brand-mark-lower {
  color: #f5f5f7;
}

.brand-mark-upper {
  color: rgba(255, 255, 255, 0.58);
  letter-spacing: 0.03em;
}

.nav-group {
  display: grid;
  gap: 8px;
}

.nav-button {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 11px 13px;
  background: transparent;
  color: var(--nav-text);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
  font-size: 0.92rem;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-button.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.10);
  transform: translateX(2px);
}

.main {
  padding: 18px 22px 24px;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  padding: 26px 28px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(240, 106, 42, 0.18), transparent 28%),
    radial-gradient(circle at top left, rgba(11, 66, 110, 0.12), transparent 36%),
    linear-gradient(135deg, var(--primary-strong) 0%, var(--header-bg) 56%, color-mix(in srgb, var(--header-bg) 78%, white 22%) 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--header-text);
  box-shadow: 0 28px 80px rgba(10, 49, 79, 0.26);
}

.masthead-brand {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.masthead-logo-wrap {
  flex: 0 0 auto;
}

.masthead-logo-badge {
  width: 138px;
  height: 138px;
  display: grid;
  place-items: center;
  border-radius: 36px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.20) 0%, rgba(255, 255, 255, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 20px 44px rgba(4, 18, 32, 0.28);
  animation: mastheadHeartbeat 2.8s ease-in-out infinite;
}

.masthead-copy h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3.4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 600;
  color: var(--header-text);
}

.masthead-copy p {
  margin: 10px 0 0;
  opacity: 1;
  color: color-mix(in srgb, var(--header-text) 78%, transparent 22%);
  font-size: 0.98rem;
  max-width: 38rem;
}

.masthead-eyebrow {
  min-height: 1rem;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: color-mix(in srgb, var(--header-text) 62%, transparent 38%);
}

.masthead-logo {
  width: 108px;
  height: 108px;
  object-fit: contain;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.32);
  padding: 12px;
  filter: drop-shadow(0 16px 24px rgba(4, 18, 32, 0.16));
}

@keyframes mastheadHeartbeat {
  0%,
  48%,
  100% {
    transform: scale(1);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      0 20px 44px rgba(4, 18, 32, 0.28);
  }
  53% {
    transform: scale(1.05);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      0 26px 52px rgba(4, 18, 32, 0.32);
  }
  58% {
    transform: scale(0.99);
  }
  64% {
    transform: scale(1.04);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      0 28px 56px rgba(4, 18, 32, 0.34);
  }
}

.masthead-signature {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: color-mix(in srgb, var(--header-text) 86%, transparent 14%);
}

.brand-signature-mark {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.brand-signature-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.20);
}

.brand-signature-text {
  font-size: 0.82rem;
}

.masthead-aside {
  flex: 0 0 auto;
}

.masthead-aside-card {
  min-width: 190px;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: color-mix(in srgb, var(--header-text) 82%, transparent 18%);
}

.masthead-aside-card strong {
  color: var(--header-text);
  font-size: 1rem;
}

.masthead-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.masthead-user-actions .btn {
  min-height: 36px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--header-text);
  border-color: rgba(255, 255, 255, 0.14);
}

.masthead-user-actions .btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.masthead-user-actions .btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.masthead-user-meta {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.masthead-user-meta div {
  display: grid;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.masthead-user-meta span {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--header-text) 56%, transparent 44%);
}

.masthead-user-meta strong {
  font-size: 0.92rem;
  color: var(--header-text);
}

.masthead-aside-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--header-text) 56%, transparent 44%);
}

.panel {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(24px);
}

.module-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 18px 0;
  justify-content: center;
}

.module-bar-sticky {
  position: sticky;
  top: 12px;
  z-index: 6;
  margin-bottom: 16px;
  padding: 8px 10px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 249, 252, 0.88) 100%);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(10, 49, 79, 0.10);
  backdrop-filter: blur(20px);
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
  justify-content: center;
  animation: moduleBarReveal 280ms ease-out;
}

.module-bar-sticky::-webkit-scrollbar {
  display: none;
}

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

.module-overview {
  display: grid;
  gap: 18px;
}

.module-overview-head h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.module-tile {
  min-height: 180px;
  padding: 22px;
  border: 1px solid rgba(11, 66, 110, 0.10);
  border-radius: 24px;
  text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 249, 253, 0.90) 100%);
  box-shadow: 0 18px 40px rgba(10, 49, 79, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.module-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 66, 110, 0.18);
  box-shadow: 0 24px 46px rgba(10, 49, 79, 0.12);
}

.module-tile-label {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 10px;
}

.module-tile-description {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 22rem;
}

.module-tile-meta {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(11, 66, 110, 0.08);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 600;
  width: fit-content;
}

.module-tile-footer {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.module-tile-blue {
  background:
    radial-gradient(circle at top right, rgba(11, 66, 110, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(244, 249, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.module-tile-orange {
  background:
    radial-gradient(circle at top right, rgba(240, 106, 42, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 248, 242, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.module-tile-teal {
  background:
    radial-gradient(circle at top right, rgba(13, 148, 136, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(242, 252, 250, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.module-tile-gold {
  background:
    radial-gradient(circle at top right, rgba(217, 119, 6, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 251, 235, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.module-tile-slate {
  background:
    radial-gradient(circle at top right, rgba(71, 85, 105, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.module-tile-rose {
  background:
    radial-gradient(circle at top right, rgba(225, 29, 72, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 241, 242, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.module-tile-indigo {
  background:
    radial-gradient(circle at top right, rgba(79, 70, 229, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(238, 242, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.module-pill {
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  position: relative;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.module-pill:hover {
  border-color: rgba(11, 66, 110, 0.08);
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary);
  transform: translateY(-1px);
}

.module-pill.active {
  background: linear-gradient(180deg, rgba(240, 106, 42, 0.16) 0%, rgba(255, 255, 255, 0.94) 100%);
  border-color: rgba(240, 106, 42, 0.24);
  color: var(--accent-strong);
  box-shadow:
    0 10px 24px rgba(240, 106, 42, 0.12),
    inset 0 -2px 0 var(--accent);
}

.module-pill.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(240, 106, 42, 0.92) 0%, rgba(11, 66, 110, 0.62) 100%);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  animation: sectionFadeSlide 240ms ease-out;
}

.topbar h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.subtle {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.content {
  padding: 0 20px 22px;
  animation: pageFadeSlide 280ms ease-out;
}

.settings-nav {
  position: sticky;
  top: 12px;
  z-index: 5;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid rgba(11, 66, 110, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(11, 66, 110, 0.10) 0%, rgba(255, 255, 255, 0.90) 100%);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

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

.settings-nav-label {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-nav-current {
  margin-top: 4px;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.settings-nav-copy {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.settings-nav-copy strong {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.settings-select-wrap {
  position: relative;
}

.settings-select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(11, 66, 110, 0.18);
  border-radius: 14px;
  padding: 0 42px 0 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 246, 251, 0.96) 100%);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.settings-select:focus {
  outline: none;
  border-color: var(--focus-line);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.settings-select:hover {
  border-color: var(--hover-line);
}

.settings-select-wrap:focus-within::after {
  border-right-color: var(--accent-strong);
  border-bottom-color: var(--accent-strong);
}

.settings-select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(11, 66, 110, 0.78);
  border-bottom: 2px solid rgba(11, 66, 110, 0.78);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.settings-action-bar {
  position: sticky;
  bottom: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(11, 66, 110, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 248, 252, 0.94) 100%);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.settings-action-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-card {
  width: min(520px, 100%);
  padding: 34px;
  overflow: hidden;
  border-radius: 26px;
}

.login-card::before {
  content: "";
  display: block;
  height: 1px;
  margin: -34px -34px 24px;
  background: rgba(15, 23, 42, 0.08);
}

.login-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 10px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08);
  margin-bottom: 18px;
}

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

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

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

.field {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 16px;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.field label {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.01em;
  transition: color 160ms ease;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.wide-textarea:hover {
  border-color: var(--hover-line);
  background: var(--hover-surface);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.wide-textarea:focus {
  outline: none;
  border-color: var(--focus-line);
  box-shadow: 0 0 0 4px var(--focus-ring);
  background: rgba(255, 255, 255, 0.94);
}

.field:focus-within {
  background: linear-gradient(180deg, rgba(240, 106, 42, 0.08) 0%, rgba(255, 255, 255, 0.32) 100%);
  box-shadow: inset 0 0 0 1px rgba(240, 106, 42, 0.08);
}

.field:focus-within label {
  color: var(--accent-strong);
}

.wide-textarea,
.readonly-box {
  width: 100%;
  min-height: 140px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
}

.readonly-box {
  min-height: 44px;
  display: flex;
  align-items: center;
}

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

.btn {
  min-height: 40px;
  border-radius: 999px;
  padding: 0 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  font-weight: 500;
  font-size: 0.88rem;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--hover-line);
  background: rgba(255, 255, 255, 0.92);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.18);
}

.notice {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.94rem;
}

.notice.error {
  background: #fff3f2;
  color: var(--danger);
  border: 1px solid #f8d3cf;
}

.notice.success {
  background: #eefbf7;
  color: var(--accent-strong);
  border: 1px solid #ccefe7;
}

.roles-layout {
  display: grid;
  gap: 24px;
}

.role-picker-panel {
  border-color: rgba(240, 106, 42, 0.18);
  background:
    radial-gradient(circle at top right, rgba(240, 106, 42, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 249, 245, 0.96) 0%, rgba(255, 255, 255, 0.82) 100%);
}

.role-picker-panel h3 {
  color: var(--primary);
}

.role-select-wrap::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  background: linear-gradient(90deg, rgba(11, 66, 110, 0.10) 0%, rgba(240, 106, 42, 0.12) 100%);
  pointer-events: none;
}

.role-select {
  position: relative;
  z-index: 1;
  border-color: rgba(240, 106, 42, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 245, 239, 0.96) 100%);
}

.role-select:focus {
  border-color: rgba(240, 106, 42, 0.42);
  box-shadow: 0 0 0 4px rgba(240, 106, 42, 0.12);
}

.smtp-test-panel {
  border-color: rgba(11, 66, 110, 0.18);
  background:
    radial-gradient(circle at top right, rgba(11, 66, 110, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(243, 249, 255, 0.96) 0%, rgba(255, 255, 255, 0.84) 100%);
}

.requests-sidebar {
  display: grid;
  gap: 16px;
  align-content: start;
}

.request-list {
  display: grid;
  gap: 10px;
}

.requests-filter-panel {
  background:
    radial-gradient(circle at top right, rgba(11, 66, 110, 0.10), transparent 30%),
    linear-gradient(180deg, rgba(244, 249, 255, 0.98) 0%, rgba(255, 255, 255, 0.90) 100%);
}

.request-filter-row {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.request-filter-field {
  display: grid;
  gap: 6px;
}

.request-filter-field span {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.request-filter-field select,
.request-filter-field input {
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(11, 66, 110, 0.10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 252, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.request-filter-field select {
  font-weight: 600;
}

.request-filter-field input::placeholder {
  color: rgba(100, 116, 139, 0.76);
}

.request-filter-field select:hover,
.request-filter-field input:hover {
  border-color: rgba(11, 66, 110, 0.18);
  background: rgba(255, 255, 255, 0.98);
}

.request-filter-field select:focus,
.request-filter-field input:focus {
  border-color: rgba(240, 106, 42, 0.34);
  box-shadow: 0 0 0 4px rgba(240, 106, 42, 0.10);
}

.request-filter-row + .actions {
  margin-top: 10px;
}

.request-multi-select {
  min-height: 132px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(11, 66, 110, 0.10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 252, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.request-multi-select option {
  padding: 8px 10px;
}

.request-contact-preview {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(11, 66, 110, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.92) 0%, rgba(255, 255, 255, 0.88) 100%);
}

.request-contact-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.request-contact-preview-list {
  display: grid;
  gap: 10px;
}

.request-contact-preview-item {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(11, 66, 110, 0.08);
  background: rgba(255, 255, 255, 0.86);
  text-align: left;
}

.request-contact-preview-item.active {
  border-color: rgba(16, 185, 129, 0.22);
  background: linear-gradient(180deg, rgba(240, 253, 247, 0.95) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.request-contact-selectable {
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.request-contact-selectable:hover {
  border-color: rgba(11, 66, 110, 0.18);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.request-contact-preview-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.request-contact-preview-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.dashboard-shell {
  display: grid;
  gap: 14px;
}

.dashboard-focus,
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
}

.dashboard-focus-compact {
  grid-template-columns: 1fr;
}

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

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

.focus-card {
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 24px;
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 249, 252, 0.82) 100%);
  box-shadow: 0 18px 44px rgba(10, 49, 79, 0.08);
}

.focus-primary {
  background:
    radial-gradient(circle at top right, rgba(240, 106, 42, 0.16), transparent 32%),
    radial-gradient(circle at top left, rgba(11, 66, 110, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 249, 252, 0.9) 100%);
}

.focus-kicker {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.focus-card h3 {
  margin: 8px 0;
  font-size: 1.28rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.focus-card p {
  margin: 0;
  color: var(--muted);
  max-width: 44rem;
}

.metric-inline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(11, 66, 110, 0.08);
}

.metric-inline:last-child {
  border-bottom: 0;
}

.metric-inline strong {
  font-size: 1.9rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.dashboard-list-item {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(11, 66, 110, 0.10);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.7);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.dashboard-list-item:hover {
  transform: translateY(-1px);
  border-color: rgba(11, 66, 110, 0.18);
  box-shadow: 0 18px 36px rgba(10, 49, 79, 0.08);
}

.request-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 250, 253, 0.92) 100%);
  display: grid;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.request-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: rgba(11, 66, 110, 0.12);
}

.request-item:hover {
  border-color: rgba(11, 66, 110, 0.18);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 26px rgba(10, 49, 79, 0.08);
  transform: translateY(-1px);
}

.request-item.active {
  border-color: rgba(240, 106, 42, 0.24);
  box-shadow: 0 16px 36px rgba(11, 66, 110, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 248, 243, 0.98) 0%, rgba(255, 255, 255, 0.97) 100%);
}

.request-item.active::before {
  background: linear-gradient(180deg, rgba(240, 106, 42, 0.92) 0%, rgba(11, 66, 110, 0.72) 100%);
}

.request-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.request-item-top strong {
  font-size: 0.92rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.request-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 0.76rem;
}

.request-item-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: rgba(11, 66, 110, 0.24);
}

.request-item-note {
  color: var(--text);
  font-size: 0.81rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.request-item-meta-bottom {
  padding-top: 4px;
  border-top: 1px solid rgba(11, 66, 110, 0.06);
}

.accordion-trigger,
.table-row-trigger {
  cursor: pointer;
  padding-right: 76px;
}

.table-row-trigger::after {
  content: "Öffnen";
  position: absolute;
  right: 14px;
  top: 14px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(11, 66, 110, 0.42);
}

.table-row-trigger.active::after {
  color: rgba(240, 106, 42, 0.88);
}

.request-detail-hero {
  border-color: rgba(240, 106, 42, 0.16);
  background:
    radial-gradient(circle at top right, rgba(240, 106, 42, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 249, 244, 0.98) 0%, rgba(255, 255, 255, 0.94) 100%);
}

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

.request-hero-grid-compact .hero-stat strong {
  font-size: 0.88rem;
}

.hero-stat {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(240, 106, 42, 0.12);
}

.hero-stat span {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-stat strong {
  font-size: 0.96rem;
  line-height: 1.4;
}

.hero-stat-tone {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(15, 23, 42, 0.05);
  color: var(--muted);
}

.request-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -2px;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(11, 66, 110, 0.08);
  color: var(--text);
  font-size: 0.8rem;
}

.focus-inline-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.focus-inline-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.92);
}

.metric-grid-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.metric-card-compact {
  padding: 12px 14px;
  border-radius: 16px;
}

.metric-card-compact .metric-value {
  font-size: 1.1rem;
  margin-top: 4px;
}

.requests-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

.module-stack-shell {
  display: grid;
  gap: 18px;
}

.accordion-list {
  display: grid;
  gap: 8px;
}

.list-table-head {
  display: none;
}

.table-list {
  border: 1px solid rgba(11, 66, 110, 0.08);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.58);
}

.table-list .request-item {
  border: 0;
  border-bottom: 1px solid rgba(11, 66, 110, 0.08);
  border-radius: 0;
  box-shadow: none;
}

.table-list .request-item:last-child {
  border-bottom: 0;
}

.table-list .request-item:hover {
  transform: none;
  box-shadow: none;
}

.request-item-primary {
  min-width: 0;
}

.request-item-column {
  min-width: 0;
}

.request-item-supporting {
  opacity: 0.92;
}

.accordion-row {
  display: grid;
  gap: 10px;
}

.accordion-panel {
  display: grid;
  gap: 14px;
  padding: 0 4px 4px;
  animation: sectionFadeSlide 220ms ease-out;
}

.editor {
  display: grid;
  gap: 18px;
}

@media (min-width: 920px) {
  .list-table-head {
    display: grid;
    padding: 0 16px 6px;
    color: var(--muted);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .task-table-head,
  .calendar-table-head,
  .request-table-head {
    grid-template-columns: minmax(0, 1.7fr) minmax(190px, 0.9fr) minmax(220px, 1fr);
    column-gap: 16px;
  }

  .accordion-trigger,
  .table-row-trigger {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(190px, 0.9fr) minmax(220px, 1fr);
    grid-template-areas:
      "title meta note"
      "title bottom note";
    align-items: center;
    column-gap: 16px;
    row-gap: 6px;
  }

  .accordion-trigger .request-item-top,
  .table-row-trigger .request-item-top {
    grid-area: title;
    margin: 0;
    padding-right: 64px;
  }

  .accordion-trigger .request-item-meta,
  .table-row-trigger .request-item-meta {
    grid-area: meta;
  }

  .accordion-trigger .request-item-meta-bottom,
  .table-row-trigger .request-item-meta-bottom {
    grid-area: bottom;
    padding-top: 0;
    border-top: 0;
  }

  .accordion-trigger .request-item-note,
  .table-row-trigger .request-item-note {
    grid-area: note;
    min-height: 42px;
    display: flex;
    align-items: center;
    border-left: 1px solid rgba(11, 66, 110, 0.08);
    padding-left: 14px;
    -webkit-line-clamp: 3;
  }
}

.settings-layout {
  display: grid;
  gap: 16px;
}

.settings-summary-card {
  background:
    radial-gradient(circle at top right, rgba(11, 66, 110, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(246, 250, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 100%);
}

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

.institution-contact-add-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(11, 66, 110, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(248, 251, 255, 0.98) 0%, rgba(241, 247, 255, 0.92) 100%);
}

.institution-contact-list {
  padding-top: 4px;
  border-top: 1px solid rgba(11, 66, 110, 0.08);
}

.institution-contact-card {
  border-color: rgba(11, 66, 110, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 251, 255, 0.84) 100%);
}

.stack-list > .editor-section,
.stack-list > .editor-section.compact {
  margin: 0;
}

.editor-section {
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(18px);
}

.editor-section > .subtle:first-of-type {
  margin-top: -2px;
  margin-bottom: 12px;
}

.editor-section h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  letter-spacing: -0.02em;
  font-weight: 600;
}

@media (max-width: 900px) {
  .institution-contact-add-block {
    align-items: stretch;
    flex-direction: column;
  }
}

.section-block {
  padding-top: 14px;
}

.section-block-tight {
  padding: 14px 16px;
}

.section-lead {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(11, 66, 110, 0.08);
}

.section-lead h3 {
  margin: 0;
}

.section-lead p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.section-lead-eyebrow {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.editor-section.compact {
  padding: 14px 16px;
}

.editor-section.compact .field,
.editor-section.compact .actions {
  align-self: end;
}

.section-head,
.split-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head {
  margin-bottom: 12px;
}

.section-head > div:first-child {
  min-width: 0;
}

.section-head .actions {
  justify-content: flex-end;
}

.status-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.tone-danger {
  border-color: rgba(180, 35, 24, 0.18);
  background: #fff2f0;
  color: var(--danger);
}

.tone-warn {
  border-color: rgba(245, 158, 11, 0.18);
  background: #fff8eb;
  color: #b45309;
}

.tone-good {
  border-color: rgba(16, 185, 129, 0.16);
  background: #effcf6;
  color: #047857;
}

.tone-muted,
.tone-low {
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
}

.tone-medium {
  background: #fff8eb;
  color: #b45309;
}

.tone-high {
  background: #fff2f0;
  color: var(--danger);
}

.hero-strip {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(17, 24, 39, 0.06), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(248, 250, 252, 0.62) 100%);
  border: 1px solid rgba(255, 255, 255, 0.88);
  animation: sectionFadeSlide 260ms ease-out;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.segment {
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(11, 66, 110, 0.10);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-weight: 600;
}

.segment:hover {
  border-color: var(--hover-line);
  background: rgba(255, 255, 255, 0.92);
}

.segment.active {
  background: rgba(11, 66, 110, 0.10);
  border-color: rgba(11, 66, 110, 0.16);
  color: var(--primary);
}

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

.metric-card {
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(249, 250, 251, 0.72) 100%);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
}

.metric-label {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-value {
  margin-top: 4px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.btn-quiet {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.78rem;
  background: transparent;
  border-color: rgba(11, 66, 110, 0.10);
  color: var(--primary);
}

.btn-quiet:hover {
  background: rgba(11, 66, 110, 0.06);
}

.page-footer {
  margin-top: 14px;
  padding: 18px 20px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--footer-bg) 82%, black 18%) 0%, var(--footer-bg) 100%);
  color: var(--footer-text);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.page-footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-footer-brand strong {
  display: block;
  color: var(--footer-text);
  font-size: 0.95rem;
}

.page-footer-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(240, 106, 42, 0.22) 0%, rgba(240, 106, 42, 0.14) 100%);
  border: 1px solid rgba(240, 106, 42, 0.18);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-footer-copy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: color-mix(in srgb, var(--footer-text) 78%, transparent 22%);
}

.page-footer-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

@keyframes pageFadeSlide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sectionFadeSlide {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes moduleBarReveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-detail-grid {
  gap: 10px;
}

.user-detail-row {
  gap: 10px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: clamp(10px, 2.4vh, 24px);
  background: rgba(8, 20, 34, 0.42);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(520px, 100%);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 28px 80px rgba(10, 49, 79, 0.24);
}

.modal-card-wide {
  width: min(620px, calc(100vw - 24px));
  max-height: calc(100dvh - clamp(20px, 4.8vh, 48px));
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
  margin: auto 0;
  scrollbar-gutter: stable both-edges;
  overscroll-behavior: contain;
}

.modal-card .section-head {
  position: sticky;
  top: -14px;
  z-index: 3;
  margin-bottom: 8px;
  gap: 10px;
  padding: 10px 2px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.94) 100%);
  border-bottom: 1px solid rgba(11, 66, 110, 0.08);
  backdrop-filter: blur(10px);
}

.modal-card h3 {
  margin-bottom: 4px;
}

.modal-card .subtle {
  font-size: 0.82rem;
}

.modal-card .section-head .actions {
  gap: 8px;
}

.modal-card .editor-section {
  padding: 12px 13px;
  border-radius: 18px;
}

.modal-mode-hint {
  margin: 4px 0 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(11, 66, 110, 0.08);
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.95) 0%, rgba(255, 255, 255, 0.94) 100%);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.modal-mode-hint strong {
  color: var(--text);
}

.modal-mode-hint-locked {
  border-color: rgba(240, 106, 42, 0.16);
  background: linear-gradient(180deg, rgba(255, 248, 243, 0.95) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.modal-card .editor-section + .editor-section {
  margin-top: 10px;
}

.modal-card .section-block-tight {
  padding: 12px 13px;
}

.modal-card .section-lead {
  margin-bottom: 10px;
  padding-bottom: 8px;
}

.modal-card .section-lead p {
  font-size: 0.84rem;
  line-height: 1.35;
}

.modal-card .form-grid {
  gap: 10px 12px;
}

.modal-card .field label {
  margin-bottom: 5px;
  font-size: 0.79rem;
}

.modal-card .wide-textarea {
  min-height: 108px;
}

.modal-card .pill-row {
  gap: 8px;
}

.detail-value {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(247, 250, 253, 0.98) 0%, rgba(255, 255, 255, 0.96) 100%);
  border: 1px solid rgba(11, 66, 110, 0.08);
  color: var(--text);
  line-height: 1.45;
}

.detail-value-multiline {
  min-height: 84px;
  align-items: flex-start;
  white-space: pre-wrap;
}

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

.check-item,
.area-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.52);
}

.area-list {
  display: grid;
  gap: 8px;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 0.85rem;
}

.placeholder {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
}

.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.pill-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.56);
  color: var(--text);
  font-size: 0.84rem;
}

.pill-toggle.active {
  background: rgba(17, 24, 39, 0.08);
  border-color: rgba(17, 24, 39, 0.12);
}

.pill-toggle:hover,
.pill-toggle:focus-within {
  border-color: var(--hover-line);
  background: rgba(255, 255, 255, 0.88);
}

.pill-toggle.active:hover,
.pill-toggle.active:focus-within {
  border-color: var(--focus-line);
  background: rgba(240, 106, 42, 0.10);
}

.pill-toggle input[type="checkbox"] {
  margin: 0;
}

.area-row strong,
.check-item span,
.pill-toggle {
  min-width: 0;
}

.area-row strong,
.check-item span {
  font-size: 0.88rem;
  font-weight: 500;
}

.area-row .actions {
  gap: 8px;
}

.field input[type="checkbox"],
.check-item input[type="checkbox"],
.check-inline input[type="checkbox"],
.check-inline input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
}

.editor .form-grid,
.editor-section .form-grid {
  align-items: start;
}

.editor .form-grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editor .form-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editor-section .form-grid + .form-grid {
  margin-top: 10px;
}

.editor-section .stack-list {
  margin-top: 10px;
}

.editor-section .pill-row + .actions,
.editor-section .actions + .pill-row {
  margin-top: 10px;
}

.subtle + .pill-row,
.subtle + .area-list,
.subtle + .check-grid {
  margin-top: 10px;
}

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

.wide-textarea {
  min-height: 120px;
}

.readonly-box {
  font-size: 0.9rem;
}

.status-chip {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.placeholder {
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 0.9rem;
}

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

.color-field {
  min-width: 0;
}

.color-input-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px;
  align-items: center;
}

.color-input-row input[type="color"] {
  min-height: 40px;
  padding: 4px;
  border-radius: 12px;
}

.nav-button:focus-visible,
.module-tile:focus-visible,
.btn:focus-visible,
.dashboard-list-item:focus-visible,
.request-item:focus-visible,
.segment:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus-ring);
  border-color: var(--focus-line);
}

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

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .requests-shell {
    grid-template-columns: 1fr;
  }

  .three-col {
    grid-template-columns: 1fr 1fr;
  }

  .editor .form-grid.three-col {
    grid-template-columns: 1fr 1fr;
  }

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

  .dashboard-focus,
  .dashboard-grid,
  .dashboard-grid-tight,
  .request-hero-grid {
    grid-template-columns: 1fr;
  }

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

  .module-bar-sticky {
    top: 8px;
  }

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

  .masthead-aside {
    width: 100%;
  }

  .masthead-aside-card {
    min-width: 0;
  }

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

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

  .topbar,
  .content {
    padding: 18px;
  }

  .settings-nav {
    top: 8px;
    padding: 10px;
  }

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

  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }

  .home-menu {
    grid-template-columns: 1fr;
  }

  .module-bar {
    gap: 6px;
    justify-content: flex-start;
  }

  .module-bar-sticky {
    padding: 8px 10px;
  }

  .segmented-control {
    grid-template-columns: 1fr;
  }

  .editor .form-grid.two-col,
  .editor .form-grid.three-col {
    grid-template-columns: 1fr;
  }

  .section-head,
  .split-row {
    flex-direction: column;
    align-items: stretch;
  }

  .masthead-brand,
  .page-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .masthead-signature {
    width: 100%;
    border-radius: 18px;
    align-items: flex-start;
    padding: 12px 14px;
  }
}
