/* ==========================================================================
   Wedding Virtual Photobooth - Admin Dashboard CSS
   ========================================================================== */

:root {
  --admin-primary: #7A1426; /* Deep Maroon */
  --admin-accent: #942238; /* Rose Maroon */
  --admin-gradient: linear-gradient(135deg, #8C1C30 0%, #680E1E 100%);
  --admin-dark: #1F0D11;
  --admin-bg: #F7EFE4; /* Warm noticeable wedding cream */
  --admin-card: #FFFFFF;
  --admin-border: #E8D0C9; /* Pink-cream border */
  --admin-text: #2A181B;
  --admin-muted: #74575C;
  --admin-pink: #F8ECE8;
  --radius: 12px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text);
  line-height: 1.5;
  min-height: 100vh;
}

/* Auth / PIN Screen */
.auth-wrapper {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 20px calc(56px + env(safe-area-inset-bottom, 0px));
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--admin-card);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: 0 10px 30px rgba(122, 20, 38, 0.08);
  border: 1px solid var(--admin-border);
  text-align: center;
}

.auth-card-top-nav {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.auth-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--admin-primary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius);
  background: var(--admin-pink);
  border: 1px solid var(--admin-border);
  transition: all 0.2s ease;
}

.auth-back-btn:hover {
  color: #580B1A;
  background: #F4E0DA;
}

.auth-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(122, 20, 38, 0.1);
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.auth-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--admin-muted);
  margin-bottom: 24px;
}

.pin-input-group {
  margin-bottom: 20px;
}

.pin-input {
  width: 100%;
  padding: 14px;
  font-size: 1.5rem;
  text-align: center;
  letter-spacing: 8px;
  border: 2px solid var(--admin-border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
}

.pin-input:focus {
  border-color: var(--admin-accent);
}

/* Dashboard Shell */
.admin-shell {
  display: none;
  min-height: 100vh;
  flex-direction: column;
}

.admin-shell.active {
  display: flex;
}

.admin-header {
  background: var(--admin-card);
  border-bottom: 1px solid var(--admin-border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-brand h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.badge-admin {
  background: var(--admin-pink);
  color: var(--admin-primary);
  border: 1px solid var(--admin-border);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-header-actions .btn {
  min-width: 116px;
  height: 36px;
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  white-space: nowrap;
}

/* Navigation Tabs */
.admin-tabs {
  background: var(--admin-card);
  border-bottom: 1px solid var(--admin-border);
  padding: 0 24px;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 14px 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--admin-muted);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tab-btn.active {
  color: var(--admin-primary);
  border-bottom-color: var(--admin-primary);
}

/* Main Container */
.admin-main {
  flex: 1;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 20px calc(56px + env(safe-area-inset-bottom, 0px));
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Cards & Sections */
.admin-card {
  background: var(--admin-card);
  border-radius: var(--radius);
  border: 1px solid var(--admin-border);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(122, 20, 38, 0.04);
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.admin-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--admin-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--admin-gradient);
  color: #FFF;
  box-shadow: 0 4px 14px rgba(122, 20, 38, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7A1426 0%, #580B1A 100%);
  box-shadow: 0 6px 18px rgba(122, 20, 38, 0.35);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--admin-border);
  color: var(--admin-text);
}

.btn-outline:hover {
  background: var(--admin-pink);
  color: var(--admin-primary);
}

.btn-danger {
  background: #FFF1F0;
  color: #D32F2F;
  border: 1px solid #FFCCC7;
}

.btn-danger:hover {
  background: #FF4D4F;
  color: #FFF;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Frame Grid */
.frames-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.frame-item-card {
  border: 1px solid var(--admin-border);
  border-radius: var(--radius);
  padding: 16px;
  background: #FFF;
  display: flex;
  flex-direction: column;
}

.frame-item-preview {
  width: 100%;
  aspect-ratio: 9/16;
  background: #F3ECE2;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid #E2D7C7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frame-item-preview.landscape {
  aspect-ratio: 16/9;
}

.frame-item-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.frame-item-info {
  margin-bottom: 12px;
}

.frame-item-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.frame-item-meta {
  font-size: 0.8rem;
  color: var(--admin-muted);
}

.frame-item-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

/* Form Styles */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--admin-text);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--admin-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--admin-accent);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--admin-muted);
  margin-top: 4px;
}

/* Welcome Lines Input Styles */
.welcome-lines-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-line-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.line-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--admin-primary);
  background: var(--admin-pink);
  border: 1.5px solid var(--admin-border);
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  min-width: 72px;
  text-align: center;
  user-select: none;
}

.input-line-row .form-input {
  flex: 1;
}

/* Frame Slot Overlay Tester Modal */
.overlay-tester-box {
  width: 200px;
  max-width: 100%;
  aspect-ratio: 9/16;
  position: relative;
  background: #1F0D11;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(122, 20, 38, 0.12);
  transition: width 0.3s ease, aspect-ratio 0.3s ease;
}

.overlay-tester-box.landscape-preview {
  width: 260px;
  aspect-ratio: 16/9;
}

