:root {
  --bg-start: #f5f9ff;
  --bg-end: #e9f0ff;
  --surface: #ffffff;
  --surface-soft: #f7faff;
  --text: #12315f;
  --muted: #5d7398;
  --line: #d6e4ff;
  --accent-grad: linear-gradient(120deg, #2f7bff, #49a2ff);
  --accent: #2f7bff;
  --danger: #e34a6f;
  --ok: #23a067;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, var(--bg-start), var(--bg-end));
  min-height: 100vh;
}
.lock_label {
  display: block;
  font-weight: 600;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.permission-item {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
}

.permission-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.wrap {
  width: min(1180px, 92vw);
  margin: 0 auto;
  padding: 24px 0 48px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(47, 123, 255, .12);
}

.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  padding: 28px;
  box-sizing: border-box;
  width: min(480px, 100%);
}

h1, h2 { margin: 8px 5px; }

.muted {
  color: var(--muted);
  margin: 0 0 16px;
}

label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-top: 6px;
  background: #fff;
}

button, .btn {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  color: #fff;
  background: var(--accent-grad);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

button:hover, .btn:hover { filter: brightness(.97); }

.btn-danger { background: var(--danger); }

.btn-sub {
  background: #eef4ff;
  color: var(--accent);
  border: 1px solid #c6d9ff;
  width:150px;
}
.header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}

.header-inner {
  width: min(1600px, 97vw);
  margin: 0 auto;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  flex-wrap: nowrap;
}

.header-brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}
.header-brand .brand-mark {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 0 3px rgba(47,123,255,.15);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nav a, .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 9px;
  border-radius: 100px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.18s ease;
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1;
}
.nav a:hover, .nav-link:hover {
  background: var(--surface-soft);
  color: var(--accent);
  border-color: var(--line);
}
.nav-link.active {
  background: var(--accent-grad);
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(47, 123, 255, 0.22);
}
.nav-link.active:hover {
  color: white;
  border-color: transparent;
}
.nav-link.secondary {
  color: var(--text);
}
.nav-link .nav-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: .85;
}
.nav-divider {
  flex: 0 0 auto;
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 3px;
  align-self: center;
}

