:root {
  --bg: #eef3f9;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #0f172a;
  --muted: #64748b;
  --muted-strong: #475569;
  --border: #d9e2ee;
  --border-strong: #c4cfdd;
  --primary: #1d4ed8;
  --primary-dark: #1e40af;
  --primary-soft: #eff6ff;
  --danger: #dc2626;
  --success-bg: #ecfdf5;
  --success-text: #166534;
  --error-bg: #fef2f2;
  --error-text: #991b1b;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-shell {
  min-height: 100vh;
  padding: 22px 16px 34px;
}

.container {
  max-width: 860px;
  margin: 0 auto;
}

.section {
  margin-bottom: 28px;
}

.panel {
  background: var(--panel);
  border: 1px solid #d7e1ee;
  border-radius: 14px;
  padding: 22px 20px;
}

.page-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.page-subtitle {
  margin: 12px 0 0;
  color: #607089;
  font-size: 15px;
  max-width: 620px;
}

.hero-kicker,
.section-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-head {
  margin-bottom: 16px;
}

.section-head--tight {
  margin-bottom: 14px;
}

.section-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.form-row {
  margin-bottom: 14px;
}

.form-actions {
  margin-bottom: 0;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 132px;
  border-width: 1.5px;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.10);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.btn:hover {
  border-color: #94a3b8;
}

