/* ═══════════════════════════════════════ */
/* GROUPSMIX DESIGN SYSTEM — shared.css   */
/* ═══════════════════════════════════════ */

/* ═══════════════════════════════════════ */
/* DARK THEME (default)                    */
/* ═══════════════════════════════════════ */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a2e;
  --bg-card: #16161f;
  --bg-card-hover: #1e1e2d;
  --bg-input: #1a1a28;
  --bg-modal: #16161f;
  --border-primary: #2a2a3e;
  --border-secondary: #3a3a4e;
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b8;
  --text-tertiary: #6a6a82;
  --text-muted: #505068;
  --accent-primary: #6c5ce7;
  --accent-primary-hover: #5a4bd6;
  --accent-primary-light: rgba(108,92,231,0.15);
  --accent-secondary: #00cec9;
  --accent-gold: #ffd700;
  --accent-diamond: #b9f2ff;
  --success: #00b894;
  --success-light: rgba(0,184,148,0.15);
  --warning: #fdcb6e;
  --warning-light: rgba(253,203,110,0.15);
  --error: #e17055;
  --error-light: rgba(225,112,85,0.15);
  --info: #74b9ff;
  --info-light: rgba(116,185,255,0.15);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(108,92,231,0.3);

  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
}

/* ═══════════════════════════════════════ */
/* LIGHT THEME                             */
/* ═══════════════════════════════════════ */
[data-theme="light"] {
  --bg-primary: #f8f9fc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f0f1f6;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f6fa;
  --bg-input: #f0f1f6;
  --bg-modal: #ffffff;
  --border-primary: #e0e2ea;
  --border-secondary: #d0d2da;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a62;
  --text-tertiary: #7a7a92;
  --text-muted: #9a9ab2;
  --accent-primary: #6c5ce7;
  --accent-primary-hover: #5a4bd6;
  --accent-primary-light: rgba(108,92,231,0.1);
  --accent-secondary: #00b5ad;
  --accent-gold: #f0c800;
  --accent-diamond: #7ee8fa;
  --success: #00a884;
  --success-light: rgba(0,168,132,0.1);
  --warning: #e8b500;
  --warning-light: rgba(232,181,0,0.1);
  --error: #d63031;
  --error-light: rgba(214,48,49,0.1);
  --info: #0984e3;
  --info-light: rgba(9,132,227,0.1);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
  --shadow-glow: 0 0 20px rgba(108,92,231,0.15);
}

/* ═══════════════════════════════════════ */
/* RESET                                   */
/* ═══════════════════════════════════════ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

/* ═══════════════════════════════════════ */
/* LAYOUT                                  */
/* ═══════════════════════════════════════ */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--accent-primary);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  z-index: 100000;
  font-weight: var(--font-semibold);
}

.skip-link:focus {
  top: var(--space-2);
}

.grid {
  display: grid;
  gap: var(--space-4);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.text-center { text-align: center; }
.hidden { display: none !important; }
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ═══════════════════════════════════════ */
/* BUTTONS                                 */
/* ═══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  transition: background-color 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
  white-space: nowrap;
  user-select: none;
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1;
}

.btn:active { transform: scale(0.97); }
.btn:disabled, .btn.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn-primary { background: var(--accent-primary); color: #fff; }
.btn-primary:hover { background: var(--accent-primary-hover); color: #fff; }

.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border-primary); }
.btn-secondary:hover { border-color: var(--border-secondary); }

.btn-outline { background: transparent; color: var(--accent-primary); border-color: var(--accent-primary); }
.btn-outline:hover { background: var(--accent-primary-light); }

.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { opacity: 0.9; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { opacity: 0.9; }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-tertiary); color: var(--text-primary); }

.btn-sm { height: 36px; padding: 0 12px; font-size: var(--text-sm); }
.btn-lg { height: 52px; padding: 0 28px; font-size: var(--text-lg); }
.btn-icon { width: 44px; height: 44px; padding: 0; flex-shrink: 0; }
.btn-icon.btn-sm { width: 36px; height: 36px; }
.btn-full { width: 100%; }

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ═══════════════════════════════════════ */
/* CARDS                                   */
/* ═══════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__header { padding: var(--space-4); border-bottom: 1px solid var(--border-primary); }
.card__body { padding: var(--space-4); }
.card__footer { padding: var(--space-4); border-top: 1px solid var(--border-primary); }
.card--clickable { cursor: pointer; }

/* ═══════════════════════════════════════ */
/* FORMS                                   */
/* ═══════════════════════════════════════ */
.form-group { margin-bottom: var(--space-4); }

.form-label {
  display: block;
  font-weight: var(--font-medium);
  font-size: var(--text-sm);
  margin-bottom: var(--space-1);
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  height: 44px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder { color: var(--text-muted); }
.form-input:focus { border-color: var(--accent-primary); box-shadow: var(--shadow-glow); }
.form-input--error { border-color: var(--error) !important; }

.form-textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-base);
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: var(--font-primary);
}

