@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root,
html[data-theme="light"] {
  --bg-page: #F9F6EE;
  --bg-surface: #FFFFFF;
  --bg-subtle: #EAECEB;
  --bg-elevated: #F4F1E8;
  --bg-mint-dock: #E5F4EC;
  --bg-pill-active: #D4EFE4;

  --text-primary: #14261F;
  --text-secondary: #364941;

  --border-color: #D8D6CD;
  --border-strong: #6A8277;

  --brand-emerald: #0A6A4C;
  --brand-emerald-hover: #07523A;
  --brand-emerald-soft: #E3F3EC;
  --brand-emerald-text: #FFFFFF;

  --accent-amber: #B45309;
  --accent-amber-hover: #92400E;
  --accent-amber-soft: #FEF3C7;
  --accent-amber-ink: #78350F;

  --card-grey-bg: #E4E7E6;
  --card-grey-text: #14261F;
  --card-grey-sub: #364941;

  --danger-red: #B91C1C;
  --danger-red-hover: #991B1B;
  --danger-red-soft: #FEE2E2;

  --focus-ring: #0A6A4C;
  --shadow-card: 0 3px 12px rgba(20, 38, 31, 0.05);
  --shadow-float: 0 8px 24px rgba(20, 38, 31, 0.11);
  --shadow-modal: 0 16px 38px rgba(20, 38, 31, 0.2);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
}

html[data-theme="dark"] {
  --bg-page: #0D1713;
  --bg-surface: #14221C;
  --bg-subtle: #1C2F27;
  --bg-elevated: #182922;
  --bg-mint-dock: #152E24;
  --bg-pill-active: #193D2F;

  --text-primary: #F2F7F4;
  --text-secondary: #A9C2B8;

  --border-color: #2B453A;
  --border-strong: #5E8776;

  --brand-emerald: #10B981;
  --brand-emerald-hover: #34D399;
  --brand-emerald-soft: #14382B;
  --brand-emerald-text: #08140F;

  --accent-amber: #F59E0B;
  --accent-amber-hover: #FBBF24;
  --accent-amber-soft: #3B2A10;
  --accent-amber-ink: #FDE68A;

  --card-grey-bg: #1E3028;
  --card-grey-text: #F2F7F4;
  --card-grey-sub: #A9C2B8;

  --danger-red: #F87171;
  --danger-red-hover: #FCA5A5;
  --danger-red-soft: #3B1818;

  --focus-ring: #34D399;
  --shadow-card: 0 3px 12px rgba(0, 0, 0, 0.35);
  --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-modal: 0 16px 40px rgba(0, 0, 0, 0.65);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Base layer affordances untuk elemen interaktif (R-39) */
a[href],
button,
summary,
select,
label[for],
input[type="range"],
input[type="checkbox"],
input[type="radio"],
[role="button"],
[role="tab"],
[role="menuitem"],
[role="switch"] {
  cursor: pointer;
}

button:disabled,
select:disabled,
input:disabled,
textarea:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.65;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 999;
  padding: 0.75rem 1.25rem;
  background: var(--brand-emerald);
  color: var(--brand-emerald-text);
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

[hidden] {
  display: none !important;
}

/* Shell & Ornamen Mandala */
.app-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 1420px;
  margin: 0 auto;
  overflow-x: clip;
}

.mandala-watermark {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  color: #D2C8B2;
  opacity: 0.35;
}

html[data-theme="dark"] .mandala-watermark {
  color: #2B453A;
  opacity: 0.25;
}

.mandala-top-right {
  top: -55px;
  right: -65px;
}

.mandala-bottom-left {
  bottom: 30px;
  left: -80px;
}

