:root {
  --canvas: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --surface-strong: #f0f0f3;
  --ink: #171717;
  --body: #60646c;
  --muted: #8b8f98;
  --line: #eceef1;
  --line-strong: #d8dbe0;
  --primary: #000000;
  --primary-active: #1a1a1a;
  --nav-hover: #f0f0f3;
  --nav-active: #000000;
  --link: #0d74ce;
  --success: #16a34a;
  --success-soft: #edfdf3;
  --warning: #ab6400;
  --warning-soft: #fff8e8;
  --danger: #d92d20;
  --danger-soft: #fff1f1;
  --pending: #6f5f00;
  --pending-soft: #fff7d6;
  --trend-users: #171717;
  --trend-requests: #0d74ce;
  --trend-deals: #16a34a;
  --trend-sales: #ab6400;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-width: 276px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.admin-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 20px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 20px;
}

.brand-logo {
  aspect-ratio: 1;
  width: 42px;
  height: 42px;
  border-radius: 22%;
  box-shadow: 0 6px 14px rgba(23, 23, 23, 0.12);
  object-fit: cover;
}

.brand-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.brand-subtitle {
  margin: 4px 0 0;
  color: var(--body);
  font-size: 12px;
  font-weight: 600;
}

.nav-group {
  margin: 10px 0 18px;
}

.nav-title {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
}

.nav-button.active {
  background: var(--nav-active);
  color: #fff;
}

.nav-button:hover:not(.active) {
  background: var(--nav-hover);
  color: var(--ink);
}

.nav-meta {
  color: inherit;
  opacity: 0.65;
  font-size: 12px;
}

.main {
  min-width: 0;
  padding: 24px;
}

.admin-screen-frame {
  min-width: 0;
  transform-origin: center top;
  will-change: opacity, transform;
}

.screen-motion-fade {
  animation: admin-screen-fade 100ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.screen-motion-forward {
  animation: admin-screen-forward 140ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.screen-motion-back {
  animation: admin-screen-back 140ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin: -24px -24px 24px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 249, 0.92);
  backdrop-filter: blur(14px);
}

.page-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.page-description {
  margin: 4px 0 0;
  color: var(--body);
  font-size: 13px;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.button {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.button.primary:hover {
  background: var(--primary-active);
}

.button.danger {
  border-color: #ffcfcb;
  background: var(--danger-soft);
  color: var(--danger);
}

.button.ghost {
  background: transparent;
}

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

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(160px, 220px)) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 650;
  outline: none;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.textarea {
  min-height: 110px;
  resize: vertical;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.card-copy {
  margin: 5px 0 0;
  color: var(--body);
  font-size: 13px;
  font-weight: 600;
}

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

.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}

.metric.alert {
  border-color: #ffe0a3;
}

.metric.good {
  border-color: #bbf7d0;
}

.metric-label {
  color: var(--body);
  font-size: 12px;
  font-weight: 800;
}

.metric-value {
  margin-top: 6px;
  font-size: 28px;
  font-weight: 850;
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.analytics-card {
  overflow: hidden;
  border: 1px solid rgba(216, 219, 224, 0.64);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.64);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.035);
  color: var(--ink);
  min-width: 0;
}

.analytics-panel {
  display: grid;
  gap: 18px;
  padding: 22px 26px 24px;
}

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

.analytics-title {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.2;
}

.sync-overview-card {
  overflow: hidden;
}

.sync-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

.sync-overview-item {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(216, 219, 224, 0.72);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
}

.sync-overview-item span {
  color: var(--body);
  font-size: 11px;
  font-weight: 850;
}

.sync-overview-item strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 850;
  line-height: 1;
}

.sync-overview-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.analytics-tabs {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 24px;
}

.analytics-tab {
  position: relative;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding-bottom: 12px;
}

.analytics-tab.active {
  color: var(--ink);
}

.analytics-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.analytics-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.analytics-range,
.analytics-unit {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--body);
  border-radius: 999px;
  min-height: 34px;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 850;
}

.analytics-range.active {
  background: var(--primary);
  color: var(--on-primary, #ffffff);
}

.analytics-unit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.analytics-unit select {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  outline: 0;
}

.analytics-divider {
  height: 1px;
  background: var(--line);
}

.analytics-total {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}

.analytics-total span {
  color: var(--body);
  font-size: 14px;
  font-weight: 800;
}

.analytics-total strong {
  color: var(--ink);
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
}

.analytics-chart-wrap {
  position: relative;
  min-height: 276px;
  overflow: hidden;
}

.analytics-chart {
  display: block;
  width: 100%;
  height: auto;
}

.analytics-grid-line {
  stroke: #e5e7eb;
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.analytics-base-line {
  stroke: #a7abb3;
  stroke-width: 1;
  opacity: 0.55;
}

.analytics-axis-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.analytics-empty-note {
  position: absolute;
  left: 54px;
  right: 22px;
  top: 110px;
  z-index: 1;
  border: 1px dashed rgba(198, 202, 209, 0.68);
  border-radius: var(--radius-sm);
  background: rgba(250, 250, 250, 0.62);
  color: var(--body);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
  padding: 14px;
}

.analytics-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 18px;
  color: var(--body);
  font-size: 12px;
  font-weight: 800;
  padding-top: 2px;
}

.analytics-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.analytics-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.analytics-hover-hit {
  fill: transparent;
  pointer-events: all;
}

.analytics-hover-line,
.analytics-hover-dot,
.analytics-tooltip {
  opacity: 0;
  transition: opacity 120ms ease;
}

.analytics-hover-line {
  stroke: var(--ink);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: 0;
}

.analytics-hover-dot {
  fill: var(--ink);
  stroke: var(--surface);
  stroke-width: 2;
}

.analytics-tooltip rect {
  fill: rgba(255, 255, 255, 0.94);
  stroke: var(--line-strong);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.12));
}

