/* ركن ولي الأمر — calmer, grown-up version of the brand */

.parents-page { background: #f4f7fc; min-height: 100vh; padding-bottom: 60px; }

/* gate */
.gate { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 20px; }
.gate-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 34px 26px;
  text-align: center; width: min(420px, 100%); box-shadow: var(--shadow-soft);
}
.gate-card .lock { font-size: 3.5rem; }
.gate-card h1 { margin: 4px 0; color: var(--blue-900); font-size: 1.8rem; }
.gate-card p { color: var(--ink-soft); margin: 0 0 14px; }
.gate-q { font-size: 2.6rem; font-weight: 800; color: var(--blue-800); margin-bottom: 14px; direction: ltr; }
.gate-form { display: flex; gap: 10px; }
.gate-form input {
  flex: 1; min-width: 0; font: inherit; font-size: 1.4rem; font-weight: 800; text-align: center;
  border: 3px solid var(--blue-100); border-radius: 999px; padding: 8px 16px; outline: none;
}
.gate-form input:focus { border-color: var(--blue-500); }
.gate-err { color: var(--red); font-weight: 700; min-height: 1.6em; margin-top: 10px !important; }

/* dashboard */
.dash { padding-top: 26px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.dash-head .kicker { color: var(--orange); font-weight: 800; }
.dash-head h1 { margin: 0; color: var(--blue-900); font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.3; }
.dash-head p { margin: 4px 0 0; color: var(--ink-soft); }
.child-chip {
  display: flex; align-items: center; gap: 12px; background: var(--white);
  border-radius: 999px; padding: 6px 8px 6px 18px; box-shadow: var(--shadow-soft);
}
.child-chip img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; object-position: top; }
.child-chip b { display: block; color: var(--blue-900); }
.child-chip small { color: var(--ink-soft); font-weight: 600; }
.child-chip .edit { color: var(--blue-600); font-weight: 800; font-size: 0.9rem; }
.notice { background: var(--yellow-soft); border-radius: var(--radius-sm); padding: 12px 16px; font-weight: 700; }
.notice a { color: var(--blue-600); text-decoration: underline; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--white); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-soft); }
.tile .tl { display: block; color: var(--ink-soft); font-weight: 700; font-size: 0.95rem; }
.tile b { display: block; font-size: 2.4rem; line-height: 1.2; color: var(--ink); }
.tile small { color: var(--ink-soft); font-weight: 600; }

.grid2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-bottom: 18px; }
.panel-card { background: var(--white); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-soft); }
.panel-card h2 { margin: 0; font-size: 1.35rem; color: var(--blue-900); }
.panel-card .sub { margin: 2px 0 12px; color: var(--ink-soft); font-size: 0.95rem; }

/* weekly bars — single series, one brand hue */
.week {
  position: relative; height: 210px; display: grid; grid-template-columns: repeat(7, 1fr);
  align-items: end; gap: 10px; padding: 24px 4px 0;
  border-bottom: 1px solid #dfe6f2; margin-bottom: 30px;
  background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), #eef2f9 calc(25% - 1px) 25%);
  background-size: 100% calc(100% - 24px); background-position: bottom; background-repeat: no-repeat;
}
.wcol { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; cursor: default; }
.wcol .wbar {
  width: min(34px, 70%); min-height: 3px; border-radius: 4px 4px 0 0;
  background: var(--blue-500); transition: height 0.8s var(--bounce), background 0.2s;
}
.wcol.today .wbar { background: var(--orange); }
.wcol:hover .wbar { filter: brightness(1.1); }
.wcol .wval { font-size: 0.85rem; font-weight: 800; color: var(--ink); margin-bottom: 4px; min-height: 1.2em; }
.wcol .wday { position: absolute; top: 100%; margin-top: 6px; font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.wtip {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--blue-900); color: var(--white); padding: 4px 10px; border-radius: 8px;
  font-size: 0.85rem; font-weight: 700; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.15s; z-index: 2;
}
.wcol:hover .wtip, .wcol:focus .wtip { opacity: 1; }
.week-foot { height: 30px; }

.lesson-row { display: flex; gap: 12px; align-items: center; margin: 14px 0; }
.lesson-row .li { font-size: 2.2rem; }
.lesson-row .lb { flex: 1; }
.lesson-row b { color: var(--blue-900); }
.lesson-row .bar { height: 10px; border-radius: 999px; background: #eef2f9; overflow: hidden; margin: 4px 0; }
.lesson-row .bar i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 999px; transition: width 0.8s; }
.lesson-row small { color: var(--ink-soft); font-weight: 600; }

.acc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.acc div { background: #f4f7fc; border-radius: 14px; padding: 10px 4px; }
.acc b { display: block; font-size: 1.5rem; color: var(--ink); }
.acc small { color: var(--ink-soft); font-weight: 600; font-size: 0.8rem; }
.tip { margin: 14px 0 0; background: var(--green-soft); color: #14532d; border-radius: 14px; padding: 10px 14px; font-weight: 600; }

/* settings */
.settings h2 { margin-bottom: 6px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid #eef2f9; }
.set-row b { display: block; color: var(--ink); }
.set-row small { color: var(--ink-soft); }
.set-row.danger b { color: #b91c1c; }
.seg { display: flex; background: #eef2f9; border-radius: 999px; padding: 4px; flex-shrink: 0; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font-weight: 800; color: var(--ink-soft); }
.seg button.on { background: var(--white); color: var(--blue-600); box-shadow: 0 2px 6px rgba(10, 36, 99, 0.12); }

.switch { position: relative; width: 56px; height: 32px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: background 0.2s; cursor: pointer; }
.switch span::before {
  content: ""; position: absolute; width: 24px; height: 24px; top: 4px; right: 4px;
  background: var(--white); border-radius: 50%; transition: transform 0.25s var(--bounce);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(-24px); }
.switch input:focus-visible + span { outline: 3px solid var(--blue-300); outline-offset: 2px; }

@media (max-width: 860px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  .set-row { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .acc { grid-template-columns: repeat(2, 1fr); }
}
