:root {
  color-scheme: light;
  --background: #f5f4f8;
  --surface: #fff;
  --ink: #201a2c;
  --muted: #625a6e;
  --line: #e6e1ec;
  --rail: #191424;
  --accent: #8c287f;
  --accent-hover: #74216a;
  --focus: #a63298;
  --good: #126347;
  --warn: #875514;
  --danger: #a32949;
  font: 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
button:not(:disabled) { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
.ms-preview-controls button[aria-disabled="true"] { cursor: wait; opacity: .62; }
#entra-planner-reset, #entra-query-reset { margin-top: .5rem; }
#entra-planner-reset:disabled, #entra-query-reset:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.skip { position: fixed; z-index: 5; left: 12px; top: -60px; padding: 8px 14px; background: white; }
.skip:focus { top: 10px; }
.rail { position: fixed; inset: 0 auto 0 0; width: 236px; display: flex; flex-direction: column; background: var(--rail); color: #eee9f5; padding: 28px 18px 20px; }
.brand { display: inline-block; width: 150px; margin: 5px 0 46px 11px; }
.brand img { display: block; width: 100%; }
.nav { display: grid; gap: 7px; }
.nav-group { display: grid; gap: 3px; margin-top: 6px; }
.nav-group > span { color: #b5a8c1; font-size: 12px; padding: 5px 13px 0; }
.toolbar { display: flex; align-items: center; gap: 12px; }
.search { position: relative; }
.search input { width: min(260px, 28vw); min-height: 38px; border: 1px solid #d6cddd; border-radius: 8px; color: var(--ink); padding: 6px 10px; background: #faf8fb; }
.search-results { position: absolute; z-index: 4; inset: calc(100% + 5px) 0 auto; min-width: 185px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 10px 24px #2d183729; padding: 5px; }
.search-results a, .search-results p { display: block; padding: 8px; }
.search-results a:hover { background: #f4ecf5; text-decoration: none; }
.nav a, .workspace-link { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 9px 13px; border-radius: 9px; color: #d4cbdf; font-weight: 600; }
.nav a:hover, .workspace-link:hover { text-decoration: none; background: #30263d; color: white; }
.nav a[aria-current="page"] { background: #3f2850; color: #fff; box-shadow: inset 3px 0 #e174cd; }
.nav-icon { width: 16px; height: 16px; flex: none; position: relative; display: inline-block; color: #cfb8de; }
.grid-icon { border: 1.5px solid currentColor; border-radius: 3px; background: linear-gradient(90deg, transparent 44%, currentColor 44% 55%, transparent 55%), linear-gradient(transparent 44%, currentColor 44% 55%, transparent 55%); }
.spark-icon { background: currentColor; clip-path: polygon(50% 0,61% 37%,100% 50%,61% 62%,50% 100%,38% 62%,0 50%,38% 37%); }
.square-icon { border: 1.5px solid currentColor; border-radius: 3px; box-shadow: inset 0 4px currentColor; }
.list-icon { border-block: 1.5px solid currentColor; background: linear-gradient(transparent 43%, currentColor 43% 54%, transparent 54%); }
.circle-icon { border: 1.5px solid currentColor; border-radius: 50%; background: radial-gradient(circle, currentColor 2px, transparent 2.5px); }
.workspace-link { margin-top: auto; }
main { margin-left: 236px; min-height: 100vh; }
.top { position: sticky; top: 0; z-index: 2; height: 73px; padding: 0 clamp(22px, 4vw, 54px); display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.top strong { font-weight: 680; letter-spacing: -.015em; }
.content { max-width: 1330px; padding: 34px clamp(22px, 4vw, 54px) 60px; margin: auto; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(34px, 4.3vw, 56px); line-height: 1.08; letter-spacing: -.047em; font-weight: 730; }
h2 { font-size: 20px; font-weight: 690; letter-spacing: -.023em; line-height: 1.25; }
p { line-height: 1.55; }
.page-head { margin: 8px 0 24px; }
.page-head p { color: var(--muted); margin-top: 12px; }
.overview { display: grid; gap: 20px; }
.hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; min-height: 252px; border-radius: 22px; padding: clamp(24px, 5vw, 50px); isolation: isolate; color: #fff; background: radial-gradient(ellipse at 100% 110%, #64285e 0, transparent 59%), linear-gradient(110deg, #24172f 20%, #41234d 100%); }
.hero::after { content: ""; position: absolute; width: 435px; aspect-ratio: 1; right: -175px; bottom: -295px; border: 1px solid #bd75b955; border-radius: 50%; box-shadow: 0 0 0 22px #bd75b91a, 0 0 0 48px #bd75b917, 0 0 0 77px #bd75b912; z-index: -1; }
.hero p { margin: 13px 0 23px; color: #e8d9ec; max-width: 39ch; }
.hero img { width: clamp(92px, 17vw, 162px); margin-right: 22px; }
.hero .primary { background: #f1d8f1; color: #442243; }
.hero .primary:hover { background: #fff0fa; }
.quick-grid, .provider-grid { display: grid; gap: 16px; align-items: start; }
.quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.provider-cards { display: grid; gap: 16px; min-width: 0; }
.provider-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 3px 13px #2d183707; min-width: 0; }
.padded { padding: clamp(18px, 2.5vw, 28px); }
.quick { padding: 20px 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; color: var(--ink); min-height: 130px; }
.quick:hover { border-color: #bc87b9; text-decoration: none; }
.quick > span:first-child { color: var(--muted); font-size: 13px; font-weight: 620; }
.quick strong { font-size: 19px; line-height: 1.3; }
.quick .pill { margin-top: auto; }
.quick-status { display: flex; gap: 5px; flex-wrap: wrap; }
.pill { display: inline-flex; gap: 6px; align-items: center; padding: 3px 9px; border-radius: 30px; font-size: 12px; font-weight: 670; color: #5f5269; background: #f0edf4; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill[data-tone="good"] { color: var(--good); background: #e8f5ed; }
.pill[data-tone="warn"] { color: var(--warn); background: #fbf1e2; }
.pill[data-tone="bad"] { color: var(--danger); background: #faeaf0; }
.section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; }
.section-head a, .card > a { font-weight: 630; }
.muted { color: var(--muted); margin: 10px 0 16px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 43px; padding: 8px 13px; border: 1px solid transparent; border-radius: 8px; font-weight: 680; text-decoration: none; line-height: 1.2; }
.button:hover { text-decoration: none; }
.primary { background: var(--accent); color: #fff; }
.primary:hover { background: var(--accent-hover); }
.secondary { color: #61275d; background: #faf5fa; border-color: #e9dcec; }
.secondary:hover { background: #f2e8f3; }
.quiet { background: transparent; color: var(--danger); }
.quiet:hover { background: #faedf1; }
.danger { background: var(--danger); color: #fff; }
.key-form { display: grid; gap: 9px; }
.key-form label { font-weight: 670; }
.field-row { display: flex; gap: 8px; }
.field-row input { min-width: 0; flex: 1; border: 1px solid #d6cddd; border-radius: 8px; background: #fff; color: var(--ink); padding: 10px 12px; }
.field-row input::placeholder { color: #736a7d; }
.form-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; }
.feedback { min-height: 23px; color: var(--muted); }
.feedback[data-tone="good"] { color: var(--good); }
.feedback[data-tone="bad"] { color: var(--danger); }
.integration-list { margin: 0 0 17px; }
.integration-list div, .run-row { display: grid; grid-template-columns: minmax(118px, .8fr) minmax(0, 1.6fr) auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.integration-list div:last-child, .run-row:last-child { border-bottom: none; }
.integration-list dt, .run-row strong { font-weight: 670; }
.integration-list dd { margin: 0; color: var(--muted); }
.run-list { margin-top: 8px; }
.run-list > p { padding: 12px 0; color: var(--muted); }
.run-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; }
.run-row > span:not(.pill) { color: var(--muted); }
.connection-error { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 14px; margin-bottom: 18px; border: 1px solid #edc9d5; background: #fbecf1; color: var(--danger); border-radius: 10px; }
dialog { border: 1px solid var(--line); border-radius: 15px; color: var(--ink); padding: 25px; width: min(430px, calc(100% - 28px)); }
dialog::backdrop { background: #1a1325a0; }
dialog p { margin: 10px 0 15px; color: var(--muted); }
@media (max-width: 1030px) {
  .rail { width: 192px; }
  main { margin-left: 192px; }
  .provider-grid { grid-template-columns: 1fr; }
}
@media (max-width: 710px) {
  .rail { position: static; width: auto; padding: 13px 14px 8px; }
  .brand { width: 114px; margin: 0 0 8px; }
  .nav, .nav-group { display: flex; flex-wrap: wrap; gap: 2px 4px; }
  .nav-group { margin: 0; }
  .nav-group > span { display: none; }
  .nav a, .workspace-link { min-height: 40px; padding: 7px 8px; font-size: 13px; }
  .nav a[aria-current="page"] { box-shadow: inset 0 -2px #e174cd; }
  .nav-icon { display: none; }
  .workspace-link { padding-left: 4px; }
  main { margin: 0; }
  .top { height: auto; min-height: 54px; padding: 9px 15px; flex-wrap: wrap; }
  .toolbar { margin-left: auto; }
  .search input { width: min(175px, 45vw); }
  .search-results { right: auto; }
  .content { padding: 18px 15px 36px; }
  .hero { min-height: 218px; border-radius: 16px; }
  .hero img { width: 68px; margin: 0; align-self: flex-start; }
  .quick-grid { grid-template-columns: 1fr; gap: 10px; }
  .quick { min-height: 0; padding: 15px; }
  .integration-list div, .run-row { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 9px; }
  .integration-list div dd:nth-child(2), .run-row > span:not(.pill) { grid-row: 2; grid-column: 1 / -1; }
}

.model-fields { border: 0; padding: 0; margin: 0; min-inline-size: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.model-heading { margin: 1.7rem 0 .9rem; flex-wrap: wrap; gap: .65rem; }
.model-heading h2, .model-rule h3 { margin: 0; }
.model-budgets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.model-fields label { display: block; font-weight: 650; margin-bottom: .35rem; }
.model-fields :is(input, select) { width: 100%; min-width: 0; border: 1px solid #cfc7d9; border-radius: .5rem; padding: .65rem; background: white; color: inherit; font: inherit; }
.model-fields :is(input, select):focus-visible { outline: 2px solid #86257d; outline-offset: 2px; }
.model-balance { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1rem; margin: 1rem 0 0; font-variant-numeric: tabular-nums; }
.model-balance dd { margin: 0; font-weight: 650; }
.model-rule + .model-rule { border-top: 1px solid #e6dfed; margin-top: 1rem; padding-top: 1rem; }
.model-rule-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .75rem; }
.model-actions { margin-top: 1rem; }
@media (max-width: 720px) {
  .model-budgets, .model-rule-fields { grid-template-columns: 1fr; }
  .model-balance { gap: .4rem .6rem; }
}

.budget-booking-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.budget-booking { border: 1px solid var(--line); border-radius: .65rem; padding: .9rem; min-width: 0; }
.budget-booking-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.budget-booking p { margin: .35rem 0 0; }
@media (max-width: 760px) {
  .budget-booking-list { grid-template-columns: 1fr; }
}

.ms-field, .ms-items:not(:empty) { margin-top: 1rem; }
.microsoft-pilot .section-head { flex-wrap: wrap; gap: .5rem; }
.microsoft-pilot code { overflow-wrap: anywhere; }
.ms-item { border-top: 1px solid var(--line); padding: .9rem 0; }
.ms-item summary { cursor: pointer; font-weight: 650; overflow-wrap: anywhere; }
.ms-item p { white-space: pre-wrap; overflow-wrap: anywhere; }
.ms-item textarea { width: 100%; min-height: 6rem; font: inherit; padding: .55rem; }

#ms-access summary { cursor: pointer; font-weight: 650; }

#ms-access-details dd,
#ms-write-details dd {
  margin: 0 0 .75rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.roles-page { width: min(100%, 64rem); margin: 0 auto; padding: clamp(1rem, 4vw, 3rem); }
.roles-page h2 { margin-top: 0; }
.roles-page form label:not(:first-child) { margin-top: .75rem; }
.roles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: .85rem; }
.roles-grid article { min-width: 0; overflow-wrap: anywhere; }
.roles-grid textarea { width: 100%; min-height: 5rem; font: inherit; }
.operation-log { list-style: none; padding: 0; margin-bottom: 0; }
.operation-log li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .35rem 1rem; padding-block: .65rem; border-top: 1px solid var(--line); }

.ms-preview-controls { margin-block: 8px; }
.ms-preview-controls p:empty { display: none; }
.ms-preview-thread { padding-inline-start: 1.5rem; }
.ms-preview-thread li + li { margin-top: .6rem; }
.ms-attachment-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.planner-overdue { color: #9d2042; font-weight: 650; }

#routine-settings { margin-block: 1rem; }
#routine-settings fieldset { min-inline-size: 0; padding: .8rem; border: 1px solid #cfc7d9; border-radius: .5rem; }
#routine-settings label { display: block; margin-block: .4rem; }
#routine-cases input { inline-size: auto; margin-inline: 0 .35rem; }
#routine-settings button { margin-block-start: .8rem; }
