:root {
  --brand: #2563eb;
  --brand-dark: #1747b0;
  --brand-soft: #eef4ff;
  --ink: #172033;
  --muted: #667085;
  --muted-light: #98a2b3;
  --line: #e3e8f0;
  --canvas: #f4f7fb;
  --surface: #fff;
  --green: #15803d;
  --green-soft: #ecfdf3;
  --amber: #b54708;
  --amber-soft: #fff7e6;
  --shadow-sm: 0 2px 8px rgba(16, 24, 40, 0.05);
  --shadow: 0 24px 64px rgba(20, 34, 58, 0.13);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
.inbox-drop-zone:focus-within {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 2px;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
}

.portal-brand-logo { display: block; width: 148px; height: auto; }

.portal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.portal-eyebrow::before {
  width: 6px;
  height: 6px;
  content: "";
  border-radius: 50%;
  background: var(--brand);
}

.portal-primary {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  cursor: pointer;
  color: #fff;
  border: 1px solid var(--brand);
  border-radius: 9px;
  background: var(--brand);
  box-shadow: 0 7px 16px rgba(37, 99, 235, 0.2);
  font-size: 12px;
  font-weight: 700;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.portal-primary:hover:not(:disabled) {
  border-color: #1d55cf;
  background: #1d55cf;
  box-shadow: 0 9px 20px rgba(37, 99, 235, 0.26);
  transform: translateY(-1px);
}

.portal-primary:disabled {
  cursor: not-allowed;
  color: #98a2b3;
  border-color: #e4e7ec;
  background: #f2f4f7;
  box-shadow: none;
}

.portal-primary svg { width: 16px; height: 16px; }

/* Login */
.login-page {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 7% 5%, rgba(84, 128, 255, 0.2), transparent 29rem),
    #eef3fb;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.92fr);
  min-height: 100vh;
}

.login-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 42px clamp(44px, 7vw, 108px);
  color: #fff;
  background:
    linear-gradient(145deg, rgba(11, 36, 92, 0.96), rgba(30, 91, 216, 0.91)),
    linear-gradient(45deg, #0d2f75, #2563eb);
}

.login-story::before,
.login-story::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.login-story::before { right: -190px; bottom: -250px; width: 620px; height: 620px; }
.login-story::after { right: -95px; bottom: -155px; width: 430px; height: 430px; }
.login-story .portal-brand { position: relative; z-index: 1; }
.login-story .portal-brand-logo { width: 164px; border-radius: 10px; background: #fff; box-shadow: 0 8px 22px rgba(8, 26, 65, 0.2); }

.login-message { position: relative; z-index: 1; max-width: 610px; margin: 70px 0; }
.login-message .portal-eyebrow { color: #cfe0ff; }
.login-message .portal-eyebrow::before { background: #8fb3ff; }

.login-message h1 {
  max-width: 590px;
  margin-top: 22px;
  font-size: clamp(42px, 5.2vw, 70px);
  font-weight: 720;
  letter-spacing: -0.058em;
  line-height: 1.02;
}

.login-message > p {
  max-width: 540px;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.75;
}

.login-feature-list { display: grid; gap: 2px; margin-top: 42px; }
.login-feature-list > div {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}
.login-feature-list > div:last-child { border-bottom: 0; }
.login-feature-list > div > span { color: #8fb3ff; font-size: 10px; font-weight: 750; letter-spacing: 0.08em; }
.login-feature-list p { color: rgba(255, 255, 255, 0.62); font-size: 12px; line-height: 1.5; }
.login-feature-list strong { display: block; margin-bottom: 3px; color: #fff; font-size: 13px; }

.login-security {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 600;
}
.login-security span { width: 7px; height: 7px; border-radius: 50%; background: #5ee18d; box-shadow: 0 0 0 4px rgba(94, 225, 141, 0.13); }

.login-form-side {
  display: grid;
  min-height: 100vh;
  align-content: center;
  justify-items: center;
  padding: 50px 32px;
  background:
    radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.08), transparent 24rem),
    #f7f9fc;
}

.login-card {
  width: min(430px, 100%);
  padding: 38px;
  border: 1px solid rgba(220, 226, 236, 0.95);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-card-heading { margin-bottom: 26px; }
.login-card-icon { display: grid; width: 44px; height: 44px; margin-bottom: 20px; place-items: center; color: var(--brand); border-radius: 12px; background: var(--brand-soft); }
.login-card-icon svg { width: 21px; height: 21px; }
.login-card-heading h2 { font-size: 25px; font-weight: 720; letter-spacing: -0.035em; }
.login-card-heading p { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.55; }

.form-alert {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  padding: 11px 12px;
  color: #b42318;
  border: 1px solid #fecdca;
  border-radius: 9px;
  background: #fff4f3;
  font-size: 11px;
  font-weight: 600;
}
.form-alert svg { width: 16px; height: 16px; flex: 0 0 auto; }

.login-form { display: grid; gap: 17px; }
.form-field { display: grid; gap: 7px; color: #344054; font-size: 11px; font-weight: 650; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg { position: absolute; left: 13px; width: 17px; height: 17px; color: #98a2b3; pointer-events: none; }
.input-wrap input {
  width: 100%;
  height: 45px;
  padding: 0 44px 0 40px;
  color: var(--ink);
  border: 1px solid #d5dce7;
  border-radius: 9px;
  background: #fff;
  outline: none;
  font-size: 12px;
  font-weight: 500;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.input-wrap input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.11); }
.input-wrap input::placeholder { color: #a7afbd; }
.password-toggle { position: absolute; right: 8px; display: grid; width: 30px; height: 30px; cursor: pointer; place-items: center; color: #8791a3; border: 0; border-radius: 6px; background: transparent; }
.password-toggle:hover { color: var(--brand); background: var(--brand-soft); }
.password-toggle svg { width: 17px; height: 17px; }
.login-submit { width: 100%; min-height: 46px; margin-top: 3px; }

.temporary-access { margin-top: 25px; padding-top: 20px; border-top: 1px solid #edf0f5; }
.temporary-access > span { display: block; color: #475467; font-size: 9px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.temporary-access p { margin-top: 6px; color: var(--muted-light); font-size: 10px; line-height: 1.5; }
.login-help { margin-top: 22px; color: #98a2b3; font-size: 10px; font-weight: 550; }

/* Inbox */
.portal-page { background: #f4f7fb; }
.portal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 70px;
  align-items: center;
  gap: 24px;
  padding: 10px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.portal-nav { display: flex; align-items: center; justify-content: center; }
.portal-nav a { display: flex; min-height: 36px; align-items: center; gap: 8px; padding: 8px 13px; color: var(--muted); border-radius: 8px; font-size: 11px; font-weight: 650; }
.portal-nav a.active { color: var(--brand-dark); background: var(--brand-soft); }
.portal-nav svg { width: 16px; height: 16px; }

.account-menu { display: flex; align-items: center; justify-self: end; gap: 10px; }
.account-avatar { display: grid; width: 34px; height: 34px; place-items: center; color: var(--brand-dark); border: 1px solid #d7e3ff; border-radius: 10px; background: var(--brand-soft); font-size: 12px; font-weight: 750; }
.account-copy { display: flex; min-width: 92px; flex-direction: column; }
.account-copy strong { font-size: 11px; font-weight: 700; }
.account-copy small { margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 500; }
.logout-button { display: grid; width: 34px; height: 34px; cursor: pointer; place-items: center; color: #667085; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.logout-button:hover { color: #b42318; border-color: #fecdca; background: #fff7f6; }
.logout-button svg { width: 16px; height: 16px; }

.inbox-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 46px 0 72px; }
.inbox-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.inbox-intro h1 { margin-top: 8px; font-size: 39px; font-weight: 730; letter-spacing: -0.05em; }
.inbox-intro p { margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.55; }

.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 30px; }
.metric-card { display: flex; min-height: 94px; align-items: center; gap: 14px; padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.metric-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 11px; }
.metric-icon svg { width: 20px; height: 20px; }
.metric-icon.blue { color: var(--brand); background: var(--brand-soft); }
.metric-icon.amber { color: var(--amber); background: var(--amber-soft); }
.metric-icon.green { color: var(--green); background: var(--green-soft); }
.metric-card div { display: flex; flex-direction: column; }
.metric-card strong { font-size: 23px; font-weight: 730; letter-spacing: -0.035em; }
.metric-card span:last-child { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 550; }

.inbox-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; margin-top: 18px; }
.session-panel, .new-session-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.panel-heading { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border-bottom: 1px solid #edf0f5; }
.panel-heading h2, .new-session-heading h2 { font-size: 15px; font-weight: 710; letter-spacing: -0.02em; }
.panel-heading p, .new-session-heading p { margin-top: 5px; color: var(--muted); font-size: 10px; }
.admin-view-badge { padding: 5px 8px; color: #475467; border: 1px solid var(--line); border-radius: 999px; background: #f8fafc; font-size: 8px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }

.session-list { display: grid; }
.session-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 15px; align-items: center; min-height: 132px; padding: 20px; border-bottom: 1px solid #edf0f5; transition: background 150ms ease; }
.session-row:last-child { border-bottom: 0; }
.session-row:hover { background: #fbfcff; }
.document-icon { display: grid; width: 48px; height: 56px; place-items: center; color: var(--brand); border: 1px solid #d9e4fb; border-radius: 9px; background: linear-gradient(145deg, #f9fbff, #eef4ff); }
.document-icon svg { width: 23px; height: 23px; }
.document-icon span { margin-top: -9px; font-size: 7px; font-weight: 800; letter-spacing: 0.08em; }
.session-main { min-width: 0; }
.session-title-line { display: flex; min-width: 0; align-items: center; gap: 10px; }
.session-title-line h3 { min-width: 0; overflow: hidden; font-size: 13px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 999px; font-size: 8px; font-weight: 720; }
.status-pill i { width: 5px; height: 5px; border-radius: 50%; }
.status-pill.draft { color: #475467; background: #f2f4f7; }
.status-pill.draft i { background: #98a2b3; }
.status-pill.sent { color: #9a4a08; background: var(--amber-soft); }
.status-pill.sent i { background: #f79009; }
.status-pill.completed { color: #067647; background: var(--green-soft); }
.status-pill.completed i { background: #12b76a; }
.session-status { margin-top: 7px; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.session-status.sent { color: #9a4a08; font-weight: 600; }
.session-status.completed { color: #087443; }
.session-progress { width: min(320px, 100%); height: 4px; margin-top: 12px; overflow: hidden; border-radius: 999px; background: #edf0f5; }
.session-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3478f6, #69a0ff); }
.session-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 9px; color: #8a94a5; font-size: 8px; font-weight: 550; }
.session-meta span { position: relative; }
.session-meta span:not(:first-child)::before { position: absolute; left: -8px; content: "·"; color: #c2c8d2; }
.session-meta .session-expiry { color: #53657d; font-weight: 700; }
.session-meta .session-expiry.urgent { color: #b54708; }
.session-meta .session-sensitive { color: #7f56d9; font-weight: 700; }
.session-actions { display: flex; align-items: center; gap: 7px; }
.session-open { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; padding: 7px 12px; color: var(--brand-dark); border: 1px solid #cbdaf8; border-radius: 8px; background: #f8faff; font-size: 10px; font-weight: 700; }
.session-open:hover { border-color: var(--brand); background: var(--brand-soft); }
.session-icon-action { display: grid; width: 34px; height: 34px; place-items: center; color: #667085; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.session-icon-action:hover { color: var(--brand); border-color: #cbdaf8; }
.session-icon-action svg { width: 15px; height: 15px; }

.empty-inbox { display: grid; min-height: 370px; place-items: center; align-content: center; padding: 40px; text-align: center; }
.empty-inbox > span { display: grid; width: 55px; height: 55px; place-items: center; color: var(--brand); border-radius: 15px; background: var(--brand-soft); }
.empty-inbox svg { width: 25px; height: 25px; }
.empty-inbox h3 { margin-top: 18px; font-size: 16px; }
.empty-inbox p { max-width: 310px; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.empty-inbox a { margin-top: 16px; color: var(--brand); font-size: 10px; font-weight: 700; }

.new-session-card { position: sticky; top: 88px; padding: 20px; }
.new-session-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 17px; }
.new-session-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; color: var(--brand); border-radius: 10px; background: var(--brand-soft); }
.new-session-icon svg { width: 19px; height: 19px; }
.inbox-drop-zone { display: grid; min-height: 155px; place-items: center; align-content: center; padding: 22px; cursor: pointer; text-align: center; border: 1.5px dashed #b8c6dc; border-radius: 11px; background: #f9fbfe; transition: border-color 150ms ease, background 150ms ease; }
.inbox-drop-zone:hover, .inbox-drop-zone.dragover { border-color: var(--brand); background: var(--brand-soft); }
.inbox-drop-zone input { display: none; }
.inbox-upload-icon { display: grid; width: 39px; height: 39px; margin-bottom: 11px; place-items: center; color: var(--brand); border: 1px solid #d7e3ff; border-radius: 10px; background: #fff; box-shadow: 0 6px 14px rgba(37, 99, 235, 0.1); }
.inbox-upload-icon svg { width: 20px; height: 20px; }
.inbox-drop-zone strong { font-size: 11px; }
.inbox-drop-zone > span:last-of-type { margin-top: 4px; color: var(--muted); font-size: 9px; }
.inbox-file-name { display: none; align-items: center; gap: 8px; margin-top: 9px; padding: 9px 10px; color: #086a3d; border: 1px solid #bde9cb; border-radius: 8px; background: var(--green-soft); font-size: 9px; font-weight: 600; }
.inbox-file-name.show { display: flex; }
.file-check { display: grid; width: 18px; height: 18px; flex: 0 0 auto; place-items: center; color: #fff; border-radius: 50%; background: var(--green); font-size: 9px; }
#fileNameText { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sensitive-option { display: flex; gap: 9px; align-items: flex-start; margin-top: 10px; padding: 11px; cursor: pointer; color: #475467; border: 1px solid #e2e7ef; border-radius: 10px; background: #fbfcfe; transition: border-color 150ms ease, background 150ms ease; }
.sensitive-option:hover { border-color: #b9c9e5; background: #f7faff; }
.sensitive-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.sensitive-check { display: grid; width: 18px; height: 18px; flex: 0 0 auto; place-items: center; color: transparent; border: 1px solid #b8c2d1; border-radius: 5px; background: #fff; }
.sensitive-check svg { width: 12px; height: 12px; }
.sensitive-option input:checked + .sensitive-check { color: #fff; border-color: var(--brand); background: var(--brand); }
.sensitive-option:has(input:checked) { border-color: #b8cdf8; background: #f4f7ff; }
.sensitive-option:has(input:focus-visible) { outline: 2px solid #9ab8f7; outline-offset: 2px; }
.sensitive-option > span:last-child { display: grid; gap: 3px; }
.sensitive-option strong { color: #26374f; font-size: 9px; }
.sensitive-option small { color: #667085; font-size: 8px; line-height: 1.45; }
.create-session-button { width: 100%; margin-top: 10px; }
.button-label { display: inline-flex; align-items: center; gap: 8px; }
.button-spinner { display: none; width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: portal-spin .7s linear infinite; }
.create-session-button.loading .button-label { display: none; }
.create-session-button.loading .button-spinner { display: block; }
.upload-limit { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; color: #98a2b3; font-size: 8px; }
.upload-limit svg { width: 12px; height: 12px; }
.retention-notice { display: flex; gap: 9px; margin-top: 15px; padding: 11px; color: #41546e; border: 1px solid #dce7f8; border-radius: 10px; background: #f7faff; }
.retention-notice > svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--brand); }
.retention-notice div { display: grid; gap: 3px; }
.retention-notice strong { color: #23344d; font-size: 9px; }
.retention-notice span { font-size: 8px; line-height: 1.5; }
@keyframes portal-spin { to { transform: rotate(360deg); } }

/* Manage users */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.users-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 46px 0 72px; }
.users-intro h1 { margin-top: 8px; font-size: 39px; font-weight: 730; letter-spacing: -0.05em; }
.users-intro p { margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.users-alert { display: flex; align-items: center; gap: 9px; margin-top: 20px; padding: 11px 13px; border: 1px solid; border-radius: 10px; font-size: 11px; font-weight: 600; }
.users-alert > span { display: grid; width: 19px; height: 19px; flex: 0 0 auto; place-items: center; color: #fff; border-radius: 50%; font-size: 10px; }
.users-alert.success { color: #067647; border-color: #abefc6; background: #ecfdf3; }
.users-alert.success > span { background: #17b26a; }
.users-alert.error { color: #b42318; border-color: #fecdca; background: #fff4f3; }
.users-alert.error > span { background: #f04438; }
.users-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 30px; }
.users-metrics article { display: flex; min-height: 80px; flex-direction: column; justify-content: center; padding: 17px 19px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.users-metrics strong { font-size: 21px; font-weight: 730; letter-spacing: -0.035em; }
.users-metrics span { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 550; }
.users-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; margin-top: 18px; }
.users-panel, .create-user-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.users-table-wrap { min-height: 365px; overflow-x: auto; }
.users-table { width: 100%; border-collapse: collapse; text-align: left; }
.users-table th { height: 42px; padding: 0 17px; color: #667085; border-bottom: 1px solid #e8ecf2; background: #fafbfc; font-size: 8px; font-weight: 720; letter-spacing: 0.055em; text-transform: uppercase; }
.users-table td { height: 70px; padding: 11px 17px; border-bottom: 1px solid #edf0f5; vertical-align: middle; font-size: 10px; }
.users-table tr:last-child td { border-bottom: 0; }
.user-identity { display: flex; min-width: 170px; align-items: center; gap: 10px; }
.user-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; color: #344054; border: 1px solid #dfe4ec; border-radius: 9px; background: #f8fafc; font-size: 11px; font-weight: 740; }
.user-identity > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.user-identity strong { overflow: hidden; font-size: 10px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.user-identity small { margin-top: 3px; color: #98a2b3; font-size: 8px; }
.role-badge { display: inline-flex; padding: 4px 7px; color: #344054; border: 1px solid #e4e7ec; border-radius: 999px; background: #f9fafb; font-size: 8px; font-weight: 700; }
.role-badge.admin { color: #1849a9; border-color: #b2ccff; background: #eff4ff; }
.user-status { display: inline-flex; align-items: center; gap: 5px; color: #067647; font-size: 8px; font-weight: 680; }
.user-status i { width: 6px; height: 6px; border-radius: 50%; background: #17b26a; box-shadow: 0 0 0 3px #dcfae6; }
.user-status.inactive { color: #667085; }
.user-status.inactive i { background: #98a2b3; box-shadow: 0 0 0 3px #f2f4f7; }
.user-created { color: #667085; font-size: 8px; white-space: nowrap; }
.user-actions-cell { position: relative; width: 65px; text-align: right; }
.edit-user-details > summary { display: inline-flex; min-height: 30px; align-items: center; justify-content: center; padding: 6px 10px; cursor: pointer; color: var(--brand-dark); border: 1px solid #cbdaf8; border-radius: 7px; background: #f8faff; font-size: 9px; font-weight: 700; list-style: none; }
.edit-user-details > summary::-webkit-details-marker { display: none; }
.edit-user-details[open] > summary { color: #fff; border-color: var(--brand); background: var(--brand); }
.edit-user-details[open]::before { position: fixed; z-index: 109; inset: 0; content: ""; background: rgba(15, 23, 42, 0.32); backdrop-filter: blur(2px); }
.edit-user-card { position: fixed; z-index: 110; top: 50%; right: 50%; width: min(300px, calc(100vw - 28px)); max-height: calc(100vh - 36px); overflow-y: auto; padding: 17px; text-align: left; border: 1px solid #dce2eb; border-radius: 12px; background: #fff; box-shadow: 0 18px 50px rgba(16, 24, 40, 0.18); transform: translate(50%, -50%); }
.edit-user-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.edit-user-title > span { display: flex; flex-direction: column; gap: 3px; }
.edit-user-title strong { font-size: 12px; }
.edit-user-title small { color: #98a2b3; font-size: 8px; }
.edit-user-title button { display: grid; width: 26px; height: 26px; cursor: pointer; place-items: center; color: #667085; border: 0; border-radius: 6px; background: #f2f4f7; font-size: 17px; line-height: 1; }
.edit-user-title button:hover { color: #b42318; background: #fee4e2; }
.create-user-card { position: sticky; top: 88px; padding: 20px; }
.user-form { display: grid; gap: 13px; }
.user-form.compact { gap: 10px; }
.user-form label { display: grid; gap: 6px; color: #344054; font-size: 9px; font-weight: 650; }
.user-form label > span small { color: #98a2b3; font-weight: 500; }
.user-form input:not([type="checkbox"]), .user-form select { width: 100%; height: 40px; padding: 0 11px; color: var(--ink); border: 1px solid #d5dce7; border-radius: 8px; background: #fff; outline: none; font-size: 10px; font-weight: 500; }
.user-form input:not([type="checkbox"]):focus, .user-form select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.11); }
.user-form input::placeholder { color: #a7afbd; }
.user-form label > small { margin-top: -1px; color: #98a2b3; font-size: 7px; font-weight: 500; line-height: 1.45; }
.user-form .active-control { display: flex; align-items: center; gap: 7px; padding: 4px 0; }
.active-control input { width: 14px; height: 14px; accent-color: var(--brand); }
.active-control input:disabled + span { color: #98a2b3; }
.create-user-submit { width: 100%; margin-top: 3px; }
.json-store-note { margin-top: 16px; padding: 11px; color: #667085; border: 1px solid #e4e7ec; border-radius: 9px; background: #f9fafb; font-size: 8px; line-height: 1.5; }
.json-store-note strong { display: block; margin-bottom: 3px; color: #344054; font-size: 8px; }
.delete-user-button { width: 100%; margin-top: 10px; padding: 8px; cursor: pointer; color: #b42318; border: 1px solid #fecdca; border-radius: 7px; background: #fff7f6; font-size: 9px; font-weight: 680; }
.delete-user-button:hover { background: #fee4e2; }

@media (max-width: 960px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-story { min-height: auto; padding: 32px; }
  .login-message { max-width: 700px; margin: 70px 0 40px; }
  .login-message h1 { max-width: 650px; font-size: 48px; }
  .login-feature-list { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .login-feature-list > div { display: block; padding: 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; }
  .login-feature-list p { margin-top: 10px; }
  .login-security { margin-top: 30px; }
  .login-form-side { min-height: auto; padding: 60px 24px; }
  .inbox-layout { grid-template-columns: 1fr; }
  .new-session-card { position: static; }
  .users-layout { grid-template-columns: 1fr; }
  .create-user-card { position: static; }
}

@media (max-width: 700px) {
  .portal-header { grid-template-columns: 1fr auto; min-height: 64px; padding: 9px 16px; }
  .portal-nav { display: none; }
  .account-copy { display: none; }
  .portal-brand-logo { width: 132px; }
  .inbox-shell { width: calc(100% - 28px); padding: 32px 0 52px; }
  .users-shell { width: calc(100% - 28px); padding: 32px 0 52px; }
  .inbox-intro { align-items: flex-start; }
  .inbox-intro h1 { font-size: 34px; }
  .inbox-intro p { max-width: 380px; font-size: 11px; }
  .inbox-intro .portal-primary { padding: 9px 11px; font-size: 10px; }
  .metric-grid { grid-template-columns: 1fr; gap: 8px; }
  .users-metrics { grid-template-columns: 1fr; gap: 8px; }
  .users-metrics article { min-height: 66px; }
  .metric-card { min-height: 74px; padding: 14px; }
  .session-row { grid-template-columns: 44px minmax(0, 1fr); min-height: 0; padding: 16px; }
  .document-icon { width: 42px; height: 50px; }
  .session-title-line { align-items: flex-start; flex-direction: column; gap: 6px; }
  .session-actions { grid-column: 2; justify-content: flex-start; }
  .panel-heading { padding: 16px; }
  .login-feature-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .login-story { padding: 24px 20px; }
  .login-message { margin: 44px 0 10px; }
  .login-message h1 { font-size: 34px; }
  .login-message > p { font-size: 13px; }
  .login-feature-list, .login-security { display: none; }
  .login-form-side { padding: 24px 16px 38px; }
  .login-card { padding: 26px 20px; }
  .inbox-intro { flex-direction: column; }
  .users-intro h1 { font-size: 34px; }
  .inbox-intro .portal-primary { width: 100%; }
  .admin-view-badge { display: none; }
}
