:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #15263b;
  background: #f3f6fb;
  --ink: #15263b;
  --muted: #738196;
  --line: #e4eaf2;
  --soft: #f7f9fc;
  --navy: #122035;
  --navy-2: #1c304b;
  --blue: #2d6cdf;
  --blue-dark: #2055b9;
  --green: #23a36b;
  --red: #d9535f;
  --shadow: 0 16px 42px rgba(25, 51, 84, .08);
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
body { min-width: 320px; overflow-x: hidden; background: #f3f6fb; }
button, input, select, textarea { font: inherit; }
button { border: 0; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(45, 108, 223, .2); outline-offset: 2px; }

.login-shell { min-width: 0; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 28px; overflow: hidden; background: #eef3f9; }
.login-panel { width: 100%; max-width: 430px; min-width: 0; padding: 42px; background: #fff; border: 1px solid #e1e8f0; border-radius: 24px; box-shadow: 0 24px 70px rgba(19, 42, 73, .14); animation: rise-in .45s ease both; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 34px; }
.login-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: #fff; background: #2d6cdf; font-size: 23px; font-weight: 800; box-shadow: 0 10px 22px rgba(45, 108, 223, .24); }
.login-brand strong { display: block; color: var(--ink); font-size: 20px; letter-spacing: .2px; }
.login-brand span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.login-heading { margin: 0; color: var(--ink); font-size: 28px; letter-spacing: -.4px; }
.login-subtitle { margin: 9px 0 27px; color: var(--muted); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.login-form { display: grid; gap: 16px; }
.login-form .field { gap: 8px; }
.login-footer { margin: 22px 0 0; color: #9aa6b6; font-size: 11px; text-align: center; }

.shell { height: 100vh; min-height: 100vh; display: flex; }
.sidebar { position: sticky; top: 0; width: 264px; height: 100vh; flex: 0 0 264px; display: flex; flex-direction: column; padding: 26px 16px 18px; color: #c7d2e2; background: var(--navy); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 29px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: #fff; background: #2d6cdf; font-size: 18px; font-weight: 800; }
.brand-copy strong { display: block; color: #fff; font-size: 17px; letter-spacing: .1px; }
.brand-copy span { display: block; margin-top: 4px; color: #8fa1ba; font-size: 11px; }
.side-label { padding: 0 12px 10px; color: #71849d; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.side-nav { display: grid; gap: 6px; }
.nav-button { width: 100%; min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 8px 11px; color: #aebdd0; background: transparent; border-radius: 12px; cursor: pointer; text-align: left; transition: background .2s ease, color .2s ease, transform .2s ease; }
.nav-button:hover { color: #fff; background: rgba(255, 255, 255, .08); transform: translateX(3px); }
.nav-button.active { color: #fff; background: var(--navy-2); box-shadow: inset 3px 0 #5f9bff, 0 9px 22px rgba(0, 0, 0, .12); }
.nav-icon { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: inherit; background: rgba(255, 255, 255, .08); font-size: 15px; font-weight: 700; }
.nav-button.active .nav-icon { background: rgba(95, 155, 255, .2); color: #9fc2ff; }
.nav-copy { min-width: 0; display: grid; gap: 2px; }
.nav-copy strong { color: inherit; font-size: 13px; font-weight: 650; }
.nav-copy small { color: #7f91a9; font-size: 10px; }
.nav-button.active .nav-copy small { color: #a8bee1; }
.side-footer { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.sync-row { display: flex; align-items: center; gap: 8px; color: #8fa1ba; font-size: 11px; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(35, 163, 107, .12); }
.side-footer small { display: block; margin-top: 10px; color: #61758f; font-size: 10px; line-height: 1.6; }

.main-shell { min-width: 0; height: 100vh; flex: 1; display: flex; flex-direction: column; }
.topbar { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 42px; background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--line); }
.breadcrumbs { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 12px; }
.breadcrumbs strong { overflow: hidden; color: var(--ink); font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.crumb-separator { color: #acb7c6; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.environment { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 11px; color: #4e657f; background: #f2f6fb; border: 1px solid #e0e8f2; border-radius: 9px; font-size: 11px; white-space: nowrap; }
.environment i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.page-scroll { flex: 1; overflow: auto; }
.page-wrap { width: min(1240px, 100%); margin: 0 auto; padding: 38px 42px 56px; animation: rise-in .32s ease both; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 26px; }
.eyebrow { margin-bottom: 8px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; }
.page-heading h1 { margin: 0; color: var(--ink); font-size: 29px; letter-spacing: -.5px; }
.page-heading p { max-width: 650px; margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.heading-status { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; color: #39745b; background: #ecf8f1; border: 1px solid #d5efdf; border-radius: 10px; font-size: 11px; white-space: nowrap; }
.heading-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.heading-status.muted-status { color: #6f7f94; background: #f4f6f9; border-color: #e5eaf0; }
.heading-status.muted-status i { background: #aab6c5; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.toolbar-note { color: var(--muted); font-size: 12px; }

.btn { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; color: #52647a; background: #fff; border: 1px solid #dce4ee; border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: 650; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease; }
.btn:hover:not(:disabled) { border-color: #bdd0ec; box-shadow: 0 8px 18px rgba(39, 80, 132, .1); transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn.primary { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 8px 18px rgba(45, 108, 223, .2); }
.btn.primary:hover:not(:disabled) { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn.danger { color: var(--red); background: #fff7f7; border-color: #f2d8da; }
.btn.icon-only { width: 34px; min-height: 34px; padding: 0; }
.btn:disabled { opacity: .52; cursor: not-allowed; }
.spinner { width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 22px; }
.metric { min-height: 116px; display: flex; align-items: center; gap: 13px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 6px 18px rgba(31, 59, 94, .04); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.metric:hover { border-color: #cbdaf0; box-shadow: var(--shadow); transform: translateY(-4px); }
.metric-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: #2d6cdf; background: #edf4ff; font-size: 18px; font-weight: 750; }
.metric:nth-child(2) .metric-icon { color: #a06c20; background: #fff5e7; }
.metric:nth-child(3) .metric-icon { color: #2d8b64; background: #eaf8f1; }
.metric:nth-child(4) .metric-icon { color: #7d5ac4; background: #f2edff; }
.metric-copy { min-width: 0; display: grid; gap: 6px; }
.metric-copy span { color: var(--muted); font-size: 11px; }
.metric-copy strong { overflow: hidden; color: var(--ink); font-size: 21px; text-overflow: ellipsis; white-space: nowrap; }
.metric-copy small { color: #9aa7b8; font-size: 10px; }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.view-card { padding: 25px; background: #fff; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 8px 24px rgba(31, 59, 94, .045); }
.view-card.full { grid-column: 1 / -1; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.card-head h2 { margin: 0; color: var(--ink); font-size: 16px; }
.card-head p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.card-head-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: #2d6cdf; background: #edf4ff; font-size: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 16px; }
.form-grid.single { grid-template-columns: 1fr; }
.field { min-width: 0; display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #65758a; font-size: 11px; font-weight: 650; }
.field-hint { color: #98a5b5; font-size: 10px; line-height: 1.5; }
.field input, .field select, .field textarea { width: 100%; color: var(--ink); background: #fbfcfe; border: 1px solid #dce4ee; border-radius: 10px; padding: 11px 12px; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.field input, .field select { height: 42px; }
.field textarea { min-height: 104px; resize: vertical; line-height: 1.6; }
.field input:hover, .field select:hover, .field textarea:hover { background: #fff; border-color: #c7d6e9; }
.field input:focus, .field select:focus, .field textarea:focus { background: #fff; border-color: #7ea6e6; box-shadow: 0 0 0 4px rgba(45, 108, 223, .09); outline: 0; }
.switch-field { min-height: 42px; display: flex; align-items: center; gap: 10px; padding-top: 19px; color: #52647a; font-size: 12px; }
.switch { position: relative; width: 39px; height: 22px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #cbd5e2; cursor: pointer; transition: background .2s ease; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.16); transition: transform .2s ease; }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(17px); }

.nav-list, .page-list, .team-list { display: grid; gap: 12px; }
.social-buttons-editor { display: grid; gap: 12px; }
.social-buttons-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 2px; }
.editor-title { display: block; color: var(--ink); font-size: 13px; }
.editor-caption { display: block; margin-top: 4px; color: #91a0b2; font-size: 10px; line-height: 1.5; }
.social-button-list { display: grid; gap: 10px; }
.social-button-item { padding: 14px; background: #fbfcfe; border: 1px solid #e3eaf3; border-radius: 12px; transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease, background .22s ease; }
.social-button-item:hover { background: #fff; border-color: #c8d8ee; box-shadow: 0 10px 22px rgba(37, 76, 124, .07); transform: translateY(-1px); }
.social-button-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.social-button-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.social-button-fields .field input { height: 38px; padding: 8px 10px; font-size: 11px; }
.social-button-fields .field label { font-size: 10px; }
.social-button-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; padding-top: 10px; border-top: 1px solid #e7edf4; }
.social-button-meta .switch-field { min-height: 22px; padding-top: 0; }
.nav-item-card, .page-item-card, .team-item-card { padding: 17px; background: #fbfcfe; border: 1px solid #e3eaf3; border-radius: 14px; transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease, background .22s ease; }
.nav-item-card:hover, .page-item-card:hover, .team-item-card:hover { background: #fff; border-color: #c8d8ee; box-shadow: 0 12px 25px rgba(37, 76, 124, .08); transform: translateY(-2px); }
.nav-item-top, .item-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.item-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.item-index { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: #51709c; background: #eaf1fb; font-size: 11px; font-weight: 750; }
.item-title strong { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.item-title small { display: block; margin-top: 3px; color: #91a0b2; font-size: 10px; }
.item-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.nav-fields .field input, .nav-fields .field select { height: 38px; padding: 8px 10px; font-size: 11px; }
.nav-fields .field label { font-size: 10px; }
.nav-type-field { grid-column: span 2; }
.nav-type-options { display: flex; flex-wrap: wrap; gap: 6px; }
.nav-type-option { min-height: 31px; padding: 0 10px; color: #6f7f94; background: #f7f9fc; border: 1px solid #dce5f0; border-radius: 8px; cursor: pointer; font-size: 10px; transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease; }
.nav-type-option:hover { color: var(--blue); border-color: #aac4eb; background: #f0f6ff; transform: translateY(-1px); }
.nav-type-option.active { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 5px 12px rgba(45, 108, 223, .18); }
.nav-type-option.unavailable, .nav-type-option:disabled { color: #aeb9c8; background: #eef2f6; border-color: #e0e6ed; cursor: not-allowed; opacity: .72; transform: none; }
.nav-type-option.active:disabled { color: #fff; background: var(--blue); border-color: var(--blue); opacity: .92; }
.nav-icon-picker { margin-top: 13px; padding: 13px; background: #f7faff; border: 1px solid #e1eaf5; border-radius: 12px; }
.icon-picker-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.icon-picker-title span { color: var(--ink); font-size: 11px; font-weight: 700; }
.icon-picker-title small { color: #91a0b2; font-size: 10px; }
.icon-picker-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.icon-choice { min-height: 58px; display: grid; place-items: center; gap: 4px; padding: 7px 4px; color: #60738c; background: #fff; border: 1px solid #e0e8f3; border-radius: 9px; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, color .2s ease; }
.icon-choice img { width: 24px; height: 24px; object-fit: contain; }
.icon-choice span { max-width: 100%; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.icon-choice:hover, .icon-choice.active { color: var(--blue); border-color: #7ea6e6; box-shadow: 0 5px 14px rgba(45, 108, 223, .12); transform: translateY(-1px); }
.icon-picker-url { margin-top: 10px; }
.icon-picker-url .field { gap: 6px; }
.icon-picker-url .field input { height: 36px; padding: 8px 10px; font-size: 11px; }
.nav-detail-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.nav-detail-fields .field.full { grid-column: 1 / -1; }
.sponsor-editor { display: grid; gap: 12px; margin-top: 12px; padding: 14px; background: #f9fbfe; border: 1px solid #e2eaf4; border-radius: 12px; }
.sponsor-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sponsor-count { display: inline-grid; min-width: 22px; height: 22px; place-items: center; margin-left: 5px; padding: 0 6px; color: #2d6cdf; background: #eaf2ff; border-radius: 7px; font-size: 10px; font-style: normal; vertical-align: middle; }
.sponsor-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 180px 34px; align-items: end; gap: 8px; padding: 9px; background: #f1f5fa; border: 1px solid #e2eaf3; border-radius: 10px; }
.sponsor-search, .sponsor-filter { display: grid; gap: 5px; min-width: 0; }
.sponsor-search span, .sponsor-filter span { color: #738196; font-size: 10px; font-weight: 650; }
.sponsor-search input, .sponsor-filter select { width: 100%; height: 34px; min-width: 0; padding: 7px 9px; color: var(--ink); background: #fff; border: 1px solid #d9e3ef; border-radius: 8px; font-size: 11px; }
.sponsor-search input:focus, .sponsor-filter select:focus { border-color: #7ea6e6; box-shadow: 0 0 0 3px rgba(45, 108, 223, .09); outline: 0; }
.sponsor-toolbar .icon-only { min-height: 34px; color: #738196; }
.sponsor-list { max-height: 560px; display: grid; gap: 10px; overflow: auto; padding-right: 4px; }
.sponsor-list::-webkit-scrollbar { width: 6px; }
.sponsor-list::-webkit-scrollbar-thumb { background: #cbd8e8; border-radius: 9px; }
.sponsor-item { padding: 13px; background: #fff; border: 1px solid #e3eaf3; border-radius: 10px; }
.sponsor-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sponsor-item-heading { display: flex; align-items: center; gap: 9px; min-width: 0; }
.sponsor-item-index { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; color: #51709c; background: #eaf1fb; border-radius: 7px; font-size: 10px; font-weight: 750; }
.sponsor-item-top strong { display: block; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sponsor-item-top small { display: block; margin-top: 3px; overflow: hidden; color: #91a0b2; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sponsor-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sponsor-fields .field.full { grid-column: 1 / -1; }
.nav-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; padding-top: 12px; border-top: 1px solid #e7edf4; }
.type-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; color: #58708c; background: #eef3f9; border-radius: 7px; font-size: 10px; }
.empty { padding: 35px 18px; color: #91a0b2; background: #fbfcfe; border: 1px dashed #d6e0ec; border-radius: 13px; font-size: 12px; text-align: center; }
.remote-main-switch { margin: -4px 0 18px; padding-top: 0; }
.remote-actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #e7edf4; }
.remote-device-table, .remote-session-table { display: grid; gap: 0; overflow: auto; border: 1px solid #e3eaf3; border-radius: 12px; }
.remote-table-row { min-width: 720px; display: grid; grid-template-columns: 1.35fr 1fr 1.15fr .85fr; align-items: center; gap: 14px; padding: 13px 14px; color: var(--ink); background: #fff; border-bottom: 1px solid #edf1f6; font-size: 11px; }
.remote-session-table .remote-table-row { grid-template-columns: 1.25fr 1fr 1.15fr .9fr .85fr; }
.remote-table-row:last-child { border-bottom: 0; }
.remote-table-head { color: #8190a2; background: #f8fafd; font-size: 10px; font-weight: 700; }
.remote-table-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-table-row strong, .remote-table-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-table-row strong { color: var(--ink); font-size: 11px; }
.remote-table-row small { margin-top: 3px; color: #98a5b5; font-size: 10px; }
.remote-table-row .btn { min-height: 31px; padding: 0 10px; font-size: 10px; }
.remote-viewer-shell { position: relative; min-height: 360px; display: grid; place-items: center; overflow: hidden; background: #111827; border: 1px solid #263247; border-radius: 12px; }
.remote-viewer { display: block; width: 100%; max-height: 600px; min-height: 360px; object-fit: contain; background: #0b1020; }
.remote-viewer-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #c4d0e2; font-size: 13px; pointer-events: none; }
.remote-device-detail-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.remote-device-detail-grid > div { min-width: 0; padding: 11px 12px; background: #f8fafd; border: 1px solid #e3eaf3; border-radius: 9px; }
.remote-device-detail-grid small, .remote-device-detail-grid strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-device-detail-grid small { color: #91a0b2; font-size: 10px; }
.remote-device-detail-grid strong { margin-top: 5px; color: var(--ink); font-size: 11px; }
.remote-viewer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.remote-status { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; color: #66768a; background: #eef2f6; border-radius: 7px; font-size: 10px; font-weight: 700; }
.remote-status.requested { color: #9a6c1b; background: #fff4dc; }
.remote-status.authorized, .remote-status.connected { color: #277452; background: #e8f7ef; }
.remote-status.denied { color: #a14852; background: #fff0f1; }
.page-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.page-fields .field:nth-child(3), .page-fields .field:nth-child(4) { grid-column: 1 / -1; }
.team-fields { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.team-fields .field:nth-child(4), .team-fields .field:nth-child(5) { grid-column: span 3; }

.notice { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 12px 14px; color: #65758a; background: #f5f8fc; border: 1px solid #e3eaf3; border-radius: 10px; font-size: 11px; line-height: 1.6; }
.notice-icon { width: 18px; height: 18px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #3569b7; background: #e4efff; font-size: 11px; font-weight: 800; }
.toast-stack { position: fixed; z-index: 30; top: 22px; right: 24px; width: min(360px, calc(100vw - 32px)); display: grid; gap: 10px; pointer-events: none; }
.toast { display: grid; grid-template-columns: 29px 1fr auto; align-items: start; gap: 10px; padding: 13px 13px; color: #29405e; background: #fff; border: 1px solid #dce5f0; border-radius: 13px; box-shadow: 0 15px 35px rgba(21, 46, 80, .15); pointer-events: auto; animation: toast-in .3s ease both; }
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: #23845c; background: #e8f7ef; font-size: 14px; font-weight: 800; }
.toast.error .toast-icon { color: #c14954; background: #fff0f1; }
.toast-copy strong { display: block; color: var(--ink); font-size: 12px; }
.toast-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.toast-close { padding: 1px 4px; color: #94a1b1; background: transparent; cursor: pointer; font-size: 15px; }
.toast-close:hover { color: var(--ink); }
.fade-list-enter-active, .fade-list-leave-active { transition: opacity .2s ease, transform .2s ease; }
.fade-list-enter-from, .fade-list-leave-to { opacity: 0; transform: translateY(-5px); }

@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1120px) {
  .sidebar { width: 220px; flex-basis: 220px; }
  .topbar { padding: 0 26px; }
  .page-wrap { padding: 32px 26px 48px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-type-field { grid-column: 1 / -1; }
  .icon-picker-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .sponsor-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .sidebar { width: 76px; flex-basis: 76px; align-items: center; padding: 20px 10px 15px; }
  .brand { padding: 0 0 25px; }
  .brand-copy, .side-label, .nav-copy, .side-footer { display: none; }
  .nav-button { width: 48px; justify-content: center; padding: 8px; }
  .nav-icon { width: 34px; height: 34px; }
  .topbar { min-height: 74px; padding: 0 18px; }
  .environment { display: none; }
  .page-wrap { padding: 28px 18px 40px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .card-grid { grid-template-columns: 1fr; }
  .view-card.full { grid-column: auto; }
}
@media (max-width: 560px) {
  .login-shell { padding: 16px; }
  .login-panel { width: calc(100vw - 32px); padding: 29px 22px; border-radius: 19px; }
  .page-heading h1 { font-size: 25px; }
  .stats-grid { grid-template-columns: 1fr; }
  .view-card { padding: 19px 16px; border-radius: 14px; }
  .form-grid, .page-fields, .team-fields, .social-button-fields { grid-template-columns: 1fr; }
  .field.full, .page-fields .field:nth-child(3), .page-fields .field:nth-child(4), .team-fields .field:nth-child(4), .team-fields .field:nth-child(5) { grid-column: auto; }
  .nav-fields { grid-template-columns: 1fr; }
  .nav-type-field { grid-column: auto; }
  .nav-detail-fields, .sponsor-fields { grid-template-columns: 1fr; }
  .icon-picker-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .icon-picker-title, .sponsor-editor-head { align-items: flex-start; flex-direction: column; }
  .sponsor-fields .field.full, .nav-detail-fields .field.full { grid-column: auto; }
  .sponsor-toolbar { grid-template-columns: 1fr 34px; }
  .sponsor-filter { grid-column: 1 / -1; }
  .sponsor-toolbar .icon-only { grid-column: 2; grid-row: 1; }
  .social-buttons-toolbar, .social-button-top, .social-button-meta { align-items: flex-start; flex-direction: column; }
  .remote-device-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .topbar { padding: 0 14px; }
  .top-actions .btn span { display: none; }
  .top-actions .btn { width: 38px; padding: 0; }
  .breadcrumbs strong { max-width: 160px; }
}
