/* DSIGNXT Social Hub — Minimalist Luxury Dark Theme */
:root {
  --bg-canvas: #090a0f;
  --bg-surface: #0f121a;
  --bg-surface-elevated: #151a24;
  --bg-subtle: #1b212f;
  --bg-input: #0c0f16;
  
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.18);
  --border-active: rgba(99, 102, 241, 0.5);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: rgba(99, 102, 241, 0.12);
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --accent-glow: 0 0 24px rgba(99, 102, 241, 0.25);
  
  --brand-gradient: linear-gradient(135deg, #f43f5e 0%, #fb7185 50%, #6366f1 100%);
  
  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.12);
  --green-border: rgba(16, 185, 129, 0.25);
  
  --yellow: #f59e0b;
  --yellow-bg: rgba(245, 158, 11, 0.12);
  --yellow-border: rgba(245, 158, 11, 0.25);
  
  --red: #f43f5e;
  --red-bg: rgba(244, 63, 94, 0.12);
  --red-border: rgba(244, 63, 94, 0.25);
  
  --blue: #38bdf8;
  --blue-bg: rgba(56, 189, 248, 0.12);
  --blue-border: rgba(56, 189, 248, 0.25);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 12px 32px -4px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 0 0 1px var(--border-subtle), 0 4px 20px rgba(0, 0, 0, 0.25);
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --sidebar-width: 250px;
}

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

html, body {
  min-height: 100%;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, textarea, select {
  font-family: inherit;
  color: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: #a5b4fc;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--text-secondary);
}

.error-text {
  color: #fb7185;
  font-size: 13px;
  font-weight: 500;
  min-height: 1.4em;
  margin-top: 4px;
}

/* ==========================================================================
   Typography & Utility Badges
   ========================================================================== */
h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.35);
  flex-shrink: 0;
}
.brand-badge.small {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 10px rgba(244, 63, 94, 0.25);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.badge.success {
  background: var(--green-bg);
  color: #34d399;
  border-color: var(--green-border);
}
.badge.success::before { background: #10b981; }

.badge.warning {
  background: var(--yellow-bg);
  color: #fbbf24;
  border-color: var(--yellow-border);
}
.badge.warning::before { background: #f59e0b; }

.badge.error {
  background: var(--red-bg);
  color: #fb7185;
  border-color: var(--red-border);
}
.badge.error::before { background: #f43f5e; }

.badge.info {
  background: var(--blue-bg);
  color: #7dd3fc;
  border-color: var(--blue-border);
}
.badge.info::before { background: #38bdf8; }

.badge.neutral {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}
.badge.neutral::before { background: var(--text-muted); }

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}
.badge-pill.warning {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  position: relative;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: #f59e0b;
  opacity: 0.4;
  animation: pulseGlow 2s infinite ease-in-out;
}
@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.6); opacity: 0; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  white-space: nowrap;
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary, .btn.primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover, .btn.primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.45);
}

.btn-secondary, .btn.secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--border-default);
}
.btn-secondary:hover, .btn.secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border-hover);
  color: #fff;
}

.btn.danger {
  background: var(--red-bg);
  color: #fb7185;
  border-color: var(--red-border);
}
.btn.danger:hover {
  background: rgba(244, 63, 94, 0.2);
  color: #fff;
}

.btn.wide {
  width: 100%;
}

.btn.small {
  padding: 5px 11px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.icon-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-default);
  color: var(--text-primary);
}

/* ==========================================================================
   Custom Segmented Action Selector
   ========================================================================== */
.action-segment-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}
.action-segment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.action-segment-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}
.action-segment-btn.active {
  background: var(--bg-surface-elevated);
  border-color: var(--border-default);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.action-segment-btn.active svg {
  color: var(--accent);
}

/* ==========================================================================
   Custom Luxury Date & Time Picker
   ========================================================================== */
.custom-dt-container {
  position: relative;
  width: 100%;
}
.custom-dt-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 9px 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.custom-dt-trigger:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-elevated);
}
.custom-dt-trigger.open {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.custom-dt-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
}
.custom-dt-icon {
  color: var(--accent);
  flex-shrink: 0;
}
.custom-dt-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  width: 340px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  background: #0f131d;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: dtFadeIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dtFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* Quick Presets */
.dt-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}
.dt-preset-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.dt-preset-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: #fff;
}