@media (max-width: 880px) {
  .header-inner { flex-direction: column; align-items: stretch; padding: 12px 0; }
  .nav { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
}

.notice {
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 14px;
}
.notice.error { background: #ffe8ee; color: #bc2450; }
.notice.success { background: #e6f8ef; color: #1f8656; }

.grid {
  display: grid;
  gap: 16px;
}

.admin-wrap {
  display: grid;
  grid-template-columns: 1fr;
}
.admin-card {
  padding: 20px;
}


.table-wrap { overflow: auto; }

.title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.btn-inline {
  width: auto;
  white-space: nowrap;
}

.card-sub {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
  background: var(--surface-soft);
}

.search-row {
  display: flex;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.result-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.user-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.user-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.user-primary {
  font-weight: 700;
  margin-bottom: 4px;
}

.user-secondary {
  color: var(--muted);
  margin-bottom: 6px;
}

.user-password {
  font-size: 13px;
}

.user-right {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.status-pill {
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.active {
    color: #107c4b;
    background: #dcf8ea;
    max-height: 30px;
    margin-bottom: 0px;
}

.status-pill.inactive {
  color: #9d4d22;
  background: #ffe7d8;
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.actions form { margin: 0; }

.actions .btn-danger,
.actions .btn-inline {
  width: auto;
}

.icon-copy-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #c6d9ff;
  border-radius: 10px;
  background: #f2f7ff;
}

.icon-copy-btn img {
  width: 18px;
  height: 18px;
}
.pager {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.pager-link {
  padding: 6px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid #b7d1ff;
  background: #f2f7ff;
}

.pager-link.disabled {
  pointer-events: none;
  opacity: .5;
}

.modal {
    border: none;
    border-radius: 14px;
    /* width: min(560px, 92vw); */
    width: auto;
    max-width: 950px;
    padding: 0 0 16px;
  padding: 0 0 16px;
}

.modal::backdrop {
  background: rgba(8, 20, 40, .45);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.modal .grid {
  padding: 0 16px;
}

.inline-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.text-btn {
  background: transparent;
  color: var(--muted);
  width: auto;
  padding: 4px 8px;
}
.center-row{
    margin: auto;
}
.flex_frame{
    display: flex;
    flex-direction: row;
    gap: 10px;
}
@media (max-width: 900px) {
  .permission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .search-row {
    grid-template-columns: 1fr;
  }
  .search-row{
    display: grid;

  }
  .search-row button{
    width: 100%;
  }
  .user-item {
    flex-direction: column;
  }

  .user-right {
    justify-items: start;
  }
}
@import url('./styke.css');

.editor-grid {
  display: grid;
  gap: 16px;
}

.article-editor-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--surface-soft);
}

.article-editor-item h3 {
  margin: 0 0 10px;
}

.article-editor-fields {
  display: grid;
  gap: 10px;
}

.article-editor-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-top: 6px;
  background: #fff;
  min-height: 100px;
  resize: vertical;
}

.add-article {
  width: auto;
}
.lock_flex{
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  .permission-grid {
    grid-template-columns: 1fr;
  }

  .article-editor-actions {
    justify-content: stretch;
  }

  .add-article {
    width: 100%;
  }
}



.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 980px;
}

.table th,
.table td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  vertical-align: top;
  text-align: left;
  line-height: 1.5;
}

.table th {
  background: var(--surface-soft);
  white-space: nowrap;
}

.table td {
  background: #fff;
}

.table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.table-wrap-log {
  max-width: 100%;
}

.table-log-attempts .log-col-line {
  width: 72px;
  white-space: nowrap;
}

.table-log-attempts .log-col-time {
  width: 190px;
  white-space: nowrap;
}

.table-log-attempts .log-col-result {
  width: 120px;
}

.table-log-attempts .log-col-email,
.table-log-attempts .log-col-reason {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.table-log-attempts .log-col-raw {
  overflow-wrap: anywhere;
  word-break: break-all;
  white-space: pre-wrap;
}

.feedback-upload-form {
  display: grid;
  gap: 12px;
}

.feedback-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.feedback-list {
  display: grid;
  gap: 12px;
}

.feedback-section {
  margin-top: 22px;
}

.feedback-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.feedback-item h3 {
  margin: 0 0 6px;
}

.feedback-item .muted {
  margin-bottom: 0;
}

.feedback-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.feedback-actions form {
  margin: 0;
}

@media (max-width: 760px) {
  .feedback-form-grid {
    grid-template-columns: 1fr;
  }

  .feedback-item {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback-actions {
    justify-content: flex-start;
  }
}

.feedback-search-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.feedback-search-actions,
.feedback-manager-head,
.feedback-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.feedback-manager-head {
  justify-content: space-between;
  margin-bottom: 12px;
}

.feedback-user-list {
  display: grid;
  gap: 12px;
}

.feedback-user-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.feedback-user-item.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47, 123, 255, .12);
}

.feedback-user-item h3 {
  margin: 0 0 6px;
}

.feedback-url-notice {
  overflow-wrap: anywhere;
}

.form-note {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.feedback-modal-actions {
  justify-content: flex-end;
  padding: 0 16px;
}

@media (max-width: 900px) {
  .feedback-search-grid {
    grid-template-columns: 1fr;
  }

  .feedback-user-item,
  .feedback-manager-head {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback-search-actions,
  .feedback-modal-actions {
    justify-content: flex-start;
  }
}

/* ====== Type Diagnosis Admin View ====== */
.type-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.type-summary-card {
  background: linear-gradient(135deg, #ffffff, #f7faff);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.type-summary-card .lbl {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .08em;
  font-weight: 700;
}
.type-summary-card .val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-top: 4px;
}
.type-summary-card.E { border-top: 3px solid #ff7eb6; }
.type-summary-card.D { border-top: 3px solid #ff5e62; }
.type-summary-card.T { border-top: 3px solid #5b8def; }
.type-summary-card.X { border-top: 3px solid #ffb547; }

.type-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.type-filter-pill {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: #fff;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: all .15s;
}
.type-filter-pill:hover { color: var(--accent); border-color: var(--accent); }
.type-filter-pill.active {
  background: var(--accent-grad);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(47,123,255,.22);
}

.type-user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.type-user-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: all .15s;
  align-items: center;
}
.type-user-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(47,123,255,.08);
}
.type-user-body .name {
  font-weight: 700;
  font-size: 15px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.type-user-body .sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
}
.type-user-body .result-line {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.type-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: .04em;
}
.type-badge.done { background: #e6f8ef; color: #1f8656; }
.type-badge.pending { background: #fff3e0; color: #9d6309; }
.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1.5px solid;
  background: #fff;
}
.type-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.type-pill.E { border-color: #ff7eb6; color: #d44a82; }
.type-pill.D { border-color: #ff5e62; color: #c83a3e; }
.type-pill.T { border-color: #5b8def; color: #2c5cd6; }
.type-pill.X { border-color: #ffb547; color: #c87a18; }

.btn-detail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: var(--accent-grad);
  color: white;
  text-decoration: none;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(47,123,255,.22);
  transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn-detail:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(47,123,255,.30); }
.btn-detail.disabled {
  background: #e3e8ef;
  color: #97a0b8;
  pointer-events: none;
  box-shadow: none;
}

/* ====== Detail View ====== */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}
.detail-back:hover { color: var(--accent); }

.detail-userinfo {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  padding: 16px 20px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 18px;
}
.detail-userinfo .item .lbl {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .05em;
}
.detail-userinfo .item .val {
  font-size: 14px;
  font-weight: 600;
  margin-top: 3px;
}

.detail-hero {
  text-align: center;
  padding: 20px 8px 8px;
}
.detail-hero .typename {
  font-size: 30px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.detail-hero .catch {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 14px;
}

.detail-score {
  background: var(--surface-soft);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 14px 0 22px;
}
.detail-score .row {
  display: grid;
  grid-template-columns: 110px 1fr 56px;
  gap: 12px;
  align-items: center;
  padding: 5px 0;
  font-size: 13px;
}
.detail-score .name { font-weight: 600; }
.detail-score .bar-bg {
  height: 10px;
  background: #e3e8ef;
  border-radius: 100px;
  overflow: hidden;
}
.detail-score .bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width .6s ease;
}
.detail-score .bar-fill.E { background: linear-gradient(90deg,#ff9eb8,#ff7eb6); }
.detail-score .bar-fill.D { background: linear-gradient(90deg,#ff8585,#ff5e62); }
.detail-score .bar-fill.T { background: linear-gradient(90deg,#84a8ff,#5b8def); }
.detail-score .bar-fill.X { background: linear-gradient(90deg,#ffd07a,#ffb547); }
.detail-score .val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.admin-section {
  margin: 20px 0;
}
.admin-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.admin-section-head .icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: white;
  font-weight: 800;
  font-size: 13px;
}
.admin-section-head .icon.alert { background: #f59f00; }
.admin-section-head .icon.ok    { background: #2b8a3e; }
.admin-section-head .icon.ng    { background: #c0392b; }
.admin-section-head .icon.info  { background: var(--accent); }
.admin-section-head .title { font-size: 15px; font-weight: 800; }

.admin-list {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 0;
}
.admin-list li {
  margin: 6px 0 6px 18px;
  font-size: 13.5px;
  line-height: 1.6;
}
.admin-list.alert { background: #fff8eb; border-color: #ffe3a8; }
.admin-list.ok    { background: #ebf9f0; border-color: #b3e3c5; }
.admin-list.ng    { background: #fff0f0; border-color: #f5b3b3; }
.admin-list.info  { background: #eff4ff; border-color: #c4d4ff; }

.admin-note {
  background: linear-gradient(135deg, #eff4ff, #e9f0ff);
  border: 1px solid #c4d4ff;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 700px) {
  .type-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .type-user-item { grid-template-columns: 1fr; }
  .detail-score .row { grid-template-columns: 80px 1fr 50px; font-size: 12px; }
}
}