:root {
  --app-bg: #edf2f6;
  --app-surface: rgba(255, 255, 255, 0.84);
  --app-surface-strong: #ffffff;
  --app-line: rgba(28, 42, 58, 0.08);
  --app-text: #1f1c1a;
  --app-muted: #5c6875;
  --app-primary: #588157;
  --app-primary-strong: #466b45;
  --app-secondary: #344e41;
  --app-success: #588157;
  --app-warning: #ca8b16;
  --app-danger: #b13d42;
  --app-shadow: 0 20px 50px rgba(29, 44, 61, 0.14);
  --app-radius: 24px;
  --app-radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  font-size: 14px;
  --shell-offset: 352px;
  color: var(--app-text);
  background:
    radial-gradient(circle at top left, rgba(52, 78, 65, 0.14), transparent 30%),
    radial-gradient(circle at bottom right, rgba(88, 129, 87, 0.14), transparent 24%),
    linear-gradient(135deg, #f7fafc 0%, #eff3f7 48%, #e7edf2 100%);
}

a {
  color: inherit;
}

.app-shell {
  display: flex;
}

.shell-sidebar {
  width: 320px;
  height: 100vh;
  padding: 24px 20px 18px;
  background: linear-gradient(180deg, rgba(52, 78, 65, 0.98), rgba(25, 37, 30, 0.99));
  color: #fbf7f1;
  position: sticky;
  top: 0;
  z-index: 1051;
  display: flex;
  flex-direction: column;
  gap: 22px;
  box-shadow: 20px 0 40px rgba(21, 16, 12, 0.12);
  overflow: hidden;
  transition: width 0.24s ease, padding 0.24s ease;
}

.shell-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.shell-brand__mark {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
}

.shell-brand__mark img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.shell-brand__eyebrow,
.shell-topbar__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
}

.shell-brand__eyebrow {
  color: rgba(255, 255, 255, 0.55);
}

.shell-brand__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
}

.shell-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.shell-user__avatar {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #a3b18a, #588157);
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}

.shell-user__content {
  min-width: 0;
}

.shell-user__name {
  font-weight: 700;
  font-size: 0.94rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell-user__role {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell-nav {
  display: grid;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.shell-nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-decoration: none;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.82);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.shell-nav__link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-nav__link:hover {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.shell-nav__link.is-active {
  background: linear-gradient(135deg, rgba(88, 129, 87, 0.96), rgba(70, 107, 69, 0.9));
  color: #fff;
  box-shadow: 0 16px 30px rgba(88, 129, 87, 0.28);
}

.shell-nav__link--ghost {
  background: rgba(255, 255, 255, 0.04);
}

.shell-sidebar__footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.shell-main {
  flex: 1;
  min-width: 0;
  padding: 28px;
}

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

.shell-topbar__eyebrow {
  color: var(--app-primary);
}

.shell-topbar__title {
  margin: 2px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.55rem, 2.7vw, 2.2rem);
  line-height: 1;
}

.shell-topbar__meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shell-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--app-line);
  color: var(--app-secondary);
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(31, 28, 26, 0.06);
}

.shell-content {
  display: grid;
  gap: 20px;
}

.app-panel,
.app-card,
.app-table-card,
.app-hero {
  border-radius: var(--app-radius);
  background: var(--app-surface);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px);
  box-shadow: var(--app-shadow);
}

.app-panel,
.app-card,
.app-table-card {
  padding: 18px;
}

.app-hero {
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(52, 78, 65, 0.95), rgba(88, 129, 87, 0.92)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
  color: #fff;
}

.app-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
}

.app-hero__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 2.7vw, 2.35rem);
  margin: 6px 0 10px;
}

.app-hero__text,
.app-muted {
  color: var(--app-muted);
}

.app-hero__text {
  color: rgba(255, 255, 255, 0.82);
  max-width: 720px;
}

.app-grid {
  display: grid;
  gap: 20px;
}

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

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

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

.app-stat {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--app-line);
  box-shadow: 0 16px 30px rgba(31, 28, 26, 0.07);
}

.app-stat__label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--app-muted);
  font-weight: 700;
}

.app-stat__value {
  margin-top: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

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

.app-section-title h2,
.app-section-title h3,
.app-section-title h4,
.app-card h2,
.app-card h3,
.app-card h4,
.app-panel h2,
.app-panel h3,
.app-panel h4 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.app-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--app-primary);
}

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

.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }
.span-2 { grid-column: span 2; }

