@font-face {
  font-family: 'Inter';
  src: url('/brand/fonts/Inter-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Inter';
  src: url('/brand/fonts/Inter-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Inter';
  src: url('/brand/fonts/Inter-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Sora';
  src: url('/brand/fonts/Sora-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Sora';
  src: url('/brand/fonts/Sora-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

:root {
  --bg: #f6f6f6;
  --surface: #ffffff;
  --surface-soft: #eef6f1;
  --text: #213228;
  --muted: #8f8f8f;
  --line: #e2e8f0;
  --green: #0d9448;
  --green-deep: #083d28;
  --green-panel: #0b5a34;
  --amber: #f5b73b;
  --red: #c54f45;
  --blue: #2b5da7;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  --radius: 24px;
  --radius-sm: 16px;
  --font-heading: "Sora", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  transition: grid-template-columns 180ms ease;
}

.admin-shell.sidebar-collapsed {
  grid-template-columns: 92px minmax(0, 1fr);
}

.login-shell {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  padding: 32px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(8, 61, 40, 0.98), rgba(3, 50, 34, 0.98)),
    #083d28;
}

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

.login-card {
  width: min(526px, 100%);
  padding: 30px;
  border: 3px solid rgba(13, 148, 72, 0.9);
  border-radius: 12px;
  box-shadow: 0 0 11.95px rgba(2, 244, 108, 0.28);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-heading);
}

.login-card h1 {
  font-size: 28px;
  margin-top: 0;
}

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

.stack { display: grid; gap: 16px; }
.stack-lg { display: grid; gap: 22px; }

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
}

.btn-primary { background: var(--green); color: #fff; }
.btn-secondary { background: #fff; color: var(--green); border: 1px solid var(--green); }
.btn-ghost { background: #eef4f8; color: var(--text); }
.btn-danger { background: #fff0ef; color: var(--red); border: 1px solid #f1cbc7; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.admin-sidebar {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 20px;
  background: #ffffff;
  color: var(--text);
  border-right: 1px solid #ececec;
  transition: padding 180ms ease;
}

.sidebar-collapsed .admin-sidebar {
  padding: 20px 12px;
}

.sidebar-top {
  min-height: 0;
}

.sidebar-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.sidebar-collapsed .sidebar-brand-row {
  justify-content: center;
}

.sidebar-brand {
  padding: 2px 8px 0;
}

.sidebar-brand-logo {
  width: 132px;
  height: auto;
  display: block;
}

.sidebar-collapsed .sidebar-brand {
  display: none;
}

.sidebar-nav {
  display: grid;
  gap: 12px;
}

.sidebar-collapse {
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
  color: #6c7787;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.04);
}

.sidebar-collapse:hover {
  color: var(--green);
  border-color: #cfead9;
}

.sidebar-tab {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: transparent;
  color: #42526b;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 500;
  text-align: left;
  position: relative;
  white-space: nowrap;
}

.sidebar-collapsed .sidebar-tab {
  justify-content: center;
  padding: 14px 0;
}

.sidebar-tab:hover {
  background: #f3faf6;
}

.sidebar-tab.active {
  background: #cfead9;
  color: var(--green);
  border-color: #bfe0cb;
  box-shadow: none;
}

.sidebar-tab.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: var(--green);
}

.sidebar-collapsed .sidebar-tab.active::before {
  left: -12px;
}

.sidebar-tab-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: transparent;
  font-size: 15px;
  font-weight: 700;
}

.sidebar-collapsed .sidebar-tab-label {
  display: none;
}

.sidebar-tab.active .sidebar-tab-icon {
  background: transparent;
  color: var(--green);
}

.sidebar-footer {
  display: grid;
  gap: 16px;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 8px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.sidebar-collapsed .sidebar-user-card {
  justify-content: center;
  padding: 8px 0;
}

.sidebar-user-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 700;
}

.sidebar-user-name {
  font-weight: 700;
  color: var(--text);
}

.sidebar-user-email {
  margin-top: 3px;
  font-size: 13px;
  color: #4f4f4f;
}

.sidebar-collapsed .sidebar-user-meta {
  display: none;
}

.sidebar-logout {
  width: auto;
  justify-self: end;
  padding: 8px 0;
  border-radius: 0;
  background: transparent;
  color: #8b97a7;
  border: 0;
}

.sidebar-collapsed .sidebar-logout {
  width: 42px;
  height: 42px;
  justify-self: center;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #f3f6fb;
  font-size: 0;
}

.sidebar-collapsed .sidebar-logout::before {
  content: '↩';
  font-size: 18px;
  color: #8b97a7;
}

.admin-workspace {
  padding: 44px 28px 42px;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 34px;
}

.workspace-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.workspace-header h1 {
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #000;
}

.workspace-message {
  margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand h1 { font-size: 28px; }

.brand-login {
  align-items: center;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: block;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(6, 38, 24, 0.12);
}

.login-ambient {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-shape {
  position: absolute;
  display: block;
  opacity: 0.8;
}

.login-shape-top {
  width: 620px;
  height: 620px;
  top: -340px;
  left: -120px;
  border-radius: 50%;
  border: 110px solid rgba(13, 148, 72, 0.42);
}

.login-shape-right {
  width: 310px;
  height: 520px;
  top: -40px;
  right: 110px;
  border-radius: 180px;
  background: rgba(13, 148, 72, 0.28);
}

.login-shape-bottom {
  width: 720px;
  height: 720px;
  right: -210px;
  bottom: -420px;
  border-radius: 50%;
  border: 118px solid rgba(13, 148, 72, 0.46);
}

.login-shape-left {
  width: 620px;
  height: 620px;
  left: -300px;
  bottom: -270px;
  transform: rotate(45deg);
  background: rgba(13, 148, 72, 0.24);
}

.login-shape-diagonal {
  width: 780px;
  height: 780px;
  top: -120px;
  right: -300px;
  transform: rotate(45deg);
  background: rgba(6, 73, 48, 0.44);
}

.login-stage {
  position: relative;
  z-index: 1;
  width: min(1280px, 100%);
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(420px, 526px);
  align-items: center;
  gap: 72px;
}

.login-brand-panel {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 320px;
}

.login-brand-logo {
  width: min(420px, 72%);
  height: auto;
  display: block;
}

.login-card-header {
  display: grid;
  gap: 5px;
  text-align: center;
  color: #131927;
}

.login-card-header p {
  margin: 0;
  font-size: 14px;
  color: #131927;
}

.login-form {
  margin-top: 35px;
}

.login-field {
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 400;
  color: #000;
}

.login-field > span {
  display: block;
}

.login-field input {
  height: 48px;
  border: 1.5px solid #eaeaea;
  border-radius: 12px;
  padding: 12px;
  background: #fafafa;
  color: #131927;
}

.login-field input::placeholder {
  color: #9b9b9b;
}

.login-password-wrap {
  position: relative;
}

.login-password-wrap input {
  padding-right: 48px;
}

.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 0;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: #9b9b9b;
}

.login-password-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

.login-inline-link {
  align-self: end;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin-top: 3px;
  background: transparent;
  color: var(--green);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
}

.login-submit {
  width: 100%;
  min-height: 51px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
}

.login-footnote {
  margin: 12px 0 0;
  color: #333333;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

.overview-grid,
.content-grid {
  display: grid;
  gap: 18px;
}

.content-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.9fr);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}

.metric-card {
  padding: 18px 28px 16px;
  background: var(--surface);
  border: 0;
  border-radius: 20px;
  box-shadow: none;
}

.metric-label {
  font-size: 14px;
  color: var(--muted);
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 40px;
  margin-top: 14px;
  color: #20293a;
}

.metric-helper {
  margin-top: 10px;
  font-size: 13px;
  color: #18a152;
}

.metric-card:nth-child(2) .metric-helper,
.metric-card:nth-child(3) .metric-helper {
  color: #ff4e4e;
}

.panel {
  padding: 20px;
  border: 0;
  box-shadow: none;
  border-radius: 24px;
}

.incoming-panel {
  padding: 18px 18px 20px;
}

.escalated-panel {
  padding: 16px 18px 18px;
}

.escalated-toolbar {
  margin-bottom: 16px;
}

.escalated-search-wrap {
  max-width: 310px;
}

.escalated-sort-select {
  min-width: 126px;
}

.incoming-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.incoming-search-wrap {
  flex: 1 1 420px;
  max-width: 430px;
}

.incoming-search,
.incoming-select {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid #ece7e2;
  color: #818287;
  font-size: 14px;
  box-shadow: none;
}

.incoming-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.incoming-select {
  min-width: 142px;
  padding-right: 40px;
}

.incoming-filter-action {
  min-height: 48px;
  padding-inline: 18px;
  border-radius: 14px;
}

.incoming-table-shell {
  border: 1px solid #f0ece8;
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
}

.incoming-table {
  width: 100%;
}

.incoming-table-row {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(120px, 1.3fr) minmax(140px, 1.5fr) minmax(120px, 1.25fr) minmax(110px, 1fr) 54px;
  gap: 24px;
  align-items: start;
  padding: 18px 22px;
}

.case-history-row {
  grid-template-columns: minmax(0, 2.4fr) minmax(120px, 1.35fr) minmax(160px, 1.6fr) minmax(140px, 1.35fr) 54px;
}

.escalated-table-row {
  grid-template-columns: minmax(0, 2fr) minmax(140px, 1.1fr) minmax(0, 1.7fr) minmax(150px, 1.1fr) 72px;
  gap: 18px;
}

.incoming-table-head {
  padding-top: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ece7e2;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}

.incoming-table-row:not(.incoming-table-head) {
  color: #324054;
}

.incoming-table-row.active {
  background: #f8fcf9;
}

.incoming-report-cell,
.incoming-category-cell,
.incoming-location-cell,
.incoming-received-cell,
.incoming-status-cell,
.incoming-action-cell {
  min-width: 0;
}

.incoming-report-title {
  font-size: 15px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.incoming-report-id {
  margin-top: 3px;
  font-size: 14px;
  color: #b1afb5;
}

.incoming-category-cell,
.incoming-location-cell,
.incoming-received-cell {
  font-size: 15px;
  line-height: 1.45;
}

.escalated-by-cell,
.escalated-note-cell {
  font-size: 15px;
  line-height: 1.45;
  color: #324054;
}

.escalated-note-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.incoming-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
}

.incoming-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.incoming-status-badge.new {
  background: #eef2ff;
  color: #6366f1;
}

.incoming-status-badge.progress {
  background: #fff7ed;
  color: #d97706;
}

.incoming-status-badge.resolved {
  background: #ecfdf5;
  color: #059669;
}

.incoming-action-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.incoming-view-button {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--green);
  font-size: 16px;
  font-family: "Montserrat", var(--font-body);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.incoming-detail-panel {
  padding: 22px 24px;
}

.incoming-empty {
  margin: 18px;
}

.incoming-details-screen {
  gap: 18px;
}

.incoming-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  color: #131927;
}

.incoming-breadcrumb-link {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #131927;
  font-family: var(--font-heading);
  font-size: 16px;
}

.incoming-breadcrumb-separator {
  color: #818287;
  font-size: 18px;
}

.incoming-breadcrumb-current {
  color: var(--green);
  font-size: 16px;
}

.incoming-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.escalated-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.incoming-details-main,
.incoming-details-side {
  min-width: 0;
}

.escalated-review-main,
.escalated-review-side {
  min-width: 0;
}

.incoming-hero {
  overflow: hidden;
  border-radius: 16px;
  background: #eef2f4;
}

.incoming-hero img,
.incoming-hero video {
  display: block;
  width: 100%;
  max-height: 408px;
  object-fit: cover;
}

.incoming-report-details-card,
.incoming-update-card,
.incoming-status-timeline-card {
  padding: 20px;
}

.escalated-decision-card,
.escalated-notes-card {
  padding: 20px;
}

.incoming-report-details-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ece7e2;
}

.incoming-report-details-head h2,
.incoming-update-card h2,
.incoming-status-timeline-card h2 {
  font-size: 20px;
  color: #131927;
}

.incoming-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fdf7e6;
  color: #6e5b19;
  font-size: 13px;
}

.incoming-detail-rows {
  display: grid;
  gap: 18px;
  padding-top: 18px;
}

.escalated-detail-rows {
  gap: 12px;
}

.incoming-detail-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.incoming-detail-label {
  font-size: 14px;
  color: #9ea2ae;
}

.incoming-detail-value {
  font-size: 16px;
  line-height: 1.7;
  color: #131927;
}

.escalated-review-side h2 {
  font-size: 20px;
  color: #131927;
}

.escalated-decision-actions {
  margin-top: 14px;
  gap: 8px;
}

.escalated-approve-button,
.escalated-reject-button {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  justify-content: flex-start;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
}

.escalated-approve-button {
  padding-left: 18px;
}

.escalated-reject-button {
  padding-left: 18px;
}

.escalated-review-textarea {
  margin-top: 14px;
  min-height: 176px;
  resize: vertical;
  border: 0;
  border-radius: 10px;
  background: rgba(217, 217, 217, 0.34);
  padding: 16px;
  color: #131927;
}

.escalated-review-textarea::placeholder {
  color: #9ea2ae;
}

.incoming-update-card form label {
  font-weight: 500;
  font-size: 15px;
  color: #131927;
}

.incoming-readonly-update-card label {
  font-weight: 500;
  font-size: 15px;
  color: #131927;
}

.incoming-update-card select,
.incoming-update-card input,
.incoming-update-card textarea {
  border-color: #ece7e2;
  color: #818287;
}

.incoming-readonly-update-card input,
.incoming-readonly-update-card textarea {
  background: #f7f7f7;
  color: #9ea2ae;
}

.incoming-update-card textarea {
  resize: vertical;
  min-height: 84px;
}

.incoming-save-button {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
}

.incoming-timeline {
  display: grid;
  gap: 0;
}

.incoming-timeline-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 24px;
}

