/* ============================================
   Phytoventures Portal — Light Theme v2
   Premium design: Linear meets Stripe meets Notion
   Frosted glass, micro-interactions, emerald depth
   ============================================ */

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

:root {
  /* Surface hierarchy */
  --portal-bg: #fafafa;
  --portal-surface: #ffffff;
  --portal-card: #ffffff;
  --portal-elevated: #ffffff;
  --portal-sunken: #f5f5f5;
  --portal-border: #eaeaea;
  --portal-border-light: #f5f5f5;
  --portal-border-accent: #10b981;

  /* Text hierarchy */
  --portal-text: #171717;
  --portal-text-secondary: #525252;
  --portal-text-muted: #a3a3a3;

  /* Accent system */
  --portal-accent: #10b981;
  --portal-accent-hover: #059669;
  --portal-accent-light: rgba(16, 185, 129, 0.08);
  --portal-accent-glow: rgba(16, 185, 129, 0.12);
  --portal-accent-subtle: rgba(16, 185, 129, 0.04);
  --portal-gradient: linear-gradient(135deg, #10b981, #14b8a6);
  --portal-gradient-soft: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(20, 184, 166, 0.08));

  /* Semantic colors */
  --portal-blue: #3b82f6;
  --portal-amber: #f59e0b;
  --portal-red: #ef4444;
  --portal-purple: #8b5cf6;

  /* Shadows — layered for realism */
  --portal-shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
  --portal-shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --portal-shadow-md: 0 2px 8px rgba(0,0,0,0.06);
  --portal-shadow-lg: 0 4px 16px rgba(0,0,0,0.08);
  --portal-shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.04);
  --portal-shadow-accent: 0 4px 16px rgba(16, 185, 129, 0.2);
  --portal-shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);

  /* Radii */
  --portal-radius-sm: 6px;
  --portal-radius: 8px;
  --portal-radius-lg: 12px;
  --portal-radius-xl: 24px;
  --portal-radius-pill: 100px;

  /* Motion */
  --portal-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --portal-ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --portal-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --portal-duration: 0.2s;
  --portal-duration-slow: 0.4s;

  /* Layout */
  --portal-sidebar-width: 264px;
}


/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }
img { max-width: 100%; }


/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes portalFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes portalSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

@keyframes bounceIn {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes bellSwing {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-12deg); }
  45% { transform: rotate(8deg); }
  60% { transform: rotate(-6deg); }
  75% { transform: rotate(2deg); }
}

@keyframes shine {
  0% { left: -60%; }
  100% { left: 160%; }
}

@keyframes skeletonShimmer {
  0% { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}

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

@keyframes contentFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.6; }
}

/* Stagger delays for entrance animations */
.portal-stagger-1 { animation-delay: 0.05s; }
.portal-stagger-2 { animation-delay: 0.1s; }
.portal-stagger-3 { animation-delay: 0.15s; }
.portal-stagger-4 { animation-delay: 0.2s; }
.portal-stagger-5 { animation-delay: 0.25s; }
.portal-stagger-6 { animation-delay: 0.3s; }


/* ============ BASE ============ */
.portal-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--portal-bg);
  color: var(--portal-text);
  min-height: 100vh;
  display: flex;
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}


/* ============ SCROLLBAR — ultra-thin, emerald on hover ============ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: var(--portal-radius-pill);
  transition: background 0.3s;
}
*:hover > ::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 185, 129, 0.3);
}
::-webkit-scrollbar-thumb:active {
  background: rgba(16, 185, 129, 0.5);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
*:hover {
  scrollbar-color: rgba(16, 185, 129, 0.3) transparent;
}


/* ============ SIDEBAR — frosted glass ============ */
.portal-sidebar {
  width: var(--portal-sidebar-width);
  min-height: 100vh;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-right: 1px solid rgba(232, 236, 241, 0.6);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--portal-ease), box-shadow 0.35s var(--portal-ease);
}

