/* ==========================================================================
   GMAIL MATERIAL DESIGN 3 / WORKSPACE CLONE STYLES
   ========================================================================== */

:root {
  --gm-bg-main: #f6f8fc;
  --gm-surface: #ffffff;
  --gm-surface-hover: #f2f6fc;
  --gm-surface-active: #d3e3fd;
  --gm-surface-variant: #eaf1fb;
  --gm-text-primary: #1f1f1f;
  --gm-text-secondary: #444746;
  --gm-text-muted: #5f6368;
  --gm-primary-blue: #0b57d0;
  --gm-compose-bg: #c2e7ff;
  --gm-compose-text: #001d35;
  --gm-border-color: #e0e2e0;
  --gm-border-light: #f2f2f2;
  --gm-star-active: #f4b400;
  --gm-badge-green: #137333;
  --gm-badge-blue: #0b57d0;
  --gm-font-sans: 'Google Sans', Roboto, RobotoDraft, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--gm-font-sans);
  background-color: var(--gm-bg-main);
  color: var(--gm-text-primary);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   TOP HEADER
   ========================================================================== */
.gm-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background-color: var(--gm-bg-main);
  z-index: 100;
}

.gm-header-left {
  display: flex;
  align-items: center;
  width: 240px;
  min-width: 240px;
}

.gm-icon-btn {
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gm-text-secondary);
  transition: background-color 0.15s ease;
  user-select: none;
  text-decoration: none;
}

.gm-icon-btn:hover {
  background-color: rgba(68, 71, 70, 0.08);
}

.gm-icon-btn:active {
  background-color: rgba(68, 71, 70, 0.16);
}

.gm-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  text-decoration: none;
  color: var(--gm-text-secondary);
}

.gm-logo-icon {
  width: 32px;
  height: 24px;
}

.gm-logo-text {
  font-size: 22px;
  font-weight: 400;
  color: #444746;
  letter-spacing: -0.5px;
}

/* SEARCH BAR */
.gm-header-center {
  flex: 1;
  max-width: 720px;
  margin: 0 16px;
}

.gm-search-box {
  display: flex;
  align-items: center;
  background-color: var(--gm-surface-variant);
  border-radius: 28px;
  height: 48px;
  padding: 0 12px;
  transition: all 0.2s ease;
}

.gm-search-box:focus-within {
  background-color: #ffffff;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
}

.gm-search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 16px;
  color: var(--gm-text-primary);
  font-family: inherit;
  padding: 0 10px;
}

.gm-search-input::placeholder {
  color: var(--gm-text-secondary);
  font-size: 15px;
}

/* HEADER RIGHT */
.gm-header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.gm-gemini-btn {
  position: relative;
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 4px;
}

.gm-gemini-btn svg {
  width: 22px;
  height: 22px;
}

.gm-admin-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8f0fe;
  color: #1a73e8;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 16px;
  text-decoration: none;
  margin-right: 8px;
  border: 1px solid #c2e7ff;
  transition: all 0.2s;
}

.gm-admin-chip:hover {
  background: #c2e7ff;
  color: #001d35;
}

.gm-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #0b8043;
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 8px;
  user-select: none;
}

/* ==========================================================================
   APP BODY LAYOUT
   ========================================================================== */
.gm-body-wrapper {
  flex: 1;
  display: flex;
  height: calc(100vh - 64px);
  overflow: hidden;
  padding-bottom: 12px;
  padding-right: 12px;
}

/* ==========================================================================
   LEFT SIDEBAR
   ========================================================================== */
.gm-sidebar {
  width: 256px;
  min-width: 256px;
  padding: 8px 12px 16px 16px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  user-select: none;
}

.gm-compose-wrapper {
  padding: 8px 0 16px 0;
}

.gm-compose-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background-color: var(--gm-compose-bg);
  color: var(--gm-compose-text);
  border: none;
  border-radius: 16px;
  padding: 0 24px;
  height: 56px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
  transition: all 0.2s ease;
}

.gm-compose-btn:hover {
  box-shadow: 0 2px 6px 0 rgba(60, 64, 67, 0.3), 0 8px 12px 6px rgba(60, 64, 67, 0.15);
  background-color: #b8e2fe;
}

.gm-compose-btn .material-symbols-outlined {
  font-size: 24px;
}

.gm-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gm-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 16px;
  height: 36px;
  border-radius: 18px;
  cursor: pointer;
  color: var(--gm-text-primary);
  font-size: 14px;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.gm-nav-item:hover {
  background-color: rgba(68, 71, 70, 0.08);
}

