/* =====================================================================
   GidAccess Mail - layout and components on top of DashLite
   ===================================================================== */
:root {
    --gm-accent: #6576ff;
    --gm-accent-soft: color-mix(in srgb, var(--gm-accent) 12%, transparent);
    --gm-accent-softer: color-mix(in srgb, var(--gm-accent) 6%, transparent);
    --gm-bg: #f3f5fb;
    --gm-surface: #ffffff;
    --gm-raised: #ffffff;
    --gm-read: #f8f9fc;
    --gm-border: #e5e9f2;
    --gm-line: #edf0f6;
    --gm-text: #3c4d62;
    --gm-strong: #1c2b46;
    --gm-muted: #8094ae;
    --gm-hover: #eef1f8;
    --gm-search: #e8ecf6;
    --gm-star: #f4bd0e;
    --gm-danger: #e85347;
    --gm-success: #1ee0ac;
    --gm-shadow: 0 1px 3px rgba(28, 43, 70, .06), 0 1px 2px rgba(28, 43, 70, .04);
    --gm-shadow-lg: 0 16px 48px -8px rgba(28, 43, 70, .28), 0 4px 12px rgba(28, 43, 70, .08);
    --gm-header-h: 64px;
    --gm-nav-w: 256px;
    --gm-row-h: 52px;
    --gm-radius: 16px;
}
body.dark-mode {
    --gm-bg: #0b1119;
    --gm-surface: #111a25;
    --gm-raised: #172231;
    --gm-read: #0f1720;
    --gm-border: #223349;
    --gm-line: #1b2a3c;
    --gm-text: #b6c6e3;
    --gm-strong: #f1f4fb;
    --gm-muted: #7286a3;
    --gm-hover: #1a2737;
    --gm-search: #18263a;
    --gm-shadow: 0 1px 3px rgba(0, 0, 0, .4);
    --gm-shadow-lg: 0 16px 48px -8px rgba(0, 0, 0, .7), 0 4px 12px rgba(0, 0, 0, .4);
}
body.gm-compact { --gm-row-h: 40px; }

html, body.gm-app { height: 100%; }
body.gm-app { background: var(--gm-bg); color: var(--gm-text); overflow: hidden; -webkit-tap-highlight-color: transparent; }
.gm-app [hidden] { display: none !important; }
.gm-app :focus-visible { outline: 2px solid var(--gm-accent); outline-offset: 1px; }
.gm-app .gm-search > input:focus-visible, .gm-app .tagify__input:focus-visible, .gm-app #cSubject:focus-visible, .gm-app .ql-editor:focus-visible { outline: none; }
body.dark-mode { color-scheme: dark; }

/* ---------- generic buttons ---------- */
.gm-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: transparent; color: var(--gm-muted); font-size: 1.2rem; cursor: pointer; flex: none; transition: background .15s, color .15s; }
.gm-icon-btn:hover { background: var(--gm-hover); color: var(--gm-strong); }
.gm-icon-btn:active { background: var(--gm-accent-soft); }
.gm-icon-btn.disabled, .gm-icon-btn:disabled { opacity: .35; pointer-events: none; }
.gm-icon-btn-sm { width: 32px; height: 32px; font-size: 1.05rem; }
.gm-icon-btn-xs { width: 22px; height: 28px; font-size: .8rem; border-radius: 6px; }
.gm-divider { width: 1px; height: 22px; background: var(--gm-border); margin: 0 6px; flex: none; }

/* ---------- shell ---------- */
.gm-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.gm-header { height: var(--gm-header-h); flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 16px; position: relative; z-index: 30; }
.gm-body { flex: 1; display: flex; min-height: 0; }

/* logo */
.gm-logo { display: inline-flex; align-items: center; gap: .6rem; font-family: Nunito, sans-serif; font-size: 1.25rem; color: var(--gm-strong);
    text-decoration: none; white-space: nowrap; width: calc(var(--gm-nav-w) - 24px); flex: none; }
.gm-logo:hover { color: var(--gm-strong); }
.gm-logo b { color: var(--gm-accent); font-weight: 800; }
.gm-logo-light, .gm-logo-light:hover { color: #fff; }
.gm-logo-light b { color: #c4cefe; }

/* search */
.gm-search { position: relative; flex: 1; max-width: 760px; height: 48px; display: flex; align-items: center; background: var(--gm-search);
    border-radius: 24px; transition: background .2s, box-shadow .2s; }
.gm-search:focus-within, .gm-search.panel-open { background: var(--gm-surface); box-shadow: 0 1px 6px rgba(28, 43, 70, .18); }
.gm-search-icon { position: absolute; left: 18px; font-size: 1.15rem; color: var(--gm-muted); pointer-events: none; }
.gm-search > input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0 8px 0 52px; color: var(--gm-strong); font-size: .95rem; outline: none; }
.gm-search > input::placeholder { color: var(--gm-muted); }
.gm-search > input::-webkit-search-cancel-button { display: none; }
.gm-search-clear, .gm-search-opts, .gm-search-back { border: 0; background: transparent; color: var(--gm-muted); width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; flex: none; }
.gm-search-clear:hover, .gm-search-opts:hover, .gm-search-back:hover { background: var(--gm-hover); color: var(--gm-strong); }
.gm-search-opts { margin-right: 4px; }
.gm-search-back { display: none; }
.gm-search-panel { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--gm-raised); border-radius: 12px; box-shadow: var(--gm-shadow-lg);
    padding: 20px; z-index: 40; border: 1px solid var(--gm-border); }
.gm-search-panel .form-label { font-size: .8rem; margin-bottom: .25rem; }
.gm-search-panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

