/* AhorraMari webapp (PHP) — vanilla */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    Outfit,
    "Segoe UI",
    system-ui,
    sans-serif;
  background: #f8f9fa;
  color: #1e293b;
  min-height: 100vh;
}

#app.auth-page {
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* ---- Pantalla login/registro (split) ---- */
.auth-split {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .auth-split {
    grid-template-columns: 1fr 1fr;
  }
}

.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(32px, 8vw, 64px);
  text-align: center;
  overflow: hidden;
  min-height: 38vh;

  color: #fff;
  background: linear-gradient(
    165deg,
    #46e08f 0%,
    #2abf6d 22%,
    #21a357 52%,
    #158749 78%,
    #0f6b36 100%
  );
}

/* Brillo tipo “highlight” sobre el degradado del panel */
.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 135% 90% at 18% -8%,
    rgb(255 255 255 / 0.35) 0%,
    rgb(255 255 255 / 0.08) 42%,
    transparent 72%
  );
}

.auth-brand-mascot {
  position: relative;
  z-index: 1;
  display: block;
  width: min(280px, 72vw);
  max-height: min(300px, 48vh);
  height: auto;
  margin: 0 auto 16px;
  object-fit: contain;
  filter: drop-shadow(0 10px 28px rgb(0 0 0 / 0.22));
  pointer-events: none;
  user-select: none;
}

.auth-brand-title {
  margin: 0;
  position: relative;
  z-index: 1;
  font-size: clamp(1.85rem, 4.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #ffffff;
  text-shadow: 0 1px 3px rgb(0 0 0 / 0.18);
}

.auth-brand-copy {
  margin: 14px 0 0;
  max-width: 320px;
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1.55;
  position: relative;
  z-index: 1;
  color: #ffffff;
  opacity: 0.98;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.15);
}

.auth-form-slide {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(28px, 6vw, 56px);
  background: #f8f9fa;
}

.auth-form-inner {
  width: 100%;
  max-width: 400px;
}

.auth-tabs {
  display: flex;
  gap: 0;
  background: #dfe6ee;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 28px;
}

.auth-tab {
  flex: 1;
  padding: 12px 14px;
  border: none;
  border-radius: 11px;
  font: inherit;
  font-weight: 700;
  font-size: 0.93rem;
  cursor: pointer;
  background: transparent;
  color: #475569;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.auth-tab.active {
  background: #fff;
  color: #22a954;
  box-shadow: 0 2px 8px rgb(33 163 87 / 0.12);
}

.auth-label {
  display: block;
  font-weight: 600;
  font-size: 0.8rem;
  color: #475569;
  margin-bottom: 8px;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  font: inherit;
  font-size: 0.95rem;
  margin-bottom: 18px;
  outline: none;
  transition: border-color 0.15s ease;
}

.auth-input-user {
  background: #eef2f7;
  border: none;
}

.auth-input-pass {
  background: #fff;
  border: 1px solid #0f172a;
}

.auth-input:focus-visible {
  box-shadow: 0 0 0 3px rgb(33 163 87 / 0.25);
}

.auth-hint {
  margin: -8px 0 18px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #94a3b8;
}

.auth-msg-err {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 0.875rem;
  font-weight: 600;
  background: #fce8e6;
  color: #d93025;
}

.auth-submit {
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  font-size: 0.97rem;
  cursor: pointer;
  background: #21a357;
  color: #fff;
  margin-top: 4px;
  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}

.auth-submit:hover {
  filter: brightness(1.06);
}

.auth-submit:active {
  transform: scale(0.99);
}

/* ---- Resto de la app (post login) ---- */
#app:not(.auth-page) {
  margin: 0 auto;
  min-height: 100vh;
  background: #f5f6f8;
}

@media (max-width: 899px) {
  #app:not(.auth-page) {
    max-width: 520px;
    padding: 12px 16px 88px;
  }
}

@media (min-width: 900px) {
  #app:not(.auth-page) {
    max-width: 1140px;
    padding: 24px 32px 40px;
  }
}

.app-logged-root {
  position: relative;
}

.app-shell-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 6px 0 12px;
}

.app-main {
  min-width: 0;
}

.app-topbar {
  display: none;
}

.app-topbar-logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #22a954;
}

.app-sheet {
  position: relative;
}

.lists-save-row {
  min-height: 1.35rem;
  margin-bottom: 8px;
  text-align: right;
}

