/* ==========================================================================
   VietAZ Account Page – Pro Design
   Integrated: Jobs, Adverts, Forum
   ========================================================================== */

/* Hide default page title */
.page-tai-khoan .vx-page__title,
.page-tai-khoan .entry-title {
  display: none !important;
}

/* =========================
   Variables
   ========================= */
.vz-account {
  --vz-primary: #2563eb;
  --vz-primary-soft: #eff6ff;
  --vz-success: #16a34a;
  --vz-success-soft: #f0fdf4;
  --vz-warning: #d97706;
  --vz-warning-soft: #fffbeb;
  --vz-danger: #dc2626;
  --vz-danger-soft: #fef2f2;
  --vz-text: #1e293b;
  --vz-muted: #64748b;
  --vz-border: #e2e8f0;
  --vz-bg: #f8fafc;
  --vz-card: #ffffff;
  --vz-radius: 12px;
  --vz-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --vz-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);

  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--vz-text);
}

/* =========================
   Alert Messages
   ========================= */
.vz-alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
}
.vz-alert--success {
  background: var(--vz-success-soft);
  color: var(--vz-success);
  border: 1px solid #bbf7d0;
}
.vz-alert--error {
  background: var(--vz-danger-soft);
  color: var(--vz-danger);
  border: 1px solid #fecaca;
}

/* =========================
   Header
   ========================= */
.vz-account__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  background: var(--vz-card);
  border-radius: var(--vz-radius);
  box-shadow: var(--vz-shadow);
  margin-bottom: 20px;
}

.vz-account__user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.vz-account__avatar img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--vz-primary-soft);
}

.vz-account__name {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 700;
  color: var(--vz-text);
}

.vz-account__meta {
  margin: 0;
  font-size: 14px;
  color: var(--vz-muted);
}

.vz-account__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================
   Buttons
   ========================= */
.vz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--vz-border);
  background: var(--vz-card);
  color: var(--vz-text);
  transition: all 0.15s ease;
}
.vz-btn:hover {
  background: var(--vz-bg);
  border-color: var(--vz-primary);
  color: var(--vz-primary);
  text-decoration: none;
}
.vz-btn--primary {
  background: var(--vz-primary);
  border-color: var(--vz-primary);
  color: #fff;
}
.vz-btn--primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}
.vz-btn--ghost {
  background: transparent;
  border-color: var(--vz-border);
}
.vz-btn--small {
  padding: 6px 12px;
  font-size: 13px;
}

/* =========================
   Tabs Navigation
   ========================= */
.vz-account__tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--vz-card);
  border-radius: var(--vz-radius);
  box-shadow: var(--vz-shadow);
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.vz-account__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--vz-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.vz-account__tab:hover {
  background: var(--vz-bg);
  color: var(--vz-text);
  text-decoration: none;
}
.vz-account__tab.is-active {
  background: var(--vz-primary);
  color: #fff;
}
.vz-account__tab.is-active .vz-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.vz-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--vz-bg);
  color: var(--vz-muted);
}

/* =========================
   Content Grid
   ========================= */
.vz-account__grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
}

.vz-account__main {
  min-width: 0;
}

.vz-account__sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* =========================
   Stats Grid (Overview)
   ========================= */
.vz-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.vz-stat-card {
  background: var(--vz-card);
  border-radius: var(--vz-radius);
  padding: 20px;
  box-shadow: var(--vz-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.vz-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}
.vz-stat-card--jobs::before {
  background: #2563eb;
}
.vz-stat-card--adverts::before {
  background: #16a34a;
}
.vz-stat-card--forum::before {
  background: #8b5cf6;
}
.vz-stat-card--saved::before {
  background: #f59e0b;
}

.vz-stat-card__icon {
  font-size: 28px;
  line-height: 1;
}

.vz-stat-card__value {
  font-size: 32px;
  font-weight: 800;
  color: var(--vz-text);
  line-height: 1;
}

.vz-stat-card__label {
  font-size: 13px;
  color: var(--vz-muted);
}

.vz-stat-card__link {
  font-size: 13px;
  color: var(--vz-primary);
  text-decoration: none;
  font-weight: 600;
}
.vz-stat-card__link:hover {
  text-decoration: underline;
}

/* =========================
   Cards
   ========================= */
.vz-card {
  background: var(--vz-card);
  border-radius: var(--vz-radius);
  padding: 20px;
  box-shadow: var(--vz-shadow);
  margin-bottom: 20px;
}

.vz-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.vz-card__title {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--vz-text);
}

.vz-card__header .vz-card__title {
  margin-bottom: 0;
}

/* =========================
   List
   ========================= */
.vz-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vz-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--vz-bg);
  border-radius: 8px;
}

.vz-list__icon {
  font-size: 20px;
  flex-shrink: 0;
}

.vz-list__content {
  flex: 1;
  min-width: 0;
}

.vz-list__title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--vz-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vz-list__title:hover {
  color: var(--vz-primary);
}

.vz-list__meta {
  display: block;
  font-size: 12px;
  color: var(--vz-muted);
  margin-top: 2px;
}

.vz-list__views {
  font-size: 12px;
  color: var(--vz-muted);
  flex-shrink: 0;
}

/* =========================
   Activity
   ========================= */
.vz-activity {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vz-activity__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--vz-border);
}
.vz-activity__item:last-child {
  border-bottom: 0;
}

.vz-activity__action {
  font-size: 13px;
  font-weight: 500;
  color: var(--vz-text);
}