.btn-primary {
  background: linear-gradient(180deg, #2c59db 0%, #1d4ed8 100%);
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: 0 10px 22px rgba(29, 78, 216, 0.14);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #244dc1 0%, #1e40af 100%);
  border-color: var(--primary-dark);
}

.btn-secondary {
  background: #fff;
}

.btn-danger {
  background: #fff;
  border-color: #fecaca;
  color: var(--danger);
}

.btn-small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.flash-list {
  margin-bottom: 16px;
}

.flash {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  margin-bottom: 10px;
}

.flash-success {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: #bbf7d0;
}

.flash-error {
  background: var(--error-bg);
  color: var(--error-text);
  border-color: #fecaca;
}

.hero {
  padding: 24px 20px;
}

.hero-compact {
  background:
    linear-gradient(180deg, rgba(239,246,255,.92) 0%, rgba(255,255,255,1) 44%);
}

.hero-form {
  margin-top: 20px;
}

.board-section {
  margin-top: 30px;
  border-top: 1px solid #e4ebf5;
  padding-top: 22px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 10px;
}

.hero-submit {
  min-width: 148px;
  min-height: 46px;
  border-radius: 12px;
}


.feedback-list {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.feedback-item {
  background: var(--panel);
  border: 1px solid #d9e4f0;
  border-radius: 14px;
  padding: 18px 20px;
}

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

.feedback-code {
  color: #4b5d78;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.feedback-content {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.65;
  font-size: 16px;
  font-weight: 600;
  color: #13233c;
}

.feedback-meta {
  margin-top: 10px;
  color: #7b8aa1;
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-neutral { background: #f8fafc; color: #475569; border-color: #e2e8f0; }
.badge-blue { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.badge-amber { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.badge-green { background: #ecfdf5; color: #15803d; border-color: #bbf7d0; }
.badge-red { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

.admin-login-wrap {
  display: flex;
  justify-content: center;
  padding-top: 96px;
}

.admin-login-panel {
  width: 100%;
  max-width: 420px;
}

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

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-user {
  color: var(--muted);
  font-weight: 600;
}

.admin-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-link {
  text-decoration: none;
  color: var(--text);
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
  font-size: 14px;
}

.filter-link.active {
  background: var(--primary-soft);
  border-color: #bfdbfe;
  color: var(--primary);
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.admin-table thead th {
  text-align: left;
  padding: 0 10px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table tbody td {
  text-align: left;
  vertical-align: top;
  padding: 14px 10px;
  border-top: 1px solid var(--border);
}

.admin-code {
  display: inline-block;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.cell-content {
  max-width: 420px;
}

.cell-content__text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  line-height: 1.55;
}

.public-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--muted-strong);
}

.public-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #cbd5e1;
  flex: 0 0 auto;
}

.public-state.is-public .public-dot {
  background: #16a34a;
}

.action-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 152px;
}

.action-row {
  display: flex;
  gap: 6px;
}

.action-row > form,
.action-stack > form {
  margin: 0;
}

.action-row .btn,
.action-stack > form .btn {
  width: 100%;
}

.nowrap {
  white-space: nowrap;
}

.empty-state {
  color: var(--muted);
  padding: 26px 22px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.empty-state__title {
  font-size: 17px;
  font-weight: 700;
  color: #1d2d44;
}

.empty-state__text {
  margin-top: 6px;
  color: #75849a;
  font-size: 14px;
}

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

@media (max-width: 720px) {
  .site-shell {
    padding: 14px 12px 24px;
  }

  .section {
    margin-bottom: 22px;
  }

  .panel,
  .feedback-item,
  .hero {
    padding: 18px 16px;
    border-radius: 12px;
  }

  .page-title {
    font-size: 26px;
  }

  .page-subtitle {
    font-size: 14px;
  }

  .admin-header,
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-submit,
  .admin-toolbar .btn {
    width: 100%;
  }

  .feedback-item__top {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .badge {
    align-self: flex-start;
  }

  .admin-login-wrap {
    padding-top: 22px;
  }

  .admin-filterbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-right: -4px;
    margin-bottom: 16px;
  }

  .filter-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .admin-table-wrap {
    overflow: visible;
  }

  .admin-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table tbody tr {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
  }

  .admin-table tbody td {
    border-top: 0;
    padding: 0;
    margin-bottom: 10px;
  }

  .admin-table tbody td:last-child {
    margin-bottom: 0;
  }

  .admin-table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .cell-content,
  .cell-content__text {
    max-width: none;
    -webkit-line-clamp: unset;
    overflow: visible;
  }

  .action-stack {
    min-width: 0;
  }

  .action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .action-row > form:only-child {
    grid-column: 1 / -1;
  }
}


.upload-row {
  gap: 8px;
}

.upload-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}

.upload-row input[type="file"] {
  display: block;
  width: 100%;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
  color: #334155;
}

.upload-help {
  font-size: 12px;
  color: #64748b;
}

.feedback-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 4px 10px;
}

.attachment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.attachment-thumb {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  background: #f8fafc;
}

.attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .feedback-meta-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .attachment-grid {
    margin-top: 8px;
  }
}


.composer-panel {
  padding: 20px 24px 18px;
}

.composer-head {
  margin-bottom: 12px;
}

.page-title--compact {
  font-size: 26px;
  line-height: 1.1;
}

.page-subtitle--compact {
  margin-top: 8px;
  font-size: 14px;
  max-width: none;
}

.form-row--compact {
  margin-bottom: 10px;
}

.composer-form textarea {
  min-height: 98px;
  resize: vertical;
}

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

.composer-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

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

.composer-upload__hint {
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
}

.composer-upload__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.composer-upload__selected {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.composer-upload__file {
  display: inline-flex;
  align-items: center;
  max-width: 240px;
  padding: 4px 8px;
  border: 1px solid #dbe3f0;
  border-radius: 999px;
  background: #f8fbff;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer-submit {
  min-width: 124px;
  min-height: 42px;
  box-shadow: none;
}

.board-section--compact {
  margin-top: 20px;
  padding-top: 20px;
}

.empty-state--compact {
  padding: 18px 20px;
}

@media (max-width: 720px) {
  .composer-panel {
    padding: 16px;
  }

  .page-title--compact {
    font-size: 24px;
  }

  .composer-form textarea {
    min-height: 88px;
  }

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

  .composer-upload {
    align-items: flex-start;
    width: 100%;
  }

  .composer-upload__meta {
    align-items: flex-start;
    width: 100%;
  }

  .composer-upload__selected {
    width: 100%;
  }

  .composer-upload__file {
    max-width: 100%;
  }

  .composer-upload__hint {
    white-space: normal;
  }

  .composer-submit {
    width: 100%;
  }

  .board-section--compact {
    margin-top: 16px;
    padding-top: 16px;
  }
}
