*{box-sizing:border-box}html,body{height:100%}
body.white-bg{margin:0;background:#fff;color:#111;font-family:system-ui,-apple-system,'Segoe UI',Roboto,Arial}
a{color:inherit}.center-wrap{min-height:calc(100vh - 160px);display:grid;place-items:center;padding:24px}
.card{width:min(720px,92vw);background:#fff;border:1px solid #e6e8ee;border-radius:16px;box-shadow:0 8px 30px rgba(0,0,0,.06);padding:28px}
.logo{display:block;margin:0 auto 16px auto;height:72px;width:auto;object-fit:contain}
h1{font-size:22px;margin:0 0 18px 0;text-align:center;letter-spacing:.2px}
form .row{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:12px}
label{display:block;font-size:14px;margin-bottom:6px;color:#333}
input[type=text],input[type=date],input[type=number]{width:100%;padding:12px 14px;font-size:16px;border:1px solid #d2d6e0;border-radius:12px;outline:none}
input[type=text]:focus,input[type=number]:focus{border-color:#2f6fed;box-shadow:0 0 0 3px rgba(47,111,237,.15)}
.btn{appearance:none;border:0;border-radius:12px;padding:12px 18px;font-size:16px;cursor:pointer;background:#2f6fed;color:#fff}
.btn.secondary{background:#eef1f8;color:#2b2f38}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.mt-3{margin-top:20px}.alert{padding:14px;border-radius:12px;background:#fff5f5;border:1px solid #ffd0d0;color:#a21d1d}
.site-footer{padding:22px;border-top:1px solid #eceff5;background:#fafbff;color:#333}
.site-footer .footer-inner{max-width:960px;margin:0 auto;text-align:center;line-height:1.5}
.result-grid{display:grid;grid-template-columns:160px 1fr;gap:16px;align-items:flex-start}
.result-photo{width:160px;height:200px;border-radius:12px;border:1px solid #e6e6e6;object-fit:cover;background:#f7f7f7}
.result-table{width:100%;border-collapse:collapse}
.result-table th,.result-table td{padding:10px;border-bottom:1px solid #eee;text-align:left;font-size:15px}
@media (max-width:640px){.grid-2{grid-template-columns:1fr}.result-grid{grid-template-columns:1fr}.result-photo{width:100%;height:auto}}
/* === Mobile buttons layout fix === */
.actions{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.btn{
  display: flex;                 /* توسيط النص داخل الزر */
  justify-content: center;
  align-items: center;
  min-height: 48px;              /* مساحة لمس مريحة */
  line-height: 1.25;
  white-space: normal;           /* يسمح بلف النص الطويل */
  word-break: break-word;
  flex: 1 1 auto;
  text-align: center;
}

/* شاشتين متوسطتين = عمودين */
@media (max-width: 900px){
  .actions{ grid-template-columns: repeat(2, 1fr); }
}

/* الموبايل = زر واحد بكل صف */
@media (max-width: 640px){
  .actions{ grid-template-columns: 1fr; }
  .btn{ width: 100%; }
}


/* === خط فاصل بين الأزرار (موبايل) === */
@media (max-width: 640px){
  .actions{
    grid-template-columns: 1fr;   /* زر بعرض كامل */
  }
  .actions .btn{
    width: 100%;
  }
  .actions .btn:not(:first-child){
    position: relative;
  }
  .actions .btn:not(:first-child)::before{
    content: "";
    display: block;
    height: 1px;                  /* سمك الخط */
    background: #e6e8ee;          /* لون الخط */
    margin: 6px 0 10px;           /* مسافة حول الخط */
    border-radius: 1px;
  }
}














