/* ═══════════════════════════════════════════════════════════════
   Invitații Digitale — Main Platform CSS
   ═══════════════════════════════════════════════════════════════ */

/* ─── Variables ─────────────────────────────────────────────────────────── */
:root {
  --brand:        #667eea;
  --brand-dark:   #5a67d8;
  --brand-light:  #a3b4f5;
  --accent:       #764ba2;
  --bg:           #f7f8fc;
  --bg-card:      #ffffff;
  --border:       #e2e8f0;
  --text:         #1a202c;
  --muted:        #718096;
  --success:      #38a169;
  --warning:      #d69e2e;
  --danger:       #e53e3e;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg:    0 4px 24px rgba(0,0,0,.12);
  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; }
img  { max-width: 100%; display: block; }
a    { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Typography ────────────────────────────────────────────────────────── */
h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; line-height: 1.15; letter-spacing: -.5px; }
h2 { font-size: clamp(22px, 3vw, 32px); font-weight: 700; line-height: 1.2; }
h3 { font-size: 18px; font-weight: 700; }
p  { color: var(--muted); }

/* ─── Layout ────────────────────────────────────────────────────────────── */
.container   { width: min(1100px, 100%); margin-inline: auto; padding-inline: 24px; }
.container-sm { width: min(520px, 100%); margin-inline: auto; padding-inline: 24px; }

/* ─── Nav ───────────────────────────────────────────────────────────────── */
.nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
}

.nav-logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 6px;
  transition: color .2s, background .2s;
  text-decoration: none;
}

.nav-links a:hover { color: var(--text); background: var(--bg); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform .15s, filter .15s, box-shadow .15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.05); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  box-shadow: 0 4px 14px rgba(102,126,234,.4);
}

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

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

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 14px rgba(229,62,62,.3);
}

.btn-success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 4px 14px rgba(56,161,105,.3);
}

.btn-sm { font-size: 13px; padding: 7px 14px; }
.btn-lg { font-size: 16px; padding: 13px 28px; border-radius: 10px; }
.btn-block { width: 100%; justify-content: center; }

/* ─── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

/* ─── Forms ─────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group:last-child { margin-bottom: 0; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

label .required { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}

.form-control::placeholder { color: #b0b8c4; }

textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 36px; }

.form-hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

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

/* ─── Alerts / Flash messages ───────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.alert-success { background: #f0fff4; border: 1px solid #9ae6b4; color: #276749; }
.alert-error   { background: #fff5f5; border: 1px solid #feb2b2; color: #9b2c2c; }
.alert-warning { background: #fffbeb; border: 1px solid #fbd38d; color: #92400e; }
.alert-info    { background: #ebf8ff; border: 1px solid #90cdf4; color: #2c5282; }

/* ─── Badges ────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2px;
}

.badge-green  { background: #f0fff4; color: #276749; border: 1px solid #9ae6b4; }
.badge-yellow { background: #fffbeb; color: #92400e; border: 1px solid #fbd38d; }
.badge-red    { background: #fff5f5; color: #9b2c2c; border: 1px solid #feb2b2; }
.badge-gray   { background: #f7fafc; color: #4a5568; border: 1px solid #e2e8f0; }
.badge-blue   { background: #ebf8ff; color: #2c5282; border: 1px solid #90cdf4; }
.badge-purple { background: #faf5ff; color: #553c9a; border: 1px solid #d6bcfa; }

/* ─── Tables ────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }

table { width: 100%; border-collapse: collapse; background: #fff; }
thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
  background: #f7fafc;
  border-bottom: 1px solid var(--border);
}

tbody tr { border-bottom: 1px solid var(--border); transition: background .15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f7fafc; }
td { padding: 12px 16px; font-size: 14px; }

/* ─── Pagination ────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; margin-top: 20px; justify-content: center; }
.page-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  transition: all .15s;
  text-decoration: none;
}
.page-btn:hover, .page-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); text-decoration: none; }

/* ─── Auth pages ────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f0ff 100%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 40px;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.auth-logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; text-align: center; }
.auth-sub   { font-size: 14px; color: var(--muted); text-align: center; margin-bottom: 28px; }
.auth-footer { text-align: center; font-size: 14px; color: var(--muted); margin-top: 20px; }
.auth-footer a { color: var(--brand); font-weight: 600; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: 12px; color: var(--muted); }

/* ─── Dashboard layout ──────────────────────────────────────────────────── */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 60px); }