.list-save-note {
  font-size: 0.78rem;
  color: #94a3b8;
  min-height: 1.35rem;
}

/* Hero principal (blobs + verde tipo mockup) */
.app-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 16px;
  padding: 22px 20px 24px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(
    155deg,
    #3cdd86 0%,
    #22a954 42%,
    #1a8f45 88%
  );
  box-shadow: 0 10px 32px rgb(34 169 84 / 0.28);
}

.app-hero::before,
.app-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: rgb(255 255 255 / 0.12);
}

.app-hero::before {
  width: 160px;
  height: 160px;
  top: -60px;
  right: -40px;
}

.app-hero::after {
  width: 120px;
  height: 120px;
  bottom: -50px;
  left: -30px;
  background: rgb(255 255 255 / 0.08);
}

.app-hero-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.35;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
}

.app-hero-sub {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0.95;
}

.lists-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.lists-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lists-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #94a3b8;
}

.btn-new-list {
  font: inherit;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 9px 14px;
  border: none;
  border-radius: 10px;
  background: #22a954;
  color: #fff;
  box-shadow: 0 4px 14px rgb(34 169 84 / 0.35);
  transition: filter 0.15s ease, transform 0.12s ease;
}

.btn-new-list:hover {
  filter: brightness(1.05);
}

.btn-new-list:active {
  transform: scale(0.98);
}

.list-delete-receipt {
  font: inherit;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 11px;
  transition: transform 0.12s ease;
}

.list-delete-receipt:hover:not(:disabled) .list-delete-receipt-main {
  background: #fef2f2;
  border-color: #f87171;
  color: #991b1b;
  box-shadow:
    0 2px 10px rgb(185 28 28 / 0.14),
    inset 0 1px 0 rgb(255 255 255 / 0.9);
}

.list-delete-receipt:active:not(:disabled) {
  transform: scale(0.98);
}

.list-delete-receipt:active:not(:disabled) .list-delete-receipt-main {
  box-shadow: inset 0 2px 4px rgb(185 28 28 / 0.08);
}

.list-delete-receipt:focus-visible {
  outline: none;
}

.list-delete-receipt:focus-visible .list-delete-receipt-main {
  box-shadow:
    0 0 0 3px rgb(239 68 68 / 0.35),
    0 2px 10px rgb(185 28 28 / 0.12);
}

.list-delete-receipt-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}

.list-delete-receipt-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1.5px solid #fca5a5;
  background: linear-gradient(180deg, #ffffff 0%, #fff5f5 100%);
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow:
    0 2px 8px rgb(185 28 28 / 0.1),
    inset 0 1px 0 rgb(255 255 255 / 0.95);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.list-delete-receipt-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1;
  background: rgb(185 28 28 / 0.1);
  flex-shrink: 0;
}

.list-delete-receipt-txt {
  white-space: nowrap;
}

.sc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  background: rgb(15 23 42 / 0.55);
}

.sc-modal-panel {
  width: min(92vw, 400px);
  padding: 22px 20px 18px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 50px rgb(15 23 42 / 0.25);
}

.sc-modal-title {
  margin: 0 0 10px;
  font-size: 1.08rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.sc-modal-msg {
  margin: 0 0 20px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #475569;
}

.sc-modal-hint {
  margin: -4px 0 14px;
  font-size: 0.875rem;
  line-height: 1.45;
}

.sc-modal-form {
  margin: 0;
}

.sc-modal-field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}

.sc-modal-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  margin: 0 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  color: #0f172a;
  background: #f8fafc;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.sc-modal-input:focus {
  outline: none;
  border-color: #22a954;
  background: #fff;
  box-shadow: 0 0 0 3px rgb(34 169 84 / 0.15);
}

.sc-modal-input--invalid {
  border-color: #fca5a5;
  background: #fffbeb;
}

.sc-modal-field-err {
  margin: 0 0 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #dc2626;
}

.sc-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.sc-modal-btn {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  min-height: 40px;
  transition:
    filter 0.15s ease,
    transform 0.1s ease;
}

.sc-modal-btn:active {
  transform: scale(0.98);
}

.sc-modal-btn--secondary {
  background: #e2e8f0;
  color: #0f172a;
}

.sc-modal-btn--secondary:hover {
  filter: brightness(0.96);
}

