/* =====================================================
   宝贝成长相册 · 全局样式
   ===================================================== */

:root {
  --pink:    #ff7eb3;
  --pink-l:  #fff0f6;
  --pink-d:  #e05c96;
  --purple:  #b98bff;
  --blue:    #6bb5ff;
  --blue-l:  #eef6ff;
  --green:   #58d68d;
  --green-l: #edfff5;
  --orange:  #ffaa5a;
  --orange-l:#fff5e8;
  --yellow:  #ffd166;
  --gray-1:  #f9f9fb;
  --gray-2:  #f0f0f4;
  --gray-3:  #d8d8e0;
  --gray-4:  #aaaabc;
  --gray-5:  #7777aa;
  --dark:    #2c2c4a;
  --white:   #ffffff;
  --shadow:  0 4px 24px rgba(100,80,200,.10);
  --shadow-hover: 0 8px 36px rgba(100,80,200,.18);
  --radius:  16px;
  --radius-sm: 10px;
  --transition: .25s ease;
  --font: 'Nunito', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--gray-1);
  color: var(--dark);
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-3); border-radius: 3px; }

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-2);
  height: 64px;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex; align-items: center; gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 800; color: var(--pink-d);
}
.logo-icon { font-size: 26px; }
.nav-links {
  list-style: none;
  display: flex; gap: 4px; margin-left: auto;
}
.nav-links a {
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600; font-size: 15px; color: var(--gray-5);
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  background: var(--pink-l); color: var(--pink-d);
}
.btn-admin {
  background: linear-gradient(135deg, var(--pink), var(--purple)) !important;
  color: white !important;
}
.nav-hamburger {
  display: none;
  background: none; border: none;
  font-size: 22px; color: var(--dark); margin-left: auto;
}

/* =====================================================
   HERO
   ===================================================== */
.hero {
  min-height: 100vh;
  padding: 100px 24px 60px;
  display: flex; align-items: center;
  max-width: 1200px; margin: 0 auto; gap: 60px;
  position: relative;
}
.hero-bg-shapes { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.shape {
  position: absolute; border-radius: 50%; opacity: .06;
  background: var(--purple); animation: float 6s ease-in-out infinite;
}
.s1 { width: 600px; height: 600px; top: -200px; left: -200px; background: var(--pink); animation-delay: 0s; }
.s2 { width: 400px; height: 400px; top: 50%; right: -100px; background: var(--purple); animation-delay: 2s; }
.s3 { width: 300px; height: 300px; bottom: 0; left: 40%; background: var(--blue); animation-delay: 4s; }
@keyframes float {
  0%,100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-30px) scale(1.05); }
}

.hero-content { flex: 1; max-width: 560px; }
.hero-badge {
  display: inline-block;
  background: var(--pink-l); color: var(--pink-d);
  padding: 6px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 700; margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(36px, 5vw, 58px); font-weight: 800; line-height: 1.2;
  color: var(--dark); margin-bottom: 20px;
}
.highlight {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-desc { font-size: 17px; color: var(--gray-5); line-height: 1.8; margin-bottom: 36px; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }

.btn-primary {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white; border: none;
  padding: 13px 30px; border-radius: 999px;
  font-size: 16px; font-weight: 700;
  box-shadow: 0 4px 18px rgba(255,126,179,.35);
  transition: var(--transition);
  display: inline-block;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,126,179,.45); }

.btn-outline {
  background: transparent;
  color: var(--pink-d); border: 2px solid var(--pink);
  padding: 11px 28px; border-radius: 999px;
  font-size: 16px; font-weight: 700;
  transition: var(--transition);
  display: inline-block;
}
.btn-outline:hover { background: var(--pink-l); }

.hero-stats {
  display: flex; align-items: center; gap: 32px;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-size: 28px; font-weight: 800; color: var(--dark); }
.stat span { font-size: 13px; color: var(--gray-4); }
.stat-div { width: 1px; height: 36px; background: var(--gray-3); }

