.entry-status { position: fixed; right: 24px; bottom: 24px; width: min(440px, calc(100vw - 32px)); max-height: 65vh; overflow: auto; z-index: 1100; display: grid; gap: 10px; }
.entry-status-item { background: #fff; border: 1px solid #e6d4d0; border-radius: 14px; padding: 18px; box-shadow: 0 10px 35px #35140f24; }
.entry-status-copy { display: flex; gap: 12px; align-items: flex-start; color: #4f302b; }
.entry-status-copy strong { font-size: 16px; }
.entry-status-copy p { font-size: 14px; line-height: 1.65; margin: 7px 0 0; color: #77625e; }
.entry-status-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.entry-status-actions .btn { padding: 7px 12px; font-size: 13px; }
.entry-spinner { width: 18px; height: 18px; border: 2px solid #ecd9d5; border-top-color: #8c3027; border-radius: 50%; flex-shrink: 0; margin-top: 3px; animation: entry-spin .85s linear infinite; }
@keyframes entry-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .entry-spinner { animation: none; } }
@media (max-width: 600px) { .entry-status { right: 16px; bottom: 16px; } }

:root {
  --bg: #faf8f7;
  --panel: #ffffff;
  --ink: #211b1b;
  --muted: #716563;
  --line: #e4dad6;
  --brand: #d92f35;
  --brand-dark: #8f1f25;
  --brand-soft: #fff0f0;
  --sidebar-width: 308px;
  --sidebar-bg: #741617;
  --blue: #2f6fed;
  --green: #157f5b;
  --red: #c62930;
  --amber: #9a6500;
  --violet: #6751b8;
  --shadow: 0 16px 38px rgba(96, 35, 32, 0.1);
}

.drawer.account-drawer { width: min(760px, 100vw); }
.identity-preview, .identity-notice { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--brand-soft); line-height: 1.65; }
.identity-notice { margin: 12px 0; }
.identity-preview p { margin: 10px 0 0; overflow-wrap: anywhere; }
.identity-difference { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.identity-difference p { margin: 8px 0 0; overflow-wrap: anywhere; }
.identity-mappings summary { cursor: pointer; font-weight: 600; }
.identity-mappings fieldset, .identity-role-choices fieldset { border: 1px solid var(--line); padding: 12px; margin: 12px 0; border-radius: 8px; min-width: 0; }
.identity-saving { display: flex; gap: 12px; align-items: center; }
.identity-role-choices label { margin-right: 14px; }
.drawer .checkbox-grid label, .identity-role-choices label, .identity-mappings .checkbox-grid label {
  white-space: nowrap; flex: 0 0 auto; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 7px;
}
.drawer input[type="checkbox"], .identity-mappings input[type="checkbox"] {
  width: 18px; height: 18px; flex: 0 0 18px; margin: 0;
}
.drawer label:has(input[type="checkbox"]:checked), .identity-mappings label:has(input[type="checkbox"]:checked) {
  color: var(--brand-dark); background: var(--brand-soft); border-color: var(--brand);
}
.identity-account-table { min-width: 830px; }
@media (max-width: 600px) { .identity-difference { align-items: flex-start; flex-direction: column; } }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

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

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    linear-gradient(90deg, #b00918 0, #b00918 20px, transparent 20px),
    linear-gradient(180deg, #fffefe 0%, #f8f6f5 100%),
    var(--bg);
}

.boot-panel {
  width: min(560px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(62, 28, 24, 0.14);
  padding: 46px;
}

.boot-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 16px;
}

.auth-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 122px 6vw 54px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 46%, rgba(255, 255, 255, 0.98) 100%),
    repeating-linear-gradient(25deg, rgba(207, 39, 45, 0.055) 0 1px, transparent 1px 86px),
    repeating-linear-gradient(150deg, rgba(86, 99, 127, 0.052) 0 1px, transparent 1px 112px),
    #f8fafc;
}

.auth-screen::before,
.auth-screen::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.auth-screen::before {
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(217, 47, 53, 0.1) 12.1%, transparent 12.35%),
    linear-gradient(0deg, transparent 0 68%, rgba(217, 47, 53, 0.08) 68.1%, transparent 68.35%),
    linear-gradient(120deg, transparent 0 62%, rgba(71, 85, 105, 0.08) 62.1%, transparent 62.32%);
  opacity: 0.38;
}

.auth-screen::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background:
    linear-gradient(8deg, rgba(219, 52, 58, 0.08), transparent 62%),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.92));
}

