:root {
  --color-primary: #0B0B0E;
  --color-primary-dark: #050507;
  --color-accent: #7A0C14;
  --color-accent-soft: #F2D7DA;
  --color-bg: #F5F6F8;
  --color-surface: #FFFFFF;
  --color-border: #E9EAF0;
  --color-text-primary: #1B2740;
  --color-text-secondary: #6B7280;
  --color-text-muted: #9CA3AF;
  --color-success: #1F9D55;
  --color-warning: #C08A00;
  --color-error: #D24A32;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font-base: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 4px 14px rgba(27, 39, 64, 0.06);
  --shadow-md: 0 14px 32px rgba(27, 39, 64, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-base);
  font-weight: 400;
  color: var(--color-text-primary);
  background: var(--color-bg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------------------------------------------------------------------- */
/* Layout                                                                   */
/* ---------------------------------------------------------------------- */

.app-shell {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  position: relative;
}

@media (min-width: 600px) {
  .app-shell {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
    min-height: 100vh;
  }
}

@media (min-width: 900px) {
  :root {
    --space-5: 24px;
    --space-6: 32px;
  }

  body {
    background:
      radial-gradient(circle at 8% 0%, rgba(242, 102, 46, 0.08), transparent 28%),
      var(--color-bg);
  }

  .app-shell {
    max-width: none;
    width: 100%;
    margin: 0;
    box-shadow: none;
  }

  .page {
    min-height: 100vh;
    transition: transform 0.22s ease;
  }

  .page__topbar {
    min-height: 76px;
    padding: 18px 48px;
    margin-left: 0;
    border-bottom: 1px solid rgba(233, 234, 240, 0.8);
    background: rgba(245, 246, 248, 0.88);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .page__topbar-btn {
    display: flex;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
  }

  .page__topbar-wordmark {
    font-size: 16px;
  }

  .page__topbar-avatar {
    width: 42px;
    height: 42px;
  }

  .page__content {
    width: min(1180px, calc(100% - 96px));
    margin-left: max(48px, (100vw - 1180px) / 2);
    margin-right: auto;
    padding: 40px 0 64px;
  }

  .bottom-nav {
    display: none;
  }

  .drawer {
    width: 248px;
    max-width: none;
    transform: translateX(-100%);
    box-shadow: 8px 0 30px rgba(27, 39, 64, 0.08);
  }

  .drawer-overlay {
    display: block;
  }

  .drawer__close {
    display: flex;
  }

  .drawer__header {
    padding: 24px 24px 20px;
  }

  .drawer__item,
  .drawer__logout,
  .page__topbar-btn,
  .btn-primary,
  .btn-secondary,
  .btn-small,
  .link-action,
  .staff-link,
  .bottom-nav__item {
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
  }

  .drawer__item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  .drawer__logout:hover {
    color: #fff;
  }

  .btn-primary:hover,
  .btn-accent:hover {
    opacity: 0.9;
    transform: translateY(-1px);
  }

  .btn-secondary:hover,
  .btn-small:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
  }

  .link-action:hover {
    color: var(--color-primary);
  }

  .hero-card {
    padding: 40px 40px 32px;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .greeting-block__hello {
    font-size: 34px;
  }

  .greeting-block__app {
    max-width: 480px;
    font-size: 14px;
  }

  .section__title {
    font-size: 12px;
  }

  .attendance-card,
  .session-detail,
  .inline-form,
  .empty-state {
    box-shadow: var(--shadow-sm);
  }

  .schedule-item,
  .announcement-card,
  .session-list-item {
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
  }

  .schedule-item:hover,
  .announcement-card:hover,
  .session-list-item:hover {
    border-color: rgba(242, 102, 46, 0.35);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
  }

  #schedule-preview,
  #announcement-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  #schedule-preview > *,
  #announcement-preview > * {
    margin-bottom: 0;
  }

  .form-row {
    gap: 20px;
  }

  .inline-form {
    max-width: 760px;
  }

  .inline-form__actions {
    justify-content: flex-end;
  }

  .inline-form__actions .btn-primary,
  .inline-form__actions .btn-secondary {
    flex: 0 1 180px;
  }

  .toast {
    bottom: 32px;
    max-width: 520px;
  }

  .page--drawer-open {
    transform: translateX(248px);
  }
}

@media (min-width: 1280px) {
  .page__content {
    width: calc(100% - 240px);
    margin-left: 240px;
    margin-right: 0;
    padding-left: 64px;
    padding-right: 64px;
  }

  .hero-card {
    min-height: 280px;
  }
}

/* ---------------------------------------------------------------------- */
/* Login Page                                                               */
/* ---------------------------------------------------------------------- */

.login-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-6) var(--space-5) var(--space-7);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--space-7);
}

