:root {
  --mac-red: #ff5f57;
  --mac-yellow: #febc2e;
  --mac-green: #28c840;
  --accent: #007aff;
  --accent-dark: #0758c8;
  --success: #128a43;
  --warning: #c97900;
  --danger: #d92d20;
  --ink: #172033;
  --ink-soft: #526071;
  --muted: #7b8493;
  --line: rgba(22, 34, 52, 0.12);
  --line-strong: rgba(22, 34, 52, 0.2);
  --window: rgba(255, 255, 255, 0.84);
  --window-solid: #f8fafc;
  --sidebar: rgba(37, 42, 51, 0.94);
  --sidebar-rail: rgba(24, 28, 35, 0.96);
  --sidebar-panel: rgba(47, 53, 63, 0.94);
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --input: rgba(255, 255, 255, 0.72);
  --shadow-window: 0 38px 95px rgba(14, 27, 52, 0.35), 0 14px 36px rgba(14, 27, 52, 0.24);
  --shadow-panel: 0 12px 30px rgba(19, 38, 71, 0.09);
  --sidebar-width: 236px;
  --sidebar-rail-width: 50px;
  --sidebar-gutter: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

html {
  min-width: 320px;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  --logicarchive-bg-base: #ffffff;
  --logicarchive-bg-image: none;
  --logicarchive-bg-overlay: none;
  --logicarchive-bg-pattern: url("/patterns/jepara-carving.svg"), url("/patterns/jepara-carving.svg");
  background-color: var(--logicarchive-bg-base);
  background-image:
    var(--logicarchive-bg-overlay),
    var(--logicarchive-bg-image),
    var(--logicarchive-bg-pattern);
  background-position: center, center, center, 130px 130px;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-size: cover, cover, 260px 260px, 260px 260px;
  background-attachment: fixed;
}

body[data-app-background] {
  --logicarchive-bg-pattern: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
}

#root {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 16px;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 0;
  color: inherit;
  background: none;
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

input,
select,
textarea {
  color: var(--ink);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.dock-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 8px 18px rgba(21, 36, 68, 0.18);
}

.dock-dashboard {
  background: linear-gradient(135deg, #13c8ff, #006dff);
}

.dock-archives {
  background: linear-gradient(135deg, #36d074, #0a8c52);
}

.dock-documents {
  background: linear-gradient(135deg, #ffb23f, #ff6d4d);
}

.dock-audit {
  background: linear-gradient(135deg, #7c8dff, #4b5ddb);
}

.dock-developer {
  background: linear-gradient(135deg, #ff6b61, #e5484d);
}

.dock-settings {
  background: linear-gradient(135deg, #565d6a, #1d2736);
  color: #ffffff;
}

.app-shell {
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr);
  width: min(1324px, calc(100vw - 32px));
  height: min(736px, calc(100vh - 32px));
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 16px;
  background: var(--window);
  box-shadow: var(--shadow-window);
  backdrop-filter: blur(28px) saturate(145%);
  -webkit-backdrop-filter: blur(28px) saturate(145%);
}

.window-titlebar {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  align-items: center;
  height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(32, 45, 67, 0.11);
  background: rgba(249, 251, 253, 0.78);
}

.mac-traffic-lights {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mac-traffic-lights span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.18);
}

.mac-traffic-lights .close {
  background: var(--mac-red);
}

.mac-traffic-lights .minimize {
  background: var(--mac-yellow);
}

.mac-traffic-lights .maximize {
  background: var(--mac-green);
}

.window-title {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  min-width: 0;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.window-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.titlebar-clock {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.window-body {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 0;
}

.sidebar {
  display: grid;
  grid-template-columns: var(--sidebar-rail-width) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid rgba(0, 0, 0, 0.22);
  background:
    linear-gradient(
      90deg,
      var(--sidebar-rail) 0 var(--sidebar-rail-width),
      var(--sidebar-panel) var(--sidebar-rail-width) 100%
    );
}

.sidebar > .mac-traffic-lights {
  display: none;
}

.brand {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: var(--sidebar-rail-width) minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 0;
  padding: 18px 12px 16px 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  justify-self: center;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #1da7ff, #006dff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 8px 18px rgba(0, 122, 255, 0.22);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.brand strong,
.brand span {
  display: block;
  min-width: 0;
  padding-left: var(--sidebar-gutter);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand strong {
  color: rgba(255, 255, 255, 0.96);
  font-size: 14px;
  font-weight: 850;
}

.brand span {
  color: rgba(229, 234, 242, 0.62);
  font-size: 12px;
  font-weight: 600;
}

.mobile-header-actions {
  display: none;
}

.mobile-role-pill,
.mobile-logout-button {
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
}

.mobile-role-pill {
  display: inline-flex;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #42c7ff;
  font-size: 11px;
  font-weight: 900;
}

.mobile-logout-button {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #ff7b72;
  transition: background 0.16s ease, transform 0.16s ease;
}

.mobile-logout-button:active {
  transform: scale(0.96);
}

.sidebar-nav {
  display: grid;
  grid-column: 1 / -1;
  align-content: start;
  gap: 2px;
  padding: 10px 8px 0 0;
}

.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink-soft);
  text-align: left;
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-item svg {
  flex: 0 0 auto;
}

.nav-item:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}

.nav-item.active {
  color: var(--accent-dark);
  background: rgba(0, 122, 255, 0.12);
}

.nav-item:active {
  transform: scale(0.985);
}

.sidebar .nav-item {
  display: grid;
  grid-template-columns: var(--sidebar-rail-width) minmax(0, 1fr);
  min-height: 38px;
  gap: 0;
  padding: 0;
  border-radius: 0 8px 8px 0;
  color: rgba(229, 234, 242, 0.68);
  background: transparent;
  font-size: 13px;
}

.sidebar .nav-item svg {
  justify-self: center;
  color: rgba(229, 234, 242, 0.56);
}

.sidebar .nav-item span {
  min-width: 0;
  align-self: center;
  overflow: hidden;
  padding-right: 10px;
  padding-left: var(--sidebar-gutter);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar .nav-item:hover {
  color: rgba(255, 255, 255, 0.95);
  background:
    linear-gradient(
      90deg,
      transparent 0 var(--sidebar-rail-width),
      rgba(255, 255, 255, 0.07) var(--sidebar-rail-width) 100%
    );
}

.sidebar .nav-item:hover svg {
  color: rgba(255, 255, 255, 0.88);
}

.sidebar .nav-item.active {
  color: #ffffff;
  background:
    linear-gradient(
      90deg,
      rgba(0, 122, 255, 0.22) 0 var(--sidebar-rail-width),
      rgba(255, 255, 255, 0.11) var(--sidebar-rail-width) 100%
    );
}

.sidebar .nav-item.active svg {
  color: #42c7ff;
}

.danger-nav {
  color: var(--danger);
}

.sidebar-footer {
  display: grid;
  grid-template-columns: var(--sidebar-rail-width) minmax(0, 1fr);
  grid-column: 1 / -1;
  gap: 10px;
  margin-top: auto;
  padding: 12px 8px 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-profile-chip {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: var(--sidebar-rail-width) minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  padding: 2px 0;
}

.sidebar-profile-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  justify-self: center;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(145deg, rgba(0, 122, 255, 0.95), rgba(54, 86, 255, 0.9));
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 18px rgba(0, 122, 255, 0.18);
}

.sidebar-profile-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
  padding: 0 10px 0 var(--sidebar-gutter);
}

.sidebar-profile-copy strong,
.sidebar-profile-copy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile-copy strong {
  color: rgba(255, 255, 255, 0.94);
  font-size: 12px;
  font-weight: 850;
}

.sidebar-profile-copy span {
  color: #42c7ff;
  font-size: 11px;
  font-weight: 800;
}

.sidebar .danger-nav {
  grid-column: 1 / -1;
  color: #ff6b62;
}

.sidebar .danger-nav svg {
  color: #ff6b62;
}

.sidebar .danger-nav span {
  min-width: max-content;
  overflow: visible;
  text-overflow: clip;
}

.sidebar .danger-nav:hover {
  color: #ffffff;
  background:
    linear-gradient(
      90deg,
      rgba(255, 95, 87, 0.18) 0 var(--sidebar-rail-width),
      rgba(255, 95, 87, 0.12) var(--sidebar-rail-width) 100%
    );
}

.bottom-nav {
  display: none;
}

.dock-label {
  display: none;
}

.main-content {
  display: grid;
  min-width: 0;
  min-height: 0;
  align-content: start;
  gap: 16px;
  overflow: auto;
  background: rgba(248, 250, 252, 0.74);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 18px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(22, 34, 52, 0.08);
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.topbar h1 {
  margin: 0;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.14;
  font-weight: 800;
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.tenant-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid rgba(18, 138, 67, 0.18);
  border-radius: 8px;
  color: var(--success);
  background: rgba(33, 194, 104, 0.1);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.tenant-status-pill.suspended {
  color: var(--warning);
  border-color: rgba(201, 121, 0, 0.18);
  background: rgba(201, 121, 0, 0.1);
}

.tenant-status-pill.archived {
  color: var(--ink-soft);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.54);
}

.mobile-profile-button {
  display: none;
}

.mode-badge,
.internal-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid rgba(18, 138, 67, 0.18);
  border-radius: 8px;
  color: var(--success);
  background: rgba(33, 194, 104, 0.1);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.mode-badge {
  min-height: 26px;
  color: var(--accent-dark);
  background: rgba(0, 122, 255, 0.1);
  border-color: rgba(0, 122, 255, 0.18);
}

.mode-badge.live {
  color: var(--success);
  background: rgba(33, 194, 104, 0.1);
  border-color: rgba(18, 138, 67, 0.16);
}

.mode-badge.demo {
  color: #6750a4;
  background: rgba(103, 80, 164, 0.1);
  border-color: rgba(103, 80, 164, 0.16);
}

.internal-badge {
  max-width: 300px;
  color: #6750a4;
  background: rgba(103, 80, 164, 0.1);
  border-color: rgba(103, 80, 164, 0.16);
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-chip {
  display: grid;
  min-width: 142px;
  gap: 1px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
  box-shadow: 0 6px 14px rgba(17, 34, 61, 0.06);
}

.profile-chip span,
.profile-chip strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chip span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.profile-chip strong {
  color: var(--accent-dark);
  font-size: 11px;
}

.topbar-actions .mobile-profile-button {
  display: none;
}

.metric-grid,
.workspace-grid,
.content-area,
.developer-console > .panel,
.developer-console > .workspace-grid {
  padding-right: 24px;
  padding-left: 24px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.developer-console {
  display: grid;
  gap: 16px;
  padding-bottom: 24px;
}

.developer-console > .metric-grid {
  padding-right: 24px;
  padding-left: 24px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.9fr);
  gap: 14px;
  align-items: start;
  padding-bottom: 24px;
}

.content-area {
  display: grid;
  gap: 14px;
  padding-bottom: 24px;
}

.side-stack {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.full-span {
  grid-column: 1 / -1;
}

.panel,
.metric-card,
.archive-form,
.category-form,
.event-album-form,
.storage-backend-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-panel);
}

.panel {
  min-width: 0;
  padding: 18px;
}

.metric-card {
  display: grid;
  min-height: 104px;
  align-content: center;
  gap: 6px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.metric-card span,
.metric-card small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-card strong {
  color: var(--ink);
  font-size: 29px;
  line-height: 1;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.metric-card strong .metric-breakdown {
  display: grid;
  gap: 3px;
  color: inherit;
  font-size: 16px;
  line-height: 1.12;
  font-weight: 850;
  overflow-wrap: normal;
}

.metric-card strong .metric-breakdown span {
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 5px;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  white-space: nowrap;
}

.metric-card strong .metric-breakdown b {
  color: inherit;
  font-size: 22px;
  line-height: 0.95;
  font-weight: 900;
}

.metric-card.warning strong,
.missing,
.backup-health.warning {
  color: var(--warning);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-heading.compact {
  margin-bottom: 12px;
}

.panel-heading h2,
.form-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.22;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.panel-heading svg {
  color: var(--muted);
  flex: 0 0 auto;
}

.panel-heading-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.panel-copy,
.empty-hint p,
.audit-row p {
  margin: 0;
  color: var(--ink-soft);
}

.provider-note,
.settings-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid rgba(18, 138, 67, 0.14);
  border-radius: 8px;
  color: var(--ink-soft);
  background: rgba(33, 194, 104, 0.08);
}

.provider-note svg {
  flex: 0 0 auto;
  color: var(--success);
  margin-top: 1px;
}

.summary-list,
.subject-summary,
.tenant-settings-grid {
  display: grid;
  gap: 10px;
}

.summary-list > div,
.subject-summary > div,
.info-tile {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.summary-list span,
.subject-summary span,
.info-tile span,
.file-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-list strong,
.subject-summary strong,
.info-tile strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.chart-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0 24px 24px;
  align-items: stretch;
}

.chart-card {
  display: grid;
  min-width: 0;
  min-height: 236px;
  align-content: start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-panel);
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
  gap: 14px;
}

.chart-card-header span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.chart-card-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 850;
}

.chart-card-header > strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.category-checklist-card {
  grid-column: 1 / -1;
}

.category-pie-3d {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.category-pie-stage {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 0;
}

.category-pie-svg {
  width: min(100%, 320px);
  height: auto;
  overflow: visible;
}

.category-pie-shadow {
  fill: rgba(15, 23, 42, 0.16);
  filter: blur(8px);
}

.category-pie-depth path {
  stroke: rgba(15, 23, 42, 0.12);
  stroke-width: 1.2;
}

.category-pie-top path {
  stroke: rgba(255, 255, 255, 0.92);
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.category-pie-summary {
  display: grid;
  width: min(100%, 320px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.category-pie-summary span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(82, 96, 113, 0.1);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(248, 250, 252, 0.72);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.16;
}

.category-pie-summary strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.category-pie-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  min-width: 0;
}

.category-pie-legend span {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 2px 8px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(82, 96, 113, 0.1);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.72);
}

.category-pie-legend i {
  width: 10px;
  height: 10px;
  margin-top: 2px;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8);
}

.category-pie-legend strong,
.category-pie-legend small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-pie-legend strong {
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.15;
}

.category-pie-legend small {
  grid-column: 2;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
}

.category-checklist-empty {
  display: grid;
  min-height: 126px;
  place-items: center;
  padding: 16px;
  border: 1px dashed rgba(82, 96, 113, 0.18);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(248, 250, 252, 0.68);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.donut-chart {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.donut-chart svg {
  width: 124px;
  height: 124px;
}

.donut-track,
.donut-segment {
  fill: none;
  stroke-width: 14;
}

.donut-track {
  stroke: rgba(82, 96, 113, 0.12);
}

.donut-segment {
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
}

.chart-legend {
  display: grid;
  gap: 9px;
}

.chart-legend span,
.horizontal-chart-row > div:first-child,
.vertical-chart-labels span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chart-legend span {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.chart-legend i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.chart-legend strong,
.horizontal-chart-row strong,
.vertical-chart-labels strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.vertical-chart {
  display: grid;
  gap: 10px;
}

.vertical-chart-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(34px, 1fr);
  align-items: end;
  height: 122px;
  gap: 10px;
  padding: 12px 10px 0;
  border-bottom: 1px solid rgba(82, 96, 113, 0.16);
  background:
    linear-gradient(rgba(82, 96, 113, 0.08) 1px, transparent 1px) 0 18px / 100% 32px,
    linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0));
  border-radius: 8px 8px 0 0;
}

.vertical-bar-slot {
  display: flex;
  height: 100%;
  align-items: end;
  justify-content: center;
}

.vertical-bar-fill {
  display: block;
  width: min(100%, 28px);
  min-height: 4px;
  border-radius: 7px 7px 2px 2px;
}

.vertical-bar-fill.blue,
.horizontal-chart-fill.blue {
  background: linear-gradient(180deg, #31b7ff, #007aff);
}

.vertical-bar-fill.green,
.horizontal-chart-fill.green {
  background: linear-gradient(180deg, #6ee7a8, #16a34a);
}

.vertical-bar-fill.amber,
.horizontal-chart-fill.amber {
  background: linear-gradient(180deg, #facc15, #d97706);
}

.vertical-bar-fill.violet,
.horizontal-chart-fill.violet {
  background: linear-gradient(180deg, #a78bfa, #6d5dfc);
}

.vertical-bar-fill.slate,
.horizontal-chart-fill.slate {
  background: linear-gradient(180deg, #94a3b8, #475569);
}

.vertical-chart-labels {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(34px, 1fr);
  gap: 10px;
}

.vertical-chart-labels span {
  display: grid;
  gap: 3px;
  text-align: center;
}

.horizontal-chart {
  display: grid;
  gap: 13px;
}

.horizontal-chart-row {
  display: grid;
  gap: 7px;
}

.horizontal-chart-row > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.horizontal-chart-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: rgba(82, 96, 113, 0.12);
}

.horizontal-chart-fill {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
}

.line-chart {
  display: grid;
  gap: 8px;
}

.line-chart svg {
  width: 100%;
  height: 126px;
  border-bottom: 1px solid rgba(82, 96, 113, 0.16);
  border-radius: 8px 8px 0 0;
  background:
    linear-gradient(rgba(82, 96, 113, 0.08) 1px, transparent 1px) 0 18px / 100% 32px,
    rgba(248, 250, 252, 0.76);
}

.line-chart-area {
  fill: rgba(0, 122, 255, 0.12);
  stroke: none;
}

.line-chart-stroke {
  fill: none;
  stroke: #007aff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.line-chart-dot {
  fill: #ffffff;
  stroke: #007aff;
  stroke-width: 2.5;
}

.line-chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.line-chart-labels span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-button,
.danger-button,
.ghost-button,
.text-button,
.btn-primary,
.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.primary-button,
.btn-primary {
  padding: 0 14px;
  color: #ffffff;
  background: linear-gradient(180deg, #1a8fff, #0070df);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 18px rgba(0, 102, 204, 0.2);
}

.primary-button svg,
.btn-primary svg {
  color: #ffffff;
  stroke: currentColor;
}

.danger-button {
  padding: 0 14px;
  color: #ffffff;
  background: linear-gradient(180deg, #ff6b61, #e5484d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 10px 22px rgba(229, 72, 77, 0.22);
}

.ghost-button,
.upload-button {
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.62);
}

.compact-button {
  min-height: 31px;
  padding: 0 10px;
  font-size: 12px;
}

.text-button {
  min-height: 28px;
  padding: 0 4px;
  color: var(--accent-dark);
  background: transparent;
}

.icon-action-button {
  position: relative;
  display: inline-grid;
  width: 34px;
  height: 34px;
  min-width: 34px;
  place-items: center;
  border: 1px solid rgba(82, 96, 113, 0.16);
  border-radius: 8px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.7);
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.icon-action-button:hover,
.icon-action-button:focus-visible {
  color: var(--accent-dark);
  border-color: rgba(0, 122, 255, 0.34);
  background: rgba(0, 122, 255, 0.08);
  transform: translateY(-1px);
}

.icon-close-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  min-width: 34px;
  place-items: center;
  border: 1px solid rgba(229, 72, 77, 0.18);
  border-radius: 10px;
  color: #e5484d;
  background: rgba(255, 107, 97, 0.1);
  transition: background 0.16s ease, transform 0.16s ease;
}

.icon-close-button svg {
  color: currentColor;
}

.icon-close-button:hover,
.icon-close-button:focus-visible {
  background: rgba(255, 107, 97, 0.16);
}

.icon-close-button:active {
  transform: scale(0.96);
}

.icon-action-button::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 20;
  bottom: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: 160px;
  padding: 6px 8px;
  border-radius: 7px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.92);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.icon-action-button:hover::after,
.icon-action-button:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.primary-button:hover,
.danger-button:hover,
.btn-primary:hover,
.ghost-button:hover,
.upload-button:hover,
.text-button:hover {
  filter: brightness(0.98);
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.confirm-dialog {
  display: grid;
  width: min(100%, 380px);
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.confirm-dialog-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(145deg, #ff7b72, #e5484d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 12px 24px rgba(229, 72, 77, 0.22);
}

.confirm-dialog-copy {
  display: grid;
  gap: 6px;
}

.confirm-dialog-copy h2,
.confirm-dialog-copy p {
  margin: 0;
}

.confirm-dialog-copy h2 {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
}

.confirm-dialog-copy p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.search-row,
.form-actions,
.file-actions,
.row-actions,
.bg-save-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.search-row {
  margin-bottom: 14px;
}

.search-box {
  display: flex;
  min-width: min(100%, 280px);
  flex: 1 1 280px;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input);
}

.search-box svg {
  color: var(--muted);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-row > select,
.audit-filters select,
.audit-filters input,
.member-create-form input,
.member-create-form select,
.member-table-row input,
.member-table-row select,
.developer-table-row select,
.storage-policy-controls select,
.archive-form input,
.archive-form select,
.category-form input,
.category-form select,
.event-album-form input,
.event-album-form select,
.event-album-form textarea,
.storage-backend-form input,
.storage-backend-form select {
  height: 38px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 34px 0 11px;
  color: var(--ink);
  background-color: var(--input);
}

.archive-form input:focus,
.archive-form select:focus,
.category-form input:focus,
.category-form select:focus,
.storage-backend-form input:focus,
.storage-backend-form select:focus,
.search-box:focus-within,
.audit-filters input:focus,
.audit-filters select:focus,
.member-create-form input:focus,
.member-create-form select:focus,
.member-table-row input:focus,
.member-table-row select:focus,
.event-album-form input:focus,
.event-album-form select:focus,
.event-album-form textarea:focus,
.developer-table-row select:focus,
.storage-policy-controls select:focus {
  border-color: rgba(0, 122, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
}

.archive-card-list {
  display: none;
}

.archive-mobile-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.archive-mobile-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 13px;
  cursor: pointer;
  list-style: none;
}

.archive-mobile-card summary::-webkit-details-marker {
  display: none;
}

.archive-mobile-card summary strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.archive-mobile-card summary span,
.archive-card-fields span,
.archive-card-fields small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.archive-card-summary-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
  flex: 0 0 auto;
}

.archive-card-body {
  display: grid;
  gap: 12px;
  padding: 0 13px 13px;
}

.archive-card-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.archive-card-fields > div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.72);
}

.archive-card-fields strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: rgba(248, 250, 252, 0.88);
  font-size: 12px;
  font-weight: 850;
}

td strong,
td span {
  display: block;
}

td strong {
  color: var(--ink);
}

td span {
  color: var(--muted);
  font-size: 12px;
}

tr:last-child td {
  border-bottom: 0;
}

.status-pill,
.complete,
.missing,
.required,
.optional,
.backup-health,
.self-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.status-pill.active,
.complete,
.required,
.backup-health {
  color: var(--success);
  background: rgba(33, 194, 104, 0.1);
}

.status-pill.alumni,
.optional {
  color: var(--accent-dark);
  background: rgba(0, 122, 255, 0.1);
}

.status-pill.inactive,
.missing,
.backup-health.warning {
  background: rgba(255, 159, 10, 0.13);
}

.archive-actions {
  justify-content: flex-start;
}

.archive-edit-workspace,
.archive-create-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: 14px;
  align-items: start;
}

.archive-edit-workspace .archive-form,
.archive-create-workspace .archive-form {
  margin-bottom: 0;
}

.archive-import-actions {
  gap: 8px;
}

.file-action-label {
  cursor: pointer;
}

.file-action-label input {
  display: none;
}

.create-document-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 0;
}

.create-document-list {
  display: grid;
  gap: 8px;
}

.create-document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
}

.create-document-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.create-document-main strong {
  color: var(--ink);
  font-size: 13px;
}

.create-document-main span,
.draft-file-meta small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.create-document-row > .complete,
.create-document-row > .missing,
.create-document-row > .optional {
  justify-self: end;
}

.draft-file-meta {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--accent-dark);
}

.draft-file-meta span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-file-meta small {
  margin-left: auto;
  white-space: nowrap;
}

.create-document-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 8px;
}

.create-document-actions .upload-button,
.create-document-actions .file-action-button {
  min-height: 32px;
}

.archive-form,
.category-form,
.storage-backend-form {
  display: grid;
  gap: 13px;
  margin-bottom: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.form-header.compact h3 {
  font-size: 15px;
}

.form-header span {
  color: var(--muted);
  font-size: 12px;
}

.archive-continuity-note {
  margin: -2px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(0, 122, 255, 0.14);
  border-radius: 8px;
  color: rgba(23, 32, 51, 0.72);
  background: rgba(0, 122, 255, 0.06);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.form-grid,
.category-form-row {
  display: grid;
  gap: 11px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-form-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-2 {
  grid-column: span 2;
}

.archive-form label,
.category-form label,
.event-album-form label,
.storage-backend-form label,
.audit-filters label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 850;
}

.archive-form .system-identifier-input {
  border-style: dashed;
  color: var(--ink-soft);
  background: rgba(82, 96, 113, 0.08);
  cursor: not-allowed;
}

.archive-form .system-identifier-input + small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.checkbox-field,
.inline-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.checkbox-field input,
.inline-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.error-message {
  padding: 10px 12px;
  border: 1px solid rgba(217, 45, 32, 0.18);
  border-radius: 8px;
  color: var(--danger);
  background: rgba(217, 45, 32, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.success-message {
  padding: 10px 12px;
  border: 1px solid rgba(18, 138, 67, 0.18);
  border-radius: 8px;
  color: var(--success);
  background: rgba(18, 138, 67, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.content-error {
  margin: 0 24px;
}

.license-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 24px 14px;
  padding: 12px;
  border: 1px solid rgba(201, 121, 0, 0.22);
  border-radius: 8px;
  background: rgba(255, 179, 63, 0.12);
  box-shadow: var(--shadow-panel);
}

.license-banner.warning {
  border-color: rgba(0, 112, 223, 0.18);
  background: rgba(0, 122, 255, 0.08);
}

.license-banner.error {
  border-color: rgba(217, 45, 32, 0.18);
  background: rgba(217, 45, 32, 0.08);
}

.license-banner-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.license-banner-copy strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 900;
}

.license-banner-copy span {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.license-banner-action {
  flex: 0 0 auto;
  text-decoration: none;
}

.license-lock-card {
  width: min(100%, 490px);
}

.license-lock-meta {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.license-lock-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.license-lock-meta strong {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.license-lock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.license-lock-actions .primary-button,
.license-lock-actions .ghost-button {
  min-height: 44px;
  text-decoration: none;
}

.empty-state {
  padding: 26px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

@media (max-width: 720px) {
  .license-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .license-banner-action,
  .license-lock-actions .primary-button,
  .license-lock-actions .ghost-button {
    width: 100%;
  }
}

.category-list,
.document-checklist,
.backend-list,
.backup-queue-list {
  display: grid;
  gap: 8px;
}

.document-thumbnail-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.category-list-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.category-index {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  color: var(--ink);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  line-height: 1;
}

.category-row,
.document-row,
.backend-row,
.backup-queue-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.category-row,
.backend-row,
.backup-queue-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.category-list-item .category-row {
  min-width: 0;
}

.category-edit-button {
  justify-self: end;
}

.backend-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.backup-queue-row {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.category-row strong,
.backend-row strong,
.backup-queue-row strong,
.document-row-main strong {
  display: block;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.category-row div span,
.backend-row div span,
.backup-queue-row div span,
.document-row-main div span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-panel {
  position: relative;
  display: grid;
  gap: 13px;
}

.detail-panel > .panel-heading {
  padding-right: 88px;
}

.detail-panel .panel-heading-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  flex-wrap: nowrap;
}

.subject-cv-card {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(82, 96, 113, 0.13);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.7)),
    radial-gradient(circle at 18% 20%, rgba(0, 122, 255, 0.12), transparent 34%);
}

.subject-photo-panel {
  display: grid;
  align-content: start;
  gap: 10px;
}

.subject-photo-frame {
  display: grid;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(82, 96, 113, 0.14);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.82);
  box-shadow: 0 14px 32px rgba(17, 34, 61, 0.08);
}

.subject-photo-frame .document-thumbnail-empty,
.subject-photo-frame .document-thumbnail-image {
  border-radius: inherit;
}

.subject-photo-empty {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: rgba(82, 96, 113, 0.68);
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.92), transparent 34%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(233, 238, 246, 0.78));
  font-size: 12px;
  font-weight: 850;
}

.profile-photo-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  gap: 7px;
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: 8px;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.profile-photo-upload input {
  display: none;
}

.subject-cv-main {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.subject-cv-main h3 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.06;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.subject-cv-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  flex-wrap: wrap;
}

.subject-cv-badges > span:not(.status-pill) {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(82, 96, 113, 0.1);
  font-size: 12px;
  font-weight: 850;
}

.subject-cv-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.subject-cv-facts > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(82, 96, 113, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.subject-cv-facts span,
.subject-cv-facts small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.subject-cv-facts strong {
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 890;
  overflow-wrap: anywhere;
}

.document-card {
  align-content: start;
}

.document-card-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  min-height: 48px;
  gap: 8px;
}

.document-card-heading > div {
  min-width: 0;
}

.document-card-heading .complete,
.document-card-heading .missing {
  justify-self: end;
  margin-top: 0;
}

.document-thumbnail-frame {
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(82, 96, 113, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(82, 96, 113, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(82, 96, 113, 0.08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(82, 96, 113, 0.08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(82, 96, 113, 0.08) 75%);
  background-color: rgba(248, 250, 252, 0.82);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.document-thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.document-thumbnail-empty {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgba(82, 96, 113, 0.58);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.82), transparent 34%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.82), rgba(241, 245, 249, 0.72));
}

.document-card-footer {
  display: grid;
  gap: 10px;
}

.document-card .upload-button {
  width: 100%;
  min-height: 38px;
}

.subject-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.subject-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.subject-profile-grid > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.subject-profile-grid span,
.subject-profile-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.subject-profile-grid strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.document-row-main,
.file-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 10px;
}

.file-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.file-block .file-meta {
  flex: 1 1 auto;
}

.empty-file-meta {
  min-height: 34px;
  align-items: center;
}

.file-actions {
  flex: 0 0 auto;
}

.file-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(82, 96, 113, 0.16);
  border-radius: 8px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.file-action-button:hover,
.file-action-button:focus-visible {
  color: var(--accent-dark);
  border-color: rgba(0, 122, 255, 0.28);
  background: rgba(0, 122, 255, 0.08);
  transform: translateY(-1px);
}

.file-action-button.primary {
  color: #ffffff;
  border-color: rgba(0, 122, 255, 0.22);
  background: linear-gradient(180deg, #1a8fff, #0070df);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 16px rgba(0, 102, 204, 0.14);
}

.file-action-button.primary:hover,
.file-action-button.primary:focus-visible {
  color: #ffffff;
  background: linear-gradient(180deg, #2496ff, #0876e8);
}

.upload-button input {
  display: none;
}

.event-gallery-root {
  display: grid;
  gap: 14px;
  width: 100%;
}

.event-gallery-heading {
  margin-bottom: 0;
}

.event-album-form textarea {
  min-height: 86px;
  height: auto;
  resize: vertical;
  padding: 10px 11px;
}

.event-album-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.event-album-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
}

.event-album-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.event-album-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.event-album-card p {
  margin: 0;
  color: rgba(23, 32, 51, 0.72);
  font-size: 13px;
  line-height: 1.45;
}

.event-album-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-album-meta span,
.event-scope-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  width: fit-content;
  padding: 0 9px;
  border: 1px solid rgba(10, 132, 255, 0.14);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(10, 132, 255, 0.07);
  font-size: 12px;
  font-weight: 800;
}

.event-scope-summary {
  border-color: rgba(20, 184, 166, 0.16);
  color: #0f766e;
  background: rgba(20, 184, 166, 0.1);
}

.event-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.event-media-thumb,
.event-media-empty {
  display: grid;
  min-width: 0;
  gap: 6px;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.76);
  overflow: hidden;
}

.event-media-thumb {
  padding: 0;
  text-align: left;
}

.event-media-thumb img,
.event-media-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  place-items: center;
  object-fit: cover;
  background: rgba(226, 232, 240, 0.72);
}

.event-media-thumb span:last-child {
  min-width: 0;
  padding: 0 8px 8px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-media-empty {
  grid-column: 1 / -1;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.event-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: 8px;
  color: var(--accent-dark);
  background: rgba(0, 122, 255, 0.08);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.event-upload-button input {
  display: none;
}

.audit-filters {
  display: grid;
  grid-template-columns: 170px 170px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.audit-table,
.member-table,
.developer-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.member-create-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) 150px auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(0, 122, 255, 0.13);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.72);
}

.member-create-form label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 850;
}

.member-create-form .btn-primary {
  min-height: 38px;
}

.member-create-form-full {
  margin-bottom: 0;
}

.role-selection-note {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr);
  gap: 8px 12px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid rgba(0, 122, 255, 0.14);
  border-radius: 8px;
  color: var(--ink-soft);
  background: rgba(0, 122, 255, 0.05);
  font-size: 12px;
  line-height: 1.45;
}

.role-selection-note strong {
  color: var(--ink);
  font-size: 12px;
}

.role-selection-note span {
  color: var(--ink-soft);
  font-weight: 700;
}

.role-access-guide {
  display: grid;
  gap: 0;
  margin-bottom: 14px;
  border: 1px solid rgba(0, 122, 255, 0.14);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(248, 250, 252, 0.58);
}

.role-access-guide-heading {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-bottom: 1px solid rgba(0, 122, 255, 0.12);
}

.role-access-guide-heading strong {
  color: var(--ink);
  font-size: 13px;
}

.role-access-guide-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.role-access-item {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border-left: 1px solid rgba(0, 122, 255, 0.1);
}

.role-access-item:first-child {
  border-left: 0;
}

.role-access-item > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.role-access-item > div strong {
  color: var(--ink);
  font-size: 13px;
}

.role-access-item p,
.role-access-item small,
.role-access-scope-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.role-access-item small {
  color: var(--accent-dark);
}

.role-access-scope-note {
  padding: 10px 12px;
  border-top: 1px solid rgba(0, 122, 255, 0.1);
  background: rgba(255, 255, 255, 0.5);
}

.scope-management {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(20, 184, 166, 0.16);
  border-radius: 8px;
  background: rgba(240, 253, 250, 0.54);
}

.scope-management-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.scope-management-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.scope-create-form {
  display: grid;
  grid-template-columns: 140px minmax(160px, 1fr) minmax(160px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.scope-create-form label,
.scope-checkbox-field {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 850;
}

.scope-create-form input,
.scope-create-form select {
  height: 38px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 34px 0 11px;
  color: var(--ink);
  background-color: var(--input);
}

.scope-pill-list,
.scope-checkbox-list,
.archive-scope-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scope-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  color: #0f766e;
  background: rgba(20, 184, 166, 0.1);
  font-size: 12px;
}

.scope-pill small {
  color: rgba(15, 118, 110, 0.72);
  font-weight: 850;
}

.scope-checkbox-list {
  max-height: 122px;
  overflow: auto;
}

.scope-checkbox-list label,
.archive-scope-list label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.scope-checkbox-list input,
.archive-scope-list input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

.scope-empty-state {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.scope-empty-state.compact {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
}

.archive-scope-field {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 850;
}

.audit-table-head,
.audit-table-row,
.member-table-head,
.member-table-row,
.developer-table-head,
.developer-table-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-top: 1px solid var(--line);
}

.audit-table-head,
.member-table-head,
.developer-table-head {
  border-top: 0;
  color: var(--muted);
  background: rgba(248, 250, 252, 0.9);
  font-size: 12px;
  font-weight: 850;
}

.audit-table-head,
.audit-table-row {
  grid-template-columns: 150px 160px minmax(0, 1fr) 140px;
}

.member-table-head,
.member-table-row {
  grid-template-columns: 1.1fr 1.35fr 1fr 120px 120px minmax(180px, 1.2fr);
}

.member-card-field,
.member-value-stack {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.member-field-label {
  display: none;
}

.member-role-badge,
.member-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(82, 96, 113, 0.08);
  font-size: 12px;
  font-weight: 850;
}

.member-role-badge.owner {
  color: #6750a4;
  border-color: rgba(103, 80, 164, 0.18);
  background: rgba(103, 80, 164, 0.1);
}

.member-role-badge.admin {
  color: var(--accent-dark);
  border-color: rgba(0, 122, 255, 0.18);
  background: rgba(0, 122, 255, 0.1);
}

.member-role-badge.operator {
  color: var(--success);
  border-color: rgba(18, 138, 67, 0.18);
  background: rgba(33, 194, 104, 0.1);
}

.member-role-badge.viewer {
  color: var(--ink-soft);
  border-color: rgba(82, 96, 113, 0.18);
  background: rgba(82, 96, 113, 0.1);
}

.member-status-badge.active {
  color: var(--success);
  border-color: rgba(18, 138, 67, 0.18);
  background: rgba(33, 194, 104, 0.1);
}

.member-status-badge.invited {
  color: var(--warning);
  border-color: rgba(201, 121, 0, 0.18);
  background: rgba(255, 159, 10, 0.13);
}

.member-status-badge.disabled {
  color: var(--ink-soft);
  border-color: rgba(82, 96, 113, 0.18);
  background: rgba(82, 96, 113, 0.1);
}

.developer-table-head,
.developer-table-row {
  grid-template-columns: 1.1fr 1fr 150px minmax(210px, 1.2fr) 120px;
}

.developer-card-field {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.developer-card-label {
  display: none;
}

.audit-table-row strong,
.audit-table-row span,
.member-table-row strong,
.member-table-row span,
.developer-table-row strong,
.developer-table-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.audit-table-row strong,
.member-table-row strong,
.developer-table-row strong {
  color: var(--ink);
  font-size: 13px;
}

.audit-table-row span,
.member-table-row span,
.developer-table-row span {
  color: var(--ink-soft);
  font-size: 12px;
}

.member-table-row .member-role-badge,
.member-table-row .member-status-badge {
  font-size: 12px;
  font-weight: 850;
}

.member-table-row .member-role-badge.owner {
  color: #6750a4;
}

.member-table-row .member-role-badge.admin {
  color: var(--accent-dark);
}

.member-table-row .member-role-badge.operator,
.member-table-row .member-status-badge.active {
  color: var(--success);
}

.member-table-row .member-role-badge.viewer,
.member-table-row .member-status-badge.disabled {
  color: var(--ink-soft);
}

.member-table-row .member-status-badge.invited {
  color: var(--warning);
}

.storage-policy-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.storage-policy-controls .backup-health {
  grid-column: 1 / -1;
}

.backup-error {
  display: block;
  margin-bottom: 4px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

.tenant-settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.tenant-overview-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.tenant-overview-row .tenant-settings-grid {
  margin-bottom: 0;
}

.profile-summary {
  display: grid;
  gap: 6px;
}

.profile-summary span {
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.profile-summary strong {
  color: var(--accent-dark);
  font-size: 18px;
}

.tenant-profile-editor {
  display: grid;
  grid-template-columns: 76px repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  padding-top: 4px;
}

.tenant-profile-editor .tenant-logo-preview {
  justify-self: center;
}

.tenant-logo-preview {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  align-self: start;
  border: 1px solid rgba(0, 122, 255, 0.16);
  border-radius: 16px;
  color: #ffffff;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.36), transparent 30%),
    linear-gradient(145deg, #13b7ff 0%, #007aff 52%, #3557ff 100%);
  box-shadow: 0 14px 30px rgba(0, 112, 223, 0.18);
}

.tenant-logo-preview img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: contain;
}

.tenant-profile-editor label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 850;
}

.tenant-profile-editor input {
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.7);
}

.tenant-profile-editor input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.tenant-profile-editor input:focus {
  border-color: rgba(0, 122, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}

.tenant-save-bar {
  margin-top: 14px;
}

.tenant-logo-field {
  grid-column: 2 / -1;
}

.tenant-logo-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  width: fit-content;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.tenant-logo-picker:hover {
  background: rgba(255, 255, 255, 0.86);
}

.tenant-logo-cropper {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(0, 122, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
}

.tenant-logo-crop-frame {
  position: relative;
  width: min(100%, 260px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: 22px;
  background:
    linear-gradient(45deg, rgba(82, 96, 113, 0.12) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(82, 96, 113, 0.12) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(82, 96, 113, 0.12) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(82, 96, 113, 0.12) 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  box-shadow: 0 16px 36px rgba(14, 27, 52, 0.13);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.tenant-logo-crop-frame:active {
  cursor: grabbing;
}

.tenant-logo-crop-frame img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center;
  user-select: none;
  -webkit-user-drag: none;
}

.tenant-logo-crop-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: inherit;
  pointer-events: none;
}

.tenant-logo-crop-controls {
  display: flex;
  width: min(100%, 360px);
  align-items: end;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tenant-logo-crop-controls label {
  display: grid;
  min-width: 180px;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 850;
}

.tenant-logo-crop-controls input[type="range"] {
  accent-color: var(--accent);
}

.settings-root {
  display: grid;
  gap: 0;
}

.settings-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 24px 14px;
}

.settings-tab {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink-soft);
  font-weight: 800;
}

.settings-tab:hover {
  background: rgba(255, 255, 255, 0.6);
}

.settings-tab.active {
  color: var(--accent-dark);
  border-color: rgba(0, 122, 255, 0.18);
  background: rgba(0, 122, 255, 0.1);
}

.tampilan-section {
  padding-top: 0;
}

.bg-group {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.bg-group-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.bg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 10px;
}

.bg-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  text-align: left;
}

.bg-card.selected {
  border-color: rgba(0, 122, 255, 0.52);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}

.bg-card-thumb {
  display: block;
  height: 70px;
  border-radius: 6px;
  background-position: center;
  background-size: cover;
}

.bg-card-name {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.bg-card-check {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent);
}

.bg-save-bar {
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.bg-save-success {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-weight: 800;
}

.auth-screen,
.state-screen {
  display: grid;
  position: fixed;
  inset: 0;
  isolation: isolate;
  width: 100vw;
  min-height: 100dvh;
  padding: 16px;
  place-items: center;
  overflow: auto;
  background: #ffffff;
}

.auth-screen::before,
.state-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    url("/patterns/jepara-carving.svg"),
    url("/patterns/jepara-carving.svg");
  background-position:
    center,
    130px 130px;
  background-size: 260px 260px;
  opacity: 0.9;
}

.auth-screen::after,
.state-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.78) 0 18%, rgba(255, 255, 255, 0.18) 44%, rgba(255, 255, 255, 0.38) 100%);
}

.auth-card,
.state-card {
  display: grid;
  width: min(100%, 430px);
  gap: 22px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  box-shadow: var(--shadow-window);
}

.auth-card {
  width: min(100%, 420px);
  justify-items: center;
  gap: 24px;
  padding: 30px 28px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-window);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.auth-card.with-form {
  width: min(100%, 430px);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-window);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.auth-card.with-form .auth-hero {
  gap: 10px;
}

.auth-card.with-form .auth-logo {
  width: 72px;
  height: 72px;
  border-radius: 19px;
}

.auth-card.with-form .auth-logo::after {
  inset: 10px;
  border-radius: 14px;
}

.auth-card.with-form h1 {
  font-size: 30px;
}

.auth-card.with-form .auth-hero > p {
  font-size: 14px;
}

.auth-brand {
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.auth-hero {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.auth-logo {
  position: relative;
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 24px;
  color: #ffffff;
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.38), transparent 28%),
    linear-gradient(145deg, #13b7ff 0%, #007aff 48%, #3557ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -18px 34px rgba(3, 54, 139, 0.22),
    0 20px 44px rgba(0, 112, 223, 0.26);
}

.auth-logo::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 17px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.auth-card h1,
.state-card h1 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 44px;
  line-height: 1.16;
  font-weight: 900;
}

.auth-card h1 {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 0;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: 0;
}

.auth-card h1 span:first-child {
  color: var(--ink);
  text-shadow: 0 16px 36px rgba(18, 32, 61, 0.2);
}

.auth-card h1 span:last-child {
  color: var(--accent);
  text-shadow: 0 16px 36px rgba(0, 122, 255, 0.22);
}

.auth-card p,
.state-card p {
  margin: 0;
  color: var(--ink-soft);
}

.auth-hero > p {
  max-width: 320px;
  color: rgba(23, 32, 51, 0.74);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
}

.auth-entry-actions {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: 18px;
}

.auth-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 252px;
  min-height: 50px;
  gap: 10px;
  padding: 0 24px;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #007aff 0%, #5d7cff 52%, #21c268 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 14px 34px rgba(0, 112, 223, 0.25);
  font-size: 16px;
  font-weight: 900;
}

.auth-cta-button:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
}

.auth-login-link {
  color: rgba(82, 96, 113, 0.88);
  font-weight: 750;
}

.auth-login-link button {
  color: var(--accent-dark);
  font-weight: 900;
}

.auth-form-switch {
  color: rgba(82, 96, 113, 0.88);
  text-align: center;
  font-size: 13px;
  font-weight: 750;
}

.auth-form-switch button {
  color: var(--accent-dark);
  font-weight: 900;
}

.auth-form {
  width: 100%;
  display: grid;
  gap: 13px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 850;
}

.auth-form input {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.72);
}

.auth-form input:focus {
  border-color: rgba(0, 122, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}

.auth-form .primary-button {
  min-height: 42px;
}

.password-input {
  position: relative;
}

.password-input input {
  width: 100%;
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  color: var(--ink-soft);
  transform: translateY(-50%);
}

.password-toggle:hover {
  color: var(--accent-dark);
  background: rgba(0, 122, 255, 0.09);
}

.loading-card {
  display: grid;
  width: min(100%, 220px);
  justify-items: center;
  padding: 0;
  animation: loading-card-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.loading-indicator {
  display: grid;
  width: min(100%, 300px);
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.loading-indicator.logo-only {
  width: auto;
  gap: 0;
}

.loading-indicator.logo-only .loading-mark {
  width: 96px;
  height: 96px;
  border-radius: 25px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -20px 36px rgba(3, 54, 139, 0.24),
    0 26px 60px rgba(0, 112, 223, 0.34);
}

.loading-indicator.logo-only .loading-mark svg {
  width: 42px;
  height: 42px;
}

.loading-indicator.compact {
  width: 100%;
  min-height: 148px;
  align-content: center;
  gap: 12px;
  padding: 24px 18px;
  border: 1px solid rgba(0, 122, 255, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.36));
}

.loading-mark {
  position: relative;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 20px;
  color: #ffffff;
  background:
    radial-gradient(circle at 36% 24%, rgba(255, 255, 255, 0.34), transparent 30%),
    linear-gradient(145deg, #13b7ff 0%, #007aff 50%, #3557ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -18px 34px rgba(3, 54, 139, 0.24),
    0 18px 42px rgba(0, 112, 223, 0.24);
  animation: loading-breathe 1.9s ease-in-out infinite;
}

.loading-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.92),
    rgba(66, 199, 255, 0.78),
    rgba(33, 194, 104, 0.64),
    rgba(255, 255, 255, 0.12)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: loading-spin 1.05s linear infinite;
}

.loading-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    110deg,
    transparent 0%,
    transparent 24%,
    rgba(255, 255, 255, 0.58) 46%,
    transparent 64%,
    transparent 100%
  );
  transform: translateX(-120%);
  animation: loading-sweep 1.55s ease-in-out infinite;
}

