:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fb;
  color: #172033;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #eef5ff 0, #f8fafc 280px, #f5f7fb 100%);
}

.feedback-page {
  --page-grad-a: rgba(218, 239, 244, 0.76);
  --page-grad-b: rgba(235, 246, 239, 0.56);
  --page-grad-c: rgba(207, 229, 223, 0.64);
  --page-grad-d: rgba(231, 242, 253, 0.62);
  --page-base-a: #eef8f8;
  --page-base-b: #dfeeed;
  --page-base-c: #eff7ff;
  --glow-a: rgba(91, 153, 173, 0.12);
  --glow-b: rgba(113, 166, 139, 0.11);
  --texture-line: rgba(25, 61, 74, 0.016);
  overflow-x: hidden;
  background:
    linear-gradient(120deg, var(--page-grad-a), var(--page-grad-b) 35%, var(--page-grad-c) 68%, var(--page-grad-d)),
    linear-gradient(180deg, var(--page-base-a) 0%, var(--page-base-b) 48%, var(--page-base-c) 100%);
}

.feedback-page::before,
.feedback-page::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
}

.feedback-page::before {
  background:
    linear-gradient(145deg, var(--glow-a), transparent 31%),
    linear-gradient(36deg, transparent 42%, var(--glow-b) 58%, transparent 76%),
    linear-gradient(320deg, transparent 18%, rgba(255, 255, 255, 0.74) 46%, transparent 70%);
  filter: blur(12px);
}

.feedback-page::after {
  background-image:
    repeating-linear-gradient(
      45deg,
      var(--texture-line) 0,
      var(--texture-line) 1px,
      transparent 1px,
      transparent 3px
    ),
    repeating-linear-gradient(
      -45deg,
      var(--texture-line) 0,
      var(--texture-line) 1px,
      transparent 1px,
      transparent 3px
    );
}

.feedback-page > .shell {
  position: relative;
  z-index: 1;
}

a {
  color: #1769e0;
}

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

.shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.shell--wide {
  width: min(1600px, calc(100% - 32px));
}

.card {
  background: #fff;
  border: 1px solid #dfe7f2;
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(41, 72, 117, 0.09);
  padding: 32px;
}

.brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.brand__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 5px 16px rgba(24, 54, 98, 0.16);
}

.brand__name,
h1,
h2,
h3,
p {
  margin-top: 0;
}

.brand__name {
  margin-bottom: 2px;
  font-size: 1.2rem;
  font-weight: 750;
}

.muted {
  color: #63718a;
}

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

.language-switch {
  display: flex;
  align-items: center;
  flex-basis: 100%;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px 12px;
  width: 100%;
  font-size: 0.9rem;
}

.language-switch__icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  fill: currentColor;
  color: #63718a;
}

.language-switch a[aria-current="page"] {
  color: #172033;
  font-weight: 700;
  text-decoration: none;
}

.feedback-divider {
  height: 1px;
  border: 0;
  background: #dfe7f2;
  margin: 0 0 24px;
}

.field {
  margin: 22px 0;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.field__hint {
  display: block;
  margin-top: 7px;
  color: #63718a;
  font-size: 0.88rem;
}

.remember-login {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 22px;
  font-weight: 600;
}

.remember-login input {
  width: 18px;
  height: 18px;
  margin: 0;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  border: 1px solid #bdc9d9;
  border-radius: 10px;
  background: #fff;
  color: #172033;
  padding: 11px 12px;
}

textarea {
  min-height: 190px;
  resize: vertical;
  line-height: 1.55;
}

.textarea-wrap {
  position: relative;
}

.textarea-wrap textarea {
  display: block;
  padding-bottom: 38px;
}

.character-count {
  position: absolute;
  right: 12px;
  bottom: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.92);
  color: #63718a;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  padding: 2px 4px;
  pointer-events: none;
}