.gm-nav-item.active {
  background-color: var(--gm-surface-active);
  font-weight: 700;
  color: #041e49;
}

.gm-nav-item.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1;
  color: #041e49;
}

.gm-nav-item-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gm-nav-item .material-symbols-outlined {
  font-size: 20px;
  color: var(--gm-text-secondary);
}

.gm-nav-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--gm-text-secondary);
}

.gm-nav-item.active .gm-nav-count {
  color: #041e49;
  font-weight: 700;
}

.gm-labels-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.gm-labels-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gm-text-secondary);
}

/* ==========================================================================
   MAIN CONTENT CARD
   ========================================================================== */
.gm-main-card {
  flex: 1;
  background-color: var(--gm-surface);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* TOOLBAR */
.gm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid var(--gm-border-light);
  min-height: 48px;
}

.gm-toolbar-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.gm-checkbox-dropdown {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
}

.gm-checkbox-dropdown:hover {
  background-color: rgba(68, 71, 70, 0.08);
}

.gm-custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #747775;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.gm-custom-checkbox:checked {
  background-color: var(--gm-primary-blue);
  border-color: var(--gm-primary-blue);
}

.gm-custom-checkbox:checked::after {
  content: '✔';
  color: #fff;
  font-size: 12px;
}

.gm-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gm-text-secondary);
}

.gm-pagination-info {
  margin-right: 4px;
  user-select: none;
}

/* TABS CONTAINER */
.gm-tabs-row {
  display: flex;
  border-bottom: 1px solid var(--gm-border-light);
  background-color: #ffffff;
}

.gm-tab {
  flex: 1;
  max-width: 250px;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s;
  user-select: none;
}

.gm-tab:hover {
  background-color: rgba(68, 71, 70, 0.04);
}

.gm-tab.active {
  color: var(--gm-primary-blue);
}

.gm-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--gm-primary-blue);
  border-radius: 3px 3px 0 0;
}

.gm-tab .material-symbols-outlined {
  font-size: 20px;
  color: var(--gm-text-secondary);
}

.gm-tab.active .material-symbols-outlined {
  color: var(--gm-primary-blue);
}

.gm-tab-content-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gm-tab-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gm-tab-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.gm-tab-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  color: #ffffff;
  white-space: nowrap;
}

.gm-badge-green {
  background-color: var(--gm-badge-green);
}

.gm-badge-blue {
  background-color: var(--gm-badge-blue);
}

.gm-tab-preview {
  font-size: 12px;
  color: var(--gm-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.gm-email-list-container {
  flex: 1;
  overflow-y: auto;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}

#emailList {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

.gm-mobile-infeed-cats {
  width: 100% !important;
}

.gm-email-row {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid #f2f2f2;
  cursor: pointer;
  position: relative;
  font-size: 14px;
  transition: background-color 0.1s, box-shadow 0.1s;
  background-color: #ffffff;
}

.gm-email-row.read {
  background-color: #f7f9fc;
}

.gm-email-row:hover {
  background-color: #f2f5f9;
  box-shadow: inset 1px 0 0 #dadce0, inset -1px 0 0 #dadce0, 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
  z-index: 2;
}

.gm-email-select {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 14px;
}

.gm-star-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c4c7c5;
}

.gm-star-btn:hover {
  color: #747775;
}

.gm-star-btn.starred {
  color: var(--gm-star-active);
}

.gm-star-btn.starred .material-symbols-outlined {
  font-variation-settings: 'FILL' 1;
}

.gm-email-sender {
  width: 180px;
  min-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  color: var(--gm-text-primary);
}

.gm-email-row.unread .gm-email-sender {
  font-weight: 700;
  color: #1f1f1f;
}

.gm-email-body-preview {
  flex: 1;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 16px;
  gap: 4px;
}

.gm-email-subject {
  color: var(--gm-text-primary);
  white-space: nowrap;
}

.gm-email-row.unread .gm-email-subject {
  font-weight: 700;
}

.gm-email-snippet {
  color: var(--gm-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gm-email-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 80px;
}

.gm-email-date {
  font-size: 12px;
  color: var(--gm-text-secondary);
  white-space: nowrap;
}

.gm-email-row.unread .gm-email-date {
  font-weight: 700;
  color: #1f1f1f;
}

/* HOVER ACTIONS */
.gm-row-actions {
  display: none;
  align-items: center;
  gap: 2px;
}

.gm-email-row:hover .gm-row-actions {
  display: flex;
}

.gm-email-row:hover .gm-email-date {
  display: none;
}

/* EMPTY STATE */
.gm-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: var(--gm-text-muted);
  gap: 12px;
}

/* ==========================================================================
   EMAIL DETAIL VIEW
   ========================================================================== */
.gm-detail-container {
  display: none;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  overflow-y: auto;
}

.gm-detail-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid var(--gm-border-light);
}