.incoming-timeline-marker {
  display: grid;
  justify-items: center;
}

.incoming-timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 50%;
  background: #0d9448;
  box-shadow: 0 0 0 5px rgba(13, 148, 72, 0.12);
}

.incoming-timeline-line {
  width: 1px;
  min-height: 34px;
  margin-top: 3px;
  background: #caecd6;
}

.incoming-timeline-item.is-current .incoming-timeline-dot {
  background: #0d9448;
  box-shadow: 0 0 0 5px rgba(13, 148, 72, 0.16);
}

.incoming-timeline-item.is-pending .incoming-timeline-dot {
  background: #b9c3d3;
  box-shadow: 0 0 0 5px rgba(185, 195, 211, 0.16);
}

.incoming-timeline-item.is-pending .incoming-timeline-line {
  background: #dfe5ef;
}

.incoming-timeline-item.is-pending .incoming-timeline-time,
.incoming-timeline-item.is-pending .incoming-timeline-text {
  color: #98a3b3;
}

.incoming-timeline-copy {
  padding-bottom: 18px;
}

.incoming-timeline-time {
  font-size: 11px;
  color: #818287;
}

.incoming-timeline-text {
  margin-top: 6px;
  font-family: var(--font-heading);
  font-size: 15px;
  color: #131927;
  line-height: 1.35;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.toolbar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.workspace-actions {
  justify-content: flex-end;
  align-items: center;
}

.users-header-add {
  min-height: 40px;
  border-radius: 10px;
  padding-inline: 18px;
}

.users-panel {
  padding: 16px 18px 18px;
}

.users-toolbar {
  margin-bottom: 16px;
}

.users-search-wrap {
  max-width: 310px;
}

.users-filter-group {
  gap: 12px;
}

.users-filter-select {
  min-width: 98px;
}

.users-table-shell {
  border: 1px solid #f0ece8;
  border-radius: 20px;
  overflow: visible;
}

.routing-rules-table {
  min-width: 760px;
}

.categories-table {
  min-width: 700px;
}

.routing-rules-row {
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.9fr) minmax(260px, 1.1fr) 42px;
}