/* Subtle left gradient accent */
.portal-sidebar::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #10b981 0%, #14b8a6 50%, rgba(20, 184, 166, 0.2) 100%);
  opacity: 0.7;
}

.portal-sidebar-header {
  padding: 24px 20px 18px;
  border-bottom: 1px solid var(--portal-border-light);
}

.portal-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Sora', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--portal-text);
  letter-spacing: -0.01em;
}

.portal-sidebar-logo svg {
  width: 28px;
  height: 28px;
}

.portal-sidebar-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--portal-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 4px;
}

.portal-sidebar nav {
  flex: 1;
  padding: 14px 10px;
  overflow-y: auto;
}

.portal-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--portal-radius-pill);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--portal-text-secondary);
  transition: all 0.2s var(--portal-ease);
  margin-bottom: 2px;
  position: relative;
}

.portal-sidebar nav a:hover {
  background: var(--portal-accent-light);
  color: var(--portal-text);
  transform: translateX(2px);
}

.portal-sidebar nav a.active {
  background: rgba(16, 185, 129, 0.08);
  color: var(--portal-accent);
  font-weight: 600;
}

/* Active item left accent dot */
.portal-sidebar nav a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--portal-accent);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.portal-sidebar nav a svg {
  width: 18px;
  height: 18px;
  opacity: 0.55;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.portal-sidebar nav a:hover svg {
  opacity: 0.85;
}

.portal-sidebar nav a.active svg {
  opacity: 1;
}

.portal-nav-section {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--portal-text-muted);
  padding: 20px 14px 8px;
  position: relative;
}

/* Subtle separator before nav sections */
.portal-nav-section::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--portal-border-light);
}

.portal-nav-section:first-child::before {
  display: none;
}

/* Sidebar user info */
.portal-sidebar-user {
  padding: 12px 16px;
  border-bottom: 1px solid var(--portal-border-subtle, #f2f4f7);
}

.portal-sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--portal-accent), #14b8a6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.portal-sidebar-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.portal-sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--portal-text, #0a0f1a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-sidebar-user-company {
  font-size: 0.7rem;
  color: var(--portal-text-muted, #8b95a5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar footer / logout */
.portal-sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--portal-border-subtle, #f2f4f7);
  margin-top: auto;
}

.portal-sidebar-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--portal-text-muted);
  width: 100%;
  cursor: pointer;
  transition: all 0.2s;
  background: none;
  border: none;
}

.portal-sidebar-logout svg {
  width: 16px;
  height: 16px;
}

.portal-sidebar-logout:hover {
  background: rgba(239, 68, 68, 0.06);
  color: #ef4444;
}

.portal-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--portal-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.portal-avatar--lg {
  width: 44px;
  height: 44px;
  font-size: 0.85rem;
}


/* ============ MAIN CONTENT ============ */
.portal-main {
  flex: 1;
  margin-left: var(--portal-sidebar-width);
  min-height: 100vh;
  padding: 32px 40px;
  max-width: 1200px;
  animation: contentFadeIn 0.3s ease;
}


/* ============ HEADER / BREADCRUMBS ============ */
.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.portal-header h1 {
  font-family: 'Sora', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--portal-text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.portal-header h2 {
  font-family: 'Sora', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--portal-text);
  letter-spacing: -0.02em;
}

.portal-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--portal-text-muted);
  margin-bottom: 6px;
}

.portal-breadcrumbs a {
  color: var(--portal-text-secondary);
  transition: color 0.2s;
}

.portal-breadcrumbs a:hover {
  color: var(--portal-accent);
}

.portal-breadcrumbs span {
  color: var(--portal-text-muted);
}


/* ============ CARDS — shadow-only, no borders ============ */
.portal-card {
  background: var(--portal-card);
  border-radius: var(--portal-radius-lg);
  border: none;
  box-shadow: var(--portal-shadow-sm);
  padding: 24px;
  transition: transform 0.25s var(--portal-ease), box-shadow 0.25s var(--portal-ease);
  position: relative;
}

