/* Biblioteca de cadouri (/cadouri).
   Limbajul vizual al paginii /avansat: fundal mentă, carduri de sticlă, segment cu indicator alb,
   buton principal în degrade. Pe telefon: liste compacte; pe desktop: panou lateral + listă.
   Ordinea: 1. tokeni + fundal  2. titlu  3. panou lateral  4. bara de file  5. lista
            6. stări (gol, încărcare, oaspete)  7. ferestre  8. editorul  9. telefon  10. mișcare redusă */

/* ---------- 1. tokeni + fundal ---------- */

body.gifts-page {
  --g-ink: #2f2219;
  --g-ink-soft: #6b5a51;
  --g-ink-faint: #9d918b;
  --g-green: #f56d18;
  --g-green-deep: #d75100;
  --g-green-ink: #884720;
  --g-line: rgba(136, 71, 32, 0.12);
  --g-line-strong: rgba(136, 71, 32, 0.2);
  --g-wash: rgba(136, 71, 32, 0.07);
  --g-wash-strong: rgba(136, 71, 32, 0.12);
  --g-amber: #9a6a07;
  --g-amber-soft: rgba(214, 160, 26, 0.14);
  --g-gradient: linear-gradient(110deg, #ef8748 0%, #e95901 52%, #bc4700 100%);
  --g-radius: 24px;
  margin: 0;
  background: #fffdfc url("/images/avansat-mint-background.webp") center top / 100% 100% no-repeat;
  color: var(--g-ink);
  font-family: var(--font-ui, Inter, Arial, sans-serif);
}

body.gifts-page::before { display: none; }
body.gifts-page .page-shell { z-index: 1; }
.gifts-page * { box-sizing: border-box; }
.gifts-page [hidden] { display: none !important; }
.gifts-main button, .gifts-modal button, .gifts-modal input { font: inherit; }
.gifts-page button { cursor: pointer; }
.gifts-page button:disabled { opacity: 0.55; cursor: wait; }
.gifts-page .gifts-main :focus-visible,
.gifts-modal :focus-visible {
  outline: 2px solid var(--g-green);
  outline-offset: 3px;
}
.gifts-page .mobile-account-badges:has([data-account-membership][hidden]) { display: none; }

.gifts-glass {
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--g-radius);
  background: rgba(255, 255, 255, 0.6);
  box-shadow:
    0 0 0 1px rgba(136, 71, 32, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 32px -22px rgba(47, 34, 25, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.gifts-main {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 34px 0 72px;
}

/* Desktopul este micșorat la 80% de site (zoom pe body): 1180px apar ca ~944px. */
.gifts-stage { width: min(100%, 1180px); min-width: 0; }

/* ---------- 2. titlu ---------- */

.gifts-head {
  position: relative;
  margin: 0 0 30px;
  text-align: center;
}

.gifts-eyebrow {
  margin: 0 0 12px;
  color: #a57553;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.gifts-main h1 {
  max-width: none;
  margin: 0;
  font-family: var(--font-ui, Inter, Arial, sans-serif);
  font-size: 4rem;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: #1a120e;
}

.gifts-subtitle {
  margin: 10px 0 0;
  color: #566970;
  font-size: 1.1875rem;
  line-height: 1.4;
}

.gifts-back {
  position: absolute;
  top: 30px;
  left: 0;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  color: var(--g-ink);
  box-shadow: 0 0 0 1px var(--g-line), 0 8px 18px -12px rgba(108, 50, 15, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 0.2s ease;
}
.gifts-back:hover { background: #fff; }
.gifts-back svg { width: 20px; height: 20px; }

.gifts-page svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 3. panou lateral + buton principal ---------- */

.gifts-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.gifts-side {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 18px;
  padding: 20px;
}

.gifts-create {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 0 22px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--g-gradient);
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 18px 34px -18px rgba(215, 81, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -2px 0 rgba(77, 55, 42, 0.18);
  transition: filter 0.2s ease, transform 0.12s ease;
}
.gifts-create svg { flex: none; width: 20px; height: 20px; stroke-width: 2; }
.gifts-create:active:not(:disabled) { transform: translateY(1px); }
@media (hover: hover) {
  .gifts-create:hover:not(:disabled) { filter: saturate(1.1) brightness(1.04); }
}

.gifts-side-note {
  margin: -6px 2px 0;
  color: var(--g-ink-soft);
  font-size: 0.875rem;
  line-height: 1.5;
}

.gifts-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--g-line);
  border-bottom: 1px solid var(--g-line);
}
.gifts-stats div { padding: 14px 4px 13px 12px; min-width: 0; }
.gifts-stats div + div { border-left: 1px solid var(--g-line); }
.gifts-stats div:first-child { padding-left: 2px; }
.gifts-stats dt,
.gifts-label {
  margin: 0;
  color: var(--g-ink-faint);
  font-size: 0.65625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.gifts-stats dd {
  margin: 4px 0 0;
  color: var(--g-ink);
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.gifts-stats dd.is-alert { color: var(--g-green-deep); }

.gifts-how ol { display: grid; gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; }
.gifts-how li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 11px; align-items: start; }
.gifts-how b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--g-wash-strong);
  color: var(--g-green-ink);
  font-size: 0.8125rem;
  font-weight: 600;
}
.gifts-how span { color: var(--g-ink-soft); font-size: 0.8125rem; line-height: 1.45; }
.gifts-how strong { display: block; color: var(--g-ink); font-size: 0.9375rem; font-weight: 600; }

/* ---------- 4. bara de file ---------- */

.gifts-content { min-width: 0; }

.gifts-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.gifts-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 340px);
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: rgba(136, 71, 32, 0.07);
  box-shadow: inset 0 1px 2px rgba(108, 50, 15, 0.08);
}

