/* Google Workspace Local Suite — Material 3 Unified Stylesheet */
:root {
  --gw-surface: #f8fafd;
  --gw-surface-card: #ffffff;
  --gw-surface-subtle: #edf2fc;
  --gw-search-bg: #eaf1fb;
  --gw-primary: #0b57d0;
  --gw-primary-hover: #0842a0;
  --gw-primary-container: #c2e7ff;
  --gw-on-primary-container: #001d35;
  --gw-selected-pill: #d3e3fd;
  --gw-text: #1f1f1f;
  --gw-text-muted: #444746;
  --gw-text-subtle: #5f6368;
  --gw-border: #e0e3e7;
  --gw-border-strong: #c4c7c5;
  --gw-green: #137333;
  --gw-green-bg: #e6f4ea;
  --gw-amber: #b06000;
  --gw-amber-bg: #fef7e0;
  --gw-red: #c5221f;
  --gw-red-bg: #fce8e6;
  --gw-shadow-sm: 0 1px 2px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
  --gw-shadow-md: 0 4px 12px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08);
  --gw-shadow-lg: 0 8px 28px rgba(0,0,0,0.18);
  --gw-font: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --gw-mono: 'JetBrains Mono', 'Roboto Mono', monospace;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--gw-font);
  font-size: 14px;
  color: var(--gw-text);
  background: var(--gw-surface);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.hidden {
  display: none !important;
}

/* Shell Layout */
.gw-shell {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--gw-surface);
}

/* Top Bar */
.gw-topbar {
  height: 60px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  gap: 12px;
  background: var(--gw-surface);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  z-index: 40;
}

.gw-topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 215px;
}

.gw-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gw-text-muted);
  transition: background 0.15s ease;
}

.gw-icon-btn:hover {
  background: rgba(31, 31, 31, 0.08);
}

.gw-icon-btn-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gw-text-muted);
}

.gw-icon-btn-sm:hover {
  background: rgba(0,0,0,0.08);
}

.gw-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 4px 8px;
  border-radius: 10px;
}

.gw-brand:hover {
  background: rgba(0,0,0,0.04);
}

.gw-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.gw-brand-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gw-brand-title {
  font-size: 19px;
  font-weight: 500;
  color: #444746;
  letter-spacing: -0.2px;
}

.gw-brand-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 6px;
  background: #e8f0fe;
  color: var(--gw-primary);
}

/* Search Box */
.gw-search-wrap {
  flex: 1;
  max-width: 680px;
  position: relative;
}

.gw-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px;
  background: var(--gw-search-bg);
  border-radius: 24px;
  border: 1px solid transparent;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.gw-search-box:focus-within {
  background: #ffffff;
  border-color: #d2e3fc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.gw-search-icon {
  color: var(--gw-text-muted);
  flex-shrink: 0;
}

.gw-search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--gw-text);
  min-width: 100px;
}

.gw-search-kbd {
  font-size: 11px;
  font-family: var(--gw-mono);
  color: var(--gw-text-subtle);
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--gw-border);
  padding: 2px 6px;
  border-radius: 6px;
}

.gw-search-dropdown {
  position: absolute;
  top: 50px;
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--gw-shadow-lg);
  border: 1px solid var(--gw-border);
  max-height: 420px;
  overflow-y: auto;
  z-index: 100;
  padding: 8px;
}

.gw-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.gw-search-item:hover {
  background: #f1f5fb;
}

.gw-search-item-title {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--gw-text);
}

.gw-search-item-sub {
  font-size: 12px;
  color: var(--gw-text-subtle);
  margin-top: 2px;
}

.gw-search-app-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 12px;
  background: #e8f0fe;
  color: var(--gw-primary);
  flex-shrink: 0;
}

/* Top Bar Right */
.gw-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gw-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--gw-border);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--gw-text-muted);
}

.gw-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #188038;
}

.gw-top-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 16px;
  background: var(--gw-primary-container);
  color: var(--gw-on-primary-container);
  font-weight: 600;
  font-size: 13px;
  transition: box-shadow 0.15s ease;
}

.gw-top-action-btn:hover {
  box-shadow: var(--gw-shadow-sm);
}

.gw-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 4px 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--gw-border);
  background: #ffffff;
}

.gw-user-org {
  font-size: 12px;
  font-weight: 600;
  color: #444746;
}