.form-textarea::placeholder { color: var(--text-muted); }
.form-textarea:focus { border-color: var(--accent-primary); box-shadow: var(--shadow-glow); }

.form-select {
  width: 100%;
  height: 44px;
  padding: 10px 36px 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-base);
  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='%236a6a82' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.form-select:focus { border-color: var(--accent-primary); }

.form-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.form-error-text { color: var(--error); font-size: var(--text-sm); margin-top: var(--space-1); }
.form-help { color: var(--text-tertiary); font-size: var(--text-sm); margin-top: var(--space-1); }

.form-row {
  display: flex;
  gap: var(--space-4);
}

/* ═══════════════════════════════════════ */
/* HEADER                                  */
/* ═══════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  height: 60px;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  text-decoration: none;
}

.site-header__logo:hover { color: var(--text-primary); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.site-header__search {
  position: relative;
  display: none;
}

.site-header__search-input {
  width: 200px;
  height: 36px;
  padding: 0 36px 0 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: width 0.3s ease, border-color 0.2s ease;
}

.site-header__search-input:focus { width: 280px; border-color: var(--accent-primary); }
.site-header__search-input::placeholder { color: var(--text-muted); }

.site-header__search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

.notification-badge {
  position: relative;
}

.notification-badge__count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--error);
  color: #fff;
  font-size: 10px;
  font-weight: var(--font-bold);
  min-width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  animation: slideDown 0.2s ease;
  overflow: hidden;
}

.notification-dropdown__item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-primary);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.notification-dropdown__item:hover { background: var(--bg-card-hover); }
.notification-dropdown__item:last-child { border-bottom: none; }
.notification-dropdown__item--unread { background: var(--accent-primary-light); }

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  animation: slideDown 0.2s ease;
  overflow: hidden;
  padding: var(--space-2) 0;
}

.user-dropdown__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  color: var(--text-secondary);
  transition: background-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
  cursor: pointer;
  font-size: var(--text-sm);
}

.user-dropdown__item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.user-dropdown__divider { height: 1px; background: var(--border-primary); margin: var(--space-2) 0; }

/* ═══════════════════════════════════════ */
/* MOBILE DRAWER                           */
/* ═══════════════════════════════════════ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  animation: fadeIn 0.2s ease;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: var(--bg-secondary);
  z-index: 9999;
  overflow-y: auto;
  animation: slideInLeft 0.25s ease;
  border-right: 1px solid var(--border-primary);
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-primary);
}

.drawer__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--text-secondary);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
  font-size: var(--text-sm);
}

.drawer__item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.drawer__divider { height: 1px; background: var(--border-primary); margin: var(--space-2) var(--space-4); }

/* ═══════════════════════════════════════ */
/* ANNOUNCEMENT BAR                        */
/* ═══════════════════════════════════════ */
.announcement-bar {
  z-index: 1001;
  min-height: 36px;
  padding: 8px 16px;
  text-align: center;
  font-size: var(--text-sm);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

.announcement-bar--info { background: var(--info); }
.announcement-bar--success { background: var(--success); }
.announcement-bar--warning { background: var(--warning); }
.announcement-bar--error { background: var(--error); }

.announcement-bar__close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: var(--text-lg);
  opacity: 0.8;
  padding: 0 var(--space-2);
}

.announcement-bar__close:hover { opacity: 1; }

