/* ===== Gia Phả Online ===== */

.gp-main { min-height: calc(100vh - 200px); padding: 24px 0 48px; background: #f8f7ff; }
.gp-container { max-width: 900px; margin: 0 auto; padding: 0 16px; }

/* Hero / Landing */
.gp-hero { text-align: center; padding: 40px 0 20px; }
.gp-hero-icon { font-size: 64px; margin-bottom: 16px; }
.gp-hero-title { font-size: 32px; font-weight: 800; color: #1e1b4b; margin: 0 0 12px; }
.gp-hero-desc { font-size: 16px; color: #6b7280; max-width: 500px; margin: 0 auto 32px; line-height: 1.6; }

/* Features grid */
.gp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 40px; }
.gp-feature-card { background: #fff; border-radius: 12px; padding: 20px 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); text-align: center; }
.gp-feature-icon { font-size: 32px; margin-bottom: 8px; }
.gp-feature-name { font-size: 15px; font-weight: 700; color: #1e1b4b; margin-bottom: 4px; }
.gp-feature-desc { font-size: 13px; color: #6b7280; line-height: 1.5; }

/* Login section */
.gp-login-section { margin-top: 20px; }
.gp-login-label { font-size: 14px; color: #9ca3af; margin-bottom: 16px; }
#gpGoogleBtn { display: flex; justify-content: center; margin-bottom: 12px; }
.gp-login-note { font-size: 12px; color: #9ca3af; margin-top: 12px; }

/* Nav user */
.gp-nav-user { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.gp-nav-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

/* Dashboard */
.gp-dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.gp-dash-title { font-size: 24px; font-weight: 800; color: #1e1b4b; margin: 0; }

/* Button */
.gp-btn { padding: 10px 20px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; font-size: 14px; font-weight: 600; cursor: pointer; color: #374151; transition: all 0.15s; }
.gp-btn:hover { background: #f9fafb; }
.gp-btn-primary { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.gp-btn-primary:hover { background: #6d28d9; }
.gp-btn-danger { color: #dc2626; border-color: #fecaca; }
.gp-btn-danger:hover { background: #fef2f2; }
.gp-btn-sm { padding: 6px 14px; font-size: 13px; }

/* Tree list */
.gp-tree-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }

/* Tree card */
.gp-tree-card {
  background: linear-gradient(135deg, #fff 0%, #faf9ff 100%);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 2px 8px rgba(124,58,237,0.06);
  border: 1px solid #e5e7eb;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}
.gp-tree-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #7c3aed, #ec4899);
}
.gp-tree-card:hover {
  box-shadow: 0 8px 24px rgba(124,58,237,0.15);
  transform: translateY(-2px);
  border-color: #c4b5fd;
}
.gp-tree-name { font-size: 19px; font-weight: 700; color: #1e1b4b; margin: 4px 0 8px; line-height: 1.3; }
.gp-tree-meta { font-size: 13px; color: #6b7280; margin-bottom: 4px; line-height: 1.4; }
.gp-tree-meta-icon { display: inline-block; width: 16px; }
.gp-tree-share-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
}
.gp-tree-share-badge.public { background: #dcfce7; color: #15803d; }
.gp-tree-share-badge.pin { background: #fef3c7; color: #a16207; }
.gp-tree-share-badge.private { background: #f3f4f6; color: #6b7280; }
.gp-tree-stats {
  display: flex; gap: 14px; margin: 12px 0;
  font-size: 13px; color: #6b7280;
  padding: 8px 12px;
  background: rgba(124,58,237,0.04);
  border-radius: 8px;
}
.gp-tree-stat { display: flex; align-items: center; gap: 5px; font-weight: 500; }
.gp-tree-stat-num { font-weight: 700; color: #4c1d95; }
.gp-tree-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.gp-tree-actions .gp-btn { flex: 1; min-width: 0; text-align: center; padding: 8px 10px; }
.gp-tree-actions .gp-btn-primary { flex: 2; }

/* Empty state */
.gp-empty {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
  background: linear-gradient(180deg, #faf9ff 0%, #fff 100%);
  border-radius: 16px;
  border: 2px dashed #c4b5fd;
}
.gp-empty-icon { font-size: 56px; margin-bottom: 16px; opacity: 0.7; }
.gp-empty-title { font-size: 18px; font-weight: 700; color: #1e1b4b; margin-bottom: 8px; }
.gp-empty p { margin: 4px 0 20px; line-height: 1.5; max-width: 400px; margin-left: auto; margin-right: auto; }
.gp-empty-tips {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-top: 24px; padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}
.gp-empty-tip {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #374151;
  text-align: left;
  max-width: 220px;
  flex: 1 1 200px;
}
.gp-empty-tip-icon { font-size: 22px; display: block; margin-bottom: 6px; }
.gp-empty-tip strong { color: #1e1b4b; display: block; margin-bottom: 2px; }

/* Modal */
.gp-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.gp-modal { background: #fff; border-radius: 16px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; }
.gp-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid #e5e7eb; }
.gp-modal-header h2 { font-size: 18px; font-weight: 700; color: #1e1b4b; margin: 0; }
.gp-modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #9ca3af; padding: 4px 8px; border-radius: 6px; }
.gp-modal-close:hover { background: #f3f4f6; color: #374151; }
.gp-modal-body { padding: 20px; }
.gp-modal-footer { padding: 14px 20px; border-top: 1px solid #e5e7eb; display: flex; justify-content: flex-end; gap: 8px; }

/* Form */
.gp-form-group { margin-bottom: 16px; }
.gp-form-group label { display: block; font-size: 14px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.gp-required { color: #dc2626; }
.gp-input { width: 100%; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; color: #1e1b4b; background: #fff; box-sizing: border-box; }
.gp-input:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,0.1); }
.gp-textarea { resize: vertical; min-height: 60px; font-family: inherit; }

/* Loading */
.gp-loading { text-align: center; padding: 40px; color: #9ca3af; }

/* User dropdown */
.gp-user-menu { position: relative; }
.gp-user-dropdown { position: absolute; top: 100%; right: 0; background: #fff; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); min-width: 180px; z-index: 200; display: none; overflow: hidden; margin-top: 8px; }
.gp-user-dropdown.open { display: block; }
.gp-user-dropdown a, .gp-user-dropdown button { display: block; width: 100%; padding: 10px 16px; text-align: left; font-size: 14px; color: #374151; background: none; border: none; cursor: pointer; text-decoration: none; }
.gp-user-dropdown a:hover, .gp-user-dropdown button:hover { background: #f3f4f6; }
.gp-user-name { padding: 12px 16px; font-weight: 700; color: #1e1b4b; border-bottom: 1px solid #e5e7eb; font-size: 14px; }

/* Responsive */
@media (max-width: 600px) {
  .gp-hero-title { font-size: 24px; }
  .gp-hero-desc { font-size: 14px; }
  .gp-features { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gp-feature-card { padding: 14px 10px; }
  .gp-dash-header { flex-direction: column; align-items: flex-start; }
  .gp-tree-list { grid-template-columns: 1fr; }
}

/* Details accordion */
.gp-details { margin-top: 12px; border: 1px solid #e5e7eb; border-radius: 8px; padding: 0; }
.gp-details summary { padding: 10px 14px; font-size: 14px; font-weight: 600; color: #374151; cursor: pointer; list-style: none; }
.gp-details summary::before { content: '▶ '; font-size: 10px; }
.gp-details[open] summary::before { content: '▼ '; }
.gp-details[open] { padding-bottom: 12px; }
.gp-details .gp-form-group { padding: 0 14px; }