.app-field label,
.app-label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
  color: #3b332f;
  font-size: 0.9rem;
}

.form-control,
.form-select,
.input-group-text,
.btn,
textarea {
  border-radius: 16px !important;
}

.form-control,
.form-select,
.input-group-text,
textarea {
  border-color: rgba(77, 66, 58, 0.14);
  box-shadow: none !important;
  min-height: 42px;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  border-color: rgba(88, 129, 87, 0.45);
}

.btn {
  font-weight: 700;
  padding: 0.58rem 0.9rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--app-primary), #6f9b6e);
  border-color: transparent;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--app-primary-strong), #5a8559);
  border-color: transparent;
}

.btn-outline-primary {
  color: var(--app-primary);
  border-color: rgba(88, 129, 87, 0.26);
}

.btn-success {
  background: linear-gradient(135deg, #2e7d5b, #47a079);
  border-color: transparent;
}

.btn-warning {
  background: linear-gradient(135deg, #c88510, #f0b63f);
  border-color: transparent;
  color: #1f1c1a;
}

.btn-danger {
  background: linear-gradient(135deg, #b13d42, #d95f53);
  border-color: transparent;
}

.app-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.app-table thead th {
  padding: 14px 16px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--app-muted);
  border-bottom: 1px solid var(--app-line);
}

.app-table tbody td {
  padding: 16px;
  border-bottom: 1px solid rgba(37, 34, 31, 0.06);
  vertical-align: top;
}

.app-table tbody tr:last-child td {
  border-bottom: none;
}

.app-table__compact thead th,
.app-table__compact tbody td {
  padding: 12px 14px;
}

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

.app-list__item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--app-line);
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
}

.app-badge--primary { background: rgba(88, 129, 87, 0.14); color: var(--app-primary); }
.app-badge--secondary { background: rgba(52, 78, 65, 0.12); color: var(--app-secondary); }
.app-badge--success { background: rgba(46, 125, 91, 0.14); color: var(--app-success); }
.app-badge--warning { background: rgba(202, 139, 22, 0.16); color: #915f00; }
.app-badge--danger { background: rgba(177, 61, 66, 0.16); color: var(--app-danger); }
.app-badge--neutral { background: rgba(33, 29, 25, 0.08); color: #5c524c; }

.app-empty {
  padding: 28px;
  text-align: center;
  color: var(--app-muted);
  border-radius: 20px;
  border: 1px dashed rgba(77, 66, 58, 0.2);
  background: rgba(255, 255, 255, 0.5);
}

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

.app-alert {
  border: none;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(31, 28, 26, 0.07);
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 2.4vw, 28px);
  background:
    radial-gradient(circle at top left, rgba(52, 78, 65, 0.2), transparent 30%),
    radial-gradient(circle at bottom right, rgba(88, 129, 87, 0.14), transparent 24%),
    linear-gradient(135deg, #f7fafc 0%, #eef3f7 54%, #e8edf2 100%);
}

.login-shell {
  width: min(1060px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(27, 43, 60, 0.16);
  backdrop-filter: blur(16px);
}

.login-shell__showcase {
  position: relative;
  padding: 38px 40px 34px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(52, 78, 65, 0.97), rgba(88, 129, 87, 0.93)),
    url("../background.png") center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
}

.login-shell__showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%);
}

.login-shell__showcase > * {
  position: relative;
  z-index: 1;
}

.login-shell__showcase-copy {
  display: grid;
  gap: 18px;
  max-width: 360px;
}

.login-shell__logo img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.14);
}

.login-shell__title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.65rem, 3.1vw, 2.75rem);
  line-height: 1.08;
  margin: 16px 0 12px;
  max-width: 440px;
}

.login-shell__text {
  font-size: 0.96rem;
  line-height: 1.5;
  max-width: 430px;
  color: rgba(255, 255, 255, 0.8);
}

.login-shell__facts {
  display: grid;
  gap: 10px;
  max-width: 430px;
}

.login-shell__fact {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-shell__panel {
  padding: 36px 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.login-shell__panel h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.84rem;
}

.login-shell__panel p {
  margin: 0;
  color: var(--app-muted);
  font-size: 0.94rem;
}

.shell-menu-btn,
.shell-collapse-btn,
.shell-backdrop {
  display: none;
}

.shell-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--app-secondary);
  box-shadow: 0 12px 24px rgba(31, 28, 26, 0.08);
}

.panel-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.app-inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.app-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--app-line);
  color: var(--app-muted);
}