/* ═══════════════════════════════════════ */
/* FOOTER                                  */
/* ═══════════════════════════════════════ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  padding: 48px 0 24px;
  margin-top: var(--space-16);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.site-footer__brand { margin-bottom: var(--space-4); }

.site-footer__title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.site-footer__desc { color: var(--text-secondary); font-size: var(--text-sm); }

.site-footer__heading {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-footer__link {
  display: block;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  padding: var(--space-1) 0;
  transition: color 0.15s ease;
  text-decoration: none;
}

.site-footer__link:hover { color: var(--text-primary); }

.site-footer__bottom {
  border-top: 1px solid var(--border-primary);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  text-align: center;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

/* ═══════════════════════════════════════ */
/* TOASTS                                  */
/* ═══════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-left: 4px solid var(--info);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  min-width: 300px;
  max-width: 420px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: slideInRight 0.25s ease;
  pointer-events: all;
}

.toast--success { border-left-color: var(--success); }
.toast--error { border-left-color: var(--error); }
.toast--warning { border-left-color: var(--warning); }
.toast--info { border-left-color: var(--info); }

.toast__icon { flex-shrink: 0; font-size: var(--text-lg); }
.toast__content { flex: 1; min-width: 0; }
.toast__title { font-weight: var(--font-semibold); font-size: var(--text-sm); }
.toast__message { color: var(--text-secondary); font-size: var(--text-sm); margin-top: 2px; }

.toast__close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
  font-size: var(--text-base);
}

.toast__close:hover { color: var(--text-primary); }

.toast--exit { animation: slideOutRight 0.2s ease forwards; }

/* ═══════════════════════════════════════ */
/* MODAL                                   */
/* ═══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-modal);
  border-radius: var(--radius-xl);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: scaleUp 0.2s ease;
  border: 1px solid var(--border-primary);
}

.modal--small { max-width: 400px; }
.modal--large { max-width: 760px; }

.modal__header {
  padding: var(--space-4) var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-primary);
}

.modal__title { font-size: var(--text-xl); font-weight: var(--font-bold); }

.modal__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: var(--radius-md);
  font-size: var(--text-xl);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.modal__close:hover { color: var(--text-primary); background: var(--bg-tertiary); }

.modal__body { padding: var(--space-6); overflow-y: auto; flex: 1; }

.modal__footer {
  padding: var(--space-4) var(--space-6);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  border-top: 1px solid var(--border-primary);
}

/* ═══════════════════════════════════════ */
/* AUTH MODAL                              */
/* ═══════════════════════════════════════ */
.auth-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.auth-tab {
  flex: 1;
  padding: var(--space-2) var(--space-4);
  text-align: center;
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab--active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

.auth-form__error {
  background: var(--error-light);
  color: var(--error);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: var(--text-base);
  padding: 4px;
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.auth-footer a { color: var(--accent-primary); font-weight: var(--font-semibold); cursor: pointer; }

/* ═══════════════════════════════════════ */
/* SKELETON                                */
/* ═══════════════════════════════════════ */
.skeleton {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  animation: shimmer 1.5s infinite;
}

.skeleton-text { height: 16px; margin-bottom: 8px; border-radius: var(--radius-sm); }
.skeleton-title { height: 24px; width: 60%; margin-bottom: 12px; }
.skeleton-card { height: 280px; border-radius: var(--radius-lg); }
.skeleton-avatar { width: 40px; height: 40px; border-radius: var(--radius-full); }
.skeleton-btn { height: 44px; width: 120px; border-radius: var(--radius-md); }

/* ═══════════════════════════════════════ */
/* GROUP CARD                              */
/* ═══════════════════════════════════════ */
.group-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.group-card:hover { background: var(--bg-card-hover); box-shadow: var(--shadow-md); transform: translateY(-2px); }

.group-card__header { display: flex; justify-content: space-between; align-items: center; padding: var(--space-4) var(--space-4) 0; }
.group-card__platform { font-size: var(--text-sm); color: var(--text-secondary); display: flex; align-items: center; gap: var(--space-1); }
.group-card__body { padding: var(--space-3) var(--space-4); flex: 1; }
.group-card__name { font-weight: var(--font-semibold); font-size: var(--text-lg); color: var(--text-primary); margin-bottom: var(--space-1); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.group-card__description { color: var(--text-secondary); font-size: var(--text-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: var(--space-3); }

.group-card__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: var(--space-3); }
.group-card__tag { background: var(--bg-tertiary); color: var(--text-tertiary); font-size: var(--text-xs); padding: 2px 8px; border-radius: var(--radius-full); }

.group-card__stats { display: flex; gap: 12px; font-size: var(--text-sm); color: var(--text-tertiary); }
.group-card__stat { display: flex; align-items: center; gap: 4px; }

.group-card__footer {
  margin-top: auto;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-primary);
  display: flex;
  gap: var(--space-2);
}

.group-card__btn-visit { flex: 1; }
.group-card__btn-save { flex-shrink: 0; }

/* ═══════════════════════════════════════ */
/* VIP BADGES                              */
/* ═══════════════════════════════════════ */
.vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  white-space: nowrap;
}

.vip-badge--verified { background: var(--success-light); color: var(--success); }
.vip-badge--niche { background: var(--info-light); color: var(--info); }
.vip-badge--global { background: var(--warning-light); color: var(--accent-gold); }
.vip-badge--diamond { background: rgba(185,242,255,0.15); color: var(--accent-diamond); animation: diamondGlow 3s ease infinite; }

/* ═══════════════════════════════════════ */
/* TRUST SCORE                             */
/* ═══════════════════════════════════════ */
.trust-score { display: flex; align-items: center; gap: 8px; }
.trust-score__bar { height: 6px; background: var(--bg-tertiary); border-radius: var(--radius-full); flex: 1; overflow: hidden; }
.trust-score__fill { height: 100%; border-radius: var(--radius-full); transform-origin: left; transition: transform 0.8s ease; }
.trust-score__value { font-weight: var(--font-bold); font-size: var(--text-sm); min-width: 36px; text-align: right; }

/* ═══════════════════════════════════════ */
/* STAR RATING                             */
/* ═══════════════════════════════════════ */
.star-rating { display: flex; gap: 2px; }
.star-rating__star { font-size: var(--text-lg); cursor: default; }
.star-rating__star--filled { color: var(--accent-gold); }
.star-rating__star--empty { color: var(--text-muted); }
.star-rating--interactive .star-rating__star { cursor: pointer; transition: transform 0.1s ease; }
.star-rating--interactive .star-rating__star:hover { transform: scale(1.2); }

/* ═══════════════════════════════════════ */
/* REVIEW CARD                             */
/* ═══════════════════════════════════════ */
.review-card {
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-primary);
}

