/* ==========================================================================
   Admin / CRUD Floating Bar & Modal
   ========================================================================== */
.admin-floating-bar {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 999;
}

.admin-bar-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.admin-btn {
  border: none;
  cursor: pointer;
  font-size: 0.825rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.admin-btn-toggle {
  background: #334155;
  color: white;
}

.admin-btn-toggle.active {
  background: #e11d48;
  color: white;
  box-shadow: 0 0 10px rgba(225, 29, 72, 0.5);
}

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

.admin-btn-secondary {
  background: #0284c7;
  color: white;
}

.admin-btn-danger {
  background: #475569;
  color: #f87171;
}

.admin-btn-danger:hover {
  background: #ef4444;
  color: white;
}

/* CRUD Action Buttons in Content */
.crud-action-container {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  z-index: 10;
}

.btn-crud-edit, .btn-crud-delete, .btn-crud-add {
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-crud-edit {
  background: #0284c7;
  color: white;
}

.btn-crud-delete {
  background: #ef4444;
  color: white;
}

.btn-crud-add {
  background: #10b981;
  color: white;
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.btn-crud-add:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* Edit Modal */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.admin-modal.open {
  opacity: 1;
  visibility: visible;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.admin-modal-dialog {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2010;
}

.admin-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-modal-header h3 {
  font-size: 1.15rem;
  color: var(--color-primary);
  font-weight: 700;
}

.admin-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-muted);
}

.admin-modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.col-half {
  flex: 1;
}

.admin-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}

.btn-cancel {
  background: white;
  border: 1px solid var(--color-border);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text-muted);
}

.btn-save {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
}

.btn-save:hover {
  background: var(--color-primary-light);
}

@media (max-width: 960px) {
  .admin-floating-bar {
    bottom: 20px;
    left: 20px;
  }
}