.portal-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--portal-shadow-card-hover);
}

/* Colored left accent bar variant */
.portal-card--accent {
  border-left: 4px solid transparent;
  border-image: var(--portal-gradient) 1;
}

.portal-card--accent-emerald { border-left: 4px solid var(--portal-accent); }
.portal-card--accent-blue { border-left: 4px solid var(--portal-blue); }
.portal-card--accent-amber { border-left: 4px solid var(--portal-amber); }
.portal-card--accent-red { border-left: 4px solid var(--portal-red); }
.portal-card--accent-purple { border-left: 4px solid var(--portal-purple); }

/* Glass-morphism card variant */
.portal-card--glass {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.portal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.portal-card-title {
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}


/* ============ STAT CARDS — gradient icons, trend indicators ============ */
.portal-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.portal-stat {
  background: var(--portal-card);
  border-radius: var(--portal-radius-lg);
  border: none;
  box-shadow: var(--portal-shadow-sm);
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.25s var(--portal-ease), box-shadow 0.25s var(--portal-ease);
  animation: fadeInUp 0.4s var(--portal-ease) both;
}

.portal-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--portal-shadow-card-hover);
}

.portal-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--portal-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s var(--portal-ease-spring);
}

.portal-stat:hover .portal-stat-icon {
  transform: scale(1.08);
}

/* Gradient icon backgrounds */
.portal-stat-icon--emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(20, 184, 166, 0.1));
  color: #10b981;
}
.portal-stat-icon--blue {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(99, 102, 241, 0.1));
  color: #3b82f6;
}
.portal-stat-icon--amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.1));
  color: #f59e0b;
}
.portal-stat-icon--red {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(248, 113, 113, 0.1));
  color: #ef4444;
}
.portal-stat-icon--purple {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(167, 139, 250, 0.1));
  color: #8b5cf6;
}

.portal-stat-icon svg {
  width: 22px;
  height: 22px;
}

.portal-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--portal-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.portal-stat-value {
  font-family: 'Sora', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--portal-text);
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.portal-stat-value--currency {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* Trend indicator */
.portal-stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: var(--portal-radius-pill);
}

.portal-stat-trend--up {
  color: #059669;
  background: rgba(16, 185, 129, 0.08);
}

.portal-stat-trend--down {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.08);
}


/* ============ TABLES — borderless rows, frosted header ============ */
.portal-table-wrap {
  overflow-x: auto;
  border-radius: var(--portal-radius);
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.portal-table thead {
  background: rgba(247, 248, 250, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 1;
}

.portal-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--portal-text-muted);
  border-bottom: 1px solid var(--portal-border);
}

.portal-table td {
  padding: 14px 16px;
  border-bottom: none;
  color: var(--portal-text-secondary);
  transition: all 0.15s ease;
}

/* Alternating subtle backgrounds — no borders */
.portal-table tbody tr:nth-child(even) {
  background: rgba(240, 242, 245, 0.35);
}

.portal-table tbody tr {
  border-left: 3px solid transparent;
  transition: all 0.2s var(--portal-ease);
}

.portal-table tbody tr:hover {
  background: rgba(16, 185, 129, 0.03);
  border-left-color: var(--portal-accent);
}

.portal-table tbody tr:last-child td {
  border-bottom: none;
}

.portal-table .currency {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Text hierarchy inside table cells */
.portal-table .cell-primary {
  font-weight: 600;
  color: var(--portal-text);
}

.portal-table .cell-secondary {
  font-weight: 400;
  color: var(--portal-text-muted);
  font-size: 0.78rem;
}


/* ============ STATUS BADGES — pill shaped, dot + subtle bg ============ */
.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--portal-radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.2s var(--portal-ease);
}

.portal-badge:hover {
  transform: scale(1.04);
}