.workspace-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.content-column {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

/* Top Header sesuai Dummy Visual */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem 0.5rem;
  background: transparent;
  position: relative;
  z-index: 35;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rub-el-hizb-logo {
  color: var(--brand-emerald);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-title {
  display: none;
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.header-Search-pill,
.header-icon-box {
  min-height: 44px;
  min-width: 44px;
  border-radius: 13px;
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.65rem;
  box-shadow: var(--shadow-card);
  position: relative;
  font-family: inherit;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.header-Search-pill:hover,
.header-icon-box:hover {
  border-color: var(--brand-emerald);
}

.header-search-text {
  display: none;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-left: 0.45rem;
  font-weight: 500;
}

.notif-red-dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--danger-red);
}

/* Profile Switcher Pill & Popover (Fatimah, Hasan, Aisha) */
.profile-dropdown-wrap {
  position: relative;
}

.profile-switcher-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.25rem 0.65rem 0.25rem 0.35rem;
  border-radius: var(--radius-pill);
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
  font-family: inherit;
}

.profile-switcher-pill:hover {
  border-color: var(--brand-emerald);
}

.profile-popover-card {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 215px;
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  box-shadow: var(--shadow-float);
  z-index: 80;
}

.popover-children-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.popover-child-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
}

.popover-child-item:hover {
  background-color: var(--bg-elevated);
}

.popover-child-item.active {
  background-color: var(--bg-pill-active);
  border-color: var(--brand-emerald);
  font-weight: 700;
}

.popover-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 0.4rem 0;
}

.popover-action-btn {
  width: 100%;
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--brand-emerald);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  text-align: left;
}

.popover-action-btn:hover {
  background-color: var(--bg-elevated);
}

/* Avatar Ilustrasi Keluarga SVG */
.avatar-illustration {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background-color: #EDE3CE;
  font-weight: 700;
  color: var(--brand-emerald-text);
}

.avatar-illustration.sm {
  width: 34px;
  height: 34px;
  font-size: 0.88rem;
}

.avatar-illustration.md {
  width: 52px;
  height: 52px;
  font-size: 1.1rem;
}

.avatar-illustration.lg {
  width: 68px;
  height: 68px;
  font-size: 1.35rem;
}

.avatar-illustration svg {
  width: 100%;
  height: 100%;
  display: block;
}

.avatar-illustration.emerald {
  background-color: var(--brand-emerald);
}

.avatar-illustration.amber {
  background-color: var(--accent-amber);
}

/* Navigasi Bawah Mobile (Pill Mint + Titik Hijau) */
.primary-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-radius: 24px 24px 0 0;
  padding: 0.45rem 0.6rem calc(0.45rem + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(20, 38, 31, 0.06);
}

.rail-brand,
.nav-storage-card,
.icon-desktop {
  display: none;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
}

.nav-item {
  width: 100%;
  min-height: 56px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.25rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  position: relative;
}

.nav-icon-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 34px;
  border-radius: var(--radius-pill);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-item:hover .nav-icon-pill {
  background-color: var(--bg-elevated);
}

.nav-item.active {
  color: var(--brand-emerald);
  font-weight: 700;
}

.nav-item.active .nav-icon-pill {
  background-color: var(--bg-pill-active);
  color: var(--brand-emerald);
}

.nav-active-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: transparent;
  margin-top: 1px;
}

.nav-item.active .nav-active-dot {
  background-color: var(--brand-emerald);
}

.status-count {
  position: absolute;
  top: -2px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 0.3rem;
  border-radius: var(--radius-pill);
  background-color: var(--text-secondary);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  border: 2px solid var(--bg-surface);
}

/* Main Panel */
.main-panel {
  flex: 1;
  padding: 0.4rem 1.15rem calc(6.5rem + env(safe-area-inset-bottom));
  max-width: 100%;
}

