:root{
  --primary:#078b82;
  --primary-2:#11bda7;
  --primary-dark:#075f59;
  --ink:#1f2937;
  --muted:#6b7280;
  --bg:#f3fbfa;
  --card:#ffffff;
  --line:#e5ecef;
  --danger:#c73545;
  --warning:#f59e0b;
  --success:#059669;
  --shadow:0 18px 45px rgba(3,84,78,.16);
  --soft-shadow:0 10px 25px rgba(8,139,130,.12);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Tahoma,Arial,"Noto Kufi Arabic","Noto Sans Arabic",sans-serif;
  background:radial-gradient(circle at top right,rgba(17,189,167,.12),transparent 32%),var(--bg);
  color:var(--ink);
  direction:rtl;
  min-height:100vh;
}
a{color:inherit}
.topbar{
  min-height:74px;
  background:#fff;
  color:var(--ink);
  padding:12px 26px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  position:sticky;
  top:0;
  z-index:20;
  box-shadow:0 8px 28px rgba(0,0,0,.06);
}
.brand{display:flex;align-items:center;gap:12px;font-weight:800;color:var(--primary-dark)}
.brand-logo,.login-logo{
  width:52px;height:52px;border-radius:18px;
  background:linear-gradient(135deg,#fff,#e8fffb);
  border:3px solid rgba(8,139,130,.16);
  display:grid;place-items:center;
  color:var(--primary);
  font-size:28px;
  box-shadow:0 8px 20px rgba(8,139,130,.12);
}
.brand small{display:block;color:var(--muted);font-weight:500;margin-top:3px}
.topbar .nav-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.topbar a{text-decoration:none;border-radius:999px;padding:9px 14px;color:var(--primary-dark);font-weight:700}
.topbar a:hover{background:#e9fbf8}
.lang-switch{background:#f4f7f8;border-radius:999px;padding:5px;display:flex;gap:4px;box-shadow:inset 0 0 0 1px #edf2f3}
.lang-switch span{padding:7px 15px;border-radius:999px;font-weight:800;color:#637083}
.lang-switch .active{background:linear-gradient(135deg,var(--primary),var(--primary-2));color:white;box-shadow:0 8px 18px rgba(8,139,130,.25)}
.layout{display:flex;min-height:calc(100vh - 74px)}
.sidebar{
  width:300px;
  flex:0 0 300px;
  background:linear-gradient(180deg,#0aa390 0%,#06726b 100%);
  padding:24px 18px;
  color:white;
  box-shadow:-10px 0 28px rgba(0,0,0,.08);
  position:sticky;
  top:74px;
  height:calc(100vh - 74px);
  overflow:auto;
}
.sidebar:before{content:"الإدارة";display:block;margin:8px 14px 18px;color:rgba(255,255,255,.58);font-weight:800;font-size:18px}
.sidebar a{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  margin-bottom:9px;
  color:white;
  text-decoration:none;
  border-radius:18px;
  font-weight:800;
  font-size:18px;
  transition:.2s ease;
}
.sidebar a:before{content:"▣";opacity:.88;font-size:18px}
.sidebar a:hover,.sidebar a.active{background:rgba(255,255,255,.16);transform:translateX(-4px)}
.content{flex:1;padding:28px;max-width:100%;overflow:hidden}
h1,h2,h3{color:#172033;margin-top:0} h2{font-size:30px;margin-bottom:18px}.muted{color:var(--muted)}
.card{
  background:var(--card);
  border-radius:28px;
  padding:24px;
  box-shadow:var(--soft-shadow);
  border:1px solid rgba(8,139,130,.08);
  margin-bottom:20px;
}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}
.stat{
  background:#fff;
  border-radius:26px;
  padding:22px;
  border:1px solid rgba(8,139,130,.1);
  box-shadow:0 12px 30px rgba(0,0,0,.05);
  position:relative;
  overflow:hidden;
}
.stat:after{content:"";position:absolute;inset:auto -40px -60px auto;width:130px;height:130px;border-radius:50%;background:rgba(17,189,167,.12)}
.stat b{font-size:34px;color:var(--primary);display:block;margin-bottom:8px}.stat p{margin:0;color:#475569;font-weight:700}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border:0;border-radius:18px;padding:12px 18px;
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  color:white;text-decoration:none;cursor:pointer;font-weight:900;
  box-shadow:0 12px 24px rgba(8,139,130,.22);
}
.btn:hover{filter:brightness(.98);transform:translateY(-1px)}
.btn.secondary{background:#64748b}.btn.danger{background:var(--danger)}.btn.warn{background:var(--warning)}.btn.success{background:var(--success)}.btn.light{background:#ecfffb;color:var(--primary-dark);box-shadow:none;border:1px solid #c7f5ed}
input,select,textarea{
  width:100%;padding:13px 14px;border:1px solid #dfe8ea;border-radius:18px;margin-top:8px;background:white;
  color:#1f2937;font-size:15px;outline:none;transition:.2s ease;
}
input:focus,select:focus,textarea:focus{border-color:var(--primary-2);box-shadow:0 0 0 4px rgba(17,189,167,.12)}
label{display:block;margin:12px 0;font-weight:800;color:#374151}
table{width:100%;border-collapse:separate;border-spacing:0;background:white;border-radius:24px;overflow:hidden;box-shadow:0 8px 22px rgba(0,0,0,.04)}
th,td{padding:14px;border-bottom:1px solid #eef3f4;text-align:right;vertical-align:top}th{background:#e7fbf7;color:var(--primary-dark);font-weight:900}tr:last-child td{border-bottom:0}
.alert{padding:14px 16px;border-radius:18px;margin:10px 0;font-weight:800}.alert.success{background:#ecfdf3;color:#067647}.alert.error{background:#fff1f2;color:#be123c}.alert.warn{background:#fffbeb;color:#b45309}
.badge{padding:6px 11px;border-radius:999px;background:#e7fbf7;color:var(--primary-dark);font-size:12px;display:inline-block;font-weight:900}.badge.warn{background:#fffbeb;color:#b45309}.badge.success{background:#ecfdf3;color:#067647}.badge.danger{background:#fff1f2;color:#be123c}
.form-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px}.actions{display:flex;gap:10px;flex-wrap:wrap}.small{font-size:13px}.ltr{direction:ltr;text-align:left}
.hero{
  min-height:330px;padding:70px 28px;text-align:center;color:white;
  background:linear-gradient(145deg,#0b6f68,#0f9f90 55%,#18c7b0);
  border-bottom-left-radius:70px;border-bottom-right-radius:70px;
  box-shadow:var(--shadow);position:relative;overflow:hidden;
}
.hero:before{content:"";position:absolute;right:-80px;top:-80px;width:230px;height:230px;border-radius:50%;background:rgba(255,255,255,.14)}
.hero h1{font-size:42px;color:white;margin-bottom:12px}.hero p{font-size:18px;max-width:850px;margin:12px auto;line-height:1.9}.public-card{max-width:1080px;margin:28px auto}
.auth-page{
  min-height:calc(100vh - 74px);
  display:grid;place-items:center;
  padding:36px 18px;
  background:linear-gradient(150deg,#0b6f68 0%,#0f9f90 55%,#15c0aa 100%);
}
.auth-card{
  width:min(92vw,720px);
  background:#fff;
  border-radius:36px;
  padding:54px clamp(22px,5vw,80px);
  box-shadow:0 25px 65px rgba(0,0,0,.18);
  text-align:right;
}
.auth-card .login-logo{margin:0 auto 18px;width:92px;height:92px;font-size:46px;border-radius:30px}
.auth-card h2{text-align:center;color:var(--primary);font-size:42px;margin-bottom:28px;font-weight:900}
.auth-card .btn{width:100%;font-size:21px;padding:16px;border-radius:20px;margin-top:14px}
.auth-card input{font-size:20px;text-align:center;padding:17px;border-radius:20px}.auth-card label{font-size:19px;text-align:right;color:#475569}
@media(max-width:900px){
  .topbar{position:relative;align-items:flex-start;gap:10px;flex-direction:column}.layout{display:block}.sidebar{position:relative;top:0;width:100%;height:auto;display:block;border-radius:0 0 28px 28px}.content{padding:18px}.hero{border-bottom-left-radius:36px;border-bottom-right-radius:36px}.hero h1{font-size:30px}.auth-card h2{font-size:32px}.sidebar a{font-size:16px}
}