.auth-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  min-height: 94px;
  display: flex;
  align-items: center;
  padding: 20px 6vw;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.82);
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(12px);
}

.auth-topbar-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.auth-topbar-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.auth-topbar-brand strong {
  color: #111827;
  font-size: 24px;
  line-height: 1.2;
}

.auth-hero-layout {
  position: relative;
  z-index: 1;
  width: min(1500px, 100%);
  min-width: 0;
  min-height: calc(100vh - 176px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(390px, 500px);
  align-items: center;
  gap: clamp(44px, 7vw, 132px);
}

.auth-hero-copy {
  min-width: 0;
  padding: 32px 0;
}

.auth-hero-kicker {
  margin: 0 0 18px;
  color: rgba(217, 47, 53, 0.72);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-hero-copy h1 {
  max-width: 720px;
  color: #1f2937;
  font-size: 66px;
  line-height: 1.05;
  font-weight: 900;
}

.auth-hero-copy h1 span {
  color: var(--brand);
}

.auth-hero-copy > p:not(.auth-hero-kicker) {
  margin: 26px 0 0;
  color: #6b7280;
  font-size: 28px;
  line-height: 1.35;
  font-weight: 600;
}

.auth-hero-stage {
  position: relative;
  width: min(520px, 82%);
  aspect-ratio: 1.42;
  margin-top: 58px;
}

.auth-stage-ring {
  position: absolute;
  left: 50%;
  bottom: 15%;
  border: 1px solid rgba(217, 47, 53, 0.2);
  border-radius: 50%;
  transform: translateX(-50%) rotateX(68deg);
}

.auth-stage-ring-one {
  width: 88%;
  height: 42%;
  box-shadow: 0 22px 42px rgba(217, 47, 53, 0.08);
}

.auth-stage-ring-two {
  width: 62%;
  height: 30%;
  bottom: 22%;
  border-color: rgba(217, 47, 53, 0.34);
}

.auth-stage-platform {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 54%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.94), rgba(255, 243, 244, 0.68) 55%, rgba(217, 47, 53, 0.16) 76%, transparent 77%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(217, 47, 53, 0.08));
  border: 1px solid rgba(217, 47, 53, 0.18);
  box-shadow:
    0 28px 62px rgba(217, 47, 53, 0.16),
    inset 0 0 0 18px rgba(255, 255, 255, 0.48);
  transform: translateX(-50%);
}

.auth-stage-platform img {
  width: 62%;
  height: 62%;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 12px 20px rgba(217, 47, 53, 0.2));
}

.auth-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 54px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.11);
  backdrop-filter: blur(14px);
}

.auth-card-heading {
  margin-bottom: 26px;
}

.auth-card-heading-centered {
  text-align: center;
}

.auth-card-heading h2 {
  color: #111827;
  font-size: 32px;
  line-height: 1.2;
}

.auth-card-note,
.auth-card-footnote {
  margin: 0;
  color: #8a93a3;
  text-align: center;
  font-size: 15px;
}

.auth-card-note {
  margin: -8px 0 24px;
  text-align: left;
}

.auth-form {
  gap: 22px;
  min-width: 0;
}

.auth-form .form-error {
  margin: 0;
}

.auth-form .form-row,
.auth-form .btn {
  min-width: 0;
}

.auth-form label {
  color: #202938;
  font-size: 16px;
  font-weight: 800;
}

.auth-field-shell {
  width: 100%;
  max-width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-field-shell:focus-within {
  border-color: rgba(217, 47, 53, 0.62);
  box-shadow: 0 0 0 4px rgba(217, 47, 53, 0.1);
}

.auth-field-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 100%;
  color: #9aa3af;
}

