/**
 * GIFTALAYA / G-INVITE — User Dashboard Styles
 * Design language: matches editor.css + auth-modal.css
 */

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

:root {
  --sage:       #5a7d5c;
  --sage-dark:  #446246;
  --sage-light: #edf3ee;
  --gold:       #d97706;
  --gold-light: #fef3c7;
  --cream:      #f8fafc;
  --surface:    #ffffff;
  --border:     #e2e8f0;
  --text-main:  #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --red:        #ef4444;
  --red-bg:     #fef2f2;
  --amber:      #f59e0b;
  --amber-bg:   #fffbeb;
  --blue:       #3b82f6;
  --blue-bg:    #eff6ff;
  --green:      #10b981;
  --green-bg:   #ecfdf5;
  --indigo:     #6366f1;
  --indigo-bg:  #eef2ff;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.12);
  --radius:     12px;
  --radius-sm:  8px;
  --font:       'Plus Jakarta Sans', system-ui, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--text-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Dashboard Header (Aligned with site-header styling) ─────────────────── */
.dash-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #ece6df;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.dash-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.dash-brand img {
  height: 32px;
  width: auto;
  display: block;
}

.dash-brand-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #744b9e;
  background: #f1ecf7;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.dash-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-link-account {
  background: linear-gradient(135deg, #744b9e 0%, #d04a9b 100%);
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 10px rgba(208, 74, 155, 0.28);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-link-account:hover {
  transform: translateY(-1.5px);
  filter: brightness(1.05);
  box-shadow: 0 4px 16px rgba(208, 74, 155, 0.4);
}

.dash-header-actions #btn-header-home {
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #ece6df;
  color: #2c2523;
  font-weight: 600;
  padding: 7px 14px;
  transition: all 0.2s ease;
}

.dash-header-actions #btn-header-home:hover {
  background: #f8f6f3;
  border-color: #d8cec3;
  transform: translateY(-1px);
}

.dash-header-actions #btn-create-new-header {
  border-radius: 20px;
  background: linear-gradient(135deg, #744b9e 0%, #d04a9b 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 8px 18px;
  border: none;
  box-shadow: 0 2px 8px rgba(116, 75, 158, 0.25);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.dash-header-actions #btn-create-new-header:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.dash-header-actions .btn-icon#btn-signout {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #ece6df;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.dash-header-actions .btn-icon#btn-signout:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #ef4444;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 5px;
  background: #fcf9ff;
  border: 1px solid #e8deef;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.user-chip:hover {
  background: #f5eef9;
  border-color: #d6c3e4;
}

.user-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ede3f5;
  color: #744b9e;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-chip-name {
  font-size: 12px;
  font-weight: 700;
  color: #4a2d69;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 13px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 9px 16px;
  transition: all .18s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--sage);
  color: #fff;
}
.btn-primary:hover { background: var(--sage-dark); }

.btn-secondary {
  background: var(--surface);
  color: var(--text-main);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: #f1f5f9; }

.btn-sage-outline {
  background: var(--surface);
  color: var(--sage-dark);
  border: 1.5px solid var(--sage);
}
.btn-sage-outline:hover { background: var(--sage-light); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 12px;
}
.btn-ghost:hover { background: #f1f5f9; color: var(--text-main); }

.btn-upgrade-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245,158,11,.3);
}
.btn-upgrade-gold:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1.5px solid #fecaca;
}
.btn-danger:hover { background: #fee2e2; }

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

.btn-block {
  width: 100%;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.btn-icon:hover { background: #f1f5f9; color: var(--text-main); }
.btn-icon.danger:hover { background: var(--red-bg); color: var(--red); border-color: #fecaca; }

/* ── Main Layout ──────────────────────────────────────────────────────────── */
.dash-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

/* ── Auth Loading State ───────────────────────────────────────────────────── */
.auth-loading-state {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-loading-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  max-width: 360px;
  width: 100%;
}

.spinner-ring {
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--sage);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Guest Countdown Pill ─────────────────────────────────────────────────── */
.guest-countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--amber-bg);
  border: 1.5px solid #fde68a;
  border-radius: 24px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
  white-space: nowrap;
  flex-shrink: 0;
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulse-dot 1.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.guest-countdown-pill .pill-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.guest-expired-pill {
  background: var(--red-bg);
  border-color: #fecaca;
  color: var(--red);
}

/* ── Upgrade Banner ───────────────────────────────────────────────────────── */
.upgrade-banner {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #fde68a;
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.upgrade-banner-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.upgrade-banner-text {
  flex: 1;
  min-width: 240px;
}

.upgrade-banner-text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 3px;
}

.upgrade-banner-text p {
  font-size: 13px;
  color: #a16207;
  line-height: 1.45;
}

/* ── Metrics Grid ─────────────────────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.metric-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-icon-wrap.bg-sage   { background: var(--sage-light); color: var(--sage-dark); }
.metric-icon-wrap.bg-indigo { background: var(--indigo-bg); color: var(--indigo); }
.metric-icon-wrap.bg-amber  { background: var(--amber-bg); color: #92400e; }

.metric-content {
  flex: 1;
  min-width: 0;
}

.metric-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  display: block;
  margin-bottom: 2px;
}

.metric-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.metric-status-text {
  font-size: 15px;
}

/* ── Section Header ───────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.section-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 12px;
}

/* ── Project Grid ─────────────────────────────────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* ── Project Card ─────────────────────────────────────────────────────────── */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all .2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

.project-card.expired-card {
  opacity: .8;
}

/* Card Thumbnail */
.card-thumb {
  position: relative;
  height: 190px;
  background: linear-gradient(135deg, var(--sage-light) 0%, #e0ede1 100%);
  overflow: hidden;
  flex-shrink: 0;
}

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

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

.card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--sage-dark);
}

/* Badges on Thumbnail */
.card-template-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15,23,42,.75);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: .02em;
  backdrop-filter: blur(4px);
}

.card-status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(4px);
}

