:root {
  --dt-bg: #f7f3ec;
  --dt-bg-soft: #fbf8f2;
  --dt-card: #ffffff;
  --dt-ink: #1f1d1a;
  --dt-muted: #6e6a62;
  --dt-line: #ece6d8;
  --dt-line-strong: #d8cdb4;
  --dt-accent: #6d5a8a;
  --dt-accent-2: #8a72ad;
  --dt-accent-soft: #ebe5f3;
  --dt-accent-soft-2: #f5f1fa;
  --dt-accent-deep: #44375b;
  --dt-warm: #3d352b;
  --dt-warm-soft: #5b4f41;
  --dt-amber: #d6a843;
  --dt-amber-soft: #fff3d9;
  --dt-bubble-me: #efe8f8;
  --dt-bubble-them: #f6efde;
  --dt-bubble-mentor: #fff3d9;
  --dt-shadow-sm: 0 1px 2px rgba(20, 15, 10, 0.04), 0 2px 6px rgba(20, 15, 10, 0.05);
  --dt-shadow-md: 0 4px 14px rgba(31, 25, 18, 0.07), 0 1px 3px rgba(31, 25, 18, 0.04);
  --dt-shadow-lg: 0 18px 48px rgba(31, 25, 18, 0.12), 0 6px 16px rgba(31, 25, 18, 0.06);
  --dt-shadow-purple: 0 14px 36px rgba(109, 90, 138, 0.32), 0 4px 12px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--dt-ink);
  font-size: 15px;
  line-height: 1.5;
  background-color: #f7f3ec;
  background-image:
    radial-gradient(at 0% 0%, rgba(109, 90, 138, 0.10) 0, transparent 35%),
    radial-gradient(at 100% 0%, rgba(214, 168, 67, 0.10) 0, transparent 38%),
    radial-gradient(at 50% 100%, rgba(61, 53, 43, 0.06) 0, transparent 45%),
    linear-gradient(180deg, #faf6ee 0%, #f3ecdb 100%);
  background-attachment: fixed;
}

a { color: var(--dt-accent-deep); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--dt-accent); }

h1, h2, h3, h4, h5 { font-family: 'Inter', sans-serif; letter-spacing: -0.015em; color: var(--dt-warm); }
h1 { font-size: 1.85rem; font-weight: 700; }
h2 { font-size: 1.4rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }

.dt-arabic {
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: 1.7rem;
  line-height: 2;
  direction: rtl;
  color: var(--dt-warm);
}

/* Header */
.dt-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--dt-line);
  position: sticky; top: 0; z-index: 40;
}
.dt-brand { display: flex; align-items: center; gap: 12px; color: var(--dt-warm); }
.dt-brand:hover { color: var(--dt-warm); }
.dt-logo {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-block; object-fit: cover;
  background: var(--dt-warm);
  box-shadow: 0 4px 12px rgba(61, 53, 43, 0.25);
}
.dt-logo-lg {
  width: 130px; height: 130px; border-radius: 50%;
  display: block; margin: 0 auto 16px; object-fit: cover;
  background: var(--dt-warm);
  box-shadow: 0 18px 40px rgba(61, 53, 43, 0.28);
}
.dt-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.dt-brand-text strong { font-size: 0.98rem; }
.dt-brand-text small { color: var(--dt-muted); font-size: 0.78rem; }

.dt-nav { display: flex; gap: 24px; }
.dt-nav a { color: var(--dt-ink); font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; transition: border-color 0.15s ease, color 0.15s ease; display: inline-flex; align-items: center; gap: 6px; }
.dt-nav a:hover { border-color: var(--dt-accent); color: var(--dt-accent-deep); }
.dt-nav-icon { font-size: 1.05em; line-height: 1; transform: translateY(-1px); }

.dt-user { color: var(--dt-muted); font-size: 0.92rem; }
.dt-badge {
  background: linear-gradient(135deg, #ebe5f3, #d8cef0);
  color: var(--dt-accent-deep);
  border-radius: 999px; padding: 2px 10px; font-size: 0.72rem;
  font-weight: 600; margin-left: 6px;
}
.dt-link-btn {
  background: #fff; border: 1px solid var(--dt-line);
  border-radius: 8px; padding: 6px 14px; color: var(--dt-ink);
  font-size: 0.9rem; cursor: pointer; transition: all 0.15s ease;
  box-shadow: var(--dt-shadow-sm);
}
.dt-link-btn:hover { background: var(--dt-accent-soft); border-color: var(--dt-accent); color: var(--dt-accent-deep); transform: translateY(-1px); }

.dt-main { padding: 36px 0 80px; min-height: calc(100vh - 200px); }
.dt-footer {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--dt-line); color: var(--dt-muted);
}
.dt-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.dt-mentor-note { color: var(--dt-accent-deep); font-weight: 500; }

