/* ==========================================================================
   Braidwords - Editorial Design System & Modern Responsive Stylesheet
   ========================================================================== */

:root {
  /* Dark Mode Palette (Default) */
  --bg-primary: #0a0e17;
  --bg-secondary: #111726;
  --bg-card: rgba(18, 25, 40, 0.75);
  --bg-card-hover: rgba(26, 36, 58, 0.9);
  --bg-glass: rgba(10, 14, 23, 0.85);
  --bg-modal: #0d121d;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.22);
  --border-accent: rgba(255, 71, 87, 0.35);
  
  --accent-primary: #ff4757;
  --accent-primary-hover: #ff6b81;
  --accent-gradient: linear-gradient(135deg, #ff4757, #ff6348, #e056fd);
  --accent-instagram: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  --accent-glow: rgba(255, 71, 87, 0.25);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Plus Jakarta Sans', var(--font-sans);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 10px 30px rgba(255, 71, 87, 0.2);
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1200px;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-modal: #ffffff;
  
  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-hover: rgba(0, 0, 0, 0.18);
  --border-accent: rgba(255, 71, 87, 0.25);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 10px 25px rgba(255, 71, 87, 0.15);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 2rem);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --------------------------------------------------------------------------
   READING PROGRESS BAR
   -------------------------------------------------------------------------- */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  width: 0%;
  background: var(--accent-gradient);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* --------------------------------------------------------------------------
   HEADER & BRAND
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

.brand-badge {
  width: 38px;
  height: 38px;
  background: var(--accent-gradient);
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
}

.brand-badge-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.brand-braid-svg {
  display: block;
  border-radius: var(--radius-md);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand:hover .brand-badge-wrap {
  transform: scale(1.08);
  box-shadow: 0 0 26px rgba(255, 71, 87, 0.55);
}

.brand-badge-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-glow);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  flex-shrink: 0;
  display: block;
}

.brand:hover .brand-badge-img {
  transform: scale(1.06);
  box-shadow: 0 0 24px rgba(255, 71, 87, 0.5);
}

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

.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.search-bar {
  flex: 1;
  max-width: 440px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.55rem 2.2rem 0.55rem 2.4rem;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: var(--font-sans);
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-clear {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
}

.social-header-btn:hover {
  background: var(--accent-instagram);
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
}

.icon-btn {
  width: 38px;
  height: 38px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.05rem;
  transition: var(--transition);
}

.icon-btn:hover {
  border-color: var(--border-color-hover);
  background: var(--bg-card-hover);
  transform: scale(1.05);
}

/* --------------------------------------------------------------------------
   MAIN LAYOUT & CATEGORIES
   -------------------------------------------------------------------------- */
.main-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

.categories-section {
  margin-bottom: 2rem;
}

.categories-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.categories-bar::-webkit-scrollbar {
  display: none;
}

.category-pill {
  white-space: nowrap;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.category-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-color-hover);
  background: var(--bg-card-hover);
}

.category-pill.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

/* --------------------------------------------------------------------------
   HERO FEATURED STORY
   -------------------------------------------------------------------------- */
