/* =========================================================
   Embroidery Byron Bay — Admin area styles
   Reuses color variables/fonts from styles.css
   ========================================================= */

.admin-body {
  background: var(--color-cream-deep);
  min-height: 100vh;
}

.admin-body .btn-small {
  padding: 9px 16px;
  font-size: 0.85rem;
}

/* ---------- Login ---------- */
.admin-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.admin-auth-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.admin-auth-card .logo {
  display: inline-flex;
  margin-bottom: 20px;
}
.admin-auth-card h1 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}
.admin-auth-lead {
  color: var(--color-text-soft);
  font-size: 0.9rem;
  margin-bottom: 22px;
}
.admin-auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}
.admin-auth-form button {
  border: none;
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}
.admin-auth-back {
  margin-top: 20px;
  margin-bottom: 0;
  font-size: 0.85rem;
}
.admin-auth-back a { color: var(--color-text-soft); }
.admin-auth-back a:hover { color: var(--color-teal); }

/* ---------- Admin header ---------- */
.admin-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}
.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
  flex-wrap: wrap;
}
.admin-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.admin-username {
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

/* ---------- Dashboard ---------- */
.admin-main { padding-block: 34px 60px; }
.admin-main h1 { font-size: 1.6rem; margin-bottom: 4px; }
.admin-sub {
  color: var(--color-text-soft);
  font-size: 0.9rem;
  margin-bottom: 22px;
}
.admin-empty {
  background: #fff;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 30px;
  text-align: center;
  color: var(--color-text-soft);
}

.admin-table-wrap {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  min-width: 860px;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
.admin-table th {
  font-family: var(--font-display);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-soft);
  background: var(--color-cream);
  white-space: nowrap;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr.is-replied { background: #F3FAF5; }

.admin-table .nowrap { white-space: nowrap; }
.admin-name { font-weight: 600; color: var(--color-navy); }
.admin-company { font-size: 0.8rem; color: var(--color-text-soft); }
.admin-message {
  max-width: 320px;
  white-space: pre-wrap;
}
.admin-logo-name {
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  font-size: 0.82rem;
}

.reply-toggle-form { margin: 0; }
.reply-toggle {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-border);
  background: var(--color-cream);
  color: var(--color-navy);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.reply-toggle:hover { border-color: var(--color-teal); }
.reply-toggle.is-replied {
  background: var(--color-teal);
  border-color: var(--color-teal);
  color: #fff;
}
.reply-toggle:disabled { opacity: 0.6; cursor: default; }

/* ---------- Admin nav ---------- */
.admin-nav {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}
.admin-nav-inner {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.admin-nav a {
  display: inline-block;
  padding: 12px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-text-soft);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.admin-nav a:hover { color: var(--color-navy); }
.admin-nav a.is-active {
  color: var(--color-teal);
  border-bottom-color: var(--color-teal);
}

/* ---------- Admin section headers ---------- */
.admin-main-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 22px;
}
.admin-main-head h1 { margin-bottom: 2px; }
.admin-main-head .admin-sub { margin-bottom: 0; }

/* ---------- Row actions (edit/delete links) ---------- */
.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.admin-row-actions form { margin: 0; }
.text-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-teal);
  cursor: pointer;
}
.text-link:hover { text-decoration: underline; }
.text-link-danger { color: #B23A3A; }

/* ---------- Star rating (testimonials list) ---------- */
.star-rating { display: inline-flex; gap: 1px; color: var(--color-border); }
.star-rating .star.is-filled { color: var(--color-orange); }

/* ---------- Admin add/edit forms ---------- */
.admin-form-wrap { max-width: 640px; }
.admin-form-wrap h1 { margin-bottom: 20px; }
.admin-form {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.admin-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}
.admin-form-actions .btn-primary { border: none; }
.admin-current-image {
  display: flex;
  align-items: center;
  gap: 14px;
}
.admin-current-image img {
  width: 110px;
  height: 82px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--color-border);
}
.admin-current-image .form-hint { margin: 0; }

/* ---------- Admin gallery grid ---------- */
.admin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}
.admin-gallery-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.admin-gallery-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.admin-gallery-card-body { padding: 12px 14px; }
.admin-gallery-title {
  margin: 0 0 10px;
  font-size: 0.86rem;
  color: var(--color-navy);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Admin suppliers (reuses .admin-gallery-* grid/card) ---------- */
.admin-supplier-logo-wrap {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-cream);
  padding: 12px;
}
.admin-supplier-logo-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.admin-supplier-url {
  margin: 0 0 10px;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-supplier-url a { color: var(--color-text-soft); }
.admin-supplier-url a:hover { color: var(--color-teal); }

@media (min-width: 640px) {
  .admin-auth-card { padding: 40px 36px; }
  .admin-main-head { flex-direction: row; align-items: center; justify-content: space-between; }
}
