/*
  Casting DZ Phase151 - Final Launch Audit & Stability Pack
  طبقة نهائية فوق القديم: ألوان موحدة، قراءة أفضل، هاتف داكن واضح، Dashboard احترافي، صور وإعلانات مستقرة.
*/
:root{
  --cdz-bg:#050505;
  --cdz-bg-2:#0b0b0b;
  --cdz-surface:#101010;
  --cdz-card:#151515;
  --cdz-card-2:#1b1b1b;
  --cdz-gold:#D4AF37;
  --cdz-gold-2:#F4D77A;
  --cdz-text:#F5F5F5;
  --cdz-muted:#B8B8B8;
  --cdz-line:rgba(212,175,55,.18);
  --cdz-soft-line:rgba(255,255,255,.08);
  --cdz-danger:#EF4444;
  --cdz-success:#22C55E;
  --cdz-radius:22px;
  --cdz-shadow:0 22px 70px rgba(0,0,0,.42);
  --cdz-font:'Cairo',Tahoma,Arial,sans-serif;
}
html{background:var(--cdz-bg);}
body{
  font-family:var(--cdz-font)!important;
  background:
    radial-gradient(circle at top right,rgba(212,175,55,.09),transparent 28%),
    radial-gradient(circle at 15% 10%,rgba(244,215,122,.045),transparent 22%),
    linear-gradient(180deg,#050505 0%,#0a0a0a 42%,#050505 100%)!important;
  color:var(--cdz-text)!important;
  letter-spacing:0!important;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit}
img{object-fit:cover}

/* Global readability */
p,.cdz-muted,.muted,small,.section-desc,.profile-subtitle,.card-text,td,th,label,input,select,textarea,button{
  font-family:var(--cdz-font)!important;
}
p,.cdz-muted,.muted,small{color:var(--cdz-muted)}
h1,h2,h3,h4,h5,h6{color:var(--cdz-text);font-weight:900;letter-spacing:-.02em;}

/* Header final polish */
.cdz-main-header{
  background:rgba(5,5,5,.92)!important;
  border-bottom:1px solid var(--cdz-line)!important;
  backdrop-filter:blur(18px)!important;
  box-shadow:0 16px 42px rgba(0,0,0,.28)!important;
}
.cdz-header-inner{max-width:1240px;margin:auto;padding-inline:16px;min-height:74px!important;}
.cdz-brand{gap:10px!important;font-weight:1000!important;color:#fff!important;}
.cdz-brand-mark,.cdz-sheet-logo,.cdz-admin-brand span{
  background:linear-gradient(135deg,var(--cdz-gold-2),var(--cdz-gold))!important;
  color:#111!important;
  box-shadow:0 0 26px rgba(212,175,55,.22)!important;
  border:1px solid rgba(255,255,255,.18)!important;
}
.cdz-desktop-nav a{color:#ddd!important;border-radius:999px!important;padding:9px 12px!important;font-weight:800!important;}
.cdz-desktop-nav a.active,.cdz-desktop-nav a:hover{background:rgba(212,175,55,.12)!important;color:var(--cdz-gold-2)!important;}
.cdz-icon-link,.cdz-menu-toggle{
  background:rgba(255,255,255,.045)!important;
  border:1px solid rgba(212,175,55,.16)!important;
  color:#f3f3f3!important;
  border-radius:16px!important;
}
.cdz-icon-link:hover,.cdz-menu-toggle:hover{background:rgba(212,175,55,.12)!important;color:var(--cdz-gold-2)!important;}
.cdz-notif-badge,.cdz-inline-badge{
  background:linear-gradient(135deg,#ef4444,#f97316)!important;color:#fff!important;border:2px solid #090909!important;
  min-width:20px!important;height:20px!important;line-height:16px!important;border-radius:999px!important;font-size:10px!important;font-weight:1000!important;
}
.cdz-profile-chip{background:rgba(255,255,255,.05)!important;border:1px solid var(--cdz-line)!important;border-radius:999px!important;color:#fff!important;}
.cdz-profile-chip img,.cdz-sheet-user img,.cdz140-dash-avatar img,.profile-card img,.user-avatar img{background:#111!important;border:1px solid var(--cdz-line)!important;}

/* Cards and panels */
.cdz-card,.card,.panel,.box,.cdz140-panel,.cdz140-action-card,.cdz140-stat,.cdz-admin-card,.cdz147-control-card,
.profile-card,.talent-card,.casting-card,.article-card,.notification-card,.invoice-card,.ad-card{
  background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.018)),linear-gradient(135deg,var(--cdz-card),var(--cdz-surface))!important;
  border:1px solid var(--cdz-line)!important;
  border-radius:var(--cdz-radius)!important;
  box-shadow:var(--cdz-shadow)!important;
  color:var(--cdz-text)!important;
}
.cdz-card:hover,.card:hover,.cdz140-action-card:hover,.profile-card:hover,.talent-card:hover,.casting-card:hover{
  transform:translateY(-2px);
  border-color:rgba(212,175,55,.32)!important;
  box-shadow:0 28px 80px rgba(0,0,0,.48)!important;
}

/* Buttons */
.cdz-btn,.btn,.cdz140-btn,.button,button[type=submit],input[type=submit]{
  font-family:var(--cdz-font)!important;
  border-radius:999px!important;
  font-weight:900!important;
  min-height:42px;
}
.cdz-btn-gold,.btn-gold,.gold,.cdz140-btn.gold,.cdz148-nav-plus,.dzm-nav-item.cdz148-nav-plus{
  background:linear-gradient(135deg,var(--cdz-gold-2),var(--cdz-gold))!important;
  color:#111!important;
  border:0!important;
  box-shadow:0 12px 28px rgba(212,175,55,.18)!important;
}
.cdz-btn:not(.cdz-btn-gold),.btn:not(.btn-gold),.cdz140-btn.ghost,.cdz140-btn.blue{
  background:rgba(255,255,255,.055)!important;
  color:#fff!important;
  border:1px solid rgba(212,175,55,.16)!important;
}

/* Forms */
input,select,textarea{
  background:#0d0d0d!important;
  color:#f5f5f5!important;
  border:1px solid rgba(212,175,55,.18)!important;
  border-radius:16px!important;
  outline:0!important;
}
input:focus,select:focus,textarea:focus{border-color:rgba(244,215,122,.55)!important;box-shadow:0 0 0 4px rgba(212,175,55,.10)!important;}
::placeholder{color:#8f8f8f!important;}

/* Tables */
table{border-collapse:separate!important;border-spacing:0 9px!important;width:100%;}
th{color:var(--cdz-gold-2)!important;background:rgba(212,175,55,.08)!important;border:0!important;font-weight:900!important;}
td{background:rgba(255,255,255,.035)!important;border-top:1px solid rgba(255,255,255,.06)!important;border-bottom:1px solid rgba(255,255,255,.06)!important;color:#eee!important;}
th,td{padding:12px 14px!important;}
tr td:first-child,tr th:first-child{border-radius:0 14px 14px 0!important;}
tr td:last-child,tr th:last-child{border-radius:14px 0 0 14px!important;}

/* Professional profile cards */
.profile-card,.cdz-profile-card,.talent-card{overflow:hidden!important;position:relative!important;}
.profile-card:before,.cdz-profile-card:before,.talent-card:before{
  content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at top left,rgba(212,175,55,.12),transparent 30%);
}
.profile-badge,.verified-badge,.pro-badge,.badge-pro,.cdz140-badge.gold{
  background:linear-gradient(135deg,var(--cdz-gold-2),var(--cdz-gold))!important;color:#111!important;border-radius:999px!important;font-weight:1000!important;
}

/* Ads: safe, small label, no layout damage */
.cdz141-slot,.cdz143-slot,.cdz151-ad-slot{
  width:100%!important;max-width:100%!important;overflow:hidden!important;margin:14px 0!important;position:relative!important;
}
.cdz141-ad-item,.cdz143-ad-item{display:none!important;}
.cdz141-ad-item.is-active,.cdz143-ad-item.is-active,.cdz141-ad-item:first-child,.cdz143-ad-item:first-child{display:block!important;}
.cdz141-ad-shell,.cdz143-ad-shell,.cdz151-ad-shell{
  position:relative!important;overflow:hidden!important;isolation:isolate!important;
  background:linear-gradient(135deg,#171717,#0e0e0e)!important;
  border:1px solid rgba(212,175,55,.16)!important;border-radius:22px!important;box-shadow:0 16px 48px rgba(0,0,0,.32)!important;
  min-height:auto!important;max-width:100%!important;
}
.cdz141-ad-label,.cdz143-ad-label,.cdz151-ad-label{
  position:absolute!important;top:10px!important;right:10px!important;z-index:3!important;
  background:rgba(0,0,0,.56)!important;border:1px solid rgba(212,175,55,.22)!important;color:var(--cdz-gold-2)!important;
  border-radius:999px!important;padding:3px 8px!important;font-size:10px!important;font-weight:900!important;line-height:1!important;
}
.cdz141-ad-close,.cdz143-ad-close,.cdz151-ad-close{
  position:absolute!important;top:8px!important;left:8px!important;z-index:4!important;width:28px!important;height:28px!important;
  display:grid!important;place-items:center!important;border-radius:50%!important;background:rgba(0,0,0,.58)!important;color:#fff!important;border:1px solid rgba(255,255,255,.12)!important;
}
.cdz141-ad-media img,.cdz143-ad-media img{width:100%!important;height:100%!important;object-fit:cover!important;}
.cdz143-ad-cta{background:rgba(212,175,55,.12)!important;color:var(--cdz-gold-2)!important;border:1px solid rgba(212,175,55,.24)!important;border-radius:999px!important;padding:8px 13px!important;font-weight:900!important;}

/* Admin dashboard final */
.cdz-admin-shell{background:var(--cdz-bg)!important;min-height:100vh!important;font-family:var(--cdz-font)!important;}
.cdz-admin-sidebar{
  background:linear-gradient(180deg,#0a0a0a,#050505)!important;border-left:1px solid var(--cdz-line)!important;box-shadow:18px 0 60px rgba(0,0,0,.35)!important;
}
.cdz-admin-brand{color:#fff!important;font-weight:1000!important;border-bottom:1px solid var(--cdz-line)!important;}
.cdz-admin-nav a{border:1px solid transparent!important;color:#d8d8d8!important;border-radius:16px!important;margin:5px 10px!important;font-weight:800!important;}
.cdz-admin-nav a:hover,.cdz-admin-nav a.active{background:rgba(212,175,55,.12)!important;border-color:rgba(212,175,55,.22)!important;color:var(--cdz-gold-2)!important;}
.cdz-admin-nav svg{width:20px!important;height:20px!important;color:currentColor!important;}
.cdz-admin-main{background:transparent!important;color:#fff!important;}
.cdz-admin-hero{
  background:radial-gradient(circle at top left,rgba(212,175,55,.18),transparent 30%),linear-gradient(135deg,#151515,#090909)!important;
  border:1px solid var(--cdz-line)!important;border-radius:30px!important;box-shadow:var(--cdz-shadow)!important;
}

/* Final launch check */
.cdz151-check-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0;}
.cdz151-check-card{padding:18px;border-radius:22px;background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.015));border:1px solid var(--cdz-line);box-shadow:var(--cdz-shadow);}
.cdz151-check-card b{display:block;font-size:26px;color:var(--cdz-gold-2)}
.cdz151-check-list{display:grid;gap:10px;margin-top:18px;}
.cdz151-check-row{display:grid;grid-template-columns:190px 1fr auto;gap:12px;align-items:center;padding:14px;border-radius:18px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07);}
.cdz151-ok{color:var(--cdz-success);font-weight:1000}.cdz151-warn{color:var(--cdz-gold-2);font-weight:1000}.cdz151-bad{color:var(--cdz-danger);font-weight:1000}
.cdz151-pill{border-radius:999px;padding:5px 10px;background:rgba(212,175,55,.10);border:1px solid rgba(212,175,55,.18);font-size:12px;font-weight:900;color:var(--cdz-gold-2)}

/* Mobile final Facebook-like dark shell */
@media (max-width: 768px){
  html,body{background:#050505!important;color:#f5f5f5!important;max-width:100%;overflow-x:hidden;}
  body{padding-bottom:calc(82px + env(safe-area-inset-bottom))!important;}
  .cdz-main-header{position:sticky!important;top:0!important;z-index:980!important;background:rgba(5,5,5,.96)!important;}
  .cdz-header-inner{min-height:62px!important;padding:8px 12px!important;gap:8px!important;}
  .cdz-brand span:not(.cdz-brand-mark){font-size:15px!important;white-space:nowrap;}
  .cdz-brand-mark{width:42px!important;height:42px!important;border-radius:15px!important;font-size:14px!important;}
  .cdz-desktop-nav,.desktop-only,.cdz-profile-chip,.cdz-user-actions>a.cdz-icon-link[href='/index.php']{display:none!important;}
  .cdz-user-actions{gap:7px!important;}
  .cdz-icon-link,.cdz-menu-toggle{width:40px!important;height:40px!important;min-width:40px!important;border-radius:15px!important;}
  .cdz-icon-link svg,.cdz-menu-toggle svg{width:21px!important;height:21px!important;}
  .cdz-mobile-dropdown,.cdz-mobile-sheet{background:#0b0b0b!important;color:#f5f5f5!important;border-color:var(--cdz-line)!important;}
  .cdz-sheet-list a,.cdz-mobile-dropdown a{background:rgba(255,255,255,.045)!important;border:1px solid rgba(212,175,55,.12)!important;border-radius:16px!important;margin:7px 0!important;color:#eee!important;font-weight:850!important;}
  .dzm-bottom-nav,.cdz148-bottom-nav{
    position:fixed!important;bottom:0!important;left:0!important;right:0!important;z-index:999!important;
    display:grid!important;grid-template-columns:repeat(6,1fr)!important;gap:3px!important;
    padding:8px 6px calc(8px + env(safe-area-inset-bottom))!important;
    background:rgba(8,8,8,.98)!important;border-top:1px solid var(--cdz-line)!important;box-shadow:0 -18px 45px rgba(0,0,0,.45)!important;
    width:100%!important;max-width:100%!important;overflow:visible!important;
  }
  .dzm-nav-item{
    min-width:0!important;height:56px!important;border-radius:17px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;
    color:#cfcfcf!important;background:transparent!important;border:1px solid transparent!important;font-size:10.5px!important;font-weight:900!important;text-align:center!important;
  }
  .dzm-nav-item svg{width:21px!important;height:21px!important;stroke-width:2.2!important;}
  .dzm-nav-item span{font-size:10px!important;line-height:1.1!important;white-space:nowrap!important;}
  .dzm-nav-item:hover,.dzm-nav-item.active{background:rgba(212,175,55,.10)!important;color:var(--cdz-gold-2)!important;border-color:rgba(212,175,55,.18)!important;}
  .dzm-nav-item.cdz148-nav-plus{transform:translateY(-6px)!important;box-shadow:0 12px 26px rgba(212,175,55,.22)!important;border-radius:20px!important;color:#111!important;}
  .dzm-nav-item.cdz148-nav-plus svg{color:#111!important;}
  .cdz-notif-badge{top:2px!important;left:50%!important;right:auto!important;transform:translateX(-2px)!important;}

  .container,.cdz-container,.cdz140-dash-wrap,main,.main-content{width:100%!important;max-width:100%!important;padding-inline:12px!important;}
  .hero,.cdz-hero,.cdz140-dash-hero{border-radius:22px!important;margin:10px 0 14px!important;padding:18px!important;}
  h1{font-size:clamp(24px,8vw,34px)!important;line-height:1.25!important;}
  h2{font-size:clamp(20px,6vw,28px)!important;line-height:1.28!important;}
  p{font-size:14px!important;line-height:1.8!important;}
  .section,.cdz-section{padding:18px 0!important;}
  .section-head{display:block!important;margin-bottom:14px!important;}
  .featured-wrap,.casting-grid,.family-grid,.cdz140-actions-grid,.cdz140-stats,.cdz-admin-grid{grid-template-columns:1fr!important;gap:12px!important;}
  .profile-card,.talent-card,.casting-card,.cdz140-action-card,.cdz140-stat,.notification-card{border-radius:22px!important;box-shadow:0 14px 40px rgba(0,0,0,.34)!important;}
  .profile-cover,.cover,.card-cover{height:205px!important;}
  .cdz141-slot,.cdz143-slot{margin:12px 0!important;}
  .cdz141-ad-shell,.cdz143-ad-shell{border-radius:20px!important;display:grid!important;grid-template-columns:104px 1fr!important;gap:10px!important;align-items:center!important;padding:12px!important;min-height:112px!important;}
  .cdz141-ad-media,.cdz143-ad-media{width:104px!important;height:88px!important;border-radius:16px!important;overflow:hidden!important;}
  .cdz141-ad-info,.cdz143-ad-info{padding:20px 4px 4px!important;min-width:0!important;}
  .cdz141-ad-info h3,.cdz143-ad-info h3{font-size:14px!important;margin:0 0 5px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
  .cdz141-ad-info p,.cdz143-ad-info p{font-size:12px!important;line-height:1.5!important;margin:0!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  .cdz143-ad-cta{display:none!important;}
  table{display:block;overflow:auto;border-spacing:0 8px!important;}
  .cdz151-check-grid{grid-template-columns:1fr 1fr!important}.cdz151-check-row{grid-template-columns:1fr!important;}
}
@media (max-width: 420px){
  .dzm-nav-item span{font-size:9px!important}.dzm-nav-item svg{width:19px!important;height:19px!important}.dzm-nav-item{height:53px!important;border-radius:15px!important;}
  .cdz-brand span:not(.cdz-brand-mark){font-size:13px!important;}
  .cdz-icon-link,.cdz-menu-toggle{width:38px!important;height:38px!important;min-width:38px!important;}
}
