/* ==========================================================================
   sebiji.id Mail — Design system baru (Gmail-inspired)
   Dipakai oleh: index.php (mode app + guest) dan login.php
   ========================================================================== */
:root {
  --gm-blue: #1a73e8;
  --gm-blue-hover: #1765cc;
  --gm-blue-dark: #1b66c9;
  --gm-compose-bg: #c2e7ff;
  --gm-compose-hover: #b3d7f5;
  --gm-bg: #f6f8fc;
  --gm-surface: #ffffff;
  --gm-border: #e4e7ea;
  --gm-border-strong: #d3d9df;
  --gm-text: #1f1f1f;
  --gm-text-2: #444746;
  --gm-muted: #5f6368;
  --gm-search-bg: #eaf1fb;
  --gm-hover: rgba(32, 33, 36, 0.06);
  --gm-active-nav: #d3e3fd;
  --gm-unread-dot: #0b57d0;
  --gm-red: #d93025;
  --gm-red-hover: #b3261e;
  --gm-red-light: #fce8e6;
  --gm-green: #188038;
  --gm-green-light: #e6f4ea;
  --gm-green-border: #a8dab5;
  --gm-radius: 16px;
  --gm-radius-sm: 8px;
  --gm-shadow-1: 0 1px 2px rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);
  --gm-shadow-2: 0 1px 3px rgba(60, 64, 67, .3), 0 4px 8px 3px rgba(60, 64, 67, .15);
  --gm-shadow-3: 0 4px 12px rgba(60, 64, 67, .25), 0 8px 24px 4px rgba(60, 64, 67, .15);
  --gm-font: 'Roboto', 'Segoe UI', Arial, -apple-system, sans-serif;
  --gm-mono: 'Consolas', 'Liberation Mono', 'DejaVu Sans Mono', monospace;
  --gm-tr: 0.15s ease;
  --gm-topbar-h: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--gm-bg);
  color: var(--gm-text);
  font-family: var(--gm-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}
[hidden] { display: none !important; }
button { font-family: inherit; }
input { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--gm-blue);
  outline-offset: 2px;
}

@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;
  }
}

/* ==========================================================================
   KOMPONEN BERSAMA
   ========================================================================== */