.gifts-tabs-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(108, 50, 15, 0.14), 0 6px 14px -8px rgba(108, 50, 15, 0.35);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.gifts-tabs[data-active="sent"] .gifts-tabs-thumb { transform: translateX(100%); }

.gifts-tabs button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--g-ink-soft);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.18s ease;
}
.gifts-tabs button[aria-selected="true"] { color: var(--g-ink); }

.gifts-tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--g-wash-strong);
  color: var(--g-green-ink);
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.gifts-tab-count.is-alert { background: var(--g-green); color: #fff; }

.gifts-create-compact { display: none; }

/* ---------- 5. lista ---------- */

.gifts-list { display: grid; padding: 6px; }
.gifts-list:empty { display: none; }

.gifts-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  column-gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 12px 12px;
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background-color 0.18s ease;
}
.gifts-card + .gifts-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 82px;
  right: 12px;
  height: 1px;
  background: var(--g-line);
}
@media (hover: hover) {
  a.gifts-card:hover,
  .gifts-card-sent:hover { background: rgba(255, 255, 255, 0.72); }
}
a.gifts-card:active { background: rgba(255, 255, 255, 0.72); }

.gifts-cover {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(145deg, #f8f1ec, #f2e5de);
  color: var(--g-green-ink);
  box-shadow: inset 0 0 0 1px rgba(136, 71, 32, 0.08);
}
.gifts-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gifts-cover svg { width: 22px; height: 22px; }

.gifts-card-copy { display: grid; gap: 3px; min-width: 0; }
.gifts-card-titlebar { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gifts-card-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--g-ink);
  font-family: var(--font-ui, Inter, Arial, sans-serif);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.gifts-card-meta {
  margin: 0;
  overflow: hidden;
  color: var(--g-ink-soft);
  font-size: 0.8125rem;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.gifts-card-meta b { color: var(--g-ink); font-weight: 500; }

.gifts-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--g-wash);
  color: var(--g-ink-soft);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.gifts-chip.is-sent { background: rgba(245, 109, 24, 0.13); color: var(--g-green-ink); }
.gifts-chip.is-new { background: var(--g-green); color: #fff; }
.gifts-chip.is-draft { background: var(--g-amber-soft); color: var(--g-amber); }
.gifts-chip.is-legacy { background: rgba(108, 89, 77, 0.1); color: var(--g-ink-soft); }

/* Primite: rândul întreg deschide cadoul. */
.gifts-card-received.is-new .gifts-cover::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--g-green);
}
.gifts-card-received.is-new .gifts-card-title { font-weight: 700; }
.gifts-card-side { display: flex; align-items: center; gap: 12px; }
.gifts-card-date { color: var(--g-ink-faint); font-size: 0.8125rem; white-space: nowrap; }
.gifts-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--g-wash-strong);
  color: var(--g-green-ink);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}
