/* ===========================================
   ADMIN-SPECIFIC STYLES

   These styles only apply to the admin page.
   The main styles.css still handles the header,
   buttons, fonts, etc.
   =========================================== */


/* Header right side — badge + logout button */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Badge that says "ADMIN" next to the logo */
.admin-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  background-color: #ff4e00;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
}

/* Logout button in the header */
.logout-btn {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: none;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.logout-btn:hover {
  border-color: #fff;
}


/* ===========================================
   LOGIN SCREEN

   Centered card with email + password fields.
   Shown when not logged in, hidden after login.
   =========================================== */

.login-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 24px;
}

.login-form {
  background: #fff;
  border-radius: 12px;
  padding: 40px 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  width: 100%;
  max-width: 380px;
}

.login-form h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 14px;
  color: #888;
  margin-bottom: 24px;
}

.login-form label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #555;
  margin-bottom: 6px;
}

.login-form input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 16px;
  outline: none;
}

.login-form input:focus {
  border-color: #111;
}

.login-submit-btn {
  width: 100%;
  margin-top: 8px;
}

.login-error {
  background: #fff3f0;
  color: #d32f2f;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}


/* ===========================================
   ADMIN LAYOUT

   Two-column layout on desktop, stacks on
   mobile. The form is on the left, the item
   list is on the right.
   =========================================== */

.admin-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  align-items: start;
}

/* Stack on smaller screens */
@media (max-width: 800px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
}


/* ===========================================
   ADD / EDIT FORM
   =========================================== */

.admin-form-section {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 96px;    /* Below the header */
}

.admin-form-section h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 20px;
}

.admin-form label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #555;
  margin-bottom: 6px;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 16px;
  outline: none;
  background: #fff;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  border-color: #111;
}

.admin-form textarea {
  resize: vertical;
}

/* ===========================================
   IMAGE UPLOAD AREA

   A tappable box that shows a "+" placeholder
   when empty, or a preview of the selected /
   existing photo.
   =========================================== */

.image-upload-area {
  position: relative;
  width: 100%;
  height: 180px;
  border: 2px dashed #ddd;
  border-radius: 8px;
  margin-bottom: 16px;
  cursor: pointer;
  overflow: hidden;
  background: #fafafa;
}

.image-upload-area:hover {
  border-color: #bbb;
}

.image-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #aaa;
  font-size: 13px;
  font-weight: 600;
  gap: 4px;
}

.image-placeholder-icon {
  font-size: 28px;
  line-height: 1;
}

.image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.form-buttons {
  display: flex;
  gap: 10px;
}


/* ===========================================
   ADMIN BUTTONS
   =========================================== */

.admin-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.admin-btn.primary {
  background-color: #111;
  color: #fff;
  flex: 1;
}

.admin-btn.primary:hover {
  background-color: #ff4e00;
}

.admin-btn.secondary {
  background-color: #eee;
  color: #555;
}

.admin-btn.secondary:hover {
  background-color: #ddd;
}


/* ===========================================
   ADMIN ITEM LIST

   Each item shows as a row with the image,
   details, and action buttons.
   =========================================== */

.admin-list-section h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
}

.admin-item-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-item {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.admin-item-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  background-color: #eee;
  flex-shrink: 0;
}

.admin-item-details {
  flex: 1;
  min-width: 0;   /* Prevents text overflow issues */
}

.admin-item-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.admin-item-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}

.admin-item-reserved {
  font-size: 12px;
  color: #e65100;
  font-weight: 600;
}

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

.action-btn {
  padding: 6px 12px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  color: #555;
  transition: all 0.15s;
}

.action-btn:hover {
  border-color: #111;
  color: #111;
}

.action-btn.danger {
  color: #d32f2f;
  border-color: #ffcdd2;
}

.action-btn.danger:hover {
  background-color: #d32f2f;
  border-color: #d32f2f;
  color: #fff;
}

.action-btn.success {
  color: #2e7d32;
  border-color: #c8e6c9;
}

.action-btn.success:hover {
  background-color: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}


/* ===========================================
   OFFERS LIST (inside each admin item)
   =========================================== */

.admin-offers {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

.admin-offers-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin-bottom: 6px;
}

.admin-offer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0;
}

.admin-offer-row strong {
  color: #111;
}

/* On small screens, stack the admin item layout */
@media (max-width: 600px) {
  .admin-item {
    flex-direction: column;
  }

  .admin-item-image {
    width: 100%;
    height: 160px;
  }
}
