/* ===================================================
   尚睿科技 · 韩国电商关键词情报平台
   main.css — 全局样式 + 主题变量
   =================================================== */

:root {
  --brand-primary: #FF6B6B;
  --brand-primary-hover: #FF5252;
  --brand-primary-light: #FFF0F0;

  --ink-1: #0F0F14;
  --ink-2: #2A2E3A;
  --ink-3: #5A6172;
  --ink-4: #8A93A6;
  --ink-5: #C4CAD4;

  --bg-base: #FEFEFE;
  --bg-soft: #F7F8FA;
  --bg-card: #FFFFFF;

  --border-subtle: #EEF0F4;
  --border-default: #E2E6EC;

  --success: #00B894;
  --warning: #F9A825;
  --danger: #E25858;
  --info: #4A90E2;

  --shadow-card: 0 1px 3px rgba(15,15,20,0.04), 0 1px 2px rgba(15,15,20,0.03);
  --shadow-card-hover: 0 4px 12px rgba(15,15,20,0.08);
  --shadow-float: 0 8px 24px rgba(15,15,20,0.10);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* -----------------------------------------------
   Reset & Base
----------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-base);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-primary); text-decoration: none; }
a:hover { color: var(--brand-primary-hover); }

/* -----------------------------------------------
   Element Plus 主题色覆盖
----------------------------------------------- */
.el-button--primary {
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}
.el-button--primary:hover,
.el-button--primary:focus {
  background: var(--brand-primary-hover) !important;
  border-color: var(--brand-primary-hover) !important;
}
.el-button--primary.is-plain {
  color: var(--brand-primary) !important;
  background: var(--brand-primary-light) !important;
  border-color: #FFD4D4 !important;
}
.el-button--primary.is-plain:hover {
  background: #FFE5E5 !important;
}

/* Tag overrides */
.el-tag--success { background: rgba(0,184,148,0.08) !important; border-color: rgba(0,184,148,0.2) !important; color: #00A884 !important; }
.el-tag--danger  { background: rgba(226,88,88,0.08) !important;  border-color: rgba(226,88,88,0.2) !important;  color: var(--danger) !important; }
.el-tag--warning { background: rgba(249,168,37,0.08) !important; border-color: rgba(249,168,37,0.2) !important; color: #D68A00 !important; }
.el-tag--info    { background: rgba(138,147,166,0.10) !important; border-color: var(--border-default) !important; color: var(--ink-3) !important; }

/* Input focus ring */
.el-input__wrapper.is-focus { box-shadow: 0 0 0 1px var(--brand-primary) inset !important; }
.el-select .el-input.is-focus .el-input__wrapper { box-shadow: 0 0 0 1px var(--brand-primary) inset !important; }

/* Progress bar */
.el-progress-bar__inner { background: var(--brand-primary) !important; }

/* Pagination active */
.el-pager li.is-active { color: var(--brand-primary) !important; }
.el-pager li:hover { color: var(--brand-primary) !important; }

/* -----------------------------------------------
   Scrollbar
----------------------------------------------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-5); }

/* -----------------------------------------------
   Utility
----------------------------------------------- */
.text-primary  { color: var(--brand-primary); }
.text-ink1     { color: var(--ink-1); }
.text-ink2     { color: var(--ink-2); }
.text-ink3     { color: var(--ink-3); }
.text-ink4     { color: var(--ink-4); }
.text-success  { color: var(--success); }
.text-danger   { color: var(--danger); }
.text-warning  { color: var(--warning); }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }

/* -----------------------------------------------
   Card
----------------------------------------------- */
.sr-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
  transition: box-shadow 0.2s ease;
}
.sr-card:hover { box-shadow: var(--shadow-card-hover); }

/* -----------------------------------------------
   Scroll animations
----------------------------------------------- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* -----------------------------------------------
   App Layout (Workspace)
----------------------------------------------- */
.sr-layout {
  display: flex;
  min-height: 100vh;
}

.sr-sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

.sr-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
}
.sr-sidebar-logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-1);
}

.sr-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.sr-sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.sr-sidebar-user-info { overflow: hidden; }
.sr-sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sr-sidebar-user-role {
  font-size: 11px;
  color: var(--ink-4);
}

.sr-sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}
.sr-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--ink-3);
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  position: relative;
}
.sr-nav-item:hover {
  background: var(--bg-soft);
  color: var(--ink-1);
}
.sr-nav-item.active {
  color: var(--brand-primary);
  background: var(--brand-primary-light);
  font-weight: 600;
}
.sr-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--brand-primary);
  border-radius: 0 2px 2px 0;
}
.sr-nav-icon { font-size: 16px; width: 20px; text-align: center; }
.sr-nav-section {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 16px 20px 4px;
}