.gm-detail-content {
  padding: 24px 32px;
  flex: 1;
}

.gm-detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.gm-detail-subject {
  font-size: 22px;
  font-weight: 400;
  color: #1f1f1f;
  line-height: 1.3;
}

.gm-badge-tag {
  background: #e8eaed;
  color: #3c4043;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 10px;
  vertical-align: middle;
}

.gm-detail-sender-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.gm-detail-sender-info {
  display: flex;
  gap: 14px;
}

.gm-detail-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1a73e8;
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gm-detail-sender-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gm-detail-sender-name {
  font-weight: 600;
  font-size: 14px;
  color: #1f1f1f;
}

.gm-detail-sender-email {
  font-size: 12px;
  color: #5f6368;
}

.gm-detail-to-me {
  font-size: 12px;
  color: #5f6368;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  user-select: none;
}
.gm-detail-to-me:hover {
  color: #1f1f1f;
}

.gm-sender-details-card {
  background: #f8fafd;
  border: 1px solid #e0e3e7;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 6px 0 16px 0;
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: 0 1px 4px rgba(60, 64, 67, 0.1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gm-sender-details-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.gm-sd-label {
  width: 65px;
  min-width: 65px;
  color: #5f6368;
  font-weight: 500;
}
.gm-sd-val {
  color: #1f1f1f;
  flex: 1;
}

.gm-detail-date-time {
  font-size: 12px;
  color: #5f6368;
}

.gm-detail-body {
  font-size: 14px;
  line-height: 1.6;
  color: #202124;
  margin-top: 20px;
  padding-bottom: 40px;
}

.gm-detail-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.gm-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #747775;
  border-radius: 18px;
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  color: #1f1f1f;
  cursor: pointer;
}

.gm-btn-outline:hover {
  background: #f8fafd;
}

.gm-detail-email-card {
  display: block;
}

.gm-mobile-detail-star,
.gm-detail-date-inline,
.gm-detail-sender-quick-actions,
.gm-detail-mobile-bottom-bar {
  display: none;
}

/* ==========================================================================
   ATTACHMENTS & DEKONT PREVIEW (Görsel 3 ile Birebir)
   ========================================================================== */
.gm-detail-attachments {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gm-attachment-card {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border: 1px solid #e2dbd5;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  user-select: none;
}

.gm-attachment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.gm-attachment-preview {
  background: #ffffff;
  padding: 0;
  height: 185px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #e2dbd5;
}

/* Mini Bank Statement Thumbnail Layout */
.gm-mini-dekont {
  font-family: Arial, sans-serif;
  font-size: 8px;
  color: #1f1f1f;
  background: #ffffff;
  line-height: 1.25;
}

.gm-mini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e0dcd9;
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.gm-mini-brand {
  display: flex;
  align-items: center;
  gap: 4px;
}

.gm-mini-purple-accent {
  width: 5px;
  height: 22px;
  background: #4a123b;
  border-radius: 2px;
}

.gm-mini-logo-text {
  font-size: 15px;
  font-weight: 800;
  color: #102c57;
  letter-spacing: -0.5px;
}

.gm-mini-title-right {
  text-align: right;
}

.gm-mini-title-main {
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 12px;
  font-weight: bold;
  color: #222;
}

.gm-mini-title-sub {
  font-size: 8px;
  color: #666;
}

.gm-mini-grid {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.gm-mini-table {
  flex: 1.4;
  display: flex;
  flex-direction: column;
  gap: 2.5px;
}

.gm-mini-row {
  display: flex;
  justify-content: space-between;
  padding: 1px 2px;
}

.gm-mini-row.highlight {
  background: #fdf2ea;
  font-weight: bold;
}

.gm-mini-label {
  color: #666;
  font-size: 7.5px;
}

.gm-mini-val {
  color: #111;
  font-size: 7.5px;
  font-weight: 600;
  text-align: right;
}

.gm-mini-customer-box {
  flex: 0.9;
  border: 1px solid #e5e5e5;
  background: #fafafa;
  border-radius: 4px;
  padding: 4px 6px;
  height: fit-content;
}

.gm-mini-customer-name {
  font-weight: bold;
  font-size: 8px;
  color: #111;
  margin-bottom: 2px;
}

.gm-mini-customer-addr {
  font-size: 6.5px;
  color: #777;
  line-height: 1.2;
}

.gm-mini-notice {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px dashed #e0e0e0;
  font-size: 6.5px;
  color: #888;
  line-height: 1.2;
}

.gm-mini-notice-alert {
  color: #b3261e;
  font-weight: bold;
  margin-top: 2px;
}

/* Attachment Footer Bar (Apricot / Soft Peach) */
.gm-attachment-footer {
  background-color: #f4e3da;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gm-att-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.gm-pdf-tag {
  background-color: #d93025;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 3px 5px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gm-att-filename {
  font-size: 13px;
  font-weight: 500;
  color: #1f1f1f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gm-att-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.gm-att-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444746;
  transition: background-color 0.15s;
}

.gm-att-btn:hover {
  background-color: rgba(0, 0, 0, 0.08);
}

.gm-att-btn .material-symbols-outlined {
  font-size: 22px;
}

/* ==========================================================================
   DOCUMENT VIEWER MODAL (Tam Ekran Dekont Görüntüleyici)
   ========================================================================== */
.gm-doc-viewer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
}

.gm-viewer-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(32, 33, 36, 0.85);
  backdrop-filter: blur(4px);
}

.gm-viewer-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 2001;
}