.form-control[type="file"] {
  padding: 9px 12px;
  min-height: 50px;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.84);
  color: #5e5550;
  font-size: 0.92rem;
}

.form-control[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 0.5rem 0.92rem;
  border: 1px solid rgba(52, 78, 65, 0.14);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(52, 78, 65, 0.12), rgba(52, 78, 65, 0.05));
  color: var(--app-secondary);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.form-control[type="file"]::file-selector-button:hover {
  background: linear-gradient(135deg, rgba(88, 129, 87, 0.18), rgba(88, 129, 87, 0.1));
  border-color: rgba(88, 129, 87, 0.2);
  color: var(--app-primary);
}

.app-stack {
  display: grid;
  gap: 20px;
}

.agent-board {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  gap: 20px;
}

.agent-lane {
  display: grid;
  gap: 14px;
}

.chat-list-group {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--app-line);
  overflow: hidden;
}

.chat-list-group__title {
  padding: 14px 18px;
  font-weight: 700;
  background: rgba(52, 78, 65, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-list-group__body {
  max-height: 26vh;
  overflow: auto;
}

.chat-list-item {
  display: grid;
  gap: 4px;
  padding: 14px 18px;
  cursor: pointer;
  border-top: 1px solid rgba(37, 34, 31, 0.06);
  transition: background 0.2s ease, transform 0.2s ease;
}

.chat-list-item:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateX(4px);
}

.chat-timeline {
  max-height: 56vh;
  overflow: auto;
  display: grid;
  gap: 14px;
}

.chat-bubble {
  padding: 14px 16px;
  border-radius: 18px;
  max-width: min(82%, 760px);
  box-shadow: 0 12px 28px rgba(31, 28, 26, 0.08);
}

.chat-bubble--user {
  background: rgba(52, 78, 65, 0.1);
}

.chat-bubble--support {
  background: rgba(88, 129, 87, 0.12);
  margin-left: auto;
}

.chat-row {
  display: flex;
}

.chat-row--support {
  justify-content: flex-end;
}

.chat-bubble__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.chat-bubble__text {
  white-space: pre-wrap;
  word-break: break-word;
}

.claim-item {
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.claim-item.app-list__item {
  display: block;
}

.claim-item:hover {
  transform: translateY(-1px);
}

.claim-item.active {
  border-color: rgba(88, 129, 87, 0.32);
  background: rgba(88, 129, 87, 0.08);
}

.claim-ticket {
  display: grid;
  gap: 6px;
  width: 100%;
}

.claim-ticket__row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(230px, 2.1fr) minmax(200px, 1.6fr) minmax(130px, 1fr) minmax(150px, 1.05fr) minmax(95px, 0.75fr) auto;
  gap: 8px 16px;
  align-items: start;
}

.claim-ticket__cell {
  min-width: 0;
  line-height: 1.18;
  font-size: 0.93rem;
  color: #3f3834;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.claim-ticket__cell b {
  display: block;
  margin-bottom: 2px;
  color: #746a63;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.claim-ticket__cell--primary {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  color: #231f1b;
  font-weight: 700;
}

.claim-ticket__status {
  justify-self: end;
  align-self: start;
  white-space: nowrap;
}

.claim-ticket__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-top: 10px;
  border-top: 1px solid rgba(37, 34, 31, 0.08);
  color: #665d56;
  font-size: 0.84rem;
}

.claim-ticket__stats span {
  display: inline-flex;
  gap: 4px;
}

.claim-response {
  min-height: 172px !important;
}

.claim-file-input {
  min-height: 58px !important;
}

.detail-pane {
  display: grid;
  gap: 16px;
}

.complaints-layout {
  display: grid;
  gap: 20px;
}

.complaints-tray-card {
  overflow: visible;
}

.complaints-tray {
  justify-items: stretch;
}

.complaints-tray .claim-item {
  width: 100%;
  max-width: none;
  padding: 12px 14px;
}

.claim-overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 17, 23, 0.22);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 1040;
}

.claim-overlay-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.claim-overlay {
  position: fixed;
  top: 2.5vh;
  left: calc(var(--shell-offset) + ((100vw - var(--shell-offset)) * 0.025));
  right: calc((100vw - var(--shell-offset)) * 0.025);
  width: auto;
  max-width: none;
  bottom: 2.5vh;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.24s ease, transform 0.24s ease;
  z-index: 1045;
}

.claim-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.claim-overlay__pane {
  height: 100%;
  gap: 0;
  min-height: 0;
}