/* Cards */
.dt-card {
  background: var(--dt-card);
  border: 1px solid var(--dt-line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--dt-shadow-md);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.dt-card + .dt-card { margin-top: 16px; }

/* Banner */
.dt-banner {
  position: relative; overflow: hidden;
  background:
    linear-gradient(135deg, #6d5a8a 0%, #8a72ad 50%, #4f3f6c 100%);
  color: #fff;
  border-radius: 18px;
  padding: 32px 36px;
  text-align: center;
  margin: 8px 0 28px;
  box-shadow: var(--dt-shadow-purple);
}
.dt-banner::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'><g fill='none' stroke='%23ffffff' stroke-opacity='0.10' stroke-width='1'><path d='M0 40 L40 0 L80 40 L40 80 Z'/><circle cx='40' cy='40' r='28'/><path d='M40 12 L40 68 M12 40 L68 40'/></g></svg>");
  background-size: 110px 110px;
  opacity: 0.5;
  pointer-events: none;
}
.dt-banner > * { position: relative; }
.dt-banner h1, .dt-banner p { color: #fff; margin: 0; }
.dt-banner h1 { font-size: 1.7rem; font-weight: 700; letter-spacing: 0.02em; }
.dt-banner p { opacity: 0.92; font-size: 1.02rem; margin-top: 6px; }

.dt-soft-banner {
  background: linear-gradient(135deg, var(--dt-accent-soft) 0%, #d4cae9 100%);
  color: var(--dt-accent-deep);
  border-radius: 12px;
  padding: 16px 22px;
  text-align: center;
  font-weight: 600;
  margin-bottom: 22px;
  box-shadow: 0 6px 18px rgba(109,90,138,0.10);
}

/* Group tiles on dashboard */
.dt-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 4px; }
.dt-tile {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f7f1e6 100%);
  color: var(--dt-warm);
  border-radius: 16px;
  padding: 22px 18px 20px;
  text-align: center;
  font-weight: 600;
  border: 1px solid var(--dt-line);
  box-shadow: var(--dt-shadow-md);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.dt-tile:hover {
  transform: translateY(-3px);
  border-color: var(--dt-accent);
  color: var(--dt-accent-deep);
  box-shadow: var(--dt-shadow-lg);
}
.dt-tile-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--dt-accent-soft), #d8cef0);
  color: var(--dt-accent-deep);
  box-shadow: inset 0 0 0 1px rgba(109,90,138,0.08);
}
.dt-tile-icon svg { width: 28px; height: 28px; }
.dt-tile-name { font-size: 1rem; line-height: 1.25; }
.dt-tile-sub { font-weight: 400; font-size: 0.82rem; color: var(--dt-muted); }
.dt-tile.kind-faith .dt-tile-icon { background: linear-gradient(135deg, var(--dt-amber-soft), #f4d68a); color: #7a5a13; }
.dt-tile.kind-halaqa .dt-tile-icon { background: linear-gradient(135deg, #e9efe2, #c8dac0); color: #4a6536; }

/* Locked tile (group the member isn't part of) — visible but inert.
   No <a> tag is rendered, so there's no URL to manipulate. The server also
   returns 403 in GroupsController.View if someone types the URL directly. */
.dt-tile-locked {
  opacity: 0.55;
  filter: grayscale(60%);
  cursor: default;
}
.dt-tile-locked:hover {
  transform: none;
  border-color: var(--dt-line);
  box-shadow: var(--dt-shadow-md);
  color: var(--dt-warm);
}
.dt-tile-locked-note {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--dt-muted);
  background: var(--dt-line);
  padding: 4px 10px;
  border-radius: 999px;
  margin-top: 6px;
}

/* Announcement / list cards */
.dt-list { display: flex; flex-direction: column; gap: 12px; }
.dt-list-item {
  background: linear-gradient(180deg, #ffffff 0%, #faf5e9 100%);
  border: 1px solid var(--dt-line);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--dt-shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.dt-list-item:hover { box-shadow: var(--dt-shadow-md); }
.dt-list-item .dt-when { color: var(--dt-muted); font-size: 0.85rem; white-space: nowrap; align-self: center; }
.dt-list-item .dt-body { color: var(--dt-muted); font-size: 0.92rem; margin-top: 4px; }
.dt-list-item h3 { font-size: 1.02rem; margin: 0; color: var(--dt-warm); }
.dt-list-item-link { color: var(--dt-ink); text-decoration: none; cursor: pointer; }
.dt-list-item-link:hover {
  color: var(--dt-ink); border-color: var(--dt-accent);
  transform: translateY(-2px); box-shadow: var(--dt-shadow-md);
}
.dt-list-item-link:hover .dt-when { color: var(--dt-accent-deep); font-weight: 600; }
.dt-hw-done { background: linear-gradient(180deg, #f6f6f0 0%, #eee9d9 100%); }
.dt-hw-done h3 { text-decoration: line-through; color: var(--dt-muted); }
.dt-q-answer {
  background: linear-gradient(135deg, var(--dt-accent-soft-2), var(--dt-accent-soft));
  border-radius: 12px; padding: 12px 16px;
  border-left: 3px solid var(--dt-accent);
}
.dt-q-answer .dt-theme { color: var(--dt-accent-deep); margin-bottom: 4px; }

/* Reminder card — styled as a quote */
.dt-reminder {
  position: relative; overflow: hidden;
  background:
    linear-gradient(135deg, #ffffff 0%, #fbf6e9 100%);
  padding: 26px 28px 22px 56px;
  border-radius: 16px;
  border: 1px solid var(--dt-line);
  box-shadow: var(--dt-shadow-md);
}
.dt-reminder::before {
  content: "\201C";
  position: absolute; top: -10px; left: 14px;
  font-family: 'Amiri', serif;
  font-size: 96px; line-height: 1;
  color: var(--dt-accent-soft);
  pointer-events: none;
}
.dt-reminder::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--dt-accent), var(--dt-amber));
  opacity: 0.55;
}
.dt-reminder .dt-theme {
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem;
  color: var(--dt-accent); font-weight: 700;
}
.dt-reminder .dt-source { color: var(--dt-muted); font-size: 0.88rem; margin-top: 8px; font-style: italic; }

/* Login + code panels */
.dt-auth-shell {
  display: flex; flex-direction: column; align-items: center;
  gap: 22px; max-width: 460px; margin: 24px auto 0;
}
.dt-auth-shell .dt-soft-banner { width: 100%; }
.dt-auth-card {
  width: 100%;
  background: #fff;
  border: 1px solid var(--dt-line);
  border-radius: 18px;
  padding: 32px;
  box-shadow: var(--dt-shadow-lg);
}
.dt-auth-card h2 { text-align: center; margin: 0 0 18px; font-size: 1.15rem; color: var(--dt-warm); }

/* Inputs */
.dt-input {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--dt-line-strong); border-radius: 10px;
  font-size: 1rem; background: #fff; color: var(--dt-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dt-input:focus {
  outline: none; border-color: var(--dt-accent);
  box-shadow: 0 0 0 4px rgba(109, 90, 138, 0.15);
}
.dt-label {
  display: block; text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.72rem; color: var(--dt-muted); margin-bottom: 6px;
  font-weight: 700;
}

/* Buttons */
.dt-btn-primary {
  width: 100%; padding: 12px 18px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, #4773ed 0%, #355bd8 100%);
  color: #fff; font-weight: 600; cursor: pointer; font-size: 1rem;
  box-shadow: 0 8px 18px rgba(71, 115, 237, 0.30);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.dt-btn-primary:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 10px 22px rgba(71, 115, 237, 0.36); }
.dt-btn-primary:active { transform: translateY(0); }

.dt-btn {
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--dt-line-strong);
  background: #fff; color: var(--dt-ink); font-weight: 500; cursor: pointer;
  box-shadow: var(--dt-shadow-sm);
  transition: all 0.15s ease;
}
.dt-btn:hover { background: var(--dt-accent-soft-2); border-color: var(--dt-accent); color: var(--dt-accent-deep); transform: translateY(-1px); }
.dt-btn-danger { color: #b34040; border-color: #f1ccc8; background: #fff5f3; }
.dt-btn-danger:hover { background: #fde6e2; color: #8a2d2d; }

/* OTP code boxes */
.dt-code-input {
  display: flex; gap: 10px; justify-content: center; margin-bottom: 18px;
}
.dt-code-input input {
  width: 50px; height: 60px; text-align: center; font-size: 1.6rem;
  font-weight: 700; color: var(--dt-warm);
  border: 1px solid var(--dt-line-strong); border-radius: 12px;
  background: #fff; transition: all 0.15s ease;
}
.dt-code-input input:focus {
  border-color: var(--dt-accent); outline: none;
  box-shadow: 0 0 0 4px rgba(109,90,138,0.18);
  transform: translateY(-1px);
}

.dt-otp-input {
  text-align: center;
  font-family: 'SF Mono', 'JetBrains Mono', 'Menlo', 'Consolas', monospace;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--dt-warm);
  text-transform: uppercase;
  padding: 14px 16px;
  height: 64px;
}

.dt-login-warning {
  width: 100%;
  background: linear-gradient(180deg, #fff8e6, #fff1cd);
  border: 1px solid #f1d68a;
  border-left: 4px solid #d4a017;
  border-radius: 12px;
  padding: 16px 20px;
  color: #5e4b15;
  box-shadow: var(--dt-shadow-sm);
}
.dt-login-warning-title {
  font-weight: 700;
  font-size: 1rem;
  color: #4a3a0c;
  margin-bottom: 8px;
}
.dt-login-warning ul {
  margin: 0;
  padding-left: 22px;
  font-size: 0.92rem;
  line-height: 1.55;
}
.dt-login-warning ul li { margin-bottom: 4px; }
.dt-login-warning ul li:last-child { margin-bottom: 0; }

/* ─── Login page: warm, inviting design ─── */

/* Decorative Islamic geometric pattern softly layered on the login page only */
.dt-login-wrap {
  position: relative;
  padding: 18px 16px 40px;
  background-image:
    radial-gradient(at 15% 10%, rgba(214, 168, 67, 0.10) 0, transparent 35%),
    radial-gradient(at 85% 5%, rgba(109, 90, 138, 0.10) 0, transparent 38%),
    radial-gradient(at 50% 90%, rgba(110, 138, 77, 0.08) 0, transparent 40%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><g fill='none' stroke='%236d5a8a' stroke-opacity='0.06' stroke-width='1'><path d='M60 4 L116 60 L60 116 L4 60 Z'/><circle cx='60' cy='60' r='40'/><path d='M60 20 L60 100 M20 60 L100 60'/><path d='M30 30 L90 90 M90 30 L30 90'/></g></svg>");
  background-size: auto, auto, auto, 220px 220px;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
  border-radius: 16px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Two-column layout: form left, reminder + warning right (stacks on phone) */
.dt-login-cols {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 22px;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}
.dt-login-col { display: flex; flex-direction: column; gap: 18px; }

@media (max-width: 820px) {
  .dt-login-cols {
    grid-template-columns: 1fr;     /* stack on tablet + phone */
    max-width: 480px;
  }
  .dt-login-wrap { padding: 12px 12px 28px; }
}

.dt-login-greeting {
  text-align: center;
  margin: 0 auto 22px;
  max-width: 540px;
}

.dt-login-logo {
  animation: dt-logo-pulse 4s ease-in-out infinite;
  margin-bottom: 14px;
}

/* Calligraphic Bismillah — the visual centrepiece of the login page.
   Gold→purple gradient on the Arabic text via background-clip. */
.dt-login-bismillah {
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: 2.8rem;
  line-height: 1.65;
  letter-spacing: 0.02em;
  text-align: center;
  margin: 8px auto 22px;
  padding: 14px 0;
  max-width: 560px;
  position: relative;
  background: linear-gradient(135deg, #d4a017 0%, #8a72ad 55%, #4f3f6c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
/* Decorative thin amber→purple lines above and below */
.dt-login-bismillah::before,
.dt-login-bismillah::after {
  content: "";
  position: absolute;
  left: 22%; right: 22%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,160,23,0.6) 30%, rgba(138,114,173,0.6) 70%, transparent);
}
.dt-login-bismillah::before { top: 0; }
.dt-login-bismillah::after  { bottom: 0; }

@media (max-width: 520px) {
  .dt-login-bismillah { font-size: 1.85rem; padding: 10px 0; margin-bottom: 14px; }
  .dt-login-bismillah::before, .dt-login-bismillah::after { left: 12%; right: 12%; }
  .dt-login-salaam-arabic { font-size: 1.45rem; }
  .dt-login-greeting { margin-bottom: 14px; }
}
@keyframes dt-logo-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 18px 40px rgba(61, 53, 43, 0.28); }
  50%      { transform: scale(1.03); box-shadow: 0 22px 48px rgba(61, 53, 43, 0.34); }
}

.dt-login-salaam-arabic {
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: 1.8rem;
  color: var(--dt-warm);
  margin: 0 0 4px;
  direction: rtl;
  letter-spacing: 0.01em;
}
.dt-login-salaam-en {
  color: var(--dt-accent-deep);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  margin: 0 0 6px;
}
.dt-login-subtitle {
  color: var(--dt-muted);
  margin: 0;
  font-size: 0.96rem;
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.55;
}

.dt-login-card {
  position: relative;
}
.dt-login-card::before {
  /* Slim gold-to-purple accent strip along the top of the login card */
  content: "";
  position: absolute; top: 0; left: 20px; right: 20px; height: 3px;
  background: linear-gradient(90deg, var(--dt-amber), var(--dt-accent));
  border-radius: 0 0 3px 3px;
}
.dt-login-card h2 {
  color: var(--dt-warm);
  letter-spacing: -0.01em;
}

.dt-login-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 4px;
  background: linear-gradient(135deg, #4773ed 0%, #355bd8 50%, #2c4cb8 100%);
}

/* "Today's reminder" verse / hadith card */
.dt-login-quote {
  background: linear-gradient(135deg, #fff 0%, #faf3df 100%);
  border: 1px solid var(--dt-line);
  border-left: 5px solid var(--dt-amber);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: var(--dt-shadow-md);
  width: 100%;
  text-align: center;
  position: relative;
}
.dt-login-quote-tag {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: #8a5a13;
  font-weight: 700;
  margin-bottom: 8px;
}
.dt-login-quote-arabic {
  font-family: 'Amiri', serif;
  font-size: 1.45rem;
  line-height: 1.9;
  color: var(--dt-warm);
  margin: 0 0 10px;
  direction: rtl;
}
.dt-login-quote-translation {
  color: var(--dt-ink);
  font-style: italic;
  margin: 0 0 4px;
  line-height: 1.55;
}
.dt-login-quote-source {
  color: var(--dt-muted);
  font-size: 0.85rem;
  margin: 0;
}

/* On desktop the form is the focus — give it a touch more presence */
@media (min-width: 821px) {
  .dt-login-col-form .dt-login-card {
    padding: 36px 32px;
  }
}

/* Passport — difficulty scale (mimics the Google-Form linear scale) */
.dt-difficulty { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dt-difficulty-scale { display: flex; gap: 16px; }
.dt-difficulty-radio { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-weight: 600; color: var(--dt-warm); }
.dt-difficulty-radio input[type="radio"] { width: 22px; height: 22px; accent-color: var(--dt-accent); cursor: pointer; }
.dt-difficulty-radio span { font-size: 0.95rem; }

.dt-error { background: #fff1ee; color: #b04323; border: 1px solid #f4d0c5; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.dt-muted { color: var(--dt-muted); font-size: 0.92rem; }

/* Chat */
.dt-chat-shell { display: grid; grid-template-columns: 290px 1fr; gap: 22px; min-height: 64vh; }
@media (max-width: 768px) { .dt-chat-shell { grid-template-columns: 1fr; } }
.dt-chat-list {
  background: #fff; border: 1px solid var(--dt-line); border-radius: 16px; padding: 14px;
  box-shadow: var(--dt-shadow-md);
}
.dt-chat-list h3 { font-size: 0.78rem; text-transform: uppercase; color: var(--dt-muted); margin: 10px 8px 6px; letter-spacing: 0.08em; }
.dt-chat-list a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--dt-ink); transition: background 0.15s ease; }
.dt-chat-list a:hover { background: var(--dt-accent-soft); }
.dt-chat-list a.active { background: linear-gradient(135deg, var(--dt-accent), var(--dt-accent-2)); color: #fff; }

.dt-chat-room {
  background: #fff; border: 1px solid var(--dt-line); border-radius: 16px;
  display: flex; flex-direction: column; min-height: 64vh;
  box-shadow: var(--dt-shadow-md);
  overflow: hidden;
}
.dt-chat-room header {
  padding: 16px 20px; border-bottom: 1px solid var(--dt-line);
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(180deg, #fff, #fbf7ec);
}
.dt-chat-mentor-banner {
  background: linear-gradient(180deg, #fff8e6, #fff1cd);
  color: #7a5a13; border-bottom: 1px solid #f1e6c0;
  padding: 9px 20px; font-size: 0.86rem; font-weight: 500;
}
.dt-chat-etiquette-banner {
  background: linear-gradient(180deg, #f0f5e8, #e2ead2);
  color: #4a6536; border-bottom: 1px solid #cddab6;
  padding: 9px 20px; font-size: 0.86rem;
  display: flex; align-items: flex-start; gap: 10px;
  font-style: italic;
}
.dt-chat-etiquette-banner svg { flex-shrink: 0; margin-top: 2px; opacity: 0.85; }
.dt-etiquette-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: linear-gradient(135deg, #f5f9ee 0%, #e2ecd1 100%);
  border: 1px solid #cee0b3;
  border-left: 4px solid #6e8a4d;
  color: #3e5328;
  padding: 14px 18px; border-radius: 12px;
  box-shadow: var(--dt-shadow-sm);
}
.dt-etiquette-card strong { color: #2d3f1d; }
.dt-etiquette-card .dt-muted { color: #5a6b48; font-size: 0.92rem; }
.dt-etiquette-card svg { flex-shrink: 0; margin-top: 2px; color: #6e8a4d; }
.dt-chat-stream {
  flex: 1; padding: 20px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  background-image:
    radial-gradient(at 0% 0%, rgba(109,90,138,0.04), transparent 50%),
    radial-gradient(at 100% 100%, rgba(214,168,67,0.05), transparent 50%);
}
.dt-msg {
  max-width: 75%; padding: 10px 14px; border-radius: 14px; word-wrap: break-word;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.dt-msg .dt-msg-meta { font-size: 0.72rem; color: var(--dt-muted); margin-bottom: 2px; }
.dt-msg { position: relative; }
.dt-msg-delete {
  position: absolute;
  top: 4px; right: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.85);
  color: #b34040;
  font-size: 16px; line-height: 18px;
  font-weight: 700;
  cursor: pointer;
  display: none;
  padding: 0;
}
.dt-msg:hover .dt-msg-delete { display: inline-flex; align-items: center; justify-content: center; }
.dt-msg-delete:hover { background: #fde6e2; border-color: #f1ccc8; transform: scale(1.05); }
.dt-msg.them { background: var(--dt-bubble-them); align-self: flex-start; border-bottom-left-radius: 4px; }
.dt-msg.me {
  background: linear-gradient(135deg, var(--dt-accent-soft), #ddd1f0);
  color: var(--dt-accent-deep);
  align-self: flex-end; border-bottom-right-radius: 4px;
}
.dt-msg.mentor {
  background: linear-gradient(135deg, var(--dt-bubble-mentor), #ffe8b3);
  align-self: flex-start; border-bottom-left-radius: 4px;
}
.dt-chat-compose {
  border-top: 1px solid var(--dt-line); padding: 14px;
  display: flex; gap: 10px; background: #fff;
}
.dt-chat-compose input { flex: 1; }

/* Tables (admin) */
.dt-table { width: 100%; border-collapse: collapse; }
.dt-table th, .dt-table td { padding: 12px 14px; border-bottom: 1px solid var(--dt-line); vertical-align: top; text-align: left; }
.dt-table th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dt-muted); background: #fbf7ec; }
.dt-table tbody tr:hover { background: #fbf7ec; }
.dt-table tbody tr:last-child td { border-bottom: 0; }
.dt-card.p-0 { overflow: hidden; padding: 0; }
.dt-card.p-0 .dt-table { margin: 0; }

/* Pills */
.dt-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; }
.dt-pill-mentor { background: linear-gradient(135deg, #ebe5f3, #d8cef0); color: var(--dt-accent-deep); }
.dt-pill-admin { background: linear-gradient(135deg, #fde7d6, #f9c990); color: #8a4a16; }
.dt-pill-young { background: linear-gradient(135deg, #e3f0db, #c6e3b0); color: #3f5a26; }
.dt-pill-inactive { background: #efeae2; color: var(--dt-muted); }

/* Form helpers */
.dt-form { display: flex; flex-direction: column; gap: 16px; max-width: 540px; }
.dt-form .dt-row { display: flex; gap: 12px; align-items: center; }
.dt-checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.dt-checkbox input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--dt-accent); }
.dt-help { color: var(--dt-muted); font-size: 0.88rem; }

.dt-validation { color: #b04323; font-size: 0.85rem; }

.dt-flex { display: flex; align-items: center; gap: 10px; }
.dt-flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* Mention picker + pills */
.dt-compose-wrap { flex: 1; position: relative; }
.dt-mention-picker {
  position: absolute; bottom: 100%; left: 0; right: 0; margin-bottom: 8px;
  background: #fff; border: 1px solid var(--dt-line); border-radius: 12px;
  box-shadow: var(--dt-shadow-lg); z-index: 50;
  max-height: 240px; overflow: auto;
}
.dt-mention-row {
  display: block; width: 100%; text-align: left; background: transparent;
  border: 0; padding: 9px 14px; cursor: pointer; border-bottom: 1px solid var(--dt-line);
}
.dt-mention-row:last-child { border-bottom: 0; }
.dt-mention-row:hover, .dt-mention-row.active { background: var(--dt-accent-soft); }
.dt-mention {
  background: linear-gradient(135deg, var(--dt-accent-soft), #d8cef0);
  color: var(--dt-accent-deep);
  padding: 1px 7px; border-radius: 6px; font-weight: 600;
}
.dt-mention-mentor { background: linear-gradient(135deg, #fff3d9, #ffd97f); color: #7a5a13; }

.dt-msg-focus { outline: 3px solid var(--dt-accent); outline-offset: 2px; animation: dt-pulse 1.5s ease-out 1; }
@keyframes dt-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(109,90,138,0.45); }
  100% { box-shadow: 0 0 0 16px rgba(109,90,138,0); }
}

/* Notification bell */
.dt-bell-wrap { position: relative; }
.dt-bell {
  background: #fff; border: 1px solid var(--dt-line); border-radius: 10px;
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--dt-warm); position: relative;
  box-shadow: var(--dt-shadow-sm); transition: all 0.15s ease;
}
.dt-bell:hover { background: var(--dt-accent-soft); border-color: var(--dt-accent); color: var(--dt-accent-deep); transform: translateY(-1px); }
.dt-bell-count {
  position: absolute; top: -5px; right: -5px;
  background: linear-gradient(135deg, #e74c3c, #c0392b); color: #fff;
  border-radius: 999px; font-size: 0.65rem; font-weight: 700;
  padding: 2px 6px; min-width: 18px; text-align: center;
  box-shadow: 0 2px 6px rgba(192, 57, 43, 0.40);
  border: 2px solid #fff;
}
.dt-bell-panel {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 360px; background: #fff; border: 1px solid var(--dt-line); border-radius: 14px;
  box-shadow: var(--dt-shadow-lg); z-index: 60;
  max-height: 460px; display: flex; flex-direction: column; overflow: hidden;
}
.dt-bell-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--dt-line);
  background: linear-gradient(180deg, #fff, #fbf7ec);
}
.dt-bell-list { overflow-y: auto; }
.dt-bell-empty { padding: 26px; text-align: center; }
.dt-bell-item { margin: 0; border-bottom: 1px solid var(--dt-line); }
.dt-bell-item:last-child { border-bottom: 0; }
.dt-bell-item-btn {
  display: block; width: 100%; text-align: left; background: transparent;
  border: 0; padding: 12px 16px; cursor: pointer; transition: background 0.15s ease;
}
.dt-bell-item-btn:hover { background: var(--dt-accent-soft-2); }
.dt-bell-item.read .dt-bell-item-btn { opacity: 0.55; }
.dt-bell-item-line { font-size: 0.94rem; color: var(--dt-warm); }
.dt-bell-item-preview { color: var(--dt-muted); font-size: 0.86rem; margin: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-bell-item-meta { font-size: 0.72rem; color: var(--dt-muted); }

/* Admin */
.dt-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.dt-stat {
  background: linear-gradient(180deg, #fff, #faf5e9);
  border: 1px solid var(--dt-line); border-radius: 14px; padding: 20px;
  box-shadow: var(--dt-shadow-sm);
}
.dt-stat strong { font-size: 1.8rem; display: block; color: var(--dt-warm); font-weight: 700; }
.dt-stat span { color: var(--dt-muted); font-size: 0.86rem; }

/* Rules panel on admin home */
.dt-rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.dt-rule { padding: 22px 24px; }
.dt-rule-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.dt-rule-header h3 { margin: 0; font-size: 1.05rem; color: var(--dt-warm); }
.dt-rule-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--dt-accent-soft), #d8cef0);
  font-size: 1.1rem;
}
.dt-rule-list { padding-left: 20px; margin: 0; color: var(--dt-ink); }
.dt-rule-list li { margin-bottom: 8px; line-height: 1.5; }
.dt-rule-list li:last-child { margin-bottom: 0; }
.dt-rule code { background: #f3eedf; padding: 1px 6px; border-radius: 4px; font-size: 0.88em; color: var(--dt-warm); }

/* Role hierarchy chart on admin home */
.dt-role-tree {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; margin: 22px 0 8px;
}
.dt-role-row {
  display: flex; gap: 18px; flex-wrap: wrap;
  justify-content: center; width: 100%;
}
.dt-role-arrow {
  color: var(--dt-accent-deep);
  font-weight: 600;
  font-size: 0.92rem;
  text-align: center;
  padding: 4px 14px;
  background: var(--dt-accent-soft);
  border-radius: 999px;
}
.dt-role-card {
  flex: 1 1 280px;
  max-width: 380px;
  background: #fff;
  border: 1px solid var(--dt-line);
  border-top: 5px solid #888;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: var(--dt-shadow-md);
  display: flex; flex-direction: column; align-items: center;
}
.dt-role-emoji { font-size: 2.4rem; line-height: 1; }
.dt-role-name {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--dt-warm);
  margin-top: 6px;
}
.dt-role-sub {
  color: var(--dt-muted);
  font-size: 0.88rem;
  margin: 2px 0 12px;
  text-align: center;
}
.dt-role-card .dt-role-list {
  width: 100%;
  text-align: left;
  margin: 0;
  padding-left: 22px;
  list-style: disc;
}
.dt-role-card .dt-role-list li { margin-bottom: 5px; line-height: 1.5; }
.dt-role-owner   { border-top-color: #d4a017; background: linear-gradient(180deg, #fff 0%, #fcf6e0 100%); }
.dt-role-admin   { border-top-color: #4773ed; background: linear-gradient(180deg, #fff 0%, #ebeefc 100%); }
.dt-role-mentor  { border-top-color: #6e8a4d; background: linear-gradient(180deg, #fff 0%, #eef3e3 100%); }
.dt-role-young   { border-top-color: #5a9b35; background: linear-gradient(180deg, #fff 0%, #e8f3df 100%); }
.dt-role-student { border-top-color: #6d5a8a; background: linear-gradient(180deg, #fff 0%, #f5f1fa 100%); }

/* Flow table */
.dt-flow-table { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.dt-flow-row {
  display: grid;
  grid-template-columns: 1fr auto 1.4fr;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--dt-line);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: var(--dt-shadow-sm);
}
.dt-flow-from {
  font-weight: 500;
  color: var(--dt-warm);
}
.dt-flow-arrow {
  color: var(--dt-accent);
  font-weight: 700;
  font-size: 1.4rem;
}
.dt-flow-to {
  font-weight: 500;
}
.dt-flow-to-bell { color: #4a6536; }
.dt-flow-to-mail { color: #8a4a16; }
.dt-flow-to a { color: inherit; text-decoration: underline; }
@media (max-width: 720px) {
  .dt-flow-row { grid-template-columns: 1fr; gap: 6px; text-align: center; }
  .dt-flow-arrow { transform: rotate(90deg); }
}

/* ============ Newspaper ============ */
.dt-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 36px;
  line-height: 1.7;
}
.dt-article h1 { font-family: 'Amiri', Georgia, serif; font-size: 2rem; }
.dt-article-body h2 { font-size: 1.35rem; margin-top: 28px; }
.dt-article-body h3 { font-size: 1.15rem; margin-top: 22px; }
.dt-article-body h4 { font-size: 1rem; margin-top: 18px; }
.dt-article-body p { margin: 0 0 1em; }
.dt-article-body ul, .dt-article-body ol { margin: 0 0 1em 1.4em; }
.dt-article-body blockquote {
  border-left: 3px solid var(--dt-accent, #7a5cb8);
  margin: 1em 0;
  padding: 4px 14px;
  color: #555;
  background: #faf7fc;
}
.dt-article-body code {
  background: #f3eef9;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.92em;
}
.dt-article-body a { color: var(--dt-accent, #7a5cb8); text-decoration: underline; }

.dt-tile-article {
  background: #fff;
  border: 1px solid var(--dt-line);
  border-radius: 12px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.dt-tile-article:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

/* ============ Dashboard hero & cards ============ */
.dt-hero {
  position: relative;
  margin: 0 0 22px;
  padding: 36px 36px 32px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2a2455 0%, #4a3a8a 55%, #7a5cb8 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(42, 36, 85, 0.18);
}
.dt-hero-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    radial-gradient(circle at 15% 30%, #fff 1px, transparent 1.5px),
    radial-gradient(circle at 60% 65%, #fff 1px, transparent 1.5px),
    radial-gradient(circle at 85% 25%, #fff 1px, transparent 1.5px),
    radial-gradient(circle at 35% 80%, #fff 1px, transparent 1.5px);
  background-size: 120px 120px;
}
.dt-hero-content { position: relative; z-index: 1; }
.dt-hero-eyebrow {
  font-size: 0.85rem;
  margin: 0 0 6px;
  opacity: 0.85;
  letter-spacing: 0.04em;
}
.dt-hero, .dt-hero h1, .dt-hero h2, .dt-hero p { color: #fff; }
.dt-hero-salam {
  font-family: 'Amiri', Georgia, serif;
  font-size: 2.4rem;
  margin: 0 0 8px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.dt-hero-name { font-size: 1.15rem; margin: 0 0 4px; font-weight: 500; color: #fff; }
.dt-hero-sub { margin: 6px 0 0; opacity: 0.88; font-size: 0.95rem; color: #fff; }

@media (max-width: 720px) {
  .dt-hero { padding: 26px 22px 22px; }
  .dt-hero-salam { font-size: 1.85rem; }
}

/* Stats strip */
.dt-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 22px;
}
.dt-stat {
  background: #fff;
  border: 1px solid var(--dt-line, #e8e2d6);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.dt-stat:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.05); }
.dt-stat-icon { font-size: 1.7rem; line-height: 1; }
.dt-stat-num { font-size: 1.5rem; font-weight: 700; line-height: 1.1; color: var(--dt-accent-deep, #4a3a8a); }
.dt-stat-label { font-size: 0.8rem; color: var(--dt-muted, #777); }
@media (max-width: 720px) { .dt-stats-strip { grid-template-columns: 1fr; } }

/* Reminder card refresh */
.dt-reminder-card {
  position: relative;
  background: linear-gradient(180deg, #fcf9f0 0%, #f5efde 100%);
  border: 1px solid #e6d59f;
  border-radius: 16px;
  padding: 28px 32px 26px;
  margin: 0 0 24px;
  box-shadow: 0 4px 14px rgba(166, 138, 56, 0.08);
}
.dt-reminder-mark {
  position: absolute;
  top: 8px;
  left: 16px;
  font-size: 4rem;
  line-height: 1;
  color: #c9a23a;
  opacity: 0.32;
  font-family: 'Amiri', Georgia, serif;
}
.dt-reminder-theme {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a6f1a;
  margin-bottom: 10px;
  position: relative;
}
.dt-reminder-arabic {
  font-size: 1.6rem !important;
  line-height: 2.1 !important;
  margin: 6px 0 14px !important;
  color: #2a2455;
  text-align: right;
  direction: rtl;
}
.dt-reminder-translation {
  margin: 0 0 10px;
  font-size: 1.02rem;
  line-height: 1.65;
}
.dt-reminder-source { font-size: 0.85rem; color: var(--dt-muted, #777); font-style: italic; }

/* Section titles */
.dt-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 8px 0 12px;
  color: var(--dt-accent-deep, #4a3a8a);
}

/* Tile hover lift */
.dt-tile { transition: transform 0.18s, box-shadow 0.18s; }
.dt-tile:not(.dt-tile-locked):hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

/* Passport card refresh */
.dt-passport-card {
  background: linear-gradient(135deg, #fff 0%, #f5f1fa 100%);
  border: 1px solid #d8cef0;
  border-left: 5px solid var(--dt-accent, #7a5cb8);
  border-radius: 14px;
  padding: 22px 24px;
  margin: 22px 0;
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}
.dt-passport-left { flex: 1; min-width: 260px; }
.dt-passport-eyebrow { font-size: 0.8rem; letter-spacing: 0.04em; color: #5a4577; font-weight: 600; }
.dt-passport-title { font-size: 1.25rem; margin: 4px 0 8px; }
.dt-passport-desc { color: var(--dt-muted, #777); margin: 0 0 10px; }
.dt-passport-cta { width: auto !important; padding: 10px 22px !important; }

/* Action cards (chat / newspaper / write) */
.dt-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.dt-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--dt-line, #e8e2d6);
  color: inherit;
  text-decoration: none !important;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.dt-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  border-color: var(--dt-accent, #7a5cb8);
}
.dt-action-card .dt-action-icon {
  font-size: 1.7rem;
  width: 46px;
  height: 46px;
  background: #f5f1fa;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dt-action-card .dt-action-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.dt-action-card strong { font-size: 1rem; }
.dt-action-card .dt-action-body .dt-muted { font-size: 0.85rem; }
.dt-action-card .dt-action-arrow {
  font-size: 1.4rem;
  color: var(--dt-accent, #7a5cb8);
  font-weight: 600;
  transition: transform 0.15s;
}
.dt-action-card:hover .dt-action-arrow { transform: translateX(4px); }
.dt-action-news .dt-action-icon { background: #fcf6e0; }
.dt-action-write .dt-action-icon { background: #e3f0db; }
