.emails-page-scroll{flex-direction:column;min-height:0;display:flex;overflow:hidden}.emails-page-scroll>.main-content-inner{box-sizing:border-box;flex-direction:column;flex:1;width:100%;max-width:100%;min-height:0;padding-left:1rem;padding-right:1rem;display:flex;overflow:hidden}.emails-page.main-container{flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.emails-page .emails-stats-grid,.emails-page .page-filter-card{flex-shrink:0}.emails-page .emails-stats-grid{margin-bottom:.75rem}.emails-page .emails-stats-grid .card{border-radius:12px;transition:transform .18s,box-shadow .18s,border-color .18s}.emails-page .emails-stats-grid .kpi-card{border:1px solid var(--border-color);box-shadow:var(--shadow);cursor:pointer;background:var(--bg-card,#fff);border-radius:14px;position:relative;overflow:hidden}.emails-page .emails-stats-grid .kpi-card:hover{transform:translateY(-2px);box-shadow:0 8px 20px #0f17201a}.emails-page .emails-stats-grid .kpi-card:before{content:"";background:var(--primary-color);border-radius:14px 14px 0 0;height:3px;position:absolute;top:0;left:0;right:0}.emails-page .emails-stats-grid .kpi-blue:before{background:linear-gradient(90deg,#0d9488,#2dd4bf)}.emails-page .emails-stats-grid .kpi-green:before{background:linear-gradient(90deg,#059669,#34d399)}.emails-page .emails-stats-grid .kpi-yellow:before{background:linear-gradient(90deg,#d97706,#fbbf24)}.emails-page .emails-stats-grid .kpi-purple:before{background:linear-gradient(90deg,#7c3aed,#a78bfa)}.emails-page .emails-stats-grid .kpi-red:before{background:linear-gradient(90deg,#dc2626,#f87171)}.emails-page .emails-stats-grid .card .card-body{flex-direction:column;justify-content:center;min-height:64px;display:flex;padding:10px 12px!important}.emails-page .emails-stats-grid .hyper-statistic{margin-bottom:0!important}.emails-page .emails-stats-grid .hyper-statistic-content{justify-content:space-between;align-items:center;gap:10px;display:flex}.emails-page .emails-stats-grid .hyper-statistic-value{letter-spacing:-.02em;color:var(--text-primary,#1e293b);order:1;font-weight:700}.emails-page .emails-stats-grid .kpi-card .hyper-statistic-prefix{color:#0d9488;background:#0d94881f;border:1px solid #0d94882e;border-radius:10px;flex-shrink:0;order:2;place-items:center;width:36px;height:36px;margin-inline-end:0!important;padding:0!important;font-size:0!important;line-height:0!important;display:grid!important}.emails-page .emails-stats-grid .kpi-card .hyper-statistic-prefix i.mdi,.emails-page .emails-stats-grid .kpi-card .hyper-statistic-prefix i.ri{place-items:center;vertical-align:middle!important;font-size:16px!important;line-height:1!important;display:grid!important}.emails-page .emails-stats-grid .kpi-card .hyper-statistic-prefix i.mdi svg,.emails-page .emails-stats-grid .kpi-card .hyper-statistic-prefix i.ri svg,.emails-page .emails-stats-grid .kpi-card .hyper-statistic-prefix svg{vertical-align:middle;width:16px;height:16px;display:block}.emails-page .emails-stats-grid .kpi-green .hyper-statistic-prefix{color:#059669;background:#10b98124;border-color:#10b98138}.emails-page .emails-stats-grid .kpi-yellow .hyper-statistic-prefix{color:#d97706;background:#f59e0b24;border-color:#f59e0b38}.emails-page .emails-stats-grid .kpi-purple .hyper-statistic-prefix{color:#7c3aed;background:#7c3aed1f;border-color:#7c3aed33}.emails-page .emails-stats-grid .kpi-red .hyper-statistic-prefix{color:var(--danger-color);background:#dc35451f;border-color:#dc354533}.emails-page .emails-stats-grid .hyper-statistic-title{color:var(--text-secondary,#64748b);font-size:12px;font-weight:600;line-height:1.25;margin-bottom:2px!important}.emails-page .emails-stats-grid .hyper-statistic-content{font-size:22px;line-height:1.15}.emails-page .emails-stats-grid .card:not(.kpi-card) .hyper-statistic-prefix{font-size:14px;margin-inline-end:4px!important}.emails-page .emails-stats-grid .hyper-statistic-value{font-size:22px}.emails-page .emails-stats-grid .text-muted,.emails-page .emails-stats-grid .text-body-secondary{line-height:1.25;display:block;color:var(--text-secondary,#64748b)!important;margin-top:4px!important;font-size:11px!important}[data-theme=dark] .emails-page .emails-stats-grid .kpi-card,html[data-theme=dark] .emails-page .emails-stats-grid .kpi-card,html[data-bs-theme=dark] .emails-page .emails-stats-grid .kpi-card{background:linear-gradient(165deg,#3f4a57 0%,#36414e 48%,#313a46 100%);border-color:#ffffff1a;box-shadow:0 0 0 1px #00000040,0 10px 24px #00000047}[data-theme=dark] .emails-page .emails-stats-grid .kpi-card:hover,html[data-theme=dark] .emails-page .emails-stats-grid .kpi-card:hover,html[data-bs-theme=dark] .emails-page .emails-stats-grid .kpi-card:hover{border-color:#2dd4bf59;box-shadow:0 0 0 1px #2dd4bf33,0 12px 28px #0006,0 0 24px #2dd4bf1f}[data-theme=dark] .emails-page .emails-stats-grid .kpi-card:before,html[data-theme=dark] .emails-page .emails-stats-grid .kpi-card:before,html[data-bs-theme=dark] .emails-page .emails-stats-grid .kpi-card:before{height:4px}[data-theme=dark] .emails-page .emails-stats-grid .kpi-blue,html[data-theme=dark] .emails-page .emails-stats-grid .kpi-blue,html[data-bs-theme=dark] .emails-page .emails-stats-grid .kpi-blue{background:linear-gradient(155deg,#0d948838 0%,#3a4552 42%,#313a46 100%)}[data-theme=dark] .emails-page .emails-stats-grid .kpi-purple,html[data-theme=dark] .emails-page .emails-stats-grid .kpi-purple,html[data-bs-theme=dark] .emails-page .emails-stats-grid .kpi-purple{background:linear-gradient(155deg,#7c3aed38 0%,#3a4552 42%,#313a46 100%)}[data-theme=dark] .emails-page .emails-stats-grid .kpi-yellow,html[data-theme=dark] .emails-page .emails-stats-grid .kpi-yellow,html[data-bs-theme=dark] .emails-page .emails-stats-grid .kpi-yellow{background:linear-gradient(155deg,#f59e0b33 0%,#3a4552 42%,#313a46 100%)}[data-theme=dark] .emails-page .emails-stats-grid .kpi-green,html[data-theme=dark] .emails-page .emails-stats-grid .kpi-green,html[data-bs-theme=dark] .emails-page .emails-stats-grid .kpi-green{background:linear-gradient(155deg,#10b98138 0%,#3a4552 42%,#313a46 100%)}[data-theme=dark] .emails-page .emails-stats-grid .hyper-statistic-title,html[data-theme=dark] .emails-page .emails-stats-grid .hyper-statistic-title,html[data-bs-theme=dark] .emails-page .emails-stats-grid .hyper-statistic-title{color:#c5d0db!important}[data-theme=dark] .emails-page .emails-stats-grid .hyper-statistic-value,html[data-theme=dark] .emails-page .emails-stats-grid .hyper-statistic-value,html[data-bs-theme=dark] .emails-page .emails-stats-grid .hyper-statistic-value{color:#f1f5f9!important}[data-theme=dark] .emails-page .emails-stats-grid .text-muted,[data-theme=dark] .emails-page .emails-stats-grid .text-body-secondary,html[data-theme=dark] .emails-page .emails-stats-grid .text-muted,html[data-theme=dark] .emails-page .emails-stats-grid .text-body-secondary,html[data-bs-theme=dark] .emails-page .emails-stats-grid .text-muted,html[data-bs-theme=dark] .emails-page .emails-stats-grid .text-body-secondary{color:#9aa8b8!important}[data-theme=dark] .emails-page .emails-stats-grid .kpi-blue .hyper-statistic-prefix,html[data-theme=dark] .emails-page .emails-stats-grid .kpi-blue .hyper-statistic-prefix,html[data-bs-theme=dark] .emails-page .emails-stats-grid .kpi-blue .hyper-statistic-prefix{color:#5eead4;background:#2dd4bf2e;border-color:#2dd4bf59;box-shadow:0 0 16px #2dd4bf26}[data-theme=dark] .emails-page .emails-stats-grid .kpi-purple .hyper-statistic-prefix,html[data-theme=dark] .emails-page .emails-stats-grid .kpi-purple .hyper-statistic-prefix,html[data-bs-theme=dark] .emails-page .emails-stats-grid .kpi-purple .hyper-statistic-prefix{color:#c4b5fd;background:#a78bfa2e;border-color:#a78bfa59;box-shadow:0 0 16px #a78bfa26}[data-theme=dark] .emails-page .emails-stats-grid .kpi-yellow .hyper-statistic-prefix,html[data-theme=dark] .emails-page .emails-stats-grid .kpi-yellow .hyper-statistic-prefix,html[data-bs-theme=dark] .emails-page .emails-stats-grid .kpi-yellow .hyper-statistic-prefix{color:#fbbf24;background:#fbbf242e;border-color:#fbbf2459;box-shadow:0 0 16px #fbbf2426}[data-theme=dark] .emails-page .emails-stats-grid .kpi-green .hyper-statistic-prefix,html[data-theme=dark] .emails-page .emails-stats-grid .kpi-green .hyper-statistic-prefix,html[data-bs-theme=dark] .emails-page .emails-stats-grid .kpi-green .hyper-statistic-prefix{color:#6ee7b7;background:#34d3992e;border-color:#34d39959;box-shadow:0 0 16px #34d39926}@media (max-width:575.98px){.emails-page .emails-stats-grid .card .card-body{min-height:60px;padding:10px!important}.emails-page .emails-stats-grid .hyper-statistic-value,.emails-page .emails-stats-grid .hyper-statistic-content{font-size:18px!important}.emails-page .emails-stats-grid .kpi-card .hyper-statistic-prefix{width:32px;height:32px}}.emails-page .page-filter-card{margin-bottom:.75rem!important}.emails-page .emails-page-body{box-sizing:border-box;flex-direction:column;flex:1;width:100%;min-width:0;max-width:none;min-height:0;margin:0;padding:0;display:flex;overflow:hidden}.emails-page .emails-page-body>.mail-ui.email-wrap.emails-layout{flex:1;width:100%;min-width:0;min-height:0}.emails-page .emails-stats-grid,.emails-page .page-filter-card,.emails-page .mail-ui.email-wrap.emails-layout{box-sizing:border-box;width:100%;max-width:100%}.emails-page .mail-ui.email-wrap.emails-layout{grid-template-columns:minmax(280px,34%) 1fr}@media (min-width:1400px){.emails-page .mail-ui.email-wrap.emails-layout{grid-template-columns:minmax(320px,30%) 1fr}}@media (max-width:1200px){.emails-page .mail-ui.email-wrap.emails-layout{grid-template-columns:minmax(260px,38%) 1fr}}.emails-page .mail-ui .email-detail{flex-direction:column;padding:0;display:flex;overflow:hidden}.emails-page .mail-ui .gmail-preview-header{border-bottom:1px solid var(--border-color);background:var(--bg-card);flex-direction:column;flex-shrink:0;gap:0;padding:4px 8px 0;display:flex}.emails-page .mail-ui .gmail-toolbar{align-items:center;min-height:40px;padding:0 4px;display:flex}.emails-page .mail-ui .gmail-toolbar-start{scrollbar-width:none;flex-wrap:nowrap;align-items:center;gap:2px;min-width:0;display:flex;overflow-x:auto}.emails-page .mail-ui .gmail-toolbar-start::-webkit-scrollbar{display:none}.emails-page .mail-ui .gmail-toolbar-divider{background:var(--border-color);flex-shrink:0;width:1px;height:20px;margin:0 4px}.emails-page .mail-ui .gmail-icon-btn{flex-shrink:0;justify-content:center;align-items:center;width:32px!important;min-width:32px!important;height:32px!important;color:var(--text-secondary)!important;border-radius:50%!important;padding:0!important;font-size:16px!important;display:inline-flex!important}.emails-page .mail-ui .gmail-icon-btn:hover{background:var(--bg-hover,#0000000f)!important;color:var(--text-primary)!important}.emails-page .mail-ui .gmail-icon-btn-primary{color:var(--primary-color)!important}.emails-page .mail-ui .gmail-icon-btn-danger:hover{color:#ff4d4f!important;background:#ff4d4f14!important}.emails-page .mail-ui .gmail-icon-btn .fas{font-size:14px;line-height:1}.emails-page .mail-ui .gmail-subject-row{align-items:flex-start;gap:8px;min-width:0;padding:4px 12px 2px;display:flex}.emails-page .mail-ui .gmail-subject{word-break:break-word;flex:auto;min-width:0;margin:0!important;font-size:20px!important;font-weight:400!important;line-height:1.3!important}.emails-page .mail-ui .gmail-subject-tags{flex-wrap:wrap;flex-shrink:0;align-items:center;gap:4px;padding-top:4px;display:flex}.emails-page .mail-ui .gmail-subject-tags .badge{margin:0;padding:0 6px;font-size:11px;line-height:18px}.emails-page .mail-ui .gmail-sender-row{align-items:flex-start;gap:12px;min-width:0;padding:8px 12px 10px;display:flex}.emails-page .mail-ui .gmail-sender-avatar{flex-shrink:0;font-weight:600;background:var(--primary-color)!important;font-size:14px!important}.emails-page .mail-ui .gmail-sender-info{flex:auto;min-width:0;overflow:hidden}.emails-page .mail-ui .gmail-sender-line{flex-wrap:wrap;align-items:baseline;gap:6px;min-width:0;line-height:1.4;display:flex}.emails-page .mail-ui .gmail-sender-name{color:var(--text-primary);font-size:14px;font-weight:600}.emails-page .mail-ui .gmail-sender-email{color:var(--text-secondary);word-break:break-all;font-size:12px}.emails-page .mail-ui .gmail-sender-to{color:var(--text-secondary);white-space:nowrap;text-overflow:ellipsis;margin-top:2px;font-size:12px;overflow:hidden}.emails-page .mail-ui .gmail-sender-to-target{color:var(--text-primary);cursor:default}.emails-page .mail-ui .gmail-sender-meta{flex-shrink:0;align-items:center;gap:4px;margin-left:auto;display:flex}.emails-page .mail-ui .gmail-sender-date{color:var(--text-secondary);white-space:nowrap;font-size:12px}.emails-page .mail-ui .email-detail-scroll,.emails-page .mail-ui .gmail-detail-scroll{flex:1;min-height:0;padding:8px 16px 16px;overflow:hidden auto}.emails-page .mail-ui .attachments-section h3{margin-bottom:8px;font-size:14px}.emails-filter-toolbar{flex-wrap:nowrap;align-items:center;gap:8px;width:100%;min-width:0;display:flex;overflow-x:auto}.emails-filter-toolbar .app-date-range-field{flex-shrink:0;flex-wrap:nowrap!important}.emails-filter-toolbar .emails-filter-segmented{flex-shrink:0}.emails-filter-toolbar .emails-filter-actions{flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px;margin-left:auto;display:flex}.emails-filter-toolbar .emails-filter-actions .emails-filter-search{flex-wrap:nowrap;flex:0 220px;align-items:stretch;min-width:160px;display:flex}.emails-filter-toolbar .emails-filter-actions .emails-filter-search>.form-control{flex:auto;min-width:0}.emails-filter-toolbar .emails-filter-actions .emails-filter-search>.btn,.emails-filter-toolbar .emails-filter-actions .emails-filter-search>.input-group-text{flex-shrink:0}.emails-filter-toolbar .emails-filter-actions .ant-btn,.emails-filter-toolbar .emails-filter-actions .btn{white-space:nowrap;flex-shrink:0}.emails-page .page-filter-card .card-body{padding:10px 14px}.emails-page .email-list-scroll{min-height:calc(var(--email-row-min-height,96px) * 6)}@media (max-width:1100px){.emails-page-scroll{overflow:hidden auto}.emails-page-scroll>.main-content-inner,.emails-page.main-container{min-height:auto;overflow:visible}.emails-page .emails-page-body{flex:none;min-height:auto;overflow:visible}.emails-page .emails-page-body>.mail-ui.email-wrap.emails-layout{flex:none;height:auto;min-height:min(420px,52vh)}.emails-page .emails-stats-grid .card .card-body{padding:8px 10px!important}.emails-page .emails-stats-grid .hyper-statistic-title{line-height:1.2;font-size:10px!important}.emails-page .emails-stats-grid .hyper-statistic-content{font-size:16px!important}.emails-page .emails-stats-grid .hyper-statistic-prefix{font-size:13px!important}.emails-page .emails-stats-grid .text-muted{font-size:9px!important}.emails-page .emails-filter-toolbar{flex-direction:column;align-items:stretch;gap:10px}.emails-page .emails-filter-toolbar .emails-filter-segmented{width:100%;overflow-x:auto}.emails-page .emails-filter-toolbar .emails-filter-segmented .btn-group{min-width:max-content}.emails-page .emails-filter-toolbar .emails-filter-actions{width:100%;margin-left:0}.emails-page .email-list-scroll{min-height:0}.emails-page .mail-ui.email-wrap.emails-layout{flex:1;grid-template-rows:minmax(0,1fr);grid-template-columns:1fr;min-height:0}.emails-page .mail-ui .email-list{border-bottom:none;border-right:none;height:auto;min-height:min(360px,48vh);max-height:none}.emails-page .mail-ui .email-detail{display:none!important}.emails-page .mail-ui .email-detail.mobile-active{top:var(--app-chrome-bar-height,56px);z-index:500;background:var(--bg-card);border-radius:0;flex-direction:column;margin:0;padding:0;position:fixed;bottom:0;left:0;right:0;display:flex!important}.emails-page .mail-ui .email-detail.mobile-active .gmail-toolbar{justify-content:flex-end;padding:4px 10px 0}.emails-page .mail-ui .email-detail.mobile-active .gmail-toolbar-start{flex-direction:row-reverse;justify-content:flex-start}.emails-page .mail-ui .email-detail.mobile-active .gmail-subject{font-size:16px!important}.emails-page .mail-ui .email-detail.mobile-active .gmail-subject-row{flex-direction:column;align-items:flex-start;gap:4px;padding:4px 12px 2px}.emails-page .mail-ui .email-detail.mobile-active .gmail-sender-row{flex-wrap:wrap;gap:8px}.emails-page .mail-ui .email-detail.mobile-active .gmail-sender-meta{width:100%;margin-left:52px}.emails-page .mail-ui .email-detail.mobile-active .gmail-sender-date{white-space:normal}.emails-page .mail-ui .email-detail.mobile-active .email-detail-scroll,.emails-page .mail-ui .email-detail.mobile-active .gmail-detail-scroll{padding:8px 10px 12px}.emails-page .mail-ui .email-detail.mobile-active .email-body{box-sizing:border-box;width:100%;max-height:none;margin:0;padding:8px;overflow:hidden visible}.emails-page .mail-ui .email-detail.mobile-active .email-body iframe{width:100%!important;max-width:100%!important}.emails-page .mail-ui .email-detail.mobile-active .attachments-section{padding-bottom:12px}.emails-page .mail-ui .email-list-pagination{flex-direction:column;align-items:stretch;gap:.5rem}.emails-page .mail-ui .email-list-pagination>div{justify-content:center}}.header{background:var(--bg-card);box-shadow:var(--shadow);border-radius:8px;margin-bottom:20px;padding:20px}.header h1{margin-bottom:10px;font-size:28px}.toolbar{background:var(--bg-card);box-shadow:var(--shadow);border-radius:8px;flex-wrap:wrap;flex-shrink:0;align-items:center;gap:8px;margin-bottom:.6rem;padding:8px 12px;display:flex}.date-range-filter{background:var(--bg-card);border:1px solid var(--border-color);border-radius:6px;align-items:center;gap:6px;padding:4px 8px;display:flex}.date-range-filter input[type=date]{border:1px solid var(--border-color);background:var(--bg-secondary);color:var(--text-primary);border-radius:4px;padding:3px 6px;font-size:12px}.filter-group{gap:8px;display:flex}.mail-ui.email-wrap>.email-detail{box-shadow:none;border:none;border-radius:0;height:100%;min-height:0}.mobile-back-btn{background:var(--primary-color);color:#fff;cursor:pointer;border:none;border-radius:8px;align-items:center;gap:.5rem;width:100%;margin-bottom:1rem;padding:.75rem 1rem;font-size:14px;font-weight:500;display:none}.mobile-back-btn:hover{opacity:.9}.email-item{border-bottom:1px solid var(--border-color);cursor:pointer;padding:12px;transition:background .2s;position:relative}.email-item:hover{background:var(--bg-secondary)}.email-item.active{border-left:3px solid var(--primary-color);background:#e7f3ff}.email-item.work-order{border-left:3px solid var(--success-color)}.email-item.work-order.active{border-left:3px solid var(--primary-color);background:#e7f3ff}.email-item.selected{background:#1a7f5f1a}.email-checkbox{cursor:pointer;z-index:10;width:18px;height:18px;accent-color:var(--primary-color);position:absolute;top:12px;right:12px}.email-checkbox:hover{transform:scale(1.1)}.emails-list-header{border-bottom:2px solid var(--border-color);background:var(--bg-secondary);z-index:5;justify-content:space-between;align-items:center;padding:12px;display:flex;position:sticky;top:0}.emails-list-header .select-all-container{align-items:center;gap:8px;display:flex}.emails-list-header .select-all-container label{color:var(--text-secondary);cursor:pointer;font-size:13px}.selected-count{color:var(--primary-color);font-size:13px;font-weight:600}.email-header{justify-content:space-between;align-items:start;margin-bottom:4px;padding-right:30px;display:flex}.email-from{font-size:14px;font-weight:600}.email-date{color:var(--text-secondary);font-size:12px}.email-subject{margin-bottom:4px;font-weight:500}.email-preview{color:var(--text-secondary);white-space:nowrap;text-overflow:ellipsis;font-size:13px;overflow:hidden}.email-badges{flex-wrap:wrap;gap:4px;margin-top:6px;display:flex}.badge{border-radius:3px;align-items:center;gap:3px;padding:1px 6px;font-size:10px;font-weight:500;display:inline-flex}.badge-success{color:var(--success-color);background:#d1f4e0}.badge-warning{color:#856404;background:#fff3cd}[data-theme=dark] .badge-warning{color:#ffecb5;background:#664d03}.badge-primary{color:var(--primary-color);background:#e7f3ff}.recipient-count-badge{background:linear-gradient(135deg, var(--primary-color) 0%, #15644a 100%);color:#fff;z-index:5;border-radius:50%;justify-content:center;align-items:center;min-width:24px;height:24px;font-size:11px;font-weight:600;display:flex;position:absolute;top:8px;right:8px;box-shadow:0 2px 4px #00000026}.recipient-count-badge i{margin-right:2px;font-size:8px}.recipient-count-badge.multiple{border-radius:12px;min-width:auto;padding:0 6px}.recipients-container{align-items:flex-start;display:flex}.recipients-list{flex-direction:column;gap:4px;display:flex}.recipient-item{background:var(--bg-secondary);border:1px solid var(--border-color);color:var(--text-primary);border-radius:16px;align-items:center;padding:4px 10px;font-size:13px;display:inline-flex}.recipient-item:first-child{margin-top:0}.gmail-labels-container{flex-wrap:wrap;flex-shrink:0;justify-content:flex-end;gap:6px;margin-left:16px;display:flex}.gmail-label{color:#fff;white-space:nowrap;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);border-radius:12px;align-items:center;gap:4px;padding:3px 10px;font-size:11px;font-weight:500;display:inline-flex}.gmail-label i{font-size:10px}.gmail-label.label-inbox{background:linear-gradient(135deg,#4caf50 0%,#45a049 100%)}.gmail-label.label-important{background:linear-gradient(135deg,#ff9800 0%,#f57c00 100%)}.gmail-label.label-starred{color:#333;background:linear-gradient(135deg,#ffc107 0%,#ff9800 100%)}.gmail-label.label-unread{background:linear-gradient(135deg,#2196f3 0%,#1976d2 100%)}.gmail-label.label-sent{background:linear-gradient(135deg,#00bcd4 0%,#0097a7 100%)}.gmail-label.label-draft{background:linear-gradient(135deg,#9e9e9e 0%,#757575 100%)}.gmail-label.label-custom{background:linear-gradient(135deg,#9c27b0 0%,#7b1fa2 100%)}[data-theme=dark] .gmail-label{box-shadow:0 1px 3px #0000004d}.detail-header{border-bottom:2px solid var(--border-color);margin-bottom:20px;padding-bottom:16px}.detail-header-title{justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px;display:flex}.detail-header h2{word-break:break-word;flex:1;min-width:0;margin:0;font-size:20px}.detail-meta{grid-template-columns:repeat(2,1fr);gap:12px;margin-bottom:16px;display:grid}.meta-item{font-size:14px}.meta-label{color:var(--text-secondary);margin-bottom:4px;font-weight:600;display:block}.email-body{background:var(--bg-secondary);white-space:normal;border-radius:6px;max-height:600px;margin:20px 0;padding:16px;font-size:14px;overflow-y:auto}.email-conversation{flex-direction:column;gap:0;display:flex}.email-msg-card{background:var(--bg-card);border:1px solid var(--border-color);word-break:break-word;border-radius:10px;max-width:88%;padding:14px 16px;position:relative;box-shadow:0 1px 4px #0000000f}.email-msg-card.root-message{background:var(--bg-card);border:1.5px solid var(--primary-color);border-radius:12px;max-width:100%;margin-bottom:6px;padding:16px 18px;box-shadow:0 2px 8px #1a7f5f1a}.email-msg-card.root-message .msg-card-header .msg-sender{color:var(--primary-color)}.email-msg-row{align-items:flex-start;gap:10px;margin-bottom:4px;display:flex}.email-msg-row.align-left{justify-content:flex-start}.email-msg-row.align-left .email-msg-card{background:var(--bg-card);border-color:var(--border-color);border-radius:4px 12px 12px}.email-msg-row.align-right{justify-content:flex-end}.email-msg-row.align-right .email-msg-card{background:color-mix(in srgb, var(--primary-color) 8%, var(--bg-card) 92%);border-color:color-mix(in srgb, var(--primary-color) 25%, var(--border-color) 75%);border-radius:12px 4px 12px 12px}.msg-avatar{color:#fff;text-transform:uppercase;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:32px;min-width:32px;height:32px;font-size:13px;font-weight:700;display:flex}.msg-avatar.avatar-sender{background:linear-gradient(135deg, var(--primary-color) 0%, #15644a 100%)}.msg-avatar.avatar-other{background:linear-gradient(135deg,#6c757d 0%,#495057 100%)}.msg-card-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;display:flex}.msg-card-header .msg-sender{color:var(--text-primary);align-items:center;gap:6px;font-size:13px;font-weight:600;display:flex}.msg-card-header .msg-sender .msg-email-addr{color:var(--text-secondary);font-size:11.5px;font-weight:400}.msg-card-header .msg-time{color:var(--text-secondary);white-space:nowrap;font-size:11px}.msg-card-header .msg-badge{text-transform:uppercase;letter-spacing:.3px;border-radius:10px;align-items:center;gap:3px;padding:1px 8px;font-size:10px;font-weight:600;display:inline-flex}.msg-badge.badge-original{background:color-mix(in srgb, var(--primary-color) 15%, transparent);color:var(--primary-color)}.msg-badge.badge-reply{background:color-mix(in srgb, var(--info-color) 15%, transparent);color:var(--info-color)}.msg-card-body{white-space:pre-wrap;color:var(--text-primary);font-size:13.5px;line-height:1.65}.msg-card-body pre{white-space:pre-wrap;margin:0;font-family:inherit}.email-thread-separator{color:var(--text-secondary);text-transform:uppercase;letter-spacing:.6px;align-items:center;gap:10px;margin:14px 0 10px;font-size:11.5px;font-weight:600;display:flex}.email-thread-separator:before,.email-thread-separator:after{content:"";background:var(--border-color);flex:1;height:1px}.email-thread-separator i{font-size:10px}.msg-toggle-btn{border:1px dashed var(--border-color);color:var(--text-secondary);cursor:pointer;background:0 0;border-radius:6px;align-items:center;gap:4px;margin-top:6px;padding:4px 12px;font-size:11.5px;transition:all .2s;display:inline-flex}.msg-toggle-btn:hover{background:var(--bg-secondary);color:var(--text-primary);border-color:var(--primary-color)}.msg-card-body.collapsed-body{max-height:120px;position:relative;overflow:hidden}.msg-card-body.collapsed-body:after{content:"";background:linear-gradient(transparent, var(--bg-card));pointer-events:none;height:40px;position:absolute;bottom:0;left:0;right:0}.email-msg-row.align-right .msg-card-body.collapsed-body:after{background:linear-gradient(transparent, color-mix(in srgb, var(--primary-color) 8%, var(--bg-card) 92%))}.email-root-message{white-space:pre-wrap;line-height:1.6}.attachments-section{margin-top:20px}.attachments-section h3{margin-bottom:12px;font-size:16px}.attachment-item{background:var(--bg-secondary);box-sizing:border-box;border:1px solid var(--border-color);border-radius:6px;justify-content:flex-start;align-items:center;gap:14px;width:fit-content;max-width:100%;margin-bottom:8px;padding:12px;transition:all .2s;display:flex}.attachment-item:hover{background:var(--sidebar-active);border-color:var(--primary-color)}.attachment-info{align-items:center;gap:12px;min-width:0;display:flex}.attachment-info>div:last-child{min-width:0}.attachment-info .attachment-filename{text-overflow:ellipsis;white-space:nowrap;max-width:min(420px,100%);font-weight:600;overflow:hidden}.attachment-icon{color:var(--danger-color);margin-right:4px;font-size:24px}.attachment-icon.fa-file{color:var(--text-secondary)}.attachment-icon.fa-file-image{color:var(--success-color)}.attachment-icon.fa-file-word{color:#2b579a}.attachment-icon.fa-file-excel{color:#217346}.attachment-icon.fa-file-powerpoint{color:#d24726}.actions-section{border-top:2px solid var(--border-color);flex-wrap:wrap;gap:12px;margin-top:20px;padding-top:20px;padding-bottom:20px;display:flex}.empty-state{text-align:center;color:var(--text-secondary);padding:60px 20px}.empty-state i{opacity:.3;margin-bottom:20px;font-size:64px}.mail-ui .email-detail .empty-state.email-preview-empty>i{margin-bottom:0}.loading{text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:1rem;height:100%;min-height:300px;padding:40px;display:flex}.loading p{color:var(--text-secondary);margin:0}.spinner{border:4px solid var(--border-color);border-top-color:var(--primary-color);border-radius:50%;width:40px;height:40px;animation:1s linear infinite spin;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}.modal.active{display:flex}.modal-content{background:var(--bg-card);width:90%;max-width:800px;max-height:90vh;box-shadow:var(--shadow-lg);border-radius:16px;overflow-y:auto}.modal-header{border-bottom:1px solid var(--border-color);justify-content:space-between;align-items:center;padding:1.5rem;display:flex}.modal-header h2{margin:0;font-size:20px;font-weight:600}.modal-close{background:var(--bg-secondary);border:1px solid var(--border-color);cursor:pointer;border-radius:8px;justify-content:center;align-items:center;width:36px;height:36px;transition:all .2s;display:flex}.modal-close:hover{background:var(--sidebar-active)}.modal-body{padding:1.5rem}@media (max-width:1200px){.mail-ui.email-wrap{grid-template-columns:350px 1fr}}@media (max-width:900px){.mail-ui.email-wrap{grid-template-rows:40vh 1fr;grid-template-columns:1fr}.toolbar{flex-direction:column;align-items:stretch}.filter-group,.date-range-filter{flex-wrap:wrap;justify-content:center}}@media (max-width:768px){.mail-ui.email-wrap{grid-template-rows:1fr;grid-template-columns:1fr;gap:10px}.mail-ui .email-list{max-height:60vh}.email-detail{z-index:100;border-radius:0;display:none;position:fixed;inset:0}.email-detail.mobile-active{display:block}.mobile-back-btn{display:flex!important}.emails-page .emails-page-body{padding:0}.toolbar{gap:8px;padding:10px}.stat-card{padding:1rem}.stat-value{font-size:24px}.stat-label{font-size:11px}.stat-icon{width:36px;height:36px;font-size:16px}.email-detail{padding:12px}.emails-list{padding:10px}.export-btn span,.theme-toggle span{display:none}}@media (max-width:480px){.mail-ui.email-wrap{grid-template-rows:1fr;grid-template-columns:1fr}.mail-ui .email-list{display:block}.email-detail{z-index:100;border-radius:0;margin:0;display:none;position:fixed;inset:0}.email-detail.mobile-active{display:block}.mobile-back-btn{background:var(--primary-color);color:#fff;cursor:pointer;border:none;border-radius:8px;align-items:center;gap:.5rem;width:100%;margin-bottom:1rem;padding:.75rem 1rem;font-size:14px;font-weight:500;display:flex!important}.mobile-back-btn:hover{opacity:.9}.emails-page .emails-page-body{padding:0}.toolbar{padding:8px}.filter-group{width:100%}.date-range-filter{width:100%;padding:6px 8px}.date-range-filter input[type=date]{flex:1;min-width:0;padding:4px 6px;font-size:11px}.email-item{padding:10px}.email-from{font-size:12px}.email-subject{font-size:13px}.email-preview{font-size:11px}.email-date{font-size:10px}.email-badges .badge{padding:2px 6px;font-size:9px}.email-detail-header h2{font-size:16px}.email-detail-meta{font-size:12px}.email-body-container{font-size:13px}.email-msg-card{padding:10px 12px;max-width:95%!important}.email-msg-card.root-message{padding:12px 14px}.msg-avatar{width:26px;min-width:26px;height:26px;font-size:11px}.msg-card-header .msg-sender .msg-email-addr{display:none}.msg-card-body{font-size:12.5px}.attachment-item{padding:8px}.attachment-name,.attachment-filename{font-size:12px}.attachment-size{font-size:10px}.detail-meta{grid-template-columns:1fr;gap:8px}.detail-header-title{flex-direction:column;gap:8px}.detail-header h2{font-size:16px}.gmail-labels-container{justify-content:flex-start;margin-left:0}.actions-section{flex-direction:column}.empty-state{padding:30px 15px}.empty-state i{font-size:40px}.modal-content{max-height:calc(100vh - 20px);margin:10px}}.stats-grid{flex-shrink:0;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.75rem;margin-bottom:.6rem;display:grid}.stat-card{background:var(--bg-card);border:1px solid var(--border-color);box-shadow:var(--shadow);border-radius:8px;padding:.75rem 1rem;transition:all .3s}.stat-card:hover{box-shadow:var(--shadow-lg);transform:translateY(-2px)}.stat-card[onclick]{cursor:pointer}.stat-card[onclick]:hover{border-color:var(--primary-color);box-shadow:0 8px 20px #3b82f626}.stat-card[onclick]:active{transform:translateY(0)}.stat-header{justify-content:space-between;align-items:center;margin-bottom:0;display:flex}.stat-icon{border-radius:7px;justify-content:center;align-items:center;width:34px;height:34px;font-size:15px;display:flex}.stat-icon.emails{color:var(--primary-color);background:#0d6efd1a}.stat-icon.work-orders{color:var(--success-color);background:#1987541a}.stat-icon.attachments{color:var(--warning-color);background:#ffc1071a}.stat-icon.processed{color:var(--info-color);background:#0dcaf01a}.stat-icon.fixflo{color:#fff;background:linear-gradient(135deg,#ffc107 0%,#ff9800 100%)}.stat-value{color:var(--text-primary);font-size:22px;font-weight:700;line-height:1}.stat-label{color:var(--text-secondary);margin-top:.15rem;font-size:12px}