.auth-field-icon svg,
.password-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-field-shell input {
  min-width: 0;
  height: 56px;
  border: 0;
  background: transparent;
  padding: 0 15px 0 0;
  color: #111827;
  font-size: 16px;
}

.auth-field-shell input:focus {
  outline: 0;
}

.auth-brand,
.portal-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand-login {
  gap: 22px;
  margin-bottom: 34px;
}

.auth-brand img,
.portal-brand img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.auth-brand-login img {
  width: 84px;
  height: 84px;
}

.auth-brand-login h1 {
  margin: 0 0 12px;
  font-size: 31px;
  line-height: 1.18;
}

.auth-version {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border: 1px solid #f2d6d6;
  border-radius: 999px;
  color: var(--brand);
  background: #fff5f5;
  font-size: 13px;
  font-weight: 700;
}

.form-error {
  margin: -4px 0 4px;
  padding: 12px 14px;
  border: 1px solid #f1b9b9;
  border-radius: 8px;
  color: #a8161d;
  background: #fff4f4;
  font-size: 14px;
  line-height: 1.5;
}

.password-field {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 46px;
  align-items: stretch;
}

.password-field input {
  min-width: 0;
}

.password-toggle {
  width: 46px;
  height: 56px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #9aa3af;
  background: transparent;
}

.password-toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.remember-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: #606b7a;
  font-size: 15px;
  font-weight: 600;
}

