/* ===== ACCOUNT PAGE — Dark Noor Design ===== */
:root {
  --acc-gold: #CA8A04;
  --acc-gold-light: #FDE68A;
  --acc-gold-dim: rgba(202,138,4,.15);
  --acc-gold-b: rgba(202,138,4,.3);
  --acc-bg: #0C0A09;
  --acc-bg2: #1C1917;
  --acc-bg3: #292524;
  --acc-text: #F5F5F4;
  --acc-muted: #A8A29E;
  --acc-border: rgba(255,255,255,.08);
  --acc-glass: rgba(255,255,255,.04);
  --acc-radius: 14px;
  --acc-green: #16A34A;
  --acc-red: #DC2626;
}

/* ── NAV ── */
.acc-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 12px;
}
.acc-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.acc-logo-ar {
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 20px;
  color: var(--acc-gold);
  font-weight: 700;
  white-space: nowrap;
}
.acc-logo-tr {
  display: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--acc-text);
  white-space: nowrap;
}
.acc-avatar {
  width: 32px;
  height: 32px;
  background: var(--acc-gold-dim);
  border: 1px solid var(--acc-gold-b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--acc-gold);
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity .2s;
}
.acc-avatar:active {
  opacity: .75;
}
nav ul .active {
  color: var(--acc-text);
}
nav ul a {
  color: var(--acc-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: color .2s;
}
nav ul a:hover {
  color: var(--acc-text);
}

/* ── PAGE ── */
.acc-page {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 80px;
}
.acc-page-title {
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: 6px;
}
.acc-page-sub {
  color: var(--acc-muted);
  font-size: 13px;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ── CARD BASE ── */
.acc-card {
  background: var(--acc-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--acc-border);
  border-radius: var(--acc-radius);
  padding: 24px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.acc-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
}
.acc-card-gold {
  border-color: var(--acc-gold-b);
  background: rgba(202,138,4,.04);
}
.acc-card-gold::before {
  background: linear-gradient(90deg, transparent, rgba(202,138,4,.2), transparent);
}

/* ── SUBSCRIPTION CARD ── */
.acc-sub-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.acc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--acc-gold-dim);
  border: 1px solid var(--acc-gold-b);
  color: var(--acc-gold);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
}
.acc-badge svg {
  fill: var(--acc-gold);
  flex-shrink: 0;
}
.acc-sub-meta {
  text-align: right;
}
.acc-sub-meta span {
  display: block;
  font-size: 11px;
  color: var(--acc-muted);
  margin-bottom: 2px;
}
.acc-sub-meta strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--acc-text);
}