.hero-story {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 3.5rem;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.hero-story:hover {
  border-color: var(--border-color-hover);
}

.hero-image-wrapper {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-story:hover .hero-bg {
  transform: scale(1.03);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 23, 0.95) 0%, rgba(10, 14, 23, 0.6) 50%, rgba(10, 14, 23, 0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem;
  max-width: 800px;
}

.hero-badge-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-accent {
  background: var(--accent-gradient);
  color: #fff;
}

.hero-reading-time {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
}

.hero-summary {
  font-size: clamp(0.92rem, 1.5vw, 1.05rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  max-width: 650px;
}

.hero-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.author-snippet {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.author-details {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
}

.publish-date {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.65);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-primary {
  background: #ffffff;
  color: #0f172a;
}

.btn-primary:hover {
  background: var(--accent-primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* --------------------------------------------------------------------------
   SECTION HEADINGS & ARTICLE GRID
   -------------------------------------------------------------------------- */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.post-count-badge {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

/* --------------------------------------------------------------------------
   ARTICLE CARDS (INSTAGRAM AESTHETIC)
   -------------------------------------------------------------------------- */
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-secondary);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .card-img {
  transform: scale(1.05);
}

.card-category-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: rgba(10, 14, 23, 0.75);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.card-read-pill {
  position: absolute;
  bottom: 0.85rem;
  right: 0.85rem;
  background: rgba(10, 14, 23, 0.75);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}

.card-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.card-author-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-avatar {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
}

.card-likes {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   READER MODAL WINDOW (OPTIMIZED FOR MOBILE & DESKTOP)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
  padding: env(safe-area-inset-top, 1rem) 1rem env(safe-area-inset-bottom, 1rem);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 820px;
  margin: auto;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  animation: modalSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-glass);
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-back-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-back-btn:hover {
  background: var(--bg-secondary);
}

.modal-top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.action-btn:hover {
  border-color: var(--border-color-hover);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.modal-header-media {
  position: relative;
  width: 100%;
  max-height: 380px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.modal-header-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-body {
  padding: 2.25rem 2.5rem;
}

.modal-category-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.modal-read-time {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.modal-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.like-btn:hover {
  border-color: var(--accent-primary);
  background: rgba(255, 71, 87, 0.1);
  color: var(--accent-primary);
}

.like-btn.liked {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.heart-icon {
  fill: currentColor;
  transition: transform 0.2s ease;
}

.like-btn:active .heart-icon {
  transform: scale(1.3);
}

/* --------------------------------------------------------------------------
   EDITORIAL ARTICLE TYPOGRAPHY & MARKDOWN RENDERING
   -------------------------------------------------------------------------- */
.article-text {
  font-size: 1.06rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.article-text p {
  margin-bottom: 1.5rem;
}

.article-text h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.article-text h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2rem 0 0.85rem;
  color: var(--text-primary);
}

.article-text img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 1.75rem 0 0.5rem;
  box-shadow: var(--shadow-md);
  display: block;
}

.article-text blockquote {
  border-left: 4px solid var(--accent-primary);
  padding: 0.85rem 1.4rem;
  margin: 1.75rem 0;
  background: var(--bg-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-text ul, .article-text ol {
  margin: 1rem 0 1.5rem 1.75rem;
}

.article-text li {
  margin-bottom: 0.5rem;
}

.article-text a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--transition);
}

.article-text a:hover {
  color: var(--accent-primary-hover);
}

/* --------------------------------------------------------------------------
   SOCIAL SHARING SUITE (INSTAGRAM / STORIES / WHATSAPP)
   -------------------------------------------------------------------------- */
.story-share-card {
  margin-top: 3rem;
  padding: 1.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.share-card-header h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.share-card-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.share-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.share-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.share-native {
  background: var(--accent-instagram);
  color: #ffffff;
}

.share-native:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 39, 67, 0.35);
}

.share-copy {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.share-copy:hover {
  border-color: var(--border-color-hover);
  background: var(--bg-card-hover);
}

.share-wa {
  background: #25D366;
  color: #ffffff;
}

.share-wa:hover {
  background: #20BA5A;
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 3rem 1.5rem;
  background: var(--bg-secondary);
  margin-top: 4rem;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-brand h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
}

.footer-brand p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   TOAST NOTIFICATION
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color-hover);
  color: var(--text-primary);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 600;
  animation: toastFadeIn 0.3s ease;
}

@keyframes toastFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   MOBILE & RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .header {
    padding: 0.75rem 1rem;
  }
  
  .brand-tagline {
    display: none;
  }
  
  .social-label {
    display: none;
  }
  
  .main-layout {
    padding: 1rem 1rem 2.5rem;
  }
  
  .hero-story {
    min-height: 360px;
    margin-bottom: 2.5rem;
  }
  
  .hero-content {
    padding: 1.5rem;
  }
  
  .modal-overlay {
    padding: 0;
  }
  
  .modal-container {
    border-radius: 0;
    min-height: 100vh;
    border: none;
  }
  
  .modal-body {
    padding: 1.5rem 1.25rem 3rem;
  }
  
  .modal-title {
    font-size: 1.6rem;
  }
  
  .article-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* --------------------------------------------------------------------------
   EDITORIAL STUDIO & ADMIN WORKSPACE (admin.braidwords.com)
   -------------------------------------------------------------------------- */
.admin-navbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.admin-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
}

.admin-tab-btn.active {
  color: #fff;
  background: var(--accent-gradient);
  box-shadow: var(--shadow-glow);
  border-color: transparent;
}

.admin-hero {
  background: linear-gradient(135deg, rgba(255, 71, 87, 0.1) 0%, rgba(224, 86, 253, 0.05) 50%, rgba(17, 23, 38, 0.9) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.admin-hero::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.admin-hero-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.admin-hero-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.admin-stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

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

.admin-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.admin-stat-number {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-heading);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.admin-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   STUDIO COMPOSER & EDITORIAL WORKSPACE (EXPANSIVE & RESPONSIVE)
   ========================================================================== */

/* Top Integrated Horizontal Navigation & Action Bar */
.composer-top-menubar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.85rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.menubar-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.composer-stats-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.stat-sep {
  opacity: 0.4;
}

.btn-save-draft {
  border-color: rgba(255, 165, 2, 0.4) !important;
  color: #ffa502 !important;
}

.btn-save-draft:hover {
  background: rgba(255, 165, 2, 0.1) !important;
  border-color: #ffa502 !important;
}

.btn-publish-story {
  background: var(--accent-gradient) !important;
  color: #fff !important;
  box-shadow: var(--shadow-glow);
  font-weight: 700;
}

.btn-publish-story:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 35px rgba(255, 71, 87, 0.35);
}

/* 2-Column Split Workspace: Canvas (Left) + Inspector (Right) */
.composer-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 1.25rem;
  align-items: start;
}

.composer-workspace-grid.inspector-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.composer-workspace-grid.inspector-hidden .composer-inspector-sidebar {
  display: none;
}

@media (max-width: 1024px) {
  .composer-workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Right Column: Story Inspector Sidebar */
.composer-inspector-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 80px;
}

.inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.25rem;
}

.inspector-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.inspector-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.inspector-card-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Inspector Cover Photo Preview */
.inspector-cover-empty {
  padding: 0.25rem 0;
}

.inspector-cover-preview {
  position: relative;
  width: 100%;
  height: 140px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.inspector-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.inspector-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 60%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.5rem;
}

.inspector-cover-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Inspector Form Fields */
.inspector-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.inspector-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.inspector-input, .inspector-select, .inspector-textarea {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: var(--font-sans);
  outline: none;
  transition: var(--transition);
  width: 100%;
}

.inspector-input:focus, .inspector-select:focus, .inspector-textarea:focus {
  border-color: var(--accent-primary);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 0 2px rgba(255, 71, 87, 0.15);
}

.inspector-select {
  cursor: pointer;
}

.inspector-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.inspector-textarea {
  resize: vertical;
  min-height: 60px;
}

/* Category Quick Selector Chips */
.composer-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
}

.cat-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.cat-chip:hover {
  border-color: var(--accent-primary);
  color: #fff;
  background: rgba(255, 71, 87, 0.1);
}

.cat-chip.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

.composer-summary-textarea {
  font-size: 0.84rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 54px;
}

/* Full-Width Expansive Canvas */
.composer-main-canvas {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

@media (max-width: 768px) {
  .composer-main-canvas {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
  }
}

.composer-title-input {
  width: 100%;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
  margin-bottom: 0.5rem;
  outline: none;
  transition: var(--transition);
  line-height: 1.25;
}

.composer-title-input:focus {
  border-color: var(--accent-primary);
}

.composer-slug-preview {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: monospace;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  word-break: break-all;
}

/* Toolbar */
.composer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 0.5rem 0.75rem;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.toolbar-sep {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: var(--border-color);
  margin: 0 0.35rem;
}

.composer-tool-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.composer-tool-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-color);
}

.composer-tool-btn.active-mode {
  color: #2ed573;
  background: rgba(46, 213, 115, 0.1);
  border-color: rgba(46, 213, 115, 0.25);
}

/* Deep Split Editor & Preview Container */
.composer-editor-pane {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  height: calc(100vh - 280px);
  min-height: 650px;
  overflow: hidden;
  transition: all 0.25s ease;
  background: rgba(0, 0, 0, 0.15);
}

.composer-editor-pane.editor-only {
  grid-template-columns: 1fr;
}

.composer-editor-pane.editor-only .composer-textarea {
  border-right: none;
}

.composer-editor-pane.editor-only .composer-preview-pane {
  display: none;
}

.composer-editor-pane.preview-only {
  grid-template-columns: 1fr;
}

.composer-editor-pane.preview-only .composer-textarea {
  display: none;
}

.composer-editor-pane.preview-only .composer-preview-pane {
  display: block;
  height: 100%;
}

@media (max-width: 992px) {
  .composer-editor-pane {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 520px;
  }
  
  .composer-editor-pane .composer-textarea {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    min-height: 380px;
  }
}

.composer-textarea {
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: transparent;
  color: var(--text-primary);
  border: none;
  border-right: 1px solid var(--border-color);
  padding: 1.5rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  line-height: 1.75;
  resize: none;
  outline: none;
  overflow-y: auto;
}

.composer-textarea:focus {
  background: rgba(0, 0, 0, 0.2);
}

.composer-preview-pane {
  background: rgba(0, 0, 0, 0.05);
  padding: 1.5rem 2rem;
  overflow-y: auto;
  height: 100%;
  max-height: 100%;
}

/* Grid & Table Story Cards */
.story-card-admin {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.story-card-admin:hover {
  transform: translateY(-4px);
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-md);
}

.story-card-thumb {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: var(--bg-secondary);
}

.story-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.story-card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0.5rem 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-card-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.story-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
  gap: 0.5rem;
}

/* Media Vault Modal */
.vault-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  max-height: 420px;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.vault-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-secondary);
  position: relative;
}