.gifts-open svg { width: 16px; height: 16px; stroke-width: 2; }
.gifts-card-received.is-new .gifts-open { background: var(--g-gradient); color: #fff; box-shadow: 0 10px 18px -12px rgba(215, 81, 0, 0.8); }

/* Trimise: detalii + acțiuni. */
.gifts-card-sent { grid-template-columns: 56px minmax(0, 1fr) auto; align-items: start; }
.gifts-facts {
  display: grid;
  gap: 5px;
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
}
.gifts-fact {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  column-gap: 7px;
  align-items: start;
  min-width: 0;
  color: var(--g-ink-soft);
  font-size: 0.8125rem;
  line-height: 1.4;
}
.gifts-fact svg { width: 15px; height: 15px; margin-top: 2px; color: var(--g-ink-faint); }
.gifts-fact.is-good { color: var(--g-green-ink); }
.gifts-fact.is-good svg { color: var(--g-green-deep); }
.gifts-fact-lines { display: flex; flex-wrap: wrap; column-gap: 8px; min-width: 0; }
.gifts-fact-main { min-width: 0; max-width: 100%; overflow: hidden; color: var(--g-ink); white-space: nowrap; text-overflow: ellipsis; }
.gifts-fact-side { color: var(--g-ink-faint); }
.gifts-fact-side.is-ok { color: var(--g-green-ink); }
.gifts-fact-side.is-warn { color: var(--g-amber); }

.gifts-actions { display: flex; gap: 6px; align-self: center; }
.gifts-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(136, 71, 32, 0.07);
  color: var(--g-ink);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.18s ease;
}
.gifts-actions button svg { width: 16px; height: 16px; }
.gifts-actions button:hover:not(:disabled) { background: rgba(136, 71, 32, 0.13); }
.gifts-actions .gifts-send {
  background: rgba(245, 109, 24, 0.14);
  color: var(--g-green-ink);
  font-weight: 600;
}
.gifts-actions .gifts-send:hover:not(:disabled) { background: rgba(245, 109, 24, 0.22); }
/* Ciorna are un singur pas următor evident: trimiterea. */
.gifts-actions .gifts-send.is-primary {
  border-color: transparent;
  background: var(--g-gradient);
  color: #fff;
  box-shadow: 0 10px 18px -12px rgba(215, 81, 0, 0.8);
}
.gifts-actions .gifts-send.is-primary:hover:not(:disabled) { background: var(--g-gradient); filter: brightness(1.05); }

.gifts-more {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin: 12px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--g-green-ink);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(136, 71, 32, 0.06);
}

/* ---------- 6. stări ---------- */

