/* =============================================
   ADMIN DASHBOARD - Styles
   Extends common.css design system
   ============================================= */

/* ————————————————————————————————
   LOGIN SCREEN
   ———————————————————————————————— */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-6);
}

/* Animated gradient background */
.login-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--accent) 50%, var(--primary-50) 100%);
  overflow: hidden;
}

.login-bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: blobFloat 20s ease-in-out infinite;
}

.login-bg-blob--1 {
  width: 500px;
  height: 500px;
  background: var(--primary-lighter);
  top: -10%;
  left: -5%;
  animation-delay: 0s;
}

.login-bg-blob--2 {
  width: 400px;
  height: 400px;
  background: var(--accent-darker);
  bottom: -10%;
  right: -5%;
  animation-delay: -7s;
  animation-duration: 25s;
}

.login-bg-blob--3 {
  width: 300px;
  height: 300px;
  background: var(--primary-100);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
  animation-duration: 22s;
}

@keyframes blobFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -50px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }
  75% {
    transform: translate(40px, 30px) scale(1.08);
  }
}

/* Login card - glassmorphism */
.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    var(--shadow-xl),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 2px 0 rgba(255, 255, 255, 0.3) inset;
  padding: var(--space-12) var(--space-10);
  animation: loginCardIn var(--duration-slower) var(--ease-out) both;
}

@keyframes loginCardIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-logo {
  text-align: center;
  margin-bottom: var(--space-10);
}

.login-logo-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: var(--space-4);
  animation: loginIconBounce 1s var(--ease-spring) 0.3s both;
}

@keyframes loginIconBounce {
  from {
    opacity: 0;
    transform: scale(0) rotate(-15deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.login-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-2);
  font-weight: var(--weight-normal);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-group {
  display: flex;
  flex-direction: column;
}

.input-wrapper {
  position: relative;
}

.input-wrapper .input {
  padding-right: var(--space-12);
}

.input-icon-btn {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast) var(--ease-in-out);
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-icon-btn:hover {
  color: var(--text-secondary);
}

.login-error {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  animation: fadeInScale var(--duration-normal) var(--ease-out);
}

.login-btn {
  width: 100%;
  margin-top: var(--space-2);
  height: 48px;
}

.login-btn .spinner {
  width: 20px;
  height: 20px;
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: white;
}

/* ————————————————————————————————
   NAVIGATION BAR
   ———————————————————————————————— */
.navbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(248, 246, 241, 0.8);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border-light);
  height: 64px;
}

.navbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-8);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  user-select: none;
}

.navbar-logo {
  font-size: 1.5rem;
  line-height: 1;
}

.navbar-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* ————————————————————————————————
   DASHBOARD CONTENT
   ———————————————————————————————— */
.dashboard-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dashboard-content {
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: var(--space-8);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  animation: fadeInUp var(--duration-slow) var(--ease-out);
}

.section-title {
  font-size: var(--text-3xl);
  color: var(--text-primary);
  font-weight: var(--weight-bold);
}

.section-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* ————————————————————————————————
   GALLERY GRID
   ———————————————————————————————— */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-6);
}

.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  transition: all var(--duration-normal) var(--ease-out);
  animation: cardAppear var(--duration-slow) var(--ease-out) both;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.gallery-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.gallery-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--border);
}

.gallery-card:hover::before {
  opacity: 1;
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Stagger animation delay via inline styles in JS */

.gallery-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.gallery-card-client {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  line-height: var(--leading-tight);
}

.gallery-card-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: 3px var(--space-3);
  border-radius: var(--radius-full);
}

.gallery-card-status--active {
  background: var(--success-bg);
  color: var(--success);
}

.gallery-card-status--active::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: statusPulse 2s ease-in-out infinite;
}

.gallery-card-status--completed {
  background: var(--warning-bg);
  color: var(--warning);
}

.gallery-card-status--completed::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning);
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.gallery-card-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.gallery-card-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.gallery-card-meta-item svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

.gallery-card-progress {
  margin-bottom: var(--space-5);
}

.gallery-card-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--accent);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: var(--space-2);
}

.gallery-card-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-full);
  transition: width var(--duration-slow) var(--ease-out);
}

.gallery-card-progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.gallery-card-progress-count {
  font-weight: var(--weight-semibold);
  color: var(--primary);
}