.portal-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.portal-badge--draft { background: #f1f5f9; color: #64748b; }
.portal-badge--draft::before { background: #94a3b8; }

.portal-badge--sent,
.portal-badge--open,
.portal-badge--pending,
.portal-badge--todo { background: rgba(59, 130, 246, 0.08); color: #2563eb; }
.portal-badge--sent::before,
.portal-badge--open::before,
.portal-badge--pending::before,
.portal-badge--todo::before { background: #3b82f6; }

.portal-badge--paid,
.portal-badge--complete,
.portal-badge--approved,
.portal-badge--done,
.portal-badge--accepted,
.portal-badge--completed { background: rgba(16, 185, 129, 0.08); color: #059669; }
.portal-badge--paid::before,
.portal-badge--complete::before,
.portal-badge--approved::before,
.portal-badge--done::before,
.portal-badge--accepted::before,
.portal-badge--completed::before { background: #10b981; }

.portal-badge--overdue,
.portal-badge--urgent,
.portal-badge--rejected { background: rgba(239, 68, 68, 0.08); color: #dc2626; }
.portal-badge--overdue::before,
.portal-badge--urgent::before,
.portal-badge--rejected::before { background: #ef4444; }

.portal-badge--in_progress,
.portal-badge--review,
.portal-badge--waiting_client { background: rgba(245, 158, 11, 0.08); color: #b45309; }
.portal-badge--in_progress::before,
.portal-badge--review::before,
.portal-badge--waiting_client::before { background: #f59e0b; }

.portal-badge--planning,
.portal-badge--on_hold { background: rgba(139, 92, 246, 0.08); color: #7c3aed; }
.portal-badge--planning::before,
.portal-badge--on_hold::before { background: #8b5cf6; }

.portal-badge--cancelled,
.portal-badge--suspended,
.portal-badge--closed,
.portal-badge--expired { background: rgba(100, 116, 139, 0.08); color: #475569; }
.portal-badge--cancelled::before,
.portal-badge--suspended::before,
.portal-badge--closed::before,
.portal-badge--expired::before { background: #64748b; }

/* Pulse animation on active/in-progress statuses */
.portal-badge--active::before,
.portal-badge--in_progress::before,
.portal-badge--pending::before {
  animation: dotPulse 2s ease-in-out infinite;
}


/* ============ BUTTONS — gradient primary, pill variant, loading ============ */
.portal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--portal-radius);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s var(--portal-ease);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.portal-btn--primary {
  background: var(--portal-gradient);
  color: #fff;
  box-shadow: var(--portal-shadow-xs);
}

.portal-btn--primary:hover {
  box-shadow: var(--portal-shadow-accent);
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.portal-btn--primary:active {
  transform: translateY(0);
  filter: brightness(0.97);
}

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

.portal-btn--outline:hover {
  background: var(--portal-accent-light);
  border-color: var(--portal-accent);
  color: var(--portal-accent);
  transform: translateY(-1px);
}

/* Dashed outline for secondary actions */
.portal-btn--dashed {
  background: transparent;
  color: var(--portal-text-muted);
  border: 1.5px dashed var(--portal-border);
}

.portal-btn--dashed:hover {
  border-color: var(--portal-accent);
  color: var(--portal-accent);
  background: var(--portal-accent-subtle);
}

.portal-btn--danger {
  background: transparent;
  color: var(--portal-red);
  border: 1.5px solid rgba(239, 68, 68, 0.25);
}

.portal-btn--danger:hover {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

.portal-btn--ghost {
  background: transparent;
  color: var(--portal-text-secondary);
}

.portal-btn--ghost:hover {
  background: var(--portal-sunken);
  color: var(--portal-text);
}

.portal-btn--sm {
  padding: 6px 14px;
  font-size: 0.78rem;
}

.portal-btn--pay {
  background: var(--portal-gradient);
  color: #fff;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: var(--portal-radius);
  box-shadow: var(--portal-shadow-accent);
}

.portal-btn--pay:hover {
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.35);
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* Pill-shaped button variant */
.portal-btn--pill {
  border-radius: var(--portal-radius-pill);
}

/* Icon button — circular hover */
.portal-btn--icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  color: var(--portal-text-secondary);
}

.portal-btn--icon:hover {
  background: var(--portal-sunken);
  color: var(--portal-text);
}

/* Loading state with pulse */
.portal-btn--loading {
  pointer-events: none;
  opacity: 0.7;
}

.portal-btn--loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: portalSpin 0.6s linear infinite;
  margin-left: 4px;
}

.portal-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}


/* ============ FORMS — large padding, focus glow ============ */
.portal-form-group {
  margin-bottom: 20px;
}

.portal-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--portal-text);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}

.portal-input,
.portal-textarea,
.portal-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--portal-surface);
  border: 1.5px solid var(--portal-border);
  border-radius: var(--portal-radius);
  font-size: 0.875rem;
  color: var(--portal-text);
  transition: border-color 0.25s var(--portal-ease), box-shadow 0.25s var(--portal-ease), background 0.25s;
}

.portal-input:focus,
.portal-textarea:focus,
.portal-select:focus {
  outline: none;
  border-color: var(--portal-accent);
  box-shadow: 0 0 0 4px var(--portal-accent-glow);
  background: #fff;
}

.portal-input::placeholder,
.portal-textarea::placeholder {
  color: var(--portal-text-muted);
  font-weight: 400;
}

.portal-textarea {
  resize: vertical;
  min-height: 110px;
}

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

/* Floating label variant */
.portal-form-group--float {
  position: relative;
}

.portal-form-group--float .portal-label {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  transition: all 0.2s var(--portal-ease);
  pointer-events: none;
  color: var(--portal-text-muted);
  font-weight: 400;
  font-size: 0.875rem;
  margin-bottom: 0;
  background: transparent;
  padding: 0 4px;
}

.portal-form-group--float .portal-input:focus ~ .portal-label,
.portal-form-group--float .portal-input:not(:placeholder-shown) ~ .portal-label {
  top: -1px;
  transform: translateY(-50%);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--portal-accent);
  background: var(--portal-surface);
}

/* Input group — connected elements */
.portal-input-group {
  display: flex;
  align-items: stretch;
}

.portal-input-group .portal-input {
  border-radius: var(--portal-radius) 0 0 var(--portal-radius);
  border-right: none;
}

.portal-input-group .portal-btn {
  border-radius: 0 var(--portal-radius) var(--portal-radius) 0;
}

.portal-input-group-text {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--portal-sunken);
  border: 1.5px solid var(--portal-border);
  border-right: none;
  border-radius: var(--portal-radius) 0 0 var(--portal-radius);
  font-size: 0.85rem;
  color: var(--portal-text-muted);
  font-weight: 500;
}

.portal-input-group-text + .portal-input {
  border-radius: 0 var(--portal-radius) var(--portal-radius) 0;
}


/* ============ ALERTS ============ */
.portal-alert {
  padding: 14px 18px;
  border-radius: var(--portal-radius);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  animation: portalSlideDown 0.35s var(--portal-ease);
  border: none;
}

.portal-alert--success {
  background: rgba(16, 185, 129, 0.06);
  color: #065f46;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.15);
}

.portal-alert--error {
  background: rgba(239, 68, 68, 0.06);
  color: #991b1b;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.15);
}

.portal-alert--warning {
  background: rgba(245, 158, 11, 0.06);
  color: #92400e;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.15);
}

.portal-alert--info {
  background: rgba(59, 130, 246, 0.06);
  color: #1e40af;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.15);
}


/* ============ NOTIFICATION BELL — bounce animation ============ */
.portal-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background 0.2s var(--portal-ease);
}

.portal-bell:hover {
  background: var(--portal-sunken);
}

.portal-bell svg {
  width: 20px;
  height: 20px;
  color: var(--portal-text-secondary);
  transition: color 0.2s;
}

.portal-bell:hover svg {
  color: var(--portal-text);
}

/* Bounce on new notifications */
.portal-bell--has-new svg {
  animation: bellSwing 0.8s var(--portal-ease);
}

.portal-bell-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--portal-red);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounceIn 0.4s var(--portal-ease-spring);
  padding: 0 4px;
}

/* Notification dropdown panel */
.portal-notification-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 420px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: var(--portal-radius-lg);
  box-shadow: var(--portal-shadow-xl);
  animation: slideInRight 0.3s var(--portal-ease);
  z-index: 200;
}

.portal-notification-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--portal-border-light);
  transition: background 0.15s;
  position: relative;
}

