*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:Tahoma,Arial,sans-serif;background:#f5f7fb;color:#1f2937}
body{direction:rtl}
a{text-decoration:none}

/* =========================
   الهيدر: عرض الصورة كاملة بدون قص
   ========================= */
.top-header{background:#fff;border-bottom:1px solid #e5e7eb;box-shadow:0 3px 14px rgba(15,23,42,.08)}
.header-image{position:relative;width:100%;height:auto;min-height:0;aspect-ratio:1920/360;background:#0f766e center center/100% 100% no-repeat url('../images/header.gif');display:flex;align-items:center;justify-content:center;overflow:hidden}
.header-image.no-image{background:linear-gradient(135deg,#0f766e,#134e4a)}
.header-overlay{position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,0,0,.20),rgba(0,0,0,.03),rgba(0,0,0,.20));pointer-events:none}
.brand{position:relative;z-index:1;color:#fff;text-align:center;text-shadow:0 2px 8px rgba(0,0,0,.72);padding:8px 18px;max-width:720px}
.brand img{max-height:64px;max-width:190px;display:block;margin:0 auto 6px;object-fit:contain}
.brand h1{margin:0;font-size:25px;line-height:1.35}
.brand p{margin:5px 0 0;font-size:14px;line-height:1.5}
.nav{background:#134e4a;padding:8px;text-align:center}
.nav a{color:#fff;margin:0 5px;padding:8px 15px;border-radius:8px;display:inline-block;font-size:14px}
.nav a:hover{background:rgba(255,255,255,.13)}

.container{max-width:1050px;margin:24px auto;padding:0 16px}
.card{background:#fff;border-radius:18px;box-shadow:0 8px 25px rgba(15,23,42,.08);padding:24px;margin-bottom:20px}
.hero{text-align:center;padding:34px 20px}
.lookup-card{max-width:760px;margin:30px auto}
.lookup-form{max-width:520px;margin:20px auto}
.lead{color:#64748b;line-height:1.9}
.logo{max-width:150px;max-height:85px;display:block;margin:0 auto 12px}
h2,h3{color:#134e4a}
label{display:block;font-weight:bold;margin:12px 0 6px}
input,select,textarea{width:100%;padding:12px 13px;border:1px solid #d1d5db;border-radius:10px;font-size:15px;background:#fff}
input:focus{outline:none;border-color:#0f766e;box-shadow:0 0 0 3px rgba(15,118,110,.12)}
.btn{border:0;border-radius:10px;padding:11px 18px;cursor:pointer;font-weight:bold;display:inline-block}
.btn-primary{background:#0f766e;color:#fff}.btn-primary:hover{background:#115e59}
.btn-secondary{background:#e5e7eb;color:#111827}.btn-danger{background:#b91c1c;color:#fff}.btn-wide{width:100%;margin-top:16px}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.stat{padding:20px;border-radius:15px;background:#f0fdfa;border:1px solid #ccfbf1;text-align:center}
.stat strong{font-size:28px;color:#0f766e;display:block}
.info-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.info{background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:14px;min-height:68px}
.info b{display:block;color:#64748b;font-size:13px;margin-bottom:5px}
.notice{padding:14px 16px;border-radius:12px;background:#fff7ed;border-right:5px solid #f59e0b;margin:15px 0;line-height:1.8}
.info-notice{background:#f8fafc;border-right-color:#0f766e}.success{background:#ecfdf5;border-right-color:#10b981}.error{background:#fef2f2;border-right-color:#ef4444}
.links{display:grid;grid-template-columns:1fr;gap:14px}
.link-card{display:block;background:#f8fafc;border:1px solid #e5e7eb;padding:18px;border-radius:14px;color:#134e4a;transition:.2s}
.link-card:hover{background:#f0fdfa;transform:translateY(-1px)}
.single-link{max-width:650px;margin:auto}
.student-photo{width:150px;height:150px;object-fit:cover;border-radius:50%;border:5px solid #fff;box-shadow:0 5px 20px rgba(0,0,0,.15);display:block;margin:0 auto 15px}
.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;background:#fff}
th,td{padding:12px;border-bottom:1px solid #e5e7eb;text-align:right;white-space:nowrap}th{background:#134e4a;color:#fff}
.actions{display:flex;gap:7px;flex-wrap:wrap}.footer{text-align:center;padding:25px;color:#64748b;font-size:13px}
.password-box{background:#ecfdf5;border:1px dashed #10b981;padding:12px;border-radius:10px;font-family:monospace;direction:ltr;text-align:center;font-size:18px;font-weight:bold}
.center-actions{text-align:center;margin:20px}.lookup-result{max-width:760px;margin:30px auto}.admin-note{background:#fff7ed}

/* شاشات صغيرة: نُبقي الهيدر كاملًا وواضحًا */
@media(max-width:800px){
  .header-image{aspect-ratio:1920/360;background-size:100% 100%}
  .brand{padding:5px 10px;max-width:88%}
  .brand img{max-height:40px;max-width:100px;margin-bottom:3px}
  .brand h1{font-size:17px;line-height:1.25}
  .brand p{font-size:10px;line-height:1.3;margin-top:2px}
  .nav{padding:6px}
  .nav a{padding:6px 9px;font-size:12px;margin:0 2px}
  .grid,.info-grid{grid-template-columns:1fr}
  .container{margin:15px auto}
  .card{padding:18px}
}

@media(max-width:480px){
  .header-image{aspect-ratio:1920/420}
  .brand{max-width:94%}
  .brand h1{font-size:15px}
  .brand p{font-size:9px}
  .brand img{max-height:34px;max-width:85px}
}
