:root {
  color-scheme: light;
  --brand: #d72f75;
  --brand-rgb: 215, 47, 117;
  --accent: #ffc43d;
  --ink: #111827;
  --ink-soft: #344054;
  --muted: #697386;
  --line: #e6e8ef;
  --surface: #ffffff;
  --surface-soft: #f7f7fb;
  --nav: #101525;
  --nav-soft: #191f32;
  --success: #11845b;
  --warning: #b66a00;
  --danger: #c9364d;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --shadow: 0 18px 48px rgba(18, 24, 40, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--surface-soft); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--surface-soft); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.page-glow {
  position: fixed;
  z-index: -1;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .16;
  pointer-events: none;
}
.glow-one { top: -12rem; right: -8rem; background: var(--brand); }
.glow-two { bottom: -15rem; left: 30%; background: var(--accent); }

.access-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(400px, 1.05fr) minmax(440px, .95fr);
}

.access-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(36px, 6vw, 78px);
  color: #fff;
  background:
    radial-gradient(circle at 82% 12%, rgba(255,196,61,.22), transparent 26%),
    radial-gradient(circle at 16% 75%, rgba(215,47,117,.26), transparent 32%),
    linear-gradient(145deg, #101525 0%, #171d32 62%, #23162c 100%);
}
.access-brand::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -170px;
  width: 480px;
  height: 480px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(255,255,255,.018), 0 0 0 110px rgba(255,255,255,.012);
}
.access-brand > img { width: 230px; filter: brightness(0) invert(1); }
.access-promise { position: relative; z-index: 1; margin: auto 0; max-width: 650px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  color: rgba(255,255,255,.7);
}
.eyebrow i { width: 28px; height: 2px; background: var(--accent); border-radius: 99px; }
.access-promise h1 { margin: 20px 0 22px; font-size: clamp(48px, 5vw, 78px); line-height: .99; letter-spacing: -.055em; }
.access-promise h1 em { font-style: normal; color: #f06a9f; }
.access-promise > p { max-width: 560px; margin: 0; color: rgba(255,255,255,.68); font-size: 18px; line-height: 1.65; }
.promise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 44px; }
.promise-grid article {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 17px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 15px;
  background: rgba(255,255,255,.045);
  backdrop-filter: blur(12px);
}
.promise-grid b { color: var(--accent); font-size: 11px; }
.promise-grid span { display: grid; gap: 3px; }
.promise-grid strong { font-size: 13px; }
.promise-grid small { color: rgba(255,255,255,.48); font-size: 11px; }
.access-brand footer { position: relative; z-index: 1; color: rgba(255,255,255,.36); font-size: 11px; letter-spacing: .08em; }

.access-panel { display: grid; place-items: center; padding: 32px; background: rgba(247,247,251,.9); }
.access-card {
  width: min(520px, 100%);
  padding: clamp(30px, 5vw, 52px);
  border: 1px solid rgba(17,24,39,.07);
  border-radius: 28px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 28px 80px rgba(16,21,37,.12);
}
.mobile-access-logo { display: none; margin-bottom: 28px; }
.mobile-access-logo img { width: 190px; }
.workspace-pill {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--brand);
  background: rgba(var(--brand-rgb), .09);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .13em;
}
.workspace-pill.yellow { color: #805500; background: rgba(255,196,61,.22); }
.access-card h2 { margin: 22px 0 8px; font-size: 32px; letter-spacing: -.04em; }
.access-card > p { margin: 0 0 28px; color: var(--muted); line-height: 1.55; }

.field { display: grid; gap: 8px; margin-bottom: 17px; }
.field > span { color: var(--ink-soft); font-size: 12px; font-weight: 750; }
.field input, .field textarea, .field select, .control {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #d9dde7;
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border-color .18s, box-shadow .18s;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus, .control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .11);
}
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.password-field { position: relative; }
.password-field input { padding-right: 82px; }
.password-field button {
  position: absolute;
  right: 8px;
  top: 8px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  color: var(--brand);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}