.sc-modal-btn--danger {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 4px 14px rgb(220 38 38 / 0.35);
}

.sc-modal-btn--danger:hover {
  filter: brightness(1.06);
}

.sc-modal-btn--primary {
  background: #22a954;
  color: #fff;
  box-shadow: 0 4px 14px rgb(34 169 84 / 0.35);
}

.sc-modal-btn--primary:hover {
  filter: brightness(1.06);
}

.sc-modal-btn:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}

.sc-modal-btn--danger:focus-visible {
  outline-color: #fca5a5;
}

.sc-modal-panel--pick-list .sc-modal-msg {
  margin-bottom: 14px;
}

.sc-modal-msg--muted {
  margin-top: -6px;
  margin-bottom: 16px;
  color: #64748b;
  font-size: 0.88rem;
}

.sc-pick-list-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(42vh, 280px);
  overflow-y: auto;
  margin-bottom: 16px;
}

.sc-pick-list-row {
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d6eade;
  background: #f8fdf9;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  color: #0f172a;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.sc-pick-list-row:hover {
  background: #ecfdf5;
  border-color: #22a954;
}

.sc-modal-actions--stack {
  flex-direction: column;
  align-items: stretch;
}

.sc-modal-actions--stack .sc-modal-btn {
  width: 100%;
  justify-content: center;
}

.app-panel-heading {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.app-panel-intro {
  margin: 0 0 16px;
}

/* Barra inferior */
.app-tabbar {
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 4px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0));
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid #e8ecf1;
  box-shadow: 0 -4px 24px rgb(15 23 42 / 0.06);
  max-width: 520px;
  margin: 0 auto;
}

.app-tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  border: none;
  border-radius: 12px;
  background: transparent;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.app-tab-btn--active {
  color: #22a954;
  background: rgb(34 169 84 / 0.1);
}

.app-tab-ico {
  font-size: 1.35rem;
  line-height: 1;
}

.app-tab-txt {
  white-space: nowrap;
}

/* Versión escritorio: layout ancho, pestañas en cabecera */
@media (min-width: 900px) {
  .app-shell-header {
    justify-content: space-between;
    align-items: center;
    padding: 8px 0 20px;
    margin-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
  }

  .app-topbar-logo {
    font-size: 1.55rem;
  }

  .app-tabbar {
    position: static;
    z-index: auto;
    inset: auto;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 5px;
    gap: 6px;
    border-radius: 14px;
    border: 1px solid #e5e9ef;
    background: #fff;
    box-shadow: 0 2px 12px rgb(15 23 42 / 0.06);
    backdrop-filter: none;
  }

  .app-tab-btn {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.88rem;
    border-radius: 11px;
  }

  .app-tab-btn--active {
    background: rgb(34 169 84 / 0.14);
  }

  .app-tab-ico {
    font-size: 1.05rem;
  }

  .lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
  }

  .app-hero {
    padding: 28px 36px 34px;
    margin-bottom: 22px;
  }

  .app-hero-title {
    font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  }

  .app-hero::before {
    width: 220px;
    height: 220px;
    top: -70px;
    right: -20px;
  }

  #panel-favorites .fav-rows {
    display: grid;
    gap: 12px;
  }

  #panel-favorites .fav-row {
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 16px rgb(15 23 42 / 0.05);
    border: 1px solid #f1f5f9;
    border-bottom: none;
  }

  .lists-grid .list-card--summary {
    margin-bottom: 0;
  }
}

.profile-sheet .profile-card {
  margin-bottom: 0;
}

.profile-names {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.profile-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.app-user-name--block {
  font-size: 1rem;
}

.btn-logout--block {
  width: 100%;
}

/* Perfil — cuadrícula de supermercados */
.profile-shops-card .profile-shops-heading {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.profile-shops-intro {
  margin: 0 0 18px;
  font-size: 0.875rem;
  line-height: 1.45;
}

.profile-shops-grid {
  --profile-shop-track: 106px;
  --profile-shop-cell-h: 120px;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(var(--profile-shop-track), var(--profile-shop-track))
  );
  gap: 8px;
  align-items: stretch;
  justify-content: center;
}

.profile-shop-cell {
  margin: 0;
  padding: 0;
  width: var(--profile-shop-track);
  max-width: 100%;
  height: var(--profile-shop-cell-h);
  display: flex;
  flex-direction: column;
}

.profile-shop-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1;
  min-height: 0;
  padding: 8px 6px;
  border-radius: 12px;
  background: var(--shop-bg, #64748b);
  color: #fff;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.2),
    0 3px 10px rgb(15 23 42 / 0.1);
  box-sizing: border-box;
  width: 100%;
}

.profile-shop-logo-wrap {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.12);
}