/* header tools / account */
.gm-header-tools { margin-left: auto; display: flex; align-items: center; gap: 2px; padding-left: 8px; }
.gm-me { display: inline-flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 4px 8px 4px 4px; border-radius: 24px; color: var(--gm-text); margin-left: 4px; }
.gm-me:hover { background: var(--gm-hover); }
.gm-me-text { flex-direction: column; align-items: flex-start; line-height: 1.2; text-align: left; }
.gm-me-name { font-weight: 600; color: var(--gm-strong); font-size: .875rem; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-me-company { font-size: .75rem; color: var(--gm-muted); }
.gm-me-menu { width: 300px; padding: 0; border-radius: 14px; overflow: hidden; }
.gm-me-card { text-align: center; padding: 22px 16px 14px; background: var(--gm-accent-softer); }
.gm-me-card .gm-me-name { max-width: none; font-size: 1rem; margin-top: 10px; }
.gm-me-email { color: var(--gm-muted); font-size: .85rem; word-break: break-all; }
.gm-me-quota { padding: 10px 20px 0; font-size: .8rem; color: var(--gm-muted); }
.gm-me-quota:empty { display: none; }
.gm-me-menu .link-list { padding: 8px 0; }
.gm-me-menu .link-list a { padding: .55rem 1.25rem; }
.gm-me-foot { border-top: 1px solid var(--gm-border); }

/* avatars */
.gm-avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: #fff;
    font-weight: 600; font-size: .8rem; flex: none; text-transform: uppercase; letter-spacing: .02em; user-select: none; position: relative; }
.gm-avatar-sm { width: 34px; height: 34px; font-size: .78rem; }
.gm-avatar-lg { width: 64px; height: 64px; font-size: 1.35rem; }
.gm-avatar-md { width: 42px; height: 42px; font-size: .9rem; }
.gm-c0 { background: #6576ff; } .gm-c1 { background: #09c2de; } .gm-c2 { background: #1ee0ac; } .gm-c3 { background: #f4bd0e; }
.gm-c4 { background: #e85347; } .gm-c5 { background: #816bff; } .gm-c6 { background: #ff63a5; } .gm-c7 { background: #ffa353; }
.gm-c8 { background: #20c997; } .gm-c9 { background: #2263b3; } .gm-c10 { background: #559bfb; } .gm-c11 { background: #0fac81; }

/* ---------- nav ---------- */
.gm-nav { width: var(--gm-nav-w); flex: none; display: flex; flex-direction: column; padding: 4px 12px 12px 8px; min-height: 0; }
.gm-nav-top { padding: 4px 0 14px 4px; }
.gm-compose-btn { display: inline-flex; align-items: center; gap: 12px; height: 56px; padding: 0 26px 0 20px; border: 0; border-radius: 18px;
    background: var(--gm-surface); color: var(--gm-strong); font-weight: 600; font-size: .95rem; box-shadow: 0 1px 3px rgba(28, 43, 70, .15), 0 4px 10px rgba(28, 43, 70, .06);
    transition: box-shadow .2s, transform .1s; }
.gm-compose-btn .icon { font-size: 1.35rem; color: var(--gm-accent); }
.gm-compose-btn:hover { box-shadow: 0 2px 6px rgba(28, 43, 70, .2), 0 8px 18px rgba(28, 43, 70, .1); }
.gm-compose-btn:active { transform: scale(.98); }
body.dark-mode .gm-compose-btn { background: var(--gm-raised); }
.gm-nav-scroll { flex: 1; overflow-y: auto; min-height: 0; margin-right: -4px; padding-right: 4px; scrollbar-width: thin; }
.gm-folders { list-style: none; margin: 0; padding: 0; }
.gm-folder { display: flex; align-items: center; gap: 14px; height: 36px; padding: 0 8px 0 18px; border-radius: 0 18px 18px 0; margin-left: -8px;
    color: var(--gm-text); font-size: .9rem; cursor: pointer; position: relative; text-decoration: none; transition: background .12s; }
.gm-folder:hover { background: var(--gm-hover); color: var(--gm-strong); }
.gm-folder .icon { font-size: 1.15rem; width: 20px; text-align: center; color: var(--gm-muted); }
.gm-folder-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-folder-count { font-size: .78rem; font-weight: 700; color: var(--gm-strong); }
.gm-folder.active { background: var(--gm-accent-soft); color: var(--gm-accent); font-weight: 700; }
.gm-folder.active .icon, .gm-folder.active .gm-folder-count { color: var(--gm-accent); }
.gm-folder.has-unread .gm-folder-name { font-weight: 700; color: var(--gm-strong); }
.gm-folder.active.has-unread .gm-folder-name { color: var(--gm-accent); }
.gm-folder.drop-ok { background: var(--gm-accent-soft); box-shadow: inset 0 0 0 2px var(--gm-accent); }
.gm-folder-menu { opacity: 0; width: 28px; height: 28px; font-size: 1rem; }
.gm-folder:hover .gm-folder-menu, .gm-folder .show.gm-folder-menu, .gm-folder-menu[aria-expanded="true"] { opacity: 1; }
.gm-nav-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 4px 6px 10px; font-size: .78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em; color: var(--gm-muted); }
.gm-nav-empty { font-size: .8rem; padding: 2px 10px; }
.gm-storage { margin: 12px 4px 0; padding: 14px; border-radius: 12px; background: var(--gm-surface); box-shadow: var(--gm-shadow); font-size: .8rem; }
body.dark-mode .gm-storage { background: var(--gm-raised); }
.gm-storage-head { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--gm-strong); margin-bottom: 8px; }
.gm-storage .progress { height: 6px; border-radius: 3px; background: var(--gm-line); }
.gm-storage .progress-bar { background: var(--gm-accent); border-radius: 3px; }
.gm-storage .progress-bar.warn { background: #f4bd0e; }
.gm-storage .progress-bar.full { background: var(--gm-danger); }
.gm-storage-text { color: var(--gm-muted); margin-top: 6px; }
.gm-nav-overlay { display: none; }

/* ---------- main card ---------- */
.gm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; background: var(--gm-surface);
    border-radius: var(--gm-radius) var(--gm-radius) 0 0; margin-right: 16px; box-shadow: var(--gm-shadow); }

.gm-toolbar { height: 52px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px 0 12px; border-bottom: 1px solid var(--gm-line); }
.gm-toolbar-left, .gm-toolbar-right, .gm-tools-idle, .gm-tools-bulk { display: flex; align-items: center; gap: 2px; min-width: 0; }
.gm-select-all { display: flex; align-items: center; margin-right: 4px; }
.gm-sel-count { font-size: .85rem; font-weight: 600; color: var(--gm-strong); padding: 0 8px 0 2px; white-space: nowrap; }
.gm-range { font-size: .8rem; color: var(--gm-muted); padding: 0 8px; white-space: nowrap; }

.gm-chips { display: flex; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--gm-line); overflow-x: auto; flex: none; scrollbar-width: none; }
.gm-chips::-webkit-scrollbar { display: none; }
.gm-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 16px; border: 1px solid var(--gm-border);
    background: transparent; color: var(--gm-text); font-size: .82rem; font-weight: 500; white-space: nowrap; transition: all .15s; }