.portal-notification-item:hover {
  background: var(--portal-accent-subtle);
}

.portal-notification-item:last-child {
  border-bottom: none;
}

/* Unread indicator dot */
.portal-notification-item--unread::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--portal-accent);
}


/* ============ EMPTY STATE — visual, geometric ============ */
.portal-empty {
  text-align: center;
  padding: 64px 32px;
  color: var(--portal-text-muted);
}

/* CSS-only geometric illustration */
.portal-empty::before {
  content: '';
  display: block;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 24px;
  background: var(--portal-gradient-soft);
  position: relative;
  transform: rotate(12deg);
  opacity: 0.8;
}

.portal-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.35;
  color: var(--portal-accent);
}

/* Hide the CSS art if an SVG is provided */
.portal-empty svg ~ *,
.portal-empty:has(svg)::before {
  /* For browsers that support :has() */
}

.portal-empty h3 {
  font-family: 'Sora', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--portal-text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.portal-empty p {
  font-size: 0.85rem;
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.7;
  color: var(--portal-text-muted);
}

.portal-empty .portal-btn {
  margin-top: 20px;
}


/* ============ LOADING — skeleton shimmer ============ */
.portal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.portal-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--portal-border);
  border-top-color: var(--portal-accent);
  border-radius: 50%;
  animation: portalSpin 0.6s linear infinite;
}