.gm-viewer-topbar {
  height: 56px;
  background-color: #1f1f1f;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.gm-viewer-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.gm-viewer-title {
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gm-viewer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gm-viewer-icon-btn {
  background: transparent;
  border: none;
  color: #e3e3e3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.gm-viewer-icon-btn:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.gm-viewer-scroll-area {
  flex: 1;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  padding: 30px 16px;
  background-color: #323639;
}

.gm-viewer-paper {
  background-color: #ffffff;
  width: 100%;
  max-width: 780px;
  min-height: 960px;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  padding: 40px 48px;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  color: #1f1f1f;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .gm-viewer-paper {
    padding: 20px 16px;
    margin-bottom: 20px;
    min-height: auto;
  }
}

/* Full High-Res Dekont Layout inside Viewer */
.gm-full-dekont {
  display: flex;
  flex-direction: column;
}

.gm-fd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #5a1e45;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.gm-fd-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gm-fd-accent-bar {
  width: 10px;
  height: 48px;
  background: #4a123b;
  border-radius: 3px;
}

.gm-fd-bank-name {
  font-size: 28px;
  font-weight: 800;
  color: #102c57;
  letter-spacing: -1px;
}

.gm-fd-title-right {
  text-align: right;
}

.gm-fd-title-main {
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 22px;
  font-weight: bold;
  color: #1f1f1f;
}

.gm-fd-title-sub {
  font-size: 13px;
  color: #5f6368;
}

.gm-fd-grid {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}

.gm-fd-table {
  flex: 1.3;
  border-collapse: collapse;
  width: 100%;
}

.gm-fd-table td {
  padding: 5px 8px;
  font-size: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.gm-fd-table td.label {
  color: #5f6368;
}

.gm-fd-table td.val {
  font-weight: 600;
  color: #1f1f1f;
  text-align: right;
}

.gm-fd-table tr.highlight {
  background-color: #fef5ee;
}

.gm-fd-table tr.highlight td.val {
  color: #b3261e;
  font-weight: bold;
}

.gm-fd-customer-card {
  flex: 0.9;
  background-color: #f8f9fa;
  border: 1px solid #e1e3e5;
  border-radius: 8px;
  padding: 16px;
  height: fit-content;
}

.gm-fd-customer-name {
  font-size: 14px;
  font-weight: bold;
  color: #1f1f1f;
  margin-bottom: 6px;
}

.gm-fd-customer-info {
  font-size: 11.5px;
  color: #5f6368;
  line-height: 1.5;
}

.gm-fd-warning-box {
  background-color: #fdf7f4;
  border: 1px solid #f9d8c8;
  border-radius: 6px;
  padding: 14px;
  margin-top: 14px;
}

.gm-fd-warning-title {
  font-size: 12px;
  font-weight: bold;
  color: #9c4115;
  margin-bottom: 4px;
}

.gm-fd-warning-text {
  font-size: 11.5px;
  color: #444746;
  line-height: 1.4;
}

.gm-fd-warning-alert {
  color: #b3261e;
  font-weight: bold;
  margin-top: 6px;
}

.gm-fd-footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 10px;
  color: #747775;
}

/* Toast Message */
.gm-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #323232;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeInOut 3s forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, 10px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  85% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 10px); }
}

/* PRINT STYLES: Prints only the Dekont paper */
@media print {
  body * {
    visibility: hidden;
  }
  #docViewerModal,
  #docViewerModal * {
    visibility: visible;
  }
  .gm-viewer-topbar,
  .gm-viewer-backdrop {
    display: none !important;
  }
  .gm-viewer-scroll-area {
    padding: 0 !important;
    background: transparent !important;
  }
  .gm-viewer-paper {
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
}

