/**
 * theme-dark-designs.css — تنفيذ تصاميم الوضع الداكن الثلاثة
 * 1) Midnight Gold  → classic + dark
 * 2) Violet Glass   → glass + dark
 * 3) Cyber Blue     → futuristic + dark
 */

/* ========== 1) MIDNIGHT GOLD — كلاسيك داكن فاخر ========== */
html[data-royal-shape="classic"] body[data-theme="dark"],
html:not([data-royal-shape]) body[data-theme="dark"],
html[data-royal-shape="classic"] body.dark-mode,
html:not([data-royal-shape]) body.dark-mode {
  --bg-color: #0c0c14 !important;
  --bg-gradient: linear-gradient(165deg, #0c0c14 0%, #12121c 50%, #0e0e16 100%) !important;
  --sidebar-bg: #0e0e18 !important;
  --sidebar-gradient: #0e0e18 !important;
  --card-bg: #16161f !important;
  --card-solid: #16161f !important;
  --card-border: rgba(201, 168, 76, 0.18) !important;
  --card-shadow: 0 8px 28px rgba(0, 0, 0, 0.45) !important;
  --text-color: #e8e6f0 !important;
  --text-muted: #9a98a8 !important;
  --border-color: rgba(201, 168, 76, 0.16) !important;
  --gold: #c9a84c !important;
  --gold-glow: rgba(201, 168, 76, 0.35) !important;
  background: var(--bg-gradient) !important;
  color: #e8e6f0 !important;
}

html[data-royal-shape="classic"] body[data-theme="dark"] .panel,
html[data-royal-shape="classic"] body[data-theme="dark"] .card,
html[data-royal-shape="classic"] body[data-theme="dark"] .settings-card,
html[data-royal-shape="classic"] body[data-theme="dark"] .royal-block,
html[data-royal-shape="classic"] body[data-theme="dark"] .stat-card,
html[data-royal-shape="classic"] body[data-theme="dark"] .modal-box,
html[data-royal-shape="classic"] body[data-theme="dark"] .modal-content,
html:not([data-royal-shape]) body[data-theme="dark"] .panel,
html:not([data-royal-shape]) body[data-theme="dark"] .card,
html:not([data-royal-shape]) body[data-theme="dark"] .settings-card,
html:not([data-royal-shape]) body[data-theme="dark"] .modal-box {
  background: #16161f !important;
  border: 1px solid rgba(201, 168, 76, 0.16) !important;
  color: #e8e6f0 !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4) !important;
}

html[data-royal-shape="classic"] body[data-theme="dark"] h2,
html[data-royal-shape="classic"] body[data-theme="dark"] h3,
html[data-royal-shape="classic"] body[data-theme="dark"] .panel-header h2,
html[data-royal-shape="classic"] body[data-theme="dark"] .section-container > h2,
html:not([data-royal-shape]) body[data-theme="dark"] h2,
html:not([data-royal-shape]) body[data-theme="dark"] .panel-header h2 {
  color: #c9a84c !important;
}

html[data-royal-shape="classic"] body[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
html[data-royal-shape="classic"] body[data-theme="dark"] select,
html[data-royal-shape="classic"] body[data-theme="dark"] textarea,
html:not([data-royal-shape]) body[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
html:not([data-royal-shape]) body[data-theme="dark"] select,
html:not([data-royal-shape]) body[data-theme="dark"] textarea {
  background: #12121a !important;
  border: 1.5px solid rgba(201, 168, 76, 0.22) !important;
  color: #e8e6f0 !important;
}
html[data-royal-shape="classic"] body[data-theme="dark"] label,
html:not([data-royal-shape]) body[data-theme="dark"] label {
  color: #b0a898 !important;
}

html[data-royal-shape="classic"] body[data-theme="dark"] table th,
html:not([data-royal-shape]) body[data-theme="dark"] table th {
  background: #1a1a24 !important;
  color: #c9a84c !important;
  border-color: rgba(201, 168, 76, 0.15) !important;
}
html[data-royal-shape="classic"] body[data-theme="dark"] table td,
html:not([data-royal-shape]) body[data-theme="dark"] table td {
  color: #d8d6e0 !important;
  border-color: rgba(201, 168, 76, 0.08) !important;
}
html[data-royal-shape="classic"] body[data-theme="dark"] table tbody tr:nth-child(even) td,
html:not([data-royal-shape]) body[data-theme="dark"] table tbody tr:nth-child(even) td {
  background: rgba(201, 168, 76, 0.04) !important;
}

html[data-royal-shape="classic"] body[data-theme="dark"] #sidebar,
html[data-royal-shape="classic"] body[data-theme="dark"] .rnav,
html:not([data-royal-shape]) body[data-theme="dark"] #sidebar,
html:not([data-royal-shape]) body[data-theme="dark"] .rnav {
  background: #0e0e18 !important;
  border-color: rgba(201, 168, 76, 0.12) !important;
}
html[data-royal-shape="classic"] body[data-theme="dark"] .rnav-item.active,
html:not([data-royal-shape]) body[data-theme="dark"] .rnav-item.active {
  background: rgba(201, 168, 76, 0.14) !important;
  color: #c9a84c !important;
  border-color: rgba(201, 168, 76, 0.3) !important;
}

html[data-royal-shape="classic"] body[data-theme="dark"] .r171-btn,
html:not([data-royal-shape]) body[data-theme="dark"] .r171-btn {
  background: #12121a !important;
  border-color: rgba(201, 168, 76, 0.28) !important;
  color: #e8e6f0 !important;
  -webkit-text-fill-color: #e8e6f0 !important;
}
html[data-royal-shape="classic"] body[data-theme="dark"] .r171-menu,
html:not([data-royal-shape]) body[data-theme="dark"] .r171-menu {
  background: #14141e !important;
  border-color: rgba(201, 168, 76, 0.25) !important;
  color: #e8e6f0 !important;
}
html[data-royal-shape="classic"] body[data-theme="dark"] .r171-lab,
html:not([data-royal-shape]) body[data-theme="dark"] .r171-lab {
  color: #e8e6f0 !important;
  -webkit-text-fill-color: #e8e6f0 !important;
}

html[data-royal-shape="classic"] body[data-theme="dark"] .modal-overlay,
html[data-royal-shape="classic"] body[data-theme="dark"] #universal-modal,
html:not([data-royal-shape]) body[data-theme="dark"] .modal-overlay {
  background: rgba(6, 6, 12, 0.75) !important;
}
html[data-royal-shape="classic"] body[data-theme="dark"] .sinv-card,
html:not([data-royal-shape]) body[data-theme="dark"] .sinv-card {
  background: #16161f !important;
  border-color: rgba(201, 168, 76, 0.3) !important;
  color: #e8e6f0 !important;
}

html[data-royal-shape="classic"] body[data-theme="dark"] .btn-neon-gold {
  border-color: #c9a84c !important;
  color: #c9a84c !important;
}
html[data-royal-shape="classic"] body[data-theme="dark"] .btn-neon-gold:hover {
  background: #c9a84c !important;
  color: #0c0c14 !important;
}

/* ========== 2) VIOLET GLASS DARK — زجاج بنفسجي ========== */
html[data-royal-shape="glass"] body[data-theme="dark"],
html[data-royal-shape="glass"] body.dark-mode,
html[data-royal-shape="glass"] body.dark {
  --bg-color: #0a0a16 !important;
  --bg-gradient: linear-gradient(160deg, #0a0a16 0%, #12102a 40%, #0e0c20 100%) !important;
  --sidebar-bg: rgba(12, 10, 28, 0.96) !important;
  --card-bg: rgba(22, 18, 42, 0.92) !important;
  --card-solid: rgba(22, 18, 42, 0.97) !important;
  --card-border: rgba(123, 108, 255, 0.28) !important;
  --text-color: #ebe7f8 !important;
  --text-muted: #9a94b8 !important;
  --border-color: rgba(123, 108, 255, 0.3) !important;
  --gold: #9b8cff !important;
  --gold-glow: rgba(123, 108, 255, 0.4) !important;
  background: var(--bg-gradient) !important;
  color: #ebe7f8 !important;
}

html[data-royal-shape="glass"] body[data-theme="dark"] .panel,
html[data-royal-shape="glass"] body[data-theme="dark"] .card,
html[data-royal-shape="glass"] body[data-theme="dark"] .settings-card,
html[data-royal-shape="glass"] body[data-theme="dark"] .royal-block,
html[data-royal-shape="glass"] body[data-theme="dark"] .stat-card,
html[data-royal-shape="glass"] body.dark-mode .panel,
html[data-royal-shape="glass"] body.dark-mode .card,
html[data-royal-shape="glass"] body.dark-mode .settings-card {
  background: rgba(22, 18, 42, 0.94) !important;
  border: 1px solid rgba(123, 108, 255, 0.28) !important;
  color: #ebe7f8 !important;
  box-shadow: 0 12px 40px rgba(60, 40, 140, 0.25), inset 0 1px 0 rgba(255,255,255,0.04) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border-radius: 16px !important;
}

html[data-royal-shape="glass"] body[data-theme="dark"] h2,
html[data-royal-shape="glass"] body[data-theme="dark"] h3,
html[data-royal-shape="glass"] body[data-theme="dark"] .panel-header h2,
html[data-royal-shape="glass"] body.dark-mode h2 {
  color: #b8a8ff !important;
}

html[data-royal-shape="glass"] body[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
html[data-royal-shape="glass"] body[data-theme="dark"] select,
html[data-royal-shape="glass"] body[data-theme="dark"] textarea,
html[data-royal-shape="glass"] body.dark-mode input:not([type="checkbox"]):not([type="radio"]),
html[data-royal-shape="glass"] body.dark-mode select,
html[data-royal-shape="glass"] body.dark-mode textarea {
  background: rgba(14, 12, 30, 0.95) !important;
  border: 1.5px solid rgba(123, 108, 255, 0.35) !important;
  color: #ebe7f8 !important;
  border-radius: 12px !important;
}
html[data-royal-shape="glass"] body[data-theme="dark"] label,
html[data-royal-shape="glass"] body.dark-mode label {
  color: #a8a0c8 !important;
}

html[data-royal-shape="glass"] body[data-theme="dark"] table th,
html[data-royal-shape="glass"] body.dark-mode table th {
  background: rgba(40, 32, 72, 0.95) !important;
  color: #b8a8ff !important;
}
html[data-royal-shape="glass"] body[data-theme="dark"] table td,
html[data-royal-shape="glass"] body.dark-mode table td {
  color: #ddd8f0 !important;
  border-color: rgba(123, 108, 255, 0.12) !important;
}
html[data-royal-shape="glass"] body[data-theme="dark"] table tbody tr:nth-child(even) td,
html[data-royal-shape="glass"] body.dark-mode table tbody tr:nth-child(even) td {
  background: rgba(123, 108, 255, 0.06) !important;
}

html[data-royal-shape="glass"] body[data-theme="dark"] .modal-overlay,
html[data-royal-shape="glass"] body[data-theme="dark"] #universal-modal,
html[data-royal-shape="glass"] body.dark-mode .modal-overlay {
  background: rgba(6, 4, 18, 0.78) !important;
  backdrop-filter: blur(14px) !important;
}
html[data-royal-shape="glass"] body[data-theme="dark"] .modal-box,
html[data-royal-shape="glass"] body[data-theme="dark"] .modal-content,
html[data-royal-shape="glass"] body[data-theme="dark"] .sinv-card,
html[data-royal-shape="glass"] body.dark-mode .modal-box,
html[data-royal-shape="glass"] body.dark-mode .sinv-card {
  background: rgba(20, 16, 40, 0.98) !important;
  border: 1px solid rgba(123, 108, 255, 0.4) !important;
  color: #ebe7f8 !important;
  box-shadow: 0 24px 64px rgba(40, 20, 100, 0.5) !important;
  border-radius: 18px !important;
}
html[data-royal-shape="glass"] body[data-theme="dark"] .modal-title,
html[data-royal-shape="glass"] body.dark-mode .modal-title {
  color: #b8a8ff !important;
}

html[data-royal-shape="glass"] body[data-theme="dark"] .r171-btn,
html[data-royal-shape="glass"] body.dark-mode .r171-btn {
  background: rgba(14, 12, 30, 0.96) !important;
  border: 1.5px solid rgba(123, 108, 255, 0.4) !important;
  color: #ebe7f8 !important;
  -webkit-text-fill-color: #ebe7f8 !important;
  border-radius: 12px !important;
}
html[data-royal-shape="glass"] body[data-theme="dark"] .r171-menu,
html[data-royal-shape="glass"] body.dark-mode .r171-menu {
  background: rgba(16, 12, 34, 0.98) !important;
  border-color: rgba(123, 108, 255, 0.4) !important;
  color: #ebe7f8 !important;
  box-shadow: 0 16px 40px rgba(40, 20, 100, 0.4) !important;
}
html[data-royal-shape="glass"] body[data-theme="dark"] .r171-lab,
html[data-royal-shape="glass"] body.dark-mode .r171-lab {
  color: #ebe7f8 !important;
  -webkit-text-fill-color: #ebe7f8 !important;
}

html[data-royal-shape="glass"] body[data-theme="dark"] #sidebar,
html[data-royal-shape="glass"] body[data-theme="dark"] .rnav,
html[data-royal-shape="glass"] body.dark-mode #sidebar {
  background: rgba(10, 8, 24, 0.97) !important;
  border-color: rgba(123, 108, 255, 0.2) !important;
}
html[data-royal-shape="glass"] body[data-theme="dark"] .rnav-item.active,
html[data-royal-shape="glass"] body.dark-mode .rnav-item.active {
  background: rgba(123, 108, 255, 0.22) !important;
  color: #c8b8ff !important;
  box-shadow: 0 0 20px rgba(123, 108, 255, 0.15) !important;
}

html[data-royal-shape="glass"] body[data-theme="dark"] #royal-top-menu,
html[data-royal-shape="glass"] body.dark-mode #royal-top-menu {
  background: rgba(12, 10, 28, 0.96) !important;
  border-bottom: 1px solid rgba(123, 108, 255, 0.25) !important;
  color: #ebe7f8 !important;
}
html[data-royal-shape="glass"] body[data-theme="dark"] #royal-top-menu .rtm-group,
html[data-royal-shape="glass"] body.dark-mode #royal-top-menu .rtm-group {
  background: rgba(22, 18, 42, 0.9) !important;
  border-color: rgba(123, 108, 255, 0.25) !important;
}
html[data-royal-shape="glass"] body[data-theme="dark"] #royal-top-menu .rtm-item,
html[data-royal-shape="glass"] body.dark-mode #royal-top-menu .rtm-item {
  color: #d8d0f0 !important;
}
html[data-royal-shape="glass"] body[data-theme="dark"] #royal-top-menu .rtm-brand strong,
html[data-royal-shape="glass"] body.dark-mode #royal-top-menu .rtm-brand strong {
  color: #b8a8ff !important;
}