.gifts-status {
  margin: 0 0 10px;
  color: var(--g-ink-soft);
  font-size: 0.8125rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.gifts-status:empty { display: none; }
.gifts-content > .gifts-status {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(214, 45, 66, 0.07);
  color: #8f1d2c;
}

.gifts-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 34px 22px 30px;
  text-align: center;
}
.gifts-empty-icon,
.gifts-guest-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--g-wash-strong);
  color: var(--g-green-ink);
}
.gifts-empty-icon svg, .gifts-guest-icon svg { width: 26px; height: 26px; }
.gifts-empty strong, .gifts-guest h2 {
  margin: 0;
  color: var(--g-ink);
  font-family: var(--font-ui, Inter, Arial, sans-serif);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.gifts-empty p, .gifts-guest p {
  max-width: 360px;
  margin: 0;
  color: var(--g-ink-soft);
  font-size: 0.875rem;
  line-height: 1.55;
}
.gifts-empty .gifts-create { width: auto; min-height: 46px; margin-top: 12px; font-size: 0.9375rem; }

.gifts-guest {
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto;
  padding: 34px 24px 28px;
  text-align: center;
}
.gifts-guest .gifts-create { width: min(100%, 300px); margin-top: 12px; }

.gifts-skeleton { pointer-events: none; }
.gifts-skeleton .gifts-cover,
.gifts-skeleton i {
  background: linear-gradient(90deg, rgba(136, 71, 32, 0.07) 25%, rgba(136, 71, 32, 0.13) 50%, rgba(136, 71, 32, 0.07) 75%) 0 0 / 200% 100%;
  animation: gifts-shimmer 1.3s linear infinite;
  box-shadow: none;
}
.gifts-skeleton i { display: block; height: 11px; border-radius: 6px; }
.gifts-skeleton i:first-child { width: 58%; height: 13px; }
.gifts-skeleton i + i { width: 38%; margin-top: 6px; }
@keyframes gifts-shimmer { to { background-position: -200% 0; } }

/* ---------- 7. ferestre (alege melodia, trimite) ---------- */

.gifts-modal {
  width: min(460px, calc(100% - 24px));
  max-height: min(86dvh, 720px);
  padding: 22px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  background: #fefdfc;
  color: var(--g-ink);
  box-shadow: 0 30px 70px -30px rgba(48, 35, 26, 0.45);
  font-family: var(--font-ui, Inter, Arial, sans-serif);
}
.gifts-modal::backdrop { background: rgba(48, 36, 26, 0.36); backdrop-filter: blur(4px); }
.gifts-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.gifts-modal h2 {
  margin: 0;
  font-family: var(--font-ui, Inter, Arial, sans-serif);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.gifts-modal-sub { margin: 5px 0 0; color: var(--g-ink-soft); font-size: 0.875rem; line-height: 1.5; }
.gifts-close {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: var(--g-wash);
  color: var(--g-ink);
}
.gifts-close svg { width: 18px; height: 18px; stroke-width: 2; }

.gifts-tracks {
  display: grid;
  padding: 4px;
  border-radius: 20px;
  background: rgba(136, 71, 32, 0.04);
  box-shadow: inset 0 0 0 1px var(--g-line);
}
.gifts-tracks:empty { display: none; }
.gifts-track {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 32px;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--g-ink);
  text-align: left;
}
.gifts-track + .gifts-track::before {
  content: "";
  position: absolute;
  top: 0;
  left: 68px;
  right: 10px;
  height: 1px;
  background: var(--g-line);
}
@media (hover: hover) { .gifts-track:hover { background: rgba(255, 255, 255, 0.9); } }
.gifts-track:active { background: rgba(255, 255, 255, 0.9); }
.gifts-track .gifts-cover { width: 46px; height: 46px; border-radius: 12px; }
.gifts-track-title { overflow: hidden; font-size: 0.9375rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.gifts-track-go {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--g-wash);
}
.gifts-track-go svg { width: 16px; height: 16px; stroke-width: 2; }
.gifts-modal .gifts-status { margin: 12px 0 0; }
.gifts-modal .gifts-more { margin-top: 12px; }

.gifts-send-gift {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(136, 71, 32, 0.05);
  box-shadow: inset 0 0 0 1px var(--g-line);
}
.gifts-send-gift .gifts-cover { width: 46px; height: 46px; border-radius: 12px; }

.gifts-send-history { margin: 0 0 16px; }
.gifts-send-history .gifts-label { margin: 0 0 7px 2px; }
.gifts-send-history .gifts-facts {
  gap: 0;
  max-height: 172px;
  margin: 0;
  padding: 2px 12px;
  overflow: auto;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px var(--g-line);
  overscroll-behavior: contain;
}
.gifts-send-history .gifts-fact { padding: 9px 0; font-size: 0.8125rem; }
.gifts-send-history .gifts-fact + .gifts-fact { border-top: 1px solid var(--g-line); }

.gifts-send-success { display: grid; justify-items: center; gap: 20px; text-align: center; }
.gifts-success-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--g-wash-strong);
  color: var(--g-green-deep);
}
.gifts-success-icon svg { width: 32px; height: 32px; stroke-width: 2.5; }
.gifts-send-success p { margin: 0; color: var(--g-ink-soft); font-size: 1rem; line-height: 1.6; }

.gifts-modal label { display: block; margin: 0 0 7px; padding: 0; color: var(--g-ink); font-size: 0.8125rem; font-weight: 600; }
.gifts-input {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 14px;
  border: 1px solid var(--g-line-strong);
  border-radius: 16px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.gifts-input:focus-within { border-color: var(--g-green); box-shadow: 0 0 0 4px rgba(245, 109, 24, 0.14); }
.gifts-input svg { flex: none; width: 18px; height: 18px; color: var(--g-ink-faint); }
.gifts-modal .gifts-input input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--g-ink);
  font-size: 16px;
  outline: none;
  box-shadow: none;
}
.gifts-modal .gifts-input input:focus-visible { outline: none; }
.gifts-modal .gifts-create { min-height: 54px; }

/* ---------- 8. editorul (comun cu /account) ---------- */

/* Vezi cadoul și Salvează ocupă același rând. */
.gifts-page #gift-dialog .gift-dialog-main-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gifts-page #gift-dialog .gift-dialog-main-actions button,
.gifts-page #gift-dialog #gift-view-button {
  grid-column: auto;
  min-width: 0;
  min-height: 48px;
  padding-inline: 8px;
  gap: 7px;
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
}
.gifts-page #gift-dialog #gift-view-button { border: 1px solid rgba(136, 71, 32, 0.18); background: rgba(136, 71, 32, 0.07); color: var(--g-green-ink); box-shadow: none; }
.gifts-page #gift-dialog #gift-view-button::before { display: none; }
.gifts-page #gift-dialog #gift-view-button .gift-view-arrow { width: 17px; height: 17px; }
.gifts-page #gift-dialog-status { min-height: 0; }

/* ---------- 9. telefon ---------- */