.gallery-card-actions {
  display: flex;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-light);
}

.gallery-card-actions .btn {
  flex: 1;
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-3);
}

/* ————————————————————————————————
   GALLERY DETAIL VIEW
   ———————————————————————————————— */
.detail-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-light);
  animation: fadeInUp var(--duration-slow) var(--ease-out);
  flex-wrap: wrap;
}

.detail-info {
  flex: 1;
  min-width: 200px;
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.detail-title {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.detail-meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.detail-meta-item svg {
  color: var(--text-muted);
}

.detail-memo {
  font-style: italic;
  color: var(--text-muted);
}

.detail-actions {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* ————————————————————————————————
   UPLOAD ZONE
   ———————————————————————————————— */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-12) var(--space-8);
  text-align: center;
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  background: var(--bg-card);
  margin-bottom: var(--space-6);
  animation: fadeInUp var(--duration-slow) var(--ease-out) 0.1s both;
}

.upload-zone:hover {
  border-color: var(--primary-lighter);
  background: var(--primary-50);
}

.upload-zone.upload-zone--drag-over {
  border-color: var(--primary);
  background: var(--primary-50);
  transform: scale(1.01);
  box-shadow: 0 0 0 4px var(--primary-50), var(--shadow-md);
}

.upload-zone.upload-zone--drag-over .upload-zone-icon {
  color: var(--primary);
  transform: translateY(-4px);
}

.upload-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.upload-zone-icon {
  color: var(--text-muted);
  transition: all var(--duration-normal) var(--ease-out);
  margin-bottom: var(--space-2);
}

.upload-zone:hover .upload-zone-icon {
  color: var(--primary-light);
}

.upload-zone-title {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
}

.upload-zone-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* ————————————————————————————————
   UPLOAD PROGRESS
   ———————————————————————————————— */
.upload-progress {
  margin-bottom: var(--space-6);
  animation: fadeInUp var(--duration-normal) var(--ease-out);
}

.upload-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.upload-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--accent);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
  background-size: 200% 100%;
  border-radius: var(--radius-full);
  transition: width var(--duration-fast) linear;
  animation: progressShimmer 2s linear infinite;
}

@keyframes progressShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ————————————————————————————————
   PHOTO STATS
   ———————————————————————————————— */
.photo-stats {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  animation: fadeInUp var(--duration-slow) var(--ease-out) 0.15s both;
}

.photo-stats-info-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  width: 100%;
}

.photo-stats-info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  white-space: nowrap;
}

.photo-stats-progress-container {
  flex: 1;
  display: flex;
  align-items: center;
}

.photo-stats-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.photo-stats-progress-fill {
  height: 100%;
  background: var(--success);
  border-radius: var(--radius-full);
  transition: width 0.3s var(--ease-out);
}

.photo-stats-max {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: var(--weight-normal);
}

/* ————————————————————————————————
   PHOTO TABS
   ———————————————————————————————— */
.photo-tabs {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-light);
  animation: fadeInUp var(--duration-slow) var(--ease-out) 0.18s both;
}

.photo-tab {
  background: none;
  border: none;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

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

.photo-tab.active {
  color: var(--primary);
  font-weight: var(--weight-bold);
}

.photo-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
}

/* Force show filename in selected tab */
.photo-grid.show-selected-only .photo-item:not(.photo-item--selected) {
  display: none;
}

.photo-grid.show-selected-only .photo-item .photo-item-overlay {
  opacity: 1;
}

/* ————————————————————————————————
   PHOTO GRID
   ———————————————————————————————— */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  animation: fadeInUp var(--duration-slow) var(--ease-out) 0.2s both;
}

@media (max-width: 1024px) {
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all var(--duration-normal) var(--ease-out);
  background: var(--accent);
  animation: photoAppear var(--duration-normal) var(--ease-out) both;
}

@keyframes photoAppear {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.photo-item:hover {
  box-shadow: var(--shadow-md);
  transform: scale(1.02);
}

.photo-item.photo-item--selected {
  border-color: var(--success);
  box-shadow: 0 0 0 2px var(--success-bg), var(--shadow-md);
}

.photo-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-normal) var(--ease-out);
}

.photo-item:hover .photo-item-img {
  transform: scale(1.05);
}

