/* ═══════════════════════════════════════════════════════════════════════════
   Korea Dream VA Dashboard — Complete Stylesheet
   Dark Glassmorphism Design System
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─────────────────────────────────────────────────────── */
:root {
  --color-bg: #0A1628;
  --color-bg-2: #0D1E36;
  --color-surface: rgba(255, 255, 255, 0.05);
  --color-surface-hover: rgba(255, 255, 255, 0.08);
  --color-surface-active: rgba(255, 255, 255, 0.12);
  --color-border: rgba(255, 255, 255, 0.1);
  --color-border-strong: rgba(255, 255, 255, 0.18);
  --color-primary: #C8102E;
  --color-primary-light: #E8213F;
  --color-primary-glow: rgba(200, 16, 46, 0.3);
  --color-gold: #F4B942;
  --color-gold-light: #F9CC6A;
  --color-gold-glow: rgba(244, 185, 66, 0.25);
  --color-text: #E8EAF0;
  --color-text-muted: #8892A4;
  --color-text-dim: #5A6478;
  --color-success: #22C55E;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #3B82F6;

  /* Platform gradients */
  --color-ig: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
  --color-tiktok: linear-gradient(135deg, #010101 0%, #69C9D0 100%);
  --color-yt: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
  --color-fb: linear-gradient(135deg, #1877F2 0%, #0D5EBD 100%);
  --color-wa: linear-gradient(135deg, #25D366 0%, #128C7E 100%);

  /* Layout */
  --header-h: 88px;
  --side-panel-w: 440px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-panel: -8px 0 40px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-btn: 0 4px 16px rgba(200, 16, 46, 0.35);
  --shadow-gold: 0 4px 16px rgba(244, 185, 66, 0.3);

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ──────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(200, 16, 46, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(244, 185, 66, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ─── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ─── Typography ────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.2;
}

/* ─── HEADER ────────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-glass);
  /* Korean decorative pattern — subtle grid motif */
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 40px 40px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 72px;
  gap: 16px;
}

/* Brand */
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-flag {
  font-size: 28px;
  filter: drop-shadow(0 2px 8px rgba(200, 16, 46, 0.4));
  animation: flagPulse 3s ease-in-out infinite;
}

@keyframes flagPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-badge {
  background: var(--color-primary);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.1em;
  animation: badgePulse 2s ease-in-out infinite;
  box-shadow: 0 0 12px var(--color-primary-glow);
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 12px var(--color-primary-glow); }
  50% { box-shadow: 0 0 20px var(--color-primary-glow), 0 0 4px var(--color-primary); }
}

/* Nav Tabs */
.header-nav {
  display: flex;
  gap: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 4px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-tab:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.nav-tab.active {
  background: var(--color-surface-active);
  color: var(--color-text);
  box-shadow: 0 0 0 1px var(--color-border-strong);
}

.nav-tab.active .nav-icon {
  filter: drop-shadow(0 0 4px var(--color-gold));
}

.nav-icon {
  font-size: 16px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-sync-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.btn-sync-header:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-gold);
  box-shadow: var(--shadow-gold);
}

/* Connection status */
.connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-warning);
  animation: statusPulse 2s ease-in-out infinite;
}

.status-dot.online {
  background: var(--color-success);
}

.status-dot.offline {
  background: var(--color-error);
  animation: none;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Progress bar */
.header-progress {
  height: 4px;
  background: var(--color-surface);
  position: relative;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-gold));
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 60px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-60px); }
  100% { transform: translateX(60px); }
}

.progress-label {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: -4px;
  white-space: nowrap;
}

/* ─── MAIN WRAP ─────────────────────────────────────────────────────────── */
.main-wrap {
  padding-top: calc(var(--header-h) + 12px);
  padding-bottom: 40px;
  padding-left: 24px;
  padding-right: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ─── STATS BAR ─────────────────────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: default;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.stat-card:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

/* Shimmer animation on cards */
.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  animation: cardShimmer 4s ease-in-out infinite;
}

@keyframes cardShimmer {
  0% { left: -100%; }
  50%, 100% { left: 150%; }
}

.stat-icon {
  font-size: 28px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
  flex-shrink: 0;
}

.stat-body {
  flex: 1;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-text), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  transition: var(--transition);
}

.stat-label {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.stat-sparkline {
  width: 60px;
  height: 32px;
  opacity: 0.4;
  background: linear-gradient(to top right, var(--color-primary-glow), transparent);
  border-radius: 4px;
}

/* ─── PLATFORM FILTER ───────────────────────────────────────────────────── */
.platform-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-btn:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--color-surface-active);
  color: var(--color-text);
  border-color: var(--color-border-strong);
  box-shadow: 0 0 12px rgba(255,255,255,0.06);
}

/* Platform-specific active colors */
.filter-btn.filter-ig.active {
  border-image: var(--color-ig) 1;
  border-color: transparent;
  background: linear-gradient(var(--color-bg), var(--color-bg)) padding-box,
              var(--color-ig) border-box;
  box-shadow: 0 4px 16px rgba(131, 58, 180, 0.25);
}

.filter-btn.filter-tiktok.active {
  background: linear-gradient(var(--color-bg), var(--color-bg)) padding-box,
              var(--color-tiktok) border-box;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(105, 201, 208, 0.2);
}

.filter-btn.filter-yt.active {
  background: linear-gradient(var(--color-bg), var(--color-bg)) padding-box,
              var(--color-yt) border-box;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(255, 0, 0, 0.2);
}

.filter-btn.filter-fb.active {
  background: linear-gradient(var(--color-bg), var(--color-bg)) padding-box,
              var(--color-fb) border-box;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(24, 119, 242, 0.2);
}

.filter-btn.filter-wa.active {
  background: linear-gradient(var(--color-bg), var(--color-bg)) padding-box,
              var(--color-wa) border-box;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.2);
}

/* ─── CALENDAR ──────────────────────────────────────────────────────────── */
.calendar-section {
  flex: 1;
}

.calendar-container {
  background: var(--color-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-glass);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(135deg, rgba(200,16,46,0.08) 0%, rgba(244,185,66,0.05) 100%);
}

.cal-nav-btn {
  width: 36px;
  height: 36px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  line-height: 1;
}

.cal-nav-btn:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-gold);
  color: var(--color-gold);
  box-shadow: var(--shadow-gold);
}

.cal-month-wrap {
  text-align: center;
}

.cal-month-title {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cal-month-sub {
  display: block;
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* Calendar Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--color-border);
}

.cal-dow {
  padding: 12px 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--color-bg);
}

/* Day cells */
.cal-day {
  background: var(--color-bg);
  min-height: 110px;
  padding: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.cal-day:hover {
  background: var(--color-surface-hover);
  z-index: 2;
}

.cal-day.empty {
  background: rgba(10, 22, 40, 0.6);
  cursor: default;
}

.cal-day.empty:hover {
  background: rgba(10, 22, 40, 0.6);
}

.cal-day.today {
  background: rgba(200, 16, 46, 0.06);
  border: 1px solid rgba(200, 16, 46, 0.25);
}

.cal-day.today .day-num {
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 0 12px var(--color-primary-glow);
}

.cal-day.has-posts {
  background: rgba(10, 22, 40, 0.95);
}

.cal-day.has-posts:hover {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--color-gold), 0 0 20px rgba(244,185,66,0.1);
}

