/* ============================================================
   cont.css — pagina cont utilizator
   ============================================================ */

/* ---------- Page head ---------- */
.page-head {
  margin-bottom: 24px;
}
.page-head h1 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.028em;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-head h1 i { color: var(--green); font-size: 0.85em; }
.page-head p {
  color: var(--text-soft);
  font-size: 14.5px;
  margin: 0;
}

/* ---------- Layout ---------- */
.account-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

/* ---------- Sidebar ---------- */
.account-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 20px;
  background: var(--glass-2);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), var(--inset);
  gap: 8px;
}

.account-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--green), var(--green-dark));
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
  margin-bottom: 6px;
}

.account-profile-card h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--text);
}
.account-email {
  font-size: 13px;
  color: var(--text-mute);
  margin: 0;
}
.account-phone {
  font-size: 12.5px;
  color: var(--text-soft);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.account-phone i { font-size: 11px; color: var(--green); }

/* Nav */
.account-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  background: var(--glass-2);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm), var(--inset);
}

.account-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  color: var(--text-soft);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.account-nav-item i {
  width: 18px;
  font-size: 14px;
  color: var(--text-mute);
  transition: color .15s;
}
.account-nav-item:hover {
  background: var(--glass-3);
  color: var(--text);
}
.account-nav-item:hover i { color: var(--green); }
.account-nav-item.active {
  background: var(--green-tint);
  border-color: var(--green-stroke);
  color: var(--green-dark);
}
.account-nav-item.active i { color: var(--green-dark); }
.account-nav-item.logout { color: #dc2626; }
.account-nav-item.logout i { color: #dc2626; }
.account-nav-item.logout:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

/* ---------- Content ---------- */
.account-content {
  padding: 24px;
  background: var(--glass-2);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), var(--inset);
  min-height: 400px;
}

.account-tab {
  display: none;
  flex-direction: column;
  gap: 18px;
}
.account-tab.active { display: flex; }

.account-tab h2 {
  font-size: 17px;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.015em;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--stroke-2);
}
.account-tab h2 i { color: var(--green); font-size: 15px; }

/* Info grid */
.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--glass-3);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  box-shadow: var(--inset);
}
.info-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.info-value {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
}
.badge-info {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.28);
  color: #0369a1;
}
html[data-theme="dark"] .badge-info { color: #38bdf8; }

/* ---------- Empty tabs ---------- */
.empty-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 40px 20px;
}
.empty-tab-icon {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-tint);
  border: 1px solid var(--green-stroke);
  border-radius: 50%;
  color: var(--green-dark);
  font-size: 28px;
  margin-bottom: 4px;
}
.empty-tab h3 {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.015em;
}
.empty-tab p {
  color: var(--text-soft);
  font-size: 13.5px;
  margin: 0 0 8px;
  max-width: 320px;
  line-height: 1.55;
}
.empty-tab .btn {
  margin-top: 6px;
  min-height: 44px;
  padding: 10px 22px;
  font-size: 14px;
}

/* ---------- Settings ---------- */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: var(--glass-3);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  box-shadow: var(--inset);
}
.setting-info { flex: 1; min-width: 0; }
.setting-info strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.setting-info p {
  font-size: 12.5px;
  color: var(--text-mute);
  margin: 0;
}

/* Theme toggle button */
.theme-toggle-btn {
  position: relative;
  width: 56px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid var(--stroke);
  background: var(--glass-2);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--inset);
  transition: background .25s, border-color .25s;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}
.theme-toggle-btn i {
  font-size: 12px;
  color: var(--text-mute);
  transition: color .25s, transform .25s;
  z-index: 1;
}
.theme-toggle-btn .theme-icon-sun { color: #f59e0b; }
.theme-toggle-btn .theme-icon-moon { color: #4f46e5; }

html[data-theme="dark"] .theme-toggle-btn {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--green-stroke);
}
html[data-theme="dark"] .theme-toggle-btn .theme-icon-sun {
  transform: translateX(-22px);
}
html[data-theme="dark"] .theme-toggle-btn .theme-icon-moon {
  transform: translateX(22px);
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}
.switch input { display: none; }
.switch-track {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.15);
  border-radius: 999px;
  transition: background .25s;
}
.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  transition: transform .25s cubic-bezier(.32,.72,0,1);
}
.switch input:checked + .switch-track { background: var(--green); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(20px); }

/* ---------- Locked state ---------- */
.account-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 60px 20px;
  background: var(--glass-2);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), var(--inset);
}
.account-locked-icon {
  width: 80px;
  height: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-tint);
  border: 1px solid var(--green-stroke);
  border-radius: 50%;
  color: var(--green-dark);
  font-size: 32px;
  margin-bottom: 6px;
}
.account-locked h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}
.account-locked p {
  color: var(--text-soft);
  font-size: 14px;
  margin: 0 0 8px;
  max-width: 380px;
  line-height: 1.55;
}
.account-locked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.account-locked-actions .btn {
  min-height: 46px;
  padding: 11px 24px;
  font-size: 14.5px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (min-width: 640px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .account-layout {
    grid-template-columns: 280px 1fr;
    gap: 28px;
  }
  .account-sidebar { position: sticky; top: 96px; }
  .account-content { padding: 28px; }
}

@media (max-width: 379px) {
  .account-content { padding: 18px; }
  .account-tab h2 { font-size: 15.5px; }
  .info-item { padding: 10px 12px; }
  .info-value { font-size: 13.5px; }
}

/* ============================================================
   MODAL ADRESĂ (form + overlay + styling complet)
   ============================================================ */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(15, 23, 42, 0.5);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: modalFade .25s ease;
}
.modal.active { display: flex; }