/* Toast */
.mail-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(16px);
  background: #202124; color: #fff; padding: 12px 20px; border-radius: 8px;
  font-size: 14px; box-shadow: var(--gm-shadow-2); z-index: 400;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  max-width: min(92vw, 480px); text-align: center;
}
.mail-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Modal (dipakai mode guest untuk baca email) */
.mail-modal {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(32, 33, 36, .5);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.mail-modal-card {
  background: var(--gm-surface); border-radius: var(--gm-radius);
  width: 100%; max-width: 760px; max-height: 90vh; overflow: hidden auto;
  box-shadow: var(--gm-shadow-3); display: flex; flex-direction: column;
}
.mail-modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--gm-border);
  position: sticky; top: 0; background: var(--gm-surface); z-index: 2;
}
.mail-modal-back, .mail-modal-close {
  border: 0; background: transparent; cursor: pointer; border-radius: 50%;
  width: 40px; height: 40px; font-size: 20px; color: var(--gm-muted);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mail-modal-back:hover, .mail-modal-close:hover { background: var(--gm-hover); }
.mail-modal-meta { flex: 1; min-width: 0; }
.mail-modal-subject { font-weight: 700; font-size: 16px; word-break: break-word; }
.mail-modal-from { font-size: 12px; color: var(--gm-muted); }
.mail-modal-body { padding: 18px; }

/* Banner OTP (bersama) */
.mail-otp-banner, .a-otp-banner {
  margin: 14px 18px; padding: 16px 18px;
  background: var(--gm-green-light); border: 1px solid var(--gm-green-border);
  border-radius: var(--gm-radius); text-align: center;
}
.a-otp-banner { display: flex; align-items: center; justify-content: space-between; text-align: left; gap: 12px; margin: 0 0 16px; }
.mail-otp-label, .a-otp-label {
  font-size: 11px; font-weight: 600; color: var(--gm-green);
  text-transform: uppercase; letter-spacing: 1px;
}
.mail-otp-code, .a-otp-code {
  font-size: 32px; font-weight: 800; letter-spacing: 6px; color: var(--gm-green);
  margin: 4px 0 10px; font-variant-numeric: tabular-nums; word-break: break-all;
}
.a-otp-code { margin: 2px 0 0; font-size: 26px; }
.mail-otp-copy, .a-otp-copy {
  background: var(--gm-green); color: #fff; border: 0; font-weight: 600;
  padding: 9px 20px; border-radius: 999px; cursor: pointer; font-size: 13px;
  transition: filter var(--gm-tr); flex-shrink: 0;
}
.mail-otp-copy:hover, .a-otp-copy:hover { filter: brightness(1.08); }

/* Isi email */
.mail-text {
  white-space: pre-wrap; word-wrap: break-word;
  font-family: inherit; font-size: 14px; color: var(--gm-text); margin: 0;
}
.mail-frame { width: 100%; border: 0; min-height: 160px; background: #fff; border-radius: var(--gm-radius-sm); }
.message-details { margin-bottom: 14px; border: 1px solid var(--gm-border); border-radius: var(--gm-radius-sm); overflow: hidden; }
.message-detail-row { display: flex; gap: 12px; padding: 8px 12px; font-size: 13px; border-bottom: 1px solid var(--gm-border); }
.message-detail-row:last-child { border-bottom: 0; }
.message-detail-row span { color: var(--gm-muted); width: 96px; flex-shrink: 0; }
.message-detail-row strong { font-weight: 500; word-break: break-word; }
.message-html-preview { margin-top: 14px; }
.message-html-title { font-size: 12px; color: var(--gm-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }

/* Spinner */
@keyframes gm-spin { to { transform: rotate(360deg); } }
.g-empty-spinner, .a-empty-spinner {
  width: 28px; height: 28px; margin: 0 auto 10px;
  border: 3px solid var(--gm-border); border-top-color: var(--gm-blue);
  border-radius: 50%; animation: gm-spin .8s linear infinite;
}

/* ==========================================================================
   MODE GUEST — landing tempmail publik
   ========================================================================== */
.g-topbar {
  height: var(--gm-topbar-h); background: var(--gm-surface);
  border-bottom: 1px solid var(--gm-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; position: sticky; top: 0; z-index: 100;
}
.g-brand { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.g-logo { font-size: 22px; font-weight: 700; color: var(--gm-blue); letter-spacing: -.3px; }
.g-tagline { font-size: 13px; color: var(--gm-muted); }
.g-btn-login {
  color: var(--gm-blue); font-weight: 600; font-size: 14px; text-decoration: none;
  padding: 9px 22px; border-radius: 999px; border: 1px solid var(--gm-border-strong);
  transition: background var(--gm-tr), border-color var(--gm-tr);
}
.g-btn-login:hover { background: #f0f6ff; border-color: var(--gm-blue); }

.g-main { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; }

.g-hero { text-align: center; margin-bottom: 26px; }
.g-hero-title { font-size: clamp(24px, 4vw, 34px); font-weight: 700; margin: 0 0 8px; letter-spacing: -.5px; }
.g-hero-sub { color: var(--gm-muted); font-size: 15px; margin: 0 auto; max-width: 560px; }

.g-addr-card {
  background: var(--gm-surface); border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius); padding: 22px; box-shadow: var(--gm-shadow-1);
  margin-bottom: 22px;
}
.g-addr-label { font-size: 13px; font-weight: 600; color: var(--gm-muted); margin-bottom: 10px; }
.g-addr-row { display: flex; gap: 10px; }
.g-addr-input {
  flex: 1; min-width: 0; background: var(--gm-bg); border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius-sm); padding: 13px 14px;
  font-family: var(--gm-mono); font-size: 15px; color: var(--gm-text); outline: none;
}
.g-addr-input:focus { border-color: var(--gm-blue); background: #fff; }
.g-btn {
  border: 1px solid var(--gm-border-strong); background: var(--gm-surface);
  color: var(--gm-text-2); border-radius: var(--gm-radius-sm); cursor: pointer;
  font-size: 14px; font-weight: 600; padding: 0 16px; min-height: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background var(--gm-tr), box-shadow var(--gm-tr), border-color var(--gm-tr);
  white-space: nowrap;
}
.g-btn:hover { background: var(--gm-bg); box-shadow: var(--gm-shadow-1); }
.g-btn:active { box-shadow: none; }
.g-btn[disabled] { opacity: .55; cursor: default; pointer-events: none; }
.g-btn-primary { background: var(--gm-blue); border-color: var(--gm-blue); color: #fff; }
.g-btn-primary:hover { background: var(--gm-blue-hover); border-color: var(--gm-blue-hover); }
.g-btn-ghost { border-color: transparent; min-height: 38px; padding: 0 12px; color: var(--gm-muted); }
.g-btn-ghost:hover { background: var(--gm-hover); box-shadow: none; }

.g-claim { display: flex; gap: 10px; margin-top: 12px; }
.g-claim-input {
  flex: 1; min-width: 0; border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius-sm); padding: 12px 14px; font-size: 14px; outline: none;
}
.g-claim-input:focus { border-color: var(--gm-blue); box-shadow: 0 0 0 2px rgba(26, 115, 232, .15); }
.g-addr-hint { margin-top: 12px; font-size: 12px; color: var(--gm-muted); }

.g-inbox-card {
  background: var(--gm-surface); border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius); box-shadow: var(--gm-shadow-1); overflow: hidden;
}
.g-inbox-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--gm-border);
}
.g-inbox-head h2 { font-size: 16px; font-weight: 700; margin: 0; }
.g-inbox-tools { display: flex; align-items: center; gap: 10px; }
.g-auto-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--gm-green);
  box-shadow: 0 0 0 3px rgba(24, 128, 56, .18); animation: gm-pulse 2s infinite;
}
@keyframes gm-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(24, 128, 56, .18); }
  50% { box-shadow: 0 0 0 5px rgba(24, 128, 56, .07); }
}

