/* ==========================================================================
   K-PRECISION INLINE ADMIN STYLES
   ========================================================================== */

/* FLOATING ADMIN BAR */
.kp-admin-bar {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #f8fafc;
  padding: 10px 18px;
  border-radius: 9999px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  transition: all 0.2s ease;
}

.kp-admin-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.kp-admin-dot {
  width: 9px;
  height: 9px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.kp-admin-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.kp-admin-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.kp-admin-btn-primary {
  background: #0284c7;
  border-color: #38bdf8;
}

.kp-admin-btn-primary:hover {
  background: #0369a1;
}

.kp-admin-btn-danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.kp-admin-btn-danger:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #fff;
}

/* PRODUCT CARD ADMIN ACTIONS */
.kp-card-admin-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  z-index: 20;
  opacity: 0.95;
  transition: opacity 0.2s ease;
}

.kp-card-btn {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.kp-card-edit-btn {
  background: #0284c7;
  color: #fff;
}
.kp-card-edit-btn:hover {
  background: #0369a1;
}

.kp-card-delete-btn {
  background: #ef4444;
  color: #fff;
}
.kp-card-delete-btn:hover {
  background: #dc2626;
}

/* MODAL OVERLAY & CONTAINER */
.kp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 20px;
}

.kp-modal {
  background: #ffffff;
  color: #0f172a;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  animation: kpModalFadeIn 0.2s ease-out;
}

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

.kp-modal-header {
  padding: 18px 24px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kp-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kp-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}
.kp-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

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

.kp-modal-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* FORM CONTROLS */
.kp-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kp-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .kp-form-row {
    grid-template-columns: 1fr;
  }
}

.kp-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kp-input, .kp-textarea, .kp-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.kp-input:focus, .kp-textarea:focus, .kp-select:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.kp-textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.5;
}

/* IMAGE UPLOAD BOX */
.kp-image-upload-box {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: #f8fafc;
  transition: border-color 0.2s ease;
}

.kp-image-upload-box:hover {
  border-color: #0284c7;
}

.kp-image-preview {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 4px;
}

.kp-upload-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.kp-upload-hint {
  font-size: 12px;
  color: #64748b;
}

/* SPECS BUILDER */
.kp-specs-builder {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kp-spec-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.kp-spec-row input {
  flex: 1;
}

.kp-spec-remove {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 16px;
  border-radius: 4px;
}
.kp-spec-remove:hover {
  background: #fee2e2;
}

/* TOAST NOTIFICATION */
.kp-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  background: #0f172a;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  z-index: 100001;
  animation: kpToastSlide 0.25s ease-out;
  border-left: 4px solid #10b981;
}

@keyframes kpToastSlide {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* INLINE TEXT EDITABLE */
.kp-editable-active {
  outline: 2px dashed rgba(2, 132, 199, 0.4);
  outline-offset: 4px;
  border-radius: 4px;
  cursor: text;
  transition: outline 0.15s ease, background 0.15s ease;
}

.kp-editable-active:hover {
  outline: 2px solid #0284c7;
  background: rgba(2, 132, 199, 0.05);
}

.kp-editable-active:focus {
  outline: 2px solid #0284c7;
  background: rgba(2, 132, 199, 0.08);
}