.character-count--over {
  color: #b42318;
  font-weight: 700;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(23, 105, 224, 0.25);
  outline-offset: 2px;
  border-color: #1769e0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: #1769e0;
  color: #fff;
  cursor: pointer;
  font-weight: 750;
  padding: 10px 18px;
  text-decoration: none;
}

.button:hover {
  background: #0e56be;
}

.button--secondary {
  background: #edf3fc;
  color: #19477f;
}

.button--small {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 0.88rem;
}

.alert {
  border-radius: 10px;
  margin: 18px 0;
  padding: 13px 15px;
}

.alert--error {
  border: 1px solid #f3b7b1;
  background: #fff0ee;
  color: #8f1d14;
}

.alert--success {
  border: 1px solid #a7dfbd;
  background: #effbf3;
  color: #116329;
}

.privacy-link,
.footer {
  color: #63718a;
  font-size: 0.9rem;
}

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

.feedback-actions .privacy-link {
  margin-left: auto;
  text-align: right;
}

.feedback-email {
  margin: 28px 0 0;
  color: #63718a;
  font-size: 0.9rem;
  line-height: 1.6;
}

.feedback-email img {
  vertical-align: middle;
}

.prose {
  line-height: 1.75;
}

.prose h2 {
  margin-top: 30px;
}

.prose li {
  margin: 8px 0;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.admin-nav__title {
  font-size: 1.12rem;
  font-weight: 800;
  margin-right: auto;
}

.inline-form {
  display: inline;
}

.project-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.project-switch__item {
  align-items: center;
  border: 1px solid #bdc9d9;
  border-radius: 999px;
  color: #19477f;
  display: inline-flex;
  justify-content: center;
  line-height: 1;
  padding: 17px 23px;
  text-decoration: none;
}

.project-switch__item--selected {
  background: #1769e0;
  border-color: #1769e0;
  color: #fff;
  font-weight: 750;
}

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

.filters {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0;
}

.user-create-form .filters {
  align-items: flex-end;
}

.user-create-form .filters > .button {
  margin-bottom: 22px;
}

.user-create-form .role-filter summary {
  height: 43px;
}

.status-filter {
  flex: 0 0 78px;
  position: relative;
}

.role-filter {
  position: relative;
}

.status-filter summary,
.role-filter summary {
  align-items: center;
  background: #fff;
  border: 1px solid #bdc9d9;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  font: inherit;
  height: 46px;
  list-style: none;
  padding: 0 26px 0 12px;
  position: relative;
}

.status-filter summary::-webkit-details-marker,
.role-filter summary::-webkit-details-marker {
  display: none;
}

.status-filter summary::after,
.role-filter summary::after {
  border: solid #63718a;
  border-width: 0 2px 2px 0;
  content: "";
  height: 6px;
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-70%) rotate(45deg);
  width: 6px;
}

.status-filter__menu {
  background: #fff;
  border: 1px solid #bdc9d9;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(41, 72, 117, 0.15);
  left: 0;
  min-width: 100%;
  padding: 4px;
  position: absolute;
  top: calc(100% + 6px);
  z-index: 10;
}

.role-filter__menu {
  background: #fff;
  border: 1px solid #bdc9d9;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(41, 72, 117, 0.15);
  left: 0;
  min-width: 100%;
  padding: 4px;
  position: absolute;
  top: calc(100% + 6px);
  z-index: 10;
}

.status-filter__option {
  cursor: pointer;
  display: block;
  padding: 7px 8px;
  white-space: nowrap;
}

.role-filter__option {
  cursor: pointer;
  display: block;
  padding: 7px 8px;
  white-space: nowrap;
}

.status-filter__option input {
  opacity: 0;
  position: absolute;
}

.role-filter__option input {
  opacity: 0;
  position: absolute;
}

.status-filter__option input:checked + span {
  color: #1769e0;
  font-weight: 750;
}

.role-filter__option input:checked + span {
  color: #1769e0;
  font-weight: 750;
}