.g-addr-chips {
  display: flex; gap: 8px; padding: 10px 18px; overflow-x: auto;
  border-bottom: 1px solid var(--gm-border); scrollbar-width: thin;
}
.g-chip {
  border: 1px solid var(--gm-border-strong); background: var(--gm-surface);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer;
  font-family: var(--gm-mono); white-space: nowrap; color: var(--gm-text-2);
  transition: background var(--gm-tr), border-color var(--gm-tr);
}
.g-chip:hover { background: var(--gm-bg); }
.g-chip.active { background: var(--gm-active-nav); border-color: transparent; color: var(--gm-blue-dark); font-weight: 600; }
.g-chip .g-chip-count { color: var(--gm-muted); font-family: var(--gm-font); margin-left: 4px; }

.g-inbox-list { min-height: 180px; }
.g-empty { text-align: center; padding: 52px 20px; color: var(--gm-muted); }
.g-empty p { margin: 0 0 6px; font-size: 15px; color: var(--gm-text-2); }
.g-empty small { font-size: 13px; }

.g-item {
  display: flex; gap: 14px; padding: 14px 18px; align-items: flex-start;
  border-bottom: 1px solid var(--gm-border); cursor: pointer;
  transition: background var(--gm-tr);
}
.g-item:last-child { border-bottom: 0; }
.g-item:hover { background: var(--gm-bg); }
.g-item.unseen { background: #f2f7ff; }
.g-item.unseen:hover { background: #eaf2fe; }
.g-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: #fff; background: var(--gm-blue);
}
.g-item-main { flex: 1; min-width: 0; }
.g-item-row1 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.g-item-from { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-item.unseen .g-item-from { font-weight: 700; }
.g-item-time { font-size: 12px; color: var(--gm-muted); white-space: nowrap; flex-shrink: 0; }
.g-item-subject { font-size: 14px; color: var(--gm-text-2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-item.unseen .g-item-subject { color: var(--gm-text); font-weight: 600; }
.g-item-preview { font-size: 13px; color: var(--gm-muted); margin-top: 1px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.g-item-otp {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
  background: var(--gm-green-light); border: 1px solid var(--gm-green-border);
  color: var(--gm-green); font-weight: 700; font-size: 14px; letter-spacing: 2px;
  padding: 3px 10px; border-radius: 6px; cursor: pointer;
}
.g-item-otp i { font-style: normal; font-size: 10px; font-weight: 500; color: var(--gm-muted); letter-spacing: 0; }

.g-footer {
  border-top: 1px solid var(--gm-border); padding: 22px 16px 34px;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  color: var(--gm-muted); font-size: 13px; text-align: center;
}
.g-footer a { color: var(--gm-blue); text-decoration: none; }
.g-footer a:hover { text-decoration: underline; }

/* ==========================================================================
   MODE APP — tampilan ala Gmail (login)
   ========================================================================== */

/* Topbar */
.a-topbar {
  height: var(--gm-topbar-h); background: var(--gm-surface);
  border-bottom: 1px solid var(--gm-border);
  display: flex; align-items: center; gap: 6px; padding: 0 14px 0 8px;
  position: sticky; top: 0; z-index: 200;
}
.a-iconbtn {
  border: 0; background: transparent; color: var(--gm-muted); cursor: pointer;
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--gm-tr);
}
.a-iconbtn:hover { background: var(--gm-hover); color: var(--gm-text-2); }
.a-brand {
  display: flex; align-items: baseline; gap: 6px; text-decoration: none;
  padding: 0 10px 0 4px; flex-shrink: 0;
}
.a-logo { font-size: 22px; font-weight: 700; color: var(--gm-blue); letter-spacing: -.3px; }
.a-brand-sub { font-size: 20px; color: var(--gm-muted); font-weight: 400; }

.a-search {
  flex: 1; max-width: 720px; margin: 0 auto; position: relative;
  display: flex; align-items: center;
}
.a-search-icon { position: absolute; left: 16px; color: var(--gm-muted); pointer-events: none; }
.a-search input {
  width: 100%; height: 46px; border: 0; outline: none;
  background: var(--gm-search-bg); border-radius: 999px;
  padding: 0 20px 0 48px; font-size: 15px; color: var(--gm-text);
  transition: background var(--gm-tr), box-shadow var(--gm-tr);
}
.a-search input::placeholder { color: var(--gm-muted); }
.a-search input:focus { background: var(--gm-surface); box-shadow: var(--gm-shadow-2); }

.a-topbar-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.a-account { position: relative; }
.a-avatar {
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--gm-blue); color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow var(--gm-tr);
}
.a-avatar:hover { box-shadow: var(--gm-shadow-1); }
.a-account-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 240px;
  background: var(--gm-surface); border-radius: var(--gm-radius);
  box-shadow: var(--gm-shadow-3); border: 1px solid var(--gm-border);
  padding: 18px; text-align: center; z-index: 300;
}
.a-account-name { font-weight: 600; font-size: 14px; word-break: break-all; }
.a-account-role { font-size: 12px; color: var(--gm-muted); margin: 2px 0 14px; }
.a-account-logout {
  display: block; border: 1px solid var(--gm-border-strong); border-radius: 999px;
  padding: 9px; color: var(--gm-text-2); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background var(--gm-tr);
}
.a-account-logout:hover { background: var(--gm-bg); }

/* Shell: sidebar + konten */
.a-shell { display: flex; align-items: stretch; min-height: calc(100vh - var(--gm-topbar-h)); }

.a-sidebar {
  width: 256px; flex-shrink: 0; padding: 12px 12px 12px 8px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: var(--gm-topbar-h); height: calc(100vh - var(--gm-topbar-h));
  overflow-y: auto; background: var(--gm-bg);
}
.a-compose {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--gm-compose-bg); color: #001d35;
  border: 0; border-radius: 16px; padding: 0 22px; height: 56px;
  font-size: 15px; font-weight: 600; cursor: pointer; margin: 4px 4px 14px;
  box-shadow: none; transition: box-shadow var(--gm-tr), background var(--gm-tr);
  align-self: flex-start;
}
.a-compose:hover { box-shadow: var(--gm-shadow-1); background: var(--gm-compose-hover); }
.a-compose[disabled] { opacity: .6; cursor: default; pointer-events: none; }

.a-nav { display: flex; flex-direction: column; gap: 1px; }
.a-nav-loading { color: var(--gm-muted); font-size: 13px; padding: 10px 16px; }
.a-nav-empty { color: var(--gm-muted); font-size: 13px; padding: 10px 16px; }
.a-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 0 14px 0 18px; height: 40px; border-radius: 0 999px 999px 0;
  cursor: pointer; color: var(--gm-text-2); font-size: 14px;
  transition: background var(--gm-tr); text-decoration: none;
  border: 0; background: transparent; width: 100%; text-align: left;
}
.a-nav-item:hover { background: var(--gm-hover); }
.a-nav-item.active { background: var(--gm-active-nav); color: var(--gm-blue-dark); font-weight: 700; }
.a-nav-item .a-nav-icon { color: var(--gm-muted); flex-shrink: 0; display: inline-flex; }
.a-nav-item.active .a-nav-icon { color: var(--gm-blue-dark); }
.a-nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-nav-count { font-size: 12px; color: var(--gm-muted); flex-shrink: 0; }
.a-nav-item.active .a-nav-count { color: var(--gm-blue-dark); font-weight: 700; }

