:root {
    --ink: #333333;
    --muted: #909399;
    --line: #e2e2e2;
    --paper: #f5f5f5;
    --white: #fff;
    --navy: #252525;
    --teal: #FB7224;
    --teal-light: #fff0e7;
    --lime: #FB7224;
    --danger: #F34D4D;
    --shadow: 0 24px 70px rgba(51, 51, 51, .09);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "DM Sans", sans-serif;
    min-height: 100vh;
}
button, input { font: inherit; }
.app-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar {
    background: var(--navy);
    color: var(--white);
    padding: 34px 30px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.sidebar::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 50%;
    left: -115px;
    bottom: 90px;
    box-shadow: 0 0 0 42px rgba(255,255,255,.025), 0 0 0 84px rgba(255,255,255,.018);
}
.brand { display: flex; align-items: center; gap: 12px; z-index: 1; }
.brand-mark {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: var(--lime); color: var(--navy);
}
.brand-mark svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.brand strong { font-family: Manrope, sans-serif; letter-spacing: .09em; font-size: 13px; display: block; }
.brand small { color: #b8b8b8; font-size: 11px; }
.sidebar-copy { margin-top: 128px; position: relative; z-index: 1; }
.eyebrow {
    color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase;
}
.sidebar .eyebrow { color: var(--lime); }
.sidebar h1 {
    font-family: Manrope, sans-serif; font-size: 43px; line-height: .96;
    letter-spacing: -.055em; margin: 13px 0 22px;
}
.sidebar-copy p { color: #b8b8b8; line-height: 1.65; font-size: 14px; max-width: 205px; }
.connection-state {
    z-index: 1; margin-top: auto; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.12);
    display: flex; gap: 12px; align-items: center;
}
.connection-state small { color: #b8b8b8; display: block; font-size: 11px; }
.connection-state strong { font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #a5b1b0; flex: 0 0 auto; }
.status-dot.online { background: var(--lime); box-shadow: 0 0 0 4px rgba(251,114,36,.16); }
.content { padding: 42px clamp(28px, 5vw, 76px) 70px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 42px; gap: 24px; }
.topbar h2 { font-family: Manrope, sans-serif; font-size: 31px; letter-spacing: -.045em; margin: 5px 0 0; }
.server-chip {
    max-width: 340px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 100px;
    background: rgba(255,255,255,.65); display: flex; align-items: center; gap: 9px;
    color: var(--muted); font-size: 12px;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-menu {
    display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 5px;
    border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
.user-avatar {
    width: 27px; height: 27px; border-radius: 4px; display: grid; place-items: center;
    background: var(--navy); color: #fff; font-size: 11px; font-weight: 700;
}
.user-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; }
.logout-button {
    border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted);
    padding: 4px 7px 4px 10px; font-size: 10px; cursor: pointer;
}
.logout-button:hover { color: var(--teal); }
.server-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs { display: flex; gap: 34px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.tab {
    color: #909399; text-decoration: none; padding: 0 2px 17px; font-weight: 600;
    display: flex; gap: 10px; position: relative;
}
.tab::after {
    content: ""; height: 3px; background: var(--teal); position: absolute;
    bottom: -1px; left: 0; right: 0; transform: scaleX(0); transition: transform .2s ease;
}
.tab.active { color: var(--ink); }
.tab.active::after { transform: scaleX(1); }
.tab-number { color: #b8b8b8; font-size: 10px; padding-top: 3px; }
.panel { background: var(--white); border: 1px solid #e6eceb; border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.panel-heading {
    padding: 32px 36px 27px; border-bottom: 1px solid #e7eceb;
    display: flex; align-items: flex-start; justify-content: space-between; gap: 22px;
}
.panel h3 { font-family: Manrope, sans-serif; font-size: 24px; letter-spacing: -.035em; margin: 6px 0 5px; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.security-badge, .saved-label {
    display: flex; align-items: center; gap: 7px; color: var(--teal); background: var(--teal-light);
    border-radius: 100px; padding: 8px 11px; font-size: 11px; font-weight: 700;
}
.security-badge svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.config-form { padding: 34px 36px 36px; }
.field + .field { margin-top: 27px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 9px; }
.label-row { display: flex; justify-content: space-between; align-items: center; }
.saved-label { padding: 5px 9px; margin-bottom: 7px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap input {
    width: 100%; border: 1px solid #ccd8d7; background: #fbfcfb; border-radius: 12px;
    color: var(--ink); padding: 14px 110px 14px 47px; outline: none; transition: .2s;
}
.input-wrap input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(251,114,36,.12); background: white; }
.input-icon { position: absolute; left: 15px; color: #909399; width: 19px; height: 19px; }
.input-icon svg { width: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; }
.field > small { display: block; color: #909399; margin-top: 8px; font-size: 11px; }
.reveal-button { position: absolute; right: 9px; border: 0; background: transparent; color: var(--teal); font-size: 11px; font-weight: 700; cursor: pointer; padding: 8px; }
.form-footer {
    margin-top: 36px; padding-top: 26px; border-top: 1px solid #e7eceb;
    display: flex; justify-content: space-between; gap: 20px; align-items: center;
}
.endpoint-preview span { color: #909399; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; display: block; margin-bottom: 4px; }
.endpoint-preview code { font-size: 11px; color: #606266; }
.button {
    border: 0; border-radius: 11px; text-decoration: none; padding: 13px 17px;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font-weight: 700; font-size: 12px; cursor: pointer;
}
.button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.button.primary { background: var(--teal); color: white; box-shadow: 0 8px 22px rgba(251,114,36,.25); }
.button.secondary { background: var(--teal-light); color: var(--teal); }
.messages { margin: -20px 0 24px; }
.message { padding: 12px 15px; border-radius: 10px; background: var(--teal-light); color: #b74708; font-size: 13px; }
.message.error { color: #88352e; background: #f8e6e3; }
.units-panel { min-height: 470px; }
.unit-summary { display: flex; align-items: baseline; gap: 8px; padding: 25px 36px 0; color: var(--muted); font-size: 12px; }
.unit-summary strong { font-family: Manrope, sans-serif; color: var(--ink); font-size: 25px; }
.units-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 16px; padding: 22px 36px 38px; }
.unit-card { border: 1px solid var(--line); border-radius: 15px; padding: 19px; background: #fcfdfc; transition: transform .2s, box-shadow .2s; }
.unit-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(51,51,51,.1); }
.unit-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 17px; }
.unit-symbol {
    width: 38px; height: 38px; background: var(--navy); color: var(--lime); border-radius: 10px;
    display: grid; place-items: center; font-family: Manrope, sans-serif; font-weight: 800;
}
.unit-card h4 { margin: 0; font-family: Manrope, sans-serif; font-size: 15px; }
.unit-card .subtitle { color: var(--muted); font-size: 11px; margin-top: 3px; }
.unit-status { padding: 5px 8px; border-radius: 100px; background: var(--teal-light); color: var(--teal); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.unit-fields { display: grid; gap: 9px; }
.unit-field { display: flex; justify-content: space-between; gap: 15px; font-size: 11px; border-top: 1px solid #edf1f0; padding-top: 9px; }
.unit-field span:first-child { color: #909399; }
.unit-field span:last-child { color: var(--ink); text-align: right; word-break: break-word; }
.empty-state { padding: 75px 30px; text-align: center; }
.empty-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--teal-light); color: var(--teal); display: grid; place-items: center; margin: 0 auto 15px; font-weight: 800; }
.empty-state h4 { font-family: Manrope, sans-serif; margin: 0 0 7px; }
.empty-state p { color: var(--muted); font-size: 13px; margin: 0 auto 12px; }
.empty-state a { color: var(--teal); font-weight: 700; font-size: 12px; }
.error-state .empty-icon { color: var(--danger); background: #f8e6e3; }
.mission-panel { min-height: 520px; border-top: 3px solid var(--teal); }
.mission-badge svg { stroke-width: 2.2; }
.mission-form { padding-top: 28px; }
.form-section-title {
    display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
    margin-bottom: 18px; padding-bottom: 11px; border-bottom: 1px solid var(--line);
}
.form-section-title span {
    color: var(--ink); font: 700 12px Manrope, sans-serif; letter-spacing: .06em;
    text-transform: uppercase;
}
.form-section-title small { color: var(--muted); font-size: 10px; }
.form-section-title.resource-title { margin-top: 35px; }
.mission-step {
    display: grid; grid-template-columns: 42px 1fr; gap: 18px; padding: 22px;
    border: 1px solid #eceeed; border-radius: 15px; background: #fdfdfc;
}
.mission-step + .mission-step { margin-top: 0; }
.step-index {
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    background: var(--teal-light); color: var(--teal); font: 800 11px Manrope, sans-serif;
}
.step-content { min-width: 0; }
.step-content .field + .field { margin-top: 24px; }
.select-wrap { position: relative; display: flex; align-items: center; }
.unit-search-wrap { margin-bottom: 10px; }
.unit-search-wrap input { padding-right: 90px; }
.search-result-count {
    position: absolute; right: 14px; color: var(--teal); font-size: 10px;
    font-weight: 700; pointer-events: none;
}
.select-wrap select {
    width: 100%; appearance: none; border: 1px solid #ccd8d7; background: #fbfcfb;
    border-radius: 12px; color: var(--ink); padding: 14px 46px; outline: none;
    transition: .2s; cursor: pointer;
    background-image:
        linear-gradient(45deg, transparent 50%, #909399 50%),
        linear-gradient(135deg, #909399 50%, transparent 50%);
    background-position: calc(100% - 20px) 20px, calc(100% - 15px) 20px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.select-wrap select:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(251,114,36,.12); background-color: white; }
.select-wrap select:disabled { color: #b8b8b8; cursor: not-allowed; background-color: #f5f5f5; }
.mission-footer { margin-left: 60px; }
.mission-submit { min-width: 190px; }
.mission-submit:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.mission-success {
    margin: 25px 36px 0; padding: 14px 16px; border: 1px solid #fbc7a9;
    background: var(--teal-light); border-radius: 12px; display: flex; align-items: center; gap: 12px;
}
.mission-success-icon {
    width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: white;
    display: grid; place-items: center; flex: 0 0 auto;
}
.mission-success-icon svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.mission-success small { display: block; color: #b74708; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.mission-success strong { display: block; margin-top: 2px; font-size: 13px; }
.inline-alert {
    margin: 25px 36px 0; padding: 13px 16px; border-radius: 10px; background: #f8e6e3;
    color: #88352e; font-size: 12px; display: flex; flex-direction: column; gap: 2px;
}
.delegation-panel { border-top-color: #3676B1; }
.delegation-panel .mission-badge {
    color: #3676B1;
    background: #eaf2f9;
}
.optional-label {
    display: inline-flex; margin-left: 6px; padding: 3px 6px; border-radius: 10px;
    color: var(--muted); background: #f0f1f1; font-size: 8px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em; vertical-align: middle;
}
.operation-summary { display: flex; align-items: center; gap: 11px; max-width: 440px; }
.summary-icon {
    width: 36px; height: 36px; border-radius: 10px; background: var(--teal-light);
    color: var(--teal); display: grid; place-items: center; flex: 0 0 auto;
}
.summary-icon svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.operation-summary strong { display: block; color: var(--ink); font-size: 11px; }
.operation-summary small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; line-height: 1.4; }
@media (max-width: 820px) {
    .app-shell { display: block; }
    .sidebar { min-height: auto; padding: 22px 24px; }
    .sidebar-copy { display: none; }
    .connection-state { position: absolute; right: 24px; top: 18px; margin: 0; padding: 0; border: 0; }
    .connection-state small { display: none; }
    .content { padding: 28px 20px 50px; }
}
@media (max-width: 560px) {
    .topbar, .panel-heading, .form-footer { align-items: stretch; flex-direction: column; }
    .server-chip { max-width: 100%; }
    .tabs { gap: 18px; }
    .tab { font-size: 12px; }
    .panel-heading, .config-form { padding-left: 22px; padding-right: 22px; }
    .security-badge { align-self: flex-start; }
    .button { width: 100%; }
    .endpoint-preview { overflow: hidden; }
    .units-grid { padding-left: 22px; padding-right: 22px; grid-template-columns: 1fr; }
    .tabs { overflow-x: auto; }
    .tab { flex: 0 0 auto; }
    .mission-step { grid-template-columns: 1fr; gap: 10px; }
    .mission-footer { margin-left: 0; }
    .form-section-title { align-items: flex-start; flex-direction: column; gap: 3px; }
    .mission-success, .inline-alert { margin-left: 22px; margin-right: 22px; }
}

/* Restrained enterprise visual language */
:root {
    --paper: #f3f4f5;
    --navy: #202428;
    --line: #dfe2e4;
    --shadow: 0 2px 8px rgba(24, 31, 36, .06);
}

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
    font-size: 14px;
}

.app-shell { grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { padding: 28px 24px; }
.sidebar::after { display: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 6px; }
.brand-mark svg { width: 20px; }
.brand strong {
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
}
.brand small { font-size: 10px; }
.sidebar-copy { margin-top: 92px; }
.sidebar h1 {
    font-family: inherit;
    font-size: 30px;
    font-weight: 650;
    line-height: 1.08;
    letter-spacing: -.025em;
    margin: 10px 0 16px;
}
.sidebar-copy p { font-size: 13px; line-height: 1.55; }
.connection-state { padding-top: 20px; }

.content {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 34px clamp(28px, 4vw, 64px) 64px;
}
.topbar { margin-bottom: 30px; }
.topbar h2 {
    font-family: inherit;
    font-size: 25px;
    font-weight: 650;
    letter-spacing: -.02em;
}
.eyebrow { font-size: 10px; letter-spacing: .11em; }
.server-chip {
    border-radius: 6px;
    background: #fff;
    padding: 9px 12px;
}

.tabs { gap: 8px; margin-bottom: 20px; }
.tab {
    gap: 7px;
    padding: 11px 14px 12px;
    border-radius: 6px 6px 0 0;
    font-size: 13px;
    font-weight: 550;
}
.tab:hover { color: var(--ink); background: rgba(255, 255, 255, .65); }
.tab.active { background: #fff; }
.tab::after { height: 2px; }

.panel {
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.mission-panel, .delegation-panel { border-top-width: 2px; }
.panel-heading { padding: 24px 28px 21px; }
.panel h3 {
    font-family: inherit;
    font-size: 20px;
    font-weight: 650;
    letter-spacing: -.015em;
}
.security-badge, .saved-label {
    border-radius: 4px;
    font-size: 10px;
    padding: 7px 9px;
}

.config-form { padding: 28px; }
.form-section-title { margin-bottom: 14px; }
.form-section-title span { font-family: inherit; font-size: 11px; }
.mission-step {
    grid-template-columns: 38px 1fr;
    padding: 20px;
    border-radius: 7px;
    background: #fafbfb;
}
.step-index {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    font-family: inherit;
}
.field label { font-size: 12px; margin-bottom: 7px; }
.input-wrap input, .select-wrap select {
    border-radius: 5px;
    background-color: #fff;
    min-height: 44px;
}
.input-wrap input:focus, .select-wrap select:focus {
    box-shadow: 0 0 0 3px rgba(251, 114, 36, .1);
}
.field > small { font-size: 10px; }

.button {
    border-radius: 5px;
    padding: 11px 15px;
    font-size: 11px;
    transition: background-color .15s ease, border-color .15s ease;
}
.button.primary { box-shadow: none; }
.button.primary:hover { background: #e96116; }
.button.secondary { border: 1px solid #f6d2bd; }

.units-grid { gap: 12px; padding: 20px 28px 30px; }
.unit-card {
    border-radius: 7px;
    padding: 16px;
    background: #fff;
}
.unit-card:hover {
    transform: none;
    border-color: #c8cccf;
    box-shadow: 0 3px 10px rgba(24, 31, 36, .07);
}
.unit-symbol { border-radius: 5px; font-family: inherit; }
.unit-card h4, .unit-summary strong { font-family: inherit; }
.unit-status { border-radius: 4px; }
.mission-success, .inline-alert { border-radius: 6px; }
.mission-success-icon { border-radius: 5px; }
.summary-icon { border-radius: 5px; }
.optional-label { border-radius: 3px; }
.audit-panel { min-height: 420px; }
.audit-table-wrap { overflow-x: auto; }
.audit-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.audit-table th {
    padding: 11px 14px; border-bottom: 1px solid var(--line); background: #f7f8f8;
    color: var(--muted); font-size: 9px; letter-spacing: .06em; text-align: left;
    text-transform: uppercase; white-space: nowrap;
}
.audit-table td {
    padding: 12px 14px; border-bottom: 1px solid #eceeef; color: #4d5256;
    vertical-align: top;
}
.audit-table tbody tr:hover { background: #fafafa; }
.audit-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.audit-outcome {
    display: inline-flex; padding: 4px 7px; border-radius: 3px; font-size: 9px;
    font-weight: 700; white-space: nowrap;
}
.outcome-success { color: #2f6d48; background: #e8f4ed; }
.outcome-failure { color: #963d35; background: #f9e9e7; }
.outcome-partial { color: #8c6415; background: #fff3d7; }
.audit-table code {
    display: block; max-width: 170px; margin-top: 3px; overflow: hidden;
    color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap;
}
.audit-details { max-width: 300px; word-break: break-word; color: var(--muted) !important; }
.muted-value { color: #b7bdc0; }

.user-admin-panel { overflow: hidden; }
.user-admin-layout {
    display: grid; grid-template-columns: minmax(290px, 340px) 1fr; gap: 24px;
    padding: 26px 28px 30px; background: #f7f8f8;
}
.user-create-card, .managed-user-card {
    border: 1px solid var(--line); border-radius: 7px; background: #fff;
}
.user-create-card { align-self: start; padding: 20px; }
.user-create-form > .field + .field,
.user-create-form > .user-name-grid,
.user-create-form > .permission-options { margin-top: 16px; }
.user-name-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.user-create-form input:not([type="checkbox"]),
.managed-user-card input:not([type="checkbox"]) {
    width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid #d9dddf;
    border-radius: 5px; background: #fff; color: var(--ink); font: inherit;
}
.user-create-form input:focus, .managed-user-card input:focus {
    border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px rgba(251, 114, 36, .1);
}
.permission-options { display: flex; flex-wrap: wrap; gap: 9px 16px; }
.check-option { display: inline-flex; align-items: center; gap: 7px; color: #555b5f; font-size: 11px; }
.check-option input { accent-color: var(--orange); }
.user-create-button { width: 100%; margin-top: 19px; }
.form-error-summary {
    display: grid; gap: 4px; margin-bottom: 16px; padding: 10px 12px;
    border-left: 3px solid var(--danger); background: #fdf0ef; color: #88352e; font-size: 10px;
}
.managed-users { min-width: 0; }
.managed-users-heading { display: flex; justify-content: space-between; margin-bottom: 12px; }
.managed-users-heading strong { display: block; margin-top: 3px; color: var(--ink); font-size: 15px; }
.managed-user-card + .managed-user-card { margin-top: 12px; }
.managed-user-header {
    display: flex; align-items: center; gap: 12px; padding: 15px 17px;
    border-bottom: 1px solid #eceeef;
}
.user-avatar {
    display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center;
    border-radius: 5px; background: var(--navy); color: #fff; font-size: 13px; font-weight: 700;
}
.managed-user-identity { min-width: 120px; margin-right: auto; }
.managed-user-identity strong, .managed-user-identity small { display: block; }
.managed-user-identity strong { color: var(--ink); font-size: 12px; }
.managed-user-identity small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.user-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.user-role-badge {
    padding: 4px 7px; border-radius: 3px; background: #eef0f1; color: #60666a;
    font-size: 8px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.user-role-badge.superuser { background: #fff0e7; color: #a84d18; }
.user-role-badge.active { background: #e8f4ed; color: #2f6d48; }
.user-role-badge.inactive { background: #f9e9e7; color: #963d35; }
.managed-user-form { padding: 16px 17px; }
.managed-user-fields { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 10px; }
.managed-user-fields .field,
.user-name-grid .field { margin-top: 0; }
.managed-user-actions {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px;
}
.password-reset { border-top: 1px solid #eceeef; }
.password-reset summary {
    padding: 11px 17px; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 650;
}
.password-reset-form {
    display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 10px;
    padding: 4px 17px 16px;
}
.permission-help {
    display: block; margin-top: 8px; color: var(--muted); font-size: 9px; line-height: 1.45;
}

.login-page { background: #eef0f1; }
.login-shell {
    width: min(980px, calc(100% - 40px)); min-height: 610px; margin: max(40px, 7vh) auto;
    display: grid; grid-template-columns: 40% 60%; overflow: hidden; background: #fff;
    border: 1px solid #dfe2e4; border-radius: 9px; box-shadow: 0 12px 40px rgba(24,31,36,.1);
}
.login-brand-panel {
    background: var(--navy); color: #fff; padding: 38px 34px; display: flex;
    flex-direction: column;
}
.login-brand-copy { margin: auto 0; }
.login-brand-copy h1 {
    max-width: 300px; margin: 12px 0 18px; font-size: 30px; line-height: 1.15;
    letter-spacing: -.025em; font-weight: 650;
}
.login-brand-copy p { max-width: 290px; color: #b8b8b8; font-size: 13px; line-height: 1.6; }
.login-security-note { color: #8f969a; font-size: 10px; }
.login-form-panel { display: grid; place-items: center; padding: 45px; }
.login-card { width: min(100%, 390px); }
.login-card-heading h2 { margin: 7px 0 6px; font-size: 25px; font-weight: 650; letter-spacing: -.02em; }
.login-card-heading p { margin: 0 0 30px; color: var(--muted); font-size: 12px; }
.login-form .field + .field { margin-top: 20px; }
.login-submit { width: 100%; margin-top: 28px; min-height: 44px; }
.login-error {
    margin-bottom: 22px; padding: 11px 13px; border-left: 3px solid var(--danger);
    background: #fdf0ef; color: #88352e; font-size: 11px;
}

@media (max-width: 820px) {
    .app-shell { display: block; }
    .content { padding: 26px 20px 48px; }
    .topbar-actions { align-items: flex-end; flex-direction: column; }
    .login-shell { grid-template-columns: 1fr; margin: 20px auto; }
    .login-brand-panel { min-height: 220px; }
    .login-brand-copy { margin: 36px 0 0; }
    .login-brand-copy h1 { font-size: 24px; max-width: 420px; }
    .login-brand-copy p { display: none; }
    .login-security-note { display: none; }
    .login-form-panel { padding: 42px 28px; }
    .user-admin-layout { grid-template-columns: 1fr; padding: 20px; }
    .managed-user-fields, .password-reset-form { grid-template-columns: 1fr; }
    .managed-user-actions { align-items: flex-start; flex-direction: column; }
}

/* Kompakte Anwendungsansicht ohne Seitenleiste */
.app-shell { display: block; min-height: 100vh; }
.content {
    width: min(1280px, 100%); margin: 0 auto; padding: 24px clamp(18px, 3vw, 40px) 42px;
}
.topbar { margin-bottom: 20px; }
.topbar h2 { font-size: 24px; }
.tabs { margin-bottom: 16px; overflow-x: auto; }
.panel-heading { padding: 19px 22px 17px; }
.panel-heading p { font-size: 11px; }
.config-form { padding: 20px 22px 22px; }
.field + .field { margin-top: 16px; }
.form-footer { margin-top: 22px; padding-top: 18px; }
.units-panel, .mission-panel, .audit-panel { min-height: 0; }
.unit-summary { padding: 17px 22px 0; }
.units-grid { padding: 16px 22px 22px; }
.mission-form { padding-top: 19px; }
.mission-step { padding: 16px; }
.mission-success, .inline-alert { margin: 16px 22px 0; }
.user-admin-layout { padding: 18px 22px 22px; }
.managed-user-header { padding: 12px 14px; }
.managed-user-form { padding: 13px 14px; }
.managed-user-fields .field,
.user-name-grid .field,
.password-reset-form .field { margin-top: 0; }

@media (max-width: 820px) {
    .content { padding: 18px 14px 32px; }
    .topbar { align-items: flex-start; }
    .topbar-actions { width: 100%; align-items: stretch; }
    .server-chip { max-width: none; }
}