.password-dialog {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(23, 32, 51, 0.28);
  max-width: min(440px, calc(100% - 32px));
  padding: 0;
  width: 100%;
}

.password-dialog::backdrop {
  background: rgba(23, 32, 51, 0.42);
}

.password-dialog__form {
  padding: 28px;
}

.password-dialog__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}

.filter-date {
  flex: 0 0 147px;
  min-width: 147px;
  width: 147px;
}

.filter-submit {
  flex: 0 0 60px;
  height: 46px;
  min-height: 46px;
  padding: 0 12px;
  white-space: nowrap;
}

.bulk-mark-read {
  display: flex;
  justify-content: flex-end;
  margin: 20px 0 16px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #dfe7f2;
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.users-table {
  min-width: 720px;
  table-layout: fixed;
}

.feedback-table {
  min-width: 880px;
  table-layout: fixed;
}

.feedback-table__time {
  width: 10rem;
}

.feedback-table__project {
  width: 7rem;
}

.feedback-table__status {
  width: 5rem;
}

.feedback-table__contact {
  width: 7ch;
}

.feedback-table__actions {
  width: 7.5rem;
}

.users-table__username {
  width: 19%;
}

.users-table__role {
  width: 14%;
}

.users-table__status {
  width: 12%;
}

.users-table__login {
  width: 25%;
}

.users-table__actions {
  width: 30%;
}

.users-table th,
.users-table td {
  vertical-align: middle;
}

th,
td {
  border-bottom: 1px solid #e7edf5;
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f7f9fc;
  color: #4f6078;
  font-size: 0.84rem;
  white-space: nowrap;
}

.feedback-row--new {
  background: #fffbed;
}

.feedback-row--read {
  background: #f5f6f8;
}

.feedback-content {
  min-width: 0;
  max-width: none;
  overflow-wrap: anywhere;
}

.contact-cell {
  width: 7ch;
  max-width: 7ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-trigger {
  background: transparent;
  border: 0;
  color: #19477f;
  cursor: pointer;
  display: block;
  font: inherit;
  max-width: 100%;
  overflow: hidden;
  padding: 0;
  text-align: left;
  text-overflow: ellipsis;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.contact-trigger:hover,
.contact-trigger:focus-visible {
  color: #1769e0;
}

.contact-dialog {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(23, 32, 51, 0.28);
  max-width: min(520px, calc(100% - 32px));
  padding: 0;
  width: 100%;
}

.contact-dialog::backdrop {
  background: rgba(23, 32, 51, 0.42);
}

.contact-dialog__content {
  padding: 28px;
}

.contact-dialog__content h2 {
  margin-bottom: 16px;
}

.contact-dialog__value {
  background: #f5f7fb;
  border: 1px solid #dfe7f2;
  border-radius: 10px;
  margin-bottom: 0;
  overflow-wrap: anywhere;
  padding: 12px;
  white-space: pre-wrap;
}

.contact-dialog__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}

.feedback-preview,
.feedback-full {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.feedback-enhancements .feedback-preview {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.feedback-toggle {
  background: transparent;
  border: 0;
  color: #1769e0;
  cursor: pointer;
  font-size: 0.88rem;
  margin-top: 5px;
  padding: 0;
}

.feedback-full {
  margin-top: 8px;
}

.status {
  display: inline-block;
  border-radius: 999px;
  background: #edf3fc;
  color: #19477f;
  font-size: 0.8rem;
  font-weight: 750;
  padding: 4px 9px;
}

.status--new {
  background: #fff4d6;
  color: #815b00;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pagination {
  margin: 0 0 12px;
}

.empty {
  color: #63718a;
  padding: 30px;
  text-align: center;
}

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

  .card {
    border-radius: 14px;
    padding: 22px;
  }

  .feedback-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    flex-wrap: wrap;
  }

  .brand {
    align-items: flex-start;
  }

  .language-switch {
    gap: 6px 10px;
  }
}
