/*------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------*/

@font-face{
  font-family:'sitelyregular-en';
  src:url('../fonts/en/SitelyFont-Regular-en.ttf') format('truetype');
  font-weight:500;
  font-style:normal;
}

/* ===== arabic fonts ===== */
@font-face{ font-family:'SitelyFont-Light-ar';  src:url('../fonts/ar/SitelyFont-Light-ar.ttf')  format('truetype'); font-weight:500; font-style:normal; }
@font-face{ font-family:'SitelyFont-Bold-ar';   src:url('../fonts/ar/SitelyFont-Bold-ar.ttf')   format('truetype'); font-weight:500; font-style:normal; }
@font-face{ font-family:'SitelyFont-Book-ar';   src:url('../fonts/ar/SitelyFont-Book-ar.ttf')   format('truetype'); font-weight:500; font-style:normal; }
@font-face{ font-family:'SitelyFont-Medium-ar'; src:url('../fonts/ar/SitelyFont-Medium-ar.ttf') format('truetype'); font-weight:500; font-style:normal; }

/*------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------*/

:root{
  --bg:#f7f7fb;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --ink:#18063a;
  --accent:#ff6501;

  --border: rgba(17,24,39,.10);
  --ring: rgba(255,101,1,.25);
  --shadow: 0 18px 45px rgba(17,24,39,.10);

  --radius:18px;
  --radius2:22px;
}

/*------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------*/

*{ box-sizing:border-box; }
html,body{ height:100%; }
body.admin{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(900px 320px at 20% 0%, rgba(255,101,1,.12), transparent 60%),
    radial-gradient(900px 320px at 90% 40%, rgba(24,6,58,.12), transparent 60%),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}
html[lang="en"] body.admin{ font-family: 'sitelyregular-en', ui-sans-serif, system-ui; }
html[lang="ar"] body.admin{ font-family: 'SitelyFont-Book-ar', "Tajawal", ui-sans-serif, system-ui; }

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }

/*------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------*/

.admin-shell{
  display:grid;
  grid-template-columns: 280px 1fr;
  min-height:100vh;
}

/*------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------*/

.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  padding:18px 14px;
  color:#fff;
  background:
    radial-gradient(500px 260px at 40% 0%, rgba(255,255,255,.18), transparent 55%),
    linear-gradient(180deg, rgba(255,101,1,.96), rgba(255,101,1,.86));
  box-shadow: 18px 0 55px rgba(255,101,1,.18);
  border-right: 1px solid rgba(255,255,255,.16);
}

.sb-brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px 16px;
  margin-bottom:14px;
  border-bottom:1px solid rgba(255,255,255,.18);
}

.sb-brand .dot{
  width:40px;height:40px;
  border-radius:14px;
  background:rgb(255, 255, 255);
  border:1px solid rgba(255,255,255,.22);
  display:grid;
  place-items:center;
  overflow:hidden;           
}

.sb-brand .dot img{
  width:100%;
  height:100%;
  object-fit:contain;        
  padding:7px;              
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.12));
}

.sb-brand .title{
  font-weight:950;
  letter-spacing:.2px;
  line-height:1.1;
}

.sb-brand .title small{
  display:block;
  margin-top:2px;
  font-size:12px;
  opacity:.85;
  font-weight:700;
}

.sb-nav{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.sb-nav a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 12px;
  border-radius:16px;
  font-weight:900;
  background: rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.14);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.sb-nav a:hover{
  background: rgba(255,255,255,.18);
  transform: translateY(-1px);
}

.sb-nav a.active{
  background: rgba(24,6,58,.18);
  border-color: rgba(24,6,58,.20);
}

.main{
  padding:18px 18px 36px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius: var(--radius2);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 45px rgba(17,24,39,.08);
}


.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:900;
  cursor:pointer;
  font-family: 'sitelyRegular2-en';
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}


html[lang="ar"] .btn{ font-family: 'SitelyFont-Light-ar'; }

.btn:hover{ transform: translateY(-1px); box-shadow: 0 14px 30px rgba(17,24,39,.10); }
.btn:active{ transform: translateY(0); }

.btn-primary{
  background: var(--ink);
  color:#fff;
  border-color: rgba(24,6,58,.25);
  box-shadow: 0 16px 40px rgba(24,6,58,.20);
}
.btn-primary:hover{ box-shadow: 0 20px 55px rgba(24,6,58,.24); }

.btn-accent{
  background: var(--accent);
  color:#fff;
  border-color: rgba(255,101,1,.30);
  box-shadow: 0 16px 40px rgba(255,101,1,.22);
}

.kpis{
  display:grid;
  position: relative;
  text-align: center;
  
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
  margin-top:14px;
}

.kpi{
  border:1px solid var(--border);
  border-radius:18px;
  background:
    radial-gradient(600px 220px at 20% 0%, rgba(255,101,1,.10), transparent 55%),
    #fff;
  padding:14px;
  box-shadow: 0 12px 30px rgba(17,24,39,.07);
}

.kpi .label{
  color: rgba(17,24,39,.62);
  font-weight:900;
  font-size:12px;
  letter-spacing:.2px;
}

.kpi .value{
  font-size:22px;
  font-weight:950;
  color:var(--ink);
  margin-top:6px;
}


.table{
  margin-top:14px;
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
  background:#fff;
  box-shadow: 0 12px 30px rgba(17,24,39,.06);
}

.table table{
  width:100%;
  border-collapse:collapse;
}

.table th,
.table td{
  padding:12px 12px;
  border-bottom:1px solid rgba(17,24,39,.06);
  text-align:start;
  vertical-align:middle;
}