.analytics-tooltip-title {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.analytics-tooltip-text {
  fill: var(--body);
  font-size: 11px;
  font-weight: 800;
}

.analytics-hover-zone:hover .analytics-hover-line,
.analytics-hover-zone:hover .analytics-hover-dot,
.analytics-hover-zone:hover .analytics-tooltip {
  opacity: 1;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.data-table th {
  color: var(--body);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.data-table tbody tr {
  background: var(--surface);
}

.data-table tbody tr:hover {
  background: var(--surface-soft);
}

.mono {
  font-family: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.muted {
  color: var(--body);
}

.strong {
  font-weight: 850;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--body);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.badge.success {
  background: var(--success-soft);
  color: var(--success);
}

.badge.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.pending {
  background: var(--pending-soft);
  color: var(--pending);
}

.report-alert {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-strong);
  border-radius: var(--radius) var(--radius) 0 0;
}

.tab {
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--body);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.tab:hover:not(.active) {
  background: var(--surface);
  color: var(--ink);
}

.tab.active {
  background: var(--nav-active);
  color: #fff;
}

.empty {
  padding: 24px;
  color: var(--body);
  font-size: 14px;
  font-weight: 700;
}

.notice-compose {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.notice-compose-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 0.8fr) minmax(180px, 0.45fr);
  gap: 12px;
  align-items: end;
}

.notice-compose-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notice-body-cell {
  max-width: 360px;
  color: var(--body);
  font-weight: 650;
  line-height: 1.5;
}

.notice-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.notice-timestamp-stack {
  display: grid;
  gap: 4px;
  min-width: 132px;
  color: var(--body);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.notice-timestamp-stack .edited {
  color: var(--ink);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  background: rgba(23, 23, 23, 0.28);
}

.drawer-backdrop.open {
  display: block;
}

.drawer-backdrop.drawer-motion-forward-backdrop {
  animation: admin-backdrop-in 120ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.drawer-backdrop.drawer-backdrop-closing {
  animation: admin-backdrop-out 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 90;
  width: min(920px, 100vw);
  height: 100vh;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 180ms cubic-bezier(0.32, 0.72, 0, 1);
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.12);
  will-change: transform;
}

.drawer.open {
  transform: translateX(0);
}

.drawer.drawer-motion-forward {
  animation: admin-drawer-in 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.drawer.drawer-motion-back {
  animation: admin-drawer-out 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
  pointer-events: none;
}

.drawer.drawer-motion-fade .drawer-body {
  animation: admin-screen-fade 100ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.drawer-head {
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.drawer-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.drawer-title {
  margin: 0;
  font-size: 22px;
  font-weight: 850;
}

.drawer-body {
  overflow: auto;
  padding: 18px 22px 28px;
}

.drawer .tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 6px;
  overflow: visible;
  padding: 10px 14px;
  border-radius: 0;
}

.drawer .tab {
  min-height: 38px;
  padding: 9px 10px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
}

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

.detail-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 12px;
}

.detail-label {
  color: var(--body);
  font-size: 11px;
  font-weight: 850;
}

.detail-value {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.stack {
  display: grid;
  gap: 12px;
}

.mini-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}

.mini-card h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.report-attention {
  display: grid;
  gap: 5px;
  border: 1px solid #ffe0a3;
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  color: var(--warning);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.45;
}

.report-attention strong {
  color: var(--ink);
  font-weight: 850;
}

.report-request-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}

.report-request-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.report-request-kicker {
  color: var(--body);
  font-size: 11px;
  font-weight: 850;
}

.report-request-title {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.25;
}

.report-request-description {
  display: -webkit-box;
  max-width: 920px;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--body);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.report-request-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.report-request-meta-grid > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 10px;
}

.report-request-meta-grid strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.report-request-media-section {
  margin-top: 14px;
}

.report-request-section-title {
  margin-bottom: 8px;
  color: var(--body);
  font-size: 11px;
  font-weight: 850;
}

.request-sync-section {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

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

.request-sync-item {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(248, 249, 251, 0.84);
  padding: 10px;
}

.request-sync-item span {
  color: var(--body);
  font-size: 11px;
  font-weight: 850;
}

.request-sync-item strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 850;
}

.request-sync-item .badge {
  width: fit-content;
}

.request-sync-notes {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 10px;
}

.request-sync-notes span {
  color: var(--body);
  font-size: 11px;
  font-weight: 850;
}

.request-sync-notes p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

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

.report-media-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 10px;
}

.report-media-thumb,
.report-media-empty {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
}

.report-media-thumb {
  object-fit: cover;
}

.report-media-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-media-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.report-media-meta span {
  color: var(--body);
  font-size: 11px;
  font-weight: 800;
}

.report-media-meta strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat {
  display: grid;
  gap: 12px;
}

.chat-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.message {
  max-width: 82%;
  border-radius: 16px;
  background: var(--surface-strong);
  padding: 12px;
}

.message.user {
  margin-right: auto;
  border: 1px solid var(--line);
}

.message.admin {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
}

.message-meta {
  margin-bottom: 6px;
  color: inherit;
  opacity: 0.72;
  font-size: 11px;
  font-weight: 800;
}

.message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 650;
}

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