.hero-illustration { flex: 1; display: flex; justify-content: center; }
.photo-stack { position: relative; width: 320px; height: 320px; }
.photo-card {
  position: absolute;
  width: 130px; height: 130px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
  animation: cardFloat 4s ease-in-out infinite;
}
.pc1 { top: 0; left: 0; background: var(--pink-l); animation-delay: 0s; }
.pc2 { top: 0; right: 0; background: var(--blue-l); animation-delay: 1s; }
.pc3 { bottom: 0; left: 20px; background: var(--green-l); animation-delay: 2s; }
.pc4 { bottom: 20px; right: 0; background: var(--orange-l); animation-delay: 3s; }
@keyframes cardFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* =====================================================
   SECTIONS
   ===================================================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.section-header { text-align: center; margin-bottom: 48px; }
.section-tag {
  display: inline-block;
  background: var(--pink-l); color: var(--pink-d);
  padding: 5px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 700; margin-bottom: 12px;
}
.section-header h2 { font-size: 36px; font-weight: 800; margin-bottom: 10px; }
.section-header p { color: var(--gray-4); font-size: 16px; }

/* =====================================================
   AGE TABS
   ===================================================== */
.age-section { padding: 80px 0; background: var(--white); }

.age-tabs {
  display: flex; gap: 12px; flex-wrap: wrap;
  justify-content: center; margin-bottom: 48px;
}
.age-tab {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 22px; border-radius: var(--radius);
  border: 2px solid var(--gray-2);
  background: var(--white);
  cursor: pointer; transition: var(--transition);
  min-width: 90px;
}
.age-tab:hover { border-color: var(--pink); background: var(--pink-l); }
.age-tab.active {
  border-color: var(--pink);
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white; box-shadow: 0 4px 16px rgba(255,126,179,.3);
}
.tab-icon { font-size: 24px; margin-bottom: 4px; }
.tab-label { font-size: 14px; font-weight: 700; }
.tab-sub { font-size: 11px; opacity: .7; margin-top: 2px; }

/* =====================================================
   GALLERY GRID
   ===================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.photo-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  animation: fadeInUp .4s ease both;
}
.photo-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.photo-thumb {
  min-height: 160px; overflow: hidden; position: relative;
  background: var(--gray-2);
  display: flex; align-items: center; justify-content: center;
}
.photo-thumb img {
  width: 100%; height: auto; max-height: 260px; object-fit: contain;
  transition: transform .4s ease;
}
.photo-item:hover .photo-thumb img { transform: scale(1.04); }
.photo-thumb-placeholder {
  width: 100%; min-height: 160px;
  display: flex; align-items: center; justify-content: center;
  font-size: 56px;
  background: linear-gradient(135deg, var(--pink-l), var(--blue-l));
}
.photo-age-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,.9); backdrop-filter: blur(4px);
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--pink-d);
}
.photo-fav {
  position: absolute; top: 10px; right: 10px;
  font-size: 18px; cursor: pointer;
  transition: transform .2s;
}
.photo-fav:hover { transform: scale(1.3); }
.photo-meta { padding: 14px 16px 16px; text-align: center; }
.photo-meta h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.photo-meta-row { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.photo-date { font-size: 12px; color: var(--gray-4); }
.photo-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.tag {
  background: var(--pink-l); color: var(--pink-d);
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   EMPTY STATE
   ===================================================== */
.empty-state {
  text-align: center; padding: 64px 24px;
  grid-column: 1 / -1;
}
.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--gray-4); margin-bottom: 24px; }

/* =====================================================
   TIMELINE
   ===================================================== */
.timeline-section { padding: 80px 0; background: var(--gray-1); }
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: ''; position: absolute; left: 12px; top: 0; bottom: 0;
  width: 3px; background: linear-gradient(to bottom, var(--pink), var(--purple), var(--blue));
  border-radius: 2px;
}
.tl-item {
  position: relative; padding: 0 0 40px 24px;
  animation: fadeInUp .5s ease both;
}
.tl-dot {
  position: absolute; left: -34px; top: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--pink);
  border: 3px solid white;
  box-shadow: 0 0 0 3px var(--pink);
}
.tl-card {
  background: white; border-radius: var(--radius);
  padding: 16px 20px; box-shadow: var(--shadow);
  display: flex; gap: 16px; align-items: flex-start;
}
.tl-thumb {
  width: 80px; height: 80px; border-radius: var(--radius-sm);
  overflow: hidden; flex-shrink: 0;
  background: var(--gray-2);
}
.tl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tl-thumb-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  background: linear-gradient(135deg, var(--pink-l), var(--blue-l));
}
.tl-info h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.tl-info p { font-size: 13px; color: var(--gray-5); line-height: 1.6; }
.tl-date { font-size: 12px; color: var(--gray-4); margin-top: 6px; }