.loading-mark svg {
  position: relative;
  z-index: 3;
}

.loading-indicator.compact .loading-mark {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -12px 24px rgba(3, 54, 139, 0.22),
    0 12px 28px rgba(0, 112, 223, 0.18);
}

.loading-copy {
  display: grid;
  gap: 4px;
}

.loading-copy strong {
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
  animation: loading-text-pulse 1.45s ease-in-out infinite;
}

.loading-copy span {
  color: rgba(82, 96, 113, 0.86);
  font-size: 13px;
  font-weight: 750;
}

.loading-indicator.compact .loading-copy strong {
  font-size: 14px;
}

.loading-progress {
  width: min(100%, 220px);
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(23, 32, 51, 0.08), rgba(23, 32, 51, 0.14), rgba(23, 32, 51, 0.08));
}

.loading-indicator.compact .loading-progress {
  width: min(100%, 164px);
  height: 2px;
}

.loading-progress span {
  display: block;
  width: 34%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #007aff 0%, #42c7ff 56%, #21c268 100%);
  box-shadow: 0 0 18px rgba(0, 122, 255, 0.42);
  animation: loading-track 1.05s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.loading-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.loading-label-mark {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  overflow: hidden;
  border-radius: 4px;
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.5), transparent 34%),
    linear-gradient(145deg, #13b7ff 0%, #007aff 52%, #21c268 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 0 14px rgba(0, 122, 255, 0.28);
  animation: loading-spin 0.9s linear infinite;
}