/* Buttons & Inputs (Min 44x44px tap targets per R-03) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.55rem 1.1rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

.pill-cta {
  border-radius: var(--radius-md);
  padding: 0.6rem 1.15rem;
}

.btn-primary {
  background-color: var(--brand-emerald);
  color: var(--brand-emerald-text);
  border-color: var(--brand-emerald);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--brand-emerald-hover);
  border-color: var(--brand-emerald-hover);
}

.btn-secondary {
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-amber {
  background-color: var(--accent-amber);
  color: var(--brand-emerald-text);
  border-color: var(--accent-amber);
}

.btn-amber-outline {
  background-color: var(--bg-surface);
  color: var(--accent-amber);
  border-color: var(--accent-amber);
}

.btn-amber-outline:hover:not(:disabled) {
  background-color: var(--accent-amber-soft);
}

.btn-danger {
  background-color: var(--danger-red);
  color: #FFFFFF;
  border-color: var(--danger-red);
}

.btn-outline {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--bg-elevated);
}

.btn-danger-outline {
  background-color: var(--bg-surface);
  color: var(--danger-red);
  border-color: var(--danger-red);
}

.btn-link-emerald {
  min-height: 44px;
  padding: 0.35rem 0.65rem;
  background: transparent;
  border: none;
  color: var(--brand-emerald);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
}

.select-control,
.text-input {
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 100%;
}

.compact-select {
  width: auto;
  min-width: 145px;
  font-weight: 600;
}

/* Banners & Sample Bar */
.notice-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.9rem;
  border-radius: var(--radius-md);
  background-color: var(--brand-emerald-soft);
  border: 1.5px solid var(--brand-emerald);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-icon-small {
  min-height: 44px;
  min-width: 44px;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 700;
}

.sample-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.65rem 0.9rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  font-size: 0.84rem;
}

.sample-bar-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sample-bar-actions {
  display: flex;
  gap: 0.45rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
}

.tag-pill.emerald {
  background-color: var(--brand-emerald);
  color: var(--brand-emerald-text);
}

.tag-pill.amber {
  background-color: var(--accent-amber);
  color: var(--brand-emerald-text);
}

.tag-pill.neutral {
  background-color: var(--bg-subtle);
  color: var(--text-primary);
}

/* Typography Headings sesuai Dummy Visual */
.hero-greeting-title,
.page-big-title {
  margin: 0.15rem 0 1rem;
  font-size: clamp(1.65rem, 4.5vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.22;
}

.sub-section-title {
  margin: 1.2rem 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.section-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* VIEW 1: BERANDA (Mobile Cards sesuai Dummy Visual 7) */
.beranda-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.summary-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.metric-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.emerald-solid-card {
  background-color: var(--brand-emerald);
  color: var(--brand-emerald-text);
  border: 1.5px solid var(--brand-emerald);
}

.emerald-card-watermark {
  position: absolute;
  right: -18px;
  bottom: -18px;
  opacity: 0.12;
  pointer-events: none;
}

.white-clean-card {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1.5px solid var(--border-color);
}

.metric-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
  position: relative;
  z-index: 1;
}

.metric-label-light {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--brand-emerald-text);
}

.metric-label-dark {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  position: relative;
  z-index: 1;
  margin-top: 0.9rem;
}

.metric-number-lg {
  font-size: clamp(2.1rem, 6vw, 2.55rem);
  font-weight: 800;
  line-height: 1;
}

.metric-unit-light {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-emerald-text);
}

.metric-unit-dark {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Jadwal Muraja'ah Cards sesuai Dummy Visual 7 */
.stack-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.schedule-card,
.list-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

.list-card.selected {
  border-color: var(--brand-emerald);
  background-color: var(--bg-mint-dock);
}

.list-card-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}

.list-card-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.25;
}

