@charset "utf-8";

:root {
  color-scheme: light;
  --ink: #20283a;
  --ink-soft: #45516a;
  --muted: #64718a;
  --canvas: #f5f7fb;
  --surface: #ffffff;
  --line: #e5e9f1;
  --line-strong: #d7ddea;
  --sidebar: #0b1c2d;
  --sidebar-soft: #a8b3c8;
  --accent: #087fbd;
  --accent-dark: #06679b;
  --accent-soft: #e8f5fb;
  --green: #18794e;
  --green-bg: #e9f6ef;
  --amber: #94620b;
  --amber-bg: #fff5dc;
  --red: #a83d44;
  --red-bg: #ffedef;
  --neutral: #596579;
  --neutral-bg: #edf0f5;
  --radius: 12px;
  --shadow-panel: 0 2px 7px rgb(25 39 70 / 4%), 0 12px 28px rgb(25 39 70 / 3%);
  font-family: "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  background: var(--canvas);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #9ba5ff; outline-offset: 2px; }
::selection { color: #20254f; background: #dfe2ff; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Sign-in and first-run setup */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(430px, 1fr) minmax(410px, .9fr); background: var(--surface); }
.auth-panel { width: min(100%, 540px); margin: auto; padding: 58px clamp(32px, 7vw, 82px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: #f7f8ff; text-decoration: none; }
.brand-auth { color: var(--ink); }
.brand-logo { display: block; width: 184px; height: 52px; border-radius: 8px; background: #07111a; object-fit: cover; object-position: center 24%; }
.brand-auth .brand-logo { width: 178px; height: 48px; }
.brand-mark { width: 39px; height: 39px; flex: 0 0 39px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--accent); }
.brand-mark svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.auth-copy { margin: 67px 0 31px; }
.auth-copy h1 { margin: 11px 0 9px; font-size: 31px; line-height: 1.18; letter-spacing: -.045em; font-weight: 700; }
.auth-copy p { max-width: 38ch; margin: 0; color: var(--muted); line-height: 1.55; }
.form-stack { display: flex; flex-direction: column; gap: 10px; }
.form-stack label, .field-group label { color: #354158; font-size: 14px; font-weight: 650; }
.form-stack input, .field-group input, .field-group select { width: 100%; height: 46px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); background: #fff; transition: border-color 160ms ease, box-shadow 160ms ease; }
.form-stack input { margin: 0 0 8px; }
.form-stack input::placeholder, .field-group input::placeholder, .search-field input::placeholder { color: #68758c; }
.form-stack input:focus, .field-group input:focus, .field-group select:focus { outline: 0; border-color: #818af0; box-shadow: 0 0 0 3px rgb(79 92 219 / 13%); }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 8px; padding: 0 15px; font-size: 14px; font-weight: 650; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease; }
.button:disabled { cursor: wait; opacity: .68; }
.button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button-primary { color: #fff; background: var(--accent); box-shadow: 0 2px 5px rgb(8 127 189 / 19%); }
.button-primary:hover:not(:disabled) { background: var(--accent-dark); box-shadow: 0 4px 10px rgb(8 127 189 / 23%); }
.button-secondary { color: #096fa8; background: #fff; border-color: #c8e3f1; }
.button-secondary:hover { border-color: #90c7e2; background: #f3faff; }
.button-ghost { color: var(--ink-soft); background: #fff; border-color: var(--line-strong); }
.button-ghost:hover { background: #f5f7fb; }
.button-full { width: 100%; min-height: 48px; margin-top: 9px; }
.button-danger-quiet { color: var(--red); background: transparent; border-color: transparent; padding-left: 0; }
.button-danger-quiet:hover { color: #842f35; background: var(--red-bg); }
.form-error { margin: 2px 0; color: #a7353d; font-size: 14px; line-height: 1.45; }
.auth-footnote { margin: 25px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.auth-aside { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; padding: 64px clamp(40px, 7vw, 90px); color: #fff; background: linear-gradient(90deg, rgb(7 24 42 / 94%) 0%, rgb(7 24 42 / 78%) 45%, rgb(7 24 42 / 26%) 100%), url("/assets/furafila-assistente.jpeg") center / cover no-repeat; }
.auth-aside::before, .auth-aside::after { content: none; }
.aside-content { position: relative; z-index: 1; max-width: 430px; }
.status-dot { width: 8px; height: 8px; display: inline-block; flex: 0 0 8px; border-radius: 50%; background: #8d96ab; }
.aside-content h2 { margin: 29px 0 15px; font-size: clamp(36px, 4vw, 52px); line-height: 1.08; letter-spacing: -.055em; font-weight: 680; }
.aside-content p { max-width: 35ch; margin: 0; color: #bcc6d9; line-height: 1.7; }
.aside-rule { width: 43px; height: 2px; margin: 37px 0 16px; background: #969ff8; }
.aside-caption { color: #c8d0df; font-size: 12px; font-weight: 700; letter-spacing: .06em; }

/* Application frame */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; z-index: 5; height: 100vh; display: flex; flex-direction: column; padding: 28px 17px 16px; color: #f5f6fb; background: var(--sidebar); }
.sidebar .brand { padding: 0 8px; }
.brand-copy { display: flex; flex-direction: column; gap: 1px; font-size: 14px; line-height: 1.22; letter-spacing: -.02em; }
.brand-copy strong:first-child { color: #bdc7da; font-weight: 550; }
.brand-copy strong:last-child { font-weight: 720; }
.side-caption { margin: 47px 9px 12px; color: #a7b3c7; font-size: 12px; font-weight: 720; letter-spacing: .08em; }
.side-nav { display: grid; gap: 5px; }
.nav-item { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 8px; padding: 0 11px; text-align: left; color: var(--sidebar-soft); background: transparent; cursor: pointer; font-size: 14px; font-weight: 560; transition: background-color 150ms ease, color 150ms ease; }
.nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { color: #fff; background: rgb(255 255 255 / 7%); }
.nav-item.active { color: #fff; background: #2b3956; box-shadow: inset 2px 0 #9099ff; }
.nav-count { min-width: 22px; height: 22px; display: inline-grid; place-items: center; margin-left: auto; border-radius: 6px; color: #c3ccdc; background: rgb(255 255 255 / 9%); font-size: 12px; font-variant-numeric: tabular-nums; }
.sidebar-bottom { margin-top: auto; }
.sidebar-note { display: flex; gap: 9px; margin: 0 4px 16px; padding: 12px 11px; border: 1px solid rgb(195 205 224 / 14%); border-radius: 9px; background: rgb(255 255 255 / 4%); }
.note-icon { width: 18px; height: 18px; display: grid; place-items: center; flex: 0 0 18px; border-radius: 50%; color: #c8d0e0; background: rgb(255 255 255 / 10%); font-family: Georgia, serif; font-size: 12px; font-weight: 700; }
.sidebar-note p { margin: 0; color: #c0c9d9; font-size: 12px; line-height: 1.5; }
.admin-profile { min-height: 55px; display: flex; align-items: center; gap: 10px; padding: 10px 5px 0; border-top: 1px solid rgb(195 205 224 / 13%); }
.avatar { width: 34px; height: 34px; display: grid; flex: 0 0 34px; place-items: center; border: 1px solid rgb(255 255 255 / 18%); border-radius: 50%; color: #eef0ff; background: #414d70; font-size: 13px; font-weight: 680; }
.profile-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; }
.profile-copy strong { overflow: hidden; color: #f4f6fa; font-size: 12px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { color: #b0bbce; font-size: 12px; }
.icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 8px; color: var(--ink-soft); background: transparent; cursor: pointer; transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease; }
.icon-button:hover { color: var(--ink); background: #f1f3f8; }
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.logout-button { color: #abb7cb; }
.logout-button:hover { color: #fff; background: rgb(255 255 255 / 8%); }
.main-column { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(22px, 4vw, 54px); border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 84%); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #657188; font-size: 13px; }
.breadcrumb strong { color: #38445a; font-weight: 620; }
.crumb-sep { color: #b5bdca; }
.topbar-right { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; }
.system-status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.system-status .status-dot { width: 7px; height: 7px; flex-basis: 7px; background: #46a878; }
.topbar-divider { height: 19px; border-left: 1px solid var(--line-strong); }
.today-label { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mobile-menu { display: none; }
.content { width: min(100%, 1460px); flex: 1; margin: 0 auto; padding: 37px clamp(22px, 4vw, 54px) 52px; }
.page-view { display: flex; flex-direction: column; gap: 21px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 1px; }
.page-heading h1 { margin: 0; color: #20283a; font-size: 27px; line-height: 1.25; letter-spacing: -.04em; font-weight: 700; }
.page-heading p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.page-heading .button { min-height: 42px; }
.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); padding: 5px; background: #fff; box-shadow: var(--shadow-panel); }
.summary-item { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-right: 1px solid var(--line); padding: 0 19px; background: #fff; cursor: pointer; text-align: left; transition: background-color 150ms ease; }
.summary-item:last-child { border-right: 0; }
.summary-item:hover { background: #fafbfe; }
.summary-label { display: inline-flex; align-items: center; gap: 9px; color: #5f6b82; font-size: 13px; font-weight: 570; }
.summary-item strong { color: #273249; font-size: 22px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.dot-active { background: #33a36d; }
.dot-pending { background: #e1a327; }
.dot-blocked { background: #df666e; }
.dot-expired { background: #9099aa; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-panel); }
.member-panel, .activity-panel, .audit-panel { overflow: hidden; }
.panel-heading { min-height: 79px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 21px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; color: #2b354b; font-size: 15px; font-weight: 680; letter-spacing: -.012em; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.text-button { display: inline-flex; align-items: center; gap: 8px; border: 0; padding: 8px 2px; color: #4955c3; background: transparent; cursor: pointer; font-size: 13px; font-weight: 640; white-space: nowrap; }
.text-button:hover { color: #303da9; text-decoration: underline; text-underline-offset: 3px; }
.text-button span { font-size: 15px; }
.member-list { min-height: 95px; }
.member-row { display: grid; grid-template-columns: minmax(190px, 1.2fr) minmax(130px, .85fr) minmax(112px, .65fr) minmax(112px, .6fr) 84px; align-items: center; gap: 12px; min-height: 73px; padding: 0 21px; border-bottom: 1px solid #eef0f5; }
.member-row:last-child { border-bottom: 0; }
.member-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.member-avatar { width: 35px; height: 35px; display: grid; flex: 0 0 35px; place-items: center; border-radius: 10px; color: #4b55c3; background: #eef0ff; font-size: 13px; font-weight: 720; text-transform: uppercase; }
.member-avatar.tone-1 { color: #1c7851; background: #e9f7ef; }
.member-avatar.tone-2 { color: #9a650c; background: #fff5dd; }
.member-avatar.tone-3 { color: #9b4f6e; background: #f9edf3; }
.member-info, .member-contact { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.member-info strong { overflow: hidden; color: #303a50; font-size: 13px; font-weight: 640; text-overflow: ellipsis; white-space: nowrap; }
.member-info small, .member-contact small { overflow: hidden; color: #68758c; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.member-contact { color: #5b667b; font-size: 12px; }
.member-expiry { color: #59657a; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.status-pill { width: fit-content; min-height: 25px; display: inline-flex; align-items: center; gap: 6px; border-radius: 20px; padding: 0 9px; font-size: 12px; line-height: 1; font-weight: 660; white-space: nowrap; }
.status-pill::before { width: 6px; height: 6px; content: ""; display: inline-block; border-radius: 50%; background: currentColor; }
.status-active { color: var(--green); background: var(--green-bg); }
.status-pending { color: var(--amber); background: var(--amber-bg); }
.status-blocked { color: var(--red); background: var(--red-bg); }
.status-expired { color: var(--neutral); background: var(--neutral-bg); }
.row-action { min-height: 31px; border: 1px solid transparent; border-radius: 7px; padding: 0 9px; color: #526078; background: transparent; cursor: pointer; font-size: 12px; font-weight: 610; }
.row-action:hover { border-color: var(--line); color: #3946b2; background: #f8f8ff; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 66px; padding: 11px 19px; border-bottom: 1px solid var(--line); }
.filter-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.filter-tab { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 7px; padding: 0 10px; color: #718097; background: transparent; cursor: pointer; font-size: 12px; font-weight: 620; white-space: nowrap; }
.filter-tab:hover { color: #414d65; background: #f4f6fa; }
.filter-tab.selected { color: #424ec2; background: var(--accent-soft); }
.filter-tab span { color: inherit; opacity: .7; font-variant-numeric: tabular-nums; }
.search-field { width: min(250px, 32vw); min-width: 180px; height: 37px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 7px; padding: 0 10px; background: #fff; transition: border-color 150ms ease, box-shadow 150ms ease; }
.search-field:focus-within { border-color: #838cf0; box-shadow: 0 0 0 3px rgb(79 92 219 / 11%); }
.search-field svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: #8c97a9; stroke-width: 1.7; stroke-linecap: round; }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.table-scroll { overflow-x: auto; }
.member-table { width: 100%; border-collapse: collapse; text-align: left; }
.member-table th { height: 43px; padding: 0 16px; color: #657188; background: #fbfcfe; font-size: 12px; line-height: 1; letter-spacing: .04em; font-weight: 740; white-space: nowrap; }
.member-table th:first-child, .member-table td:first-child { padding-left: 21px; }
.member-table td { height: 68px; padding: 7px 16px; border-top: 1px solid #eef0f5; color: #536077; font-size: 12px; vertical-align: middle; }
.table-member { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.table-member .member-avatar { width: 33px; height: 33px; flex-basis: 33px; border-radius: 9px; }
.table-member span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.table-member strong { overflow: hidden; max-width: 220px; color: #313b50; font-size: 12px; font-weight: 640; text-overflow: ellipsis; white-space: nowrap; }
.table-member small { color: #657188; font-size: 12px; }
.table-contact { max-width: 210px; overflow: hidden; display: block; color: #657187; text-overflow: ellipsis; white-space: nowrap; }
.table-date { color: #657187; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-footnote { margin: 0; padding: 12px 21px; border-top: 1px solid #eef0f5; color: #657188; font-size: 12px; }
.empty-state { min-height: 270px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 35px 20px; text-align: center; }
.empty-symbol { width: 25px; height: 25px; display: grid; place-items: center; margin-bottom: 9px; color: #5864ce; }
.empty-symbol svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h2 { margin: 0; color: #303a50; font-size: 15px; font-weight: 680; }
.empty-state p { max-width: 36ch; margin: 7px 0 17px; color: #657188; font-size: 13px; line-height: 1.5; }
.activity-list { padding: 4px 21px 5px; }
.activity-list.compact { padding-top: 0; }
.activity-item { display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; align-items: start; gap: 11px; padding: 14px 0; border-bottom: 1px solid #eef0f5; }
.activity-item:last-child { border-bottom: 0; }
.activity-symbol { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: #5864ce; background: #eff0ff; }
.activity-symbol svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.activity-copy { padding-top: 1px; }
.activity-copy strong { display: block; color: #39445b; font-size: 12px; font-weight: 630; line-height: 1.45; }
.activity-copy small { display: block; margin-top: 4px; color: #68758c; font-size: 12px; line-height: 1.4; }
.activity-time { padding-top: 3px; color: #68758c; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.activity-empty { padding: 32px 10px; color: #657188; font-size: 13px; text-align: center; }
.audit-retention { color: #68758c; font-size: 12px; }
.app-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 clamp(22px, 4vw, 54px); padding: 15px 0 20px; border-top: 1px solid var(--line); color: #657188; font-size: 12px; }

/* Member editor */
.member-dialog { position: fixed; inset: 0 0 0 auto; width: min(100vw, 520px); max-width: 100vw; height: 100vh; max-height: none; margin: 0; padding: 0; overflow: auto; border: 0; border-radius: 0; color: var(--ink); background: #fff; box-shadow: -12px 0 36px rgb(21 32 55 / 13%); }
.member-dialog::backdrop { background: rgb(17 26 43 / 38%); }
.member-dialog[open] { animation: drawer-in 190ms cubic-bezier(.2,.75,.25,1) both; }
@keyframes drawer-in { from { transform: translateX(28px); opacity: .8; } to { transform: translateX(0); opacity: 1; } }
.dialog-form { min-height: 100%; display: flex; flex-direction: column; }
.dialog-header { min-height: 116px; display: flex; justify-content: space-between; gap: 16px; padding: 27px 27px 20px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 7px 0 4px; color: #252e43; font-size: 21px; line-height: 1.25; letter-spacing: -.035em; }
.dialog-header p { margin: 0; color: #657188; font-size: 13px; }
.dialog-header .icon-button { flex: 0 0 36px; }
.dialog-body { flex: 1; display: flex; flex-direction: column; gap: 19px; padding: 24px 27px; }
.field-group { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.field-group input, .field-group select { height: 43px; border-radius: 7px; font-size: 13px; }
.field-group select { appearance: none; padding-right: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23718099' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.field-group small { color: #657188; font-size: 12px; line-height: 1.4; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.required-mark { color: #b03f49; }
.form-hint { display: flex; align-items: flex-start; gap: 8px; margin: 3px 0 0; padding: 11px 12px; border: 1px solid #e6e8f3; border-radius: 8px; color: #58657c; background: #f8f9fd; font-size: 12px; line-height: 1.5; }
.hint-lock svg { width: 15px; height: 15px; fill: none; stroke: #6c76cc; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dialog-footer { min-height: 74px; display: flex; align-items: center; gap: 9px; padding: 13px 27px; border-top: 1px solid var(--line); background: #fff; }
.dialog-footer .button { min-height: 39px; font-size: 13px; }
.footer-spacer { flex: 1; }
body.dialog-open { overflow: hidden; }
.toast-region { position: fixed; z-index: 30; right: 22px; bottom: 22px; display: grid; gap: 8px; }
.toast { width: min(380px, calc(100vw - 44px)); display: flex; align-items: flex-start; gap: 10px; border: 1px solid #cce8d6; border-radius: 9px; padding: 13px 15px; color: #1d6241; background: #f2fbf5; box-shadow: 0 8px 24px rgb(30 51 42 / 12%); font-size: 13px; line-height: 1.45; animation: toast-in 180ms ease-out both; }
.toast.error { border-color: #f2cdd0; color: #8c3339; background: #fff5f5; }
.toast::before { width: 7px; height: 7px; content: ""; flex: 0 0 7px; margin-top: 5px; border-radius: 50%; background: currentColor; }
@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .sidebar { padding-right: 13px; padding-left: 13px; }
  .member-row { grid-template-columns: minmax(170px, 1.2fr) minmax(115px, .85fr) minmax(105px, .7fr) minmax(105px, .6fr) 75px; gap: 8px; padding-right: 15px; padding-left: 15px; }
  .member-table th, .member-table td { padding-right: 11px; padding-left: 11px; }
  .member-table th:first-child, .member-table td:first-child { padding-left: 15px; }
  .list-toolbar { align-items: flex-start; flex-direction: column; }
  .search-field { width: 100%; max-width: 320px; }
}
@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-panel { width: min(100%, 520px); padding: 34px 25px 39px; }
  .auth-copy { margin: 46px 0 25px; }
  .auth-copy h1 { font-size: 28px; }
  .auth-aside { min-height: 250px; padding: 33px 25px; }
  .aside-content h2 { margin: 18px 0 10px; font-size: 33px; }
  .aside-content p { font-size: 14px; }
  .aside-rule { margin: 21px 0 11px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; height: 100dvh; transform: translateX(-100%); transition: transform 180ms ease-out; box-shadow: 8px 0 24px rgb(19 31 53 / 16%); }
  .sidebar.open { transform: translateX(0); }
  .side-caption { margin-top: 34px; }
  .topbar { height: 58px; justify-content: flex-start; padding: 0 16px; }
  .mobile-menu { display: inline-grid; flex: 0 0 36px; }
  .breadcrumb { min-width: 0; flex: 1; overflow: hidden; gap: 7px; font-size: 12px; white-space: nowrap; }
  .breadcrumb strong { overflow: hidden; text-overflow: ellipsis; }
  .topbar-right { gap: 8px; font-size: 12px; }
  .system-status { font-size: 0; gap: 0; }
  .system-status .status-dot { width: 8px; height: 8px; flex-basis: 8px; }
  .topbar-divider { display: none; }
  .today-label { display: none; }
  .content { padding: 28px 16px 37px; }
  .page-view { gap: 16px; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 24px; }
  .page-heading p { max-width: 37ch; font-size: 13px; }
  .page-heading .button { min-height: 39px; padding: 0 11px; font-size: 12px; }
  .page-heading .button svg { width: 15px; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-item { min-height: 67px; padding: 0 13px; }
  .summary-item:nth-child(2) { border-right: 0; }
  .summary-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .summary-label { font-size: 12px; }
  .summary-item strong { font-size: 20px; }
  .panel-heading { min-height: 70px; padding: 13px 15px; }
  .panel-heading h2 { font-size: 14px; }
  .panel-heading p { font-size: 12px; }
  .member-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; min-height: auto; padding: 13px 15px; }
  .member-row > .member-identity { grid-column: 1; grid-row: 1; }
  .member-row > .member-contact { grid-column: 1; grid-row: 2; padding-left: 46px; }
  .member-row > .member-expiry { grid-column: 1; grid-row: 3; padding-left: 46px; }
  .member-row > .member-status { grid-column: 2; grid-row: 1; align-self: start; }
  .member-row > .row-action { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
  .member-info strong { font-size: 13px; }
  .member-info small, .member-contact { font-size: 12px; }
  .member-expiry { font-size: 12px; }
  .activity-list { padding-right: 15px; padding-left: 15px; }
  .activity-item { grid-template-columns: 31px minmax(0, 1fr); gap: 9px; padding: 12px 0; }
  .activity-symbol { width: 29px; height: 29px; }
  .activity-time { grid-column: 2; padding-top: 0; }
  .list-toolbar { gap: 10px; padding: 11px 13px; }
  .filter-tabs { width: 100%; gap: 2px; }
  .filter-tab { min-height: 32px; padding: 0 7px; font-size: 12px; }
  .search-field { max-width: none; }
  .table-scroll { overflow: visible; }
  .member-table, .member-table tbody { display: block; }
  .member-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .member-table tbody tr { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; padding: 13px 13px; border-top: 1px solid #eef0f5; }
  .member-table tbody td { height: auto; display: block; min-width: 0; border: 0; padding: 0; }
  .member-table tbody td:first-child { grid-column: 1; grid-row: 1; padding-left: 0; }
  .member-table tbody td:nth-child(2) { grid-column: 1; grid-row: 2; padding-left: 43px; }
  .member-table tbody td:nth-child(3) { grid-column: 1; grid-row: 3; padding-left: 43px; }
  .member-table tbody td:nth-child(4) { grid-column: 2; grid-row: 1; justify-self: end; }
  .member-table tbody td:nth-child(5) { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
  .table-member { min-width: 0; gap: 10px; }
  .table-member strong { max-width: calc(100vw - 155px); font-size: 12px; }
  .table-member small, .table-contact, .table-date { font-size: 12px; }
  .table-footnote { padding: 11px 14px; }
  .app-footer { align-items: flex-start; flex-direction: column; gap: 5px; margin: 0 16px; font-size: 12px; }
  .member-dialog { width: 100vw; }
  .dialog-header { min-height: 104px; padding: 22px 18px 16px; }
  .dialog-body { gap: 17px; padding: 20px 18px; }
  .field-grid { grid-template-columns: 1fr; gap: 17px; }
  .access-fields { grid-template-columns: 1fr 1fr; }
  .dialog-footer { gap: 5px; padding: 11px 12px; }
  .dialog-footer .button { min-height: 38px; padding: 0 10px; font-size: 12px; }
  .button-danger-quiet { margin-right: auto; }
  .footer-spacer { display: none; }
  .toast-region { right: 12px; bottom: 12px; }
}
@media (max-width: 380px) {
  .page-heading { gap: 8px; }
  .page-heading .button { gap: 5px; padding: 0 8px; }
  .summary-item { padding: 0 9px; }
  .summary-label { gap: 6px; }
  .filter-tab { padding: 0 6px; font-size: 12px; }
  .dialog-footer .button { padding: 0 8px; }
  .button-danger-quiet { max-width: 88px; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