.login-brand__logo {
  width: 90px;
  height: 90px;
  border-radius: 24px;
  background: radial-gradient(circle at 30% 20%, #231a1d 0%, #0d0d0f 45%, #07070a 100%);
  border: 2px solid rgba(122, 12, 20, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  box-shadow: 0 10px 24px rgba(122, 12, 20, 0.28);
  overflow: hidden;
  padding: 8px;
}

.brand-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
}

.brand-logo-image--small {
  width: 100%;
  height: 100%;
}

.login-brand__name {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.login-copy {
  text-align: center;
  margin-top: var(--space-6);
}

.login-copy h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--color-text-primary);
}

.login-copy p {
  font-size: 14px;
  color: var(--color-text-secondary);
  max-width: 280px;
  margin: 0 auto;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  padding: 13px var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-google:active {
  transform: scale(0.98);
  background: var(--color-bg);
}

.btn-google img {
  width: 18px;
  height: 18px;
}

.login-footer {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: var(--space-5);
}

/* ---------------------------------------------------------------------- */
/* Loading / Toast                                                          */
/* ---------------------------------------------------------------------- */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(250, 250, 249, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.loading-overlay[hidden] {
  display: none;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-6);
  transform: translateX(-50%) translateY(12px);
  background: var(--color-primary-dark);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
  max-width: 90%;
  text-align: center;
}

.toast.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast--error {
  background: var(--color-error);
}

/* ---------------------------------------------------------------------- */
/* Placeholder dashboard (stage 1 hanya menampilkan hasil login)           */
/* ---------------------------------------------------------------------- */

.placeholder-screen {
  flex: 1;
  padding: var(--space-6) var(--space-5);
}

.placeholder-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.placeholder-header img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.placeholder-header__name {
  font-size: 16px;
  font-weight: 600;
}

.placeholder-header__role {
  font-size: 12.5px;
  color: var(--color-accent);
  font-weight: 600;
  text-transform: capitalize;
}

.info-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}

.info-block__label {
  font-size: 11.5px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.info-block__value {
  font-size: 14.5px;
  color: var(--color-text-primary);
  font-weight: 500;
}

.btn-logout {
  margin-top: var(--space-5);
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-error);
}

/* ---------------------------------------------------------------------- */
/* Bottom Navigation                                                        */
/* ---------------------------------------------------------------------- */

.bottom-nav {
  display: flex;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  position: sticky;
  bottom: 0;
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  color: var(--color-text-muted);
  font-size: 10.5px;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.bottom-nav__item--active {
  color: var(--color-accent);
  font-weight: 600;
}

/* ---------------------------------------------------------------------- */
/* Page shell with bottom nav (halaman utama)                              */
/* ---------------------------------------------------------------------- */

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page__content {
  flex: 1;
  padding: var(--space-5);
  padding-bottom: var(--space-6);
}

.page__content > .section__title {
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--color-primary);
  margin-bottom: var(--space-5);
}

.page__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5) 8px;
  position: relative;
}

.page__topbar-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  flex-shrink: 0;
  padding: 0;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 899px) {
  .page__topbar {
    padding-left: 0;
    padding-right: var(--space-5);
  }

  .page__topbar-btn {
    width: 46px;
    height: 42px;
    border-left: none;
  }

  .page__topbar-wordmark {
    margin-left: auto;
    margin-right: auto;
    transform: translateX(19px);
  }

  .page {
    transition: transform 0.22s ease;
  }

  .page--drawer-open {
    transform: translateX(min(82vw, 320px));
  }
}

.page__topbar-wordmark {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  text-transform: uppercase;
}

.page__topbar-wordmark .slash {
  color: var(--color-accent);
  font-weight: 700;
  margin-left: 2px;
}

.page__topbar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.page__topbar-avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 700;
  border: none;
}

/* ---------------------------------------------------------------------- */
/* Drawer (menu samping) — navigasi lengkap, dibuka dari tombol hamburger  */
/* ---------------------------------------------------------------------- */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 26, 46, 0.45);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.drawer-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 82%;
  max-width: 320px;
  background: var(--color-primary);
  color: #fff;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
  z-index: 90;
  padding-top: env(safe-area-inset-top, 0px);
}