.claim-overlay__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 22px 18px;
  border-bottom: 1px solid rgba(37, 34, 31, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72));
}

.claim-overlay__heading h3 {
  margin: 4px 0 0;
}

.claim-overlay__heading {
  min-width: 0;
}

.claim-overlay__headline {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #5d554f;
  font-size: 0.92rem;
}

.claim-overlay__headline span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.claim-overlay__body {
  display: grid;
  gap: 16px;
  padding: 20px 22px 22px;
  align-content: start;
  min-height: 0;
  overflow: auto;
}

.claim-overlay__summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
}

.claim-overlay__summary .app-note {
  min-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  color: var(--app-text);
}

.claim-overlay__summary .app-note b {
  display: block;
  flex: 0 0 auto;
}

.claim-summary-card__value {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.claim-overlay__table {
  overflow: visible;
}

.claim-detail-table {
  width: 100%;
  table-layout: fixed;
}

.claim-detail-table th:nth-child(1),
.claim-detail-table td:nth-child(1) {
  width: 16%;
}

.claim-detail-table th:nth-child(2),
.claim-detail-table td:nth-child(2) {
  width: 18%;
}

.claim-detail-table th:nth-child(3),
.claim-detail-table td:nth-child(3) {
  width: 30%;
}

.claim-detail-table th:nth-child(4),
.claim-detail-table td:nth-child(4) {
  width: 28%;
}

.claim-detail-table th:nth-child(5),
.claim-detail-table td:nth-child(5) {
  width: 8%;
}

.claim-detail-table td,
.claim-detail-table th {
  word-break: break-word;
}

body.claim-panel-open {
  overflow: hidden;
}

.app-table .form-control,
.app-table .form-select,
.app-table textarea {
  min-height: 40px;
}

.app-table textarea {
  min-height: 132px;
}

.app-note a,
.app-table a {
  color: var(--app-secondary);
  font-weight: 600;
  text-decoration: none;
}

.app-note a:hover,
.app-table a:hover {
  text-decoration: underline;
}

.app-dialog {
  width: min(980px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  border: none;
  border-radius: 24px;
  padding: 20px;
  background: var(--app-surface);
  box-shadow: 0 30px 80px rgba(21, 29, 24, 0.22);
  overflow: auto;
}

.app-dialog::backdrop {
  background: rgba(21, 29, 24, 0.45);
}

.db-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.db-tab-button {
  border: 1px solid var(--app-line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--app-secondary);
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.db-tab-button.is-active {
  background: linear-gradient(135deg, rgba(88, 129, 87, 0.96), rgba(70, 107, 69, 0.92));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 16px 28px rgba(88, 129, 87, 0.22);
}

.db-tab-panels {
  display: grid;
  gap: 20px;
}

.db-versions-stack {
  grid-template-columns: 1fr;
}

.db-tab-panel {
  display: none;
  gap: 20px;
}

.db-tab-panel.is-active {
  display: grid;
}

.db-catalog-dialog {
  width: min(1180px, calc(100vw - 40px));
  max-height: calc(100vh - 34px);
  padding: 0;
}

.db-dialog__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(37, 34, 31, 0.08);
}

.db-dialog__header h3 {
  margin: 4px 0 0;
}

.db-dialog__body {
  padding: 20px 22px 22px;
  display: grid;
  gap: 16px;
}

.db-source-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.db-source-switch__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--app-line);
  font-weight: 600;
}

.db-flash-list {
  display: grid;
  gap: 12px;
}

.db-flash-item {
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid var(--app-line);
  background: rgba(255, 255, 255, 0.72);
}

.db-flash-item__title {
  font-weight: 700;
  margin-bottom: 6px;
}

.db-flash-item--danger {
  border-color: rgba(177, 61, 66, 0.28);
  background: rgba(177, 61, 66, 0.08);
}

.db-flash-item--warning {
  border-color: rgba(202, 139, 22, 0.28);
  background: rgba(202, 139, 22, 0.08);
}

.db-flash-item--success {
  border-color: rgba(88, 129, 87, 0.28);
  background: rgba(88, 129, 87, 0.08);
}

.db-filter-toolbar {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 16px;
}

.db-table-pagination {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.db-table-pagination .btn.is-active {
  background: var(--app-primary);
  color: #fff;
  border-color: transparent;
}

.db-filter-toolbar__search-row {
  display: flex;
  gap: 10px;
}

@media (max-width: 1200px) {
  .db-filter-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .db-source-switch,
  .db-filter-toolbar,
  .db-filter-toolbar__search-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .db-catalog-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
}

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

.json-catalog {
  display: grid;
  gap: 12px;
}

.json-catalog__item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--app-line);
}