.list-card-sub {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.list-card-muted {
  margin: 0.1rem 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.schedule-right-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}

.schedule-status-text {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.btn-mulai-pill {
  min-height: 44px;
  min-width: 84px;
  padding: 0.45rem 1.15rem;
  border-radius: 11px;
  background-color: var(--brand-emerald);
  color: var(--brand-emerald-text);
  border: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
}

.btn-mulai-pill:hover {
  background-color: var(--brand-emerald-hover);
}

/* Desktop Dashboard Split-View (Hidden di Mobile, Tampil di >= 1040px) */
.desktop-dashboard-split {
  display: none;
}

/* VIEW 2: INBOX SETORAN sesuai Dummy Visual 1 & 6 */
.inbox-top-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.segmented-pill-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 0.3rem;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
}

.seg-pill-btn {
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.seg-pill-btn.active {
  background-color: var(--brand-emerald);
  color: var(--brand-emerald-text);
  font-weight: 700;
}

.desktop-column-title,
.desktop-review-heading {
  display: none;
}

/* Inbox Card sesuai Dummy Visual 1 */
.inbox-item-card {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.inbox-item-card.selected {
  border-color: var(--brand-emerald);
  background-color: var(--bg-mint-dock);
}

.inbox-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.inbox-card-person {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.inbox-person-name {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 700;
}

.inbox-person-kicker {
  display: block;
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.inbox-surah-line {
  margin: 0.3rem 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.inbox-card-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}

.inbox-time-ago {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.status-badge-box {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: left;
}

.status-badge-box.amber {
  background-color: var(--accent-amber);
  color: var(--brand-emerald-text);
}

.status-badge-box.emerald {
  background-color: var(--brand-emerald);
  color: var(--brand-emerald-text);
  flex-direction: column;
  align-items: center;
}

.inbox-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.btn-inline-play-wave {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.4rem 0.95rem;
  border-radius: 12px;
  border: 1.5px solid var(--brand-emerald);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
}

.btn-inline-play-wave:hover {
  background-color: var(--brand-emerald-soft);
}

.play-triangle-emerald {
  color: var(--brand-emerald);
  font-size: 0.95rem;
}

.btn-simak-outline {
  min-height: 44px;
  min-width: 86px;
  padding: 0.4rem 1rem;
  border-radius: 11px;
  border: 1.5px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--brand-emerald);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  margin-left: auto;
}

.btn-simak-outline:hover {
  border-color: var(--brand-emerald);
  background-color: var(--brand-emerald-soft);
}

/* Panel Parent Review sesuai Dummy Visual 6 */
.inbox-split-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

.review-card {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
}

.review-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.review-card-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.review-head-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.review-surah-label {
  font-size: 1rem;
  font-weight: 700;
}

.audio-player-box {
  padding: 1.1rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-page);
  border: 1.5px solid var(--border-color);
  margin-bottom: 1.25rem;
}

.player-top-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.85rem;
}

.dark-play-circle-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--text-primary);
  color: var(--bg-surface);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.player-waveform-wrap {
  flex: 1;
  min-width: 0;
}

.multicolor-bars {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 42px;
  margin-bottom: 0.35rem;
}

.multicolor-bars span {
  flex: 1;
  border-radius: 999px;
}

.multicolor-bars .sm { height: 28%; }
.multicolor-bars .md { height: 52%; }
.multicolor-bars .lg { height: 76%; }
.multicolor-bars .xl { height: 96%; }

.multicolor-bars .bar-red { background-color: #C84B31; }
.multicolor-bars .bar-gold { background-color: #D99B26; }
.multicolor-bars .bar-emerald { background-color: var(--brand-emerald); }
.multicolor-bars .bar-grey { background-color: #CBD2CE; }

.seek-slider {
  width: 100%;
  min-height: 28px;
  accent-color: var(--brand-emerald);
}

.player-speed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.speed-btn-group {
  display: flex;
  gap: 0.4rem;
}

.speed-chip {
  min-height: 44px;
  min-width: 48px;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  background-color: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
}

.speed-chip.active {
  background-color: var(--bg-pill-active);
  color: var(--brand-emerald);
  border-color: var(--brand-emerald);
}

.player-time-display {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.rating-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1rem;
}

.field-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: var(--text-primary);
}

.star-rating-row {
  display: flex;
  gap: 0.45rem;
}

.star-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background-color: var(--bg-surface);
  color: #CBD2CE;
  font-size: 1.5rem;
  line-height: 1;
}

.star-btn.active {
  color: #D99B26;
  border-color: #D99B26;
  background-color: var(--bg-elevated);
}

.warm-textarea {
  background-color: var(--bg-elevated);
}

.review-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.approve-wide-btn {
  flex: 1;
  min-width: 160px;
}

/* VIEW 3: PETA HAFALAN sesuai Dummy Visual 2 & 4 */
.peta-top-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.peta-child-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.peta-child-Banner-title {
  margin: 0;
}

.peta-child-sub {
  margin: -0.6rem 0 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.peta-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.peta-search-pill-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.2rem 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-card);
  color: var(--text-secondary);
}

.peta-search-input {
  border: none;
  background: transparent;
  width: 100%;
  min-height: 44px;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--text-primary);
}

.peta-search-input:focus {
  outline: none;
}

.peta-progress-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.peta-juz-card {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-card);
}