.tester-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Dialog Compliance */
dialog[open],
dialog:modal {
  overscroll-behavior: contain;
  margin: auto;
  border: none;
  background: #FFF;
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 520px;
  padding: 24px;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

/* QR Code Section */
.qr-display-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
}

.qr-image-wrapper {
  padding: 16px;
  background: #FFF;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.qr-image-wrapper img {
  width: 240px;
  height: 240px;
  display: block;
}

.qr-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 440px;
  margin-bottom: 20px;
}

/* ==========================================================================
   Admin Fixed Footer Hashtag (#lucKYcanTAkeyourlove)
   ========================================================================== */
.admin-fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 16px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  background: linear-gradient(to top, rgba(247, 239, 228, 0.96) 0%, rgba(247, 239, 228, 0.8) 65%, transparent 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.admin-hashtag-text {
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  line-height: 1.4;
  letter-spacing: 0.14em;
  color: var(--admin-primary);
  font-weight: 600;
  opacity: 0.9;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: break-word;
  user-select: none;
  pointer-events: auto;
}

/* ==========================================================================
   Hasil Photo Gallery & Management Tab Styles
   ========================================================================== */

/* Tab Counter Badge */
.tab-counter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--admin-pink);
  color: var(--admin-primary);
  margin-left: 6px;
  border: 1px solid var(--admin-border);
  transition: all 0.2s ease;
}

.tab-btn.active .tab-counter-badge {
  background: var(--admin-primary);
  color: #FFF;
  border-color: var(--admin-primary);
}

/* Stats Overview Bar */
.photos-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #FFF;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.stat-pill-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--admin-pink);
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.stat-pill-content {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--admin-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--admin-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Toolbar & Filters */
.photos-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #FFF;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.photos-toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.photos-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.custom-select-all-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--admin-text);
  cursor: pointer;
  user-select: none;
}

.custom-select-all-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--admin-primary);
  cursor: pointer;
}

.selected-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--admin-primary);
  background: var(--admin-pink);
  border: 1px solid var(--admin-border);
  padding: 3px 10px;
  border-radius: 999px;
}

.photos-filter-select {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--admin-border);
  background-color: #FFF;
  color: var(--admin-text);
  cursor: pointer;
  font-family: inherit;
  outline: none;
}

.photos-filter-select:focus {
  border-color: var(--admin-primary);
}

/* Empty State */
.photos-empty-state {
  text-align: center;
  padding: 56px 20px;
  background: #FFF;
  border: 1px dashed var(--admin-border);
  border-radius: var(--radius);
  margin: 10px 0 24px;
}

.photos-empty-icon {
  font-size: 3rem;
  color: var(--admin-muted);
  opacity: 0.45;
  margin-bottom: 12px;
}

.photos-empty-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--admin-primary);
  margin-bottom: 6px;
}

.photos-empty-desc {
  font-size: 0.88rem;
  color: var(--admin-muted);
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.5;
}

.photos-empty-desc code {
  background: var(--admin-pink);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--admin-primary);
}

/* Photos Grid */
.admin-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

/* Photo Card */
.admin-photo-card {
  position: relative;
  background: #FFF;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.admin-photo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(122, 20, 38, 0.12);
  border-color: #D3A7A0;
}

.admin-photo-card.selected {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 2px var(--admin-primary);
}

/* Card Checkbox Overlay */
.photo-card-checkbox-wrap {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border-radius: 6px;
  padding: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-card-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--admin-primary);
  cursor: pointer;
  margin: 0;
}

/* Card Badge (Orientation / Size) */
.photo-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  background: rgba(42, 24, 27, 0.82);
  backdrop-filter: blur(4px);
  color: #FFF;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* Card Thumbnail / Preview Wrapper */
.photo-card-thumb-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #F4EBE6;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* If a photo canvas is truly wide (horizontal width > height), adapt the thumbnail */
.admin-photo-card.is-wide-canvas .photo-card-thumb-wrapper {
  aspect-ratio: 16 / 9;
}

.admin-photo-card.is-landscape .photo-card-badge {
  background: rgba(122, 20, 38, 0.88);
  border: 1px solid rgba(212, 175, 55, 0.45);
}

.photo-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  display: block;
}

.photo-card-thumb-wrapper:hover .photo-card-img {
  transform: scale(1.03);
}

/* Hover Quick Overlay */
.photo-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(31, 13, 17, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.photo-card-thumb-wrapper:hover .photo-card-overlay {
  opacity: 1;
  pointer-events: auto;
}

.photo-overlay-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #FFF;
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  text-decoration: none;
}

.photo-overlay-btn:hover {
  transform: scale(1.1);
  background: var(--admin-primary);
  color: #FFF;
}

/* Card Details Footer */
.photo-card-info {
  padding: 12px 14px;
  background: #FFF;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  justify-content: space-between;
}

.photo-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--admin-muted);
}

.photo-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--admin-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--admin-border);
}

.photo-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--admin-border);
  background: transparent;
  color: var(--admin-text);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.photo-action-btn:hover {
  background: var(--admin-pink);
  color: var(--admin-primary);
}