/* Calendar Month Header */
.dt-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  width: 100%;
  box-sizing: border-box;
}
.dt-cal-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.dt-nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.dt-nav-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-default);
  color: #fff;
}

/* Calendar Days Grid */
.dt-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}
.dt-weekday {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 0;
  text-align: center;
}
.dt-day {
  width: 100%;
  height: 32px;
  min-width: 0;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-primary);
  transition: all 0.12s ease;
}
.dt-day:hover:not(:disabled):not(.empty) {
  background: var(--bg-surface-elevated);
  border-color: var(--border-default);
}
.dt-day.today {
  border-color: var(--accent);
  color: #a5b4fc;
}
.dt-day.selected {
  background: var(--accent-gradient) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}
.dt-day:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.dt-day.empty {
  cursor: default;
  background: transparent !important;
  border-color: transparent !important;
}

/* Time Selection Row */
.dt-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}
.dt-time-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dt-select {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  appearance: auto;
  background-image: none;
}
.dt-ampm-switch {
  display: flex;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.dt-ampm-btn {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  background: transparent;
  border: 0;
  color: var(--text-secondary);
  cursor: pointer;
}
.dt-ampm-btn.active {
  background: var(--accent);
  color: #fff;
}

.dt-footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 4px;
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   Inputs & Forms
   ========================================================================== */
.stack {
  display: flex;
  flex-direction: column;
}
.gap-md {
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.input-group label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}
.input-wrap input {
  padding-left: 38px;
}
.input-wrap input.has-action-btn {
  padding-right: 40px;
}
.input-action-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  z-index: 2;
}
.input-action-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}
.input-action-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

input, textarea, select {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 9px 13px;
  font-size: 13px;
  outline: none;
  transition: all 0.15s ease;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
  background-color: #0d121c;
}
input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}
textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}
select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
select option {
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.full {
  grid-column: 1 / -1;
}
.field-note {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}

/* ==========================================================================
   Login Screen
   ========================================================================== */
.login-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background-color: var(--bg-canvas);
  overflow: hidden;
}
.login-bg-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(244, 63, 94, 0.08) 45%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  animation: floatGlow 10s ease-in-out infinite alternate;
}
@keyframes floatGlow {
  0% { transform: translate(-40px, -40px) scale(0.9); }
  100% { transform: translate(40px, 40px) scale(1.1); }
}