.review-card:last-child { border-bottom: none; }
.review-card__header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-2); }
.review-card__avatar { width: 36px; height: 36px; border-radius: var(--radius-full); background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; font-size: var(--text-sm); flex-shrink: 0; }
.review-card__name { font-weight: var(--font-semibold); font-size: var(--text-sm); }
.review-card__date { font-size: var(--text-xs); color: var(--text-tertiary); }
.review-card__text { color: var(--text-secondary); font-size: var(--text-sm); line-height: var(--leading-relaxed); margin-top: var(--space-2); }

/* ═══════════════════════════════════════ */
/* PAGINATION                              */
/* ═══════════════════════════════════════ */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: var(--space-8); }

.pagination__btn {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.pagination__btn:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.pagination__btn--active { background: var(--accent-primary); color: #fff; border-color: var(--accent-primary); }
.pagination__btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination__ellipsis { padding: 0 8px; color: var(--text-tertiary); }

/* ═══════════════════════════════════════ */
/* TAGS                                    */
/* ═══════════════════════════════════════ */
.tag { background: var(--bg-tertiary); color: var(--text-secondary); font-size: var(--text-xs); padding: 4px 10px; border-radius: var(--radius-full); display: inline-block; }
.tag--category { background: var(--accent-primary-light); color: var(--accent-primary); }
.tag--country { background: var(--success-light); color: var(--success); }
.tag--platform { background: var(--info-light); color: var(--info); }

/* ═══════════════════════════════════════ */
/* EMPTY & ERROR STATES                    */
/* ═══════════════════════════════════════ */
.empty-state { text-align: center; padding: var(--space-16) var(--space-4); }
.empty-state__icon { font-size: var(--text-4xl); margin-bottom: var(--space-4); }
.empty-state__title { font-size: var(--text-xl); font-weight: var(--font-semibold); margin-bottom: var(--space-2); }
.empty-state__text { color: var(--text-secondary); margin-bottom: var(--space-6); max-width: 400px; margin-left: auto; margin-right: auto; }

.error-state { text-align: center; padding: var(--space-16) var(--space-4); }
.error-state__icon { font-size: var(--text-4xl); margin-bottom: var(--space-4); }
.error-state__title { font-size: var(--text-xl); font-weight: var(--font-semibold); margin-bottom: var(--space-2); }
.error-state__text { color: var(--text-secondary); margin-bottom: var(--space-6); }

/* ═══════════════════════════════════════ */
/* ARTICLE CARD                            */
/* ═══════════════════════════════════════ */
.article-card { display: flex; flex-direction: column; }
.article-card__image { height: 180px; background: var(--bg-tertiary); border-radius: var(--radius-lg) var(--radius-lg) 0 0; object-fit: cover; width: 100%; }
.article-card__body { padding: var(--space-4); flex: 1; }
.article-card__title { font-weight: var(--font-semibold); font-size: var(--text-lg); margin-bottom: var(--space-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card__excerpt { color: var(--text-secondary); font-size: var(--text-sm); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: var(--space-3); }
.article-card__meta { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--text-tertiary); }

/* ═══════════════════════════════════════ */
/* AD CARD                                 */
/* ═══════════════════════════════════════ */
.ad-card { border: 1px solid var(--border-secondary); border-radius: var(--radius-lg); overflow: hidden; position: relative; }
.ad-card__label { position: absolute; top: var(--space-2); right: var(--space-2); background: var(--bg-tertiary); color: var(--text-muted); font-size: 10px; padding: 2px 6px; border-radius: var(--radius-sm); }
.ad-card__image { width: 100%; height: 120px; object-fit: cover; background: var(--bg-tertiary); }
.ad-card__body { padding: var(--space-3); }
.ad-card__title { font-weight: var(--font-semibold); font-size: var(--text-sm); margin-bottom: var(--space-1); }
.ad-card__desc { color: var(--text-secondary); font-size: var(--text-xs); }

/* ═══════════════════════════════════════ */
/* SECTION HELPERS                         */
/* ═══════════════════════════════════════ */
.section { padding: var(--space-12) 0; }
.section__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-6); }
.section__title { font-size: var(--text-2xl); font-weight: var(--font-bold); }
.section__link { color: var(--accent-primary); font-size: var(--text-sm); font-weight: var(--font-medium); text-decoration: none; }
.section__link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════ */
/* HORIZONTAL SCROLL                       */
/* ═══════════════════════════════════════ */
.hscroll { display: flex; gap: var(--space-4); overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: var(--space-2); scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex-shrink: 0; width: 300px; }

/* ═══════════════════════════════════════ */
/* FILTER BAR                              */
/* ═══════════════════════════════════════ */
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-6); align-items: flex-end; }
.filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 150px; }

