/* PixMatic account settings — warm, quiet and easy to scan. */
:root {
  --bg: #faf7ef;
  --bg-2: #fffefa;
  --card-bg: #fffefa;
  --border: #e8e0d2;
  --border-hover: #d7c3a3;
  --gold: #df891f;
  --gold-hover: #c87519;
  --gold-glow: rgba(223, 137, 31, .14);
  --green: #36845c;
  --text: #29251f;
  --muted: #746b5f;
  --dim: #948a7c;
  --danger: #b54735;
  --input-bg: #faf8f3;
  --radius-sm: 9px;
  --radius-md: 15px;
  --radius-lg: 21px;
}
html { background: #faf7ef; }
body {
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(ellipse 39% 24% at 4% 0%, rgba(238, 199, 151, .19), transparent 74%),
    radial-gradient(ellipse 42% 30% at 98% 9%, rgba(233, 224, 202, .26), transparent 76%),
    #faf7ef;
  font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
header.topbar {
  height: 70px;
  padding: 0 clamp(16px, 4.5vw, 68px);
  border-bottom: 1px solid rgba(222, 213, 198, .86);
  background: rgba(255,254,250,.91);
  box-shadow: 0 6px 22px rgba(65,48,24,.035);
  backdrop-filter: blur(16px);
}
.header-left, .header-right { gap: 11px; }
.header-logo img { height: 29px; filter: none; }
.back-link {
  gap: 7px;
  padding: 8px 11px;
  border-color: #e9e1d5;
  border-radius: 10px;
  background: #fffefa;
  color: #685f53;
  font-size: 11px;
}
.back-link:hover { border-color: #d4b78a; background: #fff8ed; color: #8a521b; }
.back-link svg { width: 13px; height: 13px; }
.lang-pill-btn {
  gap: 6px;
  padding: 7px 10px;
  border-color: #e8e0d4;
  background: #fffefa;
  color: #62594d;
  font-size: 10px;
}
.lang-pill-btn:hover { border-color: #d4b78a; background: #fff8ed; color: #8a521b; }
.user-pill {
  gap: 8px;
  padding: 4px 11px 4px 5px;
  border-color: #e8e0d4;
  background: #fffefa;
}
.user-pill-avatar { width: 30px; height: 30px; background: linear-gradient(145deg,#d77d27,#efa944); color: white; font-size: 11px; }
.user-pill-name { color: #3f372d; font-size: 11px; }
.btn-ghost {
  border-color: #e8e0d4;
  border-radius: 9px;
  color: #6e6254;
  background: #fffefa;
  font-size: 11px !important;
}
.btn-ghost:hover { border-color: #d4b78a; background: #fff8ed; color: #8a521b; }
.btn-gold {
  border: 1px solid #bc6e1d;
  border-radius: 10px;
  background: linear-gradient(180deg,#f0a33b,#e18a24);
  color: #241b12;
  box-shadow: 0 2px 0 rgba(129,70,16,.1);
}
.btn-gold:hover { background: linear-gradient(180deg,#f4b355,#e99430); box-shadow: 0 5px 14px rgba(175,104,24,.15); }
.settings-container { max-width: 1080px; margin: 39px auto 72px; padding: 0 30px; }
.settings-head { position: relative; margin-bottom: 23px; padding: 2px 0 0; }
.settings-head::before {
  content: 'ACCOUNT';
  display: block;
  width: fit-content;
  margin-bottom: 8px;
  color: #9a6a34;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
}
html[lang="ar"] .settings-head::before { content: 'الحساب'; font-family: 'Cairo', sans-serif; letter-spacing: .04em; }
.settings-title { margin: 0 0 5px; color: #29251f; font-size: clamp(25px,3vw,32px); font-weight: 850; letter-spacing: -.035em; line-height: 1.25; }
.settings-sub { max-width: 680px; color: #7a7165; font-size: 12px; line-height: 1.7; }
.settings-layout { display: block; }
.tabs-nav {
  position: sticky;
  top: 80px;
  z-index: 20;
  display: flex;
  flex-direction: row;
  gap: 5px;
  margin-bottom: 17px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid #e8e0d4;
  border-radius: 13px;
  background: rgba(255,254,250,.93);
  box-shadow: 0 6px 18px rgba(64,48,24,.035);
  scrollbar-width: none;
}
.tabs-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  flex: 1 0 auto;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 39px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #766d61;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  transition: color .18s, background .18s, border-color .18s;
}
.tab-btn:hover { background: #faf5ec; color: #514332; }
.tab-btn.active { border-color: #efdfc5; background: #fbf2e4; color: #90551b; }
.tab-btn svg { width: 16px; height: 16px; color: currentColor; stroke: currentColor; }
.tabs-content { min-width: 0; }
.tab-panel.active { animation: settingsPanelIn .2s ease both; }
@keyframes settingsPanelIn { from { opacity: .6; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.card-box {
  margin-bottom: 17px;
  padding: 23px 25px;
  border: 1px solid #e9e2d7;
  border-radius: 16px;
  background: rgba(255,254,250,.95);
  box-shadow: 0 8px 24px rgba(67,50,27,.045);
}
.card-box-header { margin-bottom: 19px; padding-bottom: 14px; border-color: #eee7dc; }
.card-box-title { margin-bottom: 3px; color: #302a22; font-size: 15px; font-weight: 800; }
.card-box-desc { color: #81776b; font-size: 11px; line-height: 1.65; }
.avatar-edit-row { gap: 14px; margin-bottom: 19px; padding: 0 0 17px; border-color: #eee8de; }
.avatar-preview { width: 58px; height: 58px; flex-basis: 58px; border: 2px solid #f1dfc4; border-radius: 16px; background: linear-gradient(145deg,#d77d27,#efa944); color: #fff; font-family: 'Inter','Cairo',sans-serif; font-size: 18px; box-shadow: 0 4px 12px rgba(179,104,26,.12); }
.avatar-preview img { border-radius: 14px; }
.avatar-actions { align-items: flex-start; gap: 6px; }
.btn-upload-avatar { gap: 7px; padding: 7px 11px; border-color: #e8e0d4; border-radius: 9px; background: #fffefa; color: #5f5548; font-size: 10px; }
.btn-upload-avatar:hover { border-color: #d4b78a; background: #fff8ed; color: #8a521b; }
.avatar-photo-help { color: #938879; font-size: 9px; }
.fields-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px 16px; }
.field-group { gap: 5px; min-width: 0; }
.field-group.full-width { grid-column: 1 / -1; }
.field-label { justify-content: flex-start; gap: 7px; color: #665d51; font-size: 10px; font-weight: 750; }
.email-label { justify-content: space-between; }
.email-lock-note { display: inline-flex; align-items: center; gap: 4px; color: #8b7d68; font-size: 9px; font-weight: 500; }
.email-lock-note svg { width: 12px; height: 12px; stroke: #a77a3e; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.email-lock-note small { color: inherit; font-size: inherit; }
.fields-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 5px 0 -1px;
  padding-top: 16px;
  border-top: 1px solid #eee7dc;
}
.fields-section-header > div { display: flex; flex-direction: column; gap: 3px; }
.fields-section-header strong { color: #45392b; font-size: 11px; font-weight: 800; }
.fields-section-header small { color: #938879; font-size: 9px; }
.fields-section-header > span { padding: 3px 8px; border: 1px solid #eadfcf; border-radius: 999px; background: #faf6ef; color: #8b7a64; font-size: 8px; font-weight: 700; white-space: nowrap; }
.input-text, .select-custom {
  min-height: 41px;
  padding: 9px 12px;
  border: 1px solid #e8e0d4;
  border-radius: 9px;
  background: #faf8f3;
  color: #342d24;
  font-family: inherit;
  font-size: 11px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.input-text::placeholder { color: #a1988b; }
#inpPhone, #inpWebsite { direction: ltr; text-align: left; }
.input-text:focus, .select-custom:focus { border-color: #d79a4f; background: #fffefa; box-shadow: 0 0 0 3px rgba(223,137,31,.11); }
.input-text:disabled { border-style: solid; background: #f5f1e9; color: #918778; opacity: 1; }
.fields-grid select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a7c69' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-inline-end: 34px; }
html[dir="rtl"] .fields-grid select { background-position: left 12px center; }
.alert-box { gap: 10px; margin-bottom: 15px; padding: 12px 14px; border-radius: 10px; font-size: 11px; line-height: 1.7; }
.alert-box.info { border-color: #edd9b8; background: #fff7e9; color: #735225; }
.alert-box.policy { border-color: #ead6b8; background: #fff7eb; color: #6d5a40; }
#policyTitleText { color: #a56823 !important; font-size: 11px !important; }
#secPassTitle, #secCreatedAt, #secEmailStatus, #licensePlanName { color: #3d3428 !important; }
#secPassDesc { color: #81776b !important; }
#licenseCreditsCount { color: #82786b !important; }
.card-box > div[style*="background: var(--input-bg)"] { border-color: #e9e1d5 !important; border-radius: 11px !important; background: #faf8f3 !important; }
.toggle-row { gap: 16px; padding: 15px 0; border-color: #eee8df; }
.toggle-info { gap: 3px; }
.toggle-info b { color: #393127; font-size: 11px; }
.toggle-info span { color: #7d7367; font-size: 10px; line-height: 1.6; }
.slider { border-color: #dcd3c6; background-color: #e8e2d8; }
.slider:before { background-color: #fffefa; box-shadow: 0 1px 3px rgba(30,24,16,.15); }
input:checked + .slider { border-color: #d98a2d; background-color: #df891f; }
input:checked + .slider:before { background-color: #fffefa; }
#btnSaveProfile, #btnSavePreferences, #btnContactTransfer { min-height: 39px; padding: 9px 15px !important; border-radius: 9px !important; font-size: 11px !important; }
#toastBox.toast { display: none; right: 22px; bottom: 22px; left: auto; gap: 9px; align-items: center; max-width: min(440px, calc(100vw - 32px)); padding: 11px 15px; border: 1px solid #e7ddcd; border-radius: 11px; background: #fffefa; color: #514638; box-shadow: 0 12px 34px rgba(49,37,20,.14); direction: inherit; }
#toastBox.toast.show { display: flex; }
#toastBox.toast.success { border-color: #cee0ce; color: #3c754b; }
#toastBox.toast.error { border-color: #e9c9bf; color: #a44634; }
.toast-mark { display: grid; width: 19px; height: 19px; flex: 0 0 19px; place-items: center; border-radius: 50%; background: #edf4e9; font-size: 11px; font-weight: 800; }
#toastBox.toast.error .toast-mark { background: #f9ece8; }

@media (max-width: 760px) {
  header.topbar { height: 62px; padding-inline: 15px; }
  .settings-container { margin: 27px auto 55px; padding-inline: 16px; }
  .tabs-nav { top: 70px; }
  .tab-btn { justify-content: flex-start; padding-inline: 11px; }
  .card-box { padding: 19px 17px; }
}
@media (max-width: 560px) {
  header.topbar { height: 58px; gap: 8px; }
  .header-left, .header-right { gap: 6px; }
  .header-logo img { height: 23px; max-width: 100px; }
  .back-link { padding: 7px; font-size: 0; }
  .back-link svg { width: 15px; height: 15px; }
  .header-right { gap: 5px; }
  .lang-pill-btn { padding: 6px 8px; font-size: 9px; }
  .lang-pill-btn svg { display: none; }
  .user-pill { gap: 0; padding: 3px; border: 0; background: transparent; }
  .user-pill-avatar { width: 27px; height: 27px; }
  .user-pill-name { display: none; }
  #logoutBtn { padding: 6px 8px !important; font-size: 9px !important; }
  .settings-container { margin-top: 23px; padding-inline: 13px; }
  .settings-title { font-size: 24px; }
  .settings-sub { font-size: 10px; }
  .tabs-nav { top: 65px; gap: 3px; margin-bottom: 12px; padding: 4px; }
  .tab-btn { gap: 6px; min-height: 36px; padding: 7px 9px; font-size: 9px; }
  .tab-btn svg { width: 14px; height: 14px; }
  .card-box { padding: 17px 14px; }
  .card-box-header { margin-bottom: 15px; }
  .fields-grid { grid-template-columns: 1fr; gap: 12px; }
  .field-group.full-width { grid-column: 1; }
  .fields-section-header { align-items: flex-start; }
  .fields-section-header small { max-width: 34ch; line-height: 1.5; }
  .fields-section-header > span { margin-top: 1px; }
  .avatar-preview { width: 50px; height: 50px; flex-basis: 50px; border-radius: 14px; font-size: 16px; }
  .field-label { font-size: 10px; }
  .input-text, .select-custom { min-height: 40px; font-size: 11px; }
  .toggle-info span { max-width: 34ch; }
  .card-box > div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