/* Skeleton shimmer loading */
.portal-skeleton {
  background: linear-gradient(90deg, var(--portal-sunken) 25%, rgba(255,255,255,0.5) 50%, var(--portal-sunken) 75%);
  background-size: 400% 100%;
  animation: skeletonShimmer 1.6s ease infinite;
  border-radius: var(--portal-radius-sm);
}

.portal-skeleton--text {
  height: 14px;
  margin-bottom: 10px;
  width: 80%;
}

.portal-skeleton--text:last-child {
  width: 50%;
}

.portal-skeleton--title {
  height: 24px;
  width: 40%;
  margin-bottom: 16px;
}

.portal-skeleton--avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.portal-skeleton--card {
  height: 120px;
  border-radius: var(--portal-radius-lg);
}

.portal-skeleton--row {
  height: 48px;
  margin-bottom: 4px;
}

/* Content loaded fade-in */
.portal-loaded {
  animation: fadeInUp 0.4s var(--portal-ease) both;
}


/* ============ PROGRESS BAR — gradient fill, shine animation ============ */
.portal-progress {
  height: 8px;
  background: var(--portal-sunken);
  border-radius: var(--portal-radius-pill);
  overflow: hidden;
  position: relative;
}

.portal-progress-fill {
  height: 100%;
  background: var(--portal-gradient);
  border-radius: var(--portal-radius-pill);
  transition: width 0.6s var(--portal-ease);
  position: relative;
  overflow: hidden;
}

/* Shine animation */
.portal-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: shine 2.5s ease-in-out infinite;
}

/* Percentage label */
.portal-progress-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--portal-text-secondary);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}


/* ============ QUICK ACTIONS ============ */
.portal-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.portal-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--portal-card);
  border: none;
  border-radius: var(--portal-radius);
  box-shadow: var(--portal-shadow-xs);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--portal-text-secondary);
  transition: all 0.25s var(--portal-ease);
  cursor: pointer;
}