.table th{
  background: rgba(24,6,58,.04);
  color: var(--ink);
  font-weight:950;
  font-size:12px;
  letter-spacing:.4px;
  text-transform:uppercase;
}

html[lang="ar"] .table th{
  text-transform:none;
  letter-spacing:0;
}

.table tr:hover td{
  background: rgba(255,101,1,.05);
}

.table tr:last-child td{ border-bottom:0; }



.admin-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding: 14px 16px;
  
  background: rgba(255,255,255,.55);
}

.admin-head-title h2{
  margin:0;
  font-size:18px;
  line-height:1.2;
  font-weight:950;
  color: var(--ink);
  letter-spacing: -.2px;
}

.admin-head-title p{
  margin:6px 0 0;
  font-size:13px;
  color: rgba(17,24,39,.62);
  font-weight:800;
}

html[dir="rtl"] .admin-head{
  direction: rtl;
}

@media (max-width: 520px){
  .admin-head{
    flex-direction:column;
    align-items:stretch;
  }
  .admin-head .btn{
    width:100%;
  }
}


.form-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:12px;
}

.input, select.input{
  width:100%;
  padding:11px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  outline:none;
  font-weight:800;
  background:#fff;
  color:var(--ink);
  transition: box-shadow .15s ease, border-color .15s ease;
}

.input:focus, select.input:focus{
  box-shadow: 0 0 0 5px var(--ring);
  border-color: rgba(255,101,1,.35);
}

textarea.input{
  min-height:120px;
  resize:vertical;
}

.help{
  color: rgba(17,24,39,.62);
  font-size:12px;
  line-height:1.6;
}


.notice{
  margin-top:12px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(255,101,1,.22);
  background: rgba(255,101,1,.10);
  font-weight:900;
  color: var(--ink);
}

.notice.danger,
.danger{
  border-color: rgba(239,68,68,.28);
  background: rgba(239,68,68,.10);
}


@media (max-width: 1100px){
  .admin-shell{ grid-template-columns: 250px 1fr; }
}

@media (max-width: 980px){
  .admin-shell{ grid-template-columns: 1fr; }
  .sidebar{
    position:relative;
    height:auto;
    border-right:0;
    border-bottom:1px solid rgba(255,255,255,.18);
  }
  .kpis{ grid-template-columns: repeat(2, 1fr); }
  .form-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 520px){
  .main{ padding:14px 14px 28px; }
  .topbar{ flex-direction:column; align-items:stretch; }
  .kpis{ grid-template-columns: 1fr; }
}


.auth-shell{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:48px 18px;
}

.auth-card{
  width:min(980px, 100%);
  display:grid;
  grid-template-columns: 1fr 1.15fr;
  border-radius:28px;
  overflow:hidden;
  border:1px solid rgba(17,24,39,.10);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 28px 80px rgba(17,24,39,.14);
}


.auth-side{
  padding:26px;
  color:#fff;
  background:
    radial-gradient(900px 320px at 20% 10%, rgba(255,101,1,.35), transparent 55%),
    radial-gradient(900px 320px at 90% 70%, rgba(24,6,58,.30), transparent 55%),
    linear-gradient(180deg, rgba(24,6,58,.96), rgba(24,6,58,.82));
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:18px;
}

.auth-side-top{
  display:flex;
  align-items:center;
  gap:14px;
}

.auth-logo{
  width:58px; height:58px;
  border-radius:18px;
  background: rgba(255,255,255,.92);
  border:1px solid rgba(255,255,255,.28);
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
  display:grid;
  place-items:center;
  overflow:hidden;
}
.auth-logo img{
  width:100%;
  height:100%;
  object-fit:contain;
  padding:10px;
}

.auth-brand{
  font-weight:950;
  font-size:22px;
  letter-spacing:.2px;
  line-height:1.1;
}
.auth-tagline{
  margin-top:6px;
  opacity:.88;
  font-weight:800;
  font-size:13px;
  line-height:1.5;
}

.auth-side-badges{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.auth-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.16);
  font-weight:900;
  font-size:13px;
}


.auth-main{
  padding:26px;
  background:
    radial-gradient(700px 240px at 10% 0%, rgba(255,101,1,.10), transparent 60%),
    #ffffff;
}

.auth-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px;
}

.auth-back{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(17,24,39,.10);
  background: rgba(255,255,255,.70);
  font-weight:900;
}

.auth-title{
  margin:8px 0 6px;
  font-size:28px;
  color:var(--ink);
  font-weight:950;
  letter-spacing:-.3px;
}

.auth-sub{
  margin:0 0 14px;
  color: rgba(17,24,39,.66);
  line-height:1.8;
  font-weight:700;
}

.auth-form{
  display:grid;
  gap:10px;
  margin-top:12px;
}

.field{
  position:relative;
}

.field i{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  left:14px;
  color: rgba(24,6,58,.60);
}

html[dir="rtl"] .field i{
  left:auto;
  right:14px;
}

.field .input{
  padding-left:44px;
}
html[dir="rtl"] .field .input{
  padding-left:12px;
  padding-right:44px;
}

.auth-submit{
  width:100%;
  padding:12px 14px;
}

.auth-help{
  margin-top:10px;
  display:flex;
  align-items:flex-start;
  gap:10px;
  color: rgba(17,24,39,.68);
  font-weight:800;
  font-size:12px;
  line-height:1.6;
  padding:12px 14px;
  border-radius:16px;
  border:1px dashed rgba(24,6,58,.14);
  background: rgba(24,6,58,.03);
}

@media (max-width: 900px){
  .auth-card{ grid-template-columns: 1fr; }
  .auth-side{ border-bottom: 1px solid rgba(255,255,255,.14); }
}


/*------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------*/