/* ═══════════════════════════════════════ */
/* STAT CARDS                              */
/* ═══════════════════════════════════════ */
.stat-card { background: var(--bg-card); border: 1px solid var(--border-primary); border-radius: var(--radius-lg); padding: var(--space-4); text-align: center; }
.stat-card__value { font-size: var(--text-3xl); font-weight: var(--font-bold); color: var(--accent-primary); }
.stat-card__label { font-size: var(--text-sm); color: var(--text-secondary); margin-top: var(--space-1); }

/* ═══════════════════════════════════════ */
/* LEADERBOARD                             */
/* ═══════════════════════════════════════ */
.leaderboard-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-primary); transition: background-color 0.15s ease; }
.leaderboard-item:hover { background: var(--bg-card-hover); }
.leaderboard-item--current { border: 1px solid var(--accent-primary); border-radius: var(--radius-md); background: var(--accent-primary-light); }
.leaderboard-item__rank { font-weight: var(--font-bold); min-width: 32px; color: var(--text-tertiary); font-size: var(--text-sm); }
.leaderboard-item__name { flex: 1; font-weight: var(--font-semibold); }
.leaderboard-item__level { font-size: var(--text-sm); color: var(--text-secondary); }
.leaderboard-item__gxp { font-weight: var(--font-bold); color: var(--accent-primary); font-size: var(--text-sm); }

/* ═══════════════════════════════════════ */
/* ACCORDION (FAQ)                         */
/* ═══════════════════════════════════════ */
.accordion-item { border-bottom: 1px solid var(--border-primary); }

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) 0;
  background: none;
  border: none;
  color: var(--text-primary);
  font-weight: var(--font-semibold);
  font-size: var(--text-base);
  cursor: pointer;
  text-align: left;
}