.gw-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* 9-Dot Waffle App Switcher */
.gw-waffle-menu {
  position: fixed;
  top: 64px;
  right: 18px;
  width: 330px;
  background: #f8fafd;
  border-radius: 24px;
  padding: 16px;
  box-shadow: var(--gw-shadow-lg);
  border: 1px solid var(--gw-border);
  z-index: 120;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.gw-waffle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 6px;
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.gw-waffle-item:hover, .gw-waffle-item.active {
  background: #e8f0fe;
}

.gw-waffle-item span {
  font-size: 12px;
  font-weight: 500;
  color: var(--gw-text);
}

/* Main Body */
.gw-body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

/* Left App Rail */
.gw-app-rail {
  width: 68px;
  min-width: 68px;
  background: var(--gw-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  gap: 4px;
  overflow-y: auto;
  z-index: 20;
}

.gw-rail-btn {
  width: 58px;
  padding: 7px 2px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--gw-text-muted);
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}

.gw-rail-btn:hover {
  background: rgba(11, 87, 208, 0.08);
}

.gw-rail-btn.active {
  background: var(--gw-selected-pill);
  color: var(--gw-on-primary-container);
  font-weight: 600;
}

.gw-rail-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gw-rail-label {
  font-size: 10.5px;
  line-height: 1.1;
  text-align: center;
  max-width: 54px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gw-rail-badge {
  position: absolute;
  top: 3px;
  right: 6px;
  background: #c5221f;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
}

/* Main Active App Viewport */
.gw-main-workspace {
  flex: 1;
  min-width: 0;
  min-height: 0;
  margin: 0 8px 8px 0;
  background: var(--gw-surface-card);
  border-radius: 16px;
  border: 1px solid var(--gw-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* Right Companion Panel */
.gw-companion {
  width: 268px;
  min-width: 268px;
  background: var(--gw-surface);
  border-left: 1px solid var(--gw-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.2s ease, min-width 0.2s ease;
}

.gw-companion.collapsed {
  width: 0;
  min-width: 0;
  border-left: none;
}

.gw-companion-tabs {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 44px;
  border-bottom: 1px solid var(--gw-border);
  background: #ffffff;
}

.gw-comp-btn {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid transparent;
}

.gw-comp-btn.active {
  border-bottom-color: var(--gw-primary);
  background: #f8fafd;
}

.gw-companion-drawer {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: #ffffff;
}

/* Common App Sub-Shell (Left Sidebar + Content) */
.app-split-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.app-sidebar {
  width: 236px;
  min-width: 236px;
  background: #f8fafd;
  border-right: 1px solid var(--gw-border);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.app-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}

.gw-fab-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 20px;
  border-radius: 16px;
  background: var(--gw-primary-container);
  color: var(--gw-on-primary-container);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  width: fit-content;
}

.gw-fab-btn:hover {
  box-shadow: 0 3px 8px rgba(0,0,0,0.16);
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13.5px;
  color: var(--gw-text-muted);
  cursor: pointer;
  user-select: none;
}

.sidebar-nav-item:hover {
  background: rgba(0,0,0,0.05);
}

.sidebar-nav-item.active {
  background: var(--gw-selected-pill);
  color: var(--gw-on-primary-container);
  font-weight: 600;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--gw-text-subtle);
  padding: 12px 12px 4px;
}

/* Buttons & Badges */
.gw-btn-primary {
  background: var(--gw-primary);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 18px;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gw-btn-primary:hover {
  background: var(--gw-primary-hover);
}

.gw-btn-secondary {
  background: #f1f3f4;
  color: var(--gw-text);
  padding: 7px 14px;
  border-radius: 18px;
  font-weight: 500;
  font-size: 13px;
  border: 1px solid var(--gw-border);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gw-btn-secondary:hover {
  background: #e4e7eb;
}

.gw-pill-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: #e8f0fe;
  color: var(--gw-primary);
}

/* Gmail Styles */
.mail-toolbar {
  height: 46px;
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--gw-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mail-category-tabs {
  display: flex;
  border-bottom: 1px solid var(--gw-border);
  padding: 0 12px;
  background: #ffffff;
}

.mail-cat-tab {
  padding: 11px 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--gw-text-subtle);
  border-bottom: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mail-cat-tab.active {
  color: var(--gw-primary);
  border-bottom-color: var(--gw-primary);
  font-weight: 600;
}

.mail-list {
  flex: 1;
  overflow-y: auto;
}

.mail-row {
  display: grid;
  grid-template-columns: 22px 24px 186px 1fr 20px 64px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 29px;
  min-height: 29px;
  border-bottom: 1px solid #e9eef6;
  cursor: pointer;
  font-size: 13px;
  line-height: 20px;
  background: rgba(242, 245, 245, 0.8);
  color: #202124;
  position: relative;
}

.mail-row:hover {
  box-shadow: inset 1px 0 0 #dadce0, inset -1px 0 0 #dadce0, 0 1px 2px rgba(60,64,67,0.18);
  background: #f2f6fc;
  z-index: 1;
}

.mail-row:hover .mail-row-actions,
.mail-row.focused .mail-row-actions {
  opacity: 1 !important;
}
.mail-row:hover .mail-desktop-date {
  opacity: 0;
}

.mail-row.unread {
  background: #ffffff;
  font-weight: 700;
}

.mail-row.selected {
  background: #c2dbff !important;
}

.mail-row.focused {
  box-shadow: inset 3px 0 0 #0b57d0, inset -1px 0 0 #dadce0;
  background: #e8f0fe;
}

.mail-row.unread.focused {
  background: #d3e3fd;
}

.mail-row .mail-check {
  width: 15px;
  height: 15px;
  margin: 0;
  cursor: pointer;
}

.mail-row .mail-star-col {
  width: 22px;
  height: 22px;
  padding: 0;
}

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

.gw-spin-anim {
  animation: gw-spin 0.65s linear infinite;
}

@media (min-width: 821px) {
  body.gw-sidebar-collapsed .app-sidebar {
    display: none !important;
  }
  body.gw-rail-collapsed #gw-app-rail {
    display: none !important;
  }
  body.gw-rail-collapsed #gw-rail-expand-tab {
    display: inline-flex !important;
  }
  body.gw-rail-collapsed .gw-main-workspace {
    margin-left: 4px;
  }
}

.gmail-sidebar .sidebar-nav-item {
  padding: 4px 12px;
  min-height: 28px;
  font-size: 13px;
}

.gmail-sidebar .sidebar-section-title {
  padding: 8px 12px 2px;
  font-size: 10.5px;
}

.mail-sender {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  padding-right: 6px;
}

.mail-sender-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-msg-count {
  font-size: 11.5px;
  color: #5f6368;
  font-weight: 400;
  flex-shrink: 0;
  margin-left: 2px;
}

.mail-draft-tag {
  color: #d93025;
  font-weight: 400;
}

.gw-gmail-label-pill {
  background: #dddddd;
  color: #444746;
  font-size: 11px;
  font-weight: 400;
  padding: 0 5px;
  line-height: 16px;
  height: 16px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.mail-subject-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.mail-subject-snippet {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.mail-snippet {
  font-weight: 400;
  color: #5f6368;
}

.mail-att-col {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
}

.mail-desktop-date {
  font-size: 12px;
  color: #5f6368;
  white-space: nowrap;
  text-align: right;
}

.mail-row.unread .mail-sender-text,
.mail-row.unread .mail-subj-text,
.mail-row.unread .mail-desktop-date {
  font-weight: 700;
  color: #202124;
}

.mail-thread-view {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
}

.mail-msg-card {
  border: 1px solid var(--gw-border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 14px;
  background: #ffffff;
}

.mail-msg-body {
  margin-top: 12px;
  line-height: 1.6;
  color: #202124;
}

.mail-msg-body ul, .mail-msg-body ol {
  padding-left: 22px;
  margin: 8px 0;
}

:where(.mail-msg-body) p {
  margin: 0 0 10px;
}

:where(.mail-msg-body) p:last-child {
  margin-bottom: 0;
}

:where(.mail-msg-body) h1,
:where(.mail-msg-body) h2,
:where(.mail-msg-body) h3,
:where(.mail-msg-body) h4 {
  margin: 14px 0 6px;
  line-height: 1.35;
  color: #1f1f1f;
}

:where(.mail-msg-body) table:not([role="presentation"]):not([cellpadding="0"]) {
  border-collapse: collapse;
  margin: 10px 0 14px;
  font-size: 13px;
  line-height: 1.45;
  max-width: 100%;
}

:where(.mail-msg-body) table:not([role="presentation"]):not([cellpadding="0"]) th,
:where(.mail-msg-body) table:not([role="presentation"]):not([cellpadding="0"]) td {
  padding: 8px 12px;
  border: 1px solid #dadce0;
  vertical-align: top;
  text-align: left;
}

:where(.mail-msg-body) table:not([role="presentation"]):not([cellpadding="0"]) th {
  background: #f8fafd;
  font-weight: 600;
  color: #1f1f1f;
}

:where(.mail-msg-body) pre {
  background: #f8fafd;
  border: 1px solid #e0e3e7;
  border-radius: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.45;
  margin: 8px 0;
}

:where(.mail-msg-body) code {
  background: #f1f3f4;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
}

:where(.mail-msg-body) pre code {
  background: transparent;
  padding: 0;
}

:where(.mail-msg-body) blockquote {
  margin: 8px 0;
  padding: 4px 12px;
  border-left: 3px solid #dadce0;
  color: #5f6368;
}

:where(.mail-msg-body) img {
  max-width: 100%;
  height: auto;
}

/* Floating Compose Modal */
.gw-compose-modal {
  position: fixed;
  bottom: 0;
  right: 68px;
  width: 500px;
  max-width: calc(100vw - 24px);
  background: #ffffff;
  border-radius: 14px 14px 0 0;
  box-shadow: var(--gw-shadow-lg);
  border: 1px solid var(--gw-border);
  z-index: 110;
  display: flex;
  flex-direction: column;
}

.gw-compose-header {
  background: #f2f6fc;
  padding: 10px 16px;
  border-radius: 14px 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 13.5px;
}

.gw-compose-body {
  display: flex;
  flex-direction: column;
  padding: 8px 16px;
}

.gw-compose-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #f1f3f4;
  padding: 6px 0;
}

.gw-compose-row label {
  width: 52px;
  font-size: 12.5px;
  color: var(--gw-text-subtle);
}

.gw-compose-row input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13.5px;
}

#gw-compose-text {
  height: 190px;
  border: none;
  outline: none;
  resize: none;
  padding: 10px 0;
  line-height: 1.5;
}

.gw-compose-footer {
  padding: 10px 16px;
  border-top: 1px solid #f1f3f4;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.gw-compose-hint {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--gw-text-subtle);
}

/* Calendar Grid Styles */
.gw-mini-day {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 11px;
  color: var(--gw-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  cursor: pointer;
}
.gw-mini-day.muted {
  color: #adb0b2;
}
.gw-mini-day:hover {
  background: rgba(0, 0, 0, 0.06);
}
.gw-mini-day.selected {
  background: #d3e3fd;
  color: var(--gw-on-primary-container);
  font-weight: 700;
}
.gw-mini-day.today {
  background: var(--gw-primary);
  color: #ffffff;
  font-weight: 700;
}
.cal-view-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gw-text-muted);
  background: #ffffff;
  border-right: 1px solid #dadce0;
  cursor: pointer;
}
.cal-view-btn:last-child {
  border-right: none;
}
.cal-view-btn:hover {
  background: #f1f3f4;
}
.cal-view-btn.active {
  background: #e8f0fe;
  color: var(--gw-primary);
  font-weight: 600;
}
.cal-week-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  overflow-y: auto;
  border-top: 1px solid var(--gw-border);
}

.cal-day-header {
  padding: 10px 6px;
  text-align: center;
  border-bottom: 1px solid var(--gw-border);
  border-left: 1px solid #f1f3f4;
  background: #f8fafd;
  position: sticky;
  top: 0;
  z-index: 5;
}

.cal-day-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-top: 2px;
}