/* ==========================================================================
   RIGHT MINI SIDEBAR
   ========================================================================== */
.gm-right-sidebar {
  width: 56px;
  min-width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 16px;
  gap: 16px;
  user-select: none;
}

.gm-side-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.gm-side-icon-btn:hover {
  background-color: rgba(68, 71, 70, 0.08);
}

.gm-side-icon-btn img,
.gm-side-icon-btn svg {
  width: 20px;
  height: 20px;
}

.gm-side-divider {
  width: 20px;
  height: 1px;
  background-color: #dadce0;
  margin: 4px 0;
}

/* ==========================================================================
   COMPOSE MODAL (POPUP)
   ========================================================================== */
.gm-compose-modal {
  position: fixed;
  bottom: 0;
  right: 80px;
  width: 510px;
  height: 480px;
  background: #ffffff;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: none;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
}

.gm-compose-header {
  height: 40px;
  background: #f2f6fc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #1f1f1f;
}

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

.gm-compose-input-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f2f2f2;
  padding: 6px 0;
}

.gm-compose-input-label {
  font-size: 13px;
  color: #5f6368;
  width: 50px;
}

.gm-compose-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
}

.gm-compose-textarea {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  padding: 10px 0;
  line-height: 1.5;
}

.gm-compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid #f2f2f2;
}

.gm-send-btn {
  background: #0b57d0;
  color: #ffffff;
  border: none;
  border-radius: 18px;
  height: 36px;
  padding: 0 20px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gm-send-btn:hover {
  background: #0842a0;
}

.gm-compose-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #5f6368;
}

/* ==========================================================================
   DESKTOP DEFAULT ELEMENTS FOR MOBILE HIDDEN
   ========================================================================== */
.gm-email-main-content {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.gm-email-header-line {
  display: flex;
  align-items: center;
}

.gm-email-separator {
  display: inline;
  color: #5f6368;
}

.gm-mobile-avatar,
.gm-mobile-meta,
.gm-mobile-star-wrap,
.gm-mobile-section-header,
.gm-mobile-infeed-cats,
.gm-mobile-menu-trigger,
.gm-mobile-search-avatar,
.gm-mobile-bottom-nav,
.gm-android-nav-bar,
.gm-fab-text {
  display: none;
}

/* ==========================================================================
   RESPONSIVE / MOBILE DESIGN (IMAGE 2 GMAIL APP CLONE)
   ========================================================================== */
.gm-mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 500;
}

.gm-fab {
  display: none;
}