.profile-shop-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.profile-shop-logo-wrap--fallback {
  background: rgb(255 255 255 / 0.22);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.35);
}

.profile-shop-fallback-letters {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fff;
}

.profile-shop-name {
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.2;
  max-width: 100%;
  display: block;
  word-break: break-word;
}

.profile-shop-tile--soon {
  opacity: 0.78;
  pointer-events: none;
  cursor: not-allowed;
  filter: grayscale(0.25);
  position: relative;
}

.profile-shop-tile--soon .profile-shop-logo-wrap {
  opacity: 0.85;
}

.profile-shop-soon {
  display: block;
  margin-top: 0;
  font-size: 0.52rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.2;
  color: rgb(255 255 255 / 0.92);
}

.profile-sheet .profile-shops-card {
  max-width: none;
  margin-top: 24px;
}

@media (min-width: 900px) {
  .profile-sheet .profile-shops-card {
    max-width: none;
    margin-top: 28px;
  }
}

/* Favoritos */
.fav-loading,
.fav-empty {
  text-align: center;
  padding: 24px 8px;
}

.fav-msg-err {
  padding: 14px;
  border-radius: 12px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.875rem;
  font-weight: 600;
}

.fav-remove-inline {
  margin-bottom: 12px;
}

.fav-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fav-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.fav-row:last-child {
  border-bottom: none;
}

.fav-row-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.fav-row-thumb--ph {
  background: linear-gradient(135deg, #fef3c7, #fcd34d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.fav-row-body {
  flex: 1;
  min-width: 0;
}

.fav-row-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #1e293b;
  line-height: 1.35;
}

.fav-row-price-wrap {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fav-row-price {
  font-weight: 800;
  font-size: 0.92rem;
  color: #22a954;
}

.fav-add-to-list-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: #22a954;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgb(34 169 84 / 0.35);
  transition:
    filter 0.15s ease,
    transform 0.1s ease;
}

.fav-add-to-list-btn:hover {
  filter: brightness(1.06);
}

.fav-add-to-list-btn:active {
  transform: scale(0.96);
}

.fav-add-to-list-btn:focus-visible {
  outline: 2px solid #15803d;
  outline-offset: 2px;
}

.fav-add-to-list-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.fav-msg-ok {
  padding: 12px 14px;
  border-radius: 12px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.875rem;
  font-weight: 600;
}

.fav-inline-banner {
  margin-bottom: 12px;
}

h1 {
  font-size: 1.65rem;
  font-weight: 900;
  color: #16a34a;
  letter-spacing: -0.03em;
}

.card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 8px 30px rgb(15 23 42 / 0.06);
  margin-bottom: 16px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.875rem;
  color: #475569;
}

label.list-row-label {
  display: block;
  margin: 0;
  font-weight: inherit;
  font-size: inherit;
  color: inherit;
}

input:not(.auth-input):not(.list-row-check):not(.list-catalog-search-input):not(.sc-modal-input) {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font: inherit;
  margin-bottom: 14px;
}

button:not(.auth-tab):not(.auth-submit):not(.btn-logout):not(.btn-new-list):not(.list-delete-receipt):not(.app-tab-btn):not(.list-detail-back):not(.ld-qty-btn):not(.ld-del):not(.list-catalog-camera):not(.catalog-hit-add-btn):not(.catalog-hit-fav):not(.sc-modal-btn):not(.fav-add-to-list-btn):not(.sc-pick-list-row) {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
}

.btn-primary {
  background: #16a34a;
  color: #fff;
  width: 100%;
}

.btn-secondary {
  background: #e2e8f0;
  color: #0f172a;
  width: auto;
}

.muted {
  color: #94a3b8;
  font-size: 0.85rem;
}

