/* === Senpay Auth Golden Theme === */

/* خلفية عامة لصفحات الحساب */
body.woocommerce-account {
  background: radial-gradient(circle at top, #111827 0, #020617 45%, #000000 100%);
}

/* إخفاء الهيدر والفوتر في صفحة الحساب للزوار فقط (غير مسجلين) */
body.woocommerce-account:not(.logged-in) header,
body.woocommerce-account:not(.logged-in) .site-header,
body.woocommerce-account:not(.logged-in) .elementor-location-header,
body.woocommerce-account:not(.logged-in) footer,
body.woocommerce-account:not(.logged-in) .site-footer,
body.woocommerce-account:not(.logged-in) .elementor-location-footer {
  display: none !important;
}

/* إزالة المارجن/بادينغ الافتراضي من الثيم في هذه الصفحة */
body.woocommerce-account:not(.logged-in) {
  margin: 0 !important;
  padding: 0 !important;
}

body.woocommerce-account:not(.logged-in) #page,
body.woocommerce-account:not(.logged-in) .site,
body.woocommerce-account:not(.logged-in) .content-area,
body.woocommerce-account:not(.logged-in) .site-content,
body.woocommerce-account:not(.logged-in) .elementor-location-single,
body.woocommerce-account:not(.logged-in) .elementor-location-archive {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* Wrapper around forms */
.senpay-auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

/* البطاقة الرئيسية */
.senpay-auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(5, 10, 25, 0.96);
  border-radius: 22px;
  padding: 26px 26px 30px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: #e5e7eb;
  position: relative;
  overflow: hidden;
}

/* Subtle golden glow */
.senpay-auth-card::before {
  content: "";
  position: absolute;
  inset: -120px;
  background: radial-gradient(circle at top, rgba(212, 175, 55, 0.25), transparent 60%);
  opacity: 0.5;
  pointer-events: none;
}

/* Keep inner content above glow */
.senpay-auth-inner {
  position: relative;
  z-index: 1;
}

/* Logo / brand */
.senpay-auth-logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fefce8;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.senpay-auth-logo span.dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #d4af37;
}

/* Headings */
.senpay-auth-title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  color: #f9fafb;
}

.senpay-auth-subtitle {
  margin: 0 0 18px;
  font-size: 13px;
  color: #9ca3af;
}

/* Forms */
.senpay-auth-form {
  margin-top: 10px;
}

.senpay-auth-form .form-row {
  margin-bottom: 14px;
}

/* Labels */
.senpay-auth-form label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #e5e7eb;
}

/* Inputs */
.senpay-auth-form input.input-text,
.senpay-auth-form input[type="text"],
.senpay-auth-form input[type="password"],
.senpay-auth-form input[type="email"] {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #1f2937;
  background: rgba(15, 23, 42, 0.85);
  padding: 10px 12px;
  font-size: 13px;
  color: #e5e7eb;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.senpay-auth-form input.input-text::placeholder {
  color: #6b7280;
}

.senpay-auth-form input.input-text:focus {
  border-color: #d4af37;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.4);
  background: rgba(15, 23, 42, 0.95);
}

/* Remember me + forgot link row */
.senpay-auth-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  margin: 4px 0 14px;
}

.senpay-auth-remember label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9ca3af;
}

.senpay-auth-remember input[type="checkbox"] {
  accent-color: #d4af37;
}

/* Links */
.senpay-auth-link {
  font-size: 12px;
  color: #facc15;
  text-decoration: none;
}
.senpay-auth-link:hover {
  text-decoration: underline;
}

/* Primary button */
.senpay-auth-btn-primary,
.woocommerce form .senpay-auth-btn-primary.button {
  width: 100%;
  border-radius: 999px;
  border: none;
  outline: none;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, #d4af37, #facc15);
  color: #111827;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 40px rgba(250, 204, 21, 0.3);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
}

.senpay-auth-btn-primary:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(250, 204, 21, 0.4);
}

.senpay-auth-btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
}

/* Bottom text (create account / back to login) */
.senpay-auth-bottom {
  margin-top: 16px;
  font-size: 12px;
  text-align: center;
  color: #6b7280;
}

.senpay-auth-bottom a {
  color: #facc15;
  text-decoration: none;
  font-weight: 500;
}
.senpay-auth-bottom a:hover {
  text-decoration: underline;
}

/* Notices */
.woocommerce-notices-wrapper,
.woocommerce-error,
.woocommerce-message {
  margin-bottom: 12px;
}

