/* ============================================================
   ContentLab — TikTok-inspired professional theme
   Mobile-first, dark-on-light, high contrast
   ============================================================ */

:root {
  /* Surfaces */
  --bg:          #F6F7F9;
  --bg-subtle:   #EEF0F3;
  --surface:    #FFFFFF;
  --surface-2:  #FAFAFB;
  --border:     #E4E6EB;
  --border-strong: #D1D5DB;

  /* Text */
  --text:       #09090B;
  --text-sub:   #52525B;
  --muted:      #71717A;
  --faint:      #A1A1AA;

  /* TikTok brand accents */
  --tt-pink:    #FE2C55;
  --tt-pink-dark: #E0234B;
  --tt-cyan:    #25F4EE;
  --tt-cyan-dark: #00D4D0;

  /* Semantic */
  --primary:    #FE2C55;
  --primary-2:  #E0234B;
  --accent:     #25F4EE;
  --pass:       #10B981;
  --pass-soft:  #D1FAE5;
  --warn:       #F59E0B;
  --warn-soft:  #FEF3C7;
  --reject:     #EF4444;
  --reject-soft:#FEE2E2;
  --gold:       #EAB308;

  /* Shadows */
  --shadow-sm:  0 1px 2px 0 rgba(0,0,0,0.04);
  --shadow-md:  0 4px 12px -2px rgba(0,0,0,0.06), 0 2px 6px -2px rgba(0,0,0,0.04);
  --shadow-lg:  0 12px 32px -8px rgba(0,0,0,0.10), 0 4px 12px -4px rgba(0,0,0,0.05);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
}

* { -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv11','ss01','ss03';
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.55;
}

/* ============================================================
   COMPONENTS
   ============================================================ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.card-hover {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card-hover:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

/* Pills / Badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.pill-pass    { background: var(--pass-soft);    color: #047857; }
.pill-warn    { background: var(--warn-soft);    color: #b45309; }
.pill-reject  { background: var(--reject-soft);  color: #b91c1c; }
.pill-accent  { background: #FDE4EB;             color: var(--primary); }
.pill-cyan    { background: #CCFBF1;             color: #0f766e; }
.pill-gray    { background: #F3F4F6;             color: #374151; }
.pill-indigo  { background: #E0E7FF;             color: #3730a3; }
.pill-gold    { background: #FEF9C3;             color: #854d0e; }

/* Buttons — 44px min height for mobile touch */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  box-sizing: border-box;
  text-decoration: none;
}
.btn:disabled { cursor: not-allowed; opacity: 0.55; }

.btn-primary {
  background: linear-gradient(135deg, var(--tt-pink), var(--tt-pink-dark));
  color: white;
  box-shadow: 0 4px 14px -4px rgba(254,44,85,0.4);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 20px -4px rgba(254,44,85,0.5);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--text);
  color: white;
}
.btn-dark:hover:not(:disabled) { background: #27272a; }

.btn-pass  { background: var(--pass);   color: white; }
.btn-pass:hover:not(:disabled)   { background: #059669; }
.btn-reject{ background: var(--reject); color: white; }
.btn-reject:hover:not(:disabled) { background: #dc2626; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg); }

.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 13px; }

/* Inputs — 48px min on mobile */
.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
  font-family: inherit;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(9,9,11,0.08);
}
.textarea { min-height: 120px; resize: vertical; padding-top: 12px; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }

.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 7px;
}

/* Sidebar navigation */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}
.sidebar-link:hover { background: var(--bg); color: var(--text); }
.sidebar-link.active {
  background: var(--text);
  color: white;
  font-weight: 600;
}
.sidebar-link.active:hover { background: var(--text); }

/* Mobile bottom tab */
.tab-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  text-decoration: none;
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
  flex: 1;
  min-height: 56px;
  transition: color 0.15s ease;
}
.tab-link.active { color: var(--primary); }
.tab-link .tab-icon { display: inline-flex; line-height: 1; }

/* Avatar */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #FE2C55, #25F4EE);
  color: white;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  background-clip: padding-box;
}
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-md { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.avatar-xl { width: 72px; height: 72px; font-size: 26px; }

/* Stat card */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.stat-card .stat-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.stat-card .stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.stat-card .stat-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.stat-card .stat-emoji {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 52px;
  opacity: 0.08;
  pointer-events: none;
}

/* TT gradient brand text */
.brand-gradient {
  background: linear-gradient(135deg, #FE2C55 0%, #25F4EE 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Progress bar */
.progress {
  width: 100%;
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
}
.progress > div {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}
.progress-pink > div { background: linear-gradient(90deg, #FE2C55, #E0234B); }
.progress-cyan > div { background: linear-gradient(90deg, #25F4EE, #00D4D0); }
.progress-brand > div { background: linear-gradient(90deg, #FE2C55 0%, #25F4EE 100%); }
.progress-success > div { background: linear-gradient(90deg, #10B981, #059669); }
.progress-warn > div { background: linear-gradient(90deg, #F59E0B, #D97706); }

/* Stars */
.star-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  transition: transform 0.1s ease;
}
.star-btn:hover { transform: scale(1.15); }

/* Section headers */
.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Skip-to-content for a11y */
.sr-only {
  position: absolute;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Scrollbar polish */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Animations */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeSlideUp 0.25s ease-out; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.animate-shake { animation: shake 0.35s cubic-bezier(.36,.07,.19,.97); }

/* Responsive helpers — safe areas for iOS */
@supports (padding: max(0px)) {
  .safe-bottom { padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
  .safe-top    { padding-top: max(1rem, env(safe-area-inset-top)); }
}