.peta-juz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  font-size: 1.12rem;
}

.juz-detail {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.progress-track {
  width: 100%;
  height: 12px;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--brand-emerald);
  border-radius: var(--radius-pill);
  transition: width 0.25s ease;
}

/* Grid Kartu Surah 2 Kolom Solid sesuai Dummy Visual 4 */
.surah-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.surah-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 94px;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  text-align: left;
  font-family: inherit;
  box-shadow: var(--shadow-card);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.surah-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-float);
}

.surah-card.status-mutqin {
  background-color: var(--brand-emerald);
  color: var(--brand-emerald-text);
}

.surah-card.status-murajaah {
  background-color: var(--accent-amber);
  color: var(--brand-emerald-text);
}

.surah-card.status-belum {
  background-color: var(--card-grey-bg);
  color: var(--card-grey-text);
  border-color: var(--border-color);
}

.surah-status-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.status-mutqin .surah-status-icon {
  background-color: #FFFFFF;
  color: var(--brand-emerald);
}

.status-murajaah .surah-status-icon {
  background-color: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}

.status-belum .surah-status-icon {
  background-color: rgba(20, 38, 31, 0.08);
  color: var(--card-grey-sub);
}

.surah-card-body {
  min-width: 0;
  flex: 1;
}

.surah-name-latin {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
}

.surah-status-caption {
  display: block;
  font-size: 0.86rem;
  margin-top: 0.15rem;
  opacity: 0.95;
  font-weight: 500;
}

.status-belum .surah-status-caption {
  color: var(--card-grey-sub);
}

/* Floating Audio Recorder Bar di Peta Hafalan sesuai Dummy Visual 2 */
.floating-recorder-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-radius: 22px;
  background-color: var(--bg-mint-dock);
  border: 1.5px solid var(--brand-emerald);
  box-shadow: var(--shadow-float);
  margin-top: 1rem;
}

.floating-wave-preview {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 38px;
  flex: 1;
}

.floating-wave-preview .fw-bar {
  width: 4px;
  border-radius: 99px;
  background-color: var(--brand-emerald);
}

.floating-wave-preview .fw-bar.sm { height: 28%; }
.floating-wave-preview .fw-bar.md { height: 55%; }
.floating-wave-preview .fw-bar.lg { height: 80%; }
.floating-wave-preview .fw-bar.xl { height: 100%; }
.floating-wave-preview .fw-bar.muted {
  background-color: #B4C6BD;
}

.record-circle-button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--brand-emerald);
  border: 3px solid var(--danger-red);
  box-shadow: 0 0 0 3px #FFFFFF inset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rec-inner-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--danger-red);
}

/* VIEW 4: PROFIL & KELUARGA sesuai Dummy Visual 3 */
.profil-visual-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.main-account-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

.account-card-body {
  min-width: 0;
  flex: 1;
}