.remember-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.auth-submit {
  width: 100%;
  min-height: 58px;
  border-radius: 8px;
  background: linear-gradient(180deg, #d74743, #c83431);
  box-shadow: 0 10px 18px rgba(200, 52, 49, 0.16);
  font-size: 20px;
}

.eyebrow {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 10px;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 16px;
}

p {
  line-height: 1.65;
}

.muted {
  color: var(--muted);
}

.app-layout {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  overflow: auto;
  background: var(--sidebar-bg);
  color: #fff7f6;
  padding: 34px 28px 28px;
  box-shadow: 18px 0 34px rgba(58, 8, 10, 0.16);
}

.brand {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.brand-mark {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
}

.brand span {
  display: block;
  margin-top: 8px;
  color: #f5c8c6;
  font-size: 16px;
}

.nav {
  display: grid;
  gap: 22px;
  margin-top: 26px;
}

.nav-group {
  display: grid;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.nav-group:last-child {
  border-bottom: 0;
}

.nav-group p {
  margin: 0 0 8px;
  color: rgba(255, 238, 236, 0.62);
  font-size: 15px;
  font-weight: 700;
}

.nav button {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 8px;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 242, 240, 0.8);
  text-align: left;
  font-size: 18px;
  font-weight: 700;
}

.nav button::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
}

.nav-icon {
  display: grid;
  place-items: center;
}

.nav button.active,
.nav button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav button.active {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.nav button.active::after {
  opacity: 1;
}

.nav svg,
.page-symbol svg,
.env-pill svg,
.portal-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.content {
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: 0 54px 46px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 154px;
  margin: 0 -54px 58px;
  padding: 34px 54px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(228, 218, 214, 0.7);
  backdrop-filter: blur(10px);
}

.topbar h1,
.topbar h2 {
  color: var(--ink);
}

.page-heading {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
  flex: 1;
}

.page-symbol {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  color: #b9aaa7;
}

.page-heading h1 {
  font-size: 34px;
  line-height: 1.2;
}

.page-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.env-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 44px;
  padding: 13px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #4f3f3d;
  background: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.env-pill svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
}

.env-pill.warning {
  border-color: #f0c36b;
  color: #835900;
  background: #fff8e6;
}

.portal-section {
  max-width: 2360px;
  margin: 0 auto;
}

.portal-section-title {
  display: flex;
  align-items: baseline;
  gap: 28px;
  margin-bottom: 34px;
}

.portal-section-title-with-actions {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.portal-section-heading {
  display: flex;
  align-items: baseline;
  gap: 28px;
  min-width: 0;
}

.portal-section-title h2 {
  font-size: 32px;
}

.portal-section-title span {
  color: #8f8583;
  font-size: 20px;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 26px;
  align-items: stretch;
}

.portal-card {
  --tone: var(--brand);
  --tone-soft: #fff2f2;
  --tone-border: #f4dddd;
  min-height: 304px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 32px rgba(103, 59, 55, 0.06);
  display: flex;
  flex-direction: column;
  padding: 38px 38px 34px;
}

.portal-card.disabled {
  opacity: 0.72;
}

.portal-card.navy {
  --tone: #16396b;
  --tone-soft: #eef4ff;
  --tone-border: #dce8fb;
}

.portal-card.indigo {
  --tone: #4b5da8;
  --tone-soft: #f0f2ff;
  --tone-border: #dfe4ff;
}

.portal-card.amber,
.portal-card.gold {
  --tone: #b27614;
  --tone-soft: #fff6e6;
  --tone-border: #f5e5c5;
}

.portal-card.green {
  --tone: #17745b;
  --tone-soft: #eaf7f2;
  --tone-border: #d3eee4;
}

.portal-card.red {
  --tone: #c3383e;
  --tone-soft: #fff0f1;
  --tone-border: #f2d8da;
}

.portal-card.violet {
  --tone: #59637f;
  --tone-soft: #f0f3f8;
  --tone-border: #dce1eb;
}

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

.portal-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid var(--tone-border);
  background: var(--tone-soft);
  color: var(--tone);
  padding: 15px;
}

.portal-status {
  border-radius: 999px;
  background: #fff3f3;
  color: var(--brand-dark);
  font-size: 15px;
  font-weight: 800;
  padding: 8px 16px;
  white-space: nowrap;
}

.portal-card.disabled .portal-status {
  color: var(--red);
  background: #fae9e8;
}

.portal-card-body {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
}

.portal-card-body h3 {
  font-size: 24px;
  line-height: 1.35;
}

.portal-subtitle {
  min-height: 0;
  margin: 14px 0 0;
  color: #6d6260;
  font-weight: 700;
  line-height: 1.55;
}

.portal-description {
  margin: 12px 0 0;
  color: #8a807d;
  line-height: 1.55;
}

.portal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.portal-tag {
  min-height: 34px;
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #716563;
  font-weight: 700;
}

.portal-tag:hover:not(:disabled) {
  border-color: var(--tone-border);
  color: var(--tone);
  background: var(--tone-soft);
}

.portal-tag:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.portal-divider {
  width: 100%;
  height: 1px;
  margin: auto 0 22px;
  background: var(--line);
}

.portal-action {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 40px;
  padding: 0;
  color: var(--tone);
  background: transparent;
  font-size: 18px;
  font-weight: 800;
}

.portal-action span {
  font-size: 24px;
  line-height: 1;
}

.portal-action:disabled {
  color: #a8a09e;
  cursor: not-allowed;
}

.shared-disk-panel {
  margin-bottom: 34px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 30px rgba(103, 59, 55, 0.06);
}

.shared-disk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.shared-disk-title {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.shared-disk-title .portal-icon {
  --tone: var(--brand);
  --tone-soft: var(--brand-soft);
  --tone-border: #f3d9d9;
}

.shared-disk-title h2 {
  font-size: 24px;
}

.shared-disk-title .eyebrow {
  margin-bottom: 4px;
}

.shared-disk-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.shared-disk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 20px;
}

.shared-disk-grid h3 {
  margin-bottom: 10px;
  color: #3a3030;
}

.shared-disk-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.shared-disk-row.compact {
  min-height: 52px;
}

.shared-disk-row strong,
.shared-disk-row span {
  display: block;
}

.shared-disk-row div span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.shared-disk-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf1f7;
  color: #536078;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.shared-disk-badge.normal,
.shared-disk-badge.idle {
  background: #e7f6ef;
  color: var(--green);
}

.shared-disk-badge.slow,
.shared-disk-badge.noncanonical,
.shared-disk-badge.duplicate,
.shared-disk-badge.unmounted,
.shared-disk-badge.not_integrated,
.shared-disk-badge.busy {
  background: #fff4df;
  color: var(--amber);
}

.shared-disk-badge.stale,
.shared-disk-badge.error,
.shared-disk-badge.wrong_identity,
.shared-disk-badge.unreachable {
  background: #fae9e8;
  color: var(--red);
}

.shared-disk-blockers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.shared-disk-blockers span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff4df;
  color: var(--amber);
  font-size: 13px;
  font-weight: 700;
}