.photo-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.0) 50%, rgba(0,0,0,0.35) 100%);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-in-out);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: var(--space-3);
}

.photo-item:hover .photo-item-overlay {
  opacity: 1;
}

.photo-item-name {
  font-size: var(--text-xs);
  color: white;
  font-weight: var(--weight-medium);
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-item-delete {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(184, 84, 84, 0.85);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-in-out);
  backdrop-filter: blur(4px);
  cursor: pointer;
  border: none;
  padding: 0;
  font-family: inherit;
}

.photo-item-delete:hover {
  background: var(--danger);
  transform: scale(1.1);
}

.photo-item-delete:active {
  transform: scale(0.95);
}

/* Selected check overlay */
.photo-item-check {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: scale(0);
  transition: all var(--duration-normal) var(--ease-spring);
}

.photo-item--selected .photo-item-check {
  opacity: 1;
  transform: scale(1);
  animation: checkBounce 0.4s var(--ease-spring);
}

.photo-item-check::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  pointer-events: none;
  z-index: -1;
}

.photo-item--selected .photo-item-check::after {
  animation: gridBurst 0.6s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes gridBurst {
  0% {
    box-shadow: 
      0 0 0 0 rgba(16, 185, 129, 0),
      0 0 0 0 rgba(16, 185, 129, 0),
      0 0 0 0 rgba(16, 185, 129, 0),
      0 0 0 0 rgba(16, 185, 129, 0),
      0 0 0 0 rgba(16, 185, 129, 0),
      0 0 0 0 rgba(16, 185, 129, 0),
      0 0 0 0 rgba(16, 185, 129, 0),
      0 0 0 0 rgba(16, 185, 129, 0);
  }
  30% {
    box-shadow: 
      0 -14px 0 2px rgba(16, 185, 129, 1),
      10px -10px 0 2px rgba(16, 185, 129, 1),
      14px 0 0 2px rgba(16, 185, 129, 1),
      10px 10px 0 2px rgba(16, 185, 129, 1),
      0 14px 0 2px rgba(16, 185, 129, 1),
      -10px 10px 0 2px rgba(16, 185, 129, 1),
      -14px 0 0 2px rgba(16, 185, 129, 1),
      -10px -10px 0 2px rgba(16, 185, 129, 1);
  }
  100% {
    box-shadow: 
      0 -24px 0 -2px rgba(16, 185, 129, 0),
      17px -17px 0 -2px rgba(16, 185, 129, 0),
      24px 0 0 -2px rgba(16, 185, 129, 0),
      17px 17px 0 -2px rgba(16, 185, 129, 0),
      0 24px 0 -2px rgba(16, 185, 129, 0),
      -17px 17px 0 -2px rgba(16, 185, 129, 0),
      -24px 0 0 -2px rgba(16, 185, 129, 0),
      -17px -17px 0 -2px rgba(16, 185, 129, 0);
  }
}

/* ————————————————————————————————
   MODAL
   ———————————————————————————————— */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn var(--duration-fast) var(--ease-in-out);
}

.modal-overlay[hidden] {
  display: none;
}

/* ————————————————————————————————
   LIGHTBOX
   ———————————————————————————————— */
.lightbox-overlay[hidden] {
  display: none !important;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-toast);
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn var(--duration-normal) var(--ease-out);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast);
  z-index: 10;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: var(--space-6);
}

.lightbox-next {
  right: var(--space-6);
}

.lightbox-select {
  position: absolute;
  top: 50%;
  right: 180px;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: white;
  padding: 12px 24px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast);
  z-index: 10;
  backdrop-filter: blur(4px);
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.lightbox-select:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-50%) scale(1.05);
}

.select-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox-select .selected-content {
  display: none;
}

.lightbox-select.selected .unselected-content {
  display: none;
}

.lightbox-select.selected .selected-content {
  display: flex;
  animation: checkBounce 0.3s var(--ease-spring);
}

.lightbox-select.selected {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
}

.lightbox-select.selected:hover {
  background: rgba(16, 185, 129, 0.4);
}

.lightbox-select::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 36px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  pointer-events: none;
  z-index: -1;
}