/* Adjust Woo notices inside our card */
.senpay-auth-inner .woocommerce-error,
.senpay-auth-inner .woocommerce-message {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 14px;
  border: 1px solid rgba(248, 250, 252, 0.1);
  color: #fecaca;
  padding: 10px 12px;
  font-size: 12px;
}

/* Lost password special note */
.senpay-auth-note {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Responsive auth */
@media (max-width: 600px) {
  .senpay-auth-card {
    padding: 22px 18px 24px;
    border-radius: 20px;
  }
  .senpay-auth-title {
    font-size: 20px;
  }
}

/* ========================= */
/*      CLIENT DASHBOARD     */
/* ========================= */

.senpay-dash-shell {
  background: radial-gradient(circle at top, #020617 0, #020617 40%, #000000 100%);
  padding: 36px 0 48px;
}

.senpay-dash-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e5e7eb;
}

/* Generic card */
.senpay-dash-card {
  background: rgba(10, 16, 32, 0.97);
  border-radius: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.55);
}

/* Centered small card (for login required) */
.senpay-dash-card-center {
  max-width: 480px;
  margin: 40px auto;
  text-align: center;
}

.senpay-dash-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: #f9fafb;
}

.senpay-dash-text {
  margin: 0 0 16px;
  font-size: 14px;
  color: #9ca3af;
}

/* Hero */
.senpay-dash-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
  padding: 20px 22px;
  border-radius: 24px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: radial-gradient(circle at top left, rgba(212, 175, 55, 0.16), transparent 55%),
              radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.22), transparent 60%),
              #020617;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.8);
}

.senpay-dash-hero-main {
  max-width: 70%;
}

.senpay-dash-logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fefce8;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.senpay-dash-logo .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #d4af37;
}

.senpay-dash-hero-title {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 700;
  color: #f9fafb;
}

.senpay-dash-hero-sub {
  margin: 0;
  font-size: 14px;
  color: #cbd5f5;
  max-width: 520px;
}

.senpay-dash-hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.senpay-dash-hero-email {
  font-size: 13px;
  color: #e5e7eb;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
}

/* Buttons */
.senpay-dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.12s ease, filter 0.1s ease, background 0.1s ease;
}

.senpay-dash-btn.sm {
  padding: 6px 12px;
  font-size: 12px;
}

.senpay-dash-btn-primary {
  background: linear-gradient(135deg, #d4af37, #facc15);
  color: #111827;
  box-shadow: 0 16px 40px rgba(250, 204, 21, 0.38);
}
.senpay-dash-btn-primary:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 18px 44px rgba(250, 204, 21, 0.45);
}

.senpay-dash-btn-ghost {
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.8);
}
.senpay-dash-btn-ghost:hover {
  background: rgba(15, 23, 42, 1);
}

/* Layout helpers */
.senpay-dash-section {
  margin-top: 26px;
}

.senpay-dash-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.senpay-dash-section-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #f9fafb;
}

.senpay-dash-section-tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px dashed rgba(212, 175, 55, 0.7);
  color: #facc15;
}

/* Grid */
.senpay-dash-grid {
  display: grid;
}
.senpay-dash-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.senpay-dash-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.senpay-dash-gap-lg {
  gap: 18px;
}
.senpay-dash-gap-md {
  gap: 14px;
}

/* Stat cards */
.senpay-dash-card-stat {
  position: relative;
  overflow: hidden;
}
.senpay-dash-card-label {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 6px;
}
.senpay-dash-card-value {
  font-size: 24px;
  font-weight: 700;
  color: #f9fafb;
}
.senpay-dash-card-note {
  margin-top: 4px;
  font-size: 11px;
  color: #6b7280;
}

/* Actions cards */
.senpay-dash-card-action {
  display: block;
  text-decoration: none;
  color: inherit;
  background: rgba(12, 20, 40, 0.96);
}
.senpay-dash-card-action h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: #f9fafb;
}
.senpay-dash-card-action p {
  margin: 0;
  font-size: 13px;
  color: #9ca3af;
}
.senpay-dash-card-action:hover {
  border-color: rgba(212, 175, 55, 0.9);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.9);
  transform: translateY(-1px);
}

/* Tables */
.senpay-dash-table-wrapper{
  border-radius: 16px;
  border: 1px solid rgba(31, 41, 55, 0.9);
  background: rgba(15, 23, 42, 0.9);

  /* ✅ مهم: خليه يقدر يسكرول فالموبايل */
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.senpay-dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.senpay-dash-table thead {
  background: rgba(15, 23, 42, 0.96);
}

.senpay-dash-table th,
.senpay-dash-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
}

.senpay-dash-table th {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
}