.a-sidebar-foot { margin-top: auto; padding: 14px 18px 4px; }
.a-sidebar-foot a { color: var(--gm-muted); font-size: 13px; text-decoration: none; }
.a-sidebar-foot a:hover { color: var(--gm-text); text-decoration: underline; }
.a-sidebar-overlay {
  position: fixed; inset: 0; background: rgba(32, 33, 36, .5); z-index: 190;
}

/* Konten */
.a-content {
  flex: 1; min-width: 0; padding: 0 16px 24px 0;
  display: flex; flex-direction: column;
}
.a-toolbar {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 4px; min-height: 48px;
}
.a-toolbar-addr {
  font-family: var(--gm-mono); font-size: 13px; color: var(--gm-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.a-toolbar-count { margin-left: auto; font-size: 12px; color: var(--gm-muted); white-space: nowrap; }

/* Daftar email (baris ala Gmail) */
.a-list {
  background: var(--gm-surface); border-radius: var(--gm-radius);
  box-shadow: var(--gm-shadow-1); overflow: hidden; flex: 1;
}
.a-empty { text-align: center; padding: 64px 20px; color: var(--gm-muted); }
.a-empty p { margin: 0 0 6px; font-size: 15px; color: var(--gm-text-2); }
.a-empty small { font-size: 13px; }

.a-row {
  display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 16px 0 12px;
  border-bottom: 1px solid #f0f2f5; cursor: pointer; position: relative;
  color: var(--gm-muted); transition: box-shadow var(--gm-tr), background var(--gm-tr);
}
.a-row:last-child { border-bottom: 0; }
.a-row:hover { box-shadow: var(--gm-shadow-1); z-index: 1; background: var(--gm-surface); }
.a-row.unseen { color: var(--gm-text); }
.a-row-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: transparent;
}
.a-row.unseen .a-row-dot { background: var(--gm-unread-dot); }
.a-row-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff; background: var(--gm-blue);
}
.a-row-from {
  width: 180px; flex-shrink: 0; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.a-row.unseen .a-row-from { font-weight: 700; }
.a-row-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.a-row-subject { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; max-width: 40%; }
.a-row.unseen .a-row-subject { font-weight: 700; }
.a-row-preview {
  font-size: 13px; color: var(--gm-muted); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0;
}
.a-row-preview::before { content: '— '; }
.a-row-time { font-size: 12px; flex-shrink: 0; white-space: nowrap; }
.a-row.unseen .a-row-time { color: var(--gm-blue-dark); font-weight: 700; }
.a-row-otp {
  flex-shrink: 0; background: var(--gm-green-light); border: 1px solid var(--gm-green-border);
  color: var(--gm-green); font-weight: 700; font-size: 12px; letter-spacing: 1.5px;
  padding: 2px 8px; border-radius: 6px; cursor: pointer;
}
.a-row-otp:hover { filter: brightness(.97); }

/* Tampilan baca email */
.a-reader { flex: 1; display: flex; flex-direction: column; }
.a-reader-toolbar { display: flex; align-items: center; gap: 4px; padding: 8px 4px; }
.a-reader-subject { font-size: 22px; font-weight: 400; margin: 4px 8px 16px 52px; word-break: break-word; }
.a-otp-banner { margin: 0 8px 16px 52px; }
.a-reader-card {
  background: var(--gm-surface); border-radius: var(--gm-radius);
  box-shadow: var(--gm-shadow-1); overflow: hidden; flex: 1;
}
.a-reader-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  border-bottom: 1px solid var(--gm-border);
}
.a-reader-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px; color: #fff; background: var(--gm-blue);
}
.a-reader-meta { flex: 1; min-width: 0; }
.a-reader-from { font-size: 14px; font-weight: 700; word-break: break-word; }
.a-reader-to { font-size: 12px; color: var(--gm-muted); word-break: break-all; }
.a-reader-time { font-size: 12px; color: var(--gm-muted); flex-shrink: 0; }
.a-reader-body { padding: 20px; }

