/* ==========================================================================
   ADMIN MODE & IN-PAGE WEBSITE EDITOR STYLING
   ========================================================================== */

/* Faint Admin Trigger Button at bottom of screen */
.faint-admin-trigger {
  position: fixed;
  bottom: 12px;
  right: 16px;
  z-index: 9990;
  background: rgba(18, 14, 28, 0.4);
  color: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full, 9999px);
  padding: 0.3rem 0.8rem;
  font-size: 0.72rem;
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.faint-admin-trigger:hover {
  background: rgba(147, 51, 234, 0.85);
  color: #ffffff;
  border-color: rgba(168, 85, 247, 0.6);
  opacity: 1;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.5);
  transform: translateY(-2px);
}

/* Admin Password Modal */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(4, 3, 8, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.admin-modal-overlay.active {
  display: flex;
}

.admin-auth-card {
  width: 100%;
  max-width: 400px;
  background: #110d1c;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 16px;
  padding: 2.25rem 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(147, 51, 234, 0.2);
  text-align: center;
  position: relative;
  animation: adminSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.admin-auth-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(147, 51, 234, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #c084fc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 1.25rem;
}

.admin-auth-title {
  font-family: var(--font-heading, sans-serif);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.4rem;
}

.admin-auth-sub {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 1.5rem;
}

.admin-pin-input {
  width: 100%;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  font-size: 1.2rem;
  text-align: center;
  letter-spacing: 0.3em;
  font-family: var(--font-mono, monospace);
  outline: none;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

.admin-pin-input:focus {
  border-color: #a855f7;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.admin-auth-error {
  font-size: 0.8rem;
  color: #f87171;
  margin-bottom: 1rem;
  display: none;
}

.admin-auth-buttons {
  display: flex;
  gap: 0.75rem;
}

.admin-auth-btn-submit {
  flex: 1;
  padding: 0.8rem;
  background: linear-gradient(135deg, #9333ea, #c026d3);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.admin-auth-btn-cancel {
  padding: 0.8rem 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Floating Admin Top Toolbar (Visible when Admin Mode is ON) */
.admin-toolbar-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: rgba(14, 10, 24, 0.94);
  border-bottom: 2px solid #a855f7;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.6rem 1.5rem;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: adminSlideDown 0.3s ease;
}

body.admin-mode-active {
  /* set from the toolbar's measured height in admin.js */
  padding-top: var(--admin-bar-h, 55px);
}

body.admin-mode-active .admin-toolbar-bar {
  display: flex;
}

@keyframes adminSlideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.admin-toolbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 8px #a855f7;
  animation: adminPulse 1.5s infinite;
}

@keyframes adminPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.admin-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.admin-tool-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-1px);
}

.admin-tool-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.admin-tool-btn.btn-accent {
  background: linear-gradient(135deg, #9333ea, #c026d3);
  color: #fff;
  border: none;
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.4);
}

.admin-tool-btn.btn-accent:hover {
  background: linear-gradient(135deg, #a855f7, #d946ef);
}

.admin-tool-btn.btn-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.admin-tool-btn.btn-warning:hover {
  background: rgba(245, 158, 11, 0.3);
  color: #fff;
}

.admin-tool-btn.btn-reverse {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

.admin-tool-btn.btn-reverse:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

/* In-Page Editable Visual Highlights */
body.admin-mode-active [contenteditable="true"] {
  outline: 1px dashed rgba(168, 85, 247, 0.6);
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.05);
  cursor: text;
  transition: all 0.2s ease;
}

body.admin-mode-active [contenteditable="true"]:hover {
  outline-color: #a855f7;
  background: rgba(168, 85, 247, 0.12);
}

body.admin-mode-active [contenteditable="true"]:focus {
  outline: 2px solid #ec4899;
  background: rgba(236, 72, 153, 0.1);
}

/* Card Admin Badge & Controls */
.admin-card-controls {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  z-index: 20;
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: rgba(10, 7, 16, 0.9);
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

body.admin-mode-active .admin-card-controls {
  display: flex;
}

.admin-icon-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.admin-icon-btn:hover {
  background: #a855f7;
  color: #fff;
}

.admin-icon-btn.btn-del:hover {
  background: #ef4444;
}

/* Toast Notifications */
.admin-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  z-index: 10001;
  background: #181228;
  color: #fff;
  border: 1px solid rgba(168, 85, 247, 0.5);
  border-radius: 9999px;
  padding: 0.65rem 1.4rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(147, 51, 234, 0.3);
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.admin-toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.admin-toast.toast-success {
  border-color: #22c55e;
}

.admin-toast.toast-warning {
  border-color: #f59e0b;
}

.admin-toast.toast-reverse {
  border-color: #ef4444;
}

/* Add Object Modal */
.admin-add-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(4, 3, 8, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.admin-add-modal.active {
  display: flex;
}

.admin-add-dialog {
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  background: #110d1c;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.admin-add-dialog h3 {
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.admin-add-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1.25rem 0 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.admin-add-tab {
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  border: none;
}

.admin-add-tab.active {
  background: rgba(147, 51, 234, 0.25);
  color: #fff;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

/* ==========================================================================
   DRAGGABLE FONT EDITOR WINDOW
   ========================================================================== */
.font-editor-window {
  position: fixed;
  top: 90px;
  right: 25px;
  width: 320px;
  background: rgba(14, 10, 24, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.5);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(147, 51, 234, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10005;
  display: none;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  animation: fontEditorFade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.font-editor-window.active {
  display: flex;
}

@keyframes fontEditorFade {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.font-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
}

.font-editor-header:active {
  cursor: grabbing;
}

.font-editor-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading, sans-serif);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.font-drag-handle {
  color: var(--accent-purple-light, #c084fc);
  font-size: 1rem;
}

.font-editor-close-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.font-editor-close-btn:hover {
  background: #ec4899;
  color: #fff;
}

.font-editor-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-height: calc(85vh - 120px);
  overflow-y: auto;
  user-select: auto;
}

.font-editor-body::-webkit-scrollbar {
  width: 5px;
}
.font-editor-body::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.4);
  border-radius: 4px;
}

.font-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.font-control-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.font-select, .font-input {
  width: 100%;
  padding: 0.45rem 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #fff;
  font-size: 0.82rem;
  outline: none;
}

.font-select:focus, .font-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

.font-select option {
  background: #110d1c;
  color: #fff;
}

.font-range-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.font-range-input {
  flex: 1;
  accent-color: #a855f7;
  cursor: pointer;
}

.font-range-val {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  color: var(--accent-purple-light, #c084fc);
  min-width: 42px;
  text-align: right;
}

/* Quick Tool Buttons Grid (Bold, Italic, Align, Transform) */
.font-btn-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.font-action-btn {
  padding: 0.35rem 0.6rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  transition: all 0.2s ease;
}

.font-action-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: #a855f7;
}

.font-action-btn.active {
  background: #a855f7;
  color: #fff;
  border-color: #c084fc;
}

/* Color Presets & Pickers */
.font-color-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.font-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease;
}

.font-color-swatch:hover {
  transform: scale(1.2);
  border-color: #fff;
}

.font-color-native {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: none;
}

/* Target element badge in footer */
.font-editor-footer {
  padding: 0.6rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #64748b;
  font-family: var(--font-mono, monospace);
}

.font-target-tag {
  color: var(--accent-purple-light, #c084fc);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Admin Mode Header Coordination */
body.admin-mode-active .site-header {
  top: var(--admin-bar-h, 48px) !important;
}

body.admin-mode-active .filter-bar-sticky {
  top: calc(var(--admin-bar-h, 48px) + 94px) !important;
}

/* ==========================================================================
   SECTION CONTROLS & SECTION STUDIO
   ========================================================================== */
.admin-section-controls {
  position: absolute;
  top: 12px;
  right: 18px;
  z-index: 50;
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: rgba(14, 10, 24, 0.94);
  border: 1px solid rgba(168, 85, 247, 0.5);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7), 0 0 12px rgba(168, 85, 247, 0.3);
  backdrop-filter: blur(12px);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  user-select: none;
}

body.admin-mode-active section,
body.admin-mode-active .section {
  position: relative;
}

body.admin-mode-active section:hover .admin-section-controls,
body.admin-mode-active .section:hover .admin-section-controls {
  display: flex;
}

.admin-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #c084fc;
  font-family: var(--font-mono, monospace);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.4rem;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sec-btn {
  padding: 0.25rem 0.55rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.admin-sec-btn:hover {
  background: #a855f7;
  color: #fff;
  border-color: #c084fc;
}

.admin-sec-btn.btn-del-sec:hover {
  background: #ef4444;
  border-color: #f87171;
}

/* ==========================================================================
   FLOATING INLINE LINK EDITOR BUBBLE
   ========================================================================== */
.admin-link-bubble {
  position: fixed;
  z-index: 10010;
  background: #140f22;
  border: 1px solid #a855f7;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 18px rgba(168, 85, 247, 0.35);
  padding: 0.85rem 1rem;
  display: none;
  flex-direction: column;
  gap: 0.65rem;
  width: 320px;
  animation: linkBubbleFade 0.2s ease;
}

.admin-link-bubble.active {
  display: flex;
}

@keyframes linkBubbleFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.admin-link-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.admin-link-input {
  flex: 1;
  padding: 0.45rem 0.7rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: #fff;
  font-size: 0.82rem;
  outline: none;
}

.admin-link-input:focus {
  border-color: #ec4899;
}

.admin-link-btn {
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.admin-link-btn.btn-apply {
  background: linear-gradient(135deg, #9333ea, #c026d3);
  color: #fff;
}

.admin-link-btn.btn-remove {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Add Section Modal Layout */
.section-template-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-top: 1rem;
}

.template-card {
  padding: 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
}

.template-card:hover {
  background: rgba(147, 51, 234, 0.15);
  border-color: #a855f7;
  transform: translateY(-2px);
}

.template-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.template-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* ==========================================================================
   ENQUIRIES REPORT MODAL & INQUIRY SYSTEM
   ========================================================================== */
.admin-enq-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  background: #ec4899;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  margin-left: 0.2rem;
  line-height: 1;
}

.admin-enquiries-modal {
  position: fixed;
  inset: 0;
  z-index: 10015;
  background: rgba(4, 3, 8, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.admin-enquiries-modal.active {
  display: flex;
}

.admin-enquiries-dialog {
  width: 100%;
  max-width: 1050px;
  max-height: 90vh;
  background: #110d1c;
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(147, 51, 234, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.enquiries-header {
  padding: 1.25rem 1.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.enquiries-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.enquiries-title {
  font-family: var(--font-heading, sans-serif);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.enquiries-summary-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1rem 1.75rem;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.enquiry-kpi-card {
  display: flex;
  flex-direction: column;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.enquiry-kpi-num {
  font-family: var(--font-heading, sans-serif);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.enquiry-kpi-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.enquiries-controls-bar {
  padding: 0.75rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.enquiries-table-wrap {
  flex: 1;
  overflow-y: auto;
  max-height: calc(90vh - 300px);
}

.enquiries-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.enquiries-table th {
  padding: 0.85rem 1.25rem;
  background: rgba(18, 14, 28, 0.95);
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.enquiries-table td {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  vertical-align: middle;
}

.enquiries-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: 1px solid transparent;
}

.status-new {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  border-color: rgba(236, 72, 153, 0.4);
}

.status-contacted {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

.status-booked {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.4);
}

.status-archived {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.3);
}

.enquiry-detail-drawer {
  padding: 1.25rem 1.5rem;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  margin: 0.5rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.enquiry-message-box {
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  font-size: 0.9rem;
  color: #f1f5f9;
  line-height: 1.6;
  white-space: pre-wrap;
}

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

/* ==========================================================================
   ADMIN MODE LINK CONTEXT MENU (Right-Click on Links)
   ========================================================================== */
.admin-link-context-menu {
  position: fixed;
  z-index: 100050;
  background: #140f22;
  border: 1px solid #a855f7;
  border-radius: 10px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.9), 0 0 25px rgba(168, 85, 247, 0.35);
  padding: 0.5rem;
  width: 250px;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  font-family: inherit;
  animation: contextMenuPop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(14px);
  user-select: none;
}

.admin-link-context-menu.active {
  display: flex;
}

@keyframes contextMenuPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.context-menu-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.6rem 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.context-menu-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.context-menu-tag {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c084fc;
}

.context-menu-href {
  font-size: 0.74rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: monospace;
}

.context-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.2rem;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #f1f5f9;
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.context-menu-item:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.4);
  color: #ffffff;
}

.context-menu-item.item-primary {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.3);
  color: #f3e8ff;
}

.context-menu-item.item-primary:hover {
  background: linear-gradient(135deg, #7c3aed, #c026d3);
  border-color: #d8b4fe;
  color: #ffffff;
}

.cm-item-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.cm-item-title {
  font-weight: 600;
  font-size: 0.8rem;
}

.cm-item-sub {
  font-size: 0.68rem;
  color: #94a3b8;
}

.context-menu-item:hover .cm-item-sub {
  color: rgba(255, 255, 255, 0.8);
}

.context-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.2rem 0.25rem;
}

.admin-link-visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.42rem 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-link-visit-btn:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: #a855f7;
  color: #ffffff;
}

/* ==========================================================================
   AI PROMPT ASSISTANT MODAL (Prompt to Change Website)
   ========================================================================== */
.admin-tool-btn.btn-ai-prompt {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.45);
  font-weight: 700;
}

.admin-tool-btn.btn-ai-prompt:hover {
  background: linear-gradient(135deg, #f472b6, #a855f7);
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.65);
  transform: translateY(-1px);
}

.admin-prompt-modal {
  position: fixed;
  inset: 0;
  z-index: 100010;
  background: rgba(6, 4, 12, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: promptFadeIn 0.2s ease;
}

.admin-prompt-modal.active {
  display: flex;
}

@keyframes promptFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.admin-prompt-dialog {
  width: 100%;
  max-width: 680px;
  background: #120e22;
  border: 1px solid #c084fc;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(168, 85, 247, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.admin-prompt-header {
  padding: 1.25rem 1.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-prompt-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.admin-prompt-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #fff;
}

.admin-prompt-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.admin-prompt-close:hover {
  color: #fff;
}

.admin-prompt-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-prompt-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-prompt-textarea {
  width: 100%;
  min-height: 95px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  color: #ffffff;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: all 0.2s ease;
}

.admin-prompt-textarea:focus {
  border-color: #ec4899;
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.35);
}

.admin-prompt-chips-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 0.4rem;
}

.admin-prompt-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.prompt-chip {
  padding: 0.38rem 0.72rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.prompt-chip:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: #c084fc;
  color: #ffffff;
  transform: translateY(-1px);
}

.admin-prompt-footer {
  padding: 1rem 1.75rem;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-prompt-tip {
  font-size: 0.75rem;
  color: #64748b;
}

.admin-prompt-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-prompt-exec {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
}

.btn-prompt-exec:hover {
  background: linear-gradient(135deg, #f472b6, #a855f7);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.55);
}

@keyframes promptHighlightPulse {
  0% { outline: 3px solid #ec4899; box-shadow: 0 0 25px rgba(236, 72, 153, 0.9); }
  50% { outline: 3px solid #a855f7; box-shadow: 0 0 35px rgba(168, 85, 247, 0.95); }
  100% { outline: 2px solid transparent; box-shadow: none; }
}

.admin-prompt-highlight {
  animation: promptHighlightPulse 2.5s ease-out forwards !important;
  border-radius: 6px;
}

/* ==========================================================================
   IMAGE UPLOAD DROPZONE & PREVIEW (Add Content Studio)
   ========================================================================== */
.admin-image-upload-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.admin-dropzone {
  border: 1.5px dashed rgba(168, 85, 247, 0.4);
  border-radius: 8px;
  padding: 1.15rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.admin-dropzone:hover, .admin-dropzone.dragover {
  border-color: #ec4899;
  background: rgba(168, 85, 247, 0.1);
  transform: translateY(-1px);
}

.admin-img-preview-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 8px;
}

.admin-img-preview-box img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-img-preview-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.preview-filename {
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-filesize {
  font-size: 0.72rem;
  color: #94a3b8;
}

.admin-preview-remove-btn {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-preview-remove-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

.admin-url-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 0.2rem 0;
}

.admin-url-divider::before,
.admin-url-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-url-divider span {
  padding: 0 0.65rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #64748b;
}

/* ==========================================================================
   Resizable & Editable Text Boxes
   ========================================================================== */
.admin-mode-active .admin-resizable-textbox {
  position: relative;
  resize: both;
  overflow: auto;
  min-width: 160px;
  min-height: 48px;
  max-width: 100%;
  border: 1.5px dashed rgba(168, 85, 247, 0.7);
  border-radius: 8px;
  background: rgba(18, 14, 30, 0.75);
  backdrop-filter: blur(8px);
  padding: 1.75rem 1.25rem 1.25rem;
  margin: 1.25rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-mode-active .admin-resizable-textbox:hover,
.admin-mode-active .admin-resizable-textbox:focus-within {
  border-color: #c084fc;
  box-shadow: 0 0 0 2px rgba(192, 132, 252, 0.25), 0 8px 30px rgba(0, 0, 0, 0.5);
}

.admin-mode-active .admin-resizable-textbox::after {
  content: '⤡';
  position: absolute;
  right: 4px;
  bottom: 2px;
  font-size: 14px;
  font-weight: bold;
  color: #c084fc;
  pointer-events: none;
  line-height: 1;
  opacity: 0.9;
}

.admin-mode-active .admin-resizable-textbox::-webkit-resizer {
  background: #9333ea;
  border: 1px solid #c084fc;
  border-radius: 2px;
}

.admin-textbox-controls {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.5rem;
  background: rgba(30, 20, 50, 0.9);
  border-bottom: 1px solid rgba(168, 85, 247, 0.3);
  border-top-left-radius: 7px;
  border-top-right-radius: 7px;
  user-select: none;
  pointer-events: auto;
}

body:not(.admin-mode-active) .admin-textbox-controls,
body:not(.admin-mode-active) .admin-resizable-textbox::after {
  display: none !important;
}

body:not(.admin-mode-active) .admin-resizable-textbox {
  resize: none !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.admin-textbox-drag-handle {
  font-size: 0.68rem;
  font-weight: 700;
  color: #c084fc;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-textbox-delete-btn {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.admin-textbox-delete-btn:hover {
  background: #ef4444;
  color: #ffffff;
  transform: scale(1.1);
}

/* ==========================================================================
   AI Progress Popup Modal
   ========================================================================== */
.admin-progress-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 3, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.admin-progress-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.admin-progress-dialog {
  background: linear-gradient(135deg, #161129, #0d0a17);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  padding: 2.25rem 2rem 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(168, 85, 247, 0.25);
  text-align: center;
  transform: translateY(15px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-progress-modal.active .admin-progress-dialog {
  transform: translateY(0) scale(1);
}

.admin-progress-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
  border: 1.5px solid rgba(168, 85, 247, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
  color: #c084fc;
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(168, 85, 247, 0.3); transform: scale(1); }
  50% { box-shadow: 0 0 30px rgba(236, 72, 153, 0.6); transform: scale(1.06); }
}

.admin-progress-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.admin-progress-model-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-progress-bar-wrap {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  margin: 1.5rem 0 0.85rem;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.admin-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7c3aed, #a855f7, #ec4899);
  border-radius: 9999px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.6);
}

.admin-progress-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  color: #cbd5e1;
  margin-bottom: 0.35rem;
}

.admin-progress-step-text {
  font-weight: 600;
  color: #f1f5f9;
}

.admin-progress-percent {
  font-weight: 700;
  color: #c084fc;
}

.admin-progress-subnote {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}

/* LaceyLix: the door sits above the page but must never cover what is under
   the thumb, so on a phone it shrinks to a tab. */
@media (max-width: 700px) {
  .faint-admin-trigger {
    left: auto !important;
    right: 0.75rem !important;
    bottom: 0.75rem !important;
    padding: 0.35rem 0.6rem !important;
    font-size: 0.62rem !important;
    opacity: 0.55;
  }
}

/* the room's door in the toolbar */
.admin-room-tool {
  border-color: rgba(168, 85, 247, 0.55) !important;
  color: #c084fc !important;
}
.admin-room-tool:hover {
  background: rgba(168, 85, 247, 0.18) !important;
  color: #f0abfc !important;
}

/* ==========================================================================
   THE TOOLBAR ON A PHONE
   Fourteen tools have to stay on screen without swallowing the page. The bar
   keeps every button visible, shrinks its type and padding, and lets the
   status line drop rather than push the tools down.
   ========================================================================== */
@media (max-width: 700px) {
  .admin-toolbar-bar {
    padding: 0.45rem 0.6rem;
    gap: 0.35rem;
    max-height: 42vh;
    overflow-y: auto;
  }
  .admin-toolbar-left { display: none; }
  .admin-toolbar-actions {
    gap: 0.3rem;
    width: 100%;
    justify-content: flex-start;
  }
  .admin-tool-btn {
    padding: 0.3rem 0.5rem !important;
    font-size: 0.66rem !important;
    gap: 0.28rem !important;
    border-radius: 7px !important;
    min-height: 30px;
  }
  .admin-tool-btn svg { width: 12px; height: 12px; }
  .admin-enq-badge, .admin-diary-badge { min-width: 1rem; height: 1rem; font-size: 0.58rem; }
  /* the bar still has to be cleared, it is just shorter here */
  body.admin-mode-active { padding-top: var(--admin-bar-h, 0px); }
}
@media (max-width: 420px) {
  .admin-tool-btn { font-size: 0.62rem !important; padding: 0.28rem 0.42rem !important; }
}