.portal-action:hover {
  color: var(--portal-accent);
  box-shadow: var(--portal-shadow-md);
  transform: translateY(-2px);
  background: var(--portal-accent-subtle);
}

.portal-action svg {
  width: 20px;
  height: 20px;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
}

.portal-action:hover svg {
  opacity: 1;
  transform: scale(1.1);
}


/* ============ MILESTONES ============ */
.portal-milestones {
  position: relative;
  padding-left: 28px;
}

.portal-milestones::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--portal-accent), var(--portal-border));
  border-radius: 2px;
}

.portal-milestone {
  position: relative;
  padding: 8px 0 24px 0;
}

.portal-milestone-dot {
  position: absolute;
  left: -25px;
  top: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--portal-border);
  border: 2.5px solid var(--portal-surface);
  transition: all 0.3s;
  box-shadow: 0 0 0 2px var(--portal-border-light);
}

.portal-milestone--complete .portal-milestone-dot {
  background: var(--portal-accent);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.portal-milestone--in_progress .portal-milestone-dot {
  background: var(--portal-amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.portal-milestone-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--portal-text);
  letter-spacing: -0.005em;
}

.portal-milestone-date {
  font-size: 0.78rem;
  color: var(--portal-text-muted);
  margin-top: 3px;
  line-height: 1.6;
}


/* ============ TABS ============ */
.portal-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--portal-border-light);
  margin-bottom: 28px;
}

.portal-tab {
  padding: 12px 22px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--portal-text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.2s var(--portal-ease);
  cursor: pointer;
  position: relative;
}

.portal-tab:hover {
  color: var(--portal-text);
}

.portal-tab.active {
  color: var(--portal-accent);
  border-bottom-color: var(--portal-accent);
  font-weight: 600;
}

/* Tab count badge */
.portal-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--portal-radius-pill);
  background: var(--portal-sunken);
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: 6px;
  color: var(--portal-text-muted);
}

.portal-tab.active .portal-tab-count {
  background: rgba(16, 185, 129, 0.1);
  color: var(--portal-accent);
}


/* ============ LOGIN PAGE ============ */
.portal-login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--portal-bg);
  position: relative;
  overflow: hidden;
}

/* Subtle decorative gradient orbs */
.portal-login-page::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.portal-login-page::after {
  content: '';
  position: absolute;
  bottom: -15%;
  left: -5%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.portal-login-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: var(--portal-radius-xl);
  box-shadow: var(--portal-shadow-xl);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: fadeInUp 0.5s var(--portal-ease);
  position: relative;
  z-index: 1;
}

.portal-login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Sora', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.portal-login-subtitle {
  font-size: 0.85rem;
  color: var(--portal-text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}


/* ============ MOBILE — slide-out, bottom bar, touch-friendly ============ */
.portal-mobile-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: var(--portal-radius);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--portal-shadow-md);
  align-items: center;
  justify-content: center;
  border: none;
  transition: background 0.2s;
}

.portal-mobile-toggle:active {
  background: rgba(255, 255, 255, 1);
}

.portal-mobile-toggle svg { width: 20px; height: 20px; }

.portal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 99;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.3s;
}

/* Mobile bottom action bar */
.portal-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--portal-border-light);
  padding: 8px 16px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.portal-mobile-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 4px;
}

.portal-mobile-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  border-radius: var(--portal-radius);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--portal-text-muted);
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}

.portal-mobile-bar-item.active {
  color: var(--portal-accent);
}

