/* ═══════════════════════════════════════════════════════════
   ACCOUNT PAGE v1 — Reynx Studio · MONO COMMAND DECK
   نفس ثيم صفحة الكارت/المفضلة (أبيض / رمادي / أسود فقط):
   - خلفية متعددة الطبقات #060607 (حبيبات matte + توهج + فينييت)
   - نافبار أبيض كامل (لوجو مقلوب brightness(0) invert(1))
   - هيدر HUD: شريط جسيمات + eyebrow mono + قراءة بريد mono tabular
   - سطوح rgba(255,255,255,.045) + hairlines — اتشال البرونزي/البيج
   - خطوط: Poppins (عناوين) + Cairo (عربي) + JetBrains Mono (تسميات/أرقام)
   ═══════════════════════════════════════════════════════════ */

/* ---------- الخلفية (نفس طبقات الكارت) ---------- */
body {
    background-color: #060607;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E"),
        radial-gradient(1000px 540px at 50% -6%, rgba(255, 255, 255, .075), rgba(255, 255, 255, 0) 70%),
        radial-gradient(1200px 820px at 50% 36%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, .55));
    background-repeat: repeat, no-repeat, no-repeat;
    color: #ffffff;
}

/* ---------- ناف بار أبيض (نفس قسم الكارت — account.css خاصة بالصفحة) ---------- */
.logo-img {
    filter: brightness(0) invert(1);
    opacity: 1;
}
.nav-links a { color: rgba(255, 255, 255, .88); }
.nav-links a:hover,
.nav-links a.active { color: #ffffff; }
.search-btn,
.action-icon,
.lang-btn { color: rgba(255, 255, 255, .9); }
.search-btn:hover,
.action-icon:hover,
.lang-btn:hover,
.action-icon.active { color: #ffffff; }
.login-btn-alt {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .35);
    color: #ffffff !important;
}
.login-btn-alt:hover {
    background: rgba(255, 255, 255, .2);
    border-color: rgba(255, 255, 255, .6);
}
.hamburger-icon span { background: #ffffff; }

/* ---------- توكنز الصفحة (مونو — بدون برونزي/بيج) ---------- */
.acc-page {
    --a-surface: rgba(255, 255, 255, .045);
    --a-surface-solid: rgba(255, 255, 255, .055);
    --a-line: rgba(255, 255, 255, .1);
    --a-line-strong: rgba(255, 255, 255, .28);
    --a-ink: #ffffff;
    --a-ink-soft: rgba(255, 255, 255, .78);
    --a-ink-mute: rgba(255, 255, 255, .55);
    --a-white: #ffffff;

    min-height: calc(100vh - 90px);
    padding: 56px 24px 90px;
    font-family: 'Poppins', 'Cairo', sans-serif;
    display: flex;
    justify-content: center;
}

/* ---------- حالات التحميل / الضيف ---------- */
.acc-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    color: var(--a-ink-soft);
    width: 100%;
    min-height: 50vh;
}

.acc-state.hidden,
.acc-wrap.hidden { display: none !important; }

.acc-spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .16);
    border-top-color: #ffffff;
    animation: acc-spin 0.8s linear infinite;
}

@keyframes acc-spin {
    to { transform: rotate(360deg); }
}

.acc-guest i {
    font-size: 40px;
    color: var(--a-ink-mute);
    margin-bottom: 4px;
}

.acc-guest h2 {
    font-family: 'Poppins', 'Cairo', sans-serif;
    font-size: 22px;
    font-weight: 500;
    color: var(--a-white);
    margin: 0;
}

.acc-guest p {
    margin: 0 0 8px;
    font-size: 15px;
    color: var(--a-ink-mute);
}

.acc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 30px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', 'Cairo', monospace;
    font-weight: 700;
    font-size: .76rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
html[dir="rtl"] .acc-btn {
    font-family: 'Cairo', 'Poppins', sans-serif;
    letter-spacing: 0;
    text-transform: none;
    font-size: 14px;
}

.acc-btn:hover { transform: translateY(-1px); }

.acc-btn-primary {
    background: #f2f4f6;
    color: #0a0b0d;
}
.acc-btn-primary:hover { opacity: .9; }

/* ---------- الحاوية العامة ---------- */
.acc-wrap {
    width: 100%;
    max-width: 1080px;
}

/* ---------- هيدر HUD — شريط جسيمات + eyebrow + قراءة البريد ---------- */
.acc-header {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 28px;
    border-radius: 16px;
    background: rgba(8, 8, 8, .72);
    border: 1px solid rgba(255, 255, 255, .1);
    margin-bottom: 28px;
}

.acc-header-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: .5;
    pointer-events: none;
}
.acc-header-particles [data-container] {
    position: absolute;
    inset: 0;
}

.acc-header-text,
.acc-readout {
    position: relative;
    z-index: 1;
}

.acc-header-text { min-width: 0; }

.acc-eyebrow {
    display: block;
    font-family: 'JetBrains Mono', 'Cairo', monospace;
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .52);
    margin-bottom: 12px;
}
html[dir="rtl"] .acc-eyebrow {
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Cairo', 'Poppins', sans-serif;
    font-size: 11px;
}

.acc-header-text h1 {
    margin: 0 0 7px;
    font-family: 'Poppins', 'Cairo', sans-serif;
    font-size: 28px;
    font-weight: 300;
    color: var(--a-white);
}

