/* ===== Showcase CSS ===== */
/* デザイントークン: style.css と統一 */

/* ===== Auth Page ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f7f8fa;
  padding: 24px;
}

.auth-container {
  text-align: center;
  width: 100%;
  max-width: 440px;
}

.auth-logo {
  display: inline-block;
  margin-bottom: 32px;
}

.auth-logo img {
  height: 36px;
  width: auto;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 12px;
  line-height: 1.5;
}

.auth-description {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
  margin-bottom: 32px;
}

.auth-card {
  max-width: 400px;
  width: 100%;
  background: #ffffff;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  text-align: left;
  margin: 0 auto;
}

.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
}

.auth-input {
  width: 100%;
  height: 48px;
  font-size: 16px; /* iOS ズーム防止 */
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 0 16px;
  transition: border-color 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}

.auth-input:focus {
  border-color: #1a1a2e;
  outline: none;
}

.auth-input.error {
  border-color: #c0392b;
}

.auth-error {
  color: #c0392b;
  font-size: 13px;
  margin-top: 8px;
  min-height: 20px;
}

.auth-btn {
  width: 100%;
  height: 48px;
  background: #1a1a2e;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
  transition: opacity 0.2s;
  font-family: inherit;
}

.auth-btn:hover {
  opacity: 0.9;
}

.auth-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-note {
  font-size: 13px;
  color: #999;
  margin-top: 24px;
  line-height: 1.8;
}

.auth-link {
  color: #b05a3a;
  text-decoration: none;
  font-weight: 600;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-footer {
  position: absolute;
  bottom: 24px;
  font-size: 12px;
  color: #ccc;
}

/* ===== Showcase Common ===== */
.sc-main {
  padding-top: 64px; /* ヘッダー高さ分 */
}

.sc-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.sc-container-narrow {
  max-width: 760px;
}

.sc-section {
  padding: 48px 0;
}

.sc-section-alt {
  background: #f7f8fa;
}

.sc-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.sc-footer {
  border-top: 1px solid #e0e0e0;
  padding: 24px 0;
  text-align: center;
}

.sc-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.sc-footer p {
  font-size: 12px;
  color: #999;
}

.sc-footer a {
  color: #999;
  text-decoration: none;
}

.sc-footer a:hover {
  text-decoration: underline;
}

.nav-logout {
  color: #999 !important;
  font-size: 13px !important;
}

.nav-logout:hover {
  color: #c0392b !important;
}

/* ===== Showcase Hero ===== */
.showcase-hero {
  padding: 80px 24px 48px;
  text-align: center;
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
}

.showcase-hero-label {
  font-size: 13px;
  font-weight: 600;
  color: #b05a3a;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.showcase-hero-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 16px;
  line-height: 1.5;
}

.showcase-hero-body {
  font-size: 14px;
  color: #666;
  line-height: 1.9;
}

/* ===== Team Members ===== */
.team-members {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 16px 0;
  -webkit-overflow-scrolling: touch;
  justify-content: center;
}

.team-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
}

.team-member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #f0f0f0;
}

.team-member-name {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a2e;
  margin-top: 6px;
}

.team-member-role {
  font-size: 10px;
  color: #999;
}

/* ===== Discussion Cards ===== */
.discussions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.discussion-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.discussion-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.discussion-card-number {
  font-size: 13px;
  font-weight: 700;
  color: #b05a3a;
  letter-spacing: 0.5px;
}

.discussion-card-tag {
  display: inline-block;
  font-size: 11px;
  color: #666;
  background: #f0f0f0;
  border-radius: 4px;
  padding: 2px 8px;
  margin-top: 8px;
  align-self: flex-start;
}

.discussion-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  margin-top: 12px;
  line-height: 1.5;
}

.discussion-card-excerpt {
  font-size: 13px;
  color: #666;
  margin-top: 8px;
  line-height: 1.6;
}

.discussion-card-meta {
  display: flex;
  gap: 16px;
  margin-top: auto;
  padding-top: 16px;
  font-size: 12px;
  color: #999;
}

.discussion-card-link {
  font-size: 14px;
  font-weight: 600;
  color: #b05a3a;
  margin-top: 12px;
}

/* ===== Discussion Page ===== */
.sc-breadcrumb {
  padding: 24px 0 16px;
}

.sc-breadcrumb a {
  font-size: 14px;
  color: #b05a3a;
  text-decoration: none;
  font-weight: 500;
}

.sc-breadcrumb a:hover {
  text-decoration: underline;
}

.discussion-header {
  padding-bottom: 24px;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 32px;
}

.discussion-number {
  font-size: 13px;
  font-weight: 700;
  color: #b05a3a;
  letter-spacing: 0.5px;
}

.discussion-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  margin-top: 4px;
  line-height: 1.5;
}

.discussion-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 13px;
  color: #999;
  align-items: center;
}

.discussion-tag {
  display: inline-block;
  font-size: 11px;
  color: #666;
  background: #f0f0f0;
  border-radius: 4px;
  padding: 2px 8px;
}

/* ===== Thread Posts ===== */
.thread-posts {
  padding-bottom: 16px;
}

/* 元投稿（スレッド開始者） */
.thread-post-original {
  border-left: 3px solid #b05a3a;
  padding: 20px 24px;
  margin-bottom: 16px;
  background: #ffffff;
  border-radius: 0 12px 12px 0;
}