.cal-day-num.today {
  background: var(--gw-primary);
  color: #ffffff;
}

.cal-event-chip {
  padding: 5px 8px;
  border-radius: 6px;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  margin: 4px 4px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
  overflow: hidden;
}

/* Chat Styles */
.chat-channel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--gw-text-muted);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}
.chat-channel-row:hover {
  background: rgba(0, 0, 0, 0.05);
}
.chat-channel-row.active {
  background: var(--gw-selected-pill);
  color: var(--gw-on-primary-container);
  font-weight: 600;
}
.chat-reaction {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid var(--gw-border);
  background: #ffffff;
  font-size: 11.5px;
  cursor: pointer;
}
.chat-reaction.selected {
  background: #e8f0fe;
  border-color: var(--gw-primary);
  color: var(--gw-primary);
  font-weight: 600;
}
.chat-thread-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid var(--gw-border);
  background: #f8fafd;
  font-size: 11.5px;
  color: var(--gw-primary);
  cursor: pointer;
}
.chat-stream {
  flex: 1;
  overflow-y: auto;
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 6px 8px;
  border-radius: 10px;
}

.chat-bubble-row:hover {
  background: #f8fafd;
}

.chat-composer {
  padding: 12px 18px;
  border-top: 1px solid var(--gw-border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
}

.chat-composer input {
  flex: 1;
  height: 40px;
  border-radius: 20px;
  border: 1px solid var(--gw-border-strong);
  padding: 0 16px;
  outline: none;
}

/* Drive Cards & Table */
.drive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  padding: 16px;
}