.vz-activity__time {
  font-size: 12px;
  color: var(--vz-muted);
  white-space: nowrap;
}

/* =========================
   Quick Actions
   ========================= */
.vz-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vz-quick-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--vz-bg);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--vz-text);
  text-decoration: none;
  transition: all 0.15s ease;
}
.vz-quick-action:hover {
  background: var(--vz-primary-soft);
  color: var(--vz-primary);
  text-decoration: none;
}

/* =========================
   Tables
   ========================= */
.vz-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.vz-table thead {
  background: var(--vz-bg);
}

.vz-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vz-muted);
  border-bottom: 1px solid var(--vz-border);
}

.vz-table td {
  padding: 12px;
  border-bottom: 1px solid var(--vz-border);
  color: var(--vz-text);
}

.vz-table tr:last-child td {
  border-bottom: 0;
}

.vz-table a {
  color: var(--vz-primary);
  text-decoration: none;
}
.vz-table a:hover {
  text-decoration: underline;
}

.vz-table__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.vz-inline {
  display: inline;
}

.vz-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--vz-primary);
  cursor: pointer;
}
.vz-link:hover {
  text-decoration: underline;
}
.vz-link--danger {
  color: var(--vz-danger);
}

/* Status badges */
.vz-status {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.vz-status--publish {
  background: var(--vz-success-soft);
  color: var(--vz-success);
}
.vz-status--pending {
  background: var(--vz-warning-soft);
  color: var(--vz-warning);
}
.vz-status--draft {
  background: var(--vz-bg);
  color: var(--vz-muted);
}
.vz-status--expired {
  background: var(--vz-danger-soft);
  color: var(--vz-danger);
}

/* =========================
   Forum Stats Row
   ========================= */
.vz-forum-stats-row {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--vz-border);
}

.vz-mini-stat {
  font-size: 14px;
  color: var(--vz-muted);
}
.vz-mini-stat strong {
  color: var(--vz-text);
  font-weight: 700;
}

/* =========================
   Settings Grid
   ========================= */
.vz-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* =========================
   Forms
   ========================= */
.vz-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vz-form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vz-form__group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--vz-text);
}

.vz-form__group input[type="text"],
.vz-form__group input[type="email"],
.vz-form__group input[type="password"],
.vz-form__group textarea {
  padding: 10px 14px;
  border: 1px solid var(--vz-border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--vz-bg);
  color: var(--vz-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vz-form__group input:focus,
.vz-form__group textarea:focus {
  outline: none;
  border-color: var(--vz-primary);
  box-shadow: 0 0 0 3px var(--vz-primary-soft);
}

.vz-form__group input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.vz-form__group small {
  font-size: 12px;
  color: var(--vz-muted);
}

/* =========================
   Info List
   ========================= */
.vz-info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vz-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.vz-info-item span {
  color: var(--vz-muted);
}

.vz-info-item strong {
  color: var(--vz-text);
}

/* =========================
   Empty State
   ========================= */
.vz-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--vz-muted);
  font-size: 14px;
}

.vz-empty a {
  color: var(--vz-primary);
}

/* =========================
   Auth Login Required
   ========================= */
.vz-auth-login-required {
  max-width: 440px;
  margin: 48px auto 64px;
  background: var(--vz-card);
  border-radius: var(--vz-radius);
  box-shadow: var(--vz-shadow-lg);
  border: 1px solid var(--vz-border);
  padding: 40px;
  text-align: center;
}

.vz-auth-login-required h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--vz-text);
  letter-spacing: -0.02em;
}

.vz-auth-login-required p {
  font-size: 15px;
  color: var(--vz-muted);
  line-height: 1.6;
  margin: 0 0 24px;
}

.vz-auth-login-required .vz-btn {
  margin: 16px 0;
}

.vz-auth-login-required .vz-auth-links {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--vz-border);
  font-size: 14px;
}

.vz-auth-login-required .vz-auth-links a {
  color: var(--vz-primary);
  text-decoration: none;
  margin: 0 8px;
  font-weight: 500;
}

.vz-auth-login-required .vz-auth-links a:hover {
  text-decoration: underline;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 1024px) {
  .vz-account__grid {
    grid-template-columns: 1fr;
  }
  .vz-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .vz-settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .vz-account {
    padding: 16px 12px 40px;
  }

  .vz-account__header {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }

  .vz-account__actions {
    width: 100%;
  }

  .vz-account__actions .vz-btn {
    flex: 1;
    justify-content: center;
  }

  .vz-account__tabs {
    padding: 4px;
    gap: 2px;
  }

  .vz-account__tab {
    padding: 8px 12px;
    font-size: 13px;
  }

  .vz-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .vz-stat-card {
    padding: 16px;
  }

  .vz-stat-card__value {
    font-size: 24px;
  }

  .vz-card {
    padding: 16px;
  }

  /* Responsive table */
  .vz-table thead {
    display: none;
  }

  .vz-table,
  .vz-table tbody,
  .vz-table tr,
  .vz-table td {
    display: block;
    width: 100%;
  }

  .vz-table tr {
    padding: 12px;
    margin-bottom: 12px;
    background: var(--vz-bg);
    border-radius: 8px;
    border: 1px solid var(--vz-border);
  }

  .vz-table td {
    padding: 6px 0;
    border: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .vz-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 12px;
    color: var(--vz-muted);
  }

  .vz-table__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .vz-forum-stats-row {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .vz-account__name {
    font-size: 20px;
  }

  .vz-stats-grid {
    grid-template-columns: 1fr;
  }
}