.gm-chip .icon { font-size: .95rem; color: var(--gm-muted); }
.gm-chip:hover { background: var(--gm-hover); }
.gm-chip.active { background: var(--gm-accent-soft); border-color: transparent; color: var(--gm-accent); font-weight: 600; }
.gm-chip.active .icon { color: var(--gm-accent); }

.gm-banner { flex: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 20px; font-size: .85rem; color: var(--gm-text);
    background: var(--gm-accent-softer); border-bottom: 1px solid var(--gm-line); }
.gm-banner .icon { font-size: 1.1rem; color: var(--gm-accent); }
.gm-banner a { font-weight: 600; }

/* ---------- list rows ---------- */
.gm-list { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; scrollbar-width: thin; }
.gm-row { position: relative; display: flex; align-items: center; gap: 4px; height: var(--gm-row-h); padding: 0 12px 0 10px; cursor: pointer;
    border-bottom: 1px solid var(--gm-line); background: var(--gm-read); color: var(--gm-text); transition: background .1s, opacity .25s, transform .25s; }
.gm-row.unread { background: var(--gm-surface); color: var(--gm-strong); }
.gm-row:hover { box-shadow: inset 1px 0 0 var(--gm-border), inset -1px 0 0 var(--gm-border), 0 1px 3px rgba(28, 43, 70, .12); z-index: 1; }
.gm-row.selected { background: var(--gm-accent-soft); }
.gm-row.cursor::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gm-accent); }
.gm-row.leaving { opacity: 0; transform: translateX(24px); }
.gm-row.dragging { opacity: .5; }
.gm-check { width: 18px; height: 18px; margin: 0; accent-color: var(--gm-accent); cursor: pointer; flex: none; }
.gm-row-check, .gm-check-wrap { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; flex: none; margin: 0; cursor: pointer; border-radius: 50%; }
.gm-row-check:hover, .gm-check-wrap:hover { background: var(--gm-hover); }
.gm-row-star { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; border-radius: 50%;
    color: #c4cad6; font-size: 1.1rem; flex: none; }
.gm-row-star:hover { background: var(--gm-hover); color: var(--gm-muted); }
.gm-row-star.on { color: var(--gm-star); }
.gm-row .gm-avatar { width: 32px; height: 32px; font-size: .72rem; margin: 0 8px 0 4px; }
.gm-row-avatar-wrap { position: relative; flex: none; }
.gm-row-from { width: 200px; flex: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; padding-right: 12px; }
.gm-row.unread .gm-row-from, .gm-row.unread .gm-row-subject { font-weight: 700; }
.gm-row-draft { color: var(--gm-danger); }
.gm-row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; font-size: .9rem; }
.gm-row-subject { overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.gm-row-snippet { color: var(--gm-muted); overflow: hidden; text-overflow: ellipsis; flex: 1 1 0; min-width: 0; font-weight: 400; }
.gm-no-snippets .gm-row-snippet { display: none; }
.gm-row-tags { display: inline-flex; gap: 4px; flex: none; }
.gm-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: .7rem; font-weight: 600; background: var(--gm-line); color: var(--gm-muted); }
.gm-tag-danger { background: #fde3e1; color: #c0392b; }
body.dark-mode .gm-tag-danger { background: #3a1c1c; color: #ff8a80; }
.gm-row-meta { flex: none; display: flex; align-items: center; gap: 8px; padding-left: 12px; font-size: .8rem; color: var(--gm-muted); min-width: 72px; justify-content: flex-end; }
.gm-row.unread .gm-row-date { color: var(--gm-strong); font-weight: 700; }
.gm-row-meta .icon { font-size: 1rem; }
.gm-row-actions { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: none; gap: 2px; background: inherit; padding-left: 8px; }
.gm-row-actions .gm-icon-btn { width: 34px; height: 34px; font-size: 1.05rem; }
.gm-row:hover .gm-row-actions { display: flex; }
.gm-row:hover .gm-row-meta { visibility: hidden; }
@media (hover: none) { .gm-row:hover .gm-row-actions { display: none; } .gm-row:hover .gm-row-meta { visibility: visible; } }
.gm-row-icons { display: inline-flex; gap: 4px; align-items: center; }
.gm-compact .gm-row .gm-avatar { display: none; }
.gm-compact .gm-row { font-size: .85rem; }

/* skeleton */
.gm-skel { display: flex; align-items: center; gap: 14px; height: var(--gm-row-h); padding: 0 22px; border-bottom: 1px solid var(--gm-line); }
.gm-skel span { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--gm-line) 25%, var(--gm-hover) 50%, var(--gm-line) 75%);
    background-size: 200% 100%; animation: gm-shimmer 1.2s infinite linear; }
