:root {
  --navy: #0a3153;
  --navy-2: #124a70;
  --ink: #142332;
  --muted: #667789;
  --line: #dce5eb;
  --paper: #ffffff;
  --canvas: #f3f6f8;
  --teal: #00a79d;
  --teal-dark: #087e79;
  --orange: #f47b42;
  --red: #dc3545;
  --amber: #d78a16;
  --green: #138a5b;
  --shadow: 0 12px 38px rgba(10, 49, 83, .09);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { font-family: "Segoe UI", "Noto Sans Thai", Tahoma, sans-serif; color: var(--ink); background: var(--canvas); }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 7px; color: #9bdcd6; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.eyebrow.dark { color: var(--teal-dark); }
.mobile-only, .mobile-logo { display: none; }

.auth-view { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; background: var(--paper); }
.auth-brand { position: relative; overflow: hidden; padding: 72px clamp(50px, 8vw, 130px); display: flex; flex-direction: column; justify-content: space-between; color: white; background: var(--navy); }
.auth-brand::before { content: ""; position: absolute; width: 470px; height: 470px; border: 90px solid rgba(0, 167, 157, .13); border-radius: 50%; right: -240px; top: -180px; }
.auth-brand::after { content: ""; position: absolute; width: 260px; height: 260px; border: 1px solid rgba(255,255,255,.15); transform: rotate(28deg); left: -155px; bottom: -150px; }
.brand-logo { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: #d8e8ee; }
.brand-product, .brand-company { display: flex; align-items: center; }
.brand-product { gap: 15px; }
.brand-product span { display: grid; gap: 3px; }
.brand-product strong { color: white; font-size: 17px; letter-spacing: .01em; }
.brand-product small { color: #9bdcd6; font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.brand-app-icon { width: 78px; height: 78px; border-radius: 18px; object-fit: cover; box-shadow: 0 12px 30px rgba(0,0,0,.22); }
.brand-company { gap: 9px; color: #91aabd; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.brand-company img { width: 72px; height: 72px; border: 4px solid rgba(255,255,255,.16); border-radius: 14px; object-fit: contain; background: white; box-shadow: 0 10px 28px rgba(0,0,0,.16); }
.auth-brand h1 { position: relative; z-index: 1; margin: 0; max-width: 620px; font-size: clamp(42px, 5vw, 72px); line-height: 1.05; letter-spacing: -.045em; font-weight: 650; }
.auth-lead { position: relative; z-index: 1; max-width: 570px; margin: 28px 0 0; color: #c9dae7; font-size: 17px; line-height: 1.8; }
.auth-proof { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.16); }
.auth-proof div { display: grid; gap: 5px; }
.auth-proof strong { font-size: 12px; color: #68d4cc; }
.auth-proof span { color: #d6e2ea; font-size: 13px; }
.auth-panel { display: grid; place-items: center; padding: 50px; overflow-y: auto; }
.auth-card { width: min(100%, 480px); }
.auth-card h2 { margin: 0; font-size: 34px; letter-spacing: -.03em; }
.auth-card > .muted { margin: 10px 0 30px; }
.auth-switch { text-align: center; color: var(--muted); margin-top: 22px; }
.link-button { border: 0; background: none; color: var(--teal-dark); font-weight: 700; padding: 3px; }

.form-stack { display: grid; gap: 18px; }
.form-stack.compact { gap: 14px; }
label { display: grid; gap: 7px; color: #34495a; font-size: 13px; font-weight: 650; }
input, select, textarea { width: 100%; border: 1px solid #cdd9e1; border-radius: 9px; background: white; color: var(--ink); padding: 11px 12px; outline: none; transition: border .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,167,157,.12); }
input[readonly] { color: #42586a; background: #f3f7f9; }
textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 56px; }
.password-toggle { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); border: 0; background: #edf4f5; color: var(--teal-dark); border-radius: 6px; padding: 5px 9px; font-size: 12px; font-weight: 700; }
.password-strength { display: flex; gap: 9px; align-items: center; margin-top: -5px; color: var(--muted); font-size: 11px; }
.password-strength i { display: block; width: 42px; height: 4px; border-radius: 8px; background: #d7e0e6; }
.password-strength.ok i { background: var(--green); }
.password-strength.ok span { color: var(--green); }
.identity-status { padding: 10px 12px; border: 1px dashed #b8cad5; border-radius: 9px; color: var(--muted); background: #f7fafb; font-size: 11px; line-height: 1.5; }
.identity-status.ok { border-style: solid; border-color: #a8d9c7; color: var(--green); background: #edf9f4; }
.required-mark { display: inline; color: var(--red); font-weight: 800; }
.field-label { display: inline; }
.required-note { margin: -4px 0 0; color: var(--muted); font-size: 11px; }
.check-row { display: flex; flex-wrap: wrap; gap: 24px; }
.check-row label { display: flex; align-items: center; gap: 8px; }
.check-row input { width: 16px; height: 16px; }

.button { border: 0; border-radius: 9px; padding: 10px 16px; font-weight: 700; font-size: 13px; transition: transform .15s, background .15s, opacity .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button.primary { color: white; background: var(--teal-dark); }
.button.primary:hover { background: #056c69; }
.button.secondary { color: var(--navy); background: #e8f1f5; }
.button.quiet { color: #405469; background: #eef3f6; }
.button.danger { color: white; background: var(--red); }
.button.full { width: 100%; padding: 13px 18px; }
.icon-button { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--navy); font-size: 18px; }

.app-view { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 230px; display: flex; flex-direction: column; padding: 27px 18px 18px; color: white; background: var(--navy); }
.logo { display: grid; grid-template-columns: 50px 1fr 34px; align-items: center; gap: 9px; padding: 0 2px 25px; font-size: 14px; line-height: 1.2; }
.sidebar-app-icon { width: 50px; height: 50px; border-radius: 13px; object-fit: cover; box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.sidebar-company-logo { width: 34px; height: 34px; border: 2px solid rgba(255,255,255,.15); border-radius: 8px; object-fit: contain; background: white; }
.logo strong { color: #8ed9d4; font-weight: 650; }
.logo small { display: block; margin-top: 4px; color: #86a8bd; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 7px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 9px; padding: 11px 13px; color: #bad0de; background: transparent; text-align: left; }
.nav-item b { width: 24px; text-align: center; color: #77aaa9; font-size: 17px; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.1); }
.nav-item.active { box-shadow: inset 3px 0 var(--teal); }
.nav-item.active b { color: #7be0d8; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 14px; }
.sync-state { display: flex; align-items: center; gap: 10px; margin: 0 10px; padding: 13px 0; border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12); }
.sync-state i { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(215,138,22,.13); }
.sync-state i.ok { background: #55d69f; box-shadow: 0 0 0 4px rgba(85,214,159,.13); }
.sync-state div { display: grid; gap: 2px; }
.sync-state strong { font-size: 12px; }
.sync-state small { color: #9fb8c7; font-size: 10px; }
.workspace { min-width: 0; grid-column: 2; }
.topbar { height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 32px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.topbar h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.identity-button { white-space: nowrap; }
.identity-button.linked { color: var(--green); background: #e7f6ef; }
.user-chip { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-left: 1px solid var(--line); }
.user-chip > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--navy); font-weight: 800; }
.user-chip div { display: grid; gap: 2px; }
.user-chip strong { font-size: 12px; }
.user-chip small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.content-view { padding: 26px 30px 40px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; align-items: end; min-height: 105px; padding: 19px 20px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 3px 14px rgba(11,48,83,.04); }
.stat-card::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #a7b7c3; }
.stat-card.accent::after { background: var(--teal); }
.stat-card.warning::after { background: var(--orange); }
.stat-card p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12px; font-weight: 650; }
.stat-card strong { font-size: 31px; letter-spacing: -.04em; }
.stat-card span { color: var(--muted); font-size: 11px; padding-bottom: 4px; }

.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.calendar-card, .agenda-card, .table-card, .person-panel { border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.calendar-toolbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.month-nav, .calendar-actions { display: flex; align-items: center; gap: 8px; }
.calendar-actions { flex-wrap: wrap; justify-content: flex-end; }
.month-nav h3 { margin: 0 0 0 10px; min-width: 155px; font-size: 18px; }
.select-wrap select { min-width: 180px; padding: 9px 34px 9px 11px; }
.weekday-row, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekday-row { border-bottom: 1px solid var(--line); background: #f8fafb; }
.weekday-row span { padding: 10px; color: var(--muted); font-size: 11px; font-weight: 750; text-align: center; }
.calendar-grid { min-height: 610px; }
.calendar-day { min-width: 0; min-height: 112px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: white; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.outside { background: #f8fafb; color: #a9b5be; }
.calendar-day.selected { background: #f1faf9; box-shadow: inset 0 0 0 2px rgba(0,167,157,.3); }
.calendar-day.today .day-number { color: white; background: var(--teal-dark); }
.day-number { width: 26px; height: 26px; display: grid; place-items: center; margin: 0 0 6px auto; border-radius: 50%; font-size: 11px; font-weight: 700; }
.calendar-event { width: 100%; display: block; overflow: hidden; margin: 4px 0; padding: 5px 6px; border: 0; border-left: 3px solid var(--event-color, var(--teal)); border-radius: 5px; color: #203345; background: color-mix(in srgb, var(--event-color, var(--teal)) 12%, white); font-size: 10px; line-height: 1.3; text-align: left; white-space: nowrap; text-overflow: ellipsis; }
.calendar-event time { margin-right: 4px; font-weight: 800; }
.more-events { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; text-align: center; }
.calendar-legend { display: flex; gap: 20px; padding: 13px 18px; color: var(--muted); font-size: 10px; }
.calendar-legend span { display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: #98a8b5; }
.dot.confirmed { background: var(--teal); }.dot.pending { background: var(--amber); }.dot.completed { background: var(--green); }.dot.conflict { background: var(--red); }

.agenda-card { min-height: 420px; padding: 18px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.section-heading h3 { margin: 0; font-size: 17px; }
.count-pill { min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--navy); background: #e7f2f5; font-size: 11px; font-weight: 800; }
.agenda-list { display: grid; gap: 10px; margin-top: 18px; }
.agenda-item { width: 100%; display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: white; text-align: left; }
.agenda-time { color: var(--teal-dark); font-size: 11px; font-weight: 800; }
.agenda-item strong { display: block; overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.agenda-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.empty-state { min-height: 240px; place-items: center; color: var(--muted); text-align: center; }

.split-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.admin-sync-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.split-heading h3 { margin: 0; font-size: 25px; }
.split-heading p:last-child { margin: 7px 0 0; font-size: 13px; }
.search-box { min-width: 280px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: white; }
.search-box input { border: 0; box-shadow: none; padding-left: 0; }
.team-filters { display: flex; align-items: center; gap: 10px; }
.team-filters .select-wrap select { min-width: 210px; }
.team-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.person-card { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: white; text-align: left; }
.person-card:hover, .person-card.active { border-color: var(--teal); box-shadow: 0 7px 22px rgba(0,167,157,.1); }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--navy); background: #e6f2f4; font-size: 13px; font-weight: 800; }
.person-card strong { display: block; overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.person-card small { color: var(--muted); font-size: 10px; }
.person-card > span:last-child { color: #9babb6; }
.department-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding: 11px 14px; border-left: 4px solid var(--teal); border-radius: 7px; background: #eaf6f5; }
.department-heading:first-child { margin-top: 0; }
.department-heading div { display: flex; align-items: baseline; gap: 9px; }.department-heading span { color: var(--teal-dark); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }.department-heading strong { font-size: 13px; }.department-heading b { color: var(--muted); font-size: 10px; }
.person-panel { position: sticky; top: 18px; min-height: 470px; padding: 20px; }
.empty-person { min-height: 400px; display: grid; place-content: center; text-align: center; color: var(--muted); }
.empty-person > span { color: var(--teal); font-size: 38px; }.empty-person h3 { margin: 15px 0 5px; color: var(--ink); }
.person-head { display: grid; grid-template-columns: 50px 1fr; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.person-head .avatar { width: 50px; height: 50px; }
.person-head h3 { margin: 3px 0; font-size: 16px; }.person-head p { margin: 0; color: var(--muted); font-size: 11px; }
.work-section { margin-top: 20px; }.work-section h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.work-item { position: relative; padding: 10px 10px 10px 16px; border-left: 2px solid var(--teal); background: #f7fafb; margin: 8px 0; }
.work-item strong { display: block; font-size: 11px; }.work-item small { color: var(--muted); font-size: 10px; }
.source-pill { display: inline-block; margin-top: 4px; padding: 2px 6px; border-radius: 8px; background: #e9eef2; color: #556778; font-size: 8px; font-weight: 800; }

.admin-tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.admin-tabs button { position: relative; border: 0; border-bottom: 2px solid transparent; padding: 11px 15px; background: transparent; color: var(--muted); font-weight: 700; font-size: 12px; }
.admin-tabs button.active { border-color: var(--teal); color: var(--navy); }
.admin-tabs span { min-width: 18px; height: 18px; display: inline-grid; place-items: center; margin-left: 4px; border-radius: 9px; color: white; background: var(--orange); font-size: 9px; }
.table-card { overflow: hidden; }
.panel-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel-toolbar h3 { margin: 0; font-size: 15px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 10px 14px; color: var(--muted); background: #f7f9fa; font-size: 10px; text-align: left; text-transform: uppercase; letter-spacing: .06em; }
.data-table td { padding: 12px 14px; border-top: 1px solid var(--line); font-size: 11px; vertical-align: middle; }
.data-table tr:hover td { background: #fbfcfd; }
.data-table select { min-width: 115px; padding: 7px; font-size: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 12px; background: #edf1f4; color: #536879; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.status-pill.active, .status-pill.success, .status-pill.completed { color: #0d7049; background: #dff5ea; }
.status-pill.pending { color: #9a650b; background: #fff2d9; }
.status-pill.suspended, .status-pill.failed, .status-pill.cancelled { color: #aa2530; background: #fde5e7; }
.reason-swatch { width: 9px; height: 9px; display: inline-block; margin-right: 7px; border-radius: 50%; background: var(--swatch); }
.loading { padding: 50px; color: var(--muted); text-align: center; }
.integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.integration-card { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.integration-card:first-child { grid-column: 1 / -1; border-color: #9ed8d4; background: #f4fbfa; }
.integration-card header { display: flex; align-items: center; justify-content: space-between; }.integration-card h3 { margin: 0; font-size: 17px; }
.integration-card p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.integration-meta { margin-top: 18px; display: grid; gap: 8px; }.integration-meta div { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 10px; }.integration-meta span { color: var(--muted); }
.settings-form { max-width: 560px; display: grid; gap: 16px; padding: 22px; }
.settings-form label { max-width: 280px; }
.settings-preview, .booking-window-hint { margin: 0; padding: 11px 13px; border: 1px solid #b9dfdc; border-radius: 9px; color: #176c68; background: #eff9f8; font-size: 11px; line-height: 1.55; }
.booking-window-hint { margin-top: -7px; }

.dialog { width: min(620px, calc(100vw - 30px)); max-height: calc(100vh - 30px); padding: 0; border: 0; border-radius: 16px; color: var(--ink); box-shadow: 0 24px 70px rgba(5,29,50,.3); }
.dialog.wide { width: min(1020px, calc(100vw - 30px)); }.dialog.small { width: min(450px, calc(100vw - 30px)); }
.dialog::backdrop { background: rgba(7,30,50,.58); backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 21px 23px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; font-size: 22px; }.dialog-close { width: 34px; height: 34px; border: 0; border-radius: 8px; color: var(--muted); background: #edf2f5; font-size: 22px; }
.dialog-body { padding: 22px 23px; overflow-y: auto; }.dialog-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 23px; border-top: 1px solid var(--line); background: #fafcfd; }
.booking-form-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 24px; }
.booking-fields { display: grid; gap: 15px; }.assignee-picker { padding-left: 22px; border-left: 1px solid var(--line); }
.picker-search { margin: 14px 0 10px; padding: 9px 10px; }
.assignee-list { max-height: 250px; overflow-y: auto; display: grid; gap: 5px; }
.assignee-department { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; gap: 8px; padding: 7px 8px; color: var(--navy); background: #eaf4f5; font-size: 10px; font-weight: 800; }.assignee-department span { color: var(--muted); font-weight: 650; }
.assignee-option { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 9px; padding: 8px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; }
.assignee-option:hover { background: #f5f9fa; }.assignee-option.selected { border-color: #a4dcd8; background: #eff9f8; }
.assignee-option input { width: 15px; height: 15px; }.assignee-option strong { display: block; font-size: 11px; }.assignee-option small { color: var(--muted); font-size: 9px; }
.selected-work { min-height: 92px; margin-top: 12px; padding: 10px; border-radius: 8px; background: #f5f8fa; color: var(--muted); font-size: 10px; }.selected-work p { margin: 0; }
.mini-work { padding: 6px 0; border-bottom: 1px solid #dfe7eb; }.mini-work:last-child { border: 0; }.mini-work strong { display: block; color: var(--ink); }.mini-work span { font-size: 9px; }
.conflict-box { margin: 0 23px 14px; padding: 12px; border: 1px solid #f0b4b9; border-radius: 9px; color: #8e2630; background: #fff0f1; font-size: 11px; }
.detail-wrap { padding: 23px; }.detail-wrap header { display: flex; justify-content: space-between; gap: 20px; }.detail-wrap h2 { margin: 0; font-size: 21px; }.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 20px 0; }.detail-grid div { padding: 11px; background: #f5f8fa; border-radius: 8px; }.detail-grid small { display: block; color: var(--muted); }.detail-grid strong { font-size: 12px; }.assignee-chips { display: flex; flex-wrap: wrap; gap: 7px; }.assignee-chips span { padding: 6px 9px; border-radius: 14px; background: #e9f4f4; color: var(--navy); font-size: 10px; font-weight: 700; }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: 380px; padding: 12px 16px; border-radius: 9px; color: white; background: var(--navy); box-shadow: 0 12px 30px rgba(7,30,50,.25); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .22s; font-size: 12px; }
.toast.show { opacity: 1; transform: translateY(0); }.toast.error { background: #a82934; }.toast.success { background: #087553; }

@media (max-width: 1180px) {
  .calendar-layout { grid-template-columns: 1fr; }.agenda-card { min-height: auto; }.agenda-list { grid-template-columns: repeat(3, 1fr); }.empty-state { min-height: 120px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }.team-layout { grid-template-columns: 1fr 330px; }
}

@media (max-width: 900px) {
  .auth-view { grid-template-columns: 1fr; }.auth-brand { display: none; }.auth-panel { min-height: 100vh; padding: 28px; }.mobile-logo { width: min(100%, 480px); display: grid; grid-template-columns: 48px 1fr 40px; align-items: center; gap: 11px; margin-bottom: 34px; color: var(--navy); }.mobile-app-icon { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; box-shadow: 0 5px 16px rgba(10,49,83,.18); }.mobile-logo span { display: grid; gap: 2px; }.mobile-logo strong { font-size: 14px; }.mobile-logo small { color: var(--muted); font-size: 9px; }.mobile-company-logo { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 9px; object-fit: contain; background: white; }
  .app-view { grid-template-columns: 1fr; }.sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 12px 0 35px rgba(0,0,0,.18); }.sidebar.open { transform: translateX(0); }.workspace { grid-column: 1; }.mobile-only { display: grid; }
  .topbar { padding: 0 18px; }.content-view { padding: 20px 16px 34px; }.stats-grid { grid-template-columns: repeat(2, 1fr); }
  .team-layout { grid-template-columns: 1fr; }.person-panel { position: static; }.team-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 680px) {
  .topbar h2 { font-size: 18px; }.topbar .eyebrow { display: none; }.user-chip div { display: none; }.user-chip { padding-left: 8px; }
  .stats-grid { gap: 9px; }.stat-card { min-height: 88px; padding: 14px; }.stat-card strong { font-size: 25px; }
  .calendar-toolbar { align-items: stretch; flex-direction: column; }.calendar-actions { justify-content: space-between; }.calendar-actions .select-wrap { flex: 1; }.calendar-actions select { width: 100%; min-width: 0; }.month-nav h3 { margin-left: auto; min-width: 0; font-size: 15px; }
  .calendar-grid { min-height: 480px; }.calendar-day { min-height: 82px; padding: 4px; }.day-number { width: 21px; height: 21px; font-size: 9px; }.calendar-event { padding: 3px; border-left-width: 2px; font-size: 0; }.calendar-event time { font-size: 8px; }.weekday-row span { padding: 8px 2px; }
  .calendar-legend { flex-wrap: wrap; gap: 9px 15px; }.agenda-list { grid-template-columns: 1fr; }
  .split-heading { align-items: stretch; flex-direction: column; }.search-box { min-width: 0; }.team-filters { align-items: stretch; flex-direction: column; }.team-filters .select-wrap select { width: 100%; min-width: 0; }.team-grid { grid-template-columns: 1fr; }
  .admin-tabs { overflow-x: auto; }.admin-tabs button { white-space: nowrap; }.table-card { overflow-x: auto; }.data-table { min-width: 700px; }.integration-grid { grid-template-columns: 1fr; }.integration-card:first-child { grid-column: auto; }
  .form-row { grid-template-columns: 1fr; }.booking-form-layout { grid-template-columns: 1fr; }.assignee-picker { padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .dialog-body { padding: 18px; }.detail-grid { grid-template-columns: 1fr; }
}