.categories-row {
  grid-template-columns: minmax(260px, 1.5fr) minmax(200px, 1fr) 42px;
}

.users-table-row {
  grid-template-columns: minmax(0, 2.1fr) minmax(120px, 1fr) minmax(140px, 1fr) minmax(150px, 1fr) 42px;
  gap: 18px;
}

.users-name-cell,
.users-role-cell,
.users-status-cell,
.users-action-cell {
  min-width: 0;
}

.users-role-cell {
  font-size: 15px;
  line-height: 1.45;
  color: #324054;
}

.users-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
}

.users-status-badge.active {
  background: #eaf8ef;
  color: #0d9448;
}

.users-status-badge.inactive {
  background: #eef1f4;
  color: #9ea2ae;
}

.users-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.users-action-cell {
  position: relative;
  display: flex;
  justify-content: center;
}

.users-menu-trigger {
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: #657184;
  font-size: 22px;
  line-height: 1;
}

.users-action-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 8;
  min-width: 168px;
  padding: 8px;
  border: 1px solid #e6e2e2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 4px;
}

.users-action-menu button {
  border-radius: 10px;
  background: transparent;
  color: #324054;
  padding: 10px 12px;
  text-align: left;
}

.users-action-menu button[data-user-action="delete"] {
  color: #ee443f;
}

