/* ============================================================
   MY INVA — Comprehensive Design System (HTML & CSS Only)
   Canva-Inspired Styling & Layout Architecture
   ============================================================ */

:root {
  /* Canva-Inspired Palette */
  --brand-purple: #7d2ae8;
  --brand-purple-hover: #6a1fd1;
  --brand-purple-light: #f3ebfc;
  --brand-cyan: #00c4cc;
  --brand-gradient: linear-gradient(135deg, #7d2ae8 0%, #00c4cc 100%);
  --brand-gradient-warm: linear-gradient(135deg, #ff5e62 0%, #ff9966 100%);
  --brand-gradient-gold: linear-gradient(135deg, #d4af37 0%, #edc967 100%);

  /* Neutrals */
  --bg-body: #f7f8fa;
  --bg-surface: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-dark: #0f141c;
  --bg-dark-card: #1a222d;

  --text-main: #0e1318;
  --text-muted: #5e6875;
  --text-light: #8e9ba8;
  
  --border-color: #e2e6eb;
  --border-focus: #7d2ae8;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(14, 19, 24, 0.05);
  --shadow-sm: 0 2px 6px rgba(14, 19, 24, 0.06);
  --shadow-md: 0 6px 16px rgba(14, 19, 24, 0.08);
  --shadow-lg: 0 16px 36px rgba(14, 19, 24, 0.12);
  --shadow-glow: 0 0 20px rgba(125, 42, 232, 0.25);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-royal: 'Cinzel', serif, Georgia;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ============================================================
   GLOBAL NAVIGATION (Canva Style)
   ============================================================ */
.navbar {
  height: 64px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-xs);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 10px;
  background: var(--brand-purple-light);
  color: var(--brand-purple);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-menu a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--brand-purple);
  background: var(--brand-purple-light);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}

.btn-primary {
  background: var(--brand-purple);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--brand-purple-hover);
  box-shadow: 0 4px 12px rgba(125, 42, 232, 0.3);
}

.btn-gradient {
  background: var(--brand-gradient);
  color: #ffffff;
  border: none;
}

.btn-gradient:hover {
  opacity: 0.95;
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: #f1f3f5;
}

.btn-danger {
  background: #ff4d4f;
  color: #fff;
}
.btn-danger:hover {
  background: #d9363e;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

/* User Pill & Role Badges */
.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-purple);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.role-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.role-user { background: #e6f7ff; color: #1890ff; }
.role-creator { background: #f6ffed; color: #52c41a; }
.role-admin { background: #fff0f6; color: #eb2f96; }

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}
.status-active { background: #e6f7ff; color: #1890ff; }
.status-approved { background: #f6ffed; color: #52c41a; }
.status-pending { background: #fffbe6; color: #faad14; }
.status-rejected { background: #fff1f0; color: #f5222d; }
.status-expired { background: #f5f5f5; color: #8c8c8c; }

/* ============================================================
   HERO & LANDING PAGE COMPONENTS
   ============================================================ */
.hero {
  padding: 60px 24px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-purple-light);
  color: var(--brand-purple);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--text-main);
  margin-bottom: 16px;
  line-height: 1.15;
}

.hero-title span {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 32px auto;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

/* Category Filter Bar */
.category-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 4px 20px 4px;
  scrollbar-width: none;
}
.category-bar::-webkit-scrollbar { display: none; }

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.category-chip:hover, .category-chip.active {
  background: var(--brand-purple);
  color: #ffffff;
  border-color: var(--brand-purple);
  box-shadow: 0 4px 12px rgba(125, 42, 232, 0.25);
}

/* Template Grid & Cards */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.template-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.template-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-purple);
}

.template-thumb {
  position: relative;
  height: 320px;
  background: #f0f2f5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.template-card:hover .template-thumb img {
  transform: scale(1.03);
}

.template-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-free {
  background: rgba(255, 255, 255, 0.9);
  color: #1a8917;
  backdrop-filter: blur(4px);
}

.badge-pro {
  background: var(--brand-gradient-warm);
  color: #fff;
}

.template-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 19, 24, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.template-card:hover .template-overlay {
  opacity: 1;
}

.template-info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.template-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.template-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: auto;
}

/* ============================================================
   CANVA-STYLE DESIGN STUDIO EDITOR LAYOUT
   ============================================================ */
.editor-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: #ebedf0;
}

.editor-topbar {
  height: 56px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 100;
}

.title-input {
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  width: 280px;
}
.title-input:hover { border-color: var(--border-color); }
.title-input:focus { outline: none; border-color: var(--brand-purple); }

.editor-workspace {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.editor-sidebar {
  width: 440px;
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: #fafbfc;
}

.sidebar-tab {
  flex: 1;
  padding: 12px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.sidebar-tab:hover { color: var(--brand-purple); }
.sidebar-tab.active {
  color: var(--brand-purple);
  border-bottom-color: var(--brand-purple);
  background: #ffffff;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.editor-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background: #eaedf0;
}

.stage-toolbar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

.device-switcher {
  display: flex;
  gap: 4px;
  background: var(--bg-body);
  padding: 3px;
  border-radius: var(--radius-sm);
}

.device-btn {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
}
.device-btn.active {
  background: #ffffff;
  color: var(--brand-purple);
  box-shadow: var(--shadow-xs);
}

.stage-canvas-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow: auto;
}

.stage-canvas-frame {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  max-width: 500px;
  width: 100%;
}

.stage-canvas-frame.mobile-view {
  max-width: 380px;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(125, 42, 232, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 70px;
}

/* ============================================================
   DASHBOARDS & ANALYTICS
   ============================================================ */
.dashboard-container {
  max-width: 1280px;
  margin: 32px auto;
  padding: 0 24px;
}

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

.stat-card {
  background: #ffffff;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.stat-change {
  font-size: 12px;
  font-weight: 600;
  color: #10b981;
  margin-top: 8px;
}

/* Tables */
.table-container {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.table-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.inva-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.inva-table th {
  padding: 12px 24px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  background: #fafbfc;
  border-bottom: 1px solid var(--border-color);
}

.inva-table td {
  padding: 16px 24px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

.inva-table tr:hover td {
  background: #fafbfc;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 19, 24, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
  padding: 28px;
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-box {
  transform: translateY(0);
}

/* ============================================================
   INVITATION CARD SAMPLE STYLES (Royal, Sage, Neon)
   ============================================================ */
.sample-royal-card {
  background: linear-gradient(135deg, #4a000e 0%, #290008 100%);
  color: #fce8a6;
  font-family: var(--font-royal);
  padding: 40px 30px;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  text-align: center;
  border: 2px solid #dfb76c;
}
.sample-royal-card .card-border { border: 1px dashed rgba(223, 183, 108, 0.6); padding: 24px; border-radius: 12px; }
.sample-royal-card .card-motif { font-size: 20px; color: #dfb76c; margin-bottom: 10px; }
.sample-royal-card .card-blessing { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: #dfb76c; margin-bottom: 16px; }
.sample-royal-card .card-couple { font-size: 34px; font-family: var(--font-serif); color: #fff5d6; font-weight: 700; margin-bottom: 12px; line-height: 1.2; text-shadow: 0 2px 4px rgba(0,0,0,0.6); }
.sample-royal-card .card-divider { margin: 15px 0; color: #dfb76c; font-size: 18px; }
.sample-royal-card .card-invitation-text { font-size: 14px; line-height: 1.6; color: #eed8b0; margin-bottom: 24px; font-style: italic; }
.sample-royal-card .card-event-badge { background: rgba(223, 183, 108, 0.15); border: 1px solid #dfb76c; padding: 12px; border-radius: 8px; margin-bottom: 20px; }
.sample-royal-card .card-date { font-size: 18px; font-weight: bold; color: #fff; margin: 0; }
.sample-royal-card .card-time { font-size: 14px; color: #dfb76c; margin: 4px 0 0 0; }
.sample-royal-card .card-venue-box { margin-bottom: 20px; }
.sample-royal-card .card-venue-title { font-size: 11px; letter-spacing: 2px; color: #dfb76c; margin-bottom: 4px; }
.sample-royal-card .card-venue { font-size: 16px; font-weight: 600; color: #fff; margin: 0; }
.sample-royal-card .card-location { font-size: 13px; color: #cfbb9b; margin: 4px 0 0 0; }
.sample-royal-card .card-rsvp-box { font-size: 12px; color: #dfb76c; border-top: 1px solid rgba(223, 183, 108, 0.3); padding-top: 14px; }

/* Neon Glow Card */
.sample-neon-card {
  background: #0d0b18;
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: 0 0 35px rgba(255, 0, 128, 0.35);
  text-align: center;
  border: 2px solid #ff007f;
}
.sample-neon-card .neon-tag { font-size: 13px; letter-spacing: 4px; color: #00f0ff; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.sample-neon-card .neon-age { font-size: 24px; color: #ffe600; font-weight: 800; }
.sample-neon-card .neon-name { font-size: 40px; font-weight: 900; margin: 10px 0 15px 0; background: linear-gradient(90deg, #ff007f, #00f0ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sample-neon-card .neon-info-box { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(0, 240, 255, 0.4); border-radius: 12px; padding: 20px; text-align: left; margin-bottom: 20px; }
.sample-neon-card .neon-row { font-size: 14px; margin-bottom: 10px; color: #fff; }
.sample-neon-card .neon-footer { font-size: 12px; color: #ff007f; font-weight: 700; }