.day-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  line-height: 1;
  align-self: flex-start;
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Post pills inside day cells */
.post-pills {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.post-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.post-pill:hover {
  transform: translateX(2px);
}

.post-pill.pill-ig {
  background: linear-gradient(135deg, rgba(131,58,180,0.35), rgba(253,29,29,0.35));
  color: #f0a0f0;
  border: 1px solid rgba(131,58,180,0.4);
}

.post-pill.pill-tiktok {
  background: linear-gradient(135deg, rgba(1,1,1,0.5), rgba(105,201,208,0.3));
  color: #69C9D0;
  border: 1px solid rgba(105,201,208,0.3);
}

.post-pill.pill-youtube {
  background: linear-gradient(135deg, rgba(255,0,0,0.3), rgba(204,0,0,0.3));
  color: #ff6b6b;
  border: 1px solid rgba(255,0,0,0.3);
}

.post-pill.pill-facebook {
  background: linear-gradient(135deg, rgba(24,119,242,0.3), rgba(13,94,189,0.3));
  color: #60a5fa;
  border: 1px solid rgba(24,119,242,0.3);
}

.post-pill.pill-whatsapp {
  background: linear-gradient(135deg, rgba(37,211,102,0.25), rgba(18,140,126,0.25));
  color: #4ade80;
  border: 1px solid rgba(37,211,102,0.3);
}

.post-pill.pill-default {
  background: var(--color-surface);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: currentColor;
}

.pill-label {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

/* Status indicators on pills */
.pill-status {
  margin-left: auto;
  font-size: 8px;
  opacity: 0.8;
}

/* Day post count badge */
.day-count {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--color-primary);
  color: white;
  font-size: 9px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── OVERLAY ────────────────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ─── SIDE PANEL ─────────────────────────────────────────────────────────── */
.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--side-panel-w);
  max-width: 100vw;
  background: rgba(10, 22, 40, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid var(--color-border);
  box-shadow: var(--shadow-panel);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.side-panel.open {
  transform: translateX(0);
}

.panel-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  gap: 20px;
}

/* Panel Header */
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-header-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-day-badge {
  display: flex;
  flex-direction: column;
}

.panel-day-num {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-text), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.panel-day-month {
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.panel-platform-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.platform-badge {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.platform-badge.badge-ig {
  background: linear-gradient(135deg, rgba(131,58,180,0.4), rgba(253,29,29,0.4));
  color: #f5a0f0;
  border: 1px solid rgba(131,58,180,0.5);
}

.platform-badge.badge-tiktok {
  background: rgba(105,201,208,0.15);
  color: #69C9D0;
  border: 1px solid rgba(105,201,208,0.4);
}

.platform-badge.badge-youtube {
  background: rgba(255,0,0,0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255,0,0,0.4);
}

.platform-badge.badge-facebook {
  background: rgba(24,119,242,0.15);
  color: #60a5fa;
  border: 1px solid rgba(24,119,242,0.4);
}

.platform-badge.badge-whatsapp {
  background: rgba(37,211,102,0.15);
  color: #4ade80;
  border: 1px solid rgba(37,211,102,0.4);
}

.panel-close-btn {
  width: 32px;
  height: 32px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.panel-close-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  transform: scale(1.1);
}

/* Asset Info */
.panel-asset-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.asset-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.asset-details {
  flex: 1;
  min-width: 0;
}

.asset-filename {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-type {
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.btn-drive-upload {
  padding: 6px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  color: var(--color-gold);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.btn-drive-upload:hover {
  background: rgba(244,185,66,0.12);
  box-shadow: var(--shadow-gold);
}

/* Caption Section */
.caption-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.caption-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  background: rgba(0,0,0,0.2);
}

.caption-tab {
  flex: 1;
  padding: 10px 4px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: var(--transition-fast);
  border-right: 1px solid var(--color-border);
  position: relative;
}

.caption-tab:last-child {
  border-right: none;
}

.caption-tab:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.caption-tab.active {
  background: var(--color-surface-active);
  color: var(--color-gold);
}

.caption-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-gold);
}

.caption-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.caption-textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--color-text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  outline: none;
}

.caption-textarea::placeholder {
  color: var(--color-text-dim);
}

.caption-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--color-primary), #a50d25);
  border-radius: var(--radius-sm);
  color: white;
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-btn);
}