.users-action-menu button[data-routing-rule-action="delete"] {
  color: #ee443f;
}

.users-action-menu button:hover {
  background: #f3faf6;
}

.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(19, 25, 39, 0.28);
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.users-modal-card {
  width: min(520px, 100%);
  padding: 24px;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.16);
  border-radius: 12px;
}

.users-modal-card-delete {
  width: min(726px, 100%);
}

.users-modal-card-routing {
  width: min(726px, 100%);
}

.users-modal-card-category {
  width: min(620px, 100%);
}

.users-modal-card-routing-delete {
  width: min(746px, 100%);
}

.users-modal-header {
  margin-bottom: 6px;
}

.users-modal-header h2 {
  font-size: 28px;
  color: #131927;
}

.users-modal-copy {
  margin: 0 0 24px;
  color: #c0c6d1;
  font-size: 14px;
  line-height: 1.45;
}

.users-modal-copy-delete {
  max-width: 412px;
  margin-bottom: 0;
  color: #9ea2ae;
}

.users-modal-copy-routing {
  margin-bottom: 0;
  color: #9ea2ae;
}

.users-modal-copy-category {
  margin-bottom: 0;
  color: #9ea2ae;
}

.users-modal-close {
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #131927;
  font-size: 28px;
  line-height: 1;
}