.drive-card {
  border: 1px solid var(--gw-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.drive-card:hover, .drive-card.selected {
  border-color: var(--gw-primary);
  box-shadow: var(--gw-shadow-sm);
  background: #f8fafd;
}

/* Google Docs Paginated Canvas */
.docs-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 14px;
  margin: 6px 14px;
  background: #edf2fa;
  border-radius: 24px;
}

.docs-tool-btn {
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #444746;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.docs-tool-btn:hover {
  background: rgba(0,0,0,0.08);
}

.docs-canvas-wrap {
  flex: 1;
  overflow-y: auto;
  background: #f8fafd;
  padding: 24px 16px 48px;
  display: flex;
  justify-content: center;
}

.docs-page {
  width: 816px;
  max-width: 100%;
  min-height: 980px;
  background: #ffffff;
  border: 1px solid #dadce0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 64px 72px;
  outline: none;
  line-height: 1.65;
  font-size: 14.5px;
}

.docs-page h1 { font-size: 24px; margin-bottom: 10px; color: #1f1f1f; }
.docs-page h2 { font-size: 17px; margin: 18px 0 8px; color: #0b57d0; }
.docs-page p { margin-bottom: 10px; }
.docs-page ul, .docs-page ol { padding-left: 24px; margin-bottom: 12px; }
.docs-page hr { border: none; border-top: 1px solid #e0e3e7; margin: 14px 0; }
.docs-page table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13px; }
.docs-page th, .docs-page td { border: 1px solid #dadce0; padding: 8px 10px; text-align: left; }
.docs-page th { background: #e8f0fe; color: #0b57d0; }

/* Google Sheets Grid */
.sheets-formula-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--gw-border);
  background: #ffffff;
}

.sheets-cell-ref {
  width: 64px;
  text-align: center;
  font-weight: 700;
  font-family: var(--gw-mono);
  background: #f1f3f4;
  border-radius: 6px;
  padding: 4px 0;
  font-size: 12.5px;
}

.sheets-grid-wrap {
  flex: 1;
  overflow: auto;
  background: #ffffff;
}

.sheets-table {
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12.5px;
}

.sheets-table th {
  background: #f8fafd;
  border: 1px solid #dadce0;
  color: #444746;
  font-weight: 600;
  height: 26px;
  min-width: 110px;
  user-select: none;
}

.sheets-table th.row-hdr {
  min-width: 42px;
  width: 42px;
  text-align: center;
}

.sheets-table td {
  border: 1px solid #e0e3e7;
  height: 28px;
  padding: 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: cell;
}

.sheets-table td.active-cell {
  outline: 2px solid #0b57d0;
  outline-offset: -2px;
  background: #f8fbff;
}

/* Google Slides Canvas */
.slides-stage-wrap {
  flex: 1;
  background: #e9eef6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: auto;
}

.slides-canvas-16x9 {
  width: 100%;
  max-width: 760px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

/* Universal Modal & Toast */
.gw-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}

.gw-modal-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 580px;
  box-sizing: border-box;
  box-shadow: var(--gw-shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.gw-toast-container {
  position: fixed;
  bottom: 20px;
  left: 84px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 300;
}

.gw-toast {
  background: #323232;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: var(--gw-shadow-md);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Contact Autocomplete Dropdown & Chips */
.gw-autocomplete-menu {
  position: fixed;
  background: #ffffff;
  border: 1px solid var(--gw-border);
  border-radius: 12px;
  box-shadow: var(--gw-shadow-lg);
  max-height: 240px;
  overflow-y: auto;
  z-index: 400;
  min-width: 280px;
  padding: 6px;
}

.gw-autocomplete-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12.5px;
}

.gw-autocomplete-item:hover,
.gw-autocomplete-item.active {
  background: #e8f0fe;
}

.gw-compose-modal.maximized {
  width: min(860px, calc(100vw - 40px));
  right: 20px;
}

.gw-compose-modal.minimized .gw-compose-body,
.gw-compose-modal.minimized .gw-compose-footer {
  display: none;
}

/* Calendar Drag & Resize */
.cal-event-chip {
  user-select: none;
  transition: box-shadow 0.12s ease, opacity 0.12s ease;
}

.cal-event-chip:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.24);
  z-index: 10 !important;
}

.cal-event-chip.dragging {
  opacity: 0.45;
}

.cal-resize-handle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 7px;
  cursor: ns-resize;
  background: rgba(255,255,255,0.22);
  border-radius: 0 0 6px 6px;
}

.cal-resize-handle:hover {
  background: rgba(255,255,255,0.55);
}

.cal-drag-ghost {
  position: absolute;
  left: 3px;
  right: 3px;
  background: rgba(11, 87, 208, 0.22);
  border: 2px dashed #0b57d0;
  border-radius: 6px;
  pointer-events: none;
  z-index: 9;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 700;
  color: #0b57d0;
}

/* Drive Context Menu & Drag-and-Drop */
.gw-context-menu {
  position: fixed;
  background: #ffffff;
  border: 1px solid var(--gw-border);
  border-radius: 12px;
  box-shadow: var(--gw-shadow-lg);
  min-width: 220px;
  padding: 6px;
  z-index: 350;
}

.gw-context-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--gw-text);
  text-align: left;
}

