/* Work Feedback — 다크 모던 UI (피드백 보드 + 자료실) */

:root {
  --bg: #0b0f14;
  --bg-soft: #111823;
  --panel: #131c27;
  --panel-2: #0f161f;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e8eef6;
  --muted: #8ea0b5;
  --accent: #4f8cff;
  --accent-2: #2f6fe6;
  --teal: #14b8a6;
  --ok: #34d399;
  --err: #f87171;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 50% -8%, rgba(79, 140, 255, 0.14), transparent 62%),
    radial-gradient(760px 420px at 95% 0%, rgba(20, 184, 166, 0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px calc(32px + env(safe-area-inset-bottom));
}

/* ---------- Hero ---------- */

.hero {
  padding: 46px 20px 18px;
  text-align: center;
}

.hero__icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  font-size: 32px;
  border-radius: 20px;
  background: rgba(79, 140, 255, 0.14);
  border: 1px solid rgba(79, 140, 255, 0.26);
  box-shadow: 0 10px 26px rgba(79, 140, 255, 0.18);
}

.hero__title {
  margin: 0 0 6px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero__sub {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero__desc {
  margin: 0 auto;
  max-width: 620px;
  font-size: 16px;
  color: var(--muted);
}

/* ---------- Panel ---------- */

.panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 26px;
}

.panel__col {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.panel__title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- Form ---------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.field__label em {
  color: var(--err);
  font-style: normal;
}

.input {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder { color: #64748b; }

.input:hover { border-color: var(--line-strong); }

.input:focus {
  border-color: rgba(79, 140, 255, 0.65);
  background: rgba(79, 140, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.16);
}

.input--area {
  resize: vertical;
  min-height: 96px;
  line-height: 1.6;
}

.input--file {
  padding: 9px 11px;
  cursor: pointer;
}

.input--file::file-selector-button {
  margin-right: 12px;
  padding: 7px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
}

.input--search {
  width: 190px;
  padding: 9px 13px;
  font-size: 14px;
}

select.input {
  appearance: none;
  color-scheme: dark;
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) calc(50% + 1px), calc(100% - 14px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

select.input option {
  background-color: var(--bg-soft);
  color: var(--text);
}

select.input:focus {
  border-color: rgba(79, 140, 255, 0.65);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, opacity 0.15s ease;
}

.btn:hover { background: rgba(255, 255, 255, 0.11); }
.btn:active { transform: translateY(1px); }

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-color: rgba(79, 140, 255, 0.5);
  box-shadow: 0 8px 20px rgba(79, 140, 255, 0.24);
}

.btn--primary:hover { background: linear-gradient(180deg, #6099ff, #3a7cf0); }

.btn--ghost {
  padding: 9px 14px;
  font-size: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.btn--ghost:hover { color: var(--text); }

/* ---------- Messages ---------- */

.hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.hint code {
  padding: 2px 6px;
  font-size: 12px;
  color: #b9c6d6;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  word-break: break-all;
}

.form__msg {
  min-height: 20px;
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.form__msg:empty { display: none; }

.msg--ok { color: var(--ok); }
.msg--err { color: var(--err); }

/* ---------- Board ---------- */

.board {
  margin-top: 30px;
}

.board__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tab {
  padding: 8px 15px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.tab.is-active {
  color: #fff;
  background: rgba(79, 140, 255, 0.18);
  border-color: rgba(79, 140, 255, 0.45);
}

.board__tools {
  display: flex;
  align-items: center;
  gap: 9px;
}

.board__count {
  margin: 16px 2px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.empty {
  padding: 46px 20px;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
  background: var(--panel);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

/* ---------- Item cards ---------- */

.item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 17px 18px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.item:hover {
  border-color: rgba(79, 140, 255, 0.34);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.item__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.item__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.item__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.item__body {
  font-size: 14.5px;
  color: #c3d0de;
  white-space: pre-wrap;
  word-break: break-word;
}

.item__body a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.item__body a:hover { text-decoration: underline; }

.badge {
  flex: none;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
}

.badge--feedback {
  color: #9dc0ff;
  background: rgba(79, 140, 255, 0.16);
  border: 1px solid rgba(79, 140, 255, 0.34);
}

.badge--upload {
  color: #7fe4d8;
  background: rgba(20, 184, 166, 0.15);
  border: 1px solid rgba(20, 184, 166, 0.34);
}

.stars {
  color: #fbbf24;
  letter-spacing: 2px;
  font-size: 14px;
}

/* ---------- Pager ---------- */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}

.pager__info {
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- Footer ---------- */

.foot {
  margin-top: 40px;
  padding: 20px 0 6px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
  border-top: 1px solid var(--line);
}

.foot span { color: var(--accent); font-weight: 600; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .panel { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding-left: 0; padding-right: 0; }
  .hero { padding: 30px 14px 14px; }
  .hero__icon { width: 58px; height: 58px; font-size: 27px; border-radius: 17px; }
  .hero__title { font-size: 28px; }
  .hero__desc { font-size: 15px; padding: 0 8px; }
  .panel { margin-top: 18px; gap: 14px; }
  .panel__col { border-radius: 0; border-left: 0; border-right: 0; padding: 18px 16px; }
  .form__row { grid-template-columns: 1fr; }
  .input { font-size: 16px; padding: 13px 14px; }
  .btn { padding: 13px 18px; min-height: 46px; }
  .board { margin-top: 22px; }
  .board__bar { border-radius: 0; border-left: 0; border-right: 0; padding: 12px 16px; }
  .board__tools { width: 100%; }
  .input--search { flex: 1; width: auto; }
  .tab { padding: 10px 16px; min-height: 42px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .item { border-radius: 0; border-left: 0; border-right: 0; }
  .item:hover { transform: none; }
  .board__count { padding: 0 16px; }
  .pager { padding: 0 16px; }
  .foot { padding: 18px 16px 6px; }
}

@media (max-width: 380px) {
  .hero__title { font-size: 25px; }
  .board__bar { padding: 10px 12px; }
  .tab { padding: 9px 13px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .item, .input, .tab { transition: none; }
  .item:hover { transform: none; }
}
