.linear-page { --font-mono: "SFMono-Regular", "Roboto Mono", monospace; }
.linear-page main { padding-bottom: 30px; }
.linear-page-intro { margin-bottom: 18px; }
.linear-page-intro h1 { max-width: 620px; }
.linear-page-intro p { max-width: 620px; }
.linear-page .page-actions { align-items: center; }
.linear-page .sync-note { max-width: 180px; }

.linear-form { margin-top: 0; }
.linear-config-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.28fr) minmax(260px, .66fr); align-items: start; gap: 14px; }
.authing-panel { grid-column: 1 / -1; }
.authing-settings-layout { display: grid; grid-template-columns: minmax(0, 1.36fr) minmax(245px, .64fr); align-items: start; gap: 18px; }
.authing-settings-main { min-width: 0; }
.authing-switch { margin-top: 0; margin-bottom: 18px; }
.authing-form-grid { gap: 13px 14px; }
.authing-form-grid em { color: #aaa6b5; font-size: 9px; font-style: normal; font-weight: 500; }
.authing-status-card { display: grid; grid-template-columns: 10px minmax(0, 1fr); align-items: start; gap: 11px; min-height: 124px; padding: 15px; border: 1px solid #e0e9fb; border-radius: 12px; background: linear-gradient(145deg, #f7faff, #f2fbf7); }
.authing-status-dot { width: 9px; height: 9px; margin-top: 3px; border-radius: 50%; background: #c8cbd6; box-shadow: 0 0 0 4px rgba(200, 203, 214, .16); }
.authing-status-dot.is-ready { background: #62bd91; box-shadow: 0 0 0 4px rgba(98, 189, 145, .14); }
.authing-status-card > div { display: grid; gap: 6px; min-width: 0; }
.authing-status-card .section-kicker { color: #9da9c0; }
.authing-status-card strong { color: #61749f; font-size: 13px; }
.authing-status-card small { color: #98a5bb; font-size: 9px; line-height: 1.55; }
.config-panel { min-width: 0; padding: 23px 24px 25px; }
.scope-panel { position: relative; z-index: 5; overflow: visible; }
.config-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 21px; }
.config-panel-head h2 { margin: 8px 0 5px; color: #4b4766; font-size: 21px; letter-spacing: -.06em; }
.config-panel-head p { margin: 0; color: #aaa7b5; font-size: 10px; line-height: 1.55; }
.config-number { color: #d1ccec; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.08em; }
.linear-field-stack, .linear-form-grid { display: grid; gap: 14px; }
.linear-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.linear-field { display: grid; gap: 6px; min-width: 0; }
.linear-field > span { color: #78738a; font-size: 10px; font-weight: 750; }
.linear-field > small, .picker-hint { color: #aaa6b6; font-size: 9px; line-height: 1.45; }
.linear-field input { width: 100%; min-height: 39px; padding: 0 11px; border: 1px solid #ebeaf1; border-radius: 9px; outline: 0; color: #4d4964; background: #fbfbfd; font-family: var(--font-ui); font-size: 11px; transition: border-color .2s, box-shadow .2s, background .2s; }
.linear-field input:focus, .picker-control:focus-within { border-color: #b9b0f2; background: #fff; box-shadow: 0 0 0 3px rgba(117, 104, 233, .09); }
.linear-field input::placeholder, .picker-control input::placeholder { color: #c0bdc8; }
.connection-actions { display: flex; align-items: center; gap: 10px; margin-top: 19px; }
.connection-actions .button { min-height: 35px; padding: 0 12px; font-size: 10px; }
.connection-actions > span { overflow: hidden; color: #aaa6b4; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.picker-block + .picker-block { margin-top: 20px; }
.picker-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.picker-label > span { color: #78738a; font-size: 10px; font-weight: 750; }
.picker-label em { color: #aaa6b5; font-size: 9px; font-style: normal; font-weight: 500; }
.picker-label b { color: #938aa9; font-size: 9px; font-weight: 750; }
.multi-picker { position: relative; }
.picker-control { display: flex; align-items: center; flex-wrap: wrap; min-height: 43px; gap: 5px; padding: 5px 6px 5px 8px; border: 1px solid #ebeaf1; border-radius: 9px; background: #fbfbfd; transition: border-color .2s, box-shadow .2s, background .2s; }
.selected-chips { display: contents; }
.selected-chip { display: inline-flex; align-items: center; max-width: 160px; gap: 5px; padding: 5px 7px 5px 8px; border: 1px solid #ded9fc; border-radius: 6px; color: #7065c6; background: #f1efff; font-size: 9px; font-weight: 700; }
.selected-chip strong { overflow: hidden; max-width: 122px; text-overflow: ellipsis; white-space: nowrap; }
.selected-chip button { display: grid; width: 15px; height: 15px; place-items: center; padding: 0; border: 0; border-radius: 4px; color: #9990d7; background: transparent; font-size: 13px; line-height: 1; }
.selected-chip button:hover { color: #6256bc; background: #e2defd; }
.picker-control input { flex: 1 1 125px; min-width: 95px; height: 29px; padding: 0 3px; border: 0; outline: 0; color: #5b5670; background: transparent; font-family: var(--font-ui); font-size: 10px; }
.picker-toggle { display: grid; width: 25px; height: 27px; flex: 0 0 25px; place-items: center; padding: 0; border: 0; border-radius: 6px; color: #aba6b7; background: transparent; font-size: 15px; }
.picker-toggle:hover { color: #7568d5; background: #f0eff8; }
.picker-menu { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; left: 0; max-height: 220px; overflow: auto; padding: 5px; border: 1px solid #e4e1ef; border-radius: 10px; background: #fff; box-shadow: 0 14px 32px rgba(57, 50, 98, .13); }
.picker-option { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 8px; width: 100%; padding: 9px 8px; border: 0; border-radius: 7px; text-align: left; background: transparent; cursor: pointer; }
.picker-option:hover, .picker-option[aria-selected="true"] { background: #f5f3ff; }
.picker-check { display: grid; width: 16px; height: 16px; place-items: center; border: 1px solid #dedce7; border-radius: 5px; color: transparent; background: #fff; font-size: 10px; font-weight: 900; }
.picker-option[aria-selected="true"] .picker-check { border-color: #796be5; color: #fff; background: #796be5; }
.picker-option-copy { display: grid; min-width: 0; gap: 3px; }
.picker-option-copy strong { overflow: hidden; color: #5e5974; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.picker-option-copy small { overflow: hidden; color: #aaa6b4; font-family: var(--font-mono); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.picker-empty { padding: 16px 9px; color: #aaa6b5; font-size: 9px; line-height: 1.5; text-align: center; }
.picker-hint { display: block; margin-top: 7px; }

.switch-field { display: flex; align-items: center; gap: 9px; margin-top: 18px; padding: 11px 12px; border: 1px solid #e4f0e9; border-radius: 10px; background: #f8fcfa; cursor: pointer; }
.switch-field > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { display: flex; width: 31px; height: 18px; flex: 0 0 31px; align-items: center; padding: 2px; border-radius: 99px; background: #d7d5de; transition: background .2s; }
.switch-track i { display: block; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(40, 36, 58, .15); transition: transform .2s; }
.switch-field > input:checked + .switch-track { background: #64be95; }
.switch-field > input:checked + .switch-track i { transform: translateX(13px); }
.switch-field > span:last-child { display: grid; gap: 3px; }
.switch-field strong { color: #5b665f; font-size: 10px; }
.switch-field small { color: #a3ada7; font-size: 9px; }

.webhook-panel { position: relative; overflow: hidden; border-color: #dcece6; background: linear-gradient(145deg, #fff 0%, #f8fcfb 68%, #effaf5 100%); }
.webhook-panel::after { position: absolute; right: -76px; bottom: -102px; width: 230px; height: 230px; border: 1px solid rgba(89, 184, 139, .14); border-radius: 50%; box-shadow: 0 0 0 36px rgba(89, 184, 139, .035); content: ""; pointer-events: none; }
.webhook-config-block { position: relative; z-index: 1; display: grid; gap: 15px; }
.webhook-status { padding: 5px 8px; border-radius: 7px; color: #9a96a7; background: #f0eff4; font-size: 8px; font-weight: 850; letter-spacing: .05em; }
.webhook-status.is-ready { color: #3c9b72; background: #eaf7f0; }
.copy-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.copy-field input { min-width: 0; border-radius: 9px 0 0 9px; font-family: var(--font-mono); font-size: 9px; }
.copy-field button { min-width: 55px; padding: 0 11px; border: 1px solid #ded9f5; border-left: 0; border-radius: 0 9px 9px 0; color: #7065c6; background: #f4f2ff; font-family: var(--font-ui); font-size: 9px; font-weight: 800; cursor: pointer; }
.copy-field button:hover { background: #ebe7ff; }

.linear-side-stack { display: grid; gap: 14px; }
.selection-summary { padding: 22px 22px 20px; }
.summary-head { display: flex; align-items: center; justify-content: space-between; }
.summary-dot { width: 7px; height: 7px; border-radius: 50%; background: #d1ceda; }
.is-ready .summary-dot { background: #64bd93; box-shadow: 0 0 0 4px rgba(100, 189, 147, .13); }
.selection-summary h2 { margin: 14px 0 15px; color: #4b4766; font-size: 20px; letter-spacing: -.06em; }
.summary-metric, .summary-detail { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; border-bottom: 1px solid #f2f0f5; color: #a19daa; font-size: 9px; }
.summary-metric strong { color: #69647c; font-size: 12px; }
.summary-divider { height: 7px; }
.summary-detail { border-bottom: 0; color: #b0acb9; }
.summary-detail strong { overflow: hidden; color: #7b758b; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.config-note { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 16px; border-color: #f5e6dc; background: #fffaf6; }
.note-mark { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: #c47b5a; background: #f9e7da; font-family: Georgia, serif; font-size: 12px; font-weight: 700; }
.config-note strong { color: #a5694d; font-size: 10px; }
.config-note p { margin: 5px 0 0; color: #ad958a; font-size: 9px; line-height: 1.55; }
.config-note code { padding: 2px 4px; border-radius: 4px; color: #8c6b5d; background: #f7eade; font-family: var(--font-mono); font-size: 8px; }
.config-note-flow { display: grid; gap: 7px; margin-top: 15px; }
.config-note-flow span { display: flex; align-items: center; gap: 8px; color: #ad958a; font-size: 9px; }
.config-note-flow b { display: grid; width: 22px; height: 18px; flex: 0 0 22px; place-items: center; border: 1px solid #f1d8c8; border-radius: 5px; color: #b4775b; background: #fff; font-family: var(--font-mono); font-size: 8px; }

@container workspace (min-width: 1201px) {
  .linear-side-stack { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr); align-items: stretch; }
  .linear-side-stack > .panel { height: 100%; box-sizing: border-box; }
}

.linear-page .footer { padding-top: 23px; }
.linear-page .button:disabled { cursor: not-allowed; opacity: .52; }
.linear-page .toast { max-width: 450px; }

@container workspace (max-width: 1200px) {
  .linear-config-grid { grid-template-columns: minmax(0, 1fr) minmax(290px, .7fr); }
  .connection-panel, .scope-panel, .collection-panel, .webhook-panel { grid-column: span 1; }
  .connection-panel { grid-column: 1; }.scope-panel { grid-column: 1; }.collection-panel { grid-column: 1; }.webhook-panel { grid-column: 1; }
  .linear-side-stack { grid-column: 2; grid-row: 1 / span 4; }
}

@container workspace (max-width: 860px) {
  .linear-config-grid { grid-template-columns: 1fr; }
  .connection-panel, .scope-panel, .collection-panel, .webhook-panel, .linear-side-stack { grid-column: auto; grid-row: auto; }
}

@container workspace (max-width: 650px) {
  .config-panel { padding: 20px 17px 21px; }
  .linear-form-grid { grid-template-columns: 1fr; }
  .linear-page .page-actions { align-items: stretch; flex-wrap: wrap; }
  .linear-page .page-actions .sync-note { width: 100%; max-width: none; }
  .linear-page .page-actions .button { flex: 1; }
  .copy-field { grid-template-columns: 1fr; gap: 6px; }
  .copy-field input, .copy-field button { min-height: 38px; border: 1px solid #e3e0ee; border-radius: 9px; }
}

@container workspace (max-width: 860px) {
  .authing-settings-layout { grid-template-columns: 1fr; }
}