.gw-context-item:hover {
  background: #e8f0fe;
  color: var(--gw-primary);
}

.gw-context-divider {
  height: 1px;
  background: var(--gw-border);
  margin: 5px 4px;
}

.drive-drop-target {
  outline: 2px dashed #0b57d0 !important;
  background: #e8f0fe !important;
}

/* Responsive Breakpoints (Tablet 768px & Mobile 375px) */
@media (max-width: 1024px) {
  .gw-companion {
    display: none;
  }
  .app-sidebar {
    width: 190px;
    min-width: 190px;
  }
  .docs-page {
    padding: 36px 32px;
  }
}

/* Desktop defaults for mobile-only elements */
.mail-mobile-avatar,
.mail-mobile-content,
.mail-swipe-bg,
.mail-mobile-thread-bar,
.gw-mobile-list-header,
.gw-mobile-compose-fab,
.gw-mobile-bottom-nav,
.gw-mobile-drawer-scrim {
  display: none !important;
}

@media (max-width: 820px) {
  html, body, .gw-shell {
    height: 100dvh;
    background: #ffffff !important;
  }

  /* Gmail for Android Floating Material 3 Search Pill Header */
  .gw-topbar {
    height: 48px !important;
    min-height: 48px !important;
    margin: 8px 14px 4px !important;
    padding: 0 8px 0 6px !important;
    gap: 4px !important;
    background: #eaf1fb !important;
    border-radius: 28px !important;
    border-bottom: none !important;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.14) !important;
    display: flex !important;
    align-items: center !important;
  }
  body.gw-mobile-reading-thread .gw-topbar,
  body.gw-mobile-has-selection .gw-topbar {
    display: none !important;
  }
  .gw-topbar-left {
    min-width: auto !important;
    gap: 0 !important;
    flex-shrink: 0;
  }
  .gw-topbar-right {
    min-width: auto !important;
    gap: 0 !important;
    flex-shrink: 0;
    margin-left: auto;
  }
  .gw-brand,
  .gw-brand-badge,
  .gw-user-org,
  .gw-status-pill,
  .gw-search-kbd,
  .gw-search-icon,
  #gw-rail-toggle,
  #gw-top-refresh-btn,
  #gw-waffle-btn,
  #gw-settings-btn,
  #gw-collab-bar,
  #gw-quick-compose-btn,
  #gw-reset-mock-btn {
    display: none !important;
  }
  .gw-search-wrap {
    flex: 1 !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  .gw-search-box {
    height: 44px !important;
    padding: 0 6px !important;
    border-radius: 24px !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }
  .gw-search-box input {
    font-size: 15px !important;
    color: #1f1f1f !important;
    background: transparent !important;
  }
  .gw-search-box input::placeholder {
    color: #444746 !important;
  }
  .gw-user-chip {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
  }
  .drive-inspector {
    display: none !important;
  }

  /* Hide left desktop rail; use full phone width + bottom nav */
  .gw-app-rail,
  #gw-rail-expand-tab {
    display: none !important;
  }
  .gw-main-workspace {
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
  }

  /* Slide-out Gmail for Android Navigation Drawer */
  .app-sidebar {
    display: flex !important;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 296px !important;
    min-width: 296px !important;
    max-width: 84vw;
    background: #f8fafd !important;
    z-index: 220;
    padding: 16px 12px !important;
    transform: translateX(-105%);
    transition: transform 0.22s cubic-bezier(0.2, 0, 0, 1);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  }
  body.gw-mobile-drawer-open .app-sidebar {
    transform: translateX(0);
  }
  body.gw-mobile-drawer-open .gw-mobile-drawer-scrim {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 210;
  }
  .app-sidebar .gw-fab-btn {
    display: none !important;
  }

  /* Force Single-Column Full-Width Inbox on Mobile (Suppress Desktop Split Pane & Toolbar) */
  .gw-shell,
  .gw-body,
  .gw-main-workspace,
  .app-split-layout,
  .app-main,
  .mail-list,
  .mail-row-swipe-wrap,
  .mail-row {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  #gw-mail-split-resizer,
  #gw-mail-split-preview {
    display: none !important;
  }
  #gw-mail-split-wrap > .mail-list {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  #gw-universal-filter-bar {
    display: none !important;
  }
  .gw-mobile-list-header {
    display: block !important;
    background: #ffffff;
    flex-shrink: 0;
  }
  .gw-mobile-selection-bar {
    display: flex;
    align-items: center;
    height: 54px;
    padding: 0 8px;
    background: #e8f0fe;
    border-bottom: 1px solid #d3e3fd;
    gap: 6px;
  }
  .gw-mobile-sel-count {
    font-size: 18px;
    font-weight: 600;
    color: #1f1f1f;
    margin-left: 4px;
  }
  .gw-mobile-chip-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .gw-mobile-chip-strip::-webkit-scrollbar {
    display: none;
  }
  .gw-mobile-chip {
    flex-shrink: 0;
    height: 30px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #c4c7c5;
    background: #ffffff;
    color: #444746;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
  }
  .gw-mobile-chip.active {
    background: #d3e3fd;
    border-color: #d3e3fd;
    color: #041e49;
    font-weight: 600;
  }
  .gw-mobile-section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 4px;
  }
  .gw-mobile-section-title {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.07em;
    color: #444746;
    text-transform: uppercase;
  }

  /* Native Gmail for Android 3-Line Message Rows with 42px Circular Avatar */
  .mail-row-swipe-wrap {
    position: relative;
    overflow: hidden;
    background: #188038;
  }
  .mail-swipe-bg {
    display: flex !important;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    pointer-events: none;
  }
  .mail-row {
    display: flex !important;
    align-items: flex-start !important;
    gap: 16px !important;
    padding: 12px 16px !important;
    height: auto !important;
    min-height: 78px !important;
    background: #ffffff !important;
    border-bottom: none !important;
    box-shadow: none !important;
    position: relative;
  }
  .mail-row.unread {
    background: #ffffff !important;
  }
  .mail-row.focused {
    background: #ffffff !important;
    box-shadow: none !important;
  }
  .mail-row.selected {
    background: #d3e3fd !important;
    border-radius: 14px;
    margin: 2px 8px;
    width: calc(100% - 16px) !important;
  }
  .mail-row .mail-check,
  .mail-row .mail-star-col,
  .mail-row .mail-sender,
  .mail-row .mail-subject-cell,
  .mail-row .mail-att-col,
  .mail-row .mail-desktop-date,
  .mail-row .mail-row-actions {
    display: none !important;
  }
  .mail-mobile-avatar {
    display: flex !important;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 500;
    font-size: 18px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    user-select: none;
  }
  .mail-mobile-content {
    display: flex !important;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
  }
  .mail-m-line1 {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }
  .mail-m-sender {
    font-size: 16px;
    line-height: 20px;
    color: #444746;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mail-row.unread .mail-m-sender,
  .mail-row.unread .mail-m-subject {
    color: #1f1f1f;
    font-weight: 700;
  }
  .mail-m-count {
    font-size: 12px;
    color: #5f6368;
    font-weight: 400;
    flex-shrink: 0;
  }
  .mail-m-date {
    margin-left: auto;
    font-size: 12px;
    color: #5f6368;
    font-weight: 400;
    flex-shrink: 0;
  }
  .mail-row.unread .mail-m-date {
    color: #1f1f1f;
    font-weight: 700;
  }
  .mail-m-line2 {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }
  .mail-m-subject {
    font-size: 14px;
    line-height: 19px;
    color: #444746;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
  }
  .mail-m-att {
    font-size: 12px;
    color: #5f6368;
    flex-shrink: 0;
  }
  .mail-m-line3 {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }
  .mail-m-snippet {
    font-size: 13.5px;
    line-height: 18px;
    color: #5f6368;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
  }
  .mail-m-star {
    font-size: 20px;
    line-height: 1;
    padding: 0 2px;
    background: none;
    border: none;
    flex-shrink: 0;
  }
  /* Mobile Thread Reading View */
  .mail-mobile-thread-bar {
    display: flex !important;
    height: 52px;
    padding: 0 8px;
    border-bottom: 1px solid #e0e3e7;
    align-items: center;
    background: #ffffff;
    flex-shrink: 0;
  }
  .mail-thread-desktop-toolbar {
    display: none !important;
  }
  .mail-thread-view {
    padding: 14px 14px 28px !important;
  }
  .mail-msg-card {
    padding: 12px 10px !important;
    border-radius: 10px;
  }
  .mail-msg-expanded-wrap {
    padding-left: 0 !important;
  }

  /* Mobile Floating Compose FAB & Bottom Navigation Bar */
  .gw-mobile-compose-fab {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    position: fixed;
    right: 16px;
    bottom: 74px;
    height: 54px;
    padding: 0 20px;
    border-radius: 16px;
    background: #c2e7ff;
    color: #001d35;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    z-index: 120;
  }
  body.gw-mobile-reading-thread .gw-mobile-compose-fab,
  body.gw-mobile-non-gmail .gw-mobile-compose-fab {
    display: none !important;
  }
  .gw-mobile-bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr);
    height: 58px;
    background: #f3f6fc;
    border-top: 1px solid #e0e3e7;
    flex-shrink: 0;
    z-index: 110;
  }
  body.gw-mobile-reading-thread .gw-mobile-bottom-nav {
    display: none !important;
  }
  .gw-m-nav-btn {
    border: none;
    background: transparent;
    color: #444746;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 500;
    position: relative;
  }
  .gw-m-nav-btn.active {
    color: #041e49;
    font-weight: 700;
  }
  .gw-m-nav-pill {
    position: relative;
    padding: 2px 16px;
    border-radius: 14px;
    font-size: 16px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .gw-m-nav-btn.active .gw-m-nav-pill {
    background: #d3e3fd;
  }
  .gw-m-nav-badge {
    position: absolute;
    top: -3px;
    right: 2px;
    background: #b3261e;
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
    line-height: 1.1;
  }

  /* Full-Screen Mobile Compose Modal */
  .gw-compose-modal {
    inset: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    z-index: 260 !important;
  }
  .gw-compose-header {
    border-radius: 0 !important;
    padding: 12px 16px !important;
  }
  .gw-compose-body {
    flex: 1;
    overflow-y: auto;
  }
  #gw-compose-text {
    flex: 1;
    min-height: 220px;
  }
}

