/* ============================================================
   Stonehouse Arizona — Admin Panel Styles
   ============================================================ */

/* ---------- Login Page ---------- */
.admin-login-page {
  background: #F5F0EB;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 1rem;
}

.login-box {
  background: #fff;
  border-radius: 4px;
  padding: 2.5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo .logo-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: #3B3028;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D4A853;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 700;
}

.login-logo h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  color: #3B3028;
  margin-bottom: .25rem;
}

.login-logo p {
  font-family: 'Montserrat', sans-serif;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #8A7E74;
}

.back-link {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  font-size: .85rem;
  color: #8A7E74;
}

.back-link:hover {
  color: #3B3028;
}

/* ---------- Admin Layout ---------- */
.admin-body {
  background: #F5F0EB;
  min-height: 100vh;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.admin-sidebar {
  width: 240px;
  background: #3B3028;
  color: #fff;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-family: 'Montserrat', sans-serif;
  font-size: .85rem;
  font-weight: 700;
}

.logo-icon-sm {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,.1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D4A853;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.sidebar-nav {
  padding: .5rem 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  color: rgba(255,255,255,.6);
  font-family: 'Montserrat', sans-serif;
  font-size: .8rem;
  font-weight: 500;
  transition: all .2s;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.sidebar-link:hover {
  color: #fff;
  background: rgba(255,255,255,.06);
}

.sidebar-link.active {
  color: #D4A853;
  background: rgba(255,255,255,.08);
  border-left: 3px solid #D4A853;
}

.sidebar-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,.08);
  margin: .5rem 1rem;
}

.sidebar-logout {
  color: rgba(255,255,255,.4) !important;
}
.sidebar-logout:hover {
  color: #e57373 !important;
}

/* ---------- Admin Main ---------- */
.admin-main {
  margin-left: 240px;
  flex: 1;
  min-height: 100vh;
}

.admin-content {
  padding: 2rem;
  max-width: 1100px;
}

.admin-content h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: #3B3028;
  margin-bottom: .25rem;
}

.admin-subtitle {
  color: #8A7E74;
  font-size: .9rem;
  margin-bottom: 2rem;
}

/* ---------- Alerts ---------- */
.alert {
  padding: .85rem 1.25rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-size: .9rem;
  font-weight: 500;
}

.alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.alert-error {
  background: #fbe9e7;
  color: #c62828;
  border: 1px solid #ffccbc;
}

/* ---------- Dashboard Stats ---------- */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #fff;
  border-radius: 4px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
}

.stat-card.stat-highlight {
  border: 2px solid #B8963E;
}

.stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #3B3028;
  line-height: 1;
}

.stat-label {
  font-family: 'Montserrat', sans-serif;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8A7E74;
  margin-top: .5rem;
}

.stat-link {
  display: inline-block;
  margin-top: .75rem;
  font-family: 'Montserrat', sans-serif;
  font-size: .75rem;
  color: #B8963E;
  font-weight: 600;
}

.stat-link:hover {
  color: #3B3028;
}

/* ---------- Quick Actions ---------- */
.dashboard-quick h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.quick-action {
  display: inline-block;
  padding: .65rem 1.25rem;
  background: #fff;
  border: 1px solid #E4DCD4;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  color: #3B3028;
  transition: all .2s;
}

.quick-action:hover {
  background: #B8963E;
  color: #fff;
  border-color: #B8963E;
}

/* ---------- Admin Form Cards ---------- */
.admin-form-card,
.admin-table-card {
  background: #fff;
  border-radius: 4px;
  padding: 2rem;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
  margin-bottom: 2rem;
}

.admin-form-card h2,
.admin-table-card h2 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid #E4DCD4;
}

.admin-form .form-group {
  margin-bottom: 1.25rem;
}

.admin-form .form-group label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: .75rem;
  margin-bottom: .4rem;
  color: #2A2420;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.admin-form .form-group input,
.admin-form .form-group select,
.admin-form .form-group textarea {
  width: 100%;
  padding: .7rem 1rem;
  border: 1px solid #E4DCD4;
  border-radius: 4px;
  font-family: 'Poppins', sans-serif;
  font-size: .9rem;
  color: #2A2420;
  background: #FAF8F5;
  transition: border-color .25s;
}