/* FAB mobile */
.a-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 150;
  width: 56px; height: 56px; border-radius: 16px; border: 0;
  background: var(--gm-compose-bg); color: #001d35; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  box-shadow: var(--gm-shadow-2); transition: box-shadow var(--gm-tr);
}
.a-fab:hover { box-shadow: var(--gm-shadow-3); }

/* ==========================================================================
   LOGIN — ala halaman sign-in Google
   ========================================================================== */
.l-body {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px 16px;
  background: var(--gm-bg);
}
.l-card {
  width: 100%; max-width: 450px; background: var(--gm-surface);
  border-radius: 28px; padding: 44px 40px 36px;
  box-shadow: var(--gm-shadow-1); border: 1px solid var(--gm-border);
}
.l-logo { font-size: 24px; font-weight: 700; color: var(--gm-blue); text-align: center; letter-spacing: -.3px; }
.l-title { font-size: 24px; font-weight: 400; text-align: center; margin: 18px 0 6px; color: var(--gm-text); }
.l-sub { font-size: 15px; color: var(--gm-text-2); text-align: center; margin: 0 0 28px; }
.l-form { display: flex; flex-direction: column; gap: 16px; }
.l-field { position: relative; }
.l-field input {
  width: 100%; height: 56px; border: 1px solid var(--gm-border-strong);
  border-radius: 8px; padding: 0 16px; font-size: 16px; outline: none;
  background: transparent; color: var(--gm-text);
  transition: border-color var(--gm-tr), box-shadow var(--gm-tr);
}
.l-field input:focus { border-color: var(--gm-blue); box-shadow: inset 0 0 0 1px var(--gm-blue); }
.l-field input::placeholder { color: var(--gm-muted); }
.l-error {
  display: flex; align-items: center; gap: 8px;
  color: var(--gm-red); font-size: 13px; margin-top: -6px;
}
.l-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.l-guest-link { color: var(--gm-blue); font-size: 14px; font-weight: 600; text-decoration: none; padding: 8px 0; }
.l-guest-link:hover { text-decoration: underline; }
.l-submit {
  background: var(--gm-blue); color: #fff; border: 0; border-radius: 999px;
  height: 44px; padding: 0 28px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background var(--gm-tr), box-shadow var(--gm-tr);
}
.l-submit:hover { background: var(--gm-blue-hover); box-shadow: var(--gm-shadow-1); }
.l-foot { margin-top: 26px; font-size: 12px; color: var(--gm-muted); text-align: center; }
.l-back { margin-top: 18px; text-align: center; }
.l-back a { color: var(--gm-muted); font-size: 13px; text-decoration: none; }
.l-back a:hover { color: var(--gm-blue); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1023px) {
  .a-sidebar {
    position: fixed; left: 0; top: 0; z-index: 195; height: 100vh;
    width: 280px; background: var(--gm-surface);
    transform: translateX(-100%); transition: transform .2s ease;
    box-shadow: none; padding-top: 16px;
  }
  .a-sidebar.open { transform: translateX(0); box-shadow: var(--gm-shadow-3); }
  .a-content { padding: 0 12px 20px; }
  .a-row-from { width: 120px; }
}