/* Live In-Canvas Collaborator Carets & Presence */
.docs-page-stage {
  position: relative;
  width: 100%;
  max-width: 816px;
  margin: 0 auto;
}
.docs-remote-carets-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
}
.docs-remote-caret {
  position: absolute;
  width: 2px;
  height: 20px;
  pointer-events: none;
  transition: top 120ms ease-out, left 120ms ease-out;
}
.docs-remote-caret-flag {
  position: absolute;
  top: -19px;
  left: -2px;
  padding: 2px 7px;
  border-radius: 6px 6px 6px 0;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.docs-collab-count-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 15px;
  background: #e6f4ea;
  color: #137333;
  border: 1px solid #ceead6;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.docs-net-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid #dadce0;
  background: #ffffff;
  color: #3c4043;
  cursor: pointer;
}
.docs-net-btn.flaky {
  background: #fef7e0;
  color: #b06000;
  border-color: #fde293;
}
.docs-net-btn.offline {
  background: #fce8e6;
  color: #c5221f;
  border-color: #fad2cf;
}

#slides-canvas [data-slide-inline]:hover {
  outline: 1.5px dashed rgba(11, 87, 208, 0.55);
  background: rgba(11, 87, 208, 0.03);
}
#slides-canvas .slide-free-el:hover {
  border-color: rgba(11, 87, 208, 0.7) !important;
}
#slides-canvas .slide-free-el:hover .slide-el-controls,
#slides-canvas .slide-free-el:hover [data-slide-el-resize] {
  display: flex !important;
}
#slides-title-input:hover,
#slides-title-input:focus {
  border-color: #c4c7c5 !important;
  background: #f8fafd;
  outline: none;
}