.users-layout {
  display: grid;
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
}

.users-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.users-main {
  min-width: 0;
}

.users-side .app-form-grid {
  grid-template-columns: 1fr;
}

.users-side .span-12,
.users-side .span-8,
.users-side .span-6,
.users-side .span-4,
.users-side .span-3,
.users-side .span-2 {
  grid-column: auto;
}

.user-directory {
  display: grid;
  gap: 14px;
}

.user-card {
  display: grid;
  grid-template-columns: minmax(190px, 220px) minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--app-line);
}

.user-card__summary {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.user-card__name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.98rem;
  line-height: 1.2;
  word-break: break-word;
}

.user-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-card__form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.user-card__form-grid .form-control,
.user-card__form-grid .form-select {
  min-height: 40px;
}

.user-card__form-actions {
  display: flex;
  align-items: end;
}

.sidebar-collapsed .shell-sidebar {
  width: 92px;
  padding-left: 12px;
  padding-right: 12px;
}

.sidebar-collapsed {
  --shell-offset: 116px;
}

.sidebar-collapsed .shell-brand,
.sidebar-collapsed .shell-user {
  justify-content: center;
}

.sidebar-collapsed .shell-brand > div:last-child,
.sidebar-collapsed .shell-user__content,
.sidebar-collapsed .shell-nav__link span,
.sidebar-collapsed .shell-sidebar__footer span {
  display: none;
}

.sidebar-collapsed .shell-nav__link,
.sidebar-collapsed .shell-sidebar__footer .shell-nav__link {
  justify-content: center;
  padding-left: 10px;
  padding-right: 10px;
}

.sidebar-collapsed .shell-brand__mark {
  width: 52px;
  height: 52px;
}

@media (max-width: 1200px) {
  .app-grid--4,
  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-board {
    grid-template-columns: 1fr;
  }

  .users-layout,
  .user-card {
    grid-template-columns: 1fr;
  }

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

  .claim-overlay {
    left: calc(var(--shell-offset) + 14px);
    right: 14px;
  }

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

  .claim-ticket__row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .claim-ticket__status {
    justify-self: start;
  }
}

@media (max-width: 992px) {
  .shell-menu-btn {
    display: none;
  }

  .shell-collapse-btn {
    display: inline-flex;
  }

  .shell-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 320px);
    z-index: 1050;
    transform: translateX(-102%);
    transition: transform 0.25s ease;
  }

  .shell-sidebar.is-open {
    transform: translateX(0);
  }

  .shell-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(6, 10, 16, 0.42);
  }

  .shell-backdrop.is-open {
    display: block;
  }

  .shell-main {
    padding: 18px;
    width: 100%;
  }

  .shell-topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  body {
    --shell-offset: 0px;
  }

  .app-grid--3,
  .app-grid--2,
  .app-form-grid,
  .metric-strip,
  .users-layout,
  .user-card__form-grid {
    grid-template-columns: 1fr;
  }

  .span-12,
  .span-8,
  .span-6,
  .span-4,
  .span-3,
  .span-2 {
    grid-column: auto;
  }

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

  .login-shell__showcase,
  .login-shell__panel {
    padding: 28px;
  }

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

  .claim-overlay-backdrop {
    inset: 0;
  }

  .claim-overlay {
    inset: 12px;
    width: auto;
    max-width: none;
    top: 12px;
    left: 12px;
    bottom: 12px;
  }

  .claim-overlay__summary {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 860px) {
  .login-screen {
    padding: 16px;
  }

  .login-shell__showcase,
  .login-shell__panel {
    padding: 28px 30px;
  }

  .login-shell__title {
    font-size: clamp(1.5rem, 2.7vw, 2.4rem);
    margin: 14px 0 10px;
  }

  .login-shell__text {
    font-size: 0.91rem;
  }

  .login-shell__facts {
    gap: 8px;
  }

  .login-shell__fact {
    padding: 11px 13px;
  }

  .login-shell__panel h1 {
    font-size: 1.68rem;
  }
}

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

  .app-panel,
  .app-card,
  .app-table-card,
  .app-hero {
    padding: 18px;
    border-radius: 22px;
  }

  .shell-topbar__title {
    font-size: 1.55rem;
  }

  .user-card {
    padding: 14px;
  }

  .claim-ticket__row {
    grid-template-columns: 1fr;
  }
}