.acc-header-text h1 #accHeaderName {
    font-family: 'JetBrains Mono', 'Cairo', monospace;
    font-weight: 500;
    font-size: .95em;
}

.acc-header-text p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, .6);
}

.acc-readout {
    flex-shrink: 0;
    display: inline-flex;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 10px;
    background: rgba(8, 8, 8, .78);
}
.acc-readout-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 13px 22px;
    min-width: 150px;
}
.acc-readout-cell b {
    font-family: 'JetBrains Mono', 'Cairo', monospace;
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .52);
}
html[dir="rtl"] .acc-readout-cell b {
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Cairo', 'Poppins', sans-serif;
    font-size: 11px;
}
.acc-readout-cell strong {
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'JetBrains Mono', 'Cairo', monospace;
    font-size: .8rem;
    font-weight: 500;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.acc-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent);
    margin-bottom: 34px;
}

/* ---------- التخطيط: شريط جانبي + محتوى ---------- */
.acc-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: start;
}

/* الشريط الجانبي */
.acc-sidebar {
    background: var(--a-surface-solid);
    border: 1px solid var(--a-line);
    border-radius: 16px;
    padding: 22px;
    position: sticky;
    top: 24px;
}

.acc-sidebar h3 {
    margin: 0 0 16px;
    font-family: 'JetBrains Mono', 'Cairo', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .52);
}
html[dir="rtl"] .acc-sidebar h3 {
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Cairo', 'Poppins', sans-serif;
    font-size: 13px;
}

.acc-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.acc-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 16px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--a-ink-mute);
    font-family: 'Cairo', 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
    text-align: right;
}

.acc-nav-item.active {
    background: #f2f4f6;
    color: #0a0b0d;
    font-weight: 700;
}

.acc-nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .6;
}

/* المحتوى الرئيسي */
.acc-main { min-width: 0; }

.acc-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.acc-section {
    position: relative;
    padding: 26px 28px;
    border-radius: 16px;
    background: var(--a-surface);
    border: 1px solid var(--a-line);
    transition: border-color .25s ease;
}
.acc-section:hover { border-color: rgba(255, 255, 255, .18); }

.acc-section h2 {
    margin: 0 0 6px;
    font-family: 'Poppins', 'Cairo', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--a-white);
}

.acc-section-sub {
    margin: 0 0 18px;
    font-size: 13px;
    color: var(--a-ink-mute);
    line-height: 1.7;
}

.acc-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.acc-field-label {
    font-size: 12.5px;
    color: var(--a-ink-soft);
    font-weight: 500;
}

.acc-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--a-line);
    color: var(--a-ink);
    font-family: 'Cairo', 'Poppins', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    outline: none;
    transition: border-color .2s ease, background .2s ease;
}

.acc-field input:focus {
    border-color: #ffffff;
    background: rgba(255, 255, 255, .07);
}

.acc-field input::placeholder {
    color: var(--a-ink-mute);
    font-weight: 400;
}

.acc-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ---------- صورة الملف الشخصي ---------- */
.acc-avatar-upload {
    display: flex;
    align-items: center;
    gap: 18px;
}

.acc-avatar-circle {
    position: relative;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #f2f4f6;
    border: 1px solid rgba(255, 255, 255, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}

.acc-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.acc-avatar-initial {
    font-family: 'Poppins', 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 30px;
    color: #0a0b0d;
}

.acc-avatar-btn {
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--a-line-strong);
    background: transparent;
    color: rgba(255, 255, 255, .85);
    font-family: 'Cairo', 'Poppins', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.acc-avatar-btn:hover {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .5);
    color: #ffffff;
}

/* ---------- زرار الحفظ (CTA أبيض — نفس انفراج الكارت) ---------- */
.acc-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 4px;
}

.acc-save-btn {
    padding: 13px 34px;
    border-radius: 10px;
    border: none;
    background: #f2f4f6;
    color: #0a0b0d;
    font-family: 'JetBrains Mono', 'Cairo', monospace;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
html[dir="rtl"] .acc-save-btn {
    font-family: 'Cairo', 'Poppins', sans-serif;
    letter-spacing: 0;
    text-transform: none;
    font-size: 14.5px;
    font-weight: 700;
}

.acc-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .55);
}

.acc-save-btn:disabled {
    opacity: .6;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.acc-save-status {
    font-size: 13px;
    color: var(--a-ink-mute);
}

.acc-save-status.success { color: #ffffff; }
.acc-save-status.error { color: rgba(255, 255, 255, .55); }

/* ---------- تقليل الحركة ---------- */
@media (prefers-reduced-motion: reduce) {
    .acc-page *,
    .acc-page *::before,
    .acc-page *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    /* اللودر إشارة ضرورية — يفضل يدور ببطء بدل ما يختفي */
    .acc-spinner {
        animation: acc-spin 1.6s linear infinite !important;
    }
}

/* ---------- استجابة الشاشات الصغيرة ---------- */
@media (max-width: 860px) {
    .acc-grid {
        grid-template-columns: 1fr;
    }
    .acc-sidebar {
        position: static;
    }
    .acc-nav {
        flex-direction: row;
        overflow-x: auto;
    }
}

@media (max-width: 560px) {
    .acc-page { padding: 40px 16px 70px; }
    .acc-header { flex-direction: column; align-items: flex-start; }
    .acc-section { padding: 22px 18px; }
    .acc-field-row { grid-template-columns: 1fr; }
    .acc-avatar-upload { flex-direction: column; align-items: flex-start; }
}
