body.admin-body {
  background-color: #f4f2ef;
  font-family: 'Segoe UI', sans-serif;
}

.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-card h2 {
  margin-bottom: 0.25rem;
  color: #8c6f53;
}

.stat-card p {
  margin: 0;
  color: #777;
}

.media-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.media-card img,
.media-card video {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.media-card-body {
  padding: 0.6rem;
}

.admin-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
}

.status-attesa_pagamento { background-color: #ffc107; color: #000; }
.status-nuovo { background-color: #0d6efd; }
.status-confermato { background-color: #6f42c1; }
.status-pagato { background-color: #198754; }
.status-completato { background-color: #6c757d; }
.status-annullato { background-color: #dc3545; }
.status-test { background-color: #fd7e14; }

/* ---------- App venditore (smartphone) ---------- */
.shop-tabbar { display: none; }

@media (max-width: 991.98px) {
  body.shop-app { padding-bottom: calc(68px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }
  .shop-topbar { padding-top: calc(.5rem + env(safe-area-inset-top)); }
  .shop-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    background: #fff; border-top: 1px solid #ddd; padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 10px rgba(0,0,0,.08);
  }
  .shop-tabbar a {
    flex: 1; text-align: center; padding: .45rem 0 .35rem; font-size: .7rem; color: #6b5d50; text-decoration: none;
    min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  }
  .shop-tabbar a span { font-size: 1.35rem; line-height: 1.2; position: relative; }
  .shop-tabbar a.active { color: #5b4a3a; font-weight: 600; background: #f4f2ef; }
  .shop-tabbar .badge { position: absolute; top: -4px; right: -12px; font-size: .6rem; padding: .2em .45em; }
  body.shop-app .container { padding-left: .75rem; padding-right: .75rem; }
  body.shop-app .btn, body.shop-app .form-control, body.shop-app .form-select { min-height: 44px; }
  body.shop-app .btn-sm { min-height: 40px; padding-left: .8rem; padding-right: .8rem; }
  body.shop-app .form-control, body.shop-app .form-select { font-size: 16px; } /* niente zoom automatico su iOS */
  body.shop-app h3 { font-size: 1.35rem; }

  /* tabelle -> schede */
  .table-cards { border: 0; background: transparent !important; }
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.07); margin-bottom: .75rem; padding: .5rem .75rem; }
  .table-cards tr[hidden] { display: none; }
  .table-cards td { border: 0 !important; padding: .25rem 0 !important; display: flex; justify-content: space-between; gap: .75rem; text-align: right; background: transparent !important; box-shadow: none !important; }
  .table-cards td[data-label]::before { content: attr(data-label); color: #8a7b6d; font-size: .8rem; text-align: left; flex: 0 0 auto; }
  .table-cards td.card-actions { justify-content: flex-end; padding-top: .5rem !important; }
  .table-cards td.card-actions .btn { flex: 1; }
  .table-cards td.card-actions form { flex: 1; display: flex !important; }
  .table-cards td.card-actions form .btn { width: 100%; }
  .table-cards td.card-hide-mobile { display: none; }
  .table-responsive:has(.table-cards) { overflow: visible; }
}
@media (min-width: 992px) { .mobile-only { display: none !important; } }
@media (max-width: 991.98px) {
  .table-cards td.card-hide-mobile-img { display: block; width: auto; }
  .table-cards td.card-hide-mobile-img:empty { display: none; }
}

@media (max-width: 991.98px) {
  body.shop-app .nav-tabs { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  body.shop-app .nav-tabs::-webkit-scrollbar { display: none; }
  .table-cards td.card-hide-mobile { display: none; }
  body.shop-app .media-card img, body.shop-app .media-card video { height: 120px; }
}

/* ---------- Pagine di login ---------- */
body.admin-body.login-page {
  background: linear-gradient(135deg, #f3ece5 0%, #e8d5c8 50%, #d9b9a5 100%);
  min-height: 100vh;
}
body.login-page > .container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.login-page > .container > * { width: 100%; }
body.login-page > .container { flex-direction: column; }
body.login-page > .container > .login-card { order: 1; }
body.login-page > .container > .alert {
  order: 2;
  max-width: 420px;
  margin: 1rem auto 0;
}
.login-card {
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  padding: 2.25rem 2rem 2rem;
  box-shadow: 0 20px 50px rgba(91, 74, 58, 0.22);
  border-top: 5px solid #b98a72;
  animation: login-in .5s ease both;
}
@keyframes login-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.login-logo {
  display: block;
  max-height: 96px;
  max-width: 220px;
  margin: 0 auto 1rem;
  object-fit: contain;
}
.login-brand {
  font-family: Georgia, 'Playfair Display', serif;
  font-size: 1.5rem;
  text-align: center;
  color: #3b3630;
  margin-bottom: .25rem;
}
.login-subtitle {
  text-align: center;
  color: #8a8378;
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}
.login-card .form-control {
  padding: .7rem .9rem;
  border-radius: 10px;
  background: #fbf8f5;
}
.login-card .form-control:focus {
  border-color: #b98a72;
  box-shadow: 0 0 0 .2rem rgba(185, 138, 114, .25);
  background: #fff;
}
.login-card .btn-dark {
  background: #8c6f53;
  border-color: #8c6f53;
  padding: .75rem;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: .03em;
}
.login-card .btn-dark:hover { background: #5b4a3a; border-color: #5b4a3a; }
.login-tagline {
  text-align: center;
  font-family: Georgia, 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: #b98a72;
  margin-bottom: .5rem;
}
