.saved-cases-root {
  flex: 1;
}

.app-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 32px 0 60px;
}

.saved-cases-main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
  margin-top: 40px;
}

.filters-row {
  width: min(920px, 100%);
  background: #ffffff;
  border: 1px solid rgba(0, 35, 87, 0.15);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 16px 36px rgba(7, 20, 37, 0.08);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(200px, 220px) minmax(200px, 220px) 140px;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.filter-item span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0B3A73;
}

.filter-item input,
.filter-item select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(0, 35, 87, 0.15);
  padding: 10px 12px;
  font-size: 0.95rem;
  color: #071425;
  background: #fff;
  height: 36px;
}

.filter-item:first-child {
  grid-column: 1 / 2;
}

.filter-item.service-filter {
  grid-column: 2 / 3;
}

.filter-item.status-filter {
  grid-column: 3 / 4;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
  margin: 0;
  grid-column: 4 / 5;
}

.create-case-row {
  width: 100%;
  max-width: min(920px, 100%);
  margin: 18px auto 10px;
  padding: 0 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.btn-base {
  height: 36px;
  min-height: 36px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-blue {
  background: #0B3A73;
  color: #ffffff;
  border-color: #0B3A73;
}

.btn-blue:hover {
  background: #082F5D;
}

.btn-gold {
  background: #F2C14E;
  color: #0B3A73;
  border: 1px solid #C8921E;
}

.btn-gold:hover {
  background: #E7B640;
}

.btn-text {
  background: transparent;
  border: none;
  color: #0B3A73;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.create-case-wrap {
  position: relative;
}

.case-create-popover {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(0, 35, 87, 0.15);
  box-shadow: 0 6px 16px rgba(7, 20, 37, 0.12);
  padding: 20px;
  z-index: 2;
}

.case-create-popover.is-open {
  display: block;
}

.case-create-popover form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-create-popover label {
  font-size: 0.85rem;
  color: #0B3A73;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.case-create-popover input,
.case-create-popover select {
  border-radius: 10px;
  border: 1px solid rgba(0, 35, 87, 0.15);
  padding: 10px 12px;
  font-size: 0.95rem;
  color: #071425;
  background: #fff;
}

.case-create-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.saved-table {
  width: 100%;
}

.table-shell {
  width: min(920px, 100%);
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #f1f4f9;
  box-shadow: 0 18px 40px rgba(7, 20, 37, 0.08);
  overflow: hidden;
  margin: 0 auto;
}

.table-shell table {
  width: 100%;
  border-collapse: collapse;
}

.table-shell th,
.table-shell td {
  padding: 16px;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(229, 229, 229, 0.8);
}

.table-shell thead th {
  background: #f1f4f9;
  color: #0B3A73;
  font-weight: 700;
  text-align: left;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #f1f4f9;
}

.table-shell tr:hover td {
  background: #fffdf7;
}

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

.table-shell tbody tr:first-child td {
  border-top: 1px solid #f1f4f9;
}

.badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.badge.active {
  background: #e5f7e9;
  color: #06601d;
}

.badge.draft {
  background: #fff4d9;
  color: #a8620a;
}

.badge.dead {
  background: #f9d9d9;
  color: #8b1d1d;
}

.badge.closed {
  background: #fde7e7;
  color: #a60d0d;
}

.case-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.case-open-btn {
  border: 2px solid #0B3A73;
  background: #0B3A73;
  color: #fff;
  border-radius: 999px;
  padding: 0 16px;
  height: 36px;
  font-weight: 700;
  cursor: pointer;
}

.case-open-btn:hover {
  background: #082F5D;
}

.delete-case-btn {
  border: 1px solid #a00f12;
  color: #a00f12;
  background: #fff;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
}

.delete-case-btn:hover {
  background: #ffecec;
}

@media (max-width: 960px) {
  .filters-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .filter-actions {
    justify-self: start;
  }

  .create-case-row {
    justify-content: flex-end;
    padding: 0 12px;
  }
}
