/* ───── Admin Refined Styles ───── */

:root {
  --admin-red: #d32f2f;
  --admin-accent: #00b4c8;
}

/* 1. Login Modal */
.modal-wrap {
  position: fixed; inset: 0; background: rgba(13, 31, 60, 0.8);
  backdrop-filter: blur(8px); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s;
}
.modal-wrap.o { opacity: 1; pointer-events: auto; }

.modal-box {
  background: #fff; padding: 40px; border-radius: 20px;
  width: 100%; max-width: 400px; position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  transform: translateY(20px); transition: transform 0.4s;
}
.modal-wrap.o .modal-box { transform: translateY(0); }

.modal-close {
  position: absolute; top: 20px; right: 20px;
  background: none; border: none; font-size: 24px; cursor: pointer; color: #999;
}

/* 2. Admin Indicator Bar */
.admin-indicator {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: rgba(13, 31, 60, 0.95);
  padding: 8px 16px; border-radius: 100px;
  display: flex; align-items: center; gap: 16px;
  z-index: 10000; color: #fff; font-weight: 600; font-size: 0.85rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
}
.admin-indicator .dot { width: 8px; height: 8px; background: #00ff88; border-radius: 50%; box-shadow: 0 0 10px #00ff88; }
.admin-indicator button {
  background: none; border: 1px solid rgba(255,255,255,0.3); color: #fff;
  padding: 4px 12px; border-radius: 4px; cursor: pointer; font-size: 0.75rem;
  transition: all 0.3s;
}
.admin-indicator button:hover { background: #fff; color: #000; }

/* 3. Pencil Edit Buttons */
.edit-btn {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; background: var(--admin-red);
  color: #fff; border: none; border-radius: 4px;
  cursor: pointer; z-index: 1001; /* Above navbar (800) */
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  opacity: 0.2; transition: opacity 0.3s, transform 0.3s;
}
.editable-container:hover .edit-btn { opacity: 1; transform: scale(1.1); }
.editable-container { position: relative !important; }

/* 4. Editor Modal */
.editor-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px); z-index: 10001;
  opacity: 0; pointer-events: none; transition: 0.4s;
}
.editor-backdrop.active { opacity: 1; pointer-events: auto; }

.editor-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -40%);
  width: 95%; max-width: 600px; max-height: 90vh; background: #fff;
  border-radius: 16px; padding: 32px; z-index: 10002;
  opacity: 0; pointer-events: none; transition: 0.4s;
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
  overflow-y: auto; overflow-x: hidden;
}
.editor-modal.active { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }

/* Premium Scrollbar */
.editor-modal::-webkit-scrollbar { width: 6px; }
.editor-modal::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
.editor-modal::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
.editor-modal::-webkit-scrollbar-thumb:hover { background: #999; }

.editor-modal h3 { margin-top: 0; margin-bottom: 24px; color: #111; font-size: 1.5rem; }

.editor-form-group { margin-bottom: 20px; }
.editor-form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #555; font-size: 0.9rem; }
.editor-form-group input, .editor-form-group textarea {
  width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px;
  font-family: inherit; font-size: 1rem;
}
.editor-form-group textarea { resize: vertical; }

.editor-actions { display: flex; justify-content: flex-end; gap: 16px; margin-top: 32px; }
.btn-cancel { background: #f5f5f5; border: none; color: #666; padding: 12px 24px; border-radius: 8px; cursor: pointer; }
.btn-save { background: var(--admin-red); border: none; color: #fff; padding: 12px 24px; border-radius: 8px; cursor: pointer; font-weight: 600; }

/* 5. Upload Styles */
.upload-area {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 12px;
  border: 1px solid #eee;
}
.file-input-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 2px dashed #ddd;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: #666;
  transition: all 0.3s ease;
}
.file-input-label:hover {
  background: #f0fbff;
  border-color: var(--admin-accent);
  color: var(--admin-accent);
}
.file-input-hidden {
  display: none;
}
.upload-progress-container {
  height: 6px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
  display: none;
}
.upload-progress-container.active {
  display: block;
}
.upload-progress-bar {
  height: 100%;
  background: var(--admin-accent);
  width: 0%;
  transition: width 0.3s ease;
}
.upload-status {
  font-size: 0.75rem;
  color: #888;
  display: flex;
  justify-content: space-between;
}
.upload-preview {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  display: none;
}
.upload-preview.active {
  display: block;
}
