/* ═══════════════════════════════════════════════════════
   Recruitment Platform - Complete Stylesheet
   Original styles from index.html + new auth/payment styles
   ═══════════════════════════════════════════════════════ */

:root {
  --bg: #ffffff;
  --card-bg: #ffffff;
  --text: #1a1a2e;
  --text2: #64748b;
  --accent: #2563eb;
  --accent2: #7c3aed;
  --border: #e2e8f0;
  --tag-bg: #eff6ff;
  --tag-text: #2563eb;
  --row-hover: #f0f4ff;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* ═══════════ NAVBAR ═══════════ */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.navbar .logo {
  font-weight: 800;
  font-size: 1.05em;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.navbar .nav-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.navbar .nav-links a {
  font-size: .85em;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all .18s;
  font-weight: 500;
  color: var(--text2);
}

.navbar .nav-links a:hover {
  background: var(--row-hover);
  color: var(--accent);
}

.navbar .nav-links a.btn-nav {
  background: var(--accent);
  color: #fff;
}

.navbar .nav-links a.btn-nav:hover {
  background: #1d4ed8;
}

.navbar .nav-links .user-email {
  font-size: .8em;
  color: var(--text2);
  margin-right: 4px;
}

.navbar .sub-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: .68em;
  font-weight: 600;
}

.navbar .sub-badge.trial {
  background: #fef3c7;
  color: #d97706;
}

.navbar .sub-badge.active {
  background: #d1fae5;
  color: #059669;
}

.navbar .sub-badge.expired {
  background: #fee2e2;
  color: #dc2626;
}