.lightbox-select.selected::after {
  animation: checkBurst 0.6s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes checkBurst {
  0% {
    box-shadow: 
      0 0 0 0 rgba(16, 185, 129, 0),
      0 0 0 0 rgba(16, 185, 129, 0),
      0 0 0 0 rgba(16, 185, 129, 0),
      0 0 0 0 rgba(16, 185, 129, 0),
      0 0 0 0 rgba(16, 185, 129, 0),
      0 0 0 0 rgba(16, 185, 129, 0),
      0 0 0 0 rgba(16, 185, 129, 0),
      0 0 0 0 rgba(16, 185, 129, 0);
  }
  30% {
    box-shadow: 
      0 -18px 0 2px rgba(16, 185, 129, 1),
      12px -12px 0 2px rgba(16, 185, 129, 1),
      18px 0 0 2px rgba(16, 185, 129, 1),
      12px 12px 0 2px rgba(16, 185, 129, 1),
      0 18px 0 2px rgba(16, 185, 129, 1),
      -12px 12px 0 2px rgba(16, 185, 129, 1),
      -18px 0 0 2px rgba(16, 185, 129, 1),
      -12px -12px 0 2px rgba(16, 185, 129, 1);
  }
  100% {
    box-shadow: 
      0 -30px 0 -3px rgba(16, 185, 129, 0),
      21px -21px 0 -3px rgba(16, 185, 129, 0),
      30px 0 0 -3px rgba(16, 185, 129, 0),
      21px 21px 0 -3px rgba(16, 185, 129, 0),
      0 30px 0 -3px rgba(16, 185, 129, 0),
      -21px 21px 0 -3px rgba(16, 185, 129, 0),
      -30px 0 0 -3px rgba(16, 185, 129, 0),
      -21px -21px 0 -3px rgba(16, 185, 129, 0);
  }
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  border-radius: var(--radius-sm);
}

.lightbox-caption {
  margin-top: var(--space-4);
  color: white;
  font-size: var(--text-sm);
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.lightbox-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.modal-content {
  width: 100%;
  max-width: 500px;
}

.modal-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  overflow: hidden;
  animation: modalSlideIn var(--duration-slow) var(--ease-out);
}

.modal-card--sm {
  max-width: 420px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-6) 0;
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
}

.modal-title--danger {
  color: var(--danger);
}

.modal-close-btn {
  flex-shrink: 0;
}

.modal-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.modal-message {
  font-size: var(--text-base);
  color: var(--text-primary);
  line-height: var(--leading-relaxed);
}

.modal-submessage {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding-top: var(--space-4);
}

.required {
  color: var(--danger);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

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

/* ————————————————————————————————
   TOAST OVERRIDES (admin-specific)
   ———————————————————————————————— */
.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.toast-body {
  flex: 1;
}

.toast-message {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
}

/* ————————————————————————————————
   VIEW TRANSITIONS
   ———————————————————————————————— */
.view-enter {
  animation: fadeInUp var(--duration-slow) var(--ease-out);
}

.view-exit {
  animation: fadeOut var(--duration-fast) var(--ease-in-out) forwards;
}

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

/* ————————————————————————————————
   UTILITY
   ———————————————————————————————— */
.shake {
  animation: shake 0.5s var(--ease-in-out);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--accent) 25%, var(--accent-dark) 50%, var(--accent) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ————————————————————————————————
   RESPONSIVE
   ———————————————————————————————— */
@media (max-width: 768px) {
  .navbar-inner {
    padding: 0 var(--space-4);
  }

  .navbar-title {
    font-size: var(--text-sm);
  }

  .navbar-actions {
    gap: var(--space-2);
  }

  .navbar-actions .btn {
    font-size: var(--text-xs);
    padding: var(--space-2) var(--space-3);
  }

  .dashboard-content {
    padding: var(--space-5);
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .detail-header {
    flex-direction: column;
    gap: var(--space-4);
  }

  .detail-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .detail-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .upload-zone {
    padding: var(--space-8) var(--space-4);
  }

  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-3);
  }

  .login-card {
    padding: var(--space-8) var(--space-6);
  }

  .modal-content {
    max-width: 100%;
  }

  .section-header {
    margin-bottom: var(--space-5);
  }
}

@media (max-width: 480px) {
  .navbar-actions .btn span:not(.navbar-logo) {
    display: none;
  }

  .gallery-card-actions {
    flex-wrap: wrap;
  }

  .gallery-card-actions .btn {
    min-width: 0;
  }
}