.drawer--open {
  transform: translateX(0);
}

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-5) var(--space-4);
}

.drawer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.drawer__logo {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 20%, #231a1d 0%, #0d0d0f 45%, #07070a 100%);
  border: 1.5px solid rgba(122, 12, 20, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(122, 12, 20, 0.22);
  padding: 4px;
}

.drawer__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.drawer__title .slash {
  color: var(--color-accent);
}

.drawer__close {
  color: rgba(255, 255, 255, 0.65);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
}

.drawer__section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  padding: var(--space-4) var(--space-5) var(--space-2);
}

.drawer__nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--space-3);
}

.drawer__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px var(--space-3);
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}

.drawer__item svg {
  flex-shrink: 0;
}

.drawer__item--active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 600;
  border-left: 3px solid var(--color-accent);
  padding-left: calc(var(--space-3) - 3px);
}

.drawer__footer {
  padding: var(--space-4) var(--space-5) calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer__logout {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 500;
  background: none;
  border: none;
  padding: 0;
  width: 100%;
  text-align: left;
}

/* ---------------------------------------------------------------------- */
/* Dashboard                                                                */
/* ---------------------------------------------------------------------- */

.hero-card {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f4eee8 100%);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: var(--space-6) var(--space-5) var(--space-6);
  margin-bottom: var(--space-5);
  overflow: hidden;
}

.hero-card__blob {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.18) 68%, transparent 72%);
  pointer-events: none;
}

.hero-card__date {
  position: relative;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

.greeting-block {
  position: relative;
  margin: 0 0 var(--space-3);
}

.greeting-block__hello {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary);
}

.greeting-block__hello .accent-dot {
  color: var(--color-accent);
}

.greeting-block__app {
  position: relative;
  font-size: 13.5px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  max-width: 300px;
}

.status-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-4);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-muted);
  flex-shrink: 0;
}

.status-dot--on {
  background: var(--color-success);
}

.section {
  margin-bottom: var(--space-6);
}

.section__title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-6) 0;
}

.attendance-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
  border: 1px solid rgba(24, 52, 58, 0.05);
}

.attendance-card__status-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.attendance-card__status-value {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.attendance-card__status-value--pending {
  color: var(--color-text-primary);
}

.attendance-card__status-value--hadir {
  color: var(--color-success);
}

.attendance-card__status-value--izin {
  color: var(--color-warning);
}

.attendance-card__status-value--sakit {
  color: var(--color-error);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 18px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  font-weight: 600;
  border: none;
  transition: transform 0.1s ease, opacity 0.15s ease;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.btn-accent {
  background: var(--color-accent);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 18px;
  background: transparent;
  color: var(--color-text-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  font-size: 14px;
  font-weight: 600;
}

.staff-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  background: var(--color-accent-soft);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}


#staff-link-container:not(:empty) {
  margin-bottom: var(--space-3);
}

.staff-link span.arrow {
  color: var(--color-accent);
}

/* ---------------------------------------------------------------------- */
/* Empty States (Poin 28)                                                   */
/* ---------------------------------------------------------------------- */

.empty-state {
  padding: 36px var(--space-4);
  text-align: center;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
}

.empty-state__title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--color-text-primary);
}

.empty-state__desc {
  font-size: 12.5px;
  color: var(--color-text-muted);
  max-width: 240px;
  margin: 0 auto;
}

/* ---------------------------------------------------------------------- */
/* Halaman Absensi                                                          */
/* ---------------------------------------------------------------------- */

.session-detail {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6) var(--space-5);
  margin-bottom: var(--space-5);
}

.session-detail__title {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 4px;
}

.session-detail__meta {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.status-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-5) 0;
}

.status-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-text-primary);
  background: var(--color-surface);
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.status-option:active {
  transform: scale(0.985);
}

.status-option--selected {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.status-option__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  flex-shrink: 0;
}

.status-option--selected .status-option__dot {
  border-color: var(--color-accent);
  background: var(--color-accent);
  box-shadow: inset 0 0 0 3px var(--color-surface);
}

.session-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
}

.session-list-item__info h3 {
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 2px;
}

.session-list-item__info p {
  font-size: 12.5px;
  color: var(--color-text-secondary);
}

.result-block {
  text-align: center;
  padding: var(--space-6) var(--space-4);
}

.result-block__check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
}

.result-block__title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.result-block__status-label {
  font-size: 12px;
  color: var(--color-text-muted);
}

