@font-face {
  font-family: Poppins;
  src: url('fonts/poppins-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url('fonts/poppins-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url('fonts/poppins-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url('fonts/poppins-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --navy: #0c2340;
  --mint: #b5e3d8;
  --purple: #6558b1;
  --paper: #f3f5f8;
  --surface: #fff;
  --surface-alt: #f8f9fc;
  --ink: #0c2340;
  --muted: #607087;
  --line: #e4e9f0;
  --accent-pale: #f0eef9;
  --sidebar-width: 248px;
}
* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.6 Poppins, system-ui, sans-serif; }
button, input, select { font: inherit; max-width: 100%; }
button { cursor: pointer; border: 0; background: none; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .65; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; object-fit: contain; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
::selection { background: var(--mint); color: var(--navy); }
.icon { width: 21px; height: 21px; flex-shrink: 0; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 10px 18px; border-radius: 8px; background: #fff; }
.skip-link:focus { top: 10px; }

/* Shared Sales visual language: navy navigation, original logo and white content. */
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 18px 12px 0; background: var(--navy); color: #fff; }
.sidebar-brand { display: block; padding: 0 10px 24px; }
.sidebar-brand img { display: block; width: 176px; height: 54px; }
.workspace-label { padding: 0 10px; margin: 4px 0 7px; color: #b6c1d0; font-size: .75rem; font-weight: 600; letter-spacing: .8px; }
.main-navigation { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid transparent; border-radius: 10px; color: #d7dfeb; text-align: left; font-size: .875rem; }
.nav-item .icon { width: 18px; height: 18px; }
.nav-item.active { background: rgb(255 255 255 / 8%); border-color: rgb(255 255 255 / 28%); color: #fff; font-weight: 600; }
.nav-item:hover { background: rgb(255 255 255 / 7%); color: #fff; }
.sidebar :focus-visible { outline-color: var(--mint); }
.nav-count { display: grid; place-items: center; min-width: 22px; height: 22px; margin-left: auto; padding: 0 4px; background: rgb(255 255 255 / 10%); border-radius: 5px; color: #d7dfeb; font-size: .75rem; }
.sidebar-bottom { margin-top: auto; padding-bottom: 82px; }
.sidebar-bottom .nav-item { font-size: .8125rem; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); min-height: 65px; margin-top: 10px; padding: 14px 10px; color: var(--muted); font-size: .75rem; }
.sidebar-footer img { width: 24px; height: 24px; border-radius: 6px; }

.workspace { margin-left: var(--sidebar-width); min-height: 100dvh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; height: 58px; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-title { font-size: .8125rem; color: var(--muted); white-space: nowrap; }
.topbar-title > span { margin: 0 10px; color: #a7b0be; }
.topbar-title strong { font-weight: 500; color: var(--ink); }
.header-date { color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; white-space: nowrap; }
.global-search { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 100px; max-width: 330px; margin-left: auto; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-alt); color: var(--muted); }
.global-search .icon { width: 17px; height: 17px; }
.global-search:focus-within { outline: 2px solid var(--purple); outline-offset: 1px; }
.global-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: .875rem; }
.global-search input::placeholder { color: var(--muted); }
.global-search kbd { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line); border-radius: 4px; font: 400 .75rem Poppins, sans-serif; }
.topbar-divider { width: 1px; height: 28px; background: var(--line); }
.profile-wrap { position: fixed; bottom: 12px; left: 12px; z-index: 40; width: calc(var(--sidebar-width) - 24px); padding: 10px 10px 0; border-top: 1px solid rgb(255 255 255 / 14%); color: #fff; }
.profile-button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0; text-align: left; white-space: nowrap; }
.profile-button:focus-visible { outline-color: var(--mint); }
.avatar { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; background: var(--mint); color: var(--navy); font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.profile-copy { display: grid; line-height: 1.5; }
.profile-copy { min-width: 0; flex: 1; }
.profile-copy strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: .8125rem; }
.profile-copy > span { color: #b6c1d0; font-size: .75rem; }
.profile-button > .icon { width: 15px; height: 15px; color: #b6c1d0; transform: rotate(180deg); }
.profile-panel { position: absolute; bottom: calc(100% + 10px); left: 0; width: 320px; max-width: calc(100vw - 32px); padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 10px 35px rgb(12 35 64 / 12%); font-size: .875rem; }
.profile-panel > strong, .profile-email { display: block; }
.profile-email { color: var(--muted); font-size: .8125rem; overflow-wrap: anywhere; }
.preference { display: flex; align-items: center; gap: 10px; margin-top: 15px; padding: 16px 0; border-top: 1px solid var(--line); font-size: .8125rem; }
input[type=checkbox] { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--purple); }
.logout-button { display: flex; align-items: center; gap: 10px; padding: 8px 0; text-align: left; color: var(--muted); font-size: .8125rem; }
.logout-button:hover { color: var(--purple); }
.mobile-brand, .mobile-nav { display: none; }
.preview-banner { padding: 4px 16px; border-bottom: 1px solid #eee6d4; background: #fffbf2; color: #6b5936; text-align: center; font-size: .75rem; }

/* Compact desktop launchers; appointments expand naturally with the selected day. */
.main-content { width: 100%; margin: 0 auto; padding: 24px 44px 12px; }
.date-line { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .75rem; }
.date-line .icon { width: 16px; height: 16px; color: var(--purple); }
.date-line span::first-letter { text-transform: uppercase; }
.welcome-banner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 5px 0 0; }
.welcome-copy { min-width: 0; }
.welcome-copy h1 { font-size: 1.875rem; font-weight: 700; line-height: 1.3; letter-spacing: -.6px; overflow-wrap: anywhere; }
.greeting-dot { color: var(--purple); }
.welcome-copy p { margin-top: 4px; color: var(--muted); font-size: 1rem; }
.start-day-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; min-height: 42px; padding: 10px 15px; border: 1px solid var(--navy); border-radius: 10px; background: var(--navy); color: #fff; font-size: .875rem; font-weight: 600; }
.start-day-button:hover { background: #203d5d; }
.start-day-button .icon { width: 18px; height: 18px; }

.favorites-section { display: flex; align-items: center; gap: 16px; min-height: 62px; margin-top: 18px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.favorites-section h2 { display: flex; align-items: center; gap: 7px; flex-shrink: 0; color: var(--muted); font-size: .875rem; font-weight: 500; }
.favorites-section h2 .icon { width: 16px; height: 16px; }
.quick-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.quick-link { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: .875rem; }
.quick-link:hover { border-color: #bcb3de; color: var(--purple); }
.quick-link .app-icon { width: 22px; height: 22px; border-radius: 5px; }
.quick-link .app-icon .icon { width: 14px; height: 14px; }
.text-button { padding: 6px 0; color: var(--purple); font-size: .875rem; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.favorites-section > .text-button { margin-left: auto; flex-shrink: 0; }
.favorites-hint { color: var(--muted); font-size: .875rem; }

.apps-section { margin-top: 20px; }
.apps-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.apps-heading-row h2 { font-size: 1.125rem; font-weight: 700; letter-spacing: -.25px; }
.app-total { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.app-filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.filter-buttons { display: flex; align-items: center; gap: 3px; }
.filter-button { display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 11px; border-radius: 7px; color: var(--muted); font-size: .875rem; white-space: nowrap; }
.filter-button.selected { background: #ebe8f6; color: #594b9d; font-weight: 500; }
.filter-button:hover:not(.selected) { background: #eceff4; }
.filter-button .icon { width: 16px; height: 16px; }
.filter-button > span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 4px; background: #fff; font-size: .75rem; }
.category-label { position: relative; display: flex; align-items: center; }
.category-label select { appearance: none; min-height: 36px; padding: 6px 33px 6px 11px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--muted); font-size: .875rem; cursor: pointer; }
.category-label .icon { position: absolute; right: 10px; width: 14px; height: 14px; pointer-events: none; color: var(--muted); }
.app-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.app-card { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgb(12 35 64 / 4%), 0 10px 28px rgb(12 35 64 / 5%); }
.app-card:hover { border-color: #b7bfce; box-shadow: 0 2px 6px rgb(12 35 64 / 5%), 0 10px 28px rgb(12 35 64 / 8%); }
.app-card-link { display: flex; flex-direction: column; height: 100%; min-height: 170px; padding: 17px 18px 13px; border-radius: 16px; }
.app-card-heading { display: flex; align-items: center; gap: 11px; padding-right: 62px; }
.app-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 9px; }
.app-icon > .icon { width: 22px; height: 22px; }
.mint { background: #ecf6f1; color: #397460; }
.purple { background: #f0edf8; color: #7161ae; }
.blue { background: #eef3fb; color: #4a71a4; }
.sand { background: #fcf4e8; color: #936f3d; }
.app-identity { display: block; min-width: 0; }
.app-card h3 { font-size: 1rem; font-weight: 600; letter-spacing: -.2px; line-height: 1.5; }
.app-category { display: block; color: var(--muted); font-size: .75rem; }
.app-card p { margin: 13px 0 12px; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.app-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; color: var(--purple); font-size: .875rem; }
.app-domain { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .75rem; }
.favorite-toggle { position: absolute; top: 13px; right: 11px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; color: #8b97a9; }
.favorite-toggle .icon { width: 17px; height: 17px; }
.favorite-toggle:hover { background: var(--accent-pale); color: var(--purple); }
.favorite-toggle.is-favorite { color: var(--purple); }
.favorite-toggle.is-favorite .icon { fill: #e8e2f6; }
.tile-move { position: absolute; top: 13px; right: 45px; z-index: 2; display: grid; place-items: center; width: 30px; height: 34px; border-radius: 7px; color: #8b97a9; cursor: grab; touch-action: none; }
.tile-move .icon { width: 17px; height: 17px; }
.tile-move:hover, .tile-move:focus-visible { background: var(--accent-pale); color: var(--purple); }
.app-card.is-moving { opacity: .65; border-style: dashed; border-color: var(--purple); background: var(--accent-pale); }
.app-card-link { cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tile-drag-preview { position: fixed; z-index: 80; margin: 0; pointer-events: none; box-shadow: 0 16px 40px rgb(12 35 64 / 22%); }
.tiles-moving, .tiles-moving * { cursor: grabbing !important; user-select: none; }
.tile-order-status { margin-top: 8px; color: var(--muted); font-size: .75rem; }
.unavailable { opacity: .6; }
.empty-state { padding: 34px 20px; border: 1px dashed var(--line); border-radius: 10px; background: #fff; text-align: center; }
.empty-state > .icon { width: 28px; height: 28px; margin-bottom: 12px; color: var(--purple); }
.empty-state h3 { font-size: 1rem; font-weight: 600; }
.empty-state p { margin: 8px auto 18px; max-width: 500px; color: var(--muted); font-size: 1rem; }
.button-secondary, .button-primary { min-height: 42px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: .875rem; }
.button-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.button-secondary:hover { background: var(--surface-alt); }
.button-primary:hover { background: #203d5d; }
.main-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.main-footer > span:last-child { display: flex; align-items: center; gap: 5px; }
.main-footer .icon { width: 14px; height: 14px; }

.icon-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 8px; color: var(--muted); }
.icon-button:hover { background: var(--surface-alt); }
dialog { position: fixed; width: calc(100% - 32px); max-width: 570px; max-height: calc(100dvh - 40px); padding: 28px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #fff; box-shadow: 0 20px 70px rgb(12 35 64 / 18%); }
dialog::backdrop { background: rgb(12 35 64 / 35%); }
.dialog-close { position: absolute; top: 12px; right: 12px; }
dialog > form > .app-icon { margin-bottom: 16px; }
dialog h2 { margin-bottom: 10px; padding-right: 14px; font-size: 1.25rem; }
dialog p, dialog li { color: var(--muted); font-size: 1rem; }
dialog ol { padding-left: 22px; }
dialog li + li { margin-top: 12px; }
dialog .button-primary { margin-top: 20px; }
.toast { position: fixed; bottom: 24px; left: calc(50% + var(--sidebar-width)/2); transform: translateX(-50%); z-index: 60; width: max-content; max-width: calc(100vw - var(--sidebar-width) - 40px); padding: 11px 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 5px 24px rgb(12 35 64 / 12%); color: var(--ink); font-size: .875rem; }

/* Sales login: soft canvas, white 448px card, navy logo tile and mint sign-in. */
.login-page { background: radial-gradient(circle at 0% 100%, rgb(181 227 216 / 35%), transparent 38%), radial-gradient(circle at 100% 0%, rgb(101 88 177 / 10%), transparent 40%), #f3f4f8; }
.login-layout { display: grid; place-items: center; min-height: 100dvh; padding: 32px 20px; }
.login-form-area { width: 100%; max-width: 448px; }
.login-card { padding: 36px; border: 1px solid #e4e6ee; border-radius: 22px; background: #fff; box-shadow: 0 24px 60px rgb(12 35 64 / 10%); }
.login-logo-tile { display: flex; align-items: center; justify-content: center; min-height: 105px; margin-bottom: 28px; padding: 18px 26px; border-radius: 14px; background: var(--navy); }
.login-logo { display: block; width: 230px; height: auto; }
.eyebrow { display: block; color: var(--purple); font-size: .75rem; font-weight: 700; letter-spacing: 1.2px; }
.login-card h1 { margin-top: 10px; font-size: 1.85rem; font-weight: 700; letter-spacing: -.4px; line-height: 1.2; }
.login-intro { margin: 12px 0 28px; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.microsoft-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 54px; padding: 14px 16px; border: 0; border-radius: 14px; background: var(--mint); box-shadow: 0 10px 24px rgb(181 227 216 / 40%); color: var(--navy); font-size: 1rem; font-weight: 700; }
.microsoft-button:hover { background: #a7dbcf; }
.microsoft-button > svg { flex-shrink: 0; }
.login-foot { margin-top: 28px; padding-top: 20px; border-top: 1px solid #e8eaf0; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.auth-message { margin: 13px 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-alt); color: var(--muted); font-size: .875rem; }
.auth-message.error { background: #fff1ef; border-color: #f3ccc6; color: #9c2c20; }
.preview-link { display: block; margin-top: 18px; text-align: center; color: var(--purple); font-size: .875rem; text-decoration: underline; text-underline-offset: 3px; }

/* Personal Outlook calendar, using the same two white panels as Sales. */
.admin-content { max-width: 1800px; padding-bottom: 36px; }
.admin-intro { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 4px 0 12px; }
.admin-intro h1 { font-size: 1.875rem; line-height: 1.3; letter-spacing: -.6px; }
.admin-intro p { margin-top: 6px; color: var(--muted); }
.admin-home-link { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: .875rem; color: var(--purple); }
.admin-scope-note { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: .875rem; margin-bottom: 22px; }
.admin-scope-note .icon { width: 18px; height: 18px; margin-top: 2px; }
.admin-panel { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgb(12 35 64 / 3%), 0 10px 28px rgb(12 35 64 / 4%); }
.admin-default { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.admin-default h2 { font-size: 1rem; }
.admin-default p { margin-top: 4px; color: var(--muted); font-size: .875rem; }
.admin-default form { display: flex; align-items: center; gap: 12px; }
.admin-content select, .admin-content input:not([type=checkbox]) { min-height: 42px; min-width: 0; width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: .875rem; }
.admin-content select { appearance: auto; }
.admin-default select { min-width: 200px; }
.admin-default .button-primary { white-space: nowrap; }
.admin-section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; margin: 0 0 14px; }
.admin-section-heading h2 { font-size: 1.25rem; }
.admin-section-heading h2 span { display: inline-block; margin-left: 5px; padding: 1px 7px; border-radius: 5px; background: #e8e4f6; color: var(--purple); font-size: .75rem; vertical-align: middle; }
.admin-section-heading p { color: var(--muted); font-size: .875rem; }
.admin-role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.admin-field { display: grid; gap: 6px; min-width: 0; font-size: .875rem; }
.admin-field > span { color: var(--muted); }
.admin-tile-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0 20px; padding: 0; border: 0; }
.admin-tile-choices legend { padding: 0 0 10px; color: var(--muted); font-size: .875rem; }
.admin-tile-choices label, .admin-member-roles label { display: inline-flex; align-items: center; gap: 8px; min-height: 25px; min-width: 0; overflow-wrap: anywhere; font-size: .875rem; }
.admin-tile-choices input, .admin-member-roles input { margin: 0; }
.admin-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-delete { color: #a33b44; font-size: .875rem; }
.admin-delete:hover { text-decoration: underline; }
.admin-new-role summary, .admin-add-member summary, .admin-audit summary { cursor: pointer; color: var(--purple); font-size: .875rem; font-weight: 500; }
.admin-new-role[open] summary { margin-bottom: 16px; }
.admin-members { margin-top: 30px; scroll-margin-top: 80px; }
.admin-search { width: 300px; max-width: 100%; }
.admin-member-list { display: grid; gap: 12px; }
.admin-member { display: grid; grid-template-columns: minmax(210px, 1fr) minmax(250px, 1.8fr) auto; align-items: center; gap: 24px; }
.admin-member-identity { min-width: 0; }
.admin-member-identity strong, .admin-member-identity > span { display: block; overflow-wrap: anywhere; }
.admin-member-identity strong { font-size: .875rem; font-weight: 600; }
.admin-member-identity > span { color: var(--muted); font-size: .8125rem; }
.admin-member-identity details { margin-top: 6px; color: var(--muted); font-size: .75rem; }
.admin-member-identity details summary { cursor: pointer; }
.admin-member-identity code { display: block; padding-top: 6px; overflow-wrap: anywhere; font-size: .75rem; }
.admin-assignment { min-width: 0; }
.admin-assignment .admin-field { max-width: 350px; }
.admin-member-roles { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0 0; padding: 0; border: 0; }
.admin-member-roles[disabled] { opacity: .5; }
.admin-member-hint { display: block; margin-top: 5px; color: var(--muted); font-size: .75rem; }
.admin-privilege { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .875rem; font-weight: 500; }
.admin-privilege input { margin: 0; }
.admin-add-member, .admin-audit { margin-top: 18px; }
.admin-add-member p { margin: 14px 0; color: var(--muted); font-size: .875rem; }
.admin-add-member form { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(180px, 2fr) auto; align-items: end; gap: 24px; }
.admin-add-member legend { margin-bottom: 6px; color: var(--muted); font-size: .875rem; }
.admin-muted { color: var(--muted); font-size: .875rem; }
.admin-admin-note { margin-top: 24px; }
.admin-storage { margin-bottom: 20px; font-size: .8125rem; }
.admin-storage summary { cursor: pointer; color: var(--purple); }
.admin-storage p { margin: 10px 0; color: var(--muted); }
.admin-storage > code { display: block; overflow-wrap: anywhere; }
.admin-notice { padding: 12px 16px; margin-bottom: 20px; border: 1px solid #a9ddcd; border-radius: 8px; background: #edfbf5; color: #1d644f; font-size: .875rem; }
.admin-audit ul { padding-left: 20px; color: var(--muted); font-size: .8125rem; }
.admin-audit li { margin-top: 8px; }
.admin-audit li > span { margin-left: 12px; }

.agenda-section { margin-top: 22px; }
.agenda-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.agenda-heading-row h2 { font-size: 1.375rem; letter-spacing: -.4px; }
.agenda-actions { display: flex; align-items: center; gap: 16px; }
.agenda-actions .button-primary { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 14px; font-weight: 600; }
.agenda-actions .text-button { font-size: .75rem; }
.agenda-layout { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 20px; align-items: start; }
.calendar-card, .agenda-day-card { min-width: 0; height: 314px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgb(12 35 64 / 3%), 0 10px 28px rgb(12 35 64 / 4%); }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.calendar-toolbar h3 { font-size: .875rem; font-weight: 600; }
.calendar-navigation { display: flex; align-items: center; gap: 2px; }
.calendar-navigation button { min-height: 30px; border-radius: 6px; padding: 2px 6px; font-size: .75rem; color: var(--muted); }
.calendar-navigation button:hover { background: var(--accent-pale); color: var(--purple); }
.calendar-navigation .calendar-nav-button { width: 25px; padding: 0; font-size: 1.5rem; line-height: 1; }
.calendar-legend { display: flex; justify-content: flex-end; gap: 10px; margin: 4px 0 8px; color: var(--muted); font-size: .625rem; }
.calendar-legend > span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.calendar-legend > span::before, .calendar-dots i { display: inline-block; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: #b7bec8; content: ''; }
.calendar-legend .teams::before, .calendar-dots .teams { background: #7164ed; }
.calendar-legend .customer::before, .calendar-dots .customer { background: #09b98a; }
.calendar-legend .office::before, .calendar-dots .office { background: #f25468; }
.calendar-dots .private { background: #abb0be; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar-weekdays { margin-bottom: 5px; text-align: center; color: var(--muted); font-size: .625rem; }
.calendar-day { position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; min-width: 0; height: 31px; padding: 3px 6px; border: 1px solid #f1f3f6; border-radius: 7px; background: #fdfdfe; font-size: .6875rem; line-height: 1; }
.calendar-day:hover { background: #f3f1fc; border-color: #b8afee; }
.calendar-day.is-today .calendar-day-number { color: #594b9d; font-weight: 700; }
.calendar-day.outside-month { color: #a4acb8; background: #fff; }
.calendar-day.is-selected { border: 2px solid #7164ed; padding: 2px 5px; background: #f0efff; color: var(--navy); }
.calendar-dots { display: flex; align-items: center; gap: 3px; height: 7px; }
.calendar-dots i { width: 5px; height: 5px; }
.calendar-more { font-size: .5625rem; line-height: 7px; color: var(--muted); }
.agenda-day-card { display: flex; flex-direction: column; height: auto; min-height: 314px; }
.agenda-day-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.agenda-day-heading h3 { font-size: .8125rem; font-weight: 400; color: var(--muted); }
.agenda-day-heading > span { font-size: .6875rem; color: var(--muted); white-space: nowrap; }
.agenda-events { min-width: 0; }
.agenda-event { padding: 11px 14px; border-left: 4px solid #cfd3dc; border-radius: 8px; background: #f6f7f9; }
.agenda-event + .agenda-event { margin-top: 8px; }
.agenda-event.teams { border-color: #8c81ef; background: #f7f5ff; }
.agenda-event.customer { border-color: #2acb9d; background: #f3fcf8; }
.agenda-event.office { border-color: #fa7585; background: #fff5f6; }
.agenda-event-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.agenda-event h4 { margin: 0; font-size: .8125rem; font-weight: 600; overflow-wrap: anywhere; }
.agenda-event-meta { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
.agenda-time { color: var(--muted); font-size: .6875rem; }
.agenda-badge { border: 1px solid #dfe3eb; border-radius: 20px; padding: 1px 9px; font-size: .625rem; line-height: 1.6; white-space: nowrap; }
.agenda-badge.teams { color: #5f50b4; background: #eeeaff; border-color: #d8d0fc; }
.agenda-badge.customer { color: #008665; background: #d7f9ed; border-color: #a1eacc; }
.agenda-badge.office { color: #b02e48; background: #ffe4e9; border-color: #fac2cc; }
.agenda-location { margin-top: 4px; color: #38536f; font-size: .75rem; overflow-wrap: anywhere; }
.agenda-event-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; font-size: .6875rem; color: var(--purple); }
.agenda-event-link:hover { text-decoration: underline; }
.agenda-notes { margin-top: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; background: rgb(255 255 255 / 75%); font-size: .75rem; }
.agenda-notes summary { cursor: pointer; color: var(--muted); font-size: .6875rem; }
.agenda-notes p { padding-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; color: #38536f; }
.agenda-status, .agenda-empty { margin: auto; padding: 25px; color: var(--muted); text-align: center; font-size: .875rem; }
.agenda-empty { padding-top: 70px; }
.calendar-connect { margin: auto; max-width: 440px; text-align: center; }
.calendar-connect .app-icon { width: 32px; height: 32px; margin-bottom: 8px; }
.calendar-connect h3 { font-size: 1rem; }
.calendar-connect p { margin: 7px 0 12px; color: var(--muted); font-size: .8125rem; }
.calendar-connect .button-primary { min-height: 38px; }
.calendar-retry { align-self: center; margin-bottom: 30px; }

@media (min-width: 1501px) {
  body[data-view=home] .main-content { padding-top: 16px; padding-bottom: 8px; }
  body[data-view=home] .welcome-copy h1 { font-size: 1.75rem; }
  body[data-view=home] .welcome-copy p { font-size: .875rem; }
  body[data-view=home] .welcome-banner { padding-top: 0; }
  body[data-view=home] .favorites-section { margin-top: 8px; min-height: 42px; padding: 4px 0; }
  body[data-view=home] .apps-section { margin-top: 12px; }
  body[data-view=home] .apps-heading-row { margin-bottom: 8px; }
  body[data-view=home] .app-filters { display: none; }
  body[data-view=home] .app-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
  body[data-view=home] .app-card-link { min-height: 100px; padding: 12px 16px; }
  body[data-view=home] .app-card-heading { gap: 9px; padding-right: 58px; }
  body[data-view=home] .app-card h3 { font-size: .9375rem; }
  body[data-view=home] .app-card .app-icon { width: 30px; height: 30px; border-radius: 7px; }
  body[data-view=home] .app-card .app-icon > .icon { width: 18px; height: 18px; }
  body[data-view=home] .app-category, body[data-view=home] .app-card-footer { display: none; }
  body[data-view=home] .app-card p { margin: 6px 0 0; font-size: .875rem; line-height: 1.45; }
  body[data-view=home] .favorite-toggle { top: 8px; right: 8px; width: 28px; height: 28px; }
  body[data-view=home] .favorite-toggle .icon { width: 15px; height: 15px; }
  body[data-view=home] .tile-move { top: 8px; right: 36px; width: 28px; height: 28px; }
  body[data-view=home] .agenda-section { margin-top: 14px; }
  body[data-view=home] .agenda-heading-row { margin-bottom: 8px; }
  body[data-view=home] .agenda-heading-row h2 { font-size: 1.25rem; }
  body[data-view=home] .agenda-actions .button-primary { min-height: 34px; padding: 6px 14px; }
  body[data-view=home] .calendar-card { height: 300px; }
  body[data-view=home] .agenda-day-card { min-height: 300px; }
  body[data-view=home] .calendar-day { height: 29px; }
  body[data-view=home] .main-footer { margin-top: 10px; padding-top: 6px; }
}
@media (min-width: 1501px) and (max-height: 860px) {
  body[data-view=home] .main-footer { display: none; }
}

@media (max-width: 1500px) {
  .admin-role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-member { grid-template-columns: minmax(180px, 1fr) minmax(200px, 1.5fr); }
  .admin-member > .button-primary { grid-column: 2; justify-self: start; }
  .admin-default { align-items: flex-start; flex-direction: column; gap: 14px; }
  .admin-add-member form { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .admin-add-member .button-primary { justify-self: start; }
  .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .main-content { padding-right: 25px; padding-left: 25px; }
  .app-domain { display: none; }
  .agenda-layout { grid-template-columns: 320px minmax(0, 1fr); gap: 16px; }
  .agenda-event-heading { flex-wrap: wrap; gap: 5px; }
  .agenda-event-meta { justify-content: flex-start; }
}
@media (max-width: 1150px) {
  :root { --sidebar-width: 210px; }
  .sidebar { padding-right: 10px; padding-left: 10px; }
  .sidebar-brand { padding-right: 10px; padding-left: 10px; }
  .topbar-title { display: none; }
  .global-search { margin-left: 0; max-width: none; }
  .header-date { display: none; }
  .welcome-banner { align-items: flex-start; }
  .welcome-copy h1 { font-size: 1.625rem; }
  .welcome-copy p { max-width: 540px; }
  .start-day-button { max-width: 175px; }
  .favorites-section { flex-wrap: wrap; gap: 10px 14px; }
  .quick-links { flex: 1; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agenda-layout { grid-template-columns: minmax(0, 1fr); }
  .calendar-card { height: auto; }
  .calendar-day { height: 44px; }
  .calendar-legend { font-size: .6875rem; }
}
@media (max-width: 760px) {
  .admin-role-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-member { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .admin-member > .button-primary { grid-column: 1; }
  .admin-intro { flex-wrap: wrap; }
  .admin-intro h1 { font-size: 1.625rem; }
  .admin-content .admin-default form { flex-wrap: wrap; }
  .admin-default select { min-width: 0; }
  .admin-panel { padding: 16px; }
  :root { --sidebar-width: 0px; }
  .sidebar { display: none; }
  .workspace { margin-left: 0; }
  .topbar { gap: 14px; height: 62px; padding: 0 18px; }
  .mobile-brand { display: block; flex-shrink: 0; line-height: 1; }
  .mobile-brand img { width: 32px; height: 32px; }
  .global-search { max-width: none; margin-right: 46px; }
  .profile-wrap { top: 12px; right: 16px; bottom: auto; left: auto; width: 38px; padding: 0; border: 0; color: var(--ink); }
  .profile-copy { display: none; }
  .profile-panel { top: 48px; right: 0; bottom: auto; left: auto; }
  .topbar-divider, .profile-button > .icon, .global-search kbd { display: none; }
  .main-content { padding: 20px 18px 90px; }
  .agenda-heading-row { align-items: flex-start; }
  .agenda-actions { gap: 8px; }
  .agenda-actions .button-primary { font-size: .75rem; padding: 8px 10px; }
  .agenda-actions .text-button { font-size: .6875rem; }
  .agenda-day-card { min-height: 260px; }
  .agenda-day-heading { align-items: flex-start; }
  .agenda-day-heading h3 { font-size: .75rem; }
  .agenda-event-meta { flex-wrap: wrap; }
  .calendar-card, .agenda-day-card { padding: 14px; }
  .welcome-banner { gap: 14px; flex-wrap: wrap; }
  .welcome-copy h1 { font-size: 1.625rem; }
  .welcome-copy p { font-size: 1rem; }
  .start-day-button { max-width: none; margin-top: 2px; }
  .favorites-section { margin-top: 18px; padding: 12px 0; }
  .favorites-section h2 { width: calc(100% - 95px); }
  .favorites-section > .text-button { order: 1; }
  .favorites-section > .quick-links { order: 2; flex-basis: 100%; }
  .app-filters { gap: 10px; flex-wrap: wrap; }
  .app-grid { gap: 12px; }
  .app-card-link { padding: 16px; }
  .app-card p { font-size: 1rem; }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 35; display: flex; justify-content: space-around; min-height: 66px; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: #fff; }
  .mobile-nav > button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; flex: 1; min-height: 65px; color: var(--muted); font-size: .75rem; }
  .mobile-nav > button[aria-current=page] { color: var(--purple); background: #f7f5fc; }
  .toast { bottom: 82px; left: 50%; max-width: calc(100vw - 32px); }
}
@media (max-width: 520px) {
  .app-grid { grid-template-columns: minmax(0, 1fr); }
  .app-card-link { min-height: 160px; }
  .app-domain { display: inline; }
  .category-label, .category-label select { width: 100%; }
  .filter-buttons { flex-wrap: wrap; }
  .filter-button { padding-right: 8px; padding-left: 8px; }
  .topbar { gap: 10px; padding: 0 14px; }
  .global-search { padding: 7px 9px; }
  .global-search input { font-size: .8125rem; }
  .main-content { padding-right: 16px; padding-left: 16px; }
  .agenda-heading-row { flex-wrap: wrap; }
  .agenda-heading-row h2 { font-size: 1.25rem; }
  .calendar-day { padding-left: 4px; padding-right: 4px; }
  .calendar-day.is-selected { padding-left: 3px; padding-right: 3px; }
  .preview-banner { font-size: .6875rem; }
  .login-layout { padding: 20px 14px; }
  .login-card { padding: 28px; }
  .login-logo-tile { padding: 18px; }
  .login-logo { width: 230px; }
  .login-card h1 { font-size: 1.65rem; }
  .microsoft-button { padding: 13px 10px; gap: 9px; font-size: .875rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