/* 返信投稿 */
.thread-post-reply {
  margin-left: 20px;
  padding: 20px 24px;
  margin-bottom: 12px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* 投稿者ヘッダー */
.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.post-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #f0f0f0;
  flex-shrink: 0;
}

.post-author-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.post-author-name {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a2e;
}

.post-author-role {
  font-size: 12px;
  color: #999;
}

.post-timestamp {
  font-size: 12px;
  color: #999;
  font-family: "SF Mono", "Fira Code", monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 投稿本文 */
.post-body {
  font-size: 15px;
  line-height: 1.9;
  color: #333;
}

.post-body p {
  margin-bottom: 12px;
}

.post-body p:last-child {
  margin-bottom: 0;
}

.post-body ul, .post-body ol {
  margin: 8px 0 12px 20px;
}

.post-body li {
  margin-bottom: 4px;
}

.post-body strong {
  font-weight: 700;
  color: #1a1a2e;
}

.post-body em {
  color: #666;
}

.post-body blockquote {
  border-left: 2px solid #e0e0e0;
  padding-left: 16px;
  margin: 12px 0;
  color: #666;
  font-style: italic;
}

/* 前後ナビゲーション */
.discussion-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #e0e0e0;
}

.discussion-nav a {
  font-size: 14px;
  color: #b05a3a;
  text-decoration: none;
  font-weight: 600;
  max-width: 45%;
}

.discussion-nav a:hover {
  text-decoration: underline;
}

.discussion-nav-next {
  text-align: right;
  margin-left: auto;
}

/* ===== Admin Page ===== */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 24px;
}

.admin-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
}

.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 24px;
}

.admin-tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #999;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  font-family: inherit;
}

.admin-tab:hover {
  color: #1a1a2e;
}

.admin-tab.active {
  color: #1a1a2e;
  border-bottom-color: #b05a3a;
}

.admin-tab-badge {
  background: #b05a3a;
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

/* Admin Table */
.admin-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th {
  background: #f7f8fa;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #666;
  border-bottom: 2px solid #e0e0e0;
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.admin-table tr:hover {
  background: #fafafa;
}

/* ステータスバッジ */
.badge-active {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #e8f5e9;
  color: #2d6a4f;
}

.badge-revoked {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #fce4ec;
  color: #c0392b;
}

.badge-expired {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #f0f0f0;
  color: #999;
}

.badge-pending {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #fff3e0;
  color: #e67e22;
}

/* Admin Buttons */
.btn-approve {
  background: #2d6a4f;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-approve:hover {
  opacity: 0.9;
}

.btn-reject {
  background: #ffffff;
  color: #c0392b;
  border: 1px solid #c0392b;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-reject:hover {
  background: #fce4ec;
}

.btn-revoke {
  background: #ffffff;
  color: #999;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}

.btn-revoke:hover {
  border-color: #999;
  color: #666;
}

.btn-small {
  padding: 4px 10px;
  font-size: 11px;
}

/* Issue Form */
.issue-form {
  max-width: 480px;
}

.issue-form .form-group {
  margin-bottom: 16px;
}

.issue-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
}

.issue-form input,
.issue-form select,
.issue-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.issue-form input:focus,
.issue-form select:focus,
.issue-form textarea:focus {
  border-color: #1a1a2e;
  outline: none;
}

.issue-btn {
  background: #1a1a2e;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
}

.issue-btn:hover {
  opacity: 0.9;
}

.issue-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Issue Result */
.issue-result {
  display: none;
  background: #e8f5e9;
  border-radius: 8px;
  padding: 20px 24px;
  margin-top: 16px;
}

.issue-result.show {
  display: block;
}

.issue-result-title {
  font-size: 15px;
  font-weight: 600;
  color: #2d6a4f;
  margin-bottom: 12px;
}

.issue-result-password {
  font-size: 20px;
  font-weight: 700;
  font-family: "SF Mono", "Fira Code", monospace;
  color: #1a1a2e;
  background: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  display: inline-block;
  margin: 8px 0;
  letter-spacing: 2px;
}

.issue-result-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn-copy {
  background: #ffffff;
  color: #1a1a2e;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.btn-copy:hover {
  border-color: #999;
}

/* Password mono */
.password-mono {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 13px;
  letter-spacing: 1px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #999;
  font-size: 14px;
}

/* ===== Utility ===== */
.pc-only {
  display: inline;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .discussions-grid {
    grid-template-columns: 1fr;
  }

  .team-members {
    gap: 16px;
    justify-content: flex-start;
  }

  .thread-post-reply {
    margin-left: 12px;
  }

  .admin-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .discussion-nav {
    flex-direction: column;
    gap: 12px;
  }

  .discussion-nav a {
    max-width: 100%;
  }

  .discussion-nav-next {
    text-align: left;
  }

  .showcase-hero-title {
    font-size: 22px;
  }

  .discussion-title {
    font-size: 20px;
  }

  .pc-only {
    display: none;
  }

  .admin-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-tab {
    white-space: nowrap;
    padding: 10px 14px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 24px 20px;
    margin: 0 16px;
  }

  .auth-container {
    padding: 0 16px;
  }

  .sc-container {
    padding: 0 16px;
  }

  .sc-section {
    padding: 32px 0;
  }

  .discussion-card {
    padding: 20px 16px;
  }

  .thread-post-original,
  .thread-post-reply {
    padding: 16px;
  }
}