.vault-item:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.vault-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

.vault-item-name {
  font-size: 0.72rem;
  padding: 0.4rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.vault-item-actions {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 0.5rem;
}

.vault-item:hover .vault-item-actions {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   INSTAGRAM STORY GENERATOR & SHARE MODAL (9:16 PREVIEW)
   -------------------------------------------------------------------------- */
.ig-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ig-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.ig-modal-dialog {
  background: var(--bg-modal);
  border: 1px solid var(--border-color-hover);
  border-radius: var(--radius-lg);
  max-width: 860px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(225, 48, 108, 0.25);
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ig-modal-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-glass);
}

.ig-modal-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ig-badge-gradient {
  background: var(--accent-instagram);
  color: #fff;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ig-modal-body {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.75rem;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .ig-modal-body {
    grid-template-columns: 1fr;
  }
}

.ig-card-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.ig-canvas-preview {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: #000;
  display: block;
}

.ig-options-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ig-quote-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.ig-quote-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.65rem 0.85rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 70px;
  margin-top: 0.5rem;
}

.ig-share-btn-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: auto;
}

.btn-instagram-gradient {
  background: var(--accent-instagram);
  color: #fff;
  border: none;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(225, 48, 108, 0.35);
  transition: var(--transition);
}

.btn-instagram-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(225, 48, 108, 0.5);
}