/* ═══════════ HERO ═══════════ */
.hero {
  background: #ffffff;
  padding: 44px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 2em;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.hero .subtitle {
  color: var(--text2);
  font-size: .95em;
}

.hero .update {
  display: inline-block;
  margin-top: 10px;
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 5px 18px;
  border-radius: 20px;
  font-size: .82em;
  border: 1px solid #bfdbfe;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-item .num {
  font-size: 1.7em;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-item .label {
  color: var(--text2);
  font-size: .78em;
}

/* ═══════════ BANNERS ═══════════ */
.banner {
  border-radius: 8px;
  padding: 12px 18px;
  margin: 12px 0;
  font-size: .82em;
  text-align: center;
}

.banner.trial {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  color: #92400e;
}

.banner.expired {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.banner.active {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.banner.preview {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.banner a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

/* ═══════════ CONTAINER ═══════════ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 20px;
}

/* ═══════════ SEARCH BAR ═══════════ */
.search-bar-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
  padding: 12px 20px 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.search-input-row {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 700px;
  align-items: center;
}

.search-input-row input {
  flex: 1;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 9px 18px;
  color: #0f172a;
  font-size: .88em;
  outline: none;
  transition: border .2s;
}

.search-input-row input:focus {
  border-color: var(--accent);
  background: #fff;
}

.search-input-row input::placeholder {
  color: #94a3b8;
}

.search-result-count {
  font-size: .78em;
  color: var(--text2);
  white-space: nowrap;
}

.search-chips {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
}

.search-chips-row {
  display: flex;
  gap: 5px;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.search-chips-row::-webkit-scrollbar { height: 4px; }
.search-chips-row::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

.search-chip-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.search-chip-cat {
  font-size: .68em;
  color: #94a3b8;
  font-weight: 700;
  white-space: nowrap;
  margin: 0 2px;
  user-select: none;
}

.search-chip {
  flex-shrink: 0;
  font-size: .72em;
  padding: 5px 13px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text2);
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
  user-select: none;
}

.search-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #f8faff;
}

.search-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}

.search-chip.hot-chip {
  border-color: #ef4444;
  color: #dc2626;
}

.search-chip.hot-chip:hover,
.search-chip.hot-chip.active {
  background: #ef4444;
  color: #fff;
}

.search-summary {
  font-size: .76em;
  color: var(--text2);
  text-align: center;
  padding: 4px 0;
}

.search-summary .clear-link {
  color: var(--accent);
  cursor: pointer;
  margin-left: 6px;
  text-decoration: underline;
}

/* ═══════════ DATA ROWS ═══════════ */
.rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.row {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  gap: 32px;
  transition: all .18s;
  min-height: 48px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}

.row:hover {
  border-color: var(--accent);
  background: var(--row-hover);
  box-shadow: 0 2px 8px rgba(37, 99, 235, .08);
}

.row-num {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: #f1f5f9;
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72em;
  font-weight: 700;
  flex-shrink: 0;
}

.row-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 170px;
  max-width: 280px;
  flex-shrink: 0;
}

.row-company {
  font-weight: 700;
  color: #0f172a;
  font-size: .9em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-loc {
  font-size: .84em;
  color: #d97706;
  white-space: nowrap;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.tag {
  font-size: .66em;
  padding: 2px 7px;
  border-radius: 8px;
  background: var(--tag-bg);
  color: var(--tag-text);
  white-space: nowrap;
  border: 1px solid #bfdbfe;
}

.tag.hot {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.tag.green {
  background: #f0fdf4;
  color: #16a34a;
  border-color: #bbf7d0;
}

.tag.orange {
  background: #fff7ed;
  color: #ea580c;
  border-color: #fed7aa;
}

.tag.purple {
  background: #f5f3ff;
  color: #7c3aed;
  border-color: #ddd6fe;
}

.row-info {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: .85em;
  color: var(--text2);
  align-items: center;
  min-width: 0;
  padding-left: 12px;
}

.row-info .info-item {
  white-space: nowrap;
}

.row-info .info-item strong {
  color: #334155;
  font-weight: 600;
}

.row-info.masked {
  filter: blur(0px);
}

.row-info .masked-text {
  color: #94a3b8;
  font-style: italic;
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
}

.row-actions a,
.row-actions button {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: .76em;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: #fff;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #f8faff;
}

.btn-locked {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px dashed var(--border);
  cursor: pointer;
}

.btn-locked:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--row-hover);
}

.row.header-row {
  background: transparent;
  border: none;
  padding: 5px 16px;
  font-size: .74em;
  color: var(--text2);
  font-weight: 600;
  min-height: auto;
  box-shadow: none;
}

.row.header-row:hover {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.row.header-row .row-left {
  visibility: hidden;
}

.row.hidden {
  display: none;
}

.no-result {
  text-align: center;
  padding: 40px;
  color: var(--text2);
  font-size: .9em;
}

/* Loading & States */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text2);
}

.loading-spinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ═══════════ ALERT / TIPS ═══════════ */
.alert {
  border-radius: 8px;
  padding: 12px 18px;
  margin: 12px 0;
  font-size: .82em;
}

.alert.tips {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.alert h3 {
  margin-bottom: 5px;
  font-size: .92em;
}

/* ═══════════ FOOTER ═══════════ */
.footer {
  text-align: center;
  padding: 26px 20px;
  color: var(--text2);
  font-size: .74em;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

.footer a {
  color: var(--accent);
}

/* ═══════════ AUTH FORMS ═══════════ */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  background: #f8fafc;
  padding: 20px;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 6px;
  font-size: 1.4em;
}

.auth-card .sub {
  text-align: center;
  color: var(--text2);
  font-size: .85em;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: .82em;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .9em;
  outline: none;
  transition: border .2s;
  background: #f8fafc;
}

.form-group input:focus {
  border-color: var(--accent);
  background: #fff;
}

.form-group .helper {
  font-size: .74em;
  color: var(--text2);
  margin-top: 4px;
}

.btn-full {
  width: 100%;
  padding: 11px;
  border-radius: 8px;
  font-size: .9em;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
}

.btn-full.primary {
  background: var(--accent);
  color: #fff;
}

.btn-full.primary:hover {
  background: #1d4ed8;
}

.btn-full:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.auth-card .alt-link {
  text-align: center;
  margin-top: 16px;
  font-size: .82em;
  color: var(--text2);
}

.auth-card .alt-link a {
  color: var(--accent);
  font-weight: 600;
}

.error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .82em;
  margin-bottom: 16px;
}

.success-msg {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .82em;
  margin-bottom: 16px;
}

/* ═══════════ PAYMENT PAGE ═══════════ */
.payment-section {
  max-width: 600px;
  margin: 30px auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}

.payment-section h3 {
  margin-bottom: 16px;
}

.price-tag {
  text-align: center;
  margin: 20px 0;
}

.price-tag .amount {
  font-size: 3em;
  font-weight: 800;
  color: var(--accent);
}

.price-tag .period {
  color: var(--text2);
  font-size: .9em;
}

.price-tag .unit {
  font-size: 1.2em;
  font-weight: 600;
}

.qr-section {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin: 20px 0;
  flex-wrap: wrap;
}

.qr-card {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  min-width: 160px;
}

.qr-card img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  margin-bottom: 8px;
}

.qr-card .label {
  font-size: .82em;
  font-weight: 600;
}

.qr-card.alipay .label {
  color: #1677ff;
}

.upload-section {
  margin: 20px 0;
  padding: 20px;
  border: 2px dashed var(--border);
  border-radius: 10px;
  text-align: center;
}

.upload-section:hover {
  border-color: var(--accent);
}

.upload-section input[type="file"] {
  display: none;
}

.upload-label {
  cursor: pointer;
  display: inline-block;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: .85em;
}

.payment-orders {
  margin-top: 24px;
}

.payment-orders table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82em;
}

