/**
 * صندوق ميديا – واجهة فاتحة (بدون Dark Mode للقائمة)
 */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

:root {
  --sm-primary: #1d4ed8;
  --sm-primary-light: #38bdf8;
  --sm-primary-dark: #1e3a8a;
  --sm-accent: #f59e0b;
  --sm-cyan: #06b6d4;
  --sm-surface: #f1f5f9;
  --sm-sidebar-bg: #ffffff;
  --sm-sidebar-text: #334155;
  --sm-card-shadow: 0 4px 24px rgba(29, 78, 216, 0.08);
  --sm-radius: 12px;
  --sm-font: 'Cairo', 'Segoe UI', Tahoma, 'Noto Sans Arabic', sans-serif;
  --sm-help-width: min(340px, 100vw);
}

body {
  font-family: var(--sm-font);
  background-color: var(--sm-surface) !important;
}

/* ——— Sidebar فاتح (إلغاء الوضع الداكن) ——— */
.main-sidebar {
  background: var(--sm-sidebar-bg) !important;
  box-shadow: 2px 0 16px rgba(15, 23, 42, 0.06) !important;
}

.navbar-bg {
  background: linear-gradient(135deg, var(--sm-primary) 0%, var(--sm-cyan) 100%) !important;
}

.sandoq-sidebar-brand {
  padding: 12px 16px !important;
  background: #fff !important;
  border-bottom: 1px solid #e2e8f0;
  height: auto !important;
}

.sandoq-sidebar-brand .sandoq-brand-logo {
  max-width: 100%;
  height: auto;
  max-height: 56px;
  object-fit: contain;
}

.main-sidebar .sidebar-menu li a {
  color: var(--sm-sidebar-text) !important;
  border-radius: 10px;
  margin: 2px 10px;
}

.main-sidebar .sidebar-menu li a span {
  color: var(--sm-sidebar-text) !important;
}

.main-sidebar .sidebar-menu li.active > a,
.main-sidebar .sidebar-menu li a:hover {
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%) !important;
  color: var(--sm-primary) !important;
}

.main-sidebar .menu-header {
  color: var(--sm-primary) !important;
  font-weight: 700;
}

.main-sidebar .sidebar-menu li ul.dropdown-menu li a {
  color: #64748b !important;
}

/* ——— Cards & buttons ——— */
.card {
  border: 1px solid #e2e8f0;
  border-radius: var(--sm-radius);
  box-shadow: var(--sm-card-shadow);
}

.btn-primary {
  background: linear-gradient(135deg, var(--sm-primary) 0%, var(--sm-cyan) 100%);
  border: none;
  border-radius: 10px;
  font-weight: 600;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--sm-primary-dark) 0%, var(--sm-primary) 100%);
}

.section .section-header h1 {
  font-weight: 800;
  color: #0f172a;
}

.form-control:focus {
  border-color: var(--sm-primary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* ——— Help panel ——— */
.sandoq-help-panel {
  position: fixed;
  top: 64px;
  z-index: 890;
  width: var(--sm-help-width);
  max-width: 92vw;
  transition: transform 0.3s ease;
  pointer-events: none;
}

body.sandoq-rtl .sandoq-help-panel,
[dir="rtl"] .sandoq-help-panel {
  left: 0;
  right: auto;
  transform: translateX(-100%);
}

body:not(.sandoq-rtl) .sandoq-help-panel,
[dir="ltr"] .sandoq-help-panel {
  right: 0;
  transform: translateX(100%);
}

.sandoq-help-panel.is-open {
  transform: translateX(0) !important;
  pointer-events: auto;
}

.sandoq-help-toggle {
  position: absolute;
  top: 72px;
  width: 48px;
  padding: 10px 6px;
  border: none;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(180deg, var(--sm-primary), var(--sm-cyan));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(29, 78, 216, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
}

[dir="rtl"] .sandoq-help-toggle {
  left: auto;
  right: -48px;
  border-radius: 12px 0 0 12px;
}

[dir="ltr"] .sandoq-help-toggle {
  left: -48px;
  right: auto;
}

.sandoq-help-inner {
  background: #fff;
  height: calc(100vh - 80px);
  max-height: 720px;
  border-radius: 16px 0 0 16px;
  box-shadow: 0 0 40px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

[dir="rtl"] .sandoq-help-inner {
  border-radius: 0 16px 16px 0;
}

.sandoq-help-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
  color: #0f172a;
  display: grid;
  grid-template-columns: 52px 1fr 28px;
  gap: 10px;
  align-items: start;
  border-bottom: 1px solid #e2e8f0;
}

.sandoq-help-logo {
  max-height: 40px;
  width: auto;
}

.sandoq-help-header h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
}

.sandoq-help-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  direction: rtl;
  text-align: right;
  -webkit-overflow-scrolling: touch;
}

.sq-help-label {
  font-weight: 700;
  color: var(--sm-primary-dark);
  font-size: 0.85rem;
}

.sq-help-steps {
  padding-right: 1.2rem;
  font-size: 0.9rem;
  color: #334155;
}

.sandoq-help-footer {
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

/* Guide pages */
.sq-guide-logo-inline {
  max-height: 44px;
  width: auto;
}

.sq-guide-tool-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.sq-guide-tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sm-card-shadow);
}

.sq-step-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sm-primary);
  color: #fff;
  font-weight: 800;
  line-height: 36px;
  margin: 0 auto 8px;
}

.sq-onboarding-steps .col-md-3 {
  padding: 12px;
}

/* API channels icons */
.action_tag i {
  font-size: 2rem;
  margin-bottom: 8px;
}

/* Mobile */
@media (max-width: 768px) {
  .sandoq-help-panel {
    top: auto;
    bottom: 0;
    left: 0 !important;
    right: 0 !important;
    width: 100%;
    max-width: 100%;
    transform: translateY(100%) !important;
  }

  .sandoq-help-panel.is-open {
    transform: translateY(0) !important;
  }

  .sandoq-help-toggle {
    position: fixed;
    bottom: 16px;
    left: 16px !important;
    right: auto !important;
    top: auto;
    border-radius: 50px;
    width: auto;
    flex-direction: row;
    padding: 12px 18px;
    z-index: 891;
    box-shadow: 0 6px 24px rgba(29, 78, 216, 0.45);
  }

  .sandoq-help-inner {
    height: 70vh;
    max-height: none;
    border-radius: 16px 16px 0 0;
  }

  .main-sidebar .sidebar-brand img {
    max-height: 48px !important;
  }

  .section .section-header h1 {
    font-size: 1.1rem;
  }
}

.login_btn {
  background: linear-gradient(135deg, var(--sm-primary) 0%, var(--sm-cyan) 100%) !important;
  border: none !important;
  border-radius: 10px !important;
}

.main-footer {
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.wizard-step:hover {
  transform: translateY(-2px);
  box-shadow: var(--sm-card-shadow);
}