.portal-mobile-bar-item svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 768px) {
  .portal-mobile-toggle { display: flex; }
  .portal-mobile-bar { display: block; }

  .portal-sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }

  .portal-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--portal-shadow-xl);
  }

  .portal-overlay.open {
    display: block;
    animation: contentFadeIn 0.2s ease;
  }

  .portal-main {
    margin-left: 0;
    padding: 64px 16px 80px;
  }

  .portal-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .portal-form-row { grid-template-columns: 1fr; }
  .portal-header { flex-direction: column; align-items: flex-start; gap: 12px; }

  .portal-header h1 { font-size: 1.5rem; }

  /* Cards stack full width */
  .portal-card {
    border-radius: var(--portal-radius);
    margin-left: -4px;
    margin-right: -4px;
  }

  /* Touch-friendly tap targets */
  .portal-sidebar nav a {
    padding: 12px 14px;
    min-height: 44px;
  }

  .portal-btn {
    min-height: 44px;
    padding: 12px 20px;
  }

  .portal-tab {
    min-height: 44px;
    padding: 12px 16px;
  }

  .portal-notification-panel {
    width: calc(100vw - 32px);
    right: -60px;
  }
}

@media (max-width: 480px) {
  .portal-stats { grid-template-columns: 1fr; }
  .portal-actions { grid-template-columns: 1fr; }

  .portal-main {
    padding: 60px 12px 80px;
  }
}


/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.02em;
}

.portal-main h1 { font-size: 1.75rem; }
.portal-main h2 { font-size: 1.25rem; }
.portal-main h3 { font-size: 1.05rem; }

.portal-helper-text {
  font-size: 0.78rem;
  color: var(--portal-text-muted);
  line-height: 1.7;
}

.portal-mono {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}


/* ============ DIVIDER ============ */
.portal-divider {
  height: 1px;
  background: var(--portal-border-light);
  margin: 24px 0;
  border: none;
}


/* ============ TOOLTIP (CSS only) ============ */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 12px;
  border-radius: var(--portal-radius-sm);
  background: var(--portal-text);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 300;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ============ MODAL / DIALOG ============ */
.portal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: contentFadeIn 0.2s ease;
}

.portal-modal {
  background: var(--portal-surface);
  border-radius: var(--portal-radius-xl);
  box-shadow: var(--portal-shadow-xl);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  animation: fadeInUp 0.35s var(--portal-ease);
}

.portal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.portal-modal-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}


/* ============ DROPDOWN ============ */
.portal-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--portal-radius);
  box-shadow: var(--portal-shadow-lg);
  padding: 6px;
  z-index: 200;
  animation: fadeInUp 0.2s var(--portal-ease);
}

.portal-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--portal-radius-sm);
  font-size: 0.85rem;
  color: var(--portal-text-secondary);
  transition: all 0.15s;
  cursor: pointer;
}

.portal-dropdown-item:hover {
  background: var(--portal-accent-light);
  color: var(--portal-text);
}

.portal-dropdown-divider {
  height: 1px;
  background: var(--portal-border-light);
  margin: 4px 0;
}


/* ============ UTILITY ============ */
.text-muted { color: var(--portal-text-muted); }
.text-accent { color: var(--portal-accent); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-sm { font-size: 0.78rem; line-height: 1.7; }
.font-mono { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }
.font-heading { font-family: 'Sora', sans-serif; letter-spacing: -0.02em; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-3 { gap: 12px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hidden { display: none !important; }

.portal-fade-in {
  animation: fadeInUp 0.4s var(--portal-ease) both;
}

/* Smooth page transitions */
.portal-page-enter {
  animation: fadeInUp 0.35s var(--portal-ease) both;
}

.portal-page-exit {
  animation: contentFadeIn 0.15s ease reverse both;
}


/* ============ SELECTION ============ */
::selection {
  background: rgba(16, 185, 129, 0.15);
  color: var(--portal-text);
}

::-moz-selection {
  background: rgba(16, 185, 129, 0.15);
  color: var(--portal-text);
}


/* ============ FOCUS VISIBLE ============ */
:focus-visible {
  outline: 2px solid var(--portal-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--portal-accent);
  outline-offset: 2px;
}


/* ============ PRINT ============ */
@media print {
  .portal-sidebar,
  .portal-mobile-toggle,
  .portal-mobile-bar,
  .portal-bell { display: none !important; }

  .portal-main {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .portal-card {
    box-shadow: none !important;
    break-inside: avoid;
  }
}