.payment-orders th,
.payment-orders td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.payment-orders th {
  color: var(--text2);
  font-weight: 600;
  font-size: .78em;
}

.status-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: .75em;
  font-weight: 600;
}

.status-badge.pending {
  background: #fef3c7;
  color: #d97706;
}

.status-badge.completed {
  background: #d1fae5;
  color: #059669;
}

.status-badge.cancelled {
  background: #fee2e2;
  color: #dc2626;
}

.status-badge.pending_verify {
  background: #dbeafe;
  color: #1d4ed8;
}

/* ═══════════ ADMIN PAGE ═══════════ */
.admin-section {
  max-width: 800px;
  margin: 30px auto;
}

.admin-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.admin-stat-card {
  flex: 1;
  min-width: 140px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.admin-stat-card .num {
  font-size: 1.8em;
  font-weight: 800;
  color: var(--accent);
}

.admin-stat-card .label {
  font-size: .76em;
  color: var(--text2);
}

.admin-payment-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-payment-card .info {
  font-size: .85em;
}

.admin-payment-card .actions {
  display: flex;
  gap: 8px;
}

.btn-sm {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: .78em;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
}

.btn-approve {
  background: #16a34a;
  color: #fff;
}

.btn-approve:hover {
  background: #15803d;
}

.btn-reject {
  background: #ef4444;
  color: #fff;
}

.btn-reject:hover {
  background: #dc2626;
}

/* ═══════════ PAGINATION ═══════════ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
}

.pagination button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: .82em;
  transition: all .18s;
}

.pagination button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pagination button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 800px) {
  .hero h1 {
    font-size: 1.3em;
  }
  .row {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }
  .row-left {
    min-width: 110px;
    max-width: 100%;
  }
  .row-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding-left: 0;
  }
  .row-actions {
    width: 100%;
  }
  .stats-row {
    gap: 14px;
  }
  .row-num {
    display: none;
  }
  .navbar {
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .nav-links {
    gap: 6px;
  }
  .auth-card {
    padding: 24px 18px;
  }
  .qr-section {
    flex-direction: column;
    align-items: center;
  }
}