.msg {
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.msg-err {
  background: #fef2f2;
  color: #b91c1c;
}

.msg-ok {
  background: #ecfdf5;
  color: #15803d;
}

.lists-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Tarjeta resumen listas (overview): estilo tarjeta limpia, precio destacado a la derecha */
.list-card.list-card--summary {
  padding: 22px 24px;
  margin-bottom: 12px;
  border-radius: 18px;
  box-shadow:
    0 4px 22px rgb(15 23 42 / 0.06),
    0 0 0 1px rgb(238 242 246 / 1);
  border: 1px solid #eef2f6;
  cursor: pointer;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    border-color 0.14s ease;
}

.list-card.list-card--summary:hover {
  box-shadow:
    0 12px 36px rgb(15 23 42 / 0.09),
    0 0 0 1px rgb(34 169 84 / 0.14);
  border-color: rgb(226 245 236 / 1);
}

.list-card--tap:focus-visible {
  outline: 2px solid #22a954;
  outline-offset: 2px;
}

.list-card--tap:active {
  transform: scale(0.99);
}

.list-card-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.list-card-summary-left {
  flex: 1;
  min-width: 0;
}

.list-card.list-card--summary .list-card-title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.list-card-sub {
  margin: 6px 0 0;
  font-size: 0.875rem;
  font-weight: 400;
  color: #64748b;
  line-height: 1.35;
}

.list-card-summary-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  text-align: right;
}

.list-card-sum {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: #2e7d32;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.list-card-sum--na {
  color: #cbd5e1;
  font-size: 1.25rem;
}

.list-card-min-hint {
  display: block;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.01em;
}

.list-card-summary-top {
  display: none !important;
}

.list-card-summary-hint {
  margin: 0 0 6px;
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 500;
}

.list-card-preview {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  font-weight: 500;
  color: #64748b;
}

.list-open-btn {
  margin-top: 6px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  background: #21a357;
  color: #fff;
  transition: filter 0.15s ease;
}

.list-open-btn:hover {
  filter: brightness(1.06);
}

.list-detail-nav {
  margin-bottom: 12px;
}

.btn-back-lists {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  border: none;
  background: transparent;
  color: #22a954;
  font: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-back-lists:hover {
  text-decoration: underline;
}

/* ---- Vista detalle lista (mock tarjetas) ---- */
.list-detail-page {
  width: 100%;
  max-width: none;
  margin: 0;
}

.list-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  min-height: 42px;
}

.list-detail-back {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  background: #eef2f6;
  cursor: pointer;
  color: #475569;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.06);
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.list-detail-back:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.list-detail-back-ico {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}

.list-detail-head-text {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
}

.list-detail-title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.list-catalog-search-wrap {
  margin: 0 0 14px;
}

.list-catalog-search-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 16px;
  border: 1px solid #d6eade;
  background: rgb(34 169 84 / 0.08);
  overflow: hidden;
  box-shadow: 0 2px 10px rgb(15 23 42 / 0.04);
}

.list-catalog-search-input {
  flex: 1;
  min-width: 0;
  margin: 0 !important;
  padding: 14px 16px !important;
  border: none !important;
  border-radius: 0 !important;
  font: inherit;
  font-size: 0.95rem !important;
  font-weight: 600;
  color: #0f172a;
  background: transparent;
}

.list-catalog-search-input::placeholder {
  color: #7a9284;
  font-weight: 500;
}

.list-catalog-search-input:focus {
  outline: none;
}

.list-catalog-search-row:focus-within {
  border-color: #22a954;
  box-shadow: 0 0 0 3px rgb(34 169 84 / 0.22);
}

.list-catalog-camera {
  flex-shrink: 0;
  width: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-left: 1px solid rgb(34 169 84 / 0.2);
  background: rgb(255 255 255 / 0.9);
  color: #22804a;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.list-catalog-camera:hover:not(:disabled) {
  background: #fff;
  color: #16a34a;
}

.list-catalog-camera:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.35);
  color: #94a3b8;
}

.list-catalog-camera-ico {
  display: block;
}

.list-catalog-results {
  margin-top: 8px;
  max-height: min(340px, 48vh);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid #e8ecf1;
  background: #fff;
  box-shadow: 0 6px 22px rgb(15 23 42 / 0.07);
}

.list-catalog-msg {
  padding: 14px;
  font-size: 0.86rem;
  font-weight: 600;
}

.list-catalog-msg--err {
  color: #b91c1c;
}

.catalog-hit-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}

.catalog-hit-row:last-child {
  border-bottom: none;
}