.result-block__status-value {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.result-block__time {
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* ---------------------------------------------------------------------- */
/* Kelola Sesi Absensi (Admin/Moderator)                                    */
/* ---------------------------------------------------------------------- */

.form-field {
  margin-bottom: var(--space-4);
}

.form-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.form-field input,
.form-field select {
  width: 100%;
  padding: 11px var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text-primary);
  background: var(--color-surface);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(233, 107, 75, 0.14);
}

.form-row {
  display: flex;
  gap: var(--space-3);
}

.form-row .form-field {
  flex: 1;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge--active {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.badge--closed {
  background: var(--color-border);
  color: var(--color-text-muted);
}

.btn-small {
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-primary);
  flex-shrink: 0;
}

/* ---------------------------------------------------------------------- */
/* Jadwal & Informasi (Tahap 3)                                             */
/* ---------------------------------------------------------------------- */

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.link-action {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
}

.inline-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
}

.inline-form__title {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.inline-form__actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.inline-form__actions .btn-primary,
.inline-form__actions .btn-secondary {
  flex: 1;
}

.form-field textarea {
  width: 100%;
  padding: 11px var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text-primary);
  background: var(--color-surface);
  resize: vertical;
  min-height: 88px;
}

.day-group {
  margin-bottom: var(--space-2);
}

.day-group__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: var(--space-5) 0 var(--space-2);
}

.day-group__label:first-child {
  margin-top: 0;
}

.schedule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  background: var(--color-surface);
  gap: var(--space-3);
}

.schedule-item__title {
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 2px;
}

.schedule-item__meta {
  font-size: 12.5px;
  color: var(--color-text-secondary);
}

.item-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.announcement-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  box-shadow: 0 4px 14px rgba(24, 52, 58, 0.04);
}

.announcement-card__title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.announcement-card__content {
  font-size: 13.5px;
  color: var(--color-text-primary);
  line-height: 1.55;
  margin-bottom: var(--space-3);
  white-space: pre-wrap;
}

.announcement-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.announcement-card__date {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------------- */
/* About Eskul & Struktur Organisasi (Tahap 4)                             */
/* ---------------------------------------------------------------------- */

.about-hero {
  text-align: center;
  padding: var(--space-5) 0 var(--space-6);
}

.about-hero__logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-3);
  overflow: hidden;
}

.about-hero__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-hero__logo span {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 20px;
}

.about-hero__name {
  font-size: 19px;
  font-weight: 700;
}

