/* ── Dashboard Layout ────────────────────────────────────────── */
.dash-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - var(--nav-height));
}

.dash-sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: var(--sp-2xl) var(--sp-md);
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}

.dash-user-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--sp-xl) var(--sp-lg);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-lg);
}
.dash-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--sp-md);
}
.dash-user-name { font-family: var(--font-heading); font-size: 16px; font-weight: 700; color: var(--text-primary); }

.dash-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.dash-nav-section {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 10px 4px;
}
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .15s, color .15s;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.dash-nav-item:hover { background: var(--bg-surface); color: var(--text-primary); text-decoration: none; }
.dash-nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.dash-nav-divider { height: 1px; background: var(--border); margin: 6px 0; }
.dash-logout-btn { color: var(--error); }
.dash-logout-btn:hover { background: var(--error-light); color: var(--error); }

.dash-main { padding: var(--sp-3xl); }

.dash-tab { display: none; }
.dash-tab.active { display: block; }

.dash-tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-2xl);
  gap: var(--sp-lg);
  flex-wrap: wrap;
}
.dash-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.dash-subtitle {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-2xl);
  box-shadow: var(--shadow-sm);
}

/* Favorites grid */
.fav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-lg);
}
.fav-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow .2s, transform .2s;
}
.fav-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.fav-card-img { height: 140px; background: var(--bg-surface); display: flex; align-items: center; justify-content: center; font-size: 40px; overflow: hidden; }
.fav-card-img img { width: 100%; height: 100%; object-fit: cover; }
.fav-card-body { padding: var(--sp-md); }
.fav-card-name { font-family: var(--font-heading); font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.fav-card-rating { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.fav-remove-btn { float: right; background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; padding: 4px; transition: color .2s; }
.fav-remove-btn:hover { color: var(--error); }
.fav-card-phone { margin-top: 4px; }

/* Diary */
.diary-grid { display: flex; flex-direction: column; gap: var(--sp-md); }
.diary-entry-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  display: flex;
  gap: var(--sp-lg);
  align-items: flex-start;
}
.diary-date-badge {
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--r-md);
  padding: 8px 12px;
  text-align: center;
  flex-shrink: 0;
  min-width: 56px;
}
.diary-date-day { font-family: var(--font-heading); font-size: 22px; font-weight: 900; line-height: 1; }
.diary-date-mon { font-family: var(--font-heading); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.diary-info { flex: 1; }
.diary-place { font-family: var(--font-heading); font-size: 15px; font-weight: 700; color: var(--text-primary); }
.diary-catch { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.diary-notes { font-size: 13px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }
.diary-entry-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Subscription */
.sub-card {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #0d2159 100%);
  border-radius: var(--r-xl);
  padding: var(--sp-3xl);
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: var(--sp-2xl);
}
.sub-card::after { content: '⭐'; position: absolute; right: 32px; top: 32px; font-size: 80px; opacity: .15; }
.sub-card-title { font-family: var(--font-heading); font-size: 22px; font-weight: 900; margin-bottom: 8px; }
.sub-card-desc { color: rgba(255,255,255,.65); font-size: 15px; line-height: 1.6; }
.sub-active-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(9,146,104,.3); border: 1px solid rgba(9,146,104,.5); color: #6ee7b7; padding: 4px 12px; border-radius: var(--r-full); font-size: 12px; font-weight: 700; margin-bottom: 16px; }
.sub-perks { display: flex; flex-direction: column; gap: 8px; margin-top: var(--sp-xl); }
.sub-perk { display: flex; align-items: center; gap: 10px; font-size: 14px; color: rgba(255,255,255,.8); }
.sub-perk::before { content: '✓'; color: #6ee7b7; font-weight: 700; }

@media (max-width: 768px) {
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--border); padding: var(--sp-md); }
  .dash-user-card { flex-direction: row; border-bottom: none; margin-bottom: 0; padding: var(--sp-sm) var(--sp-md); align-items: center; text-align: left; }
  .dash-avatar { width: 40px; height: 40px; font-size: 18px; margin-bottom: 0; }
  .dash-nav { flex-direction: row; flex-wrap: wrap; }
  .dash-nav-section { display: none; }
  .dash-main { padding: var(--sp-lg); }
}
