/* =========================================================
   بوابة الأولياء — روضة وصال
   لوحة الألوان: سماء زرقاء + شمس صفراء + مرجاني دافئ
   ========================================================= */

:root{
  --sky:        #2E9CDA;
  --sky-dark:   #1D6FA5;
  --sun:        #FFC93C;
  --sun-dark:   #E8A800;
  --coral:      #FF6F4A;
  --coral-dark: #E4512C;
  --leaf:       #4CAF7D;
  --cream:      #FFF8EA;
  --ink:        #1B3A4B;
  --ink-soft:   #5C7688;
  --white:      #FFFFFF;
  --radius-lg:  28px;
  --radius-md:  18px;
  --shadow:     0 10px 28px rgba(27,58,75,0.14);
}

*{ box-sizing: border-box; }

html, body{
  margin:0;
  padding:0;
  min-height:100%;
  background: var(--cream);
  font-family: 'Cairo', sans-serif;
  color: var(--ink);
}

body{
  background-image:
    radial-gradient(circle at 8% 12%, rgba(46,156,218,0.10) 0, transparent 45%),
    radial-gradient(circle at 92% 85%, rgba(255,201,60,0.16) 0, transparent 50%);
}

h1,h2,.brand-title,.status-text{
  font-family: 'Baloo 2', 'Cairo', sans-serif;
}

.screen{
  min-height: 100dvh;
  display:flex;
  flex-direction:column;
}

/* ---------------- شاشة الدخول ---------------- */

#login-screen{
  align-items:center;
  justify-content:center;
  padding: 24px;
}

.login-card{
  width:100%;
  max-width: 380px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 36px 28px 28px;
  text-align:center;
}

.brand-badge{
  font-size: 48px;
  line-height:1;
  margin-bottom: 6px;
}

.brand-title{
  font-size: 26px;
  font-weight: 800;
  color: var(--sky-dark);
  margin: 4px 0 2px;
}

.brand-sub{
  color: var(--ink-soft);
  margin: 0 0 26px;
  font-weight: 600;
}

.field-label{
  display:block;
  text-align: right;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.code-input{
  width:100%;
  padding: 16px 18px;
  font-size: 20px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  text-align:center;
  border: 2px solid #E4EEF3;
  border-radius: var(--radius-md);
  background: var(--cream);
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.code-input:focus{
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(46,156,218,0.18);
}

.error-text{
  color: var(--coral-dark);
  font-weight: 700;
  font-size: 14px;
  margin: 10px 0 0;
}

/* ---------------- أزرار عامة ---------------- */

.btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  border:none;
  border-radius: var(--radius-md);
  padding: 15px 18px;
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-decoration:none;
  cursor:pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn:active{ transform: scale(0.97); }

.btn-block{ width:100%; margin-top: 14px; }

.btn-primary{
  background: var(--sky);
  color: var(--white);
  box-shadow: 0 8px 18px rgba(46,156,218,0.35);
}
.btn-primary:hover{ filter: brightness(1.05); }

.btn-secondary{
  background: var(--white);
  color: var(--sky-dark);
  border: 2px solid var(--sky);
}

.btn-accent{
  background: var(--coral);
  color: var(--white);
  box-shadow: 0 8px 18px rgba(255,111,74,0.35);
}

.btn-icon{ font-size: 18px; }

/* ---------------- شريط علوي ---------------- */

.top-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 18px 20px;
}

.child-chip{
  display:flex;
  align-items:center;
  gap: 10px;
  background: var(--white);
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.child-avatar{
  font-size: 22px;
  background: var(--sun);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.child-name{ font-weight: 700; }

.icon-btn{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  box-shadow: var(--shadow);
  font-size: 18px;
  color: var(--ink-soft);
  cursor:pointer;
}

/* ---------------- محتوى ---------------- */

.content{
  flex:1;
  padding: 4px 20px 28px;
  display:flex;
  flex-direction:column;
  gap: 20px;
  max-width: 480px;
  margin: 0 auto;
  width:100%;
}

/* ---------------- بطاقة الحالة ---------------- */

.status-card{
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px 20px;
  text-align:center;
}

.status-icon-wrap{
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background: radial-gradient(circle, rgba(255,201,60,0.35), rgba(255,201,60,0.05));
}

.status-icon-wrap.bus{
  background: radial-gradient(circle, rgba(255,111,74,0.30), rgba(255,111,74,0.05));
  animation: bus-bounce 1.4s ease-in-out infinite;
}

.status-icon-wrap.school{
  background: radial-gradient(circle, rgba(76,175,125,0.28), rgba(76,175,125,0.05));
}

.status-icon-wrap.waiting{
  background: radial-gradient(circle, rgba(46,156,218,0.25), rgba(46,156,218,0.05));
}

@keyframes bus-bounce{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-6px); }
}

.status-icon{ font-size: 46px; }

.status-text{
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 4px;
}

.status-time{
  color: var(--ink-soft);
  font-size: 13px;
  margin:0;
}

/* ---------------- بطاقة الخريطة ---------------- */

.map-card{
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 14px;
  overflow:hidden;
}

.map-title{
  font-weight: 700;
  margin: 2px 6px 10px;
}

#live-map{
  width:100%;
  height: 260px;
  border-radius: var(--radius-md);
}

/* ---------------- أزرار التواصل ---------------- */

.contact-actions{
  margin-top: auto;
}

/* شاشات كبيرة قليلا */
@media (min-width: 520px){
  .content{ padding-top: 12px; }
}