.loading-label-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.58) 50%, transparent 100%);
  transform: translateX(-120%);
  animation: loading-sweep 1.2s ease-in-out infinite;
}

@keyframes loading-card-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes loading-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.025);
  }
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loading-sweep {
  0%,
  20% {
    transform: translateX(-120%);
  }
  74%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes loading-track {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(330%);
  }
}

@keyframes loading-text-pulse {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-mark,
  .loading-mark::before,
  .loading-mark::after,
  .loading-label-mark,
  .loading-label-mark::after,
  .loading-progress span {
    animation: none;
  }

  .loading-progress span {
    width: 100%;
    opacity: 0.72;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  #root {
    --mobile-shell-inset: 10px;
    --mobile-shell-inset-double: 20px;
    display: grid;
    min-height: 100dvh;
    place-items: center;
    padding: var(--mobile-shell-inset);
  }

  .app-shell {
    width: 100%;
    height: calc(100dvh - var(--mobile-shell-inset-double));
    min-height: calc(100dvh - var(--mobile-shell-inset-double));
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 22px 58px rgba(14, 27, 52, 0.28);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
  }

  .window-titlebar {
    grid-template-columns: 80px minmax(0, 1fr) auto;
  }

  .window-body {
    display: block;
    height: calc(100dvh - var(--mobile-shell-inset-double) - 38px);
    min-height: 0;
    overflow: auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    min-height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #343b46, #272e38);
    box-shadow: 0 10px 22px rgba(16, 24, 40, 0.14);
  }

  .brand {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    flex: 1 1 auto;
    padding: 10px 12px 10px 16px;
  }

  .brand-mark {
    justify-self: auto;
  }

  .brand strong,
  .brand span {
    padding-left: 0;
  }

  .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding-right: 12px;
  }

  .sidebar-nav,
  .sidebar-footer {
    display: none;
  }

  .topbar-actions .mobile-profile-button {
    display: none;
  }

  .bottom-nav {
    position: fixed;
    right: 8px;
    bottom: 14px;
    left: 8px;
    z-index: 40;
    --bottom-nav-item-width: clamp(72px, 21vw, 80px);
    display: flex;
    width: auto;
    max-width: none;
    justify-content: flex-start;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    padding: 6px;
    scroll-padding: 6px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    transform: none;
    border-top: 1px solid rgba(255, 255, 255, 0.38);
    border-right: 1px solid rgba(255, 255, 255, 0.38);
    border-bottom: 1px solid rgba(255, 255, 255, 0.38);
    border-left: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    box-shadow: 0 18px 38px rgba(16, 35, 67, 0.22);
  }

  .bottom-nav::-webkit-scrollbar {
    display: none;
  }

  .bottom-nav .nav-item {
    display: grid;
    flex: 0 0 var(--bottom-nav-item-width);
    width: var(--bottom-nav-item-width);
    min-width: var(--bottom-nav-item-width);
    height: 58px;
    min-height: 58px;
    place-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0 2px;
    border-radius: 12px;
    color: #ffffff;
    text-align: center;
    scroll-snap-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 8px 18px rgba(21, 36, 68, 0.18);
    transition: transform 0.16s ease, filter 0.16s ease;
  }

  .bottom-nav .nav-label {
    display: none;
  }

  .bottom-nav .dock-label {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0;
    overflow: visible;
    color: currentColor;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
    text-overflow: clip;
    white-space: nowrap;
  }

  .bottom-nav .nav-item svg {
    width: 21px;
    height: 21px;
    opacity: 1;
  }

  .bottom-nav .nav-item:hover,
  .bottom-nav .nav-item.active {
    color: #ffffff;
    filter: brightness(1.03);
    transform: translateY(-3px);
  }

  .bottom-nav .nav-dashboard {
    background: linear-gradient(135deg, #12c9ff, #0077ff);
  }

  .bottom-nav .nav-archives {
    background: linear-gradient(135deg, #39d783, #079468);
  }

  .bottom-nav .nav-documents {
    background: linear-gradient(135deg, #ffbd45, #ff714d);
  }

  .bottom-nav .nav-events {
    color: #ffffff;
    background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  }

  .bottom-nav .nav-audit {
    background: linear-gradient(135deg, #7791ff, #5162e8);
  }

  .bottom-nav .nav-developer {
    background: linear-gradient(135deg, #ff6b61, #e5484d);
  }

  .bottom-nav .nav-settings {
    color: #ffffff;
    background: linear-gradient(135deg, #596273, #1f293a);
  }

  .main-content {
    min-height: calc(100dvh - var(--mobile-shell-inset-double) - 93px);
    padding-bottom: 86px;
    background: rgba(248, 250, 252, 0.48);
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-checklist-card {
    grid-column: 1 / -1;
  }

  .workspace-grid,
  .audit-filters,
  .member-create-form,
  .tenant-profile-editor,
  .tenant-overview-row,
  .developer-table-head,
  .developer-table-row,
  .member-table-head,
  .member-table-row {
    grid-template-columns: 1fr;
  }

  .role-access-guide-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-access-item:nth-child(odd) {
    border-left: 0;
  }

  .role-access-item:nth-child(n + 3) {
    border-top: 1px solid rgba(0, 122, 255, 0.1);
  }

  .audit-table-head,
  .audit-table-row {
    grid-template-columns: 1fr 1fr;
  }

  .audit-table,
  .developer-table {
    gap: 10px;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .audit-table-head,
  .developer-table-head {
    display: none;
  }

  .audit-table-row,
  .developer-table-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
  }

  .audit-table-row > [data-label] {
    display: grid;
    min-width: 0;
    gap: 3px;
  }

  .audit-table-row > [data-label]::before,
  .developer-card-label {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
  }

  .audit-table-row > [data-label]::before {
    content: attr(data-label);
  }

  .developer-table-row select {
    width: 100%;
  }

  .developer-table-row .storage-policy-controls {
    grid-template-columns: 1fr;
  }

  .developer-table-row .inline-check {
    justify-self: start;
  }

  .tenant-logo-preview {
    width: 58px;
    height: 58px;
  }

  .tenant-overview-row .tenant-logo-preview {
    justify-self: center;
  }

  .tenant-logo-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  #root {
    --mobile-shell-inset: 8px;
    --mobile-shell-inset-double: 16px;
  }

  .window-titlebar {
    grid-template-columns: 74px minmax(0, 1fr) auto;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
    background: rgba(248, 250, 252, 0.68);
  }

  .topbar h1 {
    font-size: 22px;
  }

  .topbar-actions {
    display: flex;
    justify-content: flex-start;
  }

  .profile-chip {
    width: 100%;
  }

  .metric-grid,
  .workspace-grid,
  .chart-dashboard-grid,
  .content-area,
  .developer-console > .panel,
  .developer-console > .workspace-grid,
  .developer-console > .metric-grid {
    padding-right: 16px;
    padding-left: 16px;
  }

  .metric-grid,
  .chart-dashboard-grid,
  .form-grid,
  .category-form-row,
  .archive-edit-workspace,
  .archive-create-workspace,
  .tenant-settings-grid,
  .tenant-overview-row,
  .audit-table-head,
  .audit-table-row {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .developer-console > .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .metric-card {
    min-height: 92px;
    padding: 13px;
  }

  .metric-card strong {
    font-size: 26px;
  }

  .metric-card span,
  .metric-card small {
    font-size: 11px;
    line-height: 1.2;
  }

  .chart-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
    overflow: visible;
    padding-bottom: 110px;
  }

  .chart-dashboard-grid > .chart-card {
    max-width: none;
    min-height: 0;
    margin-right: 0;
    padding: 16px;
  }

  .category-checklist-card {
    grid-column: 1;
  }

  .donut-chart {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 12px;
  }

  .donut-chart svg {
    width: 108px;
    height: 108px;
  }

  .vertical-chart-bars {
    height: 104px;
  }

  .line-chart svg {
    height: 108px;
  }

  .category-pie-3d {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .category-pie-svg {
    width: min(100%, 250px);
  }

  .category-pie-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-pie-legend {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .category-pie-legend span {
    flex: 0 0 154px;
    scroll-snap-align: start;
  }

  .subject-profile-grid,
  .subject-summary,
  .document-thumbnail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subject-cv-card {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .subject-cv-main {
    gap: 10px;
  }

  .subject-cv-main h3 {
    font-size: 22px;
  }

  .subject-cv-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .subject-cv-facts > div {
    padding: 9px;
  }

  .subject-cv-facts strong {
    font-size: 13px;
  }

  .subject-photo-frame {
    border-radius: 9px;
  }

  .subject-profile-grid,
  .subject-summary,
  .document-thumbnail-grid {
    gap: 8px;
  }

  .subject-profile-grid > div,
  .subject-summary > div {
    padding: 10px;
  }

  .subject-profile-grid strong,
  .subject-summary strong {
    font-size: 14px;
  }

  .document-card {
    padding: 10px;
  }

  .document-thumbnail-frame {
    aspect-ratio: 1;
  }

  .span-2 {
    grid-column: span 1;
  }

  .panel {
    padding: 15px;
  }

  .panel-heading,
  .form-header,
  .document-row-main,
  .file-meta,
  .file-block {
    align-items: stretch;
    flex-direction: column;
  }

  .tenant-profile-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .tenant-profile-edit-button {
    align-self: start;
    justify-self: end;
  }

  .file-actions {
    justify-content: flex-end;
  }

  .document-card-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    min-height: 48px;
  }

  .document-card-heading .complete,
  .document-card-heading .missing {
    justify-self: end;
  }

  .category-row,
  .backend-row,
  .backup-queue-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .category-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .category-row > div {
    grid-column: 1;
    grid-row: 1;
  }

  .category-row > .required,
  .category-row > .optional {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .category-edit-button {
    align-self: center;
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .category-list-item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
  }

  .category-index {
    min-height: 64px;
    font-size: 22px;
  }

  .archive-panel .table-wrap {
    display: none;
  }

  .archive-card-list {
    display: grid;
    gap: 10px;
  }

  .archive-card-fields {
    grid-template-columns: 1fr;
  }

  .archive-actions {
    justify-content: flex-end;
  }

  .settings-tabs {
    padding-right: 16px;
    padding-left: 16px;
    overflow-x: auto;
  }

  .member-table {
    gap: 10px;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .member-table-head {
    display: none;
  }

  .member-table-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
  }

  .member-card-field {
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
  }

  .member-field-label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
  }

  .member-role-badge,
  .member-status-badge {
    justify-self: start;
  }

  .scope-create-form,
  .member-create-form {
    grid-template-columns: 1fr;
  }

  .role-selection-note,
  .role-access-guide-list {
    grid-template-columns: 1fr;
  }

  .role-access-item,
  .role-access-item:nth-child(odd) {
    border-top: 1px solid rgba(0, 122, 255, 0.1);
    border-left: 0;
  }

  .role-access-item:first-child {
    border-top: 0;
  }

  .scope-checkbox-field {
    grid-column: auto;
  }

  .event-album-grid {
    grid-template-columns: 1fr;
  }

  .event-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-screen,
  .state-screen {
    min-height: 100vh;
    padding: 18px;
  }

  .auth-card {
    gap: 20px;
  }

  .auth-logo {
    width: 82px;
    height: 82px;
    border-radius: 22px;
  }

  .auth-card h1 {
    font-size: 32px;
  }

  .auth-hero > p {
    font-size: 14px;
  }

  .auth-cta-button {
    width: min(100%, 252px);
    min-height: 48px;
  }
}

@media (max-width: 380px) {
  .bottom-nav {
    right: 6px;
    left: 6px;
    --bottom-nav-item-width: 72px;
    gap: 4px;
    padding: 4px;
    scroll-padding: 4px;
  }

  .bottom-nav .nav-item {
    height: 58px;
    min-height: 58px;
    padding: 0 2px;
  }

  .bottom-nav .dock-label {
    font-size: 10px;
    font-weight: 900;
  }

  .bottom-nav .nav-item svg {
    width: 18px;
    height: 18px;
  }
}