@media (min-width: 1024px) {
  .a-hamburger { display: none; }
  .a-sidebar-overlay { display: none !important; }
}

@media (max-width: 767px) {
  :root { --gm-topbar-h: 56px; }
  .a-brand-sub { display: none; }
  .a-logo { font-size: 20px; }
  .a-search input { height: 40px; font-size: 14px; }
  .a-fab { display: inline-flex; }
  .a-toolbar-addr { font-size: 12px; }
  .a-row { height: 56px; flex-wrap: nowrap; gap: 10px; padding: 0 12px 0 10px; }
  .a-row-avatar { width: 28px; height: 28px; font-size: 12px; }
  .a-row-from { width: 96px; font-size: 13px; }
  .a-row-subject { font-size: 13px; max-width: 34%; }
  .a-row-preview { display: none; }
  .a-row-time { font-size: 11px; }
  .a-reader-subject { font-size: 18px; margin-left: 8px; }
  .a-otp-banner { margin-left: 8px; margin-right: 8px; flex-direction: column; align-items: stretch; text-align: center; }
  .a-otp-copy { width: 100%; }

  /* Guest mobile */
  .g-main { padding: 20px 12px 48px; }
  .g-addr-card { padding: 16px; }
  .g-addr-row { flex-wrap: wrap; }
  .g-addr-input { flex: 1 1 100%; }
  .g-btn { flex: 1; min-height: 44px; }
  .g-claim { flex-direction: column; }
  .g-claim .g-btn { width: 100%; }
  .g-tagline { display: none; }
  .g-item { padding: 12px 14px; gap: 10px; }
  .g-avatar { width: 34px; height: 34px; font-size: 14px; }

  .l-card { padding: 36px 24px 28px; border-radius: 20px; }
}