.users-create-form {
  gap: 16px;
}

.users-form-field {
  display: grid;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 400;
  color: #000;
}

.users-form-field input,
.users-form-field select {
  min-height: 48px;
  border: 1.5px solid #eaeaea;
  border-radius: 12px;
  padding: 12px;
  background: #fafafa;
  color: #131927;
}

.users-form-field input::placeholder {
  color: #9b9b9b;
}

.users-form-field-extra {
  margin-top: -2px;
}

.routing-modal-role-label {
  gap: 0;
}

.routing-modal-helper {
  color: #9ea2ae;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.35;
}

.category-visibility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 56px;
  padding: 0 16px;
  border: 1.5px solid #eaeaea;
  border-radius: 12px;
  background: #fafafa;
  font-family: var(--font-heading);
  font-size: 14px;
  color: #131927;
}

.category-visibility-row input {
  width: 20px;
  height: 20px;
}

.visibility-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  color: #324054;
}

.visibility-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.visibility-switch-track {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #e6ebf0;
  transition: background 0.18s ease;
}

.visibility-switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.15);
  transition: transform 0.18s ease;
}

.visibility-switch input:checked + .visibility-switch-track {
  background: #0d9448;
}

.visibility-switch input:checked + .visibility-switch-track::after {
  transform: translateX(20px);
}

.visibility-switch input:disabled + .visibility-switch-track {
  opacity: 0.55;
}

.visibility-switch-label {
  min-width: 48px;
}

.users-modal-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 6px;
}

.users-cancel-submit,
.users-create-submit,
.users-delete-submit {
  min-height: 51px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
}

.users-create-submit {
  background: #0d9448;
}

.users-delete-submit {
  background: #ee443f;
}

.users-cancel-submit {
  border: 1.5px solid #0d9448;
  background: #fff;
  color: #0d9448;
}

.cards,
.list {
  display: grid;
  gap: 14px;
}

.card {
  padding: 18px;
}