/* =====================================================
   FOOTER
   ===================================================== */
.footer { background: var(--dark); color: white; padding: 48px 0; text-align: center; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; }
.footer-desc { color: rgba(255,255,255,.6); font-size: 14px; }
.footer-admin-link { color: var(--pink); font-weight: 600; font-size: 14px; }
.footer-admin-link:hover { text-decoration: underline; }

/* =====================================================
   LIGHTBOX
   ===================================================== */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20,20,40,.85);
  backdrop-filter: blur(8px);
  display: none;
}
.lightbox-overlay.active { display: block; }
.lightbox {
  position: fixed; inset: 0; z-index: 201;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.lightbox.active { display: flex; }
.lb-content {
  background: white; border-radius: 20px;
  overflow: hidden; max-width: 800px; width: 100%;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  animation: lbIn .3s ease;
}
@keyframes lbIn {
  from { transform: scale(.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
#lbImg {
  width: 100%; max-height: 60vh; object-fit: contain;
  background: var(--gray-1);
}
.lb-info { padding: 20px 24px; }
.lb-info h3 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.lb-info p { color: var(--gray-5); font-size: 14px; margin-bottom: 10px; }
.lb-meta { display: flex; gap: 16px; }
.lb-meta span { font-size: 13px; color: var(--gray-4); }
.lb-close {
  position: fixed; top: 20px; right: 20px;
  background: rgba(255,255,255,.15); color: white; border: none;
  width: 42px; height: 42px; border-radius: 50%;
  font-size: 18px; font-weight: bold;
  z-index: 202; backdrop-filter: blur(4px);
  transition: background .2s;
}
.lb-close:hover { background: rgba(255,255,255,.25); }
.lb-prev, .lb-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.15); color: white; border: none;
  width: 50px; height: 50px; border-radius: 50%;
  font-size: 20px; z-index: 202; backdrop-filter: blur(4px);
  transition: background .2s;
}
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.3); }

/* =====================================================
   ADMIN — LOGIN
   ===================================================== */
.admin-body { background: linear-gradient(135deg, #ffe4f0 0%, #e8d8ff 50%, #d8eeff 100%); }

.login-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-card {
  background: white; border-radius: 24px;
  padding: 48px; width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(180,100,200,.2);
  animation: lbIn .4s ease;
}
.login-header { text-align: center; margin-bottom: 36px; }
.login-logo { font-size: 56px; margin-bottom: 12px; }
.login-header h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.login-header p { color: var(--gray-4); font-size: 14px; }

.login-form .form-group { margin-bottom: 20px; }
.login-form label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; color: var(--dark); }
.input-wrap {
  position: relative; display: flex; align-items: center;
  border: 2px solid var(--gray-2);
  border-radius: var(--radius-sm);
  transition: border-color .2s;
  overflow: hidden;
}
.input-wrap:focus-within { border-color: var(--pink); }
.input-icon { padding: 0 12px; font-size: 18px; color: var(--gray-4); }
.input-wrap input {
  flex: 1; padding: 12px 14px 12px 0;
  border: none; outline: none;
  font-size: 15px; font-family: var(--font);
  background: transparent;
}
.eye-btn {
  background: none; border: none; padding: 0 12px;
  font-size: 16px; cursor: pointer;
}
.login-hint { font-size: 13px; color: #e05; min-height: 18px; margin-bottom: 10px; }
.btn-login {
  width: 100%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white; border: none; border-radius: 999px;
  padding: 14px; font-size: 16px; font-weight: 800;
  box-shadow: 0 4px 18px rgba(255,126,179,.35);
  transition: var(--transition); margin-bottom: 16px;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,126,179,.45); }
.login-tips { text-align: center; font-size: 13px; color: var(--gray-4); }

/* =====================================================
   ADMIN — LAYOUT
   ===================================================== */
.admin-layout { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--dark); color: white;
  display: flex; flex-direction: column;
  transition: width .3s ease;
  overflow: hidden;
}
.sidebar.collapsed { width: 72px; }
.sidebar-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 18px; font-weight: 800;
  white-space: nowrap;
}
.sidebar.collapsed .logo-text { display: none; }
.sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; color: rgba(255,255,255,.65);
  cursor: pointer; transition: var(--transition);
  white-space: nowrap; width: 100%;
  background: none; border: none; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: white; }
