/* ===========================
   Ta'lim — Démo Axiom
   Custom styles complementing Tailwind
   =========================== */

html { scroll-behavior: smooth; }

/* Phone frame */
.phone-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-frame {
  width: 320px;
  height: 680px;
  background: linear-gradient(145deg, #1a1f33, #0e1422);
  border-radius: 44px;
  padding: 12px;
  box-shadow:
    0 30px 60px rgba(14, 20, 34, 0.4),
    inset 0 0 0 2px rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 26px;
  background: #0e1422;
  border-radius: 16px;
  z-index: 20;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  position: relative;
  background: #fafaf6;
}

/* Screen system */
.screen {
  display: none;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  padding-top: 0;
}

.screen.active {
  display: block;
  animation: screenIn 0.28s ease-out;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bottom nav for student/teacher phone */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #ebe7da;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 4px 14px;
  gap: 4px;
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px;
  color: #2c3148;
  opacity: 0.45;
  cursor: pointer;
  transition: opacity 0.2s;
}
.bottom-nav a:hover { opacity: 0.85; }
.bottom-nav a.active { opacity: 1; color: #059669; }
.bottom-nav span { font-size: 9px; font-weight: 600; letter-spacing: 0.02em; }

/* Screen dots */
.screen-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ebe7da;
  transition: all 0.2s;
  cursor: pointer;
}
.screen-dot.active {
  background: #0e1422;
  width: 22px;
  border-radius: 4px;
}

/* Verset rows */
.verset-row {
  background: white;
  border: 1px solid #ebe7da;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.18s;
}
.verset-row:hover { border-color: #c9a55c; transform: translateX(2px); }

.verset-row[data-status="pron"] {
  background: #fefbe8;
  border-color: rgba(234, 179, 8, 0.4);
}
.verset-row[data-status="memo"] {
  background: #fef2f2;
  border-color: rgba(239, 68, 68, 0.4);
}
.verset-row[data-status="ok"] {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.3);
}
.verset-row.pending {
  background: #f5f3ec;
  cursor: default;
  opacity: 0.7;
}
.verset-row.pending:hover { transform: none; border-color: #ebe7da; }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

/* Role buttons */
.role-btn { transition: all 0.2s; cursor: pointer; }
.role-btn.active {
  border-color: #c9a55c !important;
  background: white !important;
  box-shadow: 0 6px 20px rgba(201, 165, 92, 0.15);
}
.role-btn:not(.active):hover {
  border-color: #c9a55c !important;
}

/* Admin tabs */
.admin-tab {
  cursor: pointer;
  transition: background 0.15s;
}
.admin-tab.active {
  background: rgba(255, 255, 255, 0.08) !important;
  position: relative;
}
.admin-tab.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: #c9a55c;
  border-radius: 0 2px 2px 0;
}

/* Custom scrollbar inside phone */
.screen::-webkit-scrollbar { width: 0; }
.screen { scrollbar-width: none; -ms-overflow-style: none; }

/* Arabic typography */
.font-arabic {
  font-family: 'Amiri', 'Noto Naskh Arabic', serif;
  letter-spacing: 0;
  word-spacing: 0.05em;
}

/* Responsive: narrow viewport */
@media (max-width: 1024px) {
  .phone-wrapper { margin-top: 32px; }
}
@media (max-width: 640px) {
  .phone-frame {
    width: 290px;
    height: 600px;
  }
}
