/* ===========================================
   Home / Dashboard Page
   =========================================== */

/* ── Hero Banner ── */
.dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-10);
  margin-bottom: var(--space-8);
  position: relative;
  overflow: hidden;
}
/* Subtle left accent stripe */
.dash-hero::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--color-primary-500) 0%, var(--color-primary-700) 100%);
}
/* Subtle background glow — dark only */
.dash-hero::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(59,130,246,0.07) 0%, transparent 70%);
  pointer-events: none;
}
[data-theme="light"] .dash-hero::after {
  background: radial-gradient(circle, rgba(37,99,235,0.05) 0%, transparent 70%);
}

.dash-hero-inner { flex: 1; min-width: 0; position: relative; z-index: 1; }

.dash-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-primary-400);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--space-3);
}
[data-theme="light"] .dash-hero-eyebrow { color: var(--color-primary-600); }

.dash-hero-dot {
  width: 6px; height: 6px;
  background: var(--color-primary-400);
  border-radius: 50%;
  animation: heroPulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}
[data-theme="light"] .dash-hero-dot { background: var(--color-primary-600); }

@keyframes heroPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

.dash-hero-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--space-3);
}

.dash-hero-sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 480px;
}

/* ── Hero Art (document stack illustration) ── */
.dash-hero-art {
  position: relative;
  width: 160px;
  height: 130px;
  flex-shrink: 0;
}
@media (max-width: 700px) { .dash-hero-art { display: none; } }

.dash-hero-doc {
  position: absolute;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.dash-hero-doc--back {
  width: 120px;
  top: 10px; right: 0;
  transform: rotate(4deg);
  opacity: 0.55;
}
.dash-hero-doc--front {
  width: 128px;
  top: 0; left: 0;
  box-shadow: var(--shadow-md);
}

.dash-hero-doc-line {
  height: 5px;
  width: 100%;
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

.dash-hero-doc-badge {
  width: 26px; height: 26px;
  background: rgba(239, 68, 68, 0.12);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #EF4444;
  font-size: 0.75rem;
  margin-bottom: var(--space-1);
}
[data-theme="light"] .dash-hero-doc-badge { background: rgba(220,38,38,0.08); }

/* ── Page Header ── */
.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}
.dash-header-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.dash-header-sub {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-top: var(--space-1);
  font-weight: var(--weight-normal);
}

/* ── Stats Row ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}
@media (max-width: 700px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ── Section Header Divider ── */
.section-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.section-divider-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}
.section-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border-default);
}

/* ── Form Grid (tiles) ── */
.forms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}
@media (max-width: 600px) {
  .forms-grid { grid-template-columns: 1fr; }
}

/* ── Recent Documents ── */
.recent-table-wrap {
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.recent-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-surface-sunken);
}
.recent-table-title {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.recent-table-body { }

/* ── Recent Toolbar (search + filters) ── */
.recent-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-surface-sunken);
  flex-wrap: wrap;
}
.recent-toolbar .input,
.recent-toolbar .select {
  font-size: var(--text-xs);
  padding: 5px var(--space-3);
  height: 32px;
  background: var(--input-bg);
}
.recent-toolbar .select { padding-right: 28px; }

/* ── Profiles Page ── */
.profiles-layout {
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
}

/* Profile row in table style */
.profile-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-default);
  transition: background var(--transition-fast);
  cursor: default;
}
.profile-row:last-child { border-bottom: none; }
.profile-row:hover { background: var(--bg-surface-hover); }
.profile-row-avatar {
  width: 34px; height: 34px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
}
.profile-row-avatar.company { background: rgba(59,130,246,0.1); color: var(--color-primary-400); }
.profile-row-avatar.person { background: rgba(16,185,129,0.1); color: var(--color-success-400); }
[data-theme="light"] .profile-row-avatar.company { background: var(--color-primary-50); color: var(--color-primary-600); }
[data-theme="light"] .profile-row-avatar.person { background: var(--color-success-50); color: var(--color-success-600); }
.profile-row-info { flex: 1; min-width: 0; }
.profile-row-name {
  font-size: var(--text-sm); font-weight: var(--weight-semibold);
  color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-row-sub { font-size: var(--text-xs); color: var(--text-tertiary); }
.profile-row-actions { display: flex; gap: var(--space-1); opacity: 0; transition: opacity var(--transition-fast); }
.profile-row:hover .profile-row-actions { opacity: 1; }

/* Profiles page header bar */
.profiles-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}
.profiles-page-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  letter-spacing: -0.03em;
}
.profiles-page-sub {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Search bar */
.search-bar {
  position: relative;
  flex: 1;
  max-width: 320px;
}
.search-bar-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 0.75rem;
  pointer-events: none;
}
.search-bar .input { padding-left: 30px; }

/* Profile card grid for large items */
.profiles-table-wrap {
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ── Feature Cards (hidden on home but kept for legacy) ── */
.feature-card { display: none; }
.home-hero { display: none; }
.features-section { display: none; }
.home-footer { display: none; }
.home-hero-actions { display: none; }