@media (max-width: 860px) {
  /* Ca pe /avansat: fundalul mentă rămâne vizibil și pe telefon. */
  body.gifts-page,
  body.gifts-page.mobile-account-dashboard-active { background: #fffdfc url("/images/avansat-mint-background.webp") center top / 140% 100% no-repeat; }
  body.gifts-page.mobile-account-dashboard-active .page-shell { background: transparent; }

  .gifts-main { padding: 12px 14px calc(96px + env(safe-area-inset-bottom)); }

  .gifts-head { margin-bottom: 16px; }
  .gifts-eyebrow { margin-bottom: 8px; padding: 0 40px; font-size: 0.625rem; letter-spacing: 0.24em; }
  .gifts-main h1 { font-size: 2.125rem; }
  .gifts-subtitle { margin-top: 6px; font-size: 0.9375rem; }
  .gifts-back,
  .gifts-back:hover {
    top: -6px;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .gifts-layout { display: block; }
  .gifts-side { display: none; }

  .gifts-toolbar { gap: 8px; margin-bottom: 10px; }
  .gifts-tabs { flex: 1; width: auto; }
  .gifts-tabs button { min-height: 38px; padding: 0 8px; gap: 6px; font-size: 0.875rem; }
  .gifts-create-compact {
    display: inline-flex;
    flex: none;
    width: auto;
    min-height: 46px;
    padding: 0 16px 0 13px;
    gap: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
  }
  .gifts-create-compact svg { width: 18px; height: 18px; stroke-width: 2.2; }

  .gifts-glass { border-radius: 20px; }
  .gifts-list {
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .gifts-card {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    column-gap: 12px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(136, 71, 32, 0.08);
    background: rgba(255, 255, 255, 0.9);
  }
  .gifts-card + .gifts-card::before { display: none; }
  .gifts-cover { width: 48px; height: 48px; border-radius: 12px; }
  .gifts-card-title { font-size: 0.9375rem; }
  .gifts-card-meta { font-size: 0.78125rem; }

  .gifts-card-side { gap: 0; }
  .gifts-card-date { display: none; }
  .gifts-open { width: 36px; height: 36px; min-height: 36px; padding: 0; justify-content: center; }
  .gifts-open span { display: none; }

  .gifts-card-sent { grid-template-columns: 48px minmax(0, 1fr); }
  .gifts-card-sent .gifts-chip { margin-left: auto; }
  .gifts-facts { margin-top: 6px; gap: 4px; }
  .gifts-fact { font-size: 0.78125rem; }
  .gifts-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
  }
  .gifts-actions button { min-height: 36px; padding: 0 6px; }

  .gifts-empty { padding: 26px 18px 24px; }
  .gifts-guest { padding: 28px 18px 22px; }

  /* Ferestrele devin foi care urcă de jos, ca pe telefon. */
  .gifts-modal {
    width: 100%;
    max-width: none;
    max-height: 88dvh;
    margin: auto 0 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 26px 26px 0 0;
  }
  .gifts-modal[open] { animation: gifts-sheet-in 280ms cubic-bezier(0.2, 0.8, 0.2, 1); }
  .gifts-modal::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    margin: -6px auto 12px;
    border-radius: 4px;
    background: rgba(136, 71, 32, 0.18);
  }
  .gifts-modal h2 { font-size: 1.25rem; }
  .gifts-modal-sub { font-size: 0.8125rem; }

  .gifts-page #gift-dialog .gift-dialog-main-actions button,
  .gifts-page #gift-dialog #gift-view-button { min-height: 44px; font-size: 13.5px; gap: 6px; }
  .gifts-page #gift-dialog #gift-save-button svg { width: 17px; height: 17px; }
}

@keyframes gifts-sheet-in {
  from { transform: translateY(32px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}

@media (max-width: 380px) {
  .gifts-main { padding-inline: 10px; }
  .gifts-main h1 { font-size: 1.875rem; }
  .gifts-create-compact { padding: 0 13px 0 11px; font-size: 0.875rem; }
  .gifts-tabs button { padding: 0 6px; }
  .gifts-page #gift-dialog #gift-view-button .gift-view-arrow { display: none; }
}

@media (max-width: 340px) {
  .gifts-create-compact { width: 46px; padding: 0; }
  .gifts-create-compact span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- 10. mișcare redusă ---------- */

@media (prefers-reduced-motion: reduce) {
  .gifts-tabs-thumb,
  .gifts-create,
  .gifts-card,
  .gifts-modal[open] { transition: none; animation: none; }
  .gifts-skeleton .gifts-cover,
  .gifts-skeleton i { animation: none; }
}