.account-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.account-title-row h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.account-owner-name {
  margin: 0.2rem 0 0.1rem;
  font-size: 1.08rem;
  font-weight: 600;
}

.account-owner-email {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.children-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.4rem;
}

.children-section-header .sub-section-title {
  margin: 0;
}

.btn-plus-icon {
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--brand-emerald);
  font-size: 1.9rem;
  font-weight: 500;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-plus-icon:hover {
  background-color: var(--brand-emerald-soft);
}

.child-profile-card {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.child-profile-card.selected {
  border-color: var(--brand-emerald);
}

.child-card-left {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.child-card-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.child-card-juz {
  margin: 0.2rem 0 0;
  font-size: 0.96rem;
  font-weight: 600;
}

.child-card-note {
  margin: 0.2rem 0 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.child-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.btn-lihat-progres {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.3rem 0.6rem;
  background: transparent;
  border: none;
  color: var(--brand-emerald);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
}

.integration-list-card {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.4rem 1.1rem;
  box-shadow: var(--shadow-card);
}

.integration-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem 0;
  width: 100%;
  background: transparent;
  border: none;
  font-family: inherit;
  color: var(--text-primary);
  text-align: left;
}

.integration-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.integration-icon {
  color: var(--text-secondary);
  display: inline-flex;
}

.integration-title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
}

.integration-sub {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.muted-paren {
  font-weight: 400;
  color: var(--text-secondary);
}

.connection-status-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-emerald);
}

.integration-divider {
  height: 1px;
  background-color: var(--border-color);
}

/* Panels & Forms */
.panel-box {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.panel-box-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.panel-sub {
  margin: 0.25rem 0 0.9rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.form-row-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.form-field {
  margin-bottom: 0.85rem;
}

.field-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.drive-warning-box {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  background-color: var(--accent-amber-soft);
  border: 1.5px solid var(--accent-amber);
  font-size: 0.86rem;
  margin-bottom: 1rem;
}

.button-row-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.65rem;
}

.shared-email-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.email-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  font-size: 0.85rem;
  font-weight: 600;
}

.quota-stats-box {
  padding: 1rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-elevated);
  border: 1.5px solid var(--border-color);
  margin-bottom: 1.1rem;
}

.quota-stat-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

/* Empty / Loading / Error States (R-27) */
.state-card {
  padding: 1.35rem;
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  border: 1.5px dashed var(--border-strong);
  margin-bottom: 1rem;
}

.state-card h2,
.state-card h3,
.state-card h4 {
  margin: 0 0 0.35rem;
}

.state-card p {
  margin: 0 0 0.85rem;
  color: var(--text-secondary);
}

.error-card {
  border-style: solid;
  border-color: var(--danger-red);
  background-color: var(--danger-red-soft);
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Modal & Recorder Dock */
.recorder-dock,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background-color: rgba(20, 38, 31, 0.55);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recorder-dock-inner,
.modal-dialog {
  width: 100%;
  max-width: 620px;
  background-color: var(--bg-surface);
  border: 2px solid var(--brand-emerald);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-modal);
  max-height: 92dvh;
  overflow-y: auto;
}

.modal-dialog {
  max-width: 460px;
}

.recorder-dock-header,
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.recorder-dock-header h3,
.modal-header h3 {
  margin: 0.25rem 0 0;
  font-size: 1.2rem;
}

.recorder-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.recorder-stage {
  padding: 1rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-mint-dock);
  border: 1.5px solid var(--brand-emerald);
}

.recorder-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.rec-badge {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
}

.rec-badge.recording {
  background-color: var(--danger-red);
  color: #FFFFFF;
  border-color: var(--danger-red);
}

