/* =========================================================
   USUS - NOTICE / SUPPORT / FAQ
   Clean card-based design matching Biton trading theme
   ========================================================= */

/* ── Page Layout ── */
.notice-page,
.notice-detail {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text, #1e2329);
  margin: 0 0 4px;
  line-height: 1.3;
}

.page-subtitle {
  font-size: 14px;
  color: var(--muted, #848e9c);
  margin: 0 0 32px;
}

/* ── Notice List ── */
.notice-list {
  background: var(--surface, #fff);
  border-radius: 12px;
  border: 1px solid var(--border, #eaecef);
  overflow: hidden;
}

.notice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  gap: 12px;
}

.notice-item:hover {
  background: rgba(59,130,246,0.04);
}

.notice-item:last-child {
  border-bottom: none;
}

.notice-item__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.notice-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.notice-badge.urgent {
  background: rgba(246,70,93,0.1);
  color: #f6465d;
}

.notice-badge.normal {
  background: rgba(59,130,246,0.1);
  color: #3b82f6;
}

.notice-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text, #1e2329);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.notice-date {
  font-size: 13px;
  color: var(--muted, #848e9c);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Empty State ── */
.notice-empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted, #848e9c);
  font-size: 14px;
}

/* ── Pagination ── */
.nt-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 24px 0;
}

.nt-pg {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border, #eaecef);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--sub, #474d57);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--surface, #fff);
}

.nt-pg:hover {
  background: rgba(59,130,246,0.06);
  border-color: #3b82f6;
  color: #3b82f6;
}

strong.nt-pg.on {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

/* ── Write Button (Admin) ── */
.notice-admin-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.notice-write-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.notice-write-btn:hover {
  background: #2563eb;
  color: #fff;
}

/* ── Detail Page ── */
.notice-detail-card {
  background: var(--surface, #fff);
  border-radius: 12px;
  border: 1px solid var(--border, #eaecef);
  padding: 32px;
  overflow: hidden;
}

.notice-detail-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border, #eaecef);
}

.notice-detail-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text, #1e2329);
  margin: 0 0 8px;
  line-height: 1.4;
  word-break: keep-all;
}

.notice-detail-meta {
  font-size: 13px;
  color: var(--muted, #848e9c);
}

.notice-detail-body {
  font-size: 15px;
  color: var(--sub, #474d57);
  line-height: 1.8;
  word-break: keep-all;
}

.notice-detail-body img {
  max-width: 100%;
  height: auto;
}

.notice-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 32px;
}

.notice-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: var(--surface2, #f5f5f5);
  border: 1px solid var(--border, #eaecef);
  border-radius: 6px;
  font-size: 13px;
  color: var(--sub, #474d57);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.notice-back-btn:hover {
  background: var(--border, #eaecef);
  color: var(--text, #1e2329);
}

.notice-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.notice-edit-btn:hover {
  background: #2563eb;
  color: #fff;
}

.notice-del-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: rgba(246,70,93,0.08);
  color: #f6465d;
  border: 1px solid rgba(246,70,93,0.2);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.notice-del-btn:hover {
  background: rgba(246,70,93,0.15);
}

/* ── Support/FAQ Page ── */
.support-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* Search */
.support-search {
  position: relative;
  margin-bottom: 32px;
}

.support-search input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border, #eaecef);
  border-radius: 10px;
  padding: 0 16px 0 44px;
  font-size: 14px;
  color: var(--text, #1e2329);
  background: var(--surface, #fff);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.support-search input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.support-search input::placeholder {
  color: #c4c4c4;
}

.support-search .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted, #848e9c);
  pointer-events: none;
}

/* Categories */
.support-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.support-category {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #eaecef);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.support-category:hover,
.support-category.active {
  border-color: #3b82f6;
  background: rgba(59,130,246,0.04);
}

.support-category .icon {
  font-size: 28px;
  margin-bottom: 8px;
  display: block;
}

.support-category .name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1e2329);
}

/* FAQ Accordion */
.faq-section {
  margin-bottom: 24px;
}

.faq-section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text, #1e2329);
}

.faq-item {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #eaecef);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text, #1e2329);
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  gap: 12px;
}

.faq-question:hover {
  background: rgba(0,0,0,0.02);
}

.faq-question .q-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(59,130,246,0.1);
  color: #3b82f6;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.faq-question .q-text {
  flex: 1;
  min-width: 0;
}

.faq-question .arrow {
  transition: transform 0.2s;
  color: var(--muted, #848e9c);
  flex-shrink: 0;
  font-size: 12px;
}

.faq-item.open .faq-question .arrow {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 16px 14px 54px;
  font-size: 14px;
  color: var(--sub, #474d57);
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  display: block;
}

/* Contact */
.contact-section {
  text-align: center;
  padding: 32px 0;
  margin-top: 16px;
  border-top: 1px solid var(--border, #eaecef);
}

.contact-section h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text, #1e2329);
}

.contact-section p {
  font-size: 14px;
  color: var(--muted, #848e9c);
  margin: 0 0 16px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.contact-btn:hover {
  background: #2563eb;
  color: #fff;
}

/* ── Notice Write Form ── */
.nw-form {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}

.nw-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nw-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--sub, #474d57);
}

.nw-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border, #eaecef);
  background: var(--surface, #fff);
  font-size: 14px;
  color: var(--text, #1e2329);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nw-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.nw-input::placeholder {
  color: #c4c4c4;
}

/* Editor wrapper */
.nw-editor {
  min-height: 200px;
}

.nw-editor textarea {
  width: 100%;
  min-height: 280px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border, #eaecef);
  background: var(--surface, #fff);
  font-size: 14px;
  color: var(--text, #1e2329);
  outline: none;
  box-sizing: border-box;
  resize: vertical;
  line-height: 1.7;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nw-editor textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* SmartEditor2 override */
.nw-editor .se2_inputarea,
.nw-editor .se2_inputarea iframe {
  min-height: 280px !important;
}

/* Select dropdown */
.nw-select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border, #eaecef);
  background: var(--surface, #fff);
  font-size: 14px;
  color: var(--text, #1e2329);
  outline: none;
  box-sizing: border-box;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23848e9c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nw-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* File upload */
.nw-file {
  font-size: 13px;
  color: var(--sub, #474d57);
}

.nw-file-del {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted, #848e9c);
  margin-top: 4px;
}

/* Action buttons */
.nw-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.nw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: background 0.15s;
}

.nw-btn--cancel {
  background: var(--surface2, #f5f5f5);
  border: 1px solid var(--border, #eaecef);
  color: var(--sub, #474d57);
}

.nw-btn--cancel:hover {
  background: var(--border, #eaecef);
  color: var(--text, #1e2329);
}

.nw-btn--save {
  background: #3b82f6;
  color: #fff;
}

.nw-btn--save:hover {
  background: #2563eb;
}

/* ── About Section ── */
.about-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border, #eaecef);
}

.about-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--text, #1e2329);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.about-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #eaecef);
  border-radius: 10px;
  padding: 20px;
}

.about-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #1e2329);
  margin: 0 0 8px;
}

.about-card p {
  font-size: 13px;
  color: var(--sub, #6b7280);
  line-height: 1.7;
  margin: 0;
}

/* ── My Page ── */
.mypage {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 16px;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.mypage-title {
  font-size: 24px;
  font-weight: 700;
  color: #1e2329;
  margin: 0 0 20px;
}

.profile-card {
  background: #fff;
  border: 1px solid #eaecef;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-info { min-width: 0; }

.profile-name {
  font-size: 18px;
  font-weight: 700;
  color: #1e2329;
  margin: 0;
}

.profile-email {
  font-size: 13px;
  color: #848e9c;
  margin: 2px 0 0;
}

.profile-date {
  font-size: 12px;
  color: #848e9c;
  margin: 2px 0 0;
}

.info-section {
  background: #fff;
  border: 1px solid #eaecef;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.info-section-title {
  font-size: 16px;
  font-weight: 700;
  padding: 16px 20px;
  border-bottom: 1px solid #eaecef;
  color: #1e2329;
  margin: 0;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
}

.info-row:last-child { border-bottom: none; }

.info-label { color: #848e9c; }

.info-value {
  color: #1e2329;
  font-weight: 500;
  text-align: right;
}

.trade-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.summary-card {
  background: #fff;
  border: 1px solid #eaecef;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.summary-label {
  font-size: 11px;
  color: #848e9c;
  margin: 0 0 6px;
}

.summary-value {
  font-size: 18px;
  font-weight: 700;
  color: #1e2329;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.summary-value.profit { color: #0ecb81; }
.summary-value.loss { color: #f6465d; }

.summary-unit {
  font-size: 11px;
  color: #848e9c;
  font-weight: 400;
}

.mypage-actions {
  display: flex;
  gap: 12px;
}

.mypage-btn {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  font-family: inherit;
}

.mypage-btn.primary {
  background: #3b82f6;
  color: #fff;
}

.mypage-btn.primary:hover {
  background: #2563eb;
  color: #fff;
}

.mypage-btn.secondary {
  background: #fff;
  color: #474d57;
  border: 1px solid #eaecef;
}

.mypage-btn.secondary:hover {
  background: #f5f6fa;
}

/* ── Login Error ── */
.login-error {
  background: rgba(246,70,93,0.08);
  border: 1px solid rgba(246,70,93,0.2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #f6465d;
  margin-bottom: 16px;
  text-align: center;
}

/* ── Required Field ── */
.required::after {
  content: ' *';
  color: #f6465d;
}

/* ── Dark Mode ── */
[data-theme="dark"] .nt-pg {
  background: var(--surface, #1e2329);
  border-color: var(--border, #2b3139);
  color: var(--text, #eaecef);
}

[data-theme="dark"] .nt-pg:hover {
  background: rgba(59,130,246,0.12);
  border-color: #3b82f6;
  color: #60a5fa;
}

[data-theme="dark"] .notice-item:hover,
[data-theme="dark"] .faq-question:hover {
  background: rgba(255,255,255,0.04);
}

[data-theme="dark"] .notice-item {
  border-bottom-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .notice-badge.urgent {
  background: rgba(246,70,93,0.15);
}

[data-theme="dark"] .notice-badge.normal {
  background: rgba(59,130,246,0.15);
}

[data-theme="dark"] .nw-select {
  background-color: var(--surface, #1e2329);
  border-color: var(--border, #2b3139);
  color: var(--text, #eaecef);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23848e9c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

[data-theme="dark"] .nw-input,
[data-theme="dark"] .nw-editor textarea {
  background: var(--surface, #1e2329);
  border-color: var(--border, #2b3139);
  color: var(--text, #eaecef);
}

[data-theme="dark"] .nw-btn--cancel {
  background: rgba(255,255,255,0.06);
  border-color: var(--border, #2b3139);
  color: var(--text, #eaecef);
}

[data-theme="dark"] .support-search input {
  background: var(--surface, #1e2329);
  color: var(--text, #eaecef);
}

[data-theme="dark"] .support-category:hover,
[data-theme="dark"] .support-category.active {
  background: rgba(59,130,246,0.08);
}

[data-theme="dark"] .notice-detail-card {
  background: var(--surface, #1e2329);
}

[data-theme="dark"] .about-card {
  background: var(--surface, #1e2329);
  border-color: var(--border, #2b3139);
}

[data-theme="dark"] .about-card p {
  color: var(--muted, #848e9c);
}

[data-theme="dark"] .mypage-title {
  color: #eaecef;
}

[data-theme="dark"] .profile-card {
  background: #1e2329;
  border-color: #2b3139;
}

[data-theme="dark"] .profile-name {
  color: #eaecef;
}

[data-theme="dark"] .profile-email,
[data-theme="dark"] .profile-date {
  color: #848e9c;
}

[data-theme="dark"] .info-section {
  background: #1e2329;
  border-color: #2b3139;
}

[data-theme="dark"] .info-section-title {
  color: #eaecef;
  border-color: #2b3139;
}

[data-theme="dark"] .info-row {
  border-bottom-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .info-label {
  color: #848e9c;
}

[data-theme="dark"] .info-value {
  color: #eaecef;
}

[data-theme="dark"] .summary-card {
  background: #1e2329;
  border-color: #2b3139;
}

[data-theme="dark"] .summary-value {
  color: #eaecef;
}

[data-theme="dark"] .mypage-btn.secondary {
  background: rgba(255,255,255,0.06);
  border-color: #2b3139;
  color: #eaecef;
}

[data-theme="dark"] .mypage-btn.secondary:hover {
  background: rgba(255,255,255,0.1);
}

[data-theme="dark"] .about-section {
  border-color: var(--border, #2b3139);
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .notice-page,
  .notice-detail,
  .support-page {
    padding: 20px 12px;
  }

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

  .page-subtitle {
    margin-bottom: 20px;
  }

  .notice-item {
    padding: 14px 16px;
  }

  .notice-badge {
    font-size: 10px;
    padding: 2px 6px;
  }

  .notice-title {
    font-size: 13px;
  }

  .notice-date {
    font-size: 12px;
  }

  .notice-detail-card {
    padding: 20px 16px;
    border-radius: 8px;
  }

  .notice-detail-title {
    font-size: 18px;
  }

  .support-categories {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .support-category {
    padding: 14px 8px;
  }

  .support-category .icon {
    font-size: 22px;
  }

  .support-category .name {
    font-size: 12px;
  }

  .notice-detail-actions {
    flex-wrap: wrap;
  }

  .about-grid { grid-template-columns: 1fr; }

  .mypage { padding: 16px 12px; }
  .mypage-title { font-size: 20px; margin-bottom: 16px; }
  .profile-card { padding: 16px; }
  .trade-summary { grid-template-columns: 1fr 1fr; gap: 8px; }
  .summary-card { padding: 14px 10px; }
  .summary-value { font-size: 16px; }
  .mypage-actions { flex-direction: column; }

  .nw-editor textarea {
    min-height: 200px;
  }

  .nw-actions {
    flex-direction: column;
  }

  .nw-btn {
    width: 100%;
  }
}