.btn-copy:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200,16,46,0.45);
}

.btn-copy.copied {
  background: linear-gradient(135deg, var(--color-success), #16a34a);
  box-shadow: 0 4px 16px rgba(34,197,94,0.3);
  animation: copyPulse 0.3s ease;
}

@keyframes copyPulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.char-count {
  font-size: 11px;
  color: var(--color-text-dim);
}

/* Section Labels */
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.btn-copy-sm {
  padding: 4px 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-gold);
  font-size: 10px;
  font-weight: 600;
  transition: var(--transition-fast);
}

.btn-copy-sm:hover {
  background: rgba(244,185,66,0.1);
  border-color: var(--color-gold);
}

/* Hashtags */
.hashtag-section {
  /* no background — standalone */
}

.hashtag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hashtag-chip {
  padding: 5px 10px;
  background: rgba(200, 16, 46, 0.1);
  border: 1px solid rgba(200, 16, 46, 0.25);
  border-radius: var(--radius-pill);
  font-size: 11px;
  color: #f08090;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.hashtag-chip:hover {
  background: rgba(200, 16, 46, 0.2);
  transform: translateY(-1px);
}

/* CTA */
.cta-link {
  display: block;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--color-gold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.cta-link:hover {
  border-color: var(--color-gold);
  background: rgba(244,185,66,0.06);
}

/* Status Dropdown */
.status-dropdown {
  width: 100%;
  padding: 12px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  appearance: none;
  -webkit-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='%238892A4' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.status-dropdown:hover,
.status-dropdown:focus {
  border-color: var(--color-border-strong);
  outline: none;
  box-shadow: 0 0 0 2px rgba(200,16,46,0.15);
}

.status-dropdown option {
  background: #0D1E36;
  color: var(--color-text);
}

/* Drive Sync Button */
.panel-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-drive-sync {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #4285F4, #1967D2);
  border-radius: var(--radius);
  color: white;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(66,133,244,0.35);
  position: relative;
  overflow: hidden;
}

.btn-drive-sync::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
}

.btn-drive-sync:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(66,133,244,0.45);
}

.btn-drive-sync:active {
  transform: translateY(0);
}

.sync-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  display: none;
  animation: spin 0.8s linear infinite;
}

.btn-drive-sync.syncing .sync-spinner {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.drive-status {
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
  min-height: 18px;
}

.drive-status.success { color: var(--color-success); }
.drive-status.error   { color: var(--color-error); }
.drive-status.info    { color: var(--color-info); }

/* ─── TOAST ──────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 18px;
  background: rgba(15, 28, 50, 0.95);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-glass);
  pointer-events: all;
  animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.fade-out {
  animation: toastOut 0.3s ease forwards;
}

.toast.success { border-color: rgba(34,197,94,0.4); }
.toast.error   { border-color: rgba(239,68,68,0.4); }
.toast.info    { border-color: rgba(59,130,246,0.4); }

@keyframes toastIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(20px); opacity: 0; }
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --side-panel-w: 380px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --side-panel-w: 100vw; }

  .header-inner { padding: 0 16px; height: 60px; }
  .header-nav { display: none; }
  .brand-sub { display: none; }
  .btn-sync-header span:last-child { display: none; }

  .main-wrap { padding: 80px 12px 24px; }

  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px 16px; }
  .stat-value { font-size: 24px; }

  .platform-filter { gap: 8px; }
  .filter-btn { padding: 6px 12px; font-size: 12px; }

  .cal-day { min-height: 72px; padding: 6px; }
  .pill-label { display: none; }
  .post-pill { padding: 3px 5px; justify-content: center; }

  .calendar-header { padding: 14px 16px; }
  .cal-month-title { font-size: 18px; }
}

@media (max-width: 480px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .cal-day { min-height: 56px; }
  .day-num { font-size: 10px; }
}