@media (max-width: 992px) {
  .gm-right-sidebar {
    display: none;
  }
  
  .gm-body-wrapper {
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  /* Warm cream/peach background of Gmail Mobile */
  body {
    background-color: #fbf3f0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  /* TOP FLOATING SEARCH BAR */
  .gm-header {
    height: auto;
    padding: 10px 14px 4px 14px;
    background-color: transparent;
    display: block;
  }

  .gm-header-left {
    display: none !important;
  }

  .gm-header-right {
    display: none !important;
  }

  .gm-header-center {
    max-width: 100%;
    margin: 0;
    width: 100%;
  }

  .gm-search-box {
    background-color: #ffffff;
    border-radius: 28px;
    height: 52px;
    padding: 0 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .gm-mobile-menu-trigger {
    display: inline-flex !important;
    color: #444746;
    margin-right: 4px;
    width: 36px;
    height: 36px;
  }

  .gm-desktop-search-icon {
    display: none !important;
  }

  .gm-desktop-filter-icon {
    display: none !important;
  }

  .gm-search-input {
    font-size: 15px;
    color: #1f1f1f;
    padding: 0 8px;
  }

  .gm-search-input::placeholder {
    color: #444746;
    font-size: 15px;
  }

  .gm-mobile-search-avatar {
    display: flex !important;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #9c27b0;
    color: #ffffff;
    font-weight: 500;
    font-size: 14px;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    flex-shrink: 0;
  }

  /* SECTION TITLE (Birincil) */
  .gm-mobile-section-header {
    display: block !important;
    padding: 8px 18px 6px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #444746;
  }

  /* APP BODY & MAIN CARD */
  .gm-body-wrapper {
    padding: 0 10px;
    height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .gm-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -280px;
    width: 280px;
    background: #ffffff;
    z-index: 9999;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease;
  }

  .gm-sidebar.open {
    left: 0;
  }

  .gm-mobile-overlay.active {
    display: block;
    z-index: 9990;
  }

  .gm-compose-wrapper {
    display: none;
  }

  .gm-main-card {
    background-color: #ffffff;
    border-radius: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-bottom: 6px;
  }

  .gm-toolbar {
    display: none !important;
  }

  .gm-tabs-row {
    display: none !important;
  }

  .gm-email-list-container {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .gm-email-list-container::-webkit-scrollbar {
    display: none;
  }

  /* IN-FEED MOBILE CATEGORIES (Tanıtımlar & Güncellemeler) */
  .gm-mobile-infeed-cats {
    display: flex !important;
    flex-direction: column;
    border-bottom: 1px solid #f6f6f6;
  }

  .gm-mobile-cat-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 16px;
    cursor: pointer;
    border-bottom: 1px solid #f6f6f6;
    transition: background-color 0.15s;
  }

  .gm-mobile-cat-row:active {
    background-color: #f5f5f5;
  }

  .gm-mobile-cat-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .gm-mobile-cat-icon.icon-promo {
    color: #0b8043;
  }

  .gm-mobile-cat-icon.icon-updates {
    color: #d93025;
  }

  .gm-mobile-cat-info {
    flex: 1;
    min-width: 0;
  }

  .gm-mobile-cat-title-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
  }

  .gm-mobile-cat-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f1f1f;
  }

  .gm-mobile-cat-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
  }

  .gm-mobile-cat-badge.badge-green {
    background-color: #c4eed0;
    color: #07521e;
  }

  .gm-mobile-cat-badge.badge-orange {
    background-color: #fedfc8;
    color: #7c2d12;
  }

  .gm-mobile-cat-snippet {
    font-size: 12px;
    color: #5f6368;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* EMAIL ROWS IN MOBILE APP FORMAT */
  .gm-email-row {
    display: flex !important;
    align-items: flex-start;
    padding: 12px 16px;
    height: auto;
    border-bottom: 1px solid #f6f6f6;
    position: relative;
    background-color: #ffffff;
  }

  .gm-email-row.read {
    background-color: #ffffff;
  }

  .gm-email-select {
    display: none !important;
  }

  .gm-email-right {
    display: none !important;
  }

  .gm-mobile-avatar {
    display: flex !important;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    margin-top: 2px;
    flex-shrink: 0;
  }

  .gm-email-main-content {
    flex: 1;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    min-width: 0 !important;
    padding-right: 28px;
    text-align: left !important;
  }

  .gm-email-header-line {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin-bottom: 2px;
  }

  .gm-email-sender {
    font-size: 15px;
    font-weight: 500;
    color: #1f1f1f;
    width: auto;
    max-width: 70%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left !important;
  }

  .gm-email-row.unread .gm-email-sender {
    font-weight: 700;
    color: #1f1f1f;
  }

  .gm-mobile-meta {
    display: flex !important;
    align-items: center !important;
    gap: 6px;
    margin-left: auto;
  }

  .gm-email-date-mobile {
    font-size: 12px;
    color: #5f6368;
    white-space: nowrap;
  }

  .gm-email-row.unread .gm-email-date-mobile {
    font-weight: 700;
    color: #1f1f1f;
  }

  .gm-unread-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #5c3b1e;
    display: inline-block;
  }

  .gm-email-body-preview {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important; /* CRITICAL: Must be flex-start to prevent horizontal centering */
    text-align: left !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 1px !important;
    white-space: normal !important;
    padding-right: 0 !important;
  }

  .gm-email-separator {
    display: none !important;
  }

  .gm-email-subject {
    font-size: 13.5px;
    color: #1f1f1f;
    width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.35;
    font-weight: 400;
    text-align: left !important;
    display: block !important;
  }

  .gm-email-row.unread .gm-email-subject {
    font-weight: 700;
  }

  .gm-email-snippet {
    font-size: 13px;
    color: #5f6368;
    width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.35;
    margin-top: 1px;
    text-align: left !important;
    display: block !important;
  }

  /* MOBILE STAR BUTTON */
  .gm-mobile-star-wrap {
    display: flex !important;
    position: absolute;
    right: 14px;
    bottom: 12px;
  }

  .mobile-star-btn {
    background: transparent;
    border: none;
    color: #747775;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-star-btn .material-symbols-outlined {
    font-size: 20px;
  }

  .mobile-star-btn.starred {
    color: #f4b400;
  }

  .mobile-star-btn.starred .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
  }

  /* FLOATING ACTION BUTTON (Oluştur) */
  .gm-fab {
    display: flex !important;
    align-items: center;
    gap: 10px;
    position: fixed;
    bottom: 74px;
    right: 16px;
    background-color: #ffd8cf;
    color: #3d1b15;
    border-radius: 16px;
    padding: 0 20px 0 16px;
    height: 52px;
    width: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    z-index: 900;
  }

  .gm-fab-text {
    display: inline-block !important;
    color: #3d1b15;
    font-size: 14px;
    font-weight: 600;
  }

  .gm-fab .material-symbols-outlined {
    font-size: 22px;
    color: #3d1b15;
  }

  /* MOBILE BOTTOM NAVIGATION BAR */
  .gm-mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 22px;
    left: 0;
    right: 0;
    height: 48px;
    background-color: #fbf3f0;
    align-items: center;
    justify-content: space-around;
    z-index: 800;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
  }

  .gm-bottom-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    cursor: pointer;
  }

  .gm-bottom-nav-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 32px;
    border-radius: 16px;
  }

  .gm-bottom-nav-item.active .gm-bottom-nav-pill {
    background-color: #ffd8cf;
  }

  .gm-bottom-nav-item .material-symbols-outlined {
    font-size: 22px;
    color: #1f1f1f;
  }

  .gm-bottom-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #b3261e;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
  }

  /* ANDROID SYSTEM NAVIGATION BAR */
  .gm-android-nav-bar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 22px;
    background-color: #fbf3f0;
    align-items: center;
    justify-content: space-around;
    color: #747775;
    z-index: 800;
  }

  .gm-android-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
  }

  /* COMPOSE MODAL ON MOBILE */
  .gm-compose-modal {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 90vh;
    border-radius: 16px 16px 0 0;
  }

  /* ========================================================================
     MOBILE DETAIL VIEW (Fotoğraf 2 ile Birebir Aynı)
     ======================================================================== */
  body.reading-email {
    background-color: #fbf3f0 !important;
    overflow-y: auto !important;
  }

  body.reading-email .gm-header,
  body.reading-email .gm-mobile-section-header,
  body.reading-email .gm-fab,
  body.reading-email .gm-mobile-bottom-nav,
  body.reading-email .gm-android-nav-bar {
    display: none !important;
  }

  body.reading-email .gm-body-wrapper {
    height: auto !important;
    min-height: 100vh !important;
    padding: 0 !important;
    margin: 0 !important;
    background-color: #fbf3f0 !important;
    overflow-y: visible !important;
  }

  body.reading-email .gm-main-card {
    height: auto !important;
    min-height: 100vh !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  /* Detail Container */
  .gm-detail-container {
    background-color: #fbf3f0 !important;
    min-height: 100vh !important;
    padding: 0 0 96px 0 !important; /* bottom padding for floating bar */
    box-sizing: border-box !important;
    display: none;
    flex-direction: column !important;
  }

  body.reading-email .gm-detail-container {
    display: flex !important;
  }

  /* Top Header Bar */
  .gm-detail-header-bar {
    background-color: #fbf3f0 !important;
    border-bottom: none !important;
    padding: 10px 8px 6px 8px !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
  }

  .gm-detail-header-bar .gm-icon-btn {
    width: 44px !important;
    height: 44px !important;
    color: #1f1f1f !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .gm-detail-header-bar .gm-icon-btn .material-symbols-outlined {
    font-size: 24px !important;
    color: #1f1f1f !important;
  }

  .gm-detail-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  .gm-detail-header-actions .desktop-only-icon {
    display: none !important;
  }

  /* Detail Content */
  .gm-detail-content {
    padding: 0 10px 110px 10px !important;
    background: transparent !important;
    flex: 1 !important;
    box-sizing: border-box !important;
  }

  /* Title / Subject Row */
  .gm-detail-title-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 6px 14px 6px !important;
    margin-bottom: 0 !important;
    gap: 8px !important;
  }

  .gm-detail-subject-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 !important;
    min-width: 0 !important;
    flex-wrap: wrap !important;
  }

  .gm-detail-subject {
    font-size: 20px !important;
    font-weight: 500 !important;
    color: #1f1f1f !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    word-break: break-word !important;
  }

  .gm-badge-tag {
    background-color: #fedfc8 !important;
    color: #5c3b1e !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    margin-left: 0 !important;
    display: inline-block !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
  }

  .gm-mobile-detail-star {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    color: #444746 !important;
    padding: 0 !important;
    margin-left: auto !important;
  }

  .gm-mobile-detail-star .material-symbols-outlined {
    font-size: 24px !important;
    color: #444746 !important;
  }

  .gm-mobile-detail-star.starred {
    color: #f4b400 !important;
  }

  .gm-mobile-detail-star.starred .material-symbols-outlined {
    color: #f4b400 !important;
    font-variation-settings: 'FILL' 1 !important;
  }

  /* White Card containing Sender Info + Email Body */
  .gm-detail-email-card {
    background: #ffffff !important;
    border-radius: 20px !important;
    padding: 16px 14px 20px 14px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Sender Row inside White Card */
  .gm-detail-sender-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 16px !important;
    padding-bottom: 4px !important;
  }

  .gm-detail-sender-info {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .gm-detail-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 50% !important;
    background: #af52de !important;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .gm-detail-sender-meta {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    min-width: 0 !important;
  }

  .gm-detail-name-line {
    display: flex !important;
    align-items: baseline !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  .gm-detail-sender-name {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1f1f1f !important;
    white-space: nowrap !important;
  }

  .gm-detail-date-inline {
    display: inline-block !important;
    font-size: 11.5px !important;
    color: #5f6368 !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .gm-detail-sender-email {
    display: none !important;
  }

  .gm-detail-to-me {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    font-size: 12px !important;
    color: #5f6368 !important;
    cursor: pointer !important;
    padding: 2px 4px 2px 0 !important;
    border-radius: 4px !important;
    width: fit-content !important;
    user-select: none !important;
  }

  .gm-detail-to-me:active {
    background-color: rgba(0,0,0,0.05) !important;
  }

  .gm-detail-to-me #detailToMeArrow {
    transition: transform 0.2s ease !important;
  }

  .gm-detail-to-me.expanded #detailToMeArrow {
    transform: rotate(180deg) !important;
  }

  /* Mobile Sender Details Card (Revealed on click) */
  .gm-sender-details-card {
    background: #f8fafd !important;
    border: 1px solid #e0e3e7 !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    margin: 4px 0 14px 0 !important;
    font-size: 12.5px !important;
    line-height: 1.5 !important;
    box-shadow: 0 2px 6px rgba(60, 64, 67, 0.08) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    animation: gmFadeDown 0.15s ease-out !important;
  }

  @keyframes gmFadeDown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .gm-sender-details-row {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .gm-sd-label {
    width: 62px !important;
    min-width: 62px !important;
    color: #5f6368 !important;
    font-weight: 500 !important;
    font-size: 12px !important;
  }

  .gm-sd-val {
    color: #1f1f1f !important;
    flex: 1 !important;
    word-break: break-word !important;
    font-size: 12.5px !important;
  }

  .gm-detail-sender-quick-actions {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    flex-shrink: 0 !important;
  }

  .gm-mobile-sender-action {
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #444746 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    padding: 0 !important;
  }

  /* HTML Body */
  .gm-detail-body {
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #1f1f1f !important;
    margin-top: 0 !important;
    padding-bottom: 24px !important;
    word-break: break-word !important;
    overflow-x: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .gm-detail-body img {
    max-width: 100% !important;
    height: auto !important;
  }

  .gm-detail-body img.CToWUd {
    width: 100% !important;
    max-width: 700px !important;
    display: block !important;
  }

  .gm-detail-body table {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .gm-detail-body td {
    box-sizing: border-box !important;
  }

  .gm-detail-body td[style*="padding-left:37px"],
  .gm-detail-body td[style*="padding-left: 37px"] {
    padding-left: 18px !important;
    padding-right: 18px !important;
    padding-top: 20px !important;
  }

  /* Desktop actions hide */
  .gm-detail-actions {
    display: none !important;
  }

  /* Mobile Bottom Floating Action Bar */
  .gm-detail-mobile-bottom-bar {
    display: flex !important;
    position: fixed !important;
    bottom: 16px !important;
    left: 12px !important;
    right: 12px !important;
    gap: 10px !important;
    z-index: 999 !important;
    pointer-events: auto !important;
  }

  .gm-pill-btn {
    flex: 1 !important;
    height: 52px !important;
    background-color: #53433e !important;
    color: #ffffff !important;
    border-radius: 26px !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 14.5px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    transition: background-color 0.15s, transform 0.1s !important;
  }

  .gm-pill-btn:active {
    background-color: #3f322e !important;
    transform: scale(0.98) !important;
  }

  .gm-pill-btn .material-symbols-outlined {
    font-size: 20px !important;
    color: #ffffff !important;
  }

  .gm-circle-btn {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    background-color: #53433e !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    transition: background-color 0.15s, transform 0.1s !important;
  }

  .gm-circle-btn:active {
    background-color: #3f322e !important;
    transform: scale(0.95) !important;
  }

  .gm-circle-btn .material-symbols-outlined {
    font-size: 22px !important;
    color: #ffffff !important;
  }
}