.senpay-dash-table tbody tr:last-child td {
  border-bottom: none;
}

/* Pills for service type */
.senpay-dash-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.senpay-dash-pill-iptv {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}
.senpay-dash-pill-vpn {
  background: rgba(56, 220, 130, 0.15);
  color: #4ade80;
}

/* Status badges */
.senpay-dash-status {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}
.senpay-dash-status-completed {
  background: rgba(22, 163, 74, 0.16);
  color: #4ade80;
}
.senpay-dash-status-processing {
  background: rgba(37, 99, 235, 0.16);
  color: #60a5fa;
}
.senpay-dash-status-refunded {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}

/* Links */
.senpay-dash-link {
  font-size: 13px;
  color: #facc15;
  text-decoration: none;
}
.senpay-dash-link:hover {
  text-decoration: underline;
}

/* Support card */
.senpay-dash-support-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.senpay-dash-support-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  color: #f9fafb;
}

.senpay-dash-support-card p {
  margin: 0 0 8px;
  font-size: 13px;
  color: #9ca3af;
}

.senpay-dash-support-meta {
  font-size: 12px;
}

.senpay-dash-support-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Responsive dashboard */
@media (max-width: 900px) {
  .senpay-dash-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .senpay-dash-hero-main {
    max-width: 100%;
  }
  .senpay-dash-hero-meta {
    align-items: flex-start;
  }
  .senpay-dash-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .senpay-dash-shell {
    padding: 26px 0 34px;
  }
  .senpay-dash-hero {
    padding: 18px 16px;
    border-radius: 20px;
  }
  .senpay-dash-hero-title {
    font-size: 22px;
  }
  .senpay-dash-grid-4,
  .senpay-dash-grid-3 {
    grid-template-columns: 1fr;
  }
  .senpay-dash-support-card {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ===== Responsive tables (mobile) ===== */
.senpay-dash-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.senpay-dash-table {
    min-width: 640px; /* يخلي الجدول واضح و ما يتكسرش في الشاشات الصغيرة */
}

/* ===== Remove old My Account sidebar & stretch content ===== */
body.woocommerce-account .woocommerce {
    background: transparent;
    border: none;
    padding: 0;
}

/* إخفاء المينيو/الداشبورد القديمة على اليسار */
body.woocommerce-account .woocommerce-MyAccount-navigation {
    display: none !important;
}

/* خلي المحتوى ديالنا ياخد العرض كامل */
body.woocommerce-account .woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
    max-width: 1200px;
    margin: 0 auto !important;
}

/* حيد أي padding أو background أبيض من بعض الثيمات */
body.woocommerce-account .entry-content,
body.woocommerce-account .site-content {
    background: transparent !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}


@media (max-width: 768px) {
    .senpay-dash-table th,
    .senpay-dash-table td {
        white-space: nowrap;
        font-size: 13px;
    }
}

/* ============ Mobile tables fix (Active services + Recent orders) ============ */
@media (max-width: 768px){

  /* خليه يقدر يسكرول أفقياً */
  .senpay-dash-table-wrapper{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
  }

  /* باش الجدول ما يتكسرش */
  .senpay-dash-table{
    min-width: 760px; /* جرب 720-900 حسب الأعمدة */
    width: 100%;
  }

  /* تصغير المسافات والخط */
  .senpay-dash-table th,
  .senpay-dash-table td{
    padding: 10px 10px !important;
    font-size: 13px !important;
    white-space: nowrap;
  }

  /* البادجات (M3U/MAG) تصغر شوية */
  .senpay-sub-pill{
    transform: scale(.92);
    transform-origin: left center;
  }

  /* أزرار الأكشن ماشي ضروري ولكن كتعاون */
  .senpay-dash-actions{
    gap: 8px;
    flex-wrap: wrap;
  }
}


/* ================================
   FIX: Links not clickable (overlay)
   ================================ */

/* خلّي محتوى Senpay فوق أي طبقة من الثيم */
.senpay-dash-shell,
.senpay-dash-page{
  position: relative;
}

/* إذا الثيم كيدير ::before / ::after فوق الصفحة */
body.woocommerce-account::before,
body.woocommerce-account::after,
.woocommerce::before,
.woocommerce::after,
.site-content::before,
.site-content::after,
.entry-content::before,
.entry-content::after{
  pointer-events: none !important;
}

/* احتياط: خلّي الأزرار/الروابط ديال Senpay دايماً clickable */
.senpay-dash-card a,
.senpay-dash-card button{
  position: relative;
  z-index: 10000;
  pointer-events: auto !important;
}