.rec-timer {
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.waveform-canvas-wrap {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#rec-waveform-canvas {
  width: 100%;
  height: 54px;
  display: block;
}

.btn-wave-pause {
  min-height: 44px;
  min-width: 86px;
  padding: 0.3rem 0.6rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background-color: var(--bg-subtle);
  color: var(--text-primary);
}

.recorder-controls-row,
.rec-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.rec-preview-box {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.rec-preview-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  margin-bottom: 0.45rem;
}

.native-audio {
  width: 100%;
  margin-bottom: 0.75rem;
}

.status-choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  margin: 0.5rem 0 1.15rem;
}

.full-width {
  width: 100%;
}

.app-footer {
  padding: 0.85rem 1.25rem calc(5.5rem + env(safe-area-inset-bottom));
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ==========================================================================
   STAGE 2 BREAKPOINT: TABLET (680px to 1039px)
   ========================================================================== */
@media (min-width: 680px) {
  .main-panel {
    padding: 0.75rem 1.5rem calc(6.5rem + env(safe-area-inset-bottom));
  }

  .header-search-text {
    display: inline;
  }

  .header-Search-pill {
    padding: 0.45rem 1rem;
  }

  .inbox-top-controls {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .segmented-pill-tabs {
    min-width: 360px;
  }

  .peta-progress-summary,
  .form-row-grid,
  .recorder-form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .surah-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   STAGE 3 BREAKPOINT: DESKTOP / TABLET LANDSCAPE (>= 1040px)
   Sesuai Dummy Visual 5 & 6 (Left Icon Rail + Split-View Dashboard & Inbox)
   ========================================================================== */
@media (min-width: 1040px) {
  .workspace-grid {
    display: grid;
    grid-template-columns: 92px 1fr;
    align-items: stretch;
    min-height: 100dvh;
  }

  .primary-nav {
    position: sticky;
    top: 0;
    bottom: auto;
    height: 100dvh;
    border-top: none;
    border-right: 1px solid var(--border-color);
    border-radius: 0;
    background-color: var(--bg-surface);
    padding: 1.25rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1.75rem;
    box-shadow: none;
  }

  .rail-brand {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-brand-mark {
    display: none;
  }

  .brand-title {
    display: block;
  }

  .icon-mobile {
    display: none;
  }

  .icon-desktop {
    display: block;
  }

  .nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
  }

  .nav-item {
    min-height: 64px;
    border-radius: var(--radius-md);
    padding: 0.45rem 0.25rem;
    font-size: 0.75rem;
  }

  .nav-item.active {
    background-color: var(--bg-pill-active);
  }

  .nav-item.active .nav-icon-pill {
    background-color: transparent;
  }

  .nav-active-dot {
    display: none;
  }

  .nav-storage-card {
    display: block;
    margin-top: auto;
    padding: 0.55rem 0.4rem;
    border-radius: var(--radius-sm);
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-color);
    font-size: 0.68rem;
    text-align: center;
    width: 100%;
  }

  .storage-mode-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
  }

  .state-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-amber);
  }

  .state-dot.connected {
    background-color: var(--brand-emerald);
  }

  .storage-mode-desc {
    display: none;
  }

  .top-header {
    padding: 1.15rem 2rem 0.85rem;
    border-bottom: 1px solid var(--border-color);
  }

  .main-panel {
    padding: 1.5rem 2rem 2.5rem;
  }

  /* Pada Desktop, Beranda menampilkan Split-View sesuai Dummy Visual 5 */
  .beranda-hero-row,
  .beranda-mobile-flow {
    display: none;
  }

  .desktop-dashboard-split {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 1.5rem;
    align-items: start;
  }

  .family-sidebar-card {
    background-color: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    min-height: 540px;
  }

  .card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
  }

  .card-title-row h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
  }

  .btn-dots-menu {
    min-width: 44px;
    min-height: 44px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 800;
    border-radius: var(--radius-sm);
  }

  .roster-group-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0.75rem 0 0.35rem;
    display: block;
  }

  .roster-member-btn {
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-md);
    border: 1.5px solid transparent;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    text-align: left;
    border-bottom: 1px solid var(--bg-subtle);
  }

  .roster-member-btn:hover {
    background-color: var(--bg-elevated);
  }

  .roster-member-btn.active {
    background-color: var(--bg-mint-dock);
    border-color: var(--brand-emerald);
  }

  .roster-member-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 0.98rem;
  }

  .desktop-main-stage {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .desktop-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .desktop-progress-header h3 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
  }

  .desktop-pct-pill {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    font-size: 0.88rem;
    font-weight: 700;
  }

  .mini-progress-track {
    width: 140px;
    height: 8px;
    background-color: var(--bg-subtle);
    border-radius: var(--radius-pill);
    overflow: hidden;
  }

  .mini-progress-fill {
    height: 100%;
    background-color: var(--brand-emerald);
  }

  .desktop-surah-board {
    background-color: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    box-shadow: var(--shadow-card);
  }

  .board-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
  }

  .segmented-juz-bar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
  }

  .seg-bar {
    width: 36px;
    height: 7px;
    border-radius: var(--radius-pill);
  }

  .seg-bar.emerald { background-color: var(--brand-emerald); }
  .seg-bar.amber { background-color: var(--accent-amber); }
  .seg-bar.grey { background-color: var(--bg-subtle); }

  .desktop-surah-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.9rem;
    margin-bottom: 1.15rem;
  }

  .desktop-tile-card {
    min-height: 124px;
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    text-align: center;
    transition: transform 0.12s ease;
  }

  .desktop-tile-card:hover {
    transform: translateY(-2px);
  }

  .desktop-tile-card.status-mutqin {
    background-color: var(--brand-emerald);
    color: var(--brand-emerald-text);
  }

  .desktop-tile-card.status-murajaah {
    background-color: var(--accent-amber);
    color: var(--brand-emerald-text);
  }

  .desktop-tile-card.status-belum {
    background-color: var(--card-grey-bg);
    color: var(--card-grey-text);
  }

  .tile-dots {
    display: flex;
    gap: 4px;
  }

  .tile-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    opacity: 0.65;
  }

  .board-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
  }

  .legend-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-style: normal;
    font-size: 0.7rem;
    margin-right: 0.25rem;
  }

  .legend-dot.emerald {
    background-color: var(--brand-emerald);
    color: #FFFFFF;
  }

  .legend-dot.amber {
    background-color: var(--accent-amber);
    color: #FFFFFF;
  }

  .legend-dot.grey {
    background-color: var(--card-grey-bg);
    color: var(--text-secondary);
  }

  .desktop-recorder-card {
    background-color: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.35rem;
    box-shadow: var(--shadow-card);
  }

  .dock-bar-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .dock-wave-area {
    flex: 1;
  }

  .multicolor-wave {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 36px;
  }

  .multicolor-wave span {
    flex: 1;
    background-color: var(--brand-emerald);
    border-radius: 99px;
  }

  .multicolor-wave .w-sm { height: 28%; }
  .multicolor-wave .w-md { height: 55%; }
  .multicolor-wave .w-lg { height: 82%; }
  .multicolor-wave .w-xl { height: 100%; }
  .multicolor-wave .muted { background-color: #CBD2CE; }

  .dock-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
  }

  .play-mini-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-subtle);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Desktop Split-View untuk Inbox sesuai Dummy Visual 6 */
  .mobile-only-heading {
    display: none;
  }

  .desktop-column-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
  }

  .desktop-column-title h3 {
    margin: 0;
    font-size: 1.15rem;
  }

  .desktop-review-heading {
    display: block;
    margin-bottom: 0.85rem;
  }

  .desktop-review-heading h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
  }

  .inbox-split-layout {
    grid-template-columns: 330px 1fr;
    gap: 1.5rem;
  }

  .inbox-queue-column {
    background-color: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.15rem;
    box-shadow: var(--shadow-card);
  }

  #btn-close-review-mobile {
    display: none;
  }

  .surah-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-footer {
    padding: 1rem 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