.about-hero__founded {
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.about-block {
  margin-bottom: var(--space-5);
}

.about-block__label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.about-block__value {
  font-size: 14px;
  color: var(--color-text-primary);
  line-height: 1.6;
  white-space: pre-wrap;
}

.about-contact {
  margin: var(--space-6) 0;
  padding: var(--space-5);
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
  text-align: center;
}

.about-contact__school {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.about-contact__instagram {
  color: #FFD6C5;
  font-size: 13px;
  font-weight: 600;
}

.org-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.org-slot {
  text-align: center;
  padding: var(--space-3) var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.org-slot__photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  margin: 0 auto 8px;
  display: block;
}

.org-slot__photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 18px;
}

.org-slot__name {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
}

.org-slot__position {
  font-size: 10.5px;
  color: var(--color-accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.org-slot__empty-text {
  font-size: 11px;
  color: var(--color-text-muted);
}

.org-slot__edit {
  margin-top: 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 3px 8px;
  display: inline-block;
}

/* Modal sederhana untuk memilih pengisi jabatan */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 70;
  transition: background 0.25s ease;
}

.modal-overlay--visible {
  background: rgba(26, 26, 26, 0.45);
}

.modal-sheet {
  width: 100%;
  max-width: 430px;
  background: var(--color-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-5);
  padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}

.modal-overlay--visible .modal-sheet {
  transform: translateY(0);
}

.modal-sheet__title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.modal-sheet__message {
  font-size: 13.5px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-top: -8px;
  margin-bottom: var(--space-4);
}

.modal-sheet__actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.modal-sheet__actions .btn-primary,
.modal-sheet__actions .btn-secondary {
  flex: 1;
}

.btn-danger {
  background: var(--color-error);
}

/* ---------------------------------------------------------------------- */
/* QR Absensi (member) & Scan QR (staff)                                    */
/* ---------------------------------------------------------------------- */

.qr-block {
  background: var(--color-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  color: #fff;
  box-shadow: var(--shadow-md);
  margin-top: var(--space-5);
}

.qr-block__canvas-wrap {
  background: #fff;
  border-radius: var(--radius-md);
  padding: var(--space-3);
  width: fit-content;
  margin: 0 auto var(--space-4);
}

.qr-block__caption {
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.qr-block__caption strong {
  color: #fff;
}

#attendance-container {
  max-width: 760px;
}

@media (max-width: 430px) {
  .schedule-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .schedule-item .item-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (min-width: 900px) {
  #attendance-container {
    max-width: 920px;
  }

  .session-detail {
    padding: 32px;
  }

  .qr-block {
    max-width: 480px;
  }
}

/* ---------------------------------------------------------------------- */
/* Attendance QR block                                                     */
/* ---------------------------------------------------------------------- */

.qr-block__canvas-wrap canvas,
.qr-block__canvas-wrap img {
  display: block;
  width: 200px;
  height: 200px;
}

.qr-block__caption {
  font-size: 13px;
  line-height: 1.55;
}

.qr-block__caption strong {
  font-weight: 700;
}

.or-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.scanner-frame {
  width: 100%;
  max-width: 320px;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
}

.scan-result-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.scan-result-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.scan-result-card__icon--success {
  background: var(--color-accent-soft);
  color: var(--color-success);
}

.scan-result-card__icon--warning {
  background: var(--color-accent-soft);
  color: var(--color-warning);
}

.scan-result-card__icon--error {
  background: #fdeceb;
  color: var(--color-error);
}

.scan-result-card__name {
  font-size: 14px;
  font-weight: 600;
}

.scan-result-card__desc {
  font-size: 12.5px;
  color: var(--color-text-secondary);
}

.modal-sheet__actions .btn-primary,
.modal-sheet__actions .btn-secondary {
  flex: 1;
}

/* ---------------------------------------------------------------------- */
/* Profil lengkap (Tahap 4)                                                 */
/* ---------------------------------------------------------------------- */

.profile-hero {
  text-align: center;
  padding: var(--space-6) 0 var(--space-5);
}

.profile-hero__photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--color-border);
  margin: 0 auto var(--space-3);
  display: block;
}

.profile-hero__name {
  font-size: 18px;
  font-weight: 700;
}

.profile-hero__email {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

/* ---------------------------------------------------------------------- */
/* Kelola Anggota & Statistik (Tahap 5)                                     */
/* ---------------------------------------------------------------------- */

.filter-row {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.filter-row input[type="text"] {
  flex: 1;
  min-width: 140px;
  padding: 10px var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: inherit;
}

.filter-row select {
  padding: 10px var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: var(--color-surface);
  color: var(--color-text-primary);
}

.member-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}

.member-card__top {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.member-card__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.member-card__name {
  font-size: 14.5px;
  font-weight: 600;
}

.member-card__email {
  font-size: 12px;
  color: var(--color-text-muted);
}

.member-card__meta {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--color-bg);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.tag--role-admin {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.tag--role-moderator {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-color: var(--color-accent-soft);
}

.tag--inactive {
  color: var(--color-error);
  border-color: var(--color-error);
}

.member-card__actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.stat-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  background: var(--color-surface);
}

.stat-card__value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-card__label {
  font-size: 11.5px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.stat-card--total .stat-card__value { color: var(--color-primary); }
.stat-card--hadir .stat-card__value { color: var(--color-success); }
.stat-card--izin .stat-card__value { color: var(--color-warning); }
.stat-card--sakit .stat-card__value { color: var(--color-error); }
.stat-card--belum .stat-card__value { color: var(--color-text-muted); }

.cash-summary .stat-card__value {
  font-size: 20px;
  overflow-wrap: anywhere;
}

.cash-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}

.cash-record:first-child {
  padding-top: 0;
}

.cash-record strong {
  font-size: 13.5px;
}

.cash-record__meta {
  color: var(--color-text-muted);
  font-size: 11.5px;
  margin-top: 3px;
}

.cash-record__side {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: var(--space-2);
  flex-shrink: 0;
}

.cash-record__amount--income {
  color: var(--color-success);
}

.cash-record__amount--expense {
  color: var(--color-error);
}

.documentation-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  background: var(--color-surface);
}

.documentation-card__title {
  font-size: 15px;
  font-weight: 700;
}

.documentation-card__description {
  color: var(--color-text-secondary);
  font-size: 13px;
  margin-top: 5px;
}

.documentation-card__meta {
  color: var(--color-text-muted);
  font-size: 11.5px;
  margin: var(--space-3) 0;
}

.filter-pills {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.filter-pill {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.filter-pill--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.custom-date-row {
  display: none;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.custom-date-row.visible {
  display: flex;
}

.custom-date-row .form-field {
  flex: 1;
  margin-bottom: 0;
}

.app-footer {
  padding: 28px var(--space-5) calc(32px + env(safe-area-inset-bottom, 0px));
  color: var(--color-text-muted);
  font-size: 10.5px;
  line-height: 1.7;
  text-align: center;
  letter-spacing: 0.01em;
}

.app-footer a {
  color: var(--color-accent);
  font-weight: 600;
}

.app-footer__developer {
  margin-top: 5px;
  font-size: 10px;
  opacity: 0.8;
}

.app-footer--login {
  padding-top: 0;
}

@media (min-width: 960px) {
  .app-footer {
    margin-left: 240px;
    padding: 24px 48px 32px;
    text-align: left;
  }

  .app-footer--login {
    margin-left: 0;
    text-align: center;
  }
}

/* Desktop enhancement: mobile remains the default layout. */
.page__topbar-title {
  display: none;
}

@media (min-width: 960px) {
  body {
    background: var(--color-bg);
  }

  .app-shell {
    max-width: none;
    width: 100%;
    margin: 0;
    box-shadow: none;
  }

  .page__topbar {
    min-height: 72px;
    margin-left: 240px;
    padding: 16px 44px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .page__topbar-btn,
  .page__topbar-wordmark {
    display: none;
  }

  .page__topbar-title {
    display: block;
    order: -1;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-primary);
  }

  .page__topbar-avatar {
    width: 40px;
    height: 40px;
  }

  .page__content {
    width: calc(100% - 240px);
    margin-left: 240px;
    margin-right: 0;
    padding: 40px 48px 72px;
  }

  .page__content > .section__title {
    font-size: 28px;
    letter-spacing: -0.02em;
    text-transform: none;
  }

  .drawer {
    width: 240px;
    max-width: none;
    transform: translateX(0);
    background: var(--color-primary);
  }

  .drawer-overlay,
  .drawer__close,
  .bottom-nav {
    display: none;
  }

  .drawer__header {
    padding: 28px 24px 24px;
  }

  .drawer__item--active {
    background: var(--color-accent);
    border-left: 0;
    padding-left: var(--space-3);
  }

  .page__content > .hero-card {
    background: var(--color-accent);
    color: #fff;
    min-height: 250px;
    border-radius: 18px;
    box-shadow: none;
  }

  .hero-card .greeting-block__hello,
  .hero-card .greeting-block__app,
  .hero-card .status-row {
    color: #fff;
  }

  .hero-card .hero-card__date {
    color: #FFF2EB;
  }

  #schedule-preview,
  #announcement-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  #schedule-preview > *,
  #announcement-preview > * {
    margin-bottom: 0;
  }

  #attendance-container {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
    align-items: start;
    gap: 24px;
  }

  #attendance-container > .session-detail {
    grid-column: 1;
    margin-bottom: 0;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  #attendance-container > .qr-block {
    grid-column: 2;
    grid-row: 1;
    max-width: none;
    margin-top: 0;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  #attendance-container > .empty-state {
    grid-column: 1 / -1;
  }

  #attendance-container > .session-list-item {
    margin-bottom: 0;
  }

  #attendance-container:has(> .session-list-item) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #attendance-container:has(> .session-list-item) > .session-list-item {
    grid-column: span 1;
  }

  .status-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .login-screen {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
    grid-template-rows: 1fr auto 1fr;
    padding: 64px clamp(48px, 8vw, 140px);
    background: linear-gradient(90deg, var(--color-accent) 0 50%, var(--color-bg) 50% 100%);
  }

  .login-brand {
    grid-column: 1;
    grid-row: 1 / -1;
    align-self: center;
    justify-self: center;
    margin: 0;
  }

  .login-brand__logo {
    width: 88px;
    height: 88px;
    background: #fff;
  }

  .login-brand__logo span {
    color: var(--color-accent);
  }

  .login-brand__name {
    color: #fff;
  }

  .login-brand__name .slash {
    color: #FFE2D4 !important;
  }

  .login-copy {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    text-align: left;
    margin: 0 0 22px;
    padding: 0 52px;
  }

  .login-copy h1 {
    font-size: 30px;
  }

  .login-copy p {
    max-width: none;
    margin: 0;
  }

  .login-action {
    grid-column: 2;
    grid-row: 2;
    margin: 0 !important;
    padding: 28px 52px 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
  }
}