.badge-live  { background: rgba(16,185,129,.9); color: #fff; }
.badge-trial { background: rgba(245,158,11,.92); color: #fff; }
.badge-paid  { background: rgba(99,102,241,.92); color: #fff; }

/* Card Body */
.card-body {
  padding: 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.card-slug-link {
  font-size: 12px;
  font-family: monospace;
  font-weight: 600;
  color: var(--sage-dark);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.card-slug-link:hover { text-decoration: underline; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Card Actions */
.card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px 14px;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

.btn-manage {
  flex: 1;
  background: var(--sage);
  color: #fff;
  font-weight: 700;
}
.btn-manage:hover { background: var(--sage-dark); }

.btn-card-edit {
  background: var(--surface);
  color: var(--text-main);
  border: 1px solid var(--border);
}
.btn-card-edit:hover { background: #f1f5f9; }

/* ── 1-Trial Limit Gatekeeper Modal ───────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.6);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

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

.modal-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: scale(.96);
  transition: transform .2s ease;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.trial-gate-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--amber-bg);
  color: #92400e;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.trial-gate-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.trial-gate-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.highlight-text {
  color: var(--sage-dark);
  font-weight: 700;
}

.trial-gate-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.gate-option-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  position: relative;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gate-option-card.recommended {
  border-color: #f59e0b;
  background: #fffdf5;
}

.gate-option-badge {
  position: absolute;
  top: -9px;
  right: 14px;
  background: #f59e0b;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.gate-option-header {
  display: flex;
  gap: 12px;
}

.gate-option-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.gate-option-header h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.gate-option-header p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.trial-gate-footer {
  display: flex;
  justify-content: flex-end;
}

/* ── Delete Confirm Modal ─────────────────────────────────────────────────── */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.6);
  z-index: 650;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.confirm-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.confirm-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 30px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
  transform: scale(.95);
  transition: transform .2s;
}

.confirm-overlay.active .confirm-card {
  transform: scale(1);
}

.confirm-icon {
  font-size: 38px;
  margin-bottom: 12px;
}

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

.confirm-msg {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ── Toast Notification ───────────────────────────────────────────────────── */
.dash-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-main);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 340px;
  transform: translateY(80px);
  opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
}

.dash-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.dash-toast.success { background: #166534; }
.dash-toast.error   { background: #991b1b; }
.dash-toast.info    { background: #1e40af; }

/* ── Skeleton Loader ──────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 6px;
}

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

.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.skeleton-thumb { height: 190px; }
.skeleton-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skeleton-line { height: 14px; }
.skeleton-line.short { width: 55%; }
.skeleton-line.xshort { width: 35%; }
.skeleton-actions {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}
.skeleton-btn { height: 36px; flex: 1; border-radius: var(--radius-sm); }

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

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 14px;
  margin-bottom: 20px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .dash-main {
    padding: 16px 14px 48px;
  }
  
  /* Unclutter Header on Mobile */
  .dash-header-inner { 
    padding: 0 12px; 
    height: 56px;
    gap: 6px;
  }
  .dash-brand img {
    height: 26px;
  }
  .dash-brand-badge {
    display: none;
  }
  .dash-header-actions {
    gap: 6px;
    flex-shrink: 0;
  }
  #btn-header-home {
    display: none;
  }
  /* Primary create button is already prominently featured in the section header below */
  #btn-create-new-header {
    display: none !important;
  }
  
  .guest-countdown-pill {
    padding: 4px 9px;
    font-size: 11px;
    gap: 5px;
    white-space: nowrap;
    border-radius: 999px;
  }
  
  .btn-link-account {
    padding: 5px 10px;
    font-size: 11px;
    gap: 4px;
    white-space: nowrap;
    border-radius: 999px;
  }
  
  /* Compact 3-Column Metrics Grid */
  .metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
  }
  .metric-card {
    padding: 12px 6px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }
  .metric-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    margin-bottom: 2px;
  }
  .metric-icon-wrap svg,
  .metric-icon-wrap i {
    width: 16px;
    height: 16px;
  }
  .metric-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .metric-label {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    margin-bottom: 2px;
  }
  .metric-val {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
  }
  .metric-status-text {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
  }
  
  /* Section Header on Mobile */
  .section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
  }
  .section-title-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .section-title {
    font-size: 18px;
    font-weight: 800;
  }
  .section-actions {
    width: 100%;
  }
  #btn-create-new-main {
    width: 100%;
    height: 44px;
    font-size: 13.5px;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, #5a7d5c 0%, #446246 100%);
    box-shadow: 0 4px 14px rgba(68, 98, 70, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  
  /* Project Cards on Mobile */
  .project-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .project-card {
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
  }
  .card-thumb {
    height: 190px;
  }
  .card-body {
    padding: 14px 16px 10px;
  }
  .card-title {
    font-size: 17px;
    font-weight: 700;
  }
  .card-actions {
    padding: 10px 14px 12px;
    gap: 6px;
    background: #f8fafc;
  }
  .btn-manage {
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 10px;
    font-weight: 700;
  }
  .btn-card-edit {
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 10px;
    font-weight: 600;
  }
  .card-actions .btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex-shrink: 0;
  }

  .upgrade-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 14px;
  }
}

@media (max-width: 480px) {
  .user-chip .user-chip-name {
    display: none;
  }
  .user-chip {
    padding: 3px;
    background: transparent;
    border: none;
  }
  .user-avatar-sm {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 360px) {
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .metric-card:nth-child(3) {
    grid-column: span 2;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 10px 14px;
    gap: 12px;
  }
  .metric-card:nth-child(3) .metric-content {
    align-items: flex-start;
  }
}