.catalog-hit-fav {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  background: rgb(251 191 36 / 0.22);
  color: #ca8a04;
  transition:
    transform 0.1s ease,
    background 0.12s ease,
    color 0.12s ease;
}

.catalog-hit-fav:hover:not(:disabled) {
  background: rgb(251 191 36 / 0.32);
  color: #a16207;
}

.catalog-hit-fav:disabled {
  opacity: 0.55;
  cursor: progress;
}

.catalog-hit-fav--saved {
  background: rgb(251 191 36 / 0.38);
  color: #b45309;
}

.catalog-hit-fav--saved .catalog-hit-fav-ico polygon {
  fill: currentColor;
  stroke: transparent;
}

.catalog-hit-add-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  border-radius: 10px;
  transition: background 0.12s ease;
}

.catalog-hit-add-btn:hover {
  background: rgb(248 250 252 / 0.95);
}

.catalog-hit-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #eef2f6;
}

img.catalog-hit-thumb {
  cursor: zoom-in;
}

img.catalog-hit-thumb:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}

.catalog-hit-thumb--ph {
  background: linear-gradient(145deg, #f8fafc, #e2e8f0);
}

.catalog-hit-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.catalog-hit-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.catalog-hit-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
}

.catalog-hit-meta-left {
  min-width: 0;
  flex: 1;
}

.catalog-hit-shop {
  font-weight: 700;
}

/* Colores de marca (alineados con SHOPS en app.js) */
.catalog-hit-shop--mercadona,
.catalog-hit-shop--id1 {
  color: #00834d;
}

.catalog-hit-shop--lidl,
.catalog-hit-shop--id2 {
  color: #0050aa;
}

.catalog-hit-shop--carrefour,
.catalog-hit-shop--id3 {
  color: #004a97;
}

.catalog-hit-shop--dia,
.catalog-hit-shop--id4 {
  color: #e2001a;
}

.catalog-hit-shop--consum,
.catalog-hit-shop--id5 {
  color: #e8890c;
}

.catalog-hit-shop--aldi,
.catalog-hit-shop--id9 {
  color: #004a8f;
}

.catalog-hit-meta-unitprice {
  font-weight: 600;
  color: inherit;
}

.catalog-hit-meta-ref {
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.78rem;
  color: #16a34a;
  letter-spacing: -0.01em;
}

.catalog-hit-plus {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgb(34 169 84 / 0.12);
  color: #16a34a;
  font-size: 1.25rem;
  font-weight: 800;
}

.list-detail-products {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-detail-empty {
  text-align: center;
  padding: 20px;
  border-radius: 16px;
  background: #f8fafc;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px dashed #e2e8f0;
}

.list-detail-totalbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgb(34 169 84 / 0.45);
  background: rgb(34 169 84 / 0.1);
}

.list-detail-total-lbl {
  font-weight: 800;
  font-size: 0.92rem;
  color: #0f172a;
}

.list-detail-total-val {
  font-weight: 800;
  font-size: 1.35rem;
  color: #16a34a;
  letter-spacing: -0.02em;
}

/* Texto solo para lectores de pantalla */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Tarjeta producto línea detalle */
.ld-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 56px 1fr;
  grid-template-rows: auto;
  gap: 10px 12px;
  align-items: center;
  padding: 14px;
  padding-top: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #eef2f6;
  box-shadow: 0 4px 18px rgb(15 23 42 / 0.05);
  transition:
    opacity 0.18s ease,
    box-shadow 0.18s ease;
}

.ld-check-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
  align-self: stretch;
}

.ld-check-wrap .list-row-check {
  margin: auto 0;
}

.ld-item--done {
  opacity: 0.62;
}

.ld-item--done .ld-title {
  text-decoration: line-through;
  color: #94a3b8;
}

.ld-del {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  color: #dc2626;
  background: #fef2f2;
  box-shadow: none;
}

.ld-del:hover {
  background: #fee2e2;
}

.ld-thumb {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid #e8ecf1;
  background: #f8fafc;
  display: block;
}

img.ld-thumb {
  cursor: zoom-in;
}

img.ld-thumb:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}

.image-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.88);
}

.image-preview-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(92vw, 900px);
  max-height: 88vh;
}

.image-preview-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.image-preview-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 400;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.image-preview-close:hover {
  background: #fff;
}

.image-preview-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.ld-thumb--ph {
  border: 1px solid #e8ecf1;
  background:
    linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
}