.primary-button, .secondary-button, .danger-button, .ghost-button {
  min-height: 43px;
  padding: 10px 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-weight: 750;
  transition: transform .16s, filter .16s, border-color .16s;
}
.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #f04f8e);
  box-shadow: 0 12px 26px rgba(var(--brand-rgb), .22);
}
.primary-button:hover:not(:disabled) { transform: translateY(-1px); filter: saturate(1.08); }
.secondary-button { color: var(--ink); background: #fff; border-color: var(--line); }
.secondary-button:hover { border-color: #bac0cd; }
.danger-button { color: #fff; background: var(--danger); }
.ghost-button { color: var(--brand); background: rgba(var(--brand-rgb), .08); }
.wide { width: 100%; display: flex; align-items: center; justify-content: space-between; }
button:disabled { cursor: wait; opacity: .58; }
.protected-copy { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 18px; color: #8b93a3; }
.protected-copy i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(17,132,91,.11); }
.form-alert { padding: 12px 14px; margin: 0 0 16px; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.form-alert.error { color: #92263a; background: #fff0f3; border: 1px solid #ffd4dc; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 268px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 100vh;
  display: flex;
  flex-direction: column;
  color: #fff;
  background:
    radial-gradient(circle at 15% 0, rgba(var(--brand-rgb), .2), transparent 24%),
    linear-gradient(180deg, var(--nav) 0%, #0c1120 100%);
  border-right: 1px solid rgba(255,255,255,.05);
}
.sidebar-brand { height: 88px; display: flex; align-items: center; gap: 11px; padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar-brand img { width: 42px; height: 42px; object-fit: contain; }
.sidebar-brand span { display: grid; min-width: 0; }
.sidebar-brand strong { font-size: 19px; letter-spacing: -.03em; }
.sidebar-brand small { overflow: hidden; max-width: 150px; margin-top: 3px; color: rgba(255,255,255,.44); white-space: nowrap; text-overflow: ellipsis; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 18px 12px; }
.sidebar-nav > small { display: block; margin: 19px 12px 8px; color: rgba(255,255,255,.28); font-size: 9px; font-weight: 850; letter-spacing: .16em; }
.sidebar-nav > small:first-child { margin-top: 3px; }
.nav-item {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  margin: 2px 0;
  border: 0;
  border-radius: 10px;
  color: rgba(255,255,255,.6);
  background: transparent;
  text-align: left;
  transition: color .16s, background .16s;
}
.nav-item i { font-style: normal; font-size: 17px; text-align: center; }
.nav-item span { font-size: 13px; font-weight: 650; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(var(--brand-rgb), .24), rgba(var(--brand-rgb), .07)); box-shadow: inset 3px 0 var(--brand); }
.nav-badge { min-width: 20px; padding: 2px 6px; border-radius: 999px; color: #17110a; background: var(--accent); font-size: 10px; text-align: center; }
.sidebar-user { min-height: 76px; display: grid; grid-template-columns: 38px 1fr 32px; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar-user > span:nth-child(2) { display: grid; min-width: 0; }
.sidebar-user strong { overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-user small { color: rgba(255,255,255,.4); margin-top: 3px; font-size: 10px; }
.sidebar-user button { height: 32px; border: 0; border-radius: 8px; color: rgba(255,255,255,.55); background: rgba(255,255,255,.06); }

.avatar {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #ff6da5);
  font-size: 11px;
  font-weight: 850;
  overflow: hidden;
}
.avatar.small { width: 32px; height: 32px; font-size: 9px; }
.avatar.large { width: 72px; height: 72px; font-size: 20px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.workspace { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  height: 88px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px clamp(20px, 3vw, 42px);
  border-bottom: 1px solid rgba(17,24,39,.07);
  background: rgba(247,247,251,.86);
  backdrop-filter: blur(18px);
}
.topbar > div:nth-child(2) { flex: 1; }
.topbar span#viewEyebrow { display: block; margin-bottom: 3px; color: var(--brand); font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.topbar h1 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.company-chip { max-width: 230px; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.8); font-size: 11px; }
.company-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255,196,61,.16); }
.company-chip i.has-logo { width: 24px; height: 24px; border-radius: 7px; background-color: #fff; background-position: center; background-repeat: no-repeat; background-size: contain; box-shadow: none; }
.company-chip b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.avatar-button { padding: 0; border: 0; border-radius: 50%; background: transparent; }
.icon-button { border: 0; color: inherit; background: transparent; font-size: 22px; }
.mobile-only { display: none; }

.view-content { width: min(1500px, 100%); min-height: calc(100vh - 88px); margin: 0 auto; padding: clamp(22px, 3.2vw, 44px); outline: none; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.view-head h2 { margin: 0 0 6px; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.045em; }
.view-head p { max-width: 680px; margin: 0; color: var(--muted); line-height: 1.55; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.hero-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 30px;
  min-height: 230px;
  padding: clamp(28px, 4vw, 46px);
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,196,61,.34), transparent 23%),
    linear-gradient(130deg, #161c2f, #29172f);
  box-shadow: var(--shadow);
}
.hero-card::after { content: ""; position: absolute; right: 11%; top: -40%; width: 270px; height: 270px; border: 34px solid rgba(255,255,255,.035); border-radius: 50%; }
.hero-card > div { position: relative; z-index: 1; align-self: center; }
.hero-card small { color: #f47aaa; font-weight: 850; letter-spacing: .13em; }
.hero-card h2 { margin: 13px 0 14px; font-size: clamp(34px, 4vw, 54px); line-height: 1.04; letter-spacing: -.055em; }
.hero-card p { max-width: 690px; margin: 0; color: rgba(255,255,255,.64); line-height: 1.6; }
.hero-mark { place-self: center; width: min(210px, 70%); opacity: .98; }
.hero-mark.company-logo { max-height: 130px; object-fit: contain; filter: drop-shadow(0 12px 24px rgba(0,0,0,.18)); }

.brand-preview { display: flex; align-items: center; gap: 14px; margin: -4px 0 18px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.brand-preview img { width: 88px; height: 48px; object-fit: contain; }
.brand-preview .tag { margin-left: auto; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin: 18px 0; }
.stat-card, .panel {
  border: 1px solid rgba(17,24,39,.07);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(18,24,40,.045);
}
.stat-card { display: grid; grid-template-columns: 44px 1fr; gap: 13px; align-items: center; padding: 19px; border-radius: var(--radius-md); }
.stat-card > i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: var(--brand); background: rgba(var(--brand-rgb), .09); font-style: normal; font-size: 20px; }
.stat-card span { display: grid; gap: 3px; }
.stat-card strong { font-size: 25px; letter-spacing: -.04em; }
.stat-card small { color: var(--muted); font-size: 11px; }
.panel { border-radius: var(--radius-md); overflow: hidden; }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 19px 21px; border-bottom: 1px solid var(--line); }
.panel-head div { display: grid; gap: 3px; }
.panel-head strong { font-size: 15px; }
.panel-head small { color: var(--muted); }
.panel-body { padding: 20px; }
.dashboard-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }

.announcement-list { display: grid; gap: 10px; }
.announcement-card { position: relative; padding: 16px 17px 16px 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.announcement-card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 5px 5px 0; background: var(--brand); }
.announcement-card.priority-important::before { background: var(--accent); }
.announcement-card.priority-urgent::before { background: var(--danger); }
.announcement-card header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.announcement-card p { margin: 0; color: var(--muted); line-height: 1.52; white-space: pre-wrap; }
.announcement-card time { color: #9aa1af; font-size: 10px; }

.people-toolbar, .filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.search-box { position: relative; flex: 1; min-width: 220px; }
.search-box input { width: 100%; height: 44px; padding: 0 14px 0 40px; border: 1px solid var(--line); border-radius: 11px; outline: none; background: #fff; }
.search-box::before { content: "⌕"; position: absolute; left: 14px; top: 10px; color: var(--muted); }
.people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.person-card { position: relative; padding: 20px; border: 1px solid rgba(17,24,39,.07); border-radius: 17px; background: #fff; transition: transform .16s, box-shadow .16s; }
.person-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.person-card header { display: flex; align-items: center; gap: 13px; }
.person-card header > span:last-child { min-width: 0; display: grid; gap: 3px; }
.person-card h3 { overflow: hidden; margin: 0; font-size: 15px; white-space: nowrap; text-overflow: ellipsis; }
.person-card header small { color: var(--brand); font-size: 10px; font-weight: 750; }
.person-card p { min-height: 42px; margin: 15px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.person-card footer { display: flex; justify-content: space-between; align-items: center; padding-top: 13px; border-top: 1px solid var(--line); }
.tag { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 9px; border-radius: 999px; color: #566074; background: #f1f3f7; font-size: 10px; font-weight: 700; }
.tag.success { color: var(--success); background: #eaf8f2; }
.tag.warning { color: var(--warning); background: #fff7e7; }
.tag.danger { color: var(--danger); background: #fff0f3; }
.tag.brand { color: var(--brand); background: rgba(var(--brand-rgb), .09); }
.text-button { padding: 5px; border: 0; color: var(--brand); background: transparent; font-size: 11px; font-weight: 800; }

.schedule-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.week-nav { display: flex; align-items: center; gap: 9px; }
.week-nav strong { min-width: 185px; text-align: center; font-size: 13px; }
.schedule-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.schedule-grid { min-width: 980px; display: grid; grid-template-columns: 145px repeat(7, minmax(118px, 1fr)); }
.schedule-grid > div { min-height: 60px; padding: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.schedule-grid > div:nth-child(8n) { border-right: 0; }
.schedule-grid .schedule-head { min-height: 58px; display: grid; place-items: center; color: var(--ink-soft); background: #fafafe; text-align: center; }
.schedule-grid .schedule-head strong { font-size: 11px; }
.schedule-grid .schedule-head small { color: var(--muted); font-size: 10px; }
.schedule-label { display: grid; align-content: center; gap: 4px; background: #fafafe; }
.schedule-label strong { font-size: 11px; }
.schedule-label small { color: var(--muted); font-size: 9px; }
.schedule-cell select { width: 100%; height: 36px; padding: 0 7px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; font-size: 10px; }
.schedule-cell.filled { background: rgba(var(--brand-rgb), .035); }

.data-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th { padding: 12px 15px; color: #747d8e; background: #fafafe; font-size: 9px; font-weight: 850; letter-spacing: .1em; text-align: left; }
.data-table td { padding: 14px 15px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 12px; vertical-align: middle; }
.data-table td strong { color: var(--ink); }
.data-table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.data-table .actions button { min-height: 30px; padding: 5px 9px; border-radius: 8px; font-size: 10px; }
.proof-thumb { width: 42px; height: 42px; padding: 0; border: 0; border-radius: 9px; overflow: hidden; background: #edf0f5; }
.proof-thumb img { width: 100%; height: 100%; object-fit: cover; }

.split-layout { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: 18px; }
.form-panel { align-self: start; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.form-panel h3 { margin: 0 0 6px; }
.form-panel > p { margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.file-drop { position: relative; display: grid; place-items: center; min-height: 105px; padding: 16px; border: 1px dashed #c8cdd7; border-radius: 11px; color: var(--muted); background: #fafafe; text-align: center; }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop strong { color: var(--brand); font-size: 12px; }
.file-preview { margin-top: 10px; border-radius: 12px; max-height: 200px; object-fit: cover; }

.operation-tabs { display: flex; gap: 8px; margin-bottom: 18px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: #fff; width: fit-content; }
.operation-tabs button { min-height: 34px; padding: 7px 13px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 750; }
.operation-tabs button.active { color: #fff; background: var(--ink); }
.incident-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.incident-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.incident-card header { display: flex; justify-content: space-between; gap: 12px; }
.incident-card h3 { margin: 0; font-size: 14px; }
.incident-card p { color: var(--muted); font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.incident-card footer { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }

.community-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.composer { padding: 20px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.composer textarea { width: 100%; min-height: 88px; padding: 0; border: 0; outline: none; resize: vertical; color: var(--ink); }
.composer footer { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
.post-list { display: grid; gap: 14px; }
.post-card { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.post-author { display: flex; align-items: center; gap: 11px; }
.post-author > span:last-child { display: grid; gap: 2px; }
.post-author small { color: var(--muted); font-size: 10px; }
.post-card > p { margin: 15px 0; color: var(--ink-soft); line-height: 1.62; white-space: pre-wrap; }
.post-image { width: 100%; max-height: 480px; border-radius: 12px; object-fit: cover; background: #eef0f4; }
.post-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.comment-list { display: grid; gap: 8px; margin-top: 13px; }
.comment { display: flex; gap: 9px; padding: 10px; border-radius: 10px; background: #f7f8fb; }
.comment span:last-child { flex: 1; }
.comment strong { font-size: 11px; }
.comment p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-form input { flex: 1; min-width: 0; height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; }
.comment-form button { min-height: 36px; }

.message-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: min(690px, calc(100vh - 185px)); border: 1px solid var(--line); border-radius: 17px; overflow: hidden; background: #fff; }
.peer-list { overflow-y: auto; border-right: 1px solid var(--line); }
.peer-list header { position: sticky; top: 0; z-index: 1; padding: 17px; border-bottom: 1px solid var(--line); background: #fff; }
.peer { width: 100%; display: flex; gap: 10px; align-items: center; padding: 13px 16px; border: 0; border-bottom: 1px solid #f0f1f4; color: var(--ink); background: #fff; text-align: left; }
.peer.active { background: rgba(var(--brand-rgb), .06); box-shadow: inset 3px 0 var(--brand); }
.peer > span:nth-child(2) { min-width: 0; flex: 1; display: grid; gap: 3px; }
.peer strong, .peer small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.peer small { color: var(--muted); font-size: 10px; }
.chat { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.chat-messages { overflow-y: auto; padding: 18px; background: #fafafe; }
.message { width: fit-content; max-width: min(74%, 620px); margin: 7px 0; padding: 10px 13px; border: 1px solid var(--line); border-radius: 4px 13px 13px 13px; background: #fff; }
.message.mine { margin-left: auto; color: #fff; border-color: transparent; border-radius: 13px 4px 13px 13px; background: var(--brand); }
.message p { margin: 0; line-height: 1.45; white-space: pre-wrap; }
.message small { display: block; margin-top: 4px; color: inherit; opacity: .55; font-size: 9px; }
.chat-form { display: flex; gap: 8px; padding: 13px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; }

.document-library-layout { width: 100%; }
.document-section-layout .document-grid { align-content: start; }
.document-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 16px;
  align-items: start;
}
.document-card {
  min-width: 0;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid #e5e7ee;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(var(--brand-rgb), .035), transparent 42%),
    #fff;
  box-shadow: 0 10px 28px rgba(20, 28, 48, .055);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.document-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--brand-rgb), .26);
  box-shadow: 0 16px 34px rgba(20, 28, 48, .09);
}
.document-card-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.document-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--brand);
  background: linear-gradient(145deg, rgba(var(--brand-rgb), .13), rgba(var(--brand-rgb), .055));
  box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), .05);
  font-size: 20px;
}
.document-copy { min-width: 0; }
.document-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}
.document-extension {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--brand);
  background: rgba(var(--brand-rgb), .08);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .08em;
}
.document-card h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.document-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.document-file-name {
  display: block;
  overflow: hidden;
  color: #8c94a3;
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.document-card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid #eef0f4;
}
.document-size {
  color: #9299a7;
  font-size: 9px;
  font-weight: 700;
}
.document-actions { display: flex; align-items: center; gap: 7px; }
.document-open-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 0;
  border-radius: 9px;
  color: var(--brand);
  background: rgba(var(--brand-rgb), .085);
  font-size: 11px;
  font-weight: 800;
}
.document-open-button:hover { background: rgba(var(--brand-rgb), .14); }
.document-open-button b { font-size: 12px; }
.document-delete-button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: #a65061;
  background: #fff1f4;
  font-size: 17px;
}
.document-delete-button:hover { background: #ffe5eb; }

.suggestion-grid { display: grid; gap: 10px; }
.suggestion-card { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.suggestion-card p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; white-space: pre-wrap; }
.suggestion-card small { color: #959daa; font-size: 10px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settings-card { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.settings-card.full { grid-column: 1 / -1; }
.settings-card header { margin-bottom: 18px; }
.settings-card h3 { margin: 0 0 5px; }
.settings-card header p { margin: 0; color: var(--muted); font-size: 12px; }
.config-list { display: grid; gap: 8px; }
.config-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; }
.config-row span { display: grid; gap: 2px; }
.config-row small { color: var(--muted); font-size: 10px; }
.color-input { display: flex; gap: 9px; align-items: center; }
.color-input input[type="color"] { width: 48px; height: 48px; padding: 3px; border-radius: 10px; }

.profile-hero { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.profile-hero h2 { margin: 0 0 5px; }
.private-box { padding: 15px; border: 1px solid rgba(var(--brand-rgb), .14); border-radius: 12px; background: rgba(var(--brand-rgb), .035); }
.private-box > strong { display: block; margin-bottom: 12px; color: var(--brand); font-size: 12px; }

.empty-state { display: grid; place-items: center; min-height: 200px; padding: 30px; color: var(--muted); text-align: center; }
.empty-state > span { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 17px; color: var(--brand); background: rgba(var(--brand-rgb), .08); font-size: 23px; }
.empty-state strong { color: var(--ink); }
.empty-state p { max-width: 420px; margin: 7px 0 0; line-height: 1.5; }
.loading-card { display: grid; place-items: center; min-height: 280px; color: var(--muted); }
.loading-card::before { content: ""; width: 30px; height: 30px; margin-bottom: 13px; border: 3px solid #e6e8ef; border-top-color: var(--brand); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 22px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8,12,23,.64); backdrop-filter: blur(5px); }
.modal-card { position: relative; z-index: 1; width: min(720px, 100%); max-height: min(850px, 91vh); overflow-y: auto; padding: clamp(24px, 4vw, 36px); border-radius: 22px; background: #fff; box-shadow: 0 34px 100px rgba(0,0,0,.24); }
.modal-card.wide-modal { width: min(980px, 100%); }
.modal-close { position: absolute; right: 16px; top: 15px; width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--muted); background: #f1f3f7; font-size: 20px; }
.modal-card h2 { margin: 0 45px 8px 0; letter-spacing: -.035em; }
.modal-lead { margin: 0 0 22px; color: var(--muted); line-height: 1.5; }
.confirm-card { width: min(430px, 100%); text-align: center; }
.confirm-symbol { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 15px; border-radius: 50%; color: var(--danger); background: #fff0f3; font-size: 22px; font-weight: 850; }
.confirm-card .button-row { justify-content: center; margin-top: 22px; }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 150; display: grid; gap: 9px; width: min(360px, calc(100vw - 40px)); }
.toast { display: flex; align-items: center; gap: 11px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; box-shadow: var(--shadow); animation: toast-in .25s ease; }
.toast i { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--success); font-style: normal; font-size: 11px; font-weight: 800; }
.toast.error i { background: var(--danger); }
.toast span { font-size: 12px; line-height: 1.4; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .people-grid, .document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-layout { grid-template-columns: 1fr; }
  .community-layout > aside { display: none; }
}

@media (max-width: 940px) {
  .access-shell { grid-template-columns: 1fr; }
  .access-brand { display: none; }
  .mobile-access-logo { display: block; }
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); width: min(290px, 86vw); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(8,12,23,.5); }
  .mobile-only { display: inline-grid; place-items: center; }
  .sidebar-brand .mobile-only { margin-left: auto; color: #fff; }
  .dashboard-grid, .split-layout { grid-template-columns: 1fr; }
  .message-layout { grid-template-columns: 285px 1fr; }
}

@media (max-width: 700px) {
  .access-panel { min-height: 100vh; padding: 14px; }
  .access-card { padding: 27px 22px; border-radius: 20px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .topbar { height: 76px; padding: 12px 16px; }
  .topbar h1 { font-size: 19px; }
  .company-chip { display: none; }
  .view-content { min-height: calc(100vh - 76px); padding: 19px 14px 32px; }
  .view-head { align-items: stretch; flex-direction: column; }
  .view-head .button-row > button { flex: 1; }
  .hero-card { grid-template-columns: 1fr; min-height: 210px; padding: 27px 23px; }
  .hero-mark { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { grid-template-columns: 36px 1fr; padding: 14px 12px; gap: 9px; }
  .stat-card > i { width: 36px; height: 36px; }
  .stat-card strong { font-size: 20px; }
  .people-grid, .document-grid, .incident-grid, .settings-grid { grid-template-columns: 1fr; }
  .settings-card.full { grid-column: auto; }
  .schedule-toolbar { align-items: stretch; flex-direction: column; }
  .week-nav { justify-content: space-between; }
  .message-layout { height: calc(100vh - 135px); grid-template-columns: 1fr; }
  .peer-list { border-right: 0; }
  .chat { position: absolute; inset: 0; background: #fff; }
  .message-layout { position: relative; }
  .chat[hidden] { display: none !important; }
  .modal { padding: 10px; align-items: end; }
  .modal-card { max-height: 94vh; border-radius: 20px 20px 12px 12px; padding: 26px 20px; }
  .operation-tabs { width: 100%; overflow-x: auto; }
  .operation-tabs button { flex: 1; white-space: nowrap; }
}

@media (max-width: 430px) {
  .stats-grid { grid-template-columns: 1fr; }
  .promise-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.master-access-link{display:block;margin-top:12px;text-align:center;font-size:.78rem;color:var(--muted);text-decoration:none}.master-access-link:hover{color:var(--primary);text-decoration:underline}.field small{display:block;margin-top:5px;color:var(--muted);font-size:.72rem}



/* v2.3 file selection previews */
.file-drop{overflow:hidden;transition:border-color .18s,background .18s,box-shadow .18s}
.file-drop.has-file{place-items:stretch;border-style:solid;border-color:rgba(var(--brand-rgb),.38);background:rgba(var(--brand-rgb),.025);box-shadow:0 0 0 3px rgba(var(--brand-rgb),.055)}
.file-drop.has-file>span:not(.file-selection-preview){opacity:.72}
.file-selection-preview{pointer-events:none;display:flex;align-items:center;gap:10px;width:100%;margin-top:10px;padding:9px;border:1px solid rgba(var(--brand-rgb),.12);border-radius:10px;background:#fff;text-align:left}
.file-selection-preview img{width:58px;height:58px;flex:0 0 58px;border-radius:8px;object-fit:cover;background:#eef1f5}
.file-selection-preview .file-selection-icon{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border-radius:9px;background:rgba(var(--brand-rgb),.08);color:var(--brand);font-size:20px;font-weight:900}
.file-selection-preview b,.file-inline-selection b{display:block;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink);font-size:11px}
.file-selection-preview small,.file-inline-selection small{display:block;margin-top:3px;color:var(--muted);font-size:9px}
.file-inline-selection{display:flex;align-items:center;gap:9px;margin-top:8px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:#fafafe}
.file-inline-selection img{width:42px;height:42px;border-radius:8px;object-fit:cover}
.text-button .file-inline-name{display:inline-block;max-width:170px;margin-left:5px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap;color:var(--brand);font-size:9px;font-weight:800}

/* v2.3 compact suggestion inbox */
.suggestion-grid{align-self:start;align-content:start;grid-auto-rows:max-content;max-height:min(680px,calc(100vh - 170px));overflow:auto;padding-right:4px;scrollbar-width:thin}
.suggestion-card{grid-template-columns:minmax(0,1fr) 150px;align-items:start;min-height:0;padding:14px 15px}
.suggestion-card p{margin:7px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.45}
.suggestion-card small{display:block;color:#959daa;font-size:9px}
.suggestion-status-box{display:grid;gap:5px;align-self:start}
.suggestion-status-box>span{color:#8b92a0;font-size:8px;font-weight:850;letter-spacing:.09em;text-transform:uppercase}
.suggestion-status{width:100%!important;min-height:38px!important;height:38px;padding:7px 30px 7px 10px!important;border-radius:9px!important;font-size:10px!important}
@media(max-width:940px){.suggestion-grid{max-height:none;overflow:visible}.suggestion-card{grid-template-columns:1fr auto}.suggestion-status-box{min-width:135px}}
@media(max-width:560px){.suggestion-card{grid-template-columns:1fr}.suggestion-status-box{grid-template-columns:auto minmax(130px,1fr);align-items:center}.suggestion-status-box>span{margin-right:6px}}


/* v2.3 language switcher */
.orq-language-picker{display:inline-flex;align-items:center;gap:3px;padding:4px;border:1px solid var(--line,#dfe3eb);border-radius:999px;background:rgba(255,255,255,.96);box-shadow:0 8px 28px rgba(17,24,39,.08);color:var(--ink,#171925);white-space:nowrap}
.orq-language-icon{width:28px;height:28px;display:grid;place-items:center;color:var(--brand,#eb2f75);margin-right:1px}
.orq-language-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.orq-language-option{min-height:30px;border:0;border-radius:999px;padding:0 10px;background:transparent;color:var(--muted,#727887);font:800 10px/1 Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:.07em;cursor:pointer;transition:background .18s,color .18s,box-shadow .18s,transform .18s}
.orq-language-option:hover{color:var(--ink,#171925);background:#f3f5f8}
.orq-language-option.active{color:#fff;background:linear-gradient(135deg,var(--brand,#eb2f75),#ff6a3d);box-shadow:0 5px 14px rgba(235,47,117,.24)}
.orq-language-option:active{transform:scale(.97)}
.language-name{display:none}
.language-settings-card .orq-language-picker,.account-language .orq-language-picker{border-radius:16px;padding:6px;background:#f8f9fc;box-shadow:none}
.language-settings-card .orq-language-option,.account-language .orq-language-option{min-height:44px;padding:0 14px;display:inline-flex;align-items:center;gap:7px;border-radius:11px}
.language-settings-card .language-name,.account-language .language-name{display:inline;font-size:11px;font-weight:700;letter-spacing:0}

.access-panel{position:relative}.access-language{position:absolute;right:28px;top:24px;z-index:5}.language-settings-card [data-language-slot],.account-language [data-language-slot]{margin-top:12px}.account-language p{color:var(--muted);font-size:13px}.thanks-language{position:fixed;right:18px;top:18px;z-index:10}@media(max-width:700px){.access-language{right:16px;top:14px}.access-card{margin-top:42px}}
