:root {
  color-scheme: light;
  --green-950: #142d25;
  --green-900: #1c3d31;
  --green-800: #285442;
  --green-700: #376d54;
  --green-100: #e7efe9;
  --green-50: #f2f6f2;
  --cream: #f7f6f1;
  --paper: #fffefa;
  --ink: #202924;
  --muted: #6c766f;
  --line: #dfe5de;
  --red-700: #a33832;
  --red-50: #fbefed;
  --amber-700: #916019;
  --amber-50: #fbf4e6;
  --shadow: 0 16px 40px rgb(27 48 38 / 8%);
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--cream); color: var(--ink); }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 20; top: 12px; left: 12px; transform: translateY(-160%); padding: 10px 14px; border-radius: 8px; background: var(--green-950); color: white; }
.skip-link:focus { transform: translateY(0); }
.topbar { height: 76px; padding: 0 clamp(20px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 11px 11px 11px 4px; background: var(--green-900); color: #f7f5e9; font-family: Georgia, serif; font-size: 23px; font-weight: 700; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 15px; letter-spacing: -.02em; color: var(--green-950); }
.brand-copy span { font-size: 11px; color: var(--muted); letter-spacing: .09em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 22px; }
.secure-label, .login-security { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.secure-dot { width: 7px; height: 7px; border-radius: 50%; background: #5d8b66; box-shadow: 0 0 0 3px #e6eee4; flex: 0 0 auto; }
.page-shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 54px 0 38px; }
.welcome-row, .panel-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.welcome-row { align-items: end; margin-bottom: 33px; }
.eyebrow { margin: 0 0 8px; color: var(--green-700); font-size: 10px; line-height: 1.3; font-weight: 750; letter-spacing: .14em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; color: var(--green-950); font-size: clamp(30px, 4vw, 39px); line-height: 1.1; font-weight: 650; letter-spacing: -.045em; }
h2 { margin: 0; color: var(--green-950); font-size: 20px; line-height: 1.25; font-weight: 650; letter-spacing: -.025em; }
h3 { color: var(--green-950); }
.intro-copy { max-width: 640px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.button { min-height: 40px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 7px; cursor: pointer; text-decoration: none; font-size: 13px; font-weight: 650; transition: background-color .16s, border-color .16s, color .16s, transform .16s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:focus-visible, .icon-button:focus-visible, input:focus-visible { outline: 3px solid #b2cfb8; outline-offset: 2px; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button-primary { background: var(--green-800); color: white; box-shadow: 0 3px 8px rgb(40 84 66 / 12%); }
.button-primary:hover:not(:disabled) { background: var(--green-900); }
.button-outline { background: transparent; color: var(--green-800); border-color: #bdcbbf; }
.button-outline:hover:not(:disabled), .button-quiet:hover:not(:disabled) { background: var(--green-50); border-color: #b8c9ba; }
.button-quiet { padding: 0 11px; border-color: transparent; background: transparent; color: #58655d; }
.button-small { min-height: 32px; padding: 0 10px; border-color: var(--line); background: white; font-size: 12px; }
.button-danger { background: var(--red-700); color: white; }
.button-danger:hover:not(:disabled) { background: #872c28; }
.button-plus { font-size: 19px; font-weight: 400; line-height: .8; }
.provider-panel { padding: 24px 27px 19px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 3px 12px rgb(27 48 38 / 3%); }
.panel-heading { margin-bottom: 10px; }
.panel-heading .eyebrow, .section-heading .eyebrow { margin-bottom: 6px; }
.panel-copy { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.provider-details { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 20px; margin: 0 0 17px; }
.provider-details div { min-width: 0; }
.provider-details dt, .detail-label { display: block; margin-bottom: 6px; color: #7a847d; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.provider-details dd { overflow: hidden; margin: 0; color: var(--ink); font-size: 13px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.status-inline { display: inline-flex; align-items: center; gap: 7px; }
.status-inline::before { width: 7px; height: 7px; border-radius: 50%; background: #c3ccc4; content: ""; }
.status-inline.is-ready::before { background: #4d815b; }
.status-inline.is-pending::before { background: #c28a32; }
.callback-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid #edf0eb; }
.callback-copy { min-width: 0; }
.callback-copy code { color: var(--green-900); font-size: 12px; overflow-wrap: anywhere; }
.inline-feedback { min-height: 0; margin: 7px 0 0; color: var(--green-800); font-size: 12px; }
.inline-feedback:empty { display: none; }
.connections-section { margin-top: 45px; }
.section-heading { margin-bottom: 17px; }
.count-label { color: #7a847d; font-size: 12px; }
.connections-list { display: grid; gap: 15px; }
.connection-card { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); box-shadow: 0 3px 12px rgb(27 48 38 / 3%); }
.connection-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; padding: 21px 23px 17px; }
.connection-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.connection-title { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.025em; }
.connection-url { max-width: 690px; overflow-wrap: anywhere; color: #748078; font-size: 12px; line-height: 1.5; }
.connection-meta { margin-top: 9px; color: #808a82; font-size: 11px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: #eff2ee; color: #657168; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status-pill::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.status-connected { background: #e8f2e9; color: #356846; }
.status-disabled { background: #f0f1ef; color: #737b74; }
.status-reauth { background: var(--amber-50); color: var(--amber-700); }
.status-not-connected { background: #edf0ed; color: #636f66; }
.connection-actions { display: flex; flex-wrap: wrap; justify-content: end; align-content: start; gap: 7px; }
.connection-actions .button { min-height: 34px; padding: 0 10px; font-size: 11px; }
.connection-tools { padding: 15px 23px 17px; border-top: 1px solid #edf0eb; background: #fcfcf8; }
.tools-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.tools-heading h4 { margin: 0; color: #5d685f; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.tools-note { margin: 0; color: #818a83; font-size: 11px; }
.tools-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.tool-option { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: start; gap: 9px; padding: 9px 10px; border: 1px solid #e8ece6; border-radius: 7px; background: white; }
.tool-option input { width: 15px; height: 15px; margin: 2px 0 0; accent-color: var(--green-800); }
.tool-option:has(input:disabled) { background: #f7f8f5; color: #858e87; }
.tool-option strong { display: block; margin-bottom: 3px; color: #354139; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.tool-option:has(input:disabled) strong { color: #737d75; }
.tool-option span { display: block; color: #7d877f; font-size: 11px; line-height: 1.45; }
.tools-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; }
.tool-feedback { min-height: 15px; margin: 0; color: #657168; font-size: 11px; }
.tool-feedback.error { color: var(--red-700); }
.empty-state { padding: 49px 24px; border: 1px dashed #cbd5ca; border-radius: 11px; background: rgb(255 254 250 / 65%); text-align: center; }
.empty-mark { width: 49px; height: 49px; margin: 0 auto 17px; display: flex; align-items: center; justify-content: center; gap: 4px; border-radius: 15px; background: var(--green-100); transform: rotate(-4deg); }
.empty-mark span { display: block; width: 5px; height: 20px; border-radius: 5px; background: var(--green-700); transform: rotate(4deg); }
.empty-mark span:nth-child(2) { height: 28px; opacity: .8; }
.empty-mark span:nth-child(3) { height: 14px; opacity: .6; }
.empty-state h3 { margin: 0 0 7px; font-size: 16px; }
.empty-state p { max-width: 430px; margin: 0 auto 19px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.page-feedback { min-height: 18px; margin: 13px 0 0; color: var(--green-800); font-size: 12px; }
.page-feedback.error { color: var(--red-700); }
.page-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 17px; border-top: 1px solid var(--line); color: #879087; font-size: 11px; }
.dialog-card { width: min(100% - 32px, 500px); max-width: 500px; max-height: min(90vh, 760px); padding: 0; overflow: auto; border: 1px solid #dce4dc; border-radius: 13px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 90px rgb(12 30 19 / 28%); }
.dialog-card::backdrop { background: rgb(14 31 22 / 48%); backdrop-filter: blur(2px); }
.dialog-form { padding: 26px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.dialog-heading .eyebrow { margin-bottom: 5px; }
.dialog-heading h2 { font-size: 21px; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #69746c; cursor: pointer; font-size: 25px; line-height: 1; }
.icon-button:hover { background: var(--green-50); }
.dialog-intro { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.field-label { display: block; margin: 15px 0 6px; color: #36443a; font-size: 12px; font-weight: 700; }
input[type="text"], input[type="password"], input[type="url"] { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #cfd8cf; border-radius: 7px; background: #fff; color: var(--ink); font-size: 13px; }
input::placeholder { color: #9aa39b; }
.field-hint { margin: 7px 0 0; color: #7b867e; font-size: 11px; line-height: 1.5; }
.form-error { min-height: 17px; margin: 8px 0 0; color: var(--red-700); font-size: 12px; }
.dialog-actions { display: flex; justify-content: end; gap: 8px; margin-top: 20px; padding-top: 15px; border-top: 1px solid #edf0eb; }
.dialog-compact { max-width: 420px; }
.dialog-compact .dialog-form { padding: 24px; }
.dialog-compact .dialog-intro { margin-bottom: 8px; }
.login-page { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(ellipse at 50% -10%, #e7ede4 0, var(--cream) 48%); }
.login-shell { width: min(100% - 32px, 430px); padding: 38px 0 28px; }
.login-brand { width: max-content; margin: 0 auto 25px; }
.login-card { padding: 34px 36px 29px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); box-shadow: var(--shadow); }
.login-card h1 { margin-bottom: 8px; font-size: 29px; }
.login-copy { margin-bottom: 23px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.login-card .field-label { margin-top: 14px; }
.login-submit { width: 100%; min-height: 45px; margin-top: 7px; }
.login-security { display: flex; justify-content: center; margin: 20px 0 0; font-size: 10px; }
.login-footer { margin: 19px 0 0; color: #8b948c; font-size: 11px; text-align: center; }
.login-footer span { padding: 0 5px; }

@media (max-width: 720px) {
  .topbar { height: 66px; padding: 0 18px; }
  .secure-label { display: none; }
  .page-shell { width: min(100% - 34px, 1120px); padding-top: 37px; }
  .welcome-row { align-items: start; flex-direction: column; gap: 19px; }
  .welcome-row > .button { align-self: stretch; }
  .provider-panel { padding: 20px 18px 15px; }
  .provider-details { grid-template-columns: 1fr; gap: 12px; }
  .connections-section { margin-top: 35px; }
  .connection-main { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
  .connection-actions { justify-content: start; }
  .connection-tools { padding: 14px 18px; }
  .tools-list { grid-template-columns: 1fr; }
  .page-footer { margin-top: 35px; }
}
@media (max-width: 440px) {
  .topbar-actions { gap: 2px; }
  .topbar-actions .button { padding: 0 8px; font-size: 12px; }
  .panel-heading, .section-heading { align-items: start; }
  .callback-row { align-items: start; }
  .callback-row .button { flex: 0 0 auto; }
  .page-footer { flex-direction: column; }
  .login-card { padding: 29px 23px 24px; }
  .dialog-form { padding: 22px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