/* --------------------------------------------------------------------------
   DRAFT-FIRST CONFIRMATION MODAL
   -------------------------------------------------------------------------- */
.draft-confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.draft-confirm-modal.active {
  opacity: 1;
  visibility: visible;
}

.draft-confirm-box {
  background: var(--bg-modal);
  border: 1px solid var(--border-color-hover);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.draft-confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 165, 2, 0.15);
  color: #ffa502;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

/* --------------------------------------------------------------------------
   DEDICATED MEDIA VAULT WORKSPACE & ASSET CARDS
   -------------------------------------------------------------------------- */
.vault-upload-banner {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
  margin-bottom: 2rem;
  cursor: pointer;
}

.vault-upload-banner:hover,
.vault-upload-banner.dragover {
  border-color: var(--accent-primary);
  background: rgba(255, 71, 87, 0.08);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.vault-workspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.vault-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.vault-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-md);
}

.vault-card-thumb-wrap {
  width: 100%;
  height: 160px;
  background: var(--bg-secondary);
  overflow: hidden;
  position: relative;
}

.vault-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.vault-card:hover .vault-card-thumb {
  transform: scale(1.04);
}

.vault-card-info {
  padding: 1rem;
  flex: 1;
}

.vault-card-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.vault-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
}

.vault-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
  gap: 0.4rem;
}

.composer-stats-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.toolbar-sep {
  width: 1px;
  height: 18px;
  background: var(--border-color);
  margin: 0 0.35rem;
}

/* --------------------------------------------------------------------------
   SVG ICON UTILITIES
   -------------------------------------------------------------------------- */
.icon-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

/* Responsive adjustments */
@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .search-bar {
    order: 3;
    width: 100%;
  }

  .admin-navbar {
    overflow-x: auto;
    width: 100%;
    padding-bottom: 0.25rem;
  }
}