.login-card {
  position: relative;
  width: min(420px, 100%);
  padding: 36px 32px;
  border-radius: var(--radius-xl);
  background: rgba(15, 18, 26, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 24px;
  z-index: 2;
}
.login-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.login-header h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.login-header h1 span {
  font-weight: 500;
  color: var(--text-secondary);
}
.login-header p {
  font-size: 12px;
  margin-top: 2px;
}
.login-footer {
  text-align: center;
  padding-top: 4px;
}
.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================================================
   Application Shell & Sidebar
   ========================================================================== */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  background-color: var(--bg-canvas);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 30;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
  padding: 20px 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-text strong {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
}
.brand-text span {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.mobile-close-btn {
  display: none;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-scroll::-webkit-scrollbar {
  width: 4px;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 12px 10px 6px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.nav-item:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--bg-surface-elevated);
  color: #fff;
  border-color: var(--border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
}
.nav-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  color: var(--accent);
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 18, 26, 0.5);
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.user-info strong {
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.user-info small {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Main Content & Topbar
   ========================================================================== */
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(9, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.mobile-menu-btn {
  display: none;
}
.header-titles h2 {
  font-size: 18px;
  font-weight: 700;
}
.header-titles p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.content-wrapper {
  flex: 1;
  padding: 28px 32px 48px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

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

/* ==========================================================================
   Cards & Grids
   ========================================================================== */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease;
}
.card:hover {
  border-color: var(--border-default);
}

.grid {
  display: grid;
  gap: 16px;
}
.grid.cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* Stat Cards */
.stat-card {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-default);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.stat-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  display: grid;
  place-items: center;
  color: var(--text-muted);
}
.stat-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 10px 0 4px;
}
.stat-note {
  font-size: 11px;
  color: var(--text-muted);
}

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

.empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}
.table-wrap::-webkit-scrollbar {
  height: 6px;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 4px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.table th {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.table code {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* ==========================================================================
   Platform Badges & Logos
   ========================================================================== */
.platform {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  text-transform: capitalize;
}
.platform-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.platform-dot.instagram { background: #e1306c; }
.platform-dot.facebook { background: #1877f2; }
.platform-dot.x { background: #f8fafc; }
.platform-dot.linkedin { background: #0a66c2; }
.platform-dot.youtube { background: #ff0000; }

/* ==========================================================================
   Clients & Accounts Grid
   ========================================================================== */
.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.client-card {
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.client-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}
.client-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.avatar-square {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--bg-surface-elevated) 0%, var(--bg-subtle) 100%);
  border: 1px solid var(--border-default);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
}

/* ==========================================================================
   Composer Layout & Live Preview
   ========================================================================== */
.composer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(370px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.composer-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.preview-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}

.field-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field-item.full, .form-grid .full {
  grid-column: 1 / -1;
}

.label-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 20px;
  width: 100%;
}

.label-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.field-note {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.empty-box {
  padding: 24px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.015);
  border: 1.5px dashed var(--border-default);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}
.empty-box:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-elevated);
}
.empty-box-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.account-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  width: 100%;
}
.account-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-input);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  position: relative;
}
.account-option:hover {
  border-color: var(--accent);
  background: var(--bg-surface-elevated);
  transform: translateY(-1px);
}
.account-option.active, .account-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 0 1px var(--accent), 0 2px 8px rgba(99, 102, 241, 0.15);
}
.account-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.account-option-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.account-option-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}
.account-option-meta {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropzone {
  border: 1.5px dashed var(--border-default);
  background: rgba(255, 255, 255, 0.015);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.dropzone:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.media-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-top: 12px;
  padding-bottom: 4px;
}
.media-thumb {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  object-fit: cover;
  background: var(--bg-subtle);
}
.media-remove {
  position: absolute;
  right: -6px;
  top: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #ef4444;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease;
}
.media-remove:hover {
  transform: scale(1.1);
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  margin-top: 6px;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}
.composer-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Live Social Preview Frame */
.preview-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.preview-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.preview-tab:hover {
  border-color: var(--border-default);
  color: var(--text-primary);
}
.preview-tab.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.social-preview-card {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #090b10;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
}

.preview-card-head {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
}
.preview-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.preview-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #f43f5e);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}
.preview-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.preview-username-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.preview-username {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-subtext {
  font-size: 11px;
  color: var(--text-muted);
}

.preview-media-box {
  width: 100%;
  background: #06070a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}
.preview-media-box.has-media {
  max-height: 300px;
  aspect-ratio: 16 / 10;
}
.preview-media-box.has-media img,
.preview-media-box.has-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-media-box.empty {
  padding: 28px 20px;
}
.preview-media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  text-align: center;
}

.preview-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.preview-actions-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.preview-action-icon {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}
.preview-action-icon:hover {
  color: #fff;
}

.preview-body {
  padding: 14px 16px;
  background: #090b10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.preview-caption-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}
.preview-caption-text .caption-author {
  font-weight: 700;
  color: #fff;
  margin-right: 6px;
}
.preview-caption-text .hashtag {
  color: #818cf8;
  font-weight: 500;
}
.preview-meta-footer {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 11, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-card {
  width: min(640px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalScale { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-head h3 {
  font-size: 16px;
  font-weight: 700;
}
#modal-body {
  padding: 22px 24px;
  flex: 1;
  overflow-y: auto;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
}

.review-target {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.review-target:last-child {
  border-bottom: 0;
}

/* ==========================================================================
   List & Calendar
   ========================================================================== */
.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.list-item {
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
}
.list-item:hover {
  border-color: var(--border-default);
  background: var(--bg-surface-elevated);
}

.calendar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.calendar-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
  transition: all 0.15s ease;
}
.calendar-item:hover {
  border-color: var(--border-default);
  transform: translateX(2px);
}
.calendar-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   Toasts
   ========================================================================== */
#toast-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  min-width: 280px;
  max-width: 440px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--accent);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  animation: toastIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.success {
  border-left-color: var(--green);
}
.toast.error {
  border-left-color: var(--red);
}
@keyframes toastIn {
  from { transform: translateY(12px) scale(0.96); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1080px) {
  .grid.cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .composer-layout {
    grid-template-columns: 1fr;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .content-wrapper {
    padding: 20px 24px 36px;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 25;
  }
  .mobile-menu-btn, .mobile-close-btn {
    display: inline-flex;
  }
  .topbar {
    padding: 14px 20px;
  }
  .content-wrapper {
    padding: 16px 16px 32px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .three-col {
    grid-template-columns: 1fr;
  }
  .calendar-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 540px) {
  .grid.cards {
    grid-template-columns: 1fr;
  }
  .topbar-left .header-titles p {
    display: none;
  }
  .badge-pill span:not(.pulse-dot) {
    display: none;
  }
  .login-card {
    padding: 24px 20px;
  }
  .action-segment-group {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Brand Cards Hub & Multi-Account Workspace Styles
   ========================================================================== */
.brand-hub-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.brand-stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.brand-stat-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.brand-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  display: grid;
  place-items: center;
  color: var(--accent);
}

.brand-stat-val {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.brand-stat-lbl {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.brand-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
}

.brand-search-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.brand-search-wrap input {
  width: 100%;
  padding-left: 36px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  height: 38px;
  font-size: 13px;
}

.brand-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.brand-platform-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.platform-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.platform-filter-chip:hover {
  background: var(--bg-surface-elevated);
  color: #fff;
  border-color: var(--border-hover);
}

.platform-filter-chip.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: #fff;
}

/* Brand Cards Grid */
.brand-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.brand-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.brand-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.brand-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.5), 0 0 24px rgba(99, 102, 241, 0.15);
}

.brand-card:hover::before {
  opacity: 1;
}

.brand-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.brand-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  flex-shrink: 0;
}

.brand-meta {
  flex: 1;
  min-width: 0;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-id-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-input);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* Connected Social Accounts Box in Brand Card */
.brand-accounts-section {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.brand-accounts-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.brand-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand-account-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.brand-account-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-account-name {
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-account-handle {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.account-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  flex-shrink: 0;
}

.account-status-dot.needs-auth {
  background: var(--yellow);
  box-shadow: 0 0 6px var(--yellow);
}

.no-accounts-msg {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 10px;
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-sm);
}

/* Brand Card Metrics Row */
.brand-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  padding: 8px;
  border: 1px solid var(--border-subtle);
}

.brand-metric-val {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.brand-metric-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

/* Brand Card Actions */
.brand-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.brand-card-actions .btn {
  flex: 1;
}

.brand-card-actions .icon-btn {
  flex-shrink: 0;
}

/* Add Brand Workspace Card */
.add-brand-card {
  background: rgba(15, 18, 26, 0.5);
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-xl);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 280px;
  text-align: center;
}

.add-brand-card:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.05);
  transform: translateY(-2px);
}

.add-brand-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  display: grid;
  place-items: center;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.add-brand-card:hover .add-brand-icon-wrap {
  transform: scale(1.1);
  background: var(--accent);
  color: #fff;
}

/* Brand Context Bar in Topbar */
.brand-context-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  padding: 4px 12px 4px 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.brand-context-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}

.brand-context-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
}

.brand-context-switch:hover {
  text-decoration: underline;
}

/* Workspace Hero Banner inside Selected Brand Views */
.workspace-hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(15, 18, 26, 0.95) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-xl);
  padding: 18px 24px;
  margin-bottom: 24px;
}

.workspace-hero-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.workspace-hero-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.workspace-hero-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.workspace-hero-accounts {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.workspace-account-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
}