@media print {
  .gw-topbar,
  .gw-app-rail,
  .gw-companion,
  .gw-compose-modal,
  .docs-header-bar,
  .docs-toolbar,
  .docs-outline,
  .docs-comments,
  .sheets-header,
  .sheets-toolbar,
  .sheets-formula-bar,
  .sheets-tabs {
    display: none !important;
  }
  body,
  .gw-shell,
  .gw-body,
  .gw-main-workspace,
  .docs-canvas-scroll {
    height: auto !important;
    overflow: visible !important;
    background: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .docs-page {
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    width: 100% !important;
  }
}

/* Chief Inbox Extension Integration (cawse.ca native) */
#chief-inbox-panel, .ci-panel-wrap {
  font: 13px/1.5 'Google Sans Text', 'Google Sans', Roboto, system-ui, sans-serif;
  color: #1f1f1f;
  margin: 12px 0 8px;
  max-width: 960px;
}
.ci-banner {
  background: #f0f4f9;
  border: 1px solid #d3e3fd;
  border-left: 3px solid #0b57d0;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.ci-banner-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.ci-banner-brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #0b8a6c;
}
.ci-verdict-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #e6f4ea;
  color: #0d652d;
  border: 1px solid #ceead6;
}
.ci-verdict-pill[data-verdict="decide-by"],
.ci-verdict-pill[data-verdict="reply-draft"] {
  background: #e8f0fe;
  color: #0b57d0;
  border-color: #d3e3fd;
}
.ci-verdict-pill[data-verdict="forward-to-action"] {
  background: #fef7e0;
  color: #b06000;
  border-color: #fde293;
}
.ci-banner h1, .ci-banner h2, .ci-banner h3, .ci-banner h4 {
  margin: 10px 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: #0b57d0;
}
.ci-banner > :first-child { margin-top: 0; }
.ci-banner > :last-child { margin-bottom: 0; }
.ci-banner p { margin: 5px 0; }
.ci-banner ul, .ci-banner ol { margin: 5px 0; padding-left: 20px; }
.ci-banner li { margin: 2px 0; }
.ci-banner code {
  background: #e8eef7;
  padding: 1px 5px;
  border-radius: 4px;
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ci-banner pre {
  background: #1e293b;
  color: #f1f5f9;
  padding: 10px 12px;
  border-radius: 6px;
  overflow-x: auto;
  font: 12px/1.45 ui-monospace, monospace;
}
.ci-banner pre code { background: none; padding: 0; color: inherit; }
.ci-banner table { border-collapse: collapse; width: 100%; margin: 6px 0; font-size: 12.5px; }
.ci-banner th, .ci-banner td { border: 1px solid #d3e3fd; padding: 5px 8px; text-align: left; vertical-align: top; }
.ci-banner th { background: #e3ecf8; font-weight: 600; }
.ci-banner a { color: #0b57d0; text-decoration: none; }
.ci-banner a:hover { text-decoration: underline; }
.ci-banner blockquote { margin: 6px 0; padding: 4px 10px; border-left: 3px solid #94a3b8; color: #475569; background: #f8fafc; }
.ci-detail-toggle {
  display: inline-block;
  margin-top: 6px;
  padding: 0;
  background: none;
  border: 0;
  color: #0b57d0;
  font: 500 12px/1.4 'Google Sans Text', Roboto, sans-serif;
  cursor: pointer;
}
.ci-detail-toggle:hover { text-decoration: underline; }
.ci-detail-body {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #d3e3fd;
}
.ci-tell-strip {
  font: 13px/1.5 'Google Sans Text', 'Google Sans', Roboto, system-ui, sans-serif;
  color: #1f1f1f;
  margin: 6px 0 12px;
  max-width: 960px;
}
.ci-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  align-items: center;
}
.ci-btn {
  appearance: none;
  border: 1px solid #c7d7f4;
  background: #fff;
  color: #0b57d0;
  font: 500 12.5px/1.3 'Google Sans Text', Roboto, sans-serif;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .06s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ci-btn:hover { background: #e8f0fe; border-color: #0b57d0; }
.ci-btn:active { transform: translateY(1px); }
.ci-btn.ci-btn-draft {
  background: #0b57d0;
  border-color: #0b57d0;
  color: #fff;
  font-weight: 600;
}
.ci-btn.ci-btn-draft:hover { background: #0842a0; border-color: #0842a0; }
.ci-btn.ci-btn-open-draft {
  background: #e6f4ea;
  border-color: #a8dab5;
  color: #137333;
  font-weight: 600;
}
.ci-btn.ci-btn-open-draft:hover { background: #ceead6; border-color: #137333; }
.ci-btn.ci-btn-suggest {
  background: #f8fafd;
  border-color: #c7d7f4;
  color: #0b57d0;
}
.ci-btn.ci-btn-suggest:hover { background: #e8f0fe; border-color: #0b57d0; }
.ci-btn.ci-btn-custom { border-style: dashed; color: #475569; border-color: #cbd5e1; }
.ci-btn.ci-btn-custom:hover { color: #0b57d0; border-color: #0b57d0; background: #f8fafc; }
.ci-btn.ci-done {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
  pointer-events: none;
}
.ci-composer {
  margin-top: 8px;
  background: #fff;
  border: 1px solid #c7d7f4;
  border-radius: 8px;
  padding: 8px 10px;
}
.ci-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  outline: 0;
  resize: vertical;
  min-height: 44px;
  font: 13px/1.45 'Google Sans Text', Roboto, system-ui, sans-serif;
  color: #1f1f1f;
  background: transparent;
}
.ci-composer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #eef2f7;
}
.ci-send {
  background: #0b57d0;
  color: #fff;
  border: 0;
  font: 500 12.5px/1.3 'Google Sans Text', Roboto, sans-serif;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.ci-send:hover { background: #0842a0; }
.ci-send:disabled { opacity: .6; cursor: default; }
.ci-cancel {
  background: none;
  border: 0;
  color: #64748b;
  font: 12px/1.3 system-ui, sans-serif;
  padding: 4px 8px;
  cursor: pointer;
}
.ci-cancel:hover { color: #1f1f1f; }
.ci-hint { margin-left: auto; font-size: 11px; color: #94a3b8; }
.ci-thread-asks { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.ci-thread-ask {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 6px;
  font: 12px/1.35 'Google Sans Text', Roboto, sans-serif;
}
.ci-thread-ask[data-state="sending"],
.ci-thread-ask[data-state="queued"] {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}
.ci-thread-ask[data-state="sent"] {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.ci-thread-ask[data-state="failed"],
.ci-thread-ask[data-state="retry"] {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.ci-thread-ask-state { font-weight: 600; white-space: nowrap; }
.ci-thread-ask[data-state="sending"] .ci-thread-ask-state::before,
.ci-thread-ask[data-state="queued"] .ci-thread-ask-state::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
  margin-right: 6px;
  vertical-align: middle;
  animation: ci-pulse 1.2s ease-in-out infinite;
}
.ci-thread-ask-q {
  color: #334155;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ci-thread-ask-act {
  background: none;
  border: 0;
  padding: 0 4px;
  font: 500 11.5px/1 'Google Sans Text', Roboto, sans-serif;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  opacity: .85;
}
.ci-thread-ask-act:hover { opacity: 1; }
@keyframes ci-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
#chief-askbtn, .chief-askbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0 2px;
  border-radius: 50%;
  cursor: pointer;
  user-select: none;
  color: #0b8a6c;
  border: 0;
  background: transparent;
  transition: background .12s, color .12s;
}
#chief-askbtn:hover, .chief-askbtn:hover {
  background: rgba(11, 138, 108, .12);
  color: #066952;
}
#chief-askbtn svg, .chief-askbtn svg {
  width: 19px;
  height: 19px;
  display: block;
  fill: currentColor;
}
.ci-row-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #e6f4ea;
  color: #0b8a6c;
  border: 1px solid #b7e1cd;
  margin-right: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ci-row-badge[data-verdict="decide-by"],
.ci-row-badge[data-verdict="reply-draft"] {
  background: #e8f0fe;
  color: #0b57d0;
  border-color: #d3e3fd;
}
.ci-row-badge[data-verdict="forward-to-action"] {
  background: #fef7e0;
  color: #b06000;
  border-color: #fde293;
}
.gmail-action-pills-bar #chief-thread-tell,
.gmail-action-pills-bar .ci-tell-strip {
  margin: 0;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.gmail-action-pills-bar .ci-actions {
  margin-top: 0;
}

@media (max-width: 820px) {
  #chief-inbox-panel, .ci-panel-wrap, .ci-tell-strip {
    max-width: 100%;
  }
  .ci-banner {
    padding: 10px 12px;
    overflow-x: auto;
  }
  .ci-banner table {
    display: block;
    overflow-x: auto;
  }
  .ci-composer-bar {
    flex-wrap: wrap;
    gap: 6px;
  }
  .ci-hint {
    width: 100%;
    margin-left: 0;
  }
  .ci-thread-ask {
    flex-wrap: wrap;
  }
  .ci-thread-ask-q {
    white-space: normal;
    word-break: break-word;
  }
}