.nav-item.active { background: rgba(255,126,179,.25); color: var(--pink); }
.nav-icon { font-size: 20px; flex-shrink: 0; }
.sidebar.collapsed .nav-item span:last-child { display: none; }
.sidebar-footer { padding: 8px; border-top: 1px solid rgba(255,255,255,.08); }
.logout-btn { color: rgba(255,255,255,.5); }
.logout-btn:hover { color: #ff7eb3; background: rgba(255,126,179,.15); }

/* =====================================================
   ADMIN — MAIN
   ===================================================== */
.admin-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--gray-1); }

.admin-topbar {
  height: 60px; background: white;
  border-bottom: 1px solid var(--gray-2);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px; flex-shrink: 0;
}
.sidebar-toggle {
  background: none; border: none; font-size: 20px; cursor: pointer; color: var(--gray-5);
}
.topbar-title { font-size: 17px; font-weight: 700; flex: 1; }
.admin-welcome { font-size: 14px; color: var(--gray-4); }

.admin-content { flex: 1; overflow-y: auto; padding: 28px; }

.page { display: none; }
.page.active { display: block; animation: fadeInUp .3s ease; }

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.page-header h2 { font-size: 22px; font-weight: 800; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* =====================================================
   DASHBOARD CARDS
   ===================================================== */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.d-card {
  background: white; border-radius: var(--radius);
  padding: 24px; display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow);
}
.d-card.pink  { border-left: 4px solid var(--pink); }
.d-card.blue  { border-left: 4px solid var(--blue); }
.d-card.green { border-left: 4px solid var(--green); }
.d-card.orange { border-left: 4px solid var(--orange); }
.d-card-icon { font-size: 36px; }
.d-card-num { font-size: 32px; font-weight: 800; line-height: 1; }
.d-card-label { font-size: 13px; color: var(--gray-4); margin-top: 4px; }

.dashboard-recent h3 { font-size: 17px; font-weight: 800; margin-bottom: 16px; }
.recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.recent-photo {
  aspect-ratio: 1; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--gray-2); cursor: pointer;
  transition: var(--transition);
}
.recent-photo:hover { transform: scale(1.04); }
.recent-photo img { width: 100%; height: 100%; object-fit: cover; }
.recent-photo-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
}

/* =====================================================
   UPLOAD
   ===================================================== */
.upload-container { max-width: 800px; }
.upload-drop-zone {
  border: 2px dashed var(--gray-3);
  border-radius: var(--radius);
  background: white;
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.upload-drop-zone.dragover {
  border-color: var(--pink); background: var(--pink-l);
}
.drop-icon { font-size: 56px; margin-bottom: 16px; }
.drop-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.drop-sub { color: var(--gray-4); font-size: 14px; margin-bottom: 24px; }

.upload-preview-list {
  background: white; border-radius: var(--radius);
  padding: 20px; margin-top: 20px;
  box-shadow: var(--shadow);
}
.preview-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; font-weight: 700;
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}
.preview-item {
  position: relative; aspect-ratio: 1;
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--gray-2);
}
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-remove {
  position: absolute; top: 4px; right: 4px;
  background: rgba(220,50,50,.85); color: white;
  border: none; border-radius: 50%;
  width: 22px; height: 22px; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.upload-form-wrap {
  background: white; border-radius: var(--radius);
  padding: 28px; margin-top: 20px;
  box-shadow: var(--shadow);
}
.upload-form-wrap h3 { font-size: 18px; font-weight: 800; margin-bottom: 20px; }
.upload-form .form-row { display: flex; gap: 16px; }
.upload-form .form-row .form-group { flex: 1; }
.form-group { margin-bottom: 18px; }
.form-group.full { width: 100%; }
.form-group label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 14px;
  border: 2px solid var(--gray-2); border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font);
  outline: none; transition: border-color .2s;
  background: var(--gray-1);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--pink); background: white;
}
.form-group textarea { resize: vertical; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* =====================================================
   MANAGE GRID
   ===================================================== */
.search-input {
  padding: 9px 14px; border: 2px solid var(--gray-2);
  border-radius: 999px; font-family: var(--font); font-size: 14px;
  outline: none; transition: border-color .2s; min-width: 200px;
}
.search-input:focus { border-color: var(--pink); }
.filter-select {
  padding: 9px 14px; border: 2px solid var(--gray-2);
  border-radius: 999px; font-family: var(--font); font-size: 14px;
  outline: none; cursor: pointer;
}

.manage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.manage-item {
  background: white; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: var(--transition); animation: fadeInUp .3s ease both;
}
.manage-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.manage-thumb {
  min-height: 160px; overflow: hidden; background: var(--gray-2);
  position: relative; display: flex; align-items: center; justify-content: center;
}
.manage-thumb img { width: 100%; height: auto; max-height: 220px; object-fit: contain; }
.manage-thumb-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px;
  background: linear-gradient(135deg, var(--pink-l), var(--blue-l));
}
.manage-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  opacity: 0; transition: opacity .25s;
}
.manage-item:hover .manage-overlay { opacity: 1; }
.manage-meta { padding: 12px 14px; text-align: center; }
.manage-meta h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.manage-meta-row { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; }
.manage-date { font-size: 12px; color: var(--gray-4); }
.manage-age { font-size: 11px; background: var(--pink-l); color: var(--pink-d); padding: 2px 8px; border-radius: 999px; font-weight: 600; }