@keyframes modalFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-content {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 22px 18px;
    padding-bottom: max(22px, env(safe-area-inset-bottom));
    background: var(--bg, #fff);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -20px 60px rgba(15, 23, 42, 0.2);
    animation: sheetUp .35s cubic-bezier(.32, .72, 0, 1);
}

html[data-theme="dark"] .modal-content {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 0;
}

@keyframes sheetUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.modal-header h2 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0;
}
.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 50%;
    color: var(--text-soft);
    font-size: 15px;
    cursor: pointer;
    transition: transform .15s, background .15s, color .15s;
}
.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}
.modal-close:active { transform: scale(0.9); }

/* Form */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.form-group label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-soft);
}
.form-input {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-input:focus {
    border-color: #22c55e;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}
.form-input::placeholder {
    color: rgba(148, 163, 184, 0.8);
}
html[data-theme="dark"] .form-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .form-input:focus {
    background: rgba(255, 255, 255, 0.08);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Buton block */
.btn-block {
    width: 100%;
    min-height: 50px;
    padding: 14px 24px;
    font-size: 15.5px;
}

/* Mobile: card compact */
@media (min-width: 640px) {
    .modal {
        align-items: center;
        padding: 20px;
    }
    .modal-content {
        max-width: 480px;
        max-height: 85dvh;
        padding: 26px 24px;
        border-radius: 22px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.15);
        animation: modalIn .3s cubic-bezier(.32,.72,0,1);
    }
    @keyframes modalIn {
        from { opacity: 0; transform: translateY(14px) scale(0.98); }
        to   { opacity: 1; transform: translateY(0) scale(1); }
    }
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================
   BUTOANE MINI (editează/șterge adrese)
   ============================================================ */
.btn-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--glass-3);
    -webkit-backdrop-filter: var(--blur-sm);
    backdrop-filter: var(--blur-sm);
    border: 1px solid var(--stroke);
    border-radius: 10px;
    color: var(--text-soft);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--inset);
    transition: border-color .15s, color .15s, transform .15s, background .15s;
    white-space: nowrap;
}
.btn-mini:hover {
    border-color: var(--green-stroke);
    color: var(--green-dark);
    background: var(--glass-2);
}
.btn-mini:active {
    transform: scale(0.96);
}
.btn-mini i {
    font-size: 11px;
}

/* Buton danger (șterge) */
.btn-mini.danger {
    color: #dc2626;
}
.btn-mini.danger:hover {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
}
html[data-theme="dark"] .btn-mini.danger {
    color: #fca5a5;
}
html[data-theme="dark"] .btn-mini.danger:hover {
    color: #fecaca;
}

/* ============================================================
   NAV COUNT (badge în sidebar)
   ============================================================ */
.nav-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: auto;
    background: var(--green-tint);
    border: 1px solid var(--green-stroke);
    border-radius: var(--radius-pill);
    font-size: 10.5px;
    font-weight: 800;
    color: var(--green-dark);
}
.nav-count:empty { display: none; }

/* ============================================================
   ADRESSE + MINI LISTS (dacă lipsesc)
   ============================================================ */
.address-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.address-card {
    padding: 18px;
    background: var(--glass-3);
    border: 1px solid var(--stroke);
    border-radius: 14px;
    box-shadow: var(--inset);
}
.address-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--stroke);
}
.address-card-head strong {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
}
.address-line {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text-soft);
    margin: 0 0 10px;
}
.address-phone {
    font-size: 13px;
    color: var(--text-mute);
    margin: 0 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.address-phone i {
    font-size: 12px;
    color: var(--green);
}
.address-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--stroke);
}

/* ============================================================
   MINI FAVORITES (listă favorite în cont)
   ============================================================ */
.mini-favorites {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.mini-fav {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: var(--glass-3);
    -webkit-backdrop-filter: var(--blur-sm);
    backdrop-filter: var(--blur-sm);
    border: 1px solid var(--stroke);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--inset);
    transition: transform .15s, border-color .15s, background .15s;
}
.mini-fav:hover {
    border-color: var(--green-stroke);
    background: var(--glass-2);
    transform: translateX(3px);
}
.mini-fav:active { transform: scale(0.98); }

.mini-fav-img {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    background: var(--bg);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--green);
    font-size: 22px;
}
.mini-fav-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}
.mini-fav-img i { opacity: 0.4; }

.mini-fav-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mini-fav-info strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-fav-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--green-dark);
    letter-spacing: -0.02em;
}

/* ============================================================
   MINI ORDERS (listă comenzi în cont)
   ============================================================ */
.mini-orders {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mini-order {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    background: var(--glass-3);
    border: 1px solid var(--stroke);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--inset);
    transition: transform .15s, border-color .15s, background .15s;
}
.mini-order:hover {
    border-color: var(--green-stroke);
    background: var(--glass-2);
    transform: translateX(3px);
}

.mini-order-info { min-width: 0; }
.mini-order-info strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
}
.mini-order-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-mute);
}
.mini-order-date i { font-size: 10px; }

.mini-order-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}
.mini-order-total {
    font-size: 15px;
    font-weight: 800;
    color: var(--green-dark);
    letter-spacing: -0.02em;
}

/* ============================================================
   TAB LOADING
   ============================================================ */
.tab-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: var(--text-mute);
    font-size: 14px;
}
.tab-loading i {
    font-size: 18px;
    color: var(--green);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 640px) {
    .mini-favorites {
        grid-template-columns: 1fr 1fr;
    }
    .mini-fav-img {
        width: 72px;
        height: 72px;
    }
    .mini-fav-info strong { font-size: 14.5px; }
    .mini-fav-price { font-size: 16px; }
}