.shared-disk-auto-wake {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #dce8f7;
  border-radius: 12px;
  background: #f7fbff;
}

.shared-disk-auto-wake > div:first-child {
  min-width: 0;
}

.shared-disk-auto-wake strong,
.shared-disk-auto-wake span,
.shared-disk-auto-wake small {
  display: block;
}

.shared-disk-auto-wake > div:first-child > span,
.shared-disk-auto-wake small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.shared-disk-auto-wake-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  min-width: min(100%, 360px);
  font-size: 12px;
  color: var(--muted);
}

.shared-disk-auto-wake-metrics .shared-disk-badge {
  justify-self: start;
}

.feishu-alert-panel {
  align-items: flex-start;
}

.feishu-alert-panel > div:first-child {
  flex: 1 1 360px;
}

.feishu-alert-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px 14px;
  min-width: min(100%, 540px);
}

.feishu-alert-form .button-row {
  grid-column: 1 / -1;
}

.shared-disk-compact {
  margin-top: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.shared-disk-compact-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.shared-disk-compact-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.shared-disk-compact strong {
  white-space: nowrap;
}

.shared-disk-compact-message {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-status-table td,
.service-status-table th {
  vertical-align: top;
}

.service-status-table td:nth-child(4),
.service-status-table td:nth-child(7) {
  max-width: 320px;
  overflow-wrap: anywhere;
}

.ops-page {
  display: grid;
  gap: 16px;
}

.ops-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ops-head h3 {
  margin-bottom: 6px;
}

.icon-btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-btn-text svg {
  width: 17px;
  height: 17px;
}

.ops-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-ops {
  margin-top: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ops-metric {
  min-width: 0;
  min-height: 88px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(96, 35, 32, 0.045);
  text-align: left;
}

.ops-metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.ops-metric strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.ops-metric.good strong {
  color: var(--green);
}

.ops-metric.warn strong {
  color: var(--amber);
}

.ops-metric.action {
  cursor: pointer;
}

.ops-metric.action:hover {
  border-color: rgba(217, 47, 53, 0.28);
  box-shadow: 0 12px 28px rgba(96, 35, 32, 0.08);
}

.gateway-probe-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.gateway-probe {
  min-width: 0;
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.gateway-probe strong {
  display: block;
  margin-bottom: 10px;
}

.gateway-upload-panel {
  margin-top: 16px;
}

.ops-metrics.compact {
  margin-top: 14px;
}

.gateway-policy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.gateway-policy-grid > div {
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.gateway-policy-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.gateway-policy-grid p {
  margin: 0;
  line-height: 1.7;
}

.gateway-policy-grid ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.ops-table td,
.ops-table th,
.gateway-table td,
.gateway-table th {
  vertical-align: top;
}

.ops-table td:nth-child(3),
.ops-table td:nth-child(5),
.gateway-table td {
  overflow-wrap: anywhere;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 0 0 auto;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(96, 35, 32, 0.05);
}

.panel {
  padding: 20px;
}

.card {
  padding: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title.tight {
  margin-bottom: 10px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}

.status.active,
.status.ready {
  background: #e7f6ef;
  color: var(--green);
}

.status.planned,
.status.pending {
  background: #fff4df;
  color: var(--amber);
}

.status.placeholder {
  background: #edf1f7;
  color: #536078;
}

.status.disabled,
.status.error {
  background: #fae9e8;
  color: var(--red);
}

.status.integrating,
.status.warning {
  background: #fff4df;
  color: var(--amber);
}

.status.merged {
  background: #ece8f7;
  color: var(--violet);
}

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

.btn {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 6px;
  color: #fff;
  background: var(--brand);
  font-weight: 700;
}

.btn.secondary {
  color: var(--ink);
  background: #f1e8e6;
}

.btn.danger {
  background: var(--red);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.checkbox-grid label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  font-weight: 700;
}

.switch-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 142px;
  color: var(--ink);
  white-space: nowrap;
}

.switch-line input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.form-row {
  display: grid;
  gap: 7px;
}

.form-row.full {
  grid-column: 1 / -1;
}

label {
  color: #334157;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d8cbc7;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(217, 47, 53, 0.18);
  border-color: var(--brand);
}

textarea {
  resize: vertical;
  min-height: 72px;
}

.table-wrap {
  overflow: auto;
}

.people-table-wrap {
  max-height: calc(100vh - 360px);
  min-height: 360px;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 9px;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  color: #4b5970;
  font-size: 12px;
  text-transform: uppercase;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 280px;
}

.actions .btn {
  min-height: 34px;
  padding: 7px 10px;
}

.notice {
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  padding: 12px 14px;
  border-radius: 6px;
}

.warning {
  border-left-color: var(--amber);
  background: #fff7e8;
}

.code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  background: #f3ece9;
  border-radius: 5px;
  padding: 2px 6px;
}

.permission-list {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbf8f6;
}

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

.permission-editor-head h4,
.permission-group-head h4 {
  margin: 0;
  color: var(--ink);
}

.permission-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.permission-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.permission-group-head span {
  flex: 0 0 auto;
  min-width: 48px;
  text-align: center;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 12px;
  padding: 4px 8px;
}

.permission-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin-top: 10px;
}

.project-page {
  display: grid;
  gap: 16px;
}

.compact-panel {
  padding: 16px;
}

.compact-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  margin-top: 12px;
}

.compact-form textarea {
  min-height: 44px;
}

.compact-form .btn {
  align-self: end;
}

.project-workbench {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.project-list-panel {
  position: sticky;
  top: 104px;
  max-height: calc(100vh - 128px);
  overflow: auto;
}

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

.project-list-item {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.project-list-item:hover,
.project-list-item.active {
  border-color: rgba(217, 47, 53, 0.45);
  background: var(--brand-soft);
}

.project-list-item strong,
.project-list-item small {
  display: block;
}

.project-list-item small {
  margin-top: 4px;
  color: var(--muted);
}

.project-detail-panel {
  min-height: 520px;
}

.project-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.project-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 160px;
}

.project-tabs {
  display: flex;
  gap: 6px;
  margin: 14px 0;
  border-bottom: 1px solid var(--line);
}

.project-tab {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.project-tab.active,
.project-tab:hover {
  background: var(--brand);
  color: #fff;
}

.project-detail-body {
  min-height: 360px;
}

.project-actions {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.finance-binding-panel {
  display: grid;
  gap: 14px;
}

.binding-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.binding-status-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.binding-status-grid small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.empty-state {
  min-height: 420px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.empty-state.compact {
  min-height: 220px;
}

.member-toolbar {
  margin-bottom: 12px;
}

.project-source-panel {
  display: grid;
  gap: 16px;
}

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

.source-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf8f6;
}

.project-member-list {
  display: grid;
  gap: 12px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.project-member-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf8f6;
}

.project-member-row input[name="projectRoleName"],
.project-member-row select {
  width: 100%;
}

.check-line {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
}

.check-line.compact {
  align-items: center;
  min-height: 34px;
}

.management-page {
  display: grid;
  gap: 16px;
}

.management-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.filter-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 190px) minmax(150px, 190px);
  gap: 12px;
  align-items: center;
}

.data-table strong {
  display: inline-block;
  margin-right: 8px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(45, 22, 20, 0.2);
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 31;
  width: min(560px, calc(100vw - 28px));
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 38px rgba(67, 26, 24, 0.16);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-body {
  min-height: 0;
  overflow: auto;
  padding: 22px 26px 0;
}

.drawer-form {
  grid-template-columns: 1fr;
  min-height: 100%;
  padding-bottom: 96px;
}

.drawer-actions {
  position: sticky;
  bottom: 0;
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin: 12px -26px 0;
  padding: 16px 26px 22px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #f1e8e6;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.check-line input {
  width: auto;
  margin-top: 3px;
}

.permission-item {
  min-height: 54px;
  border-radius: 6px;
  padding: 8px;
}

.permission-item:hover {
  background: #fff5f5;
}

.permission-item strong {
  display: block;
  color: var(--ink);
  line-height: 1.35;
}

.permission-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: 420px;
  border-radius: 8px;
  padding: 14px 16px;
  background: #152033;
  color: #fff;
  box-shadow: var(--shadow);
}

@media (min-width: 1680px) {
  .portal-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  :root {
    --sidebar-width: 280px;
  }

  .auth-screen {
    padding-left: 4vw;
    padding-right: 4vw;
  }

  .auth-topbar {
    padding-left: 4vw;
    padding-right: 4vw;
  }

  .auth-hero-layout {
    grid-template-columns: minmax(360px, 1fr) minmax(360px, 470px);
    gap: 44px;
  }

  .auth-hero-copy h1 {
    font-size: 56px;
  }

  .auth-hero-copy > p:not(.auth-hero-kicker) {
    font-size: 24px;
  }

  .auth-card {
    padding: 44px;
  }

  .sidebar {
    padding: 28px 22px;
  }

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

  .brand-mark {
    width: 62px;
    height: 62px;
  }

  .brand strong {
    font-size: 20px;
  }

  .content {
    padding: 0 34px 36px;
  }

  .topbar {
    margin: 0 -34px 42px;
    padding: 28px 34px;
  }
}

@media (max-width: 960px) {
  :root {
    --sidebar-width: 0px;
  }

  .auth-screen {
    min-height: 100vh;
    padding: 112px 18px 26px;
  }

  .auth-topbar {
    min-height: 84px;
    padding: 16px 18px;
  }

  .auth-topbar-brand {
    gap: 12px;
  }

  .auth-topbar-brand img {
    width: 48px;
    height: 48px;
  }

  .auth-topbar-brand strong {
    font-size: 18px;
  }

  .auth-topbar .auth-version {
    height: 24px;
    padding: 0 9px;
    font-size: 12px;
  }

  .auth-hero-layout {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .auth-hero-copy {
    order: 2;
    display: grid;
    justify-items: center;
    padding: 0 0 6px;
    text-align: center;
  }

  .auth-hero-copy h1 {
    font-size: 34px;
  }

  .auth-hero-copy > p:not(.auth-hero-kicker) {
    margin-top: 12px;
    font-size: 18px;
  }

  .auth-hero-stage {
    width: min(320px, 78vw);
    margin-top: 18px;
  }

  .auth-card {
    order: 1;
    min-height: 0;
    padding: 30px 22px;
  }

  .auth-card-heading h2 {
    font-size: 26px;
  }

  .auth-form {
    gap: 18px;
  }

  .auth-field-shell,
  .auth-submit {
    min-height: 54px;
  }

  .auth-field-shell input,
  .password-toggle {
    height: 52px;
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    padding: 22px 18px;
    box-shadow: none;
  }

  .brand {
    grid-template-columns: 56px minmax(0, 1fr);
    padding-bottom: 20px;
  }

  .brand-mark {
    width: 56px;
    height: 56px;
  }

  .brand strong {
    font-size: 18px;
  }

  .brand span {
    font-size: 13px;
  }

  .nav {
    gap: 14px;
  }

  .nav button {
    min-height: 46px;
    font-size: 16px;
  }

  .grid.cols-2,
  .grid.cols-3,
  .form-grid,
  .permission-items,
  .compact-form,
  .project-workbench,
  .ops-metrics,
  .dashboard-ops,
  .gateway-probe-grid,
  .gateway-policy-grid {
    grid-template-columns: 1fr;
  }

  .content {
    margin-left: 0;
    padding: 0 18px 22px;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    margin: 0 -18px 18px;
    padding: 20px 18px;
  }

  .page-heading {
    flex-wrap: wrap;
    gap: 14px;
  }

  .page-symbol {
    width: 42px;
    height: 42px;
  }

  .page-heading h1 {
    font-size: 26px;
  }

  .page-heading p {
    font-size: 15px;
  }

  .env-pill {
    margin-left: 0;
  }

  .portal-section-title {
    margin-bottom: 20px;
  }

  .portal-section-title-with-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-section-heading {
    gap: 14px;
  }

  .portal-section-title h2 {
    font-size: 24px;
  }

  .portal-section-title span {
    font-size: 16px;
  }

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

  .portal-card {
    min-height: 0;
    padding: 24px;
  }

  .portal-card-body h3 {
    font-size: 21px;
  }

  .shared-disk-panel {
    padding: 20px;
  }

  .shared-disk-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .shared-disk-actions {
    width: 100%;
    justify-content: stretch;
  }

  .shared-disk-compact {
    align-items: stretch;
    flex-direction: column;
    min-width: 0;
  }

  .shared-disk-compact-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .shared-disk-compact-actions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .shared-disk-compact-actions .btn {
    flex: 1 1 150px;
  }

  .shared-disk-compact-message {
    white-space: normal;
  }

  .shared-disk-actions .btn {
    flex: 1 1 160px;
  }

  .shared-disk-grid {
    grid-template-columns: 1fr;
  }

  .shared-disk-auto-wake {
    align-items: flex-start;
    flex-direction: column;
  }

  .shared-disk-auto-wake-metrics {
    width: 100%;
  }

  .feishu-alert-form {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .feishu-alert-form .button-row {
    grid-column: auto;
  }

  .ops-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ops-metric {
    min-height: 76px;
  }

  .project-list-panel {
    position: static;
    max-height: none;
  }

  .project-detail-head {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .auth-screen {
    padding: 96px 12px 18px;
  }

  .auth-topbar {
    min-height: 76px;
    padding: 14px 12px;
  }

  .auth-topbar-brand strong {
    font-size: 16px;
  }

  .auth-hero-kicker {
    display: none;
  }

  .auth-hero-copy h1 {
    font-size: 30px;
  }

  .auth-hero-layout {
    width: min(100%, calc(100vw - 24px));
  }

  .auth-card {
    justify-self: center;
    width: min(100%, 360px);
    padding: 26px 18px;
  }

  .auth-form label {
    font-size: 15px;
  }

  .auth-field-shell {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .password-field {
    grid-template-columns: 40px minmax(0, 1fr) 44px;
  }

  .auth-field-icon {
    width: 40px;
  }

  .auth-submit {
    font-size: 18px;
  }
}

/* LC11.4 audit and immutable project identity */
.project-id-panel {padding:16px; margin:12px 0; border:1px solid var(--line, #dde3ea); border-radius:12px;}
.project-id-panel input {flex:1; min-width:180px; font-family:monospace;}
.audit-filter-grid {display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; margin:16px 0; align-items:end;}
.audit-filter-grid label {display:grid; gap:6px;}
.audit-json {white-space:pre-wrap; overflow-wrap:anywhere; max-width:640px; font-size:12px;}
.risk-card {padding:16px; margin:12px 0; border:1px solid #e2b86b; border-radius:12px;}
.security-recipient {display:block; margin:12px 0;}

.project-id-panel textarea {flex:1; min-width:180px; width:100%; font-family:monospace; overflow-wrap:anywhere; resize:vertical;}
.audit-table {max-height:540px; overflow:auto;}
.audit-time {min-width:145px;}
.audit-policy {margin:12px 0;}
.audit-policy summary {cursor:pointer; color:#59616b;}

/* Recovery receipts keep host, completion time and actionable failures readable. */
.material-recovery-panel { align-items: flex-start; flex-wrap: wrap; }
.material-recovery-panel .shared-disk-compact-main { flex: 1 1 420px; flex-wrap: wrap; }
.material-recovery-panel .shared-disk-compact-message { flex-basis: 100%; white-space: normal; overflow-wrap: anywhere; }
.material-recovery-panel .shared-disk-compact-main small { flex-basis: 100%; overflow-wrap: anywhere; }
.material-recovery-panel .shared-disk-compact-actions { flex-wrap: wrap; max-width: 100%; }