html[data-royal-shape="glass"] body[data-theme="dark"] .btn-neon-gold {
  border-color: #9b8cff !important;
  color: #9b8cff !important;
}
html[data-royal-shape="glass"] body[data-theme="dark"] .btn-neon-gold:hover {
  background: #7b6cff !important;
  color: #fff !important;
}

/* ========== 3) CYBER BLUE — مستقبلي سماوي ========== */
html[data-royal-shape="futuristic"] body[data-theme="dark"],
html[data-royal-shape="futuristic"] body.dark-mode,
html[data-royal-shape="futuristic"] body.dark {
  --bg-color: #040c16 !important;
  --bg-gradient: linear-gradient(165deg, #040c16 0%, #071528 45%, #051018 100%) !important;
  --sidebar-bg: rgba(4, 12, 22, 0.97) !important;
  --card-bg: rgba(6, 18, 34, 0.92) !important;
  --card-solid: rgba(6, 18, 34, 0.97) !important;
  --card-border: rgba(0, 212, 255, 0.25) !important;
  --text-color: #e2f4ff !important;
  --text-muted: #6a9ab0 !important;
  --border-color: rgba(0, 212, 255, 0.28) !important;
  --gold: #00d4ff !important;
  --gold-glow: rgba(0, 212, 255, 0.4) !important;
  background: var(--bg-gradient) !important;
  color: #e2f4ff !important;
}

html[data-royal-shape="futuristic"] body[data-theme="dark"] .panel,
html[data-royal-shape="futuristic"] body[data-theme="dark"] .card,
html[data-royal-shape="futuristic"] body[data-theme="dark"] .settings-card,
html[data-royal-shape="futuristic"] body[data-theme="dark"] .royal-block,
html[data-royal-shape="futuristic"] body[data-theme="dark"] .stat-card,
html[data-royal-shape="futuristic"] body.dark-mode .panel,
html[data-royal-shape="futuristic"] body.dark-mode .card,
html[data-royal-shape="futuristic"] body.dark-mode .settings-card {
  background: rgba(6, 18, 34, 0.94) !important;
  border: 1px solid rgba(0, 212, 255, 0.28) !important;
  color: #e2f4ff !important;
  box-shadow: 0 0 30px rgba(0, 150, 200, 0.08), 0 12px 36px rgba(0, 0, 0, 0.35) !important;
  border-radius: 14px !important;
}

html[data-royal-shape="futuristic"] body[data-theme="dark"] h2,
html[data-royal-shape="futuristic"] body[data-theme="dark"] h3,
html[data-royal-shape="futuristic"] body[data-theme="dark"] .panel-header h2,
html[data-royal-shape="futuristic"] body.dark-mode h2 {
  color: #00d4ff !important;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.25) !important;
}

html[data-royal-shape="futuristic"] body[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
html[data-royal-shape="futuristic"] body[data-theme="dark"] select,
html[data-royal-shape="futuristic"] body[data-theme="dark"] textarea,
html[data-royal-shape="futuristic"] body.dark-mode input:not([type="checkbox"]):not([type="radio"]),
html[data-royal-shape="futuristic"] body.dark-mode select,
html[data-royal-shape="futuristic"] body.dark-mode textarea {
  background: rgba(4, 14, 26, 0.95) !important;
  border: 1.5px solid rgba(0, 212, 255, 0.35) !important;
  color: #e2f4ff !important;
  border-radius: 10px !important;
}
html[data-royal-shape="futuristic"] body[data-theme="dark"] label,
html[data-royal-shape="futuristic"] body.dark-mode label {
  color: #7ab0c8 !important;
}

html[data-royal-shape="futuristic"] body[data-theme="dark"] table th,
html[data-royal-shape="futuristic"] body.dark-mode table th {
  background: rgba(0, 36, 60, 0.95) !important;
  color: #00d4ff !important;
  border-color: rgba(0, 212, 255, 0.25) !important;
}
html[data-royal-shape="futuristic"] body[data-theme="dark"] table td,
html[data-royal-shape="futuristic"] body.dark-mode table td {
  color: #c8e8f8 !important;
  border-color: rgba(0, 212, 255, 0.1) !important;
}
html[data-royal-shape="futuristic"] body[data-theme="dark"] table tbody tr:nth-child(even) td,
html[data-royal-shape="futuristic"] body.dark-mode table tbody tr:nth-child(even) td {
  background: rgba(0, 212, 255, 0.04) !important;
}

html[data-royal-shape="futuristic"] body[data-theme="dark"] .modal-overlay,
html[data-royal-shape="futuristic"] body[data-theme="dark"] #universal-modal,
html[data-royal-shape="futuristic"] body.dark-mode .modal-overlay {
  background: rgba(2, 6, 14, 0.8) !important;
  backdrop-filter: blur(12px) !important;
}
html[data-royal-shape="futuristic"] body[data-theme="dark"] .modal-box,
html[data-royal-shape="futuristic"] body[data-theme="dark"] .sinv-card,
html[data-royal-shape="futuristic"] body.dark-mode .modal-box,
html[data-royal-shape="futuristic"] body.dark-mode .sinv-card {
  background: rgba(4, 16, 30, 0.98) !important;
  border: 1px solid rgba(0, 212, 255, 0.4) !important;
  color: #e2f4ff !important;
  box-shadow: 0 0 40px rgba(0, 180, 220, 0.15), 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}
html[data-royal-shape="futuristic"] body[data-theme="dark"] .modal-title,
html[data-royal-shape="futuristic"] body.dark-mode .modal-title {
  color: #00d4ff !important;
}

html[data-royal-shape="futuristic"] body[data-theme="dark"] .r171-btn,
html[data-royal-shape="futuristic"] body.dark-mode .r171-btn {
  background: rgba(4, 14, 26, 0.96) !important;
  border: 1.5px solid rgba(0, 212, 255, 0.4) !important;
  color: #e2f4ff !important;
  -webkit-text-fill-color: #e2f4ff !important;
}
html[data-royal-shape="futuristic"] body[data-theme="dark"] .r171-menu,
html[data-royal-shape="futuristic"] body.dark-mode .r171-menu {
  background: rgba(4, 12, 24, 0.98) !important;
  border-color: rgba(0, 212, 255, 0.4) !important;
  color: #e2f4ff !important;
  box-shadow: 0 0 30px rgba(0, 180, 220, 0.12) !important;
}
html[data-royal-shape="futuristic"] body[data-theme="dark"] .r171-lab,
html[data-royal-shape="futuristic"] body.dark-mode .r171-lab {
  color: #e2f4ff !important;
  -webkit-text-fill-color: #e2f4ff !important;
}

html[data-royal-shape="futuristic"] body[data-theme="dark"] #sidebar,
html[data-royal-shape="futuristic"] body[data-theme="dark"] .rnav,
html[data-royal-shape="futuristic"] body.dark-mode #sidebar {
  background: rgba(3, 10, 20, 0.98) !important;
  border-color: rgba(0, 212, 255, 0.2) !important;
}
html[data-royal-shape="futuristic"] body[data-theme="dark"] .rnav-item.active,
html[data-royal-shape="futuristic"] body.dark-mode .rnav-item.active {
  background: rgba(0, 180, 220, 0.18) !important;
  color: #00d4ff !important;
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.2) !important;
  border-color: rgba(0, 212, 255, 0.4) !important;
}

html[data-royal-shape="futuristic"] body[data-theme="dark"] .btn-neon-gold {
  border-color: #00d4ff !important;
  color: #00d4ff !important;
}
html[data-royal-shape="futuristic"] body[data-theme="dark"] .btn-neon-gold:hover {
  background: #00d4ff !important;
  color: #041018 !important;
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.45) !important;
}

html[data-royal-shape="futuristic"] body[data-theme="dark"] #royal-top-menu,
html[data-royal-shape="futuristic"] body.dark-mode #royal-top-menu {
  background: rgba(4, 12, 22, 0.96) !important;
  border-bottom: 1px solid rgba(0, 212, 255, 0.25) !important;
  color: #e2f4ff !important;
}
html[data-royal-shape="futuristic"] body[data-theme="dark"] #royal-top-menu .rtm-brand strong {
  color: #00d4ff !important;
}
