/* Mommy - Premium Social Manager */
/* Theme: Glassmorphism / Motion / Premium */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

:root {
  /* Premium Palette */
  --primary: #6366f1;
  --primary-rgb: 99, 102, 241;
  --primary-dark: #4f46e5;
  --secondary: #ec4899;
  --secondary-rgb: 236, 72, 153;
  --accent: #8b5cf6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;

  /* Glass/Surface Colors */
  --bg-app: #0f172a;
  --glass-surface: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.05);

  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-light: #ffffff;

  /* Effects */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

  --backdrop-blur: 12px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Animated Background Mesh */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15) 0%, transparent 25%),
    radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 40%);
  z-index: -1;
  pointer-events: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: -0.025em;
}

button,
input,
select,
textarea {
  font-family: var(--font-body);
}

/* Utilities */
.hidden {
  display: none !important;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--glass-surface);
  backdrop-filter: blur(var(--backdrop-blur));
  -webkit-backdrop-filter: blur(var(--backdrop-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
}

.glass-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: var(--glass-highlight);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes drift {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

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

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.animate-enter {
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade {
  animation: fadeIn 0.3s ease-out forwards;
}

.animate-scale {
  animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Login Page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 440px;
  padding: 40px;
  text-align: center;
}

.logo-large {
  font-size: 3rem;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

/* Forms */
.form-group {
  margin-bottom: 24px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 8px;
  font-family: var(--font-display);
}

.btn:active {
  transform: scale(0.96);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.5);
}

/* Status Badges */
.status-published {
  color: var(--success);
  font-weight: bold;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.status-approved {
  color: var(--primary);
  font-weight: bold;
}

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

.status-rejected {
  color: var(--danger);
}

.score-badge.high-risk {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-warning {
  background: var(--warning);
  color: black;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Navigation */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: 999px;
  /* Pill shape */
  border: 1px solid var(--glass-border);
}

.nav-link {
  padding: 8px 24px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  border-radius: 999px;
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Layout */
.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
  /* Default page entry animation */
  animation: fadeIn 0.4s ease-out;
}

.page-header {
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-secondary);
}

/* Hero Section (New) */
.hero-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.hero-card {
  padding: 40px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-bg-glow {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.hero-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 1.1rem;
  margin: 24px 0;
  width: 100%;
}

.magic-btn-container {
  display: flex;
  gap: 16px;
}

.magic-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  position: relative;
  overflow: hidden;
}

.magic-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 3s infinite;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  padding: 24px;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: var(--font-display);
  background: linear-gradient(to bottom right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Filters */
.filters-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(30, 41, 59, 0.4);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

/* Drafts Grid (Replaces Table) */
.drafts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.draft-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
}

.draft-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.draft-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 4px;
}

.draft-status {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
  letter-spacing: 0.05em;
}

.status-draft {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.1);
}

.status-approved {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.status-rejected {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.status-published {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}

.status-failed {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.draft-body {
  flex: 1;
}

.draft-pillar {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.draft-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
  color: var(--text-light);
}

.draft-footer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}

.scores {
  display: flex;
  gap: 8px;
}

.score-badge {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
}

.score-badge.high-risk {
  color: var(--danger);
  font-weight: 700;
}

/* Calendar View */
.calendar-view {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  gap: 1px;
  background: var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cal-header {
  padding: 16px;
  text-align: center;
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-secondary);
  font-weight: 600;
}

.cal-time {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.4);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.cal-cell {
  background: rgba(30, 41, 59, 0.3);
  min-height: 140px;
  padding: 8px;
  transition: background 0.2s;
}

.cal-cell:hover {
  background: rgba(30, 41, 59, 0.5);
}

.cal-item {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  padding: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  height: 100%;
}

.cal-item:hover {
  background: rgba(99, 102, 241, 0.2);
  transform: scale(1.02);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

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

.modal-content {
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

/* Notification / Toast */
.toast-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  padding: 16px 24px;
  border-radius: var(--radius-md);
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  animation: bg-slideIn 0.4s ease-out;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--danger);
}

.toast-info {
  border-left: 4px solid var(--info);
}

@keyframes bg-slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Mobile Preview Frame */
.mobile-frame {
  margin: 0 auto;
  border: 8px solid #333;
  border-radius: 32px;
  overflow: hidden;
  width: 375px;
  height: 667px;
  background: #fff;
  color: #000;
  /* Reset text color for preview */
  box-shadow: var(--shadow-xl);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .navbar {
    padding: 16px;
    flex-direction: column;
    gap: 16px;
  }

  .cal-cell {
    min-height: 100px;
    font-size: 0.7rem;
  }
}