.admin-form .form-group input:focus,
.admin-form .form-group select:focus,
.admin-form .form-group textarea:focus {
  outline: none;
  border-color: #B8963E;
  box-shadow: 0 0 0 3px rgba(184,150,62,.1);
  background: #fff;
}

.admin-form .form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.admin-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #E4DCD4;
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section h2 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: #3B3028;
}

.form-actions {
  display: flex;
  gap: .75rem;
  margin-top: .5rem;
}

/* ---------- Admin Table ---------- */
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  font-family: 'Montserrat', sans-serif;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8A7E74;
  text-align: left;
  padding: .75rem .5rem;
  border-bottom: 2px solid #E4DCD4;
  font-weight: 700;
}

.admin-table td {
  padding: .75rem .5rem;
  border-bottom: 1px solid #F5F0EB;
  font-size: .85rem;
  color: #2A2420;
}

.admin-table tr:hover {
  background: #FAF8F5;
}

.actions-cell {
  white-space: nowrap;
}

.status-badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 2px;
  font-family: 'Montserrat', sans-serif;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.status-badge.upcoming {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-badge.past {
  background: #f5f5f5;
  color: #757575;
}

.btn-sm {
  display: inline-block;
  padding: .3rem .65rem;
  border-radius: 2px;
  font-family: 'Montserrat', sans-serif;
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  transition: all .2s;
}

.btn-edit {
  background: #fff;
  color: #B8963E;
  border-color: #B8963E;
}
.btn-edit:hover {
  background: #B8963E;
  color: #fff;
}

.btn-delete {
  background: #fff;
  color: #c62828;
  border-color: #e57373;
}
.btn-delete:hover {
  background: #c62828;
  color: #fff;
  border-color: #c62828;
}

/* ---------- Image Preview ---------- */
.existing-images {
  margin-top: .75rem;
}

.small-text {
  font-size: .8rem;
  color: #8A7E74;
  margin-bottom: .5rem;
}

.image-preview-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.preview-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #E4DCD4;
}

/* ---------- Admin Gallery Grid ---------- */
.admin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.admin-gallery-item {
  background: #FAF8F5;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #E4DCD4;
}

.admin-gallery-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.admin-gallery-item .no-image {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F5F0EB;
  color: #8A7E74;
  font-size: .8rem;
}

.admin-gallery-info {
  padding: .75rem;
}

.admin-gallery-info h4 {
  font-size: .9rem;
  margin-bottom: .25rem;
}

.admin-gallery-info p {
  font-size: .75rem;
  color: #8A7E74;
  margin-bottom: .5rem;
}

.admin-gallery-actions {
  display: flex;
  gap: .5rem;
}

/* ---------- Messages ---------- */
.messages-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message-card {
  background: #fff;
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
  border-left: 3px solid #B8963E;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: .5rem;
  flex-wrap: wrap;
  gap: .5rem;
}

.message-header strong {
  font-size: .95rem;
}

.message-email {
  color: #8A7E74;
  font-size: .85rem;
}

.message-date {
  font-family: 'Montserrat', sans-serif;
  font-size: .7rem;
  color: #8A7E74;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.message-meta {
  font-size: .85rem;
  color: #5C524A;
  margin-bottom: .25rem;
}

.message-body {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid #F5F0EB;
  color: #2A2420;
  line-height: 1.7;
  font-size: .9rem;
}

.message-actions {
  margin-top: 1rem;
  display: flex;
  gap: .5rem;
}

/* ---------- Responsive Admin ---------- */
@media (max-width: 768px) {
  .admin-sidebar {
    width: 60px;
  }

  .sidebar-brand span,
  .sidebar-link span:not(.sidebar-icon) {
    display: none;
  }

  .sidebar-link {
    justify-content: center;
    padding: .75rem;
  }

  .admin-main {
    margin-left: 60px;
  }

  .admin-content {
    padding: 1.5rem 1rem;
  }

  .admin-form .form-row {
    grid-template-columns: 1fr;
  }

  .dashboard-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
}