.media-thumb {
  width: 100%;
  max-height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: var(--surface-strong);
}

.media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  display: none;
  max-width: min(420px, calc(100vw - 40px));
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  padding: 13px 15px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.toast.open {
  display: block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  place-items: center;
  background: rgba(23, 23, 23, 0.32);
  padding: 20px;
}

.modal-backdrop.open {
  display: grid;
}

.modal {
  width: min(520px, 100%);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px;
  box-shadow: var(--shadow);
}

.notice-edit-modal {
  width: min(680px, 100%);
}

.modal h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.modal p {
  margin: 0 0 18px;
  color: var(--body);
  font-weight: 650;
  line-height: 1.55;
}

.settlement-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.settlement-summary div,
.settlement-option {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 12px;
}

.settlement-summary span,
.settlement-option small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.settlement-summary strong,
.settlement-option strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.settlement-options {
  display: grid;
  gap: 10px;
  margin: 12px 0 18px;
}

.settlement-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  cursor: pointer;
}

.settlement-option.active {
  border-color: var(--primary);
  background: #fff;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(13, 116, 206, 0.10), transparent 34%),
    var(--canvas);
}

.auth-card {
  width: min(520px, 100%);
  padding: 28px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.auth-card p {
  margin: 0 0 18px;
  color: var(--body);
  font-weight: 650;
}

.notice {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 12px 14px;
  color: var(--body);
  font-size: 13px;
  font-weight: 700;
}

.loading-line {
  position: relative;
  overflow: hidden;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}

.loading-line::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 45%;
  border-radius: inherit;
  background: var(--primary);
  animation: loading 1s infinite ease-in-out;
}

@keyframes loading {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(230%); }
}

@keyframes admin-screen-fade {
  from {
    opacity: 0.9;
    transform: translate3d(0, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes admin-screen-forward {
  from {
    opacity: 0.9;
    transform: translate3d(18px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes admin-screen-back {
  from {
    opacity: 0.9;
    transform: translate3d(-18px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes admin-drawer-in {
  from {
    transform: translate3d(10%, 0, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes admin-drawer-out {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(10%, 0, 0);
  }
}

@keyframes admin-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes admin-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .screen-motion-fade,
  .screen-motion-forward,
  .screen-motion-back,
  .drawer.drawer-motion-forward,
  .drawer.drawer-motion-back,
  .drawer.drawer-motion-fade .drawer-body,
  .drawer-backdrop.drawer-motion-forward-backdrop,
  .drawer-backdrop.drawer-backdrop-closing {
    animation: none;
  }
}

@media (max-width: 1100px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    display: block;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-group {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 4px 0;
  }

  .nav-title {
    display: none;
  }

  .nav-button {
    min-width: fit-content;
  }

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

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .analytics-header {
    display: grid;
  }

  .analytics-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .main {
    padding: 14px;
  }

  .topbar {
    grid-template-columns: 1fr;
    margin: -14px -14px 14px;
    padding: 14px;
  }

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

  .toolbar {
    grid-template-columns: 1fr;
  }

  .section-grid,
  .detail-grid,
  .media-grid,
  .report-request-meta-grid,
  .report-media-grid,
  .request-sync-grid,
  .sync-overview-grid {
    grid-template-columns: 1fr;
  }

  .data-table {
    min-width: 720px;
  }

  .card-header {
    display: block;
  }

  .analytics-panel {
    padding: 18px 16px 20px;
  }

  .analytics-tabs {
    gap: 18px;
    margin-top: 18px;
  }

  .analytics-controls {
    gap: 6px;
  }

  .analytics-range,
  .analytics-unit {
    min-height: 32px;
    padding: 7px 10px;
  }

  .analytics-total {
    padding-left: 0;
  }

  .analytics-empty-note {
    left: 12px;
    right: 12px;
  }
}