.gm-skel .s-dot { width: 32px; height: 32px; border-radius: 50%; flex: none; }
@keyframes gm-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* empty */
.gm-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 24px; color: var(--gm-muted); text-align: center; min-height: 100%; }
.gm-empty-art { width: 96px; height: 96px; border-radius: 50%; background: var(--gm-accent-softer); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.gm-empty-art .icon { font-size: 2.6rem; color: var(--gm-accent); }
.gm-empty h6 { color: var(--gm-strong); margin-bottom: 4px; }
.gm-empty p { margin: 0; max-width: 320px; }

/* ---------- reading pane ---------- */
.gm-view { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: var(--gm-surface); animation: gm-in .18s ease-out; }
@keyframes gm-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.gm-view-scroll { flex: 1; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.gm-msg { max-width: 1100px; padding: 20px 28px 32px 28px; }
.gm-msg-subject { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; padding-left: 58px; }
.gm-msg-subject h3 { font-size: 1.4rem; font-weight: 500; color: var(--gm-strong); margin: 0; line-height: 1.35; word-break: break-word; flex: 1; font-family: Roboto, sans-serif; }
.gm-msg-subject .gm-tag { margin-top: 6px; height: 22px; }
.gm-msg-head { display: flex; align-items: flex-start; gap: 16px; }
.gm-msg-head .gm-avatar { width: 42px; height: 42px; font-size: .9rem; }
.gm-msg-who { flex: 1; min-width: 0; }
.gm-msg-from { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; }
.gm-msg-from b { color: var(--gm-strong); font-size: .95rem; }
.gm-msg-from .gm-addr { color: var(--gm-muted); font-size: .8rem; word-break: break-all; }
.gm-verified { color: #0fac81; font-size: .95rem; }
.gm-msg-to { font-size: .8rem; color: var(--gm-muted); display: inline-flex; align-items: center; gap: 2px; border: 0; background: transparent; padding: 0; }
.gm-msg-to:hover { color: var(--gm-strong); }
.gm-msg-details { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--gm-border); border-radius: 10px; font-size: .8rem; display: grid;
    grid-template-columns: max-content 1fr; gap: 4px 14px; max-width: 640px; }
.gm-msg-details dt { color: var(--gm-muted); font-weight: 400; text-align: right; }
.gm-msg-details dd { margin: 0; color: var(--gm-strong); word-break: break-word; }
.gm-msg-side { display: flex; align-items: center; gap: 2px; flex: none; color: var(--gm-muted); font-size: .8rem; }
.gm-msg-date { white-space: nowrap; margin-right: 6px; }
.gm-msg-star.on { color: var(--gm-star); }
.gm-msg-body { margin-top: 16px; padding-left: 58px; }
.gm-msg-body .gm-alert { margin-left: 0; }
.gm-alert { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: 10px; font-size: .85rem; margin: 0 0 14px 58px; }
.gm-alert .icon { font-size: 1.15rem; margin-top: 1px; }
.gm-alert-info { background: var(--gm-accent-softer); color: var(--gm-text); }
.gm-alert-info .icon { color: var(--gm-accent); }
.gm-alert-warn { background: #fff7e0; color: #7a5b00; }
.gm-alert-warn .icon { color: #f4bd0e; }
.gm-alert-danger { background: #fdecea; color: #a1281e; }
.gm-alert-danger .icon { color: var(--gm-danger); }
body.dark-mode .gm-alert-warn { background: #2e2710; color: #f3d77b; }
body.dark-mode .gm-alert-danger { background: #351818; color: #ff9d94; }
.gm-alert a { font-weight: 600; text-decoration: underline; cursor: pointer; }
.gm-frame { display: block; width: 100%; border: 0; min-height: 60px; background: #fff; border-radius: 6px; }
body.dark-mode .gm-frame-wrap { background: #fff; border-radius: 8px; padding: 12px; }
.gm-atts { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--gm-line); }
.gm-atts-head { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--gm-muted); margin-bottom: 12px; }
.gm-atts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.gm-att { position: relative; border: 1px solid var(--gm-border); border-radius: 10px; overflow: hidden; background: var(--gm-surface); transition: box-shadow .15s; }
.gm-att:hover { box-shadow: 0 3px 12px rgba(28, 43, 70, .12); }
.gm-att-thumb { height: 104px; display: flex; align-items: center; justify-content: center; background: var(--gm-read); cursor: pointer; }
.gm-att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gm-att-thumb .icon { font-size: 2.4rem; }
.gm-att-info { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.gm-att-info > div { flex: 1; min-width: 0; }
.gm-att-name { font-size: .8rem; font-weight: 600; color: var(--gm-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-att-size { font-size: .72rem; color: var(--gm-muted); }
.gm-att .gm-icon-btn { width: 32px; height: 32px; font-size: 1rem; }
.gm-ft-pdf { color: #e85347; } .gm-ft-doc { color: #2b7cd3; } .gm-ft-xls { color: #1d9b5f; } .gm-ft-ppt { color: #d35230; }
.gm-ft-zip { color: #b78a00; } .gm-ft-img { color: #816bff; } .gm-ft-other { color: var(--gm-muted); }
.gm-reply-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; padding-left: 58px; }
.gm-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 20px 0 16px; border-radius: 20px; border: 1px solid var(--gm-border);
    background: var(--gm-surface); color: var(--gm-text); font-weight: 500; font-size: .875rem; transition: background .15s, box-shadow .15s; }
.gm-pill:hover { background: var(--gm-hover); box-shadow: var(--gm-shadow); color: var(--gm-strong); }
.gm-pill .icon { font-size: 1.1rem; }

/* ---------- compose window ---------- */
.gm-compose { position: fixed; right: 24px; bottom: 0; z-index: 1040; width: 600px; height: min(640px, calc(100dvh - 72px)); display: flex; flex-direction: column;
    background: var(--gm-raised); border-radius: 12px 12px 0 0; box-shadow: var(--gm-shadow-lg); overflow: hidden; animation: gm-up .2s ease-out; }
@keyframes gm-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.gm-compose-head { display: flex; align-items: center; gap: 2px; height: 44px; padding: 0 6px 0 16px; background: #1c2b46; color: #fff; flex: none; cursor: pointer; user-select: none; }
body.dark-mode .gm-compose-head { background: #0b1119; }
.gm-compose-title { font-weight: 600; font-size: .9rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-compose-state { font-size: .75rem; color: rgba(255, 255, 255, .6); margin-right: 6px; white-space: nowrap; }
.gm-compose-head .gm-icon-btn { color: rgba(255, 255, 255, .75); }
.gm-compose-head .gm-icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.gm-compose-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; position: relative; }
.gm-field { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 2px 16px; border-bottom: 1px solid var(--gm-line); flex: none; }
.gm-field > label { width: 40px; flex: none; margin: 0; color: var(--gm-muted); font-size: .85rem; }
.gm-field-from span { font-size: .85rem; color: var(--gm-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-field > input, .gm-field .tagify { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--gm-strong); font-size: .9rem; outline: none; padding: 6px 0; }
#cSubject { font-weight: 500; }
.gm-field-links { display: flex; gap: 10px; flex: none; }
.gm-field-links a { font-size: .85rem; color: var(--gm-muted); }
.gm-field-links a:hover { color: var(--gm-accent); text-decoration: underline; }
.gm-field .tagify { --tags-border-color: transparent; --tags-hover-border-color: transparent; --tags-focus-border-color: transparent; --tag-bg: var(--gm-hover);
    --tag-hover: var(--gm-accent-soft); --tag-text-color: var(--gm-strong); --tag-pad: .25em .55em; --tag-inset-shadow-size: 1.3em; --tag-remove-btn-color: var(--gm-muted);
    --input-color: var(--gm-strong); padding: 2px 0; }
.gm-field .tagify__tag > div { border-radius: 14px; }
.gm-field .tagify__tag > div::before { border-radius: 14px; }
.gm-field .tagify__input { margin: 4px 2px; }
.gm-field .tagify__input::before { color: var(--gm-muted); }
.tagify__tag.tagify--notAllowed > div::before { box-shadow: 0 0 0 1.3em #fde3e1 inset !important; }
.tagify__dropdown { z-index: 1100; }
.tagify__dropdown__wrapper { border-radius: 10px; border: 1px solid var(--gm-border); box-shadow: var(--gm-shadow-lg); background: var(--gm-raised); }
.tagify__dropdown__item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin: 2px 4px; border-radius: 8px; color: var(--gm-text); }
.tagify__dropdown__item--active { background: var(--gm-accent-soft); color: var(--gm-strong); }
.gm-sug b { display: block; font-size: .85rem; color: var(--gm-strong); font-weight: 600; line-height: 1.2; }
.gm-sug small { display: block; color: var(--gm-muted); font-size: .78rem; }
.gm-sug .gm-avatar { width: 30px; height: 30px; font-size: .7rem; }
.gm-editor-wrap { flex: 1; display: flex; flex-direction: column; min-height: 180px; }
.gm-editor-wrap .ql-toolbar.ql-snow { order: 2; border: 0; border-top: 1px solid var(--gm-line); padding: 6px 10px; display: flex; flex-wrap: wrap; }
.gm-editor-wrap .ql-container.ql-snow { order: 1; border: 0; flex: 1; font-size: .92rem; font-family: Roboto, Arial, sans-serif; min-height: 160px; }
.gm-editor-wrap .ql-editor { padding: 14px 16px; color: var(--gm-strong); line-height: 1.6; }
.gm-editor-wrap .ql-editor.ql-blank::before { color: var(--gm-muted); font-style: normal; left: 16px; }
.gm-editor-wrap .ql-editor blockquote { border-left: 3px solid var(--gm-border); padding-left: 12px; color: var(--gm-muted); margin: 6px 0; }
body.dark-mode .ql-snow .ql-stroke { stroke: var(--gm-text); }
body.dark-mode .ql-snow .ql-fill { fill: var(--gm-text); }
body.dark-mode .ql-snow .ql-picker { color: var(--gm-text); }
body.dark-mode .ql-snow .ql-picker-options { background: var(--gm-raised); }
.gm-files { list-style: none; margin: 0; padding: 4px 16px 8px; display: flex; flex-wrap: wrap; gap: 8px; flex: none; }
.gm-files:empty { display: none; }
.gm-files li { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; height: 34px; padding: 0 6px 0 10px; border-radius: 8px; background: var(--gm-hover);
    font-size: .8rem; color: var(--gm-strong); }
.gm-files li .icon { font-size: 1rem; }
.gm-fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; font-weight: 500; }
.gm-fsize { color: var(--gm-muted); }
.gm-files .gm-icon-btn { width: 24px; height: 24px; font-size: .85rem; }
.gm-drop { position: absolute; inset: 8px; border: 2px dashed var(--gm-accent); border-radius: 12px; background: color-mix(in srgb, var(--gm-raised) 88%, transparent);
    display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--gm-accent); font-weight: 600; z-index: 5; pointer-events: none; }
.gm-drop .icon { font-size: 2.4rem; }
.gm-compose.dragover .gm-drop { display: flex; }
.gm-compose-foot { display: flex; align-items: center; gap: 4px; padding: 10px 12px 12px 16px; border-top: 1px solid var(--gm-line); flex: none; }
.gm-send-group .btn:first-child { border-radius: 20px 0 0 20px; padding-left: 22px; padding-right: 18px; font-weight: 600; }
.gm-send-group .dropdown-toggle-split { border-radius: 0 20px 20px 0; padding-left: 8px; padding-right: 10px; border-left: 1px solid rgba(255, 255, 255, .25); }
.gm-send-group .dropdown-toggle-split::after { display: none; }
.gm-send-group { margin-right: 8px; }
.gm-send-opts { min-width: 230px; }
.gm-compose-hint { font-size: .75rem; color: var(--gm-muted); margin-left: 6px; }
.gm-compose.min { height: 44px; width: 320px; }
.gm-compose.min .gm-compose-body, .gm-compose.min .gm-compose-foot { display: none; }
.gm-compose.max { right: 50%; bottom: 50%; transform: translate(50%, 50%); width: min(1000px, calc(100vw - 80px)); height: min(820px, calc(100dvh - 80px)); border-radius: 12px; animation: none; }
.gm-compose-backdrop { position: fixed; inset: 0; background: rgba(16, 25, 36, .45); z-index: 1039; }

/* ---------- toasts ---------- */
.gm-toasts { position: fixed; left: 24px; bottom: 24px; z-index: 1100; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; pointer-events: none; }
.gm-toast { display: flex; align-items: center; gap: 14px; min-width: 280px; max-width: min(520px, calc(100vw - 32px)); padding: 12px 12px 12px 18px; border-radius: 10px;
    background: #1c2b46; color: #fff; font-size: .875rem; box-shadow: var(--gm-shadow-lg); pointer-events: auto; animation: gm-up .2s ease-out; }
body.dark-mode .gm-toast { background: #e5e9f2; color: #1c2b46; }
.gm-toast .icon { font-size: 1.15rem; }
.gm-toast.error .icon { color: #ff7a6e; }
.gm-toast.success .icon { color: #1ee0ac; }
.gm-toast span { flex: 1; }
.gm-toast button { border: 0; background: transparent; color: #a9b6ff; font-weight: 700; padding: 4px 10px; border-radius: 6px; text-transform: uppercase; font-size: .78rem; letter-spacing: .04em; }
body.dark-mode .gm-toast button { color: #3f4fd6; }
.gm-toast button:hover { background: rgba(255, 255, 255, .1); }
.gm-toast .gm-toast-x { color: rgba(255, 255, 255, .6); padding: 4px 6px; font-size: 1rem; }

/* ---------- FAB ---------- */
.gm-fab { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 50; display: inline-flex; align-items: center; gap: 10px; height: 56px;
    padding: 0 22px 0 18px; border-radius: 18px; border: 0; background: var(--gm-raised); color: var(--gm-strong); font-weight: 600;
    box-shadow: 0 4px 14px rgba(28, 43, 70, .25); }
.gm-fab .icon { font-size: 1.35rem; color: var(--gm-accent); }
.gm-fab.small span { display: none; }
.gm-fab.small { padding: 0; width: 56px; justify-content: center; }
body.compose-open .gm-fab, body.view-open .gm-fab { display: none !important; }

/* ---------- modals ---------- */
.gm-app .modal-content { border-radius: 14px; border: 0; }
.gm-move-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.gm-move-list a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; color: var(--gm-text); }
.gm-move-list a:hover { background: var(--gm-hover); color: var(--gm-strong); }
.gm-move-list .icon { font-size: 1.15rem; color: var(--gm-muted); }
.gm-confirm-icon { width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fdecea; margin-bottom: 14px; }
.gm-confirm-icon .icon { font-size: 1.8rem; color: var(--gm-danger); }
body.dark-mode .gm-confirm-icon { background: #351818; }
.gm-lightbox .modal-content { background: #0b1119; color: #fff; }
.gm-lightbox .modal-header { border-color: rgba(255, 255, 255, .1); }
.gm-lightbox .modal-title { color: #fff; }
.gm-lightbox .gm-icon-btn { color: rgba(255, 255, 255, .75); }
.gm-lightbox .gm-icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.gm-lightbox .modal-body { display: flex; align-items: center; justify-content: center; min-height: 300px; padding: 12px; }
.gm-lightbox img { max-width: 100%; max-height: calc(100dvh - 180px); object-fit: contain; border-radius: 6px; }
.gm-keys dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; align-items: center; }
.gm-keys dt { font-weight: 400; white-space: nowrap; }
.gm-keys dd { margin: 0; color: var(--gm-text); }
.gm-keys kbd { display: inline-block; min-width: 26px; text-align: center; padding: 3px 7px; border-radius: 6px; background: var(--gm-hover); color: var(--gm-strong);
    border: 1px solid var(--gm-border); border-bottom-width: 2px; font-family: inherit; font-size: .78rem; font-weight: 600; }

/* settings */
.gm-settings-wrap { display: flex; min-height: 440px; }
.gm-settings-nav { list-style: none; margin: 0; padding: 14px 10px; width: 210px; flex: none; border-right: 1px solid var(--gm-border); }
.gm-settings-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; color: var(--gm-text); font-weight: 500; font-size: .9rem; margin-bottom: 2px; }
.gm-settings-nav a .icon { font-size: 1.15rem; }
.gm-settings-nav a:hover { background: var(--gm-hover); color: var(--gm-strong); }
.gm-settings-nav a.active { background: var(--gm-accent-soft); color: var(--gm-accent); }
.gm-settings-pane { flex: 1; min-width: 0; padding: 22px 26px 28px; }
.gm-pane-title { font-size: .95rem; margin-bottom: 14px; color: var(--gm-strong); }
.gm-options { display: flex; gap: 12px; flex-wrap: wrap; }
.gm-option { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 132px; padding: 12px; border: 2px solid var(--gm-border); border-radius: 12px;
    background: transparent; color: var(--gm-text); font-size: .85rem; font-weight: 500; }
.gm-option .icon { font-size: 1.8rem; color: var(--gm-muted); padding: 10px 0; }
.gm-option:hover { border-color: color-mix(in srgb, var(--gm-accent) 50%, var(--gm-border)); }
.gm-option.active { border-color: var(--gm-accent); color: var(--gm-accent); background: var(--gm-accent-softer); }
.gm-swatch { width: 100%; height: 58px; border-radius: 8px; border: 1px solid var(--gm-border); }
.gm-swatch-light { background: linear-gradient(90deg, #f3f5fb 28%, #fff 28%); }
.gm-swatch-dark { background: linear-gradient(90deg, #0b1119 28%, #111a25 28%); }
.gm-swatch-auto { background: linear-gradient(135deg, #f3f5fb 50%, #111a25 50%); }
.gm-accents { display: flex; gap: 14px; flex-wrap: wrap; }
.gm-accent { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--c); box-shadow: 0 0 0 3px var(--gm-surface), 0 0 0 5px transparent; transition: box-shadow .15s; }
.gm-accent.active { box-shadow: 0 0 0 3px var(--gm-surface), 0 0 0 5px var(--c); }
.gm-sec-row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--gm-line); font-size: .875rem; }
.gm-sec-row > .icon { font-size: 1.4rem; color: var(--gm-accent); margin-top: 2px; }
.gm-sec-row b { color: var(--gm-strong); }

/* ---------- login ---------- */
.pg-auth { overflow: auto !important; }
.gm-auth { display: flex; min-height: 100vh; min-height: 100dvh; }
.gm-auth-brand { display: none; flex: 0 0 46%; position: relative; overflow: hidden; color: #fff;
    background: radial-gradient(1200px 600px at -10% 110%, rgba(255, 255, 255, .14), transparent 60%), linear-gradient(135deg, #7d8cff 0%, #5465e8 45%, #3b46b6 100%); }
.gm-auth-brand::before { content: ""; position: absolute; left: -80px; bottom: -160px; width: 360px; height: 360px; border-radius: 50%; background: rgba(255, 255, 255, .05); }
.gm-auth-brand::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .06); }
.gm-auth-brand-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; padding: 3rem 3.5rem; }
.gm-auth-pitch { margin: auto 0; max-width: 470px; }
.gm-auth-pitch h2 { color: #fff; font-size: 2.3rem; line-height: 1.18; margin-bottom: 1rem; }
.gm-auth-pitch p { color: rgba(255, 255, 255, .86); font-size: 1.05rem; margin-bottom: 2rem; }
.gm-auth-points { list-style: none; padding: 0; margin: 0; }
.gm-auth-points li { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.05rem; color: rgba(255, 255, 255, .94); }
.gm-auth-points .icon { font-size: 1.25rem; width: 2.5rem; height: 2.5rem; border-radius: .7rem; background: rgba(255, 255, 255, .15); display: inline-flex;
    align-items: center; justify-content: center; flex-shrink: 0; }
.gm-auth-companies { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2rem; }
.gm-auth-companies span { padding: 6px 12px; border-radius: 20px; background: rgba(255, 255, 255, .12); font-size: .8rem; color: #fff; }
.gm-auth-foot { color: rgba(255, 255, 255, .65); font-size: .85rem; }
.gm-auth-form { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2.5rem 1.25rem; background: #fff; }
.gm-auth-card { width: 100%; max-width: 400px; }
.gm-auth-card .form-control-lg { border-radius: 10px; }
.gm-auth-card .btn-lg { border-radius: 10px; height: 48px; justify-content: center; }
.gm-caps { display: none; color: #b78a00; font-size: .8rem; margin-top: 6px; }
.gm-caps.on { display: block; }
.gm-auth-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 1.5rem; color: #8094ae; font-size: .8rem; }
.gm-auth-secure .icon { color: #1ee0ac; }
@media (min-width: 992px) { .gm-auth-brand { display: block; } }

/* ---------- print ---------- */
@media print {
    body.gm-app { overflow: visible; background: #fff; }
    .gm-header, .gm-nav, .gm-toolbar, .gm-chips, .gm-banner, .gm-list, .gm-reply-bar, .gm-msg-side, .gm-fab, .gm-compose, .gm-toasts, .gm-alert { display: none !important; }
    .gm-shell, .gm-body, .gm-main, .gm-view, .gm-view-scroll { position: static !important; height: auto !important; overflow: visible !important; display: block !important;
        margin: 0 !important; box-shadow: none !important; border-radius: 0 !important; }
    .gm-msg-subject, .gm-msg-body, .gm-reply-bar { padding-left: 0 !important; }
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1199.98px) {
    .gm-row-from { width: 160px; }
}
@media (max-width: 991.98px) {
    :root { --gm-header-h: 60px; }
    .gm-header { padding: 0 8px; gap: 4px; }
    .gm-logo { width: auto; margin-right: 8px; }
    .gm-nav { position: fixed; left: 0; top: 0; bottom: 0; z-index: 1035; width: 280px; background: var(--gm-bg); padding-top: 16px; transform: translateX(-100%);
        transition: transform .25s ease; box-shadow: none; }
    .gm-shell.nav-open .gm-nav { transform: none; box-shadow: var(--gm-shadow-lg); }
    .gm-shell.nav-open .gm-nav-overlay { display: block; position: fixed; inset: 0; background: rgba(16, 25, 36, .4); z-index: 1034; }
    .gm-nav-top { display: none; }
    .gm-nav-scroll { padding-top: 4px; }
    .gm-main { margin: 0; border-radius: 0; }
    .gm-compose { right: 16px; }
}
@media (max-width: 767.98px) {
    .gm-search { position: absolute; left: 8px; right: 8px; top: 6px; height: 48px; max-width: none; display: none; z-index: 45; background: var(--gm-surface); box-shadow: 0 1px 6px rgba(28, 43, 70, .2); }
    .gm-shell.search-open .gm-search { display: flex; }
    .gm-search-back { display: inline-flex; margin-left: 4px; }
    .gm-search-icon { display: none; }
    .gm-search > input { padding-left: 6px; }
    .gm-search-panel { position: fixed; top: 60px; left: 8px; right: 8px; max-height: calc(100dvh - 76px); overflow-y: auto; }

    .gm-toolbar { padding: 0 4px 0 6px; height: 50px; }
    .gm-range { display: none; }
    .gm-chips { padding: 8px 12px; }

    /* two-line rows like the Gmail app */
    .gm-row { height: auto; min-height: 76px; align-items: flex-start; padding: 12px 12px 12px 8px; gap: 0; }
    .gm-row-check, .gm-compact .gm-row-check { display: none; }
    .gm-row .gm-avatar, .gm-compact .gm-row .gm-avatar { display: inline-flex; width: 40px; height: 40px; font-size: .85rem; margin: 2px 12px 0 4px; }
    .gm-row.selected .gm-avatar-check { display: flex; }
    .gm-row-body { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "from meta" "main star"; column-gap: 8px; row-gap: 2px; }
    .gm-row-from { grid-area: from; width: auto; padding: 0; font-size: .95rem; }
    .gm-row-meta { grid-area: meta; padding: 0; min-width: 0; font-size: .78rem; }
    .gm-row-main { grid-area: main; flex-direction: column; align-items: stretch; gap: 1px; white-space: normal; font-size: .875rem; }
    .gm-row-subject, .gm-row-snippet { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .gm-row-snippet { font-size: .83rem; flex: none; }
    .gm-row-star { grid-area: star; align-self: end; justify-self: end; width: 32px; height: 32px; margin: 0 -6px -6px 0; }
    .gm-row-tags { order: -1; }
    .gm-row:hover { box-shadow: none; }
    .gm-row-actions { display: none !important; }
    .gm-row:hover .gm-row-meta { visibility: visible; }

    .gm-msg { padding: 16px 16px 96px; }
    .gm-msg-subject { padding-left: 0; margin-bottom: 14px; }
    .gm-msg-subject h3 { font-size: 1.2rem; }
    .gm-msg-body, .gm-reply-bar { padding-left: 0; }
    .gm-alert { margin-left: 0; }
    .gm-msg-head { gap: 12px; }
    .gm-msg-date { display: none; }
    .gm-reply-bar .gm-pill { flex: 1; justify-content: center; padding: 0 12px; }
    .gm-atts-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

    .gm-compose, .gm-compose.max { inset: 0; right: 0; bottom: 0; width: 100%; height: 100%; border-radius: 0; transform: none; }
    .gm-compose.min { inset: auto 12px 12px auto; width: 260px; height: 44px; border-radius: 12px; }
    .gm-compose-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
    .gm-toasts { left: 12px; right: 12px; bottom: calc(88px + env(safe-area-inset-bottom)); align-items: stretch; }
    .gm-toast { min-width: 0; max-width: none; }

    .gm-settings-wrap { flex-direction: column; min-height: 0; }
    .gm-settings-nav { width: auto; display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--gm-border); padding: 8px; gap: 4px; scrollbar-width: none; }
    .gm-settings-nav a { white-space: nowrap; margin: 0; padding: 8px 12px; }
    .gm-settings-pane { padding: 18px 16px 24px; }
    .gm-option { width: calc(50% - 6px); }
}
@media (max-width: 400px) {
    .gm-logo-text { display: none; }
    .gm-tools-bulk .gm-divider { display: none; }
}
.gm-avatar-check { display: none; position: absolute; inset: 0; border-radius: 50%; background: var(--gm-accent); color: #fff; align-items: center;
    justify-content: center; font-size: 1.15rem; }
@media (min-width: 768px) {
    .gm-row-body { display: contents; }
    .gm-row-check { order: 0; } .gm-row-star { order: 1; } .gm-row-avatar-wrap { order: 2; } .gm-row-from { order: 3; } .gm-row-main { order: 4; } .gm-row-meta { order: 5; }
}

/* mobile drawer header */
.gm-nav-brand { display: none; }
@media (max-width: 991.98px) {
    .gm-nav-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 16px 10px; margin-bottom: 8px; border-bottom: 1px solid var(--gm-border); }
    .gm-nav-brand .gm-logo { width: auto; }
    .gm-nav-me { font-size: .8rem; color: var(--gm-muted); padding: 0 10px 12px; word-break: break-all; }
}
@media (max-width: 767.98px) {
    .gm-msg-to { text-align: left; max-width: 100%; }
    .gm-msg-to span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .gm-msg-side .gm-msg-star, .gm-msg-side > .gm-icon-btn { display: none; }
    .gm-msg-from .gm-addr { width: 100%; }
}
.gm-search-panel-foot .btn { height: 38px; padding: 0 18px; display: inline-flex; align-items: center; gap: 6px; line-height: 1; }

/* ---------- out of office / filters / templates ---------- */
.gm-banner-ooo { background: #fff7e0; color: #6b5200; }
.gm-banner-ooo .icon { color: #d69e00; }
.gm-banner-ooo a { color: #6b5200; text-decoration: underline; }
body.dark-mode .gm-banner-ooo { background: #2e2710; color: #f3d77b; }
body.dark-mode .gm-banner-ooo a { color: #f3d77b; }
.gm-dim { opacity: .5; }
.gm-filter-list { display: flex; flex-direction: column; gap: 10px; }
.gm-filter-item { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border: 1px solid var(--gm-border); border-radius: 12px; }
.gm-filter-item.off { opacity: .6; }
.gm-filter-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--gm-accent-soft); color: var(--gm-accent); display: flex; align-items: center; justify-content: center; font-size: 1.15rem; flex: none; }
.gm-filter-desc { flex: 1; min-width: 0; font-size: .85rem; }
.gm-filter-desc b { color: var(--gm-strong); display: block; margin-bottom: 2px; }
.gm-filter-desc .sub-text { overflow-wrap: anywhere; }
.gm-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.gm-filter-empty { display: flex; align-items: center; gap: 12px; padding: 18px; border: 1px dashed var(--gm-border); border-radius: 12px; color: var(--gm-muted); font-size: .85rem; }
.gm-filter-empty .icon { font-size: 1.4rem; }
.gm-filter-editor { margin-top: 16px; padding: 18px; border-radius: 12px; background: var(--gm-accent-softer); border: 1px solid var(--gm-border); }
.gm-cond { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 8px; align-items: center; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--gm-border); }
.gm-cond input { grid-column: 1 / 3; grid-row: 2; }
.gm-cond button { grid-column: 3; grid-row: 1; }
.gm-filter-actions .custom-control { display: flex; align-items: center; min-height: 1.6rem; }
.gm-filter-actions .form-select { margin-left: 4px; }
.gm-filter-actions { display: flex; flex-direction: column; gap: 8px; }
.gm-tpl-menu { min-width: 240px; max-height: 320px; overflow-y: auto; }
@media (max-width: 575.98px) {
    .gm-filter-item { flex-wrap: wrap; }
    .gm-filter-desc { flex-basis: calc(100% - 52px); }
}