.card.active {
  border-color: rgba(13, 148, 72, 0.35);
  box-shadow: 0 20px 44px rgba(13, 148, 72, 0.12);
}

.row,
.meta,
.actions,
.keyvals {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.row { justify-content: space-between; align-items: flex-start; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
}

.pill.info { background: #e6f0ff; color: var(--blue); }
.pill.success { background: #e7f7ee; color: var(--green); }
.pill.warning { background: #fff4dc; color: #946300; }
.pill.danger { background: #fff0ef; color: var(--red); }
.pill.neutral { background: #f1f5f9; color: #52606d; }

.detail-card {
  padding: 20px;
  position: sticky;
  top: 28px;
}


.overview-chart-panel {
  padding: 24px 28px 22px;
  border-radius: 24px;
}

.panel-header-spacious {
  margin-bottom: 28px;
}

.panel-header-spacious h2 {
  font-size: 18px;
  color: #20293a;
}

.fake-select {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid #e1e1e1;
  border-radius: 14px;
  color: #9a9a9a;
  background: #fff;
}

.fake-select span {
  color: #9a9a9a;
  font-size: 14px;
}

.trend-chart {
  margin-top: 0;
}

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

.trend-axis {
  stroke: #b7b7b7;
  stroke-width: 1.5;
}

.trend-grid {
  stroke: #ececec;
  stroke-width: 1;
}

.trend-y-label {
  fill: #9a9a9a;
  font-size: 11px;
  font-family: var(--font-body);
}

.trend-line {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-fill {
  fill: url(#trend-fill);
  stroke: none;
}

.trend-point {
  fill: #fff;
  stroke: var(--green);
  stroke-width: 3;
}

.trend-labels {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
  font-size: 12px;
  color: #7c7c7c;
  padding-left: 54px;
  padding-right: 18px;
}

.detail-media {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #f4f7fb;
  overflow: hidden;
  margin: 14px 0;
}

.detail-media img,
.detail-media video {
  width: 100%;
  display: block;
}

.kv {
  padding: 10px 12px;
  border-radius: 14px;
  background: #f7fafc;
  border: 1px solid var(--line);
}

.kv strong,
.kv span {
  display: block;
}

.kv strong {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.kv span { margin-top: 6px; }

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 18px;
}

.note {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid #cfe6d6;
}

.error {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff0ef;
  color: var(--red);
  border: 1px solid #f0c8c4;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.pagination button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.audit-json {
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0c1e17;
  color: #d9f4e5;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.audit-panel {
  padding: 16px 18px 18px;
}

.redemptions-panel,
.tickets-panel {
  padding: 16px 18px 18px;
}

.redemptions-toolbar,
.tickets-toolbar {
  margin-bottom: 16px;
}

.redemptions-search-wrap,
.tickets-search-wrap {
  max-width: 360px;
}

.redemptions-filter-group,
.tickets-filter-group {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.redemptions-table-shell,
.tickets-table-shell {
  overflow: auto;
}

.redemptions-table,
.tickets-table {
  min-width: 980px;
}

.redemptions-table-row {
  grid-template-columns: minmax(220px, 1.35fr) minmax(170px, 1fr) minmax(130px, 0.85fr) minmax(130px, 0.85fr) minmax(160px, 0.9fr) minmax(250px, 1.2fr);
  gap: 18px;
}

.tickets-table-row {
  grid-template-columns: minmax(260px, 1.6fr) minmax(180px, 1fr) minmax(130px, 0.8fr) minmax(160px, 0.9fr) minmax(230px, 1.1fr);
  gap: 18px;
}

.redemptions-actions,
.tickets-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-mini {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.audit-toolbar {
  margin-bottom: 16px;
}

.audit-search-wrap {
  max-width: 320px;
}

.audit-filter-group {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.audit-date-input,
.audit-role-select {
  min-width: 150px;
}

.audit-table-shell {
  overflow: auto;
}

.audit-table {
  min-width: 980px;
}

.audit-table-row {
  grid-template-columns: minmax(140px, 1.1fr) minmax(180px, 1.25fr) minmax(150px, 0.95fr) minmax(260px, 1.6fr) minmax(180px, 1fr);
  gap: 18px;
}

.audit-entity-cell,
.audit-actor-cell,
.audit-role-cell,
.audit-date-cell {
  font-size: 15px;
  line-height: 1.45;
  color: #324054;
}

.audit-action-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.audit-action-pill.success {
  background: #eaf8ef;
  color: #0d9448;
}

.audit-action-pill.warning {
  background: #fff3d9;
  color: #b7791f;
}

.audit-action-pill.danger {
  background: #fde8e7;
  color: #d83a34;
}

.audit-action-pill.neutral {
  background: #eef2f6;
  color: #526071;
}

.audit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.audit-footer-copy {
  font-size: 14px;
  color: #7b8090;
}

.audit-footer .pagination {
  margin-top: 0;
}

@media (max-width: 1120px) {
  .login-stage {
    grid-template-columns: 1fr;
    gap: 36px;
    justify-items: center;
  }

  .login-brand-panel {
    min-height: 0;
    justify-content: center;
  }

  .login-brand-logo {
    width: min(360px, 72vw);
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    min-height: auto;
  }

  .sidebar-collapsed .admin-sidebar {
    padding: 20px;
  }

  .sidebar-collapsed .sidebar-brand-row {
    justify-content: space-between;
  }

  .sidebar-collapsed .sidebar-brand,
  .sidebar-collapsed .sidebar-tab-label,
  .sidebar-collapsed .sidebar-user-meta {
    display: block;
  }

  .sidebar-collapsed .sidebar-tab {
    justify-content: flex-start;
    padding: 14px 16px;
  }

  .sidebar-collapsed .sidebar-tab.active::before {
    left: -8px;
  }

  .sidebar-collapsed .sidebar-user-card {
    justify-content: flex-start;
    padding: 8px 4px 8px 0;
  }

  .sidebar-collapsed .sidebar-logout {
    width: auto;
    height: auto;
    justify-self: end;
    padding: 8px 0;
    display: inline-block;
    border-radius: 0;
    background: transparent;
    font-size: inherit;
  }

  .sidebar-collapsed .sidebar-logout::before {
    content: none;
  }

  .metric-strip,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .incoming-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .incoming-details-grid {
    grid-template-columns: 1fr;
  }

  .escalated-review-grid {
    grid-template-columns: 1fr;
  }

  .incoming-search-wrap {
    max-width: none;
  }

  .incoming-filter-group {
    flex-wrap: wrap;
  }

  .incoming-table-row {
    grid-template-columns: minmax(0, 1.8fr) minmax(110px, 1fr) minmax(120px, 1.2fr) minmax(110px, 1fr) minmax(100px, 1fr) 54px;
    gap: 16px;
  }

  .case-history-row {
    grid-template-columns: minmax(0, 2fr) minmax(110px, 1fr) minmax(130px, 1.15fr) minmax(120px, 1fr) 54px;
  }

  .escalated-table-row {
    grid-template-columns: minmax(0, 1.8fr) minmax(120px, 1fr) minmax(0, 1.3fr) minmax(120px, 1fr) 72px;
  }

  .users-table-row {
    grid-template-columns: minmax(0, 1.8fr) minmax(110px, 0.9fr) minmax(120px, 1fr) minmax(130px, 1fr) 42px;
  }

  .detail-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .login-shell {
    padding: 20px;
  }

  .login-stage {
    width: 100%;
    gap: 28px;
  }

  .login-brand-logo {
    width: min(280px, 70vw);
  }

  .login-card {
    padding: 24px 20px;
  }

  .login-shape-top,
  .login-shape-bottom {
    transform: scale(0.82);
  }

  .admin-workspace {
    padding: 18px;
  }

  .workspace-header,
  .topbar,
  .panel-header-spacious {
    flex-direction: column;
    align-items: stretch;
  }

  .incoming-table-shell {
    overflow-x: auto;
  }

  .incoming-detail-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .incoming-table {
    min-width: 760px;
  }

  .escalated-table {
    min-width: 840px;
  }

  .users-table {
    min-width: 760px;
  }

  .categories-table {
    min-width: 700px;
  }

  .audit-table {
    min-width: 980px;
  }

  .row {
    flex-direction: column;
  }

  .sidebar-user-card {
    align-items: flex-start;
  }
}
