/* ── Fonts ─────────────────────────────────────────────────────────────── */
.font-headline { font-family: 'Fredoka', sans-serif; }

.app-shell {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.7), transparent 28%),
    linear-gradient(180deg, #f3f4ff 0%, #eef2ff 42%, #f7f8fc 100%);
}

.app-sidebar {
  background: rgba(255, 255, 255, 0.96);
  color: #333;
}

.sidebar-float {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(191, 199, 234, 0.45);
  box-shadow: 0 8px 32px rgba(108, 125, 179, 0.10);
}

.app-mobile-topbar {
  background: rgba(246, 247, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(191, 199, 234, 0.55);
}

.app-content-shell {
  background: transparent;
}

.app-brand-badge {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(180deg, #0d79bb 0%, #0a5d96 100%);
  box-shadow: 0 12px 24px rgba(13, 121, 187, 0.18);
}

.app-lang-select {
  border: 1px solid rgba(180, 191, 229, 0.8);
  background: rgba(255, 255, 255, 0.84);
  color: #5f7296;
}

.sidebar-nav {
  padding: 0 0.55rem;
}

.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  padding: 0.6rem 0.95rem 0.3rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.55rem 0.95rem;
  border-radius: 1rem;
  color: #333;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-nav-item:hover {
  color: #0d6fb1;
  background: rgba(255, 255, 255, 0.62);
}

.sidebar-nav-item.active {
  color: #0d6fb1;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(108, 125, 179, 0.12);
}

.sidebar-nav-item .material-symbols-outlined {
  font-size: 22px !important;
  color: currentColor;
}

.sidebar-footer {
  margin-top: auto;
  padding: 0.55rem;
}

.sidebar-footer-card {
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(205, 214, 243, 0.7);
  padding: 0.85rem;
}

.sidebar-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #6c7f9f;
  padding: 0.8rem 0.85rem;
  border-radius: 0.9rem;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.84);
  color: #0d6fb1;
}

.page-placeholder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.page-placeholder-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(220, 225, 245, 0.9);
  border-radius: 1.5rem;
  padding: 1.4rem;
  box-shadow: 0 18px 40px rgba(98, 112, 155, 0.08);
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
}

/* ── Page transition ───────────────────────────────────────────────────── */
.page-enter {
  animation: pageEnter 0.18s ease both;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* ── Mobile drawer ─────────────────────────────────────────────────────── */
#mobile-drawer {
  transform: translateX(-100%);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
[dir="rtl"] #mobile-drawer {
  left: auto;
  right: 0;
  transform: translateX(100%);
}
#mobile-drawer.drawer-open {
  transform: translateX(0) !important;
}

/* ── Custom scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar          { width: 5px; height: 5px; }
::-webkit-scrollbar-track    { background: transparent; }
::-webkit-scrollbar-thumb    { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── RTL sidebar border ────────────────────────────────────────────────── */
[dir="rtl"] #desktop-sidebar {
  border-right: none;
  border-left: 1px solid rgba(191, 199, 234, 0.55);
}

/* ── RTL mobile topbar: hamburger stays to the right of greeting ───────── */
[dir="rtl"] #drawer-open-btn {
  order: -1;
}

/* ── Safe-area bottom (iOS notch) ──────────────────────────────────────── */
.pb-safe {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Input icon positioning (RTL/LTR aware) ────────────────────────────── */
.input-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0.75rem;
  pointer-events: none;
  color: #cbd5e1;
  font-size: 18px !important;
}
[dir="rtl"] .input-icon  { left: auto; right: 0.75rem; }

.input-icon-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 0.75rem;
}
[dir="rtl"] .input-icon-btn { right: auto; left: 0.75rem; }

.input-with-icon     { padding-left:  2.5rem !important; padding-right: 1rem   !important; }
.input-with-icon-end { padding-right: 2.5rem !important; padding-left:  1rem   !important; }
[dir="rtl"] .input-with-icon     { padding-right: 2.5rem !important; padding-left:  1rem !important; }
[dir="rtl"] .input-with-icon-end { padding-left:  2.5rem !important; padding-right: 1rem !important; }

/* ── Edit modal fields ─────────────────────────────────────────────────── */
.edit-field {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  font-family: 'Fredoka', sans-serif;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  color: #1e293b;
}
.edit-field:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.edit-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
  font-family: 'Fredoka', sans-serif;
}

/* ── Desktop header ────────────────────────────────────────────────────── */
.desktop-header {
  background: transparent;
  border-bottom: none;
}

.header-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #0d79bb 0%, #0a5d96 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* ── Skeleton pulse ────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