.sidebar {
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.sidebar-section { padding: 0 12px; margin-bottom: 8px; }
.sidebar-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 8px 12px; margin-bottom: 4px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: all .15s;
  text-decoration: none;
  margin-bottom: 2px;
}

.sidebar-link:hover { color: var(--text); background: var(--bg); text-decoration: none; }
.sidebar-link.active { color: var(--brand); background: rgba(102,126,234,.08); font-weight: 600; }
.sidebar-link .icon { font-size: 16px; width: 20px; text-align: center; }

.main-content { padding: 32px; }

.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 24px; font-weight: 700; }
.page-header p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.page-header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

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

.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon.purple { background: rgba(102,126,234,.12); }
.stat-icon.green  { background: rgba(56,161,105,.12); }
.stat-icon.yellow { background: rgba(214,158,46,.12); }
.stat-icon.red    { background: rgba(229,62,62,.12); }

.stat-value { font-size: 26px; font-weight: 800; color: var(--text); }
.stat-label { font-size: 13px; color: var(--muted); }

/* ─── Invitation card (dashboard list) ─────────────────────────────────── */
.inv-grid { display: grid; gap: 16px; }

.inv-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  transition: border-color .2s, box-shadow .2s;
}

.inv-card:hover { border-color: var(--brand-light); box-shadow: 0 4px 16px rgba(102,126,234,.1); }

.inv-card-info { display: flex; align-items: center; gap: 14px; }
.inv-card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.inv-card-title { font-size: 15px; font-weight: 700; color: var(--text); }
.inv-card-meta  { font-size: 13px; color: var(--muted); margin-top: 3px; }
.inv-card-meta span::after { content: ' · '; }
.inv-card-meta span:last-child::after { content: ''; }

.inv-card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ─── Empty state ───────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
}

.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3   { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-state p    { margin-bottom: 24px; }

/* ─── Landing page ──────────────────────────────────────────────────────── */
.lp-hero {
  padding: 80px 0 60px;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f0ff 100%);
  text-align: center;
}

.lp-hero h1 { margin-bottom: 16px; color: var(--text); }
.lp-hero p  { font-size: 18px; max-width: 560px; margin: 0 auto 32px; }
.lp-hero-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }

.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(102,126,234,.1);
  border: 1px solid rgba(102,126,234,.25);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.lp-section { padding: 80px 0; }
.lp-section-alt { background: #fff; }

.lp-section-head { text-align: center; margin-bottom: 48px; }
.lp-section-head h2 { margin-bottom: 12px; }

.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }

.feat-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .2s, transform .2s;
}

.feat-item:hover { border-color: var(--brand-light); transform: translateY(-2px); }
.feat-item-icon { font-size: 28px; margin-bottom: 14px; }
.feat-item h3   { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feat-item p    { font-size: 14px; }

.event-types-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 700px; margin-inline: auto; }

.event-type-card {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all .2s;
}

.event-type-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(102,126,234,.15); }
.event-type-card .et-icon { font-size: 36px; margin-bottom: 12px; }
.event-type-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.event-type-card .price { font-size: 22px; font-weight: 800; color: var(--brand); }

.pricing-grid-lp { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }

.lp-cta {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  padding: 80px 0;
  text-align: center;
  color: #fff;
}

.lp-cta h2 { color: #fff; margin-bottom: 12px; }
.lp-cta p  { color: rgba(255,255,255,.8); font-size: 18px; margin-bottom: 32px; }
.lp-cta .btn { background: #fff; color: var(--brand); box-shadow: 0 4px 20px rgba(0,0,0,.2); }

footer.lp-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* ─── Utility ───────────────────────────────────────────────────────────── */
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted  { color: var(--muted); font-size: 14px; }
.gap-8  { gap: 8px; }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .event-types-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .inv-card { grid-template-columns: 1fr; }
  .inv-card-actions { justify-content: flex-start; }
  .event-types-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
}