/* ── CERT BAR ── */
.acc-cert-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.acc-cert-label span {
  font-size: 12px;
  color: var(--acc-muted);
  font-weight: 500;
}
.acc-cert-label strong {
  font-size: 13px;
  color: var(--acc-gold);
  font-weight: 700;
}
.acc-cert-track {
  height: 6px;
  background: rgba(255,255,255,.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.acc-cert-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #CA8A04, #FDE68A);
  transition: width .4s ease;
}
.acc-cert-note {
  font-size: 11px;
  color: var(--acc-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.acc-cert-note svg {
  fill: var(--acc-muted);
  flex-shrink: 0;
}
.acc-cert-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

/* ── BUTTONS ── */
.acc-btn {
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
  white-space: nowrap;
}
.acc-btn-gold {
  background: var(--acc-gold);
  color: #000;
}
.acc-btn-gold:active {
  opacity: .85;
}
.acc-btn-ghost {
  background: transparent;
  border: 1px solid var(--acc-border);
  color: var(--acc-muted);
}
.acc-btn-ghost:hover {
  border-color: rgba(255,255,255,.18);
  color: var(--acc-text);
}
.acc-btn-danger {
  background: transparent;
  border: 1px solid rgba(220,38,38,.25);
  color: #F87171;
}
.acc-btn-danger:hover {
  background: rgba(220,38,38,.08);
  border-color: rgba(220,38,38,.4);
}

/* ── OFFLINE BOOKS ── */
.acc-offline {
  margin-bottom: 12px;
}
.acc-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 8px;
  flex-wrap: wrap;
}
.acc-section-row h2 {
  font-size: 15px;
  font-weight: 700;
}
.acc-slot-count {
  font-size: 12px;
  color: var(--acc-muted);
  background: var(--acc-bg2);
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.acc-books-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.acc-book-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--acc-bg2);
  border: 1px solid var(--acc-border);
  border-radius: 10px;
  padding: 14px;
  transition: border-color .2s;
}
.acc-book-row:hover {
  border-color: rgba(202,138,4,.25);
}
.acc-book-cover {
  width: 40px;
  height: 54px;
  background: linear-gradient(145deg, #292524, #1C1917);
  border-radius: 6px;
  border: 1px solid var(--acc-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.acc-book-cover svg {
  fill: var(--acc-gold);
  opacity: .6;
}
.acc-book-info {
  flex: 1;
  min-width: 0;
}
.acc-book-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.acc-book-meta {
  font-size: 11px;
  color: var(--acc-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.acc-book-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.acc-book-meta svg {
  fill: var(--acc-muted);
  flex-shrink: 0;
}
.acc-dl-text {
  color: var(--acc-gold);
}
.acc-dl-text svg {
  fill: var(--acc-gold);
}
.acc-book-status {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.acc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.acc-dot-green {
  background: #22C55E;
  box-shadow: 0 0 6px rgba(34,197,94,.5);
}
.acc-dot-gold {
  background: var(--acc-gold);
}
.acc-cached-label {
  font-size: 11px;
  color: #86EFAC;
  font-weight: 600;
}
.acc-dl-pct {
  font-size: 11px;
  color: var(--acc-gold);
  font-weight: 600;
}
.acc-remove-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--acc-border);
  background: transparent;
  color: var(--acc-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}
.acc-remove-btn:hover {
  border-color: rgba(220,38,38,.4);
  color: #F87171;
}
.acc-remove-btn svg {
  fill: currentColor;
}

/* ── ADD SLOT ── */
.acc-add-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1.5px dashed rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 18px;
  cursor: pointer;
  transition: all .2s;
  color: var(--acc-muted);
  font-size: 13px;
  font-weight: 500;
}
.acc-add-slot:hover {
  border-color: var(--acc-gold-b);
  color: var(--acc-gold);
}
.acc-add-slot svg {
  fill: currentColor;
  flex-shrink: 0;
}

/* ── ACCOUNT INFO ── */
.acc-info-card {
  margin-top: 24px;
}
.acc-info-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}
.acc-info-rows {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.acc-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  gap: 12px;
  flex-wrap: wrap;
}
.acc-info-row:last-child {
  border-bottom: none;
}
.acc-info-label {
  font-size: 12px;
  color: var(--acc-muted);
  font-weight: 500;
  min-width: 120px;
}
.acc-info-val {
  font-size: 13px;
  font-weight: 600;
  text-align: right;
}
.acc-val-gold {
  color: var(--acc-gold);
}
.acc-val-green {
  color: #4ADE80;
}
.acc-badge-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}
.acc-badge-premium {
  background: var(--acc-gold-dim);
  color: var(--acc-gold);
  border: 1px solid var(--acc-gold-b);
}

/* ── DANGER ZONE ── */
.acc-danger-zone {
  border-color: rgba(220,38,38,.15);
  background: rgba(220,38,38,.03);
}
.acc-danger-title {
  font-size: 13px;
  font-weight: 700;
  color: #F87171;
  margin-bottom: 4px;
}
.acc-danger-desc {
  font-size: 12px;
  color: var(--acc-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ── RESPONSIVE ── */
@media (min-width: 640px) {
  nav {
    padding: 14px 40px;
  }
  .acc-page {
    padding: 40px 24px 80px;
  }
  .acc-books-grid .acc-book-row {
    padding: 16px;
  }
  .acc-cert-actions {
    flex-wrap: nowrap;
  }
  .acc-logo-tr {
    display: inline;
    font-size: 16px;
    font-weight: 600;
    color: var(--acc-text);
  }
}
@media (min-width: 768px) {
  nav {
    padding: 16px 56px;
  }
  .acc-page {
    padding: 48px 32px 100px;
  }
  nav ul a {
    font-size: 14px;
  }
}
@media (max-width: 380px) {
  .acc-badge {
    font-size: 11px;
    padding: 4px 10px;
  }
  .acc-cert-actions .acc-btn {
    font-size: 12px;
    padding: 8px 14px;
  }
  .acc-book-row {
    padding: 12px;
    gap: 10px;
  }
  .acc-book-cover {
    width: 32px;
    height: 44px;
  }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .acc-card,
  .acc-btn,
  .acc-book-row,
  .acc-add-slot,
  .acc-remove-btn,
  .acc-cert-fill {
    transition: none !important;
  }
}