.photo-action-btn.btn-delete:hover {
  background: #FFF1F0;
  color: #D32F2F;
  border-color: #FFCCC7;
}

/* ==========================================================================
   Photo Lightbox Modal
   ========================================================================== */
.photo-lightbox-modal {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: 90vw;
  max-height: 92vh;
  background: #FFF;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  margin: auto;
  overflow: hidden;
}

.photo-lightbox-modal::backdrop {
  background: rgba(20, 8, 11, 0.75);
  backdrop-filter: blur(6px);
}

.lightbox-container {
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  width: 100%;
  max-width: 820px;
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--admin-border);
  background: #FFF;
}

.lightbox-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--admin-primary);
}

.lightbox-meta {
  font-size: 0.78rem;
  color: var(--admin-muted);
}

.lightbox-close-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--admin-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.lightbox-close-btn:hover {
  color: var(--admin-primary);
  background: var(--admin-pink);
}

.lightbox-body {
  padding: 16px;
  background: #180B0E;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: auto;
  flex: 1;
  min-height: 360px;
  max-height: calc(92vh - 140px);
  gap: 12px;
}

.lightbox-body img {
  max-width: 100%;
  max-height: calc(92vh - 220px);
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Voice Note Styles in Admin Photo Gallery
   ========================================================================== */
.photo-card-voicenote-box {
  background: linear-gradient(135deg, rgba(122, 20, 38, 0.05) 0%, rgba(212, 175, 55, 0.08) 100%);
  border-top: 1px solid rgba(122, 20, 38, 0.12);
  border-bottom: 1px solid rgba(122, 20, 38, 0.12);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.vn-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vn-sender-pill {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--admin-primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vn-duration-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--admin-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vn-player-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vn-card-play-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--admin-primary);
  color: #FFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.vn-card-play-btn:hover {
  background: #961930;
  transform: scale(1.06);
}

.vn-card-play-btn.playing {
  background: #D32F2F;
}

.vn-progress-bar-wrap {
  flex: 1;
  height: 5px;
  background: rgba(122, 20, 38, 0.15);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.vn-progress-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #7A1426, #D4AF37);
  border-radius: 3px;
  transition: width 0.1s linear;
}

.vn-card-dl-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(122, 20, 38, 0.08);
  border: 1px solid rgba(122, 20, 38, 0.15);
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.vn-card-dl-btn:hover {
  background: var(--admin-primary);
  color: #FFF;
}

.photo-card-no-voice-tag {
  padding: 6px 12px;
  font-size: 0.7rem;
  color: var(--admin-muted);
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 5px;
  background: #FAFAFA;
}

/* Lightbox Voice Note Card */
.lightbox-voice-section {
  width: 100%;
  max-width: 500px;
  margin-top: 2px;
}

.lightbox-voice-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-md, 12px);
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lightbox-voice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lb-vn-sender {
  font-size: 0.86rem;
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.lb-vn-duration {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--admin-muted);
}

.lightbox-voice-player-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lightbox-voice-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--admin-primary);
  color: #FFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.lightbox-voice-play-btn:hover {
  background: #961930;
  transform: scale(1.05);
}

.lightbox-voice-play-btn.playing {
  background: #D32F2F;
}

.lightbox-voice-progress-track {
  flex: 1;
  height: 6px;
  background: rgba(122, 20, 38, 0.15);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.lightbox-voice-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #7A1426, #D4AF37);
  border-radius: 3px;
  transition: width 0.1s linear;
}

.lightbox-voice-dl-btn {
  font-size: 0.78rem;
  padding: 6px 12px;
  white-space: nowrap;
}

.lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--admin-border);
  background: #FFF;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   Responsive Mobile Optimization for Admin Dashboard
   ========================================================================== */
@media (max-width: 640px) {
  .admin-header {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .admin-brand {
    gap: 6px;
    min-width: 0;
    flex-shrink: 1;
  }

  .admin-brand h1 {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .badge-admin {
    font-size: 0.68rem;
    padding: 2px 6px;
    flex-shrink: 0;
  }

  .admin-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  /* Both Portal Tamu and Keluar buttons have identical dimensions and symmetrical look */
  .admin-header-actions .btn {
    min-width: 95px;
    width: 95px;
    height: 33px;
    padding: 0 8px;
    font-size: 0.74rem;
    gap: 5px;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
  }

  .admin-tabs {
    padding: 0 12px;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .admin-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    font-size: 0.82rem;
    padding: 12px 2px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .admin-main {
    padding: 16px 12px;
  }

  .admin-card {
    padding: 16px 14px;
    margin-bottom: 16px;
  }

  .admin-card-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
  }

  .admin-card-title {
    font-size: 1.05rem;
  }

  #open-upload-modal-btn {
    width: 100%;
    justify-content: center;
    height: 38px;
    font-size: 0.84rem;
    padding: 0 16px;
  }

  .frames-admin-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .photos-stats-bar {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .photos-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .photos-toolbar-left,
  .photos-toolbar-right {
    width: 100%;
    justify-content: space-between;
  }
}