.ld-body {
  min-width: 0;
  padding-right: 40px;
}

.ld-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.ld-title {
  font-weight: 800;
  font-size: 0.96rem;
  color: #0f172a;
  line-height: 1.3;
}

.ld-price {
  flex-shrink: 0;
  font-weight: 800;
  font-size: 1rem;
  color: #16a34a;
  white-space: nowrap;
}

.ld-price--muted {
  color: #cbd5e1;
}

.ld-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
}

.ld-shop-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.ld-qty-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ld-qty {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.ld-qty-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: #eef2f6;
  color: #475569;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: background 0.12s ease;
}

.ld-qty-btn:hover {
  background: #e2e8f0;
}

.ld-qty-val {
  min-width: 36px;
  text-align: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #0f172a;
  background: #fff;
  height: 36px;
  line-height: 36px;
  padding: 0 6px;
}

.ld-item .list-row-check {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 4px !important;
  accent-color: #22a954;
  cursor: pointer;
}

@media (min-width: 900px) {
  .list-detail-page {
    max-width: none;
  }

  .list-detail-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
  }
}

.empty-lists {
  text-align: center;
  padding: 32px 16px;
  color: #94a3b8;
  font-weight: 600;
}

.list-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px 18px 8px;
  margin-bottom: 16px;
  box-shadow: 0 8px 28px rgb(15 23 42 / 0.06);
  border: 1px solid #f1f5f9;
}

.list-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.list-card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.list-card-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
}

.list-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #f8fafc;
}

.list-row:last-child {
  border-bottom: none;
}

.list-row-thumb-wrap {
  flex-shrink: 0;
}

.list-row-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: #f1f5f9;
  display: block;
}

.list-row-thumb--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #cbd5e1;
}

.list-row-body {
  flex: 1;
  min-width: 0;
}

.list-row-main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 14px;
  width: 100%;
}

.list-row-meta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 0;
  min-width: 0;
}

.list-row-check {
  flex: 0 0 20px;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 4px !important;
  cursor: pointer;
  accent-color: #21a357;
  box-sizing: border-box;
  align-self: flex-start;
}

.list-row-label {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.list-row-title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #1e293b;
}

.list-row.purchased .list-row-title {
  text-decoration: line-through;
  color: #94a3b8;
}

.shop-pill {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.list-row-price {
  font-weight: 800;
  color: #22a954;
  font-size: 0.95rem;
  white-space: nowrap;
  flex: 0 0 auto;
  align-self: flex-start;
  padding-top: 2px;
}

@media (max-width: 480px) {
  .list-row-main {
    flex-direction: column;
    align-items: stretch;
  }

  .list-row-price {
    margin-left: 30px;
    padding-top: 0;
  }
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ---- Cabecera principal (logueado) ---- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-bottom: 16px;
  padding: 16px 20px;
  border: 1px solid rgb(226 232 240 / 0.9);
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    rgb(248 250 252 / 0.85) 100%
  );
}

.app-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.app-header-mark {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(
    145deg,
    #46e08f 0%,
    #21a357 45%,
    #158749 100%
  );
  box-shadow:
    0 4px 14px rgb(33 163 87 / 0.35),
    inset 0 1px 0 rgb(255 255 255 / 0.25);
}

.app-header-title {
  margin: 0;
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #15803d;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.app-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(260px, 100%);
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.7);
}

.app-user-chip.app-user-chip--lg {
  display: flex;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  justify-content: flex-start;
  margin-bottom: 16px;
  padding: 10px 16px;
}

.app-user-chip.app-user-chip--lg .profile-names {
  flex: 1;
  min-width: 0;
}

.app-user-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(
    160deg,
    #34d399 0%,
    #16a34a 55%,
    #15803d 100%
  );
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgb(15 23 42 / 0.12);
}

.app-user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  font: inherit;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.06);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.btn-logout:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  color: #1e293b;
  box-shadow: 0 2px 6px rgb(15 23 42 / 0.08);
}

.btn-logout:focus-visible {
  outline: 2px solid #21a357;
  outline-offset: 2px;
}

.btn-logout:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.06);
}

@media (max-width: 520px) {
  .app-header {
    align-items: flex-start;
  }

  .app-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .app-user-chip {
    flex: 1;
    min-width: 0;
  }
}

.list-item {
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.list-item:last-child {
  border-bottom: none;
}