.btn-icon {
  background: rgba(255,255,255,.9); border: none;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform .2s;
}
.btn-icon:hover { transform: scale(1.15); }
.btn-sm {
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 700; border: none; cursor: pointer;
}
.btn-danger { background: #ff4466; color: white; }
.btn-danger:hover { background: #e03; }

/* =====================================================
   ALBUMS
   ===================================================== */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.album-card {
  background: white; border-radius: var(--radius);
  padding: 24px; text-align: center;
  box-shadow: var(--shadow); cursor: pointer;
  transition: var(--transition);
  animation: fadeInUp .4s ease both;
}
.album-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.album-icon { font-size: 48px; margin-bottom: 12px; }
.album-name { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.album-sub { font-size: 13px; color: var(--gray-4); margin-bottom: 12px; }
.album-count {
  display: inline-block;
  background: var(--pink-l); color: var(--pink-d);
  padding: 4px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
}

/* =====================================================
   SETTINGS
   ===================================================== */
.settings-card {
  background: white; border-radius: var(--radius);
  padding: 28px; max-width: 480px;
  box-shadow: var(--shadow); margin-bottom: 24px;
}
.settings-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 20px; }
.settings-hint { font-size: 13px; margin-bottom: 12px; min-height: 18px; }
.settings-hint.success { color: var(--green); }
.settings-hint.error { color: #e05; }

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(20,20,40,.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: white; border-radius: 20px;
  width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,.3);
  animation: lbIn .3s ease;
}
.modal-sm { max-width: 380px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--gray-2);
}
.modal-header h3 { font-size: 18px; font-weight: 800; }
.modal-close {
  background: var(--gray-1); border: none; border-radius: 50%;
  width: 32px; height: 32px; font-size: 14px;
  cursor: pointer; transition: background .2s;
}
.modal-close:hover { background: var(--gray-2); }
.modal-body { padding: 24px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 12px;
  padding: 16px 24px; border-top: 1px solid var(--gray-2);
}
.edit-preview { margin-bottom: 20px; border-radius: var(--radius-sm); overflow: hidden; max-height: 200px; }
.edit-preview img { width: 100%; max-height: 200px; object-fit: cover; }

/* =====================================================
   TOAST
   ===================================================== */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--dark); color: white;
  padding: 12px 28px; border-radius: 999px;
  font-size: 15px; font-weight: 600;
  opacity: 0; transition: all .3s ease;
  z-index: 500; pointer-events: none; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: linear-gradient(135deg, var(--green), #3ab07a); }
.toast.error   { background: linear-gradient(135deg, #ff4466, #cc2244); }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .hero { flex-direction: column; padding: 90px 20px 40px; gap: 40px; text-align: center; }
  .hero-btns { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-illustration { display: none; }
  .age-tabs { gap: 8px; }
  .age-tab { padding: 10px 14px; min-width: 72px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .sidebar { position: fixed; left: -240px; top: 0; bottom: 0; z-index: 200; transition: left .3s; }
  .sidebar.open { left: 0; }
  .admin-layout { position: relative; }
  .upload-form .form-row { flex-direction: column; }
  .timeline { padding-left: 24px; }
}