.accordion-trigger::after { content: '+'; font-size: var(--text-xl); color: var(--text-tertiary); transition: transform 0.2s ease; flex-shrink: 0; margin-left: var(--space-4); }
.accordion-trigger[aria-expanded="true"]::after { content: '−'; }

.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.accordion-content__inner { padding: 0 0 var(--space-4); color: var(--text-secondary); font-size: var(--text-sm); line-height: var(--leading-relaxed); }

/* ═══════════════════════════════════════ */
/* TAG INPUT                               */
/* ═══════════════════════════════════════ */
.tag-input { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: 8px 12px; background: var(--bg-input); border: 1px solid var(--border-primary); border-radius: var(--radius-md); min-height: 44px; align-items: center; cursor: text; }
.tag-input:focus-within { border-color: var(--accent-primary); box-shadow: var(--shadow-glow); }
.tag-input__tag { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-primary-light); color: var(--accent-primary); padding: 2px 8px; border-radius: var(--radius-full); font-size: var(--text-sm); }
.tag-input__remove { background: none; border: none; color: var(--accent-primary); cursor: pointer; font-size: var(--text-sm); padding: 0 2px; }
.tag-input__field { border: none; background: none; outline: none; flex: 1; min-width: 80px; color: var(--text-primary); font-size: var(--text-sm); }

/* ═══════════════════════════════════════ */
/* ADMIN PANEL                             */
/* ═══════════════════════════════════════ */
.admin-tabs { display: flex; flex-wrap: wrap; gap: var(--space-1); border-bottom: 1px solid var(--border-primary); margin-bottom: var(--space-6); padding-bottom: var(--space-1); overflow-x: auto; }

.admin-tab {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.admin-tab:hover { color: var(--text-primary); }
.admin-tab--active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; padding: var(--space-3) var(--space-4); font-size: var(--text-sm); font-weight: var(--font-semibold); color: var(--text-secondary); border-bottom: 1px solid var(--border-primary); white-space: nowrap; }
.admin-table td { padding: var(--space-3) var(--space-4); font-size: var(--text-sm); border-bottom: 1px solid var(--border-primary); }
.admin-table tr:hover { background: var(--bg-card-hover); }

.admin-table-wrapper { overflow-x: auto; border: 1px solid var(--border-primary); border-radius: var(--radius-lg); }

.admin-status { display: inline-flex; padding: 2px 8px; border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: var(--font-semibold); }
.admin-status--pending { background: var(--warning-light); color: var(--warning); }
.admin-status--verified, .admin-status--approved, .admin-status--active { background: var(--success-light); color: var(--success); }
.admin-status--rejected, .admin-status--removed { background: var(--error-light); color: var(--error); }
.admin-status--resolved { background: var(--info-light); color: var(--info); }

/* ═══════════════════════════════════════ */
/* TOGGLE SWITCH                           */
/* ═══════════════════════════════════════ */
.toggle { position: relative; width: 48px; height: 26px; display: inline-block; }
.toggle input { opacity: 0; width: 0; height: 0; }

.toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.toggle__slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--text-tertiary);
  border-radius: 50%;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.toggle input:checked + .toggle__slider { background: var(--accent-primary-light); border-color: var(--accent-primary); }
.toggle input:checked + .toggle__slider::before { transform: translateX(22px); background: var(--accent-primary); }

/* ═══════════════════════════════════════ */
/* ANIMATIONS                              */
/* ═══════════════════════════════════════ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOutRight { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100%); } }
@keyframes scaleUp { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes diamondGlow { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════ */
/* RESPONSIVE                              */
/* ═══════════════════════════════════════ */
@media (max-width: 767px) {
  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }
  .site-header { height: 56px; }
  .site-header__search { display: none !important; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .toast-container { bottom: 16px; left: 16px; right: 16px; }
  .toast { min-width: auto; animation: slideUp 0.25s ease; }
  .toast--exit { animation: fadeOut 0.2s ease forwards; }
  .hscroll > * { width: 260px; }
  .filter-bar { flex-direction: column; }
  .filter-bar .form-group { min-width: 100%; }
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .site-header__search { display: block; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