.sr-sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
}
.sr-logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-4);
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 0;
  width: 100%;
  text-align: left;
  transition: color 0.15s;
}
.sr-logout-btn:hover { color: var(--danger); }

.sr-main {
  flex: 1;
  margin-left: 240px;
  background: var(--bg-soft);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sr-topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.sr-topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-1);
}

.sr-content {
  flex: 1;
  padding: 32px;
}

/* -----------------------------------------------
   Keyword task cards
----------------------------------------------- */
.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 24px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  cursor: default;
}
.task-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}
.task-card-seed {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-1);
  min-width: 120px;
  flex-shrink: 0;
}
.task-card-meta {
  flex: 1;
  min-width: 0;
}
.task-card-time {
  font-size: 12px;
  color: var(--ink-4);
  margin-top: 4px;
}
.task-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* -----------------------------------------------
   Collect input area
----------------------------------------------- */
.collect-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.collect-hint {
  background: linear-gradient(135deg, #FFF9F0, #FFF0F0);
  border: 1px solid #FFE0C0;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.7;
  margin-bottom: 20px;
}

/* -----------------------------------------------
   Pagination
----------------------------------------------- */
.pagination-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

/* -----------------------------------------------
   Auth pages
----------------------------------------------- */
.auth-layout {
  display: flex;
  min-height: 100vh;
}
.auth-left {
  flex: 1;
  background: linear-gradient(135deg, #FFF5F5 0%, #FFF0F0 50%, #F0F4FF 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute;
  top: -80px;
  left: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,107,107,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.auth-left::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(74,144,226,0.10) 0%, transparent 70%);
  border-radius: 50%;
}
.auth-left-slogan {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink-1);
  text-align: center;
  line-height: 1.4;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.auth-left-sub {
  font-size: 15px;
  color: var(--ink-3);
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 280px;
  line-height: 1.7;
}

.auth-right {
  width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--bg-card);
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}
.auth-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-1);
}
.auth-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-1);
  margin-bottom: 8px;
  text-align: center;
}
.auth-subtitle {
  font-size: 14px;
  color: var(--ink-4);
  margin-bottom: 32px;
  text-align: center;
}
.auth-form {
  width: 100%;
  max-width: 360px;
}
.auth-form .el-input {
  margin-bottom: 16px;
}
.auth-form .el-input .el-input__inner {
  font-size: 14px;
  height: 48px;
  border-radius: 10px !important;
}
.auth-form .el-input .el-input__wrapper {
  border-radius: 10px !important;
  padding: 0 16px;
}
.auth-btn {
  width: 100%;
  height: 48px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  margin-top: 8px;
}
.auth-link-row {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--ink-4);
}
.auth-footer {
  position: fixed;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-5);
}

/* -----------------------------------------------
   Page Section titles
----------------------------------------------- */
.page-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-1);
  margin: 0 0 20px;
}
.page-section-sub {
  font-size: 13px;
  color: var(--ink-4);
  margin-top: 4px;
  font-weight: 400;
}

/* -----------------------------------------------
   Notification items
----------------------------------------------- */
.notif-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
  align-items: flex-start;
  transition: background 0.15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-primary);
  margin-top: 6px;
  flex-shrink: 0;
}
.notif-dot.read { background: var(--border-default); }
.notif-body { flex: 1; }
.notif-title { font-size: 14px; font-weight: 500; color: var(--ink-1); margin-bottom: 3px; }
.notif-text { font-size: 13px; color: var(--ink-3); }
.notif-time { font-size: 12px; color: var(--ink-5); margin-top: 4px; }

/* -----------------------------------------------
   Morpheme table custom
----------------------------------------------- */
.morpheme-kr { font-weight: 600; color: var(--ink-1); font-size: 15px; }
.morpheme-zh { font-size: 12px; color: var(--ink-4); margin-top: 2px; }
.morpheme-vol { font-weight: 600; color: var(--ink-1); }

/* -----------------------------------------------
   Profile page
----------------------------------------------- */
.profile-avatar-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* -----------------------------------------------
   404
----------------------------------------------- */
.not-found-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 48px;
  text-align: center;
}
.not-found-code {
  font-size: 96px;
  font-weight: 700;
  color: var(--border-default);
  line-height: 1;
  margin-bottom: 16px;
}
.not-found-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-1);
  margin-bottom: 8px;
}
.not-found-sub {
  font-size: 14px;
  color: var(--ink-4);
  margin-bottom: 32px;
}

/* -----------------------------------------------
   Admin table
----------------------------------------------- */
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

/* -----------------------------------------------
   Responsive
----------------------------------------------- */
@media (max-width: 768px) {
  .sr-sidebar { display: none; }
  .sr-main { margin-left: 0; }
  .auth-left { display: none; }
  .auth-right { width: 100%; }
  .sr-content { padding: 20px 16px; }
}
