:root{
  --tm-bg:#f7f9fc;
  --tm-surface:#ffffff;
  --tm-surface-soft:#f8fafc;
  --tm-surface-blue:#edf4ff;
  --tm-border:#e6ebf2;
  --tm-border-strong:#d6deea;
  --tm-text:#111827;
  --tm-heading:#0f172a;
  --tm-muted:#667085;
  --tm-muted-2:#98a2b3;
  --tm-blue:#2563eb;
  --tm-blue-2:#1d4ed8;
  --tm-blue-soft:#eaf2ff;
  --tm-green:#16a34a;
  --tm-green-soft:#dcfce7;
  --tm-purple:#7c3aed;
  --tm-purple-soft:#ede9fe;
  --tm-yellow:#f4b400;
  --tm-red:#ef4444;
  --tm-radius-sm:12px;
  --tm-radius-md:18px;
  --tm-radius-lg:24px;
  --tm-shadow:0 16px 42px rgba(15,23,42,.07);
  --tm-shadow-soft:0 8px 22px rgba(15,23,42,.05);
  --tm-sidebar:306px;
  --tm-topbar:92px;
}
[data-bs-theme="dark"]{
  --tm-bg:#0f172a;
  --tm-surface:#111827;
  --tm-surface-soft:#162033;
  --tm-surface-blue:#172554;
  --tm-border:#263449;
  --tm-border-strong:#334155;
  --tm-text:#e5e7eb;
  --tm-heading:#f8fafc;
  --tm-muted:#a7b0c0;
  --tm-muted-2:#748095;
  --tm-blue-soft:rgba(37,99,235,.20);
  --tm-shadow:0 20px 46px rgba(0,0,0,.28);
  --tm-shadow-soft:0 12px 28px rgba(0,0,0,.18);
}
*{box-sizing:border-box}
html,body{height:100%}
body.tm-body{margin:0;background:var(--tm-bg);color:var(--tm-text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:15px;line-height:1.45;overflow-x:hidden;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
a{text-decoration:none;color:inherit}.text-secondary{color:var(--tm-muted)!important}
.tm-auth{min-height:100vh;background:var(--tm-bg)}
.tm-app{min-height:100vh;display:grid;grid-template-rows:var(--tm-topbar) minmax(0,1fr);background:linear-gradient(180deg,#fbfdff 0%,var(--tm-bg) 100%)}
[data-bs-theme="dark"] .tm-app{background:linear-gradient(180deg,#111827 0%,#0f172a 100%)}
.tm-workspace{display:grid;grid-template-columns:var(--tm-sidebar) minmax(0,1fr);min-height:calc(100vh - var(--tm-topbar));}
.tm-main{min-width:0;padding:0 24px 24px 0;overflow:hidden}
.tm-flash{position:fixed;right:24px;top:106px;z-index:4000;min-width:330px;border-radius:16px;border:0;box-shadow:var(--tm-shadow)}

/* Topbar */
.tm-topbar{height:var(--tm-topbar);display:grid;grid-template-columns:var(--tm-sidebar) minmax(360px,820px) auto;align-items:center;gap:28px;padding:16px 28px 16px 28px;background:rgba(255,255,255,.86);backdrop-filter:blur(18px);border-bottom:1px solid var(--tm-border);position:sticky;top:0;z-index:1000}
[data-bs-theme="dark"] .tm-topbar{background:rgba(17,24,39,.92)}
.tm-brand{display:flex;align-items:center;gap:14px;min-width:0;color:var(--tm-heading);font-size:29px;font-weight:850;letter-spacing:-.045em;white-space:nowrap}
.tm-brand-logo{width:54px;height:54px;filter:drop-shadow(0 10px 20px rgba(37,99,235,.17))}.tm-brand span{overflow:hidden;text-overflow:ellipsis}
.tm-mobile-menu{display:none!important}
.tm-search{height:62px;width:100%;border:1px solid var(--tm-border);border-radius:20px;background:var(--tm-surface);box-shadow:var(--tm-shadow-soft);display:flex;align-items:center;gap:16px;padding:0 20px;min-width:0}
.tm-search i{font-size:22px;color:#536179;flex:0 0 auto}.tm-search input{border:0;outline:0;background:transparent;flex:1;min-width:0;color:var(--tm-text);font-size:15px}.tm-search input::placeholder{color:#808a9d}.tm-search kbd{border:0;background:#f3f6fa;color:#667085;border-radius:10px;font-weight:700;padding:6px 9px;box-shadow:none}
[data-bs-theme="dark"] .tm-search kbd{background:#1f2937;color:#cbd5e1}
.tm-top-actions{display:flex;align-items:center;gap:12px;justify-content:flex-end;min-width:0}.tm-theme-form{display:inline-flex;margin:0}
.tm-icon-btn,.tm-tool{border:0;background:transparent;color:#475467;width:42px;height:42px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;transition:.16s ease;flex:0 0 auto;position:relative}
.tm-icon-btn:hover,.tm-tool:hover{background:var(--tm-blue-soft);color:var(--tm-blue)}.tm-icon-btn i{font-size:21px}.tm-theme-toggle span{display:none!important}.tm-theme-toggle{padding:0!important;overflow:hidden}.tm-bell:after{content:"";width:8px;height:8px;background:var(--tm-blue);border-radius:50%;position:absolute;right:9px;top:8px;box-shadow:0 0 0 3px var(--tm-surface)}
.tm-avatar-btn{border:0;background:transparent;display:flex;align-items:center;gap:10px;color:var(--tm-text);padding:0 0 0 2px}.tm-avatar{width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg,#3b82f6,#0ea5e9);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:850;box-shadow:0 7px 16px rgba(37,99,235,.24);flex:0 0 auto}.tm-avatar.sm{width:36px;height:36px;font-size:13px}.tm-avatar.xl{width:96px;height:96px;font-size:34px;position:relative}.tm-avatar.xl i{position:absolute;width:17px;height:17px;border-radius:50%;right:8px;bottom:8px;background:#22c55e;border:3px solid #fff}.tm-avatar-photo{background:linear-gradient(135deg,#e0e7ff,#bfdbfe);color:#2563eb}.tm-avatar-blue{background:linear-gradient(135deg,#3b82f6,#06b6d4)}.tm-dropdown{border:1px solid var(--tm-border);border-radius:16px;box-shadow:var(--tm-shadow)}

/* Sidebar */
.tm-sidebar{padding:22px 22px 24px;background:var(--tm-surface);border-right:1px solid var(--tm-border);min-height:calc(100vh - var(--tm-topbar));display:flex;flex-direction:column;gap:24px;overflow:auto}.tm-compose-main{height:64px;border-radius:16px;background:linear-gradient(135deg,#1d72f3,#2357e7);color:#fff;display:flex;align-items:center;justify-content:center;gap:18px;font-size:18px;font-weight:800;box-shadow:0 14px 28px rgba(37,99,235,.23)}.tm-compose-main i{font-size:22px}.tm-compose-main:hover{color:#fff;filter:brightness(.98);transform:translateY(-1px)}.tm-nav{display:flex;flex-direction:column;gap:7px}.tm-nav-link{height:48px;border-radius:14px;display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:10px;padding:0 17px;color:#475467;font-weight:620;transition:.16s ease}.tm-nav-link i{font-size:18px;color:#536179}.tm-nav-link:hover,.tm-nav-link.active{background:var(--tm-blue-soft);color:var(--tm-blue)}.tm-nav-link:hover i,.tm-nav-link.active i{color:var(--tm-blue)}.tm-nav-link b{background:#dbeafe;color:var(--tm-blue);border-radius:999px;font-size:12px;min-width:28px;text-align:center;padding:4px 8px}.tm-nav-link em{font-style:normal;color:#667085}.tm-nav-divider{height:1px;background:var(--tm-border);margin:13px 0}.tm-storage-card{margin-top:auto;border:1px solid var(--tm-border);border-radius:16px;padding:18px 16px;background:var(--tm-surface);box-shadow:var(--tm-shadow-soft)}.tm-storage-title{display:flex;align-items:center;gap:10px;font-weight:850;color:var(--tm-heading)}.tm-storage-title i{font-size:19px;color:#475569}.tm-storage-card p{margin:12px 0;color:var(--tm-muted);font-size:13px}.tm-progress{height:8px;background:#e9edf5;border-radius:999px;overflow:hidden}.tm-progress span{display:block;height:100%;background:linear-gradient(90deg,#2563eb,#1d4ed8);border-radius:inherit}.tm-storage-card a{display:block;margin-top:15px;text-align:center;background:#f7f8fb;border:1px solid #eef1f5;border-radius:10px;color:#344054;padding:11px;font-weight:720}.tm-storage-card a:hover{background:var(--tm-blue-soft);color:var(--tm-blue)}
[data-bs-theme="dark"] .tm-storage-card a{background:#1f2937;color:#d1d5db;border-color:#334155}

/* Mail */
.tm-mail-page{height:calc(100vh - var(--tm-topbar) - 24px);min-height:720px}.tm-error-banner{margin:12px 0;border-radius:16px}.tm-mail-board{height:100%;display:grid;grid-template-columns:minmax(520px,44%) minmax(600px,56%);gap:18px}.tm-inbox-panel,.tm-preview-panel,.tm-page-card,.tm-contact-detail,.tm-read-shell,.tm-settings-card,.tm-settings-nav{background:var(--tm-surface);border:1px solid var(--tm-border);border-radius:18px;box-shadow:var(--tm-shadow-soft);overflow:hidden}.tm-inbox-panel{min-width:0;display:flex;flex-direction:column}.tm-list-toolbar,.tm-preview-toolbar{height:76px;display:flex;align-items:center;gap:13px;padding:0 22px;border-bottom:1px solid var(--tm-border);background:var(--tm-surface)}.tm-check-wrap{width:42px;height:42px;display:flex;align-items:center;justify-content:center}.form-check-input{cursor:pointer}.tm-list-range{display:flex;align-items:center;gap:16px;color:var(--tm-muted);font-size:14px;white-space:nowrap}.tm-list-range a{width:34px;height:34px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:#667085}.tm-list-range a:hover{background:var(--tm-blue-soft);color:var(--tm-blue)}.tm-category-tabs{height:68px;display:grid;grid-template-columns:1fr 1fr 1.15fr 42px;align-items:center;gap:16px;padding:0 22px;border-bottom:1px solid var(--tm-border);background:var(--tm-surface)}.tm-tab{height:46px;border-radius:12px;display:flex;align-items:center;gap:12px;padding:0 15px;color:#475467;font-weight:650;white-space:nowrap;min-width:0}.tm-tab span{overflow:hidden;text-overflow:ellipsis}.tm-tab.active{background:var(--tm-blue-soft);color:var(--tm-blue)}.tm-tab i{font-size:18px}.tm-tab b{font-size:12px;border-radius:999px;background:#dbeafe;color:var(--tm-blue);padding:4px 10px}.tm-tab b.green{background:#dcfce7;color:#15803d}.tm-tab-plus{width:40px;height:40px;border:0;background:transparent;border-radius:50%;color:#475569}.tm-tab-plus:hover{background:var(--tm-blue-soft);color:var(--tm-blue)}.tm-message-list{overflow:auto;flex:1;background:var(--tm-surface)}.tm-message-row{position:relative;border-bottom:1px solid var(--tm-border);display:grid;grid-template-columns:48px minmax(0,1fr);min-height:88px;transition:.15s ease;background:var(--tm-surface)}.tm-message-row:hover{background:#f9fbff;box-shadow:inset 0 0 0 1px rgba(37,99,235,.04)}.tm-message-row.selected{background:#edf6ff}.tm-message-row.selected:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--tm-blue)}.tm-message-check{display:flex;align-items:center;justify-content:center}.tm-message-link{min-width:0;display:grid;grid-template-columns:11px 40px minmax(0,1fr) 24px 88px 32px;gap:12px;align-items:center;padding:14px 18px 14px 0}.tm-unread-dot{width:10px;height:10px;border-radius:50%;background:var(--tm-blue);opacity:0}.tm-message-row.unread .tm-unread-dot{opacity:1}.tm-message-avatar{width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#eff6ff;color:#2563eb;font-weight:850}.tm-message-text{min-width:0;display:flex;flex-direction:column;gap:3px}.tm-message-text strong,.tm-message-text span,.tm-message-text small{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.tm-message-text strong{font-size:15px;font-weight:800;color:var(--tm-heading)}.tm-message-text span{font-size:14px;font-weight:720;color:var(--tm-heading)}.tm-message-text small{font-size:13px;color:var(--tm-muted)}.tm-message-row:not(.unread) .tm-message-text span{font-weight:600;color:#344054}.tm-message-icons{color:#6b7280}.tm-message-date{font-size:13px;color:#475569;text-align:right;white-space:nowrap}.tm-star{color:#98a2b3}.tm-message-row.selected .tm-star,.tm-star:hover{color:#2563eb;font-weight:900}.tm-empty-state,.tm-preview-empty{height:100%;min-height:360px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;color:#94a3b8;gap:10px;padding:34px}.tm-empty-state i,.tm-preview-empty i{font-size:50px}.tm-empty-state h3,.tm-preview-empty h3{margin:0;color:var(--tm-heading);font-size:20px;font-weight:850}.tm-empty-state p,.tm-preview-empty p{margin:0;color:var(--tm-muted)}.tm-preview-panel{min-width:0;display:flex;flex-direction:column}.tm-preview-toolbar{gap:12px;flex:0 0 auto}.tm-preview-content{padding:28px 30px;overflow:auto;flex:1}.tm-preview-head{display:flex;align-items:center;gap:12px;margin-bottom:26px}.tm-preview-head h1{font-size:26px;line-height:1.25;margin:0;font-weight:850;letter-spacing:-.03em;color:var(--tm-heading)}.tm-chip{background:#f1f3f6;color:#586174;border-radius:999px;padding:6px 11px;font-size:13px;white-space:nowrap}.tm-preview-head-actions{display:flex;gap:18px;color:#475569;font-size:20px}.tm-sender-card{display:grid;grid-template-columns:48px minmax(0,1fr) auto 40px 40px;align-items:center;gap:12px;margin-bottom:26px}.tm-sender-card strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--tm-heading)}.tm-sender-card small{display:block;color:var(--tm-muted);margin-top:2px}.tm-sender-card time{color:var(--tm-muted);white-space:nowrap;font-size:13px}.tm-body-card{border:1px solid var(--tm-border);border-radius:18px;background:var(--tm-surface);box-shadow:0 5px 18px rgba(16,24,40,.04);padding:26px;overflow:auto;color:var(--tm-text);max-height:none}.tm-email-render{max-width:100%;overflow:auto;color:var(--tm-text);font-size:14px;line-height:1.6}.tm-email-render table{max-width:100%!important}.tm-email-render img{max-width:100%!important;height:auto!important}.tm-email-render *{box-sizing:border-box}.mail-plain{white-space:pre-wrap;font-family:inherit;background:transparent;color:var(--tm-text);border:0;padding:0}.tm-attachments{display:grid;gap:10px;margin-top:22px}.tm-attachment{display:flex;align-items:center;gap:12px;border:1px solid var(--tm-border);border-radius:12px;background:#f9fafb;padding:12px 14px;color:var(--tm-text)}.tm-attachment span{width:34px;height:34px;border-radius:10px;background:#fee2e2;color:#ef4444;display:flex;align-items:center;justify-content:center}.tm-attachment small{color:var(--tm-muted)}.tm-preview-actions{display:flex;align-items:center;gap:14px;margin-top:28px}.tm-big-action{height:52px;border:1px solid var(--tm-border);border-radius:14px;background:var(--tm-surface);padding:0 24px;display:inline-flex;align-items:center;gap:12px;font-weight:700;color:#475467}.tm-big-action:hover,.tm-round-action:hover{background:var(--tm-blue-soft);color:var(--tm-blue)}.tm-round-action{width:52px;height:52px;border:1px solid var(--tm-border);border-radius:50%;background:var(--tm-surface);color:#475467}.tm-read-page{height:calc(100vh - var(--tm-topbar) - 24px)}.tm-read-shell{height:100%;display:flex;flex-direction:column}.tm-read-content{max-width:1180px;width:100%;margin:0 auto}.tm-read-content .tm-body-card{min-height:360px}

/* Compose */
.tm-compose-page{height:calc(100vh - var(--tm-topbar) - 24px);position:relative;border-radius:18px;background:var(--tm-surface);border:1px solid var(--tm-border);box-shadow:var(--tm-shadow-soft);overflow:hidden}.tm-compose-backdrop{position:absolute;inset:0;background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);opacity:.95}.tm-fake-list{position:absolute;left:30px;top:32px;right:30px;display:grid;gap:14px}.tm-fake-list div{height:72px;border-radius:14px;background:#eef4ff;border:1px solid #e2e8f0}.tm-compose-modal{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(860px,92vw);background:var(--tm-surface);border:1px solid var(--tm-border);border-radius:18px;box-shadow:0 30px 90px rgba(15,23,42,.20);overflow:hidden}.tm-compose-titlebar{height:62px;display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:1px solid var(--tm-border);font-size:18px;color:var(--tm-heading)}.tm-compose-titlebar button,.tm-compose-titlebar a,.tm-compose-attach-row button{border:0;background:transparent;color:#475467;width:34px;height:34px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center}.tm-compose-titlebar button:hover,.tm-compose-titlebar a:hover,.tm-compose-attach-row button:hover{background:var(--tm-blue-soft);color:var(--tm-blue)}.tm-compose-fields{padding:14px 22px 0}.tm-field-line{min-height:48px;border-bottom:1px solid var(--tm-border);display:grid;grid-template-columns:58px minmax(0,1fr) auto auto;align-items:center;gap:12px}.tm-field-line label{margin:0;color:var(--tm-muted);font-weight:620}.tm-field-line input{border:0;outline:0;background:transparent;color:var(--tm-text);width:100%}.tm-field-line a{color:var(--tm-blue);font-weight:700}.tm-compose-editor-wrap{padding:0 22px}.tm-editor-toolbar{min-height:50px;border:1px solid var(--tm-border);border-bottom:0;border-radius:12px 12px 0 0;background:#fbfcfe;display:flex;align-items:center;gap:4px;padding:8px 10px}.tm-editor-toolbar select{border:0;background:transparent;color:#344054;outline:0;margin-right:12px}.tm-editor-toolbar button{border:0;background:transparent;color:#475467;width:34px;height:34px;border-radius:9px}.tm-editor-toolbar button:hover{background:var(--tm-blue-soft);color:var(--tm-blue)}.tm-compose-editor{height:340px;border:1px solid var(--tm-border);border-radius:0 0 12px 12px;padding:22px;overflow:auto;outline:0;background:var(--tm-surface);color:var(--tm-text)}.tm-compose-attach-row{height:58px;display:flex;align-items:center;gap:8px;padding:0 22px;border-bottom:1px solid var(--tm-border)}.tm-attach-button{height:40px;display:inline-flex;align-items:center;gap:10px;border-radius:10px;padding:0 12px;color:#475467;cursor:pointer}.tm-attach-button:hover{background:var(--tm-blue-soft);color:var(--tm-blue)}.tm-compose-actions{height:76px;display:flex;align-items:center;gap:14px;padding:0 22px}.tm-send-btn{height:50px;border:0;border-radius:12px;background:#2563eb;color:#fff;padding:0 24px;font-weight:850;display:inline-flex;align-items:center;gap:16px}.tm-draft-btn{height:50px;border:1px solid var(--tm-border);border-radius:12px;background:var(--tm-surface);color:#475467;padding:0 22px;font-weight:700;display:inline-flex;align-items:center;gap:10px}.tm-draft-btn:hover{background:var(--tm-blue-soft);color:var(--tm-blue)}

/* Buttons/forms shared */
.tm-primary-btn,.tm-light-btn{height:48px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;gap:10px;font-weight:750;padding:0 18px;white-space:nowrap}.tm-primary-btn{background:#2563eb;color:#fff;border:1px solid #2563eb;box-shadow:0 12px 20px rgba(37,99,235,.15)}.tm-primary-btn:hover{background:#1d4ed8;border-color:#1d4ed8;color:#fff}.tm-light-btn{background:var(--tm-surface);border:1px solid var(--tm-border);color:#344054}.tm-light-btn:hover{background:var(--tm-blue-soft);color:var(--tm-blue)}.form-control,.form-select{border-color:#dce3ee;border-radius:12px;min-height:45px;background:var(--tm-surface);color:var(--tm-text)}.form-control:focus,.form-select:focus{border-color:#93c5fd;box-shadow:0 0 0 .22rem rgba(37,99,235,.11)}

/* Contacts */
.tm-contacts-page{height:calc(100vh - var(--tm-topbar) - 24px);display:grid;grid-template-columns:minmax(720px,1fr) 420px;gap:18px}.tm-page-card{padding:28px 28px 18px}.tm-section-header{display:grid;grid-template-columns:auto minmax(250px,1fr) auto auto 42px;align-items:center;gap:14px;margin-bottom:28px}.tm-section-header h1,.tm-settings-content h1{font-size:30px;font-weight:900;letter-spacing:-.04em;margin:0;color:var(--tm-heading)}.tm-inner-search{height:54px;border:1px solid var(--tm-border);border-radius:14px;background:var(--tm-surface);display:flex;align-items:center;gap:12px;padding:0 16px;color:#667085}.tm-inner-search input{border:0;background:transparent;outline:0;flex:1;min-width:0;color:var(--tm-text)}.tm-contact-form{border:1px solid var(--tm-border);border-radius:16px;background:#fbfcfe;padding:18px;margin-bottom:20px;display:grid;grid-template-columns:1fr 1fr;gap:14px}.tm-contact-form label{font-weight:700;margin-bottom:6px}.tm-contact-notes{grid-column:1/-1}.tm-contact-filters{display:flex;align-items:center;gap:14px;margin-bottom:18px;color:var(--tm-muted)}.tm-contact-table-wrap{overflow:auto}.tm-contact-table{width:100%;border-collapse:separate;border-spacing:0;min-width:880px}.tm-contact-table th{height:48px;color:#667085;font-size:13px;font-weight:800;text-transform:none;border-bottom:1px solid var(--tm-border);padding:0 12px}.tm-contact-table td{height:68px;border-bottom:1px solid var(--tm-border);padding:0 12px;color:#475467;vertical-align:middle}.tm-contact-table tr.selected td{background:#edf6ff;border-top:1px solid #cfe4ff;border-bottom:1px solid #cfe4ff}.tm-contact-table tr.selected td:first-child{border-left:1px solid #cfe4ff;border-radius:12px 0 0 12px}.tm-contact-table tr.selected td:last-child{border-right:1px solid #cfe4ff;border-radius:0 12px 12px 0}.tm-contact-table td:nth-child(2){display:flex;align-items:center;gap:12px;color:var(--tm-heading)}.tm-label-pill{display:inline-flex;align-items:center;height:28px;border-radius:999px;padding:0 12px;font-size:12px;font-weight:750}.tm-label-pill.green{background:#dcfce7;color:#15803d}.tm-label-pill.purple{background:#ede9fe;color:#6d28d9}.tm-label-pill.blue{background:#dbeafe;color:#1d4ed8}.tm-label-pill.orange{background:#fef3c7;color:#b45309}.tm-pagination-row{display:flex;align-items:center;gap:14px;padding-top:18px;color:var(--tm-muted)}.tm-page-btn{width:40px;height:40px;border:0;border-radius:10px;background:transparent;color:#475467}.tm-page-btn.active{background:#edf4ff;color:#2563eb;font-weight:850}.tm-pagination-row select{border:1px solid var(--tm-border);border-radius:10px;padding:8px 12px;background:var(--tm-surface);color:var(--tm-text)}.tm-contact-detail{padding:28px;display:flex;flex-direction:column;overflow:auto}.tm-detail-top-icons{display:flex;justify-content:flex-end;gap:18px;color:#475467;font-size:20px}.tm-detail-person{text-align:center;margin:18px 0 22px}.tm-detail-person h2{font-size:25px;font-weight:900;margin:16px 0 4px;color:var(--tm-heading)}.tm-detail-person p{margin:0;color:#667085}.tm-detail-person a{color:#2563eb;font-weight:700}.tm-detail-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:22px}.tm-detail-actions a,.tm-detail-actions button{border:0;background:transparent;color:#667085;display:flex;flex-direction:column;align-items:center;gap:7px;font-size:12px}.tm-detail-actions i{width:48px;height:48px;border:1px solid var(--tm-border);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:18px;color:#475467}.tm-detail-actions a:hover i,.tm-detail-actions button:hover i{background:var(--tm-blue-soft);color:var(--tm-blue)}.tm-detail-card{border:1px solid var(--tm-border);border-radius:16px;padding:18px;background:var(--tm-surface);margin-bottom:14px}.tm-detail-card h3{font-size:16px;font-weight:850;margin:0 0 12px;color:var(--tm-heading)}.tm-detail-card p{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:10px;align-items:center;margin:9px 0;color:#475467}.tm-detail-card p b{font-weight:650;color:#667085}.tm-detail-card a{color:#2563eb}.tm-add-chip{width:28px;height:28px;border:1px solid var(--tm-border);background:var(--tm-surface);border-radius:50%;margin-left:6px}

/* Settings */
.tm-settings-page{height:calc(100vh - var(--tm-topbar) - 24px);display:grid;grid-template-columns:260px minmax(0,1fr);gap:18px;overflow:hidden}.tm-settings-nav{padding:14px}.tm-settings-nav a{height:50px;border-radius:12px;display:flex;align-items:center;gap:14px;padding:0 16px;color:#475467;font-weight:720}.tm-settings-nav a.active,.tm-settings-nav a:hover{background:var(--tm-blue-soft);color:var(--tm-blue)}.tm-settings-nav i{width:20px;text-align:center}.tm-settings-content{min-width:0;overflow:auto;padding-right:4px}.tm-settings-content h1{margin:4px 0 18px}.tm-settings-card{padding:22px;margin-bottom:16px}.tm-settings-card h2{font-size:19px;font-weight:900;margin:0 0 16px;color:var(--tm-heading)}.tm-setting-row{display:grid;grid-template-columns:minmax(260px,1fr) minmax(260px,380px);align-items:center;gap:18px;border-bottom:1px solid #edf1f6;min-height:62px;padding:10px 0}.tm-setting-row:last-child{border-bottom:0}.tm-setting-row strong{display:block;color:var(--tm-heading)}.tm-setting-row small{display:block;color:var(--tm-muted)}.tm-settings-grid{display:grid;grid-template-columns:minmax(300px,.9fr) minmax(430px,2.1fr);gap:16px}.tm-storage-settings p{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--tm-border);padding:11px 0;margin:0;color:#667085}.tm-storage-settings b{color:var(--tm-heading)}.tm-pro-pill{background:#e0e7ff;color:#2563eb!important;padding:5px 11px;border-radius:999px}.tm-switch input{display:none}.tm-switch span{width:50px;height:30px;border-radius:999px;background:#d8dee8;display:block;position:relative;transition:.18s}.tm-switch span:after{content:"";width:24px;height:24px;background:#fff;border-radius:50%;position:absolute;left:3px;top:3px;box-shadow:0 2px 5px rgba(0,0,0,.18);transition:.18s}.tm-switch input:checked+span{background:#2563eb}.tm-switch input:checked+span:after{transform:translateX(20px)}.small-toolbar{min-height:44px;border-bottom:1px solid var(--tm-border);border-radius:12px 12px 0 0}.tm-signature-box{min-height:150px;border:1px solid var(--tm-border);border-top:0;border-radius:0 0 12px 12px;padding:16px;background:var(--tm-surface);outline:0}.tm-preferences-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 34px}.tm-saved-item{border:1px solid var(--tm-border);border-radius:14px;padding:14px;display:flex;justify-content:space-between;gap:12px;margin-bottom:10px}.tm-saved-preview{background:#f8fafc;border-radius:10px;padding:10px;margin-top:8px;color:#475467}.tm-check-line{display:flex;gap:8px;align-items:center;margin-top:10px;color:#667085}.tm-template-form{display:grid;gap:10px}

/* Login */
.tm-login-page{min-height:100vh;background:linear-gradient(90deg,#fff 0%,#fff 50%,#f5f8fe 50%,#f5f8fe 100%)}.tm-login-layout{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}.tm-login-hero{position:relative;padding:62px 70px;display:flex;flex-direction:column;overflow:hidden}.tm-login-brand,.tm-login-card-brand{display:flex;align-items:center;gap:14px;font-size:28px;font-weight:850;letter-spacing:-.04em;color:#0f172a}.tm-login-brand img,.tm-login-card-brand img{width:58px;height:58px}.tm-hero-copy{margin-top:80px}.tm-hero-copy h1{font-size:52px;line-height:1.08;font-weight:950;letter-spacing:-.05em;margin:0;color:#0f172a}.tm-hero-copy h1 span{color:#2563eb}.tm-hero-copy p{font-size:19px;line-height:1.55;color:#667085;max-width:470px;margin:26px 0 0}.tm-mail-illustration{position:relative;flex:1;min-height:320px}.tm-envelope{position:absolute;left:36%;top:34%;width:260px;height:150px;background:linear-gradient(180deg,#fff,#eef4ff);border:2px solid #dbe7ff;border-radius:24px;box-shadow:0 25px 55px rgba(37,99,235,.16)}.tm-letter{position:absolute;left:40px;right:40px;top:-56px;height:112px;border-radius:14px;background:#fff;box-shadow:0 10px 24px rgba(16,24,40,.12);padding:25px}.tm-letter span{display:block;width:42px;height:42px;border-radius:50%;background:#9cc2ff;float:left;margin-right:16px}.tm-letter b{display:block;height:9px;background:#d6deed;border-radius:999px;margin:8px 0}.tm-plane{position:absolute;left:70%;top:10%;font-size:48px;color:#4f80ff;transform:rotate(8deg)}.tm-float-card{position:absolute;width:70px;height:70px;border-radius:16px;background:#fff;box-shadow:0 14px 30px rgba(16,24,40,.12);display:flex;align-items:center;justify-content:center;color:#2563eb;font-size:24px}.card-a{left:25%;top:40%}.card-b{left:72%;top:45%}.card-c{left:72%;top:70%}.tm-ok{position:absolute;left:66%;top:71%;width:48px;height:48px;border-radius:50%;background:#22c55e;color:#fff;display:flex;align-items:center;justify-content:center;font-size:22px}.tm-hero-features{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.tm-hero-features div{display:grid;grid-template-columns:52px 1fr;column-gap:12px;align-items:center}.tm-hero-features i{grid-row:span 2;width:52px;height:52px;border-radius:50%;background:#eef4ff;color:#2563eb;display:flex;align-items:center;justify-content:center;font-size:21px}.tm-hero-features span{font-size:13px;color:#667085}.tm-login-panel{display:flex;align-items:center;justify-content:center;flex-direction:column;padding:42px}.tm-login-card{width:min(640px,100%);background:#fff;border-radius:30px;box-shadow:0 24px 70px rgba(37,99,235,.09);padding:66px;border:1px solid #edf1f7}.tm-login-card-brand{justify-content:center;margin-bottom:46px}.tm-login-card h2{text-align:center;font-size:29px;font-weight:950;letter-spacing:-.035em;color:#0f172a}.tm-login-card>p{text-align:center;color:#667085;font-size:17px;margin:12px 0 34px}.tm-login-field{display:block;margin-bottom:24px}.tm-login-field span{display:block;font-weight:700;margin-bottom:9px;color:#0f172a}.tm-login-field div{height:54px;border:1px solid #d8dfeb;border-radius:12px;display:flex;align-items:center;gap:12px;padding:0 16px}.tm-login-field input{border:0;outline:0;flex:1;background:transparent}.tm-login-field i{color:#667085;font-size:18px}.tm-login-row{display:flex;justify-content:space-between;align-items:center;margin:6px 0 26px}.tm-login-row label{display:flex;align-items:center;gap:10px;color:#4b5563}.tm-login-row input{accent-color:#2563eb;width:18px;height:18px}.tm-login-row a{color:#2563eb;font-weight:700}.tm-login-submit{height:58px;width:100%;border:0;border-radius:12px;background:#2563eb;color:#fff;font-weight:850;font-size:16px;display:flex;align-items:center;justify-content:center;gap:18px}.tm-login-divider{height:58px;display:flex;align-items:center;color:#9ca3af}.tm-login-divider:before,.tm-login-divider:after{content:"";height:1px;background:#e5e7eb;flex:1}.tm-login-divider span{padding:0 18px}.tm-login-secondary{height:52px;width:100%;border:1px solid #d8dfeb;border-radius:12px;background:#fff;margin-bottom:12px;color:#111827;font-weight:700;display:flex;align-items:center;justify-content:center;gap:12px}.tm-login-footer{width:min(640px,100%);display:flex;justify-content:space-between;gap:20px;margin-top:34px;color:#7b8495;font-size:14px}.tm-login-footer nav{display:flex;gap:16px}

/* Dark refinements */
[data-bs-theme="dark"] .tm-message-row:hover{background:#172033}[data-bs-theme="dark"] .tm-message-row.selected{background:#172554}[data-bs-theme="dark"] .tm-message-text span,[data-bs-theme="dark"] .tm-message-text strong{color:#f8fafc}[data-bs-theme="dark"] .tm-editor-toolbar,[data-bs-theme="dark"] .tm-contact-form,[data-bs-theme="dark"] .tm-saved-preview,[data-bs-theme="dark"] .tm-compose-backdrop{background:#162033}[data-bs-theme="dark"] .tm-attachment{background:#162033}[data-bs-theme="dark"] .tm-login-page{background:#0f172a}[data-bs-theme="dark"] .tm-login-layout{background:#0f172a}[data-bs-theme="dark"] .tm-login-hero{display:none}[data-bs-theme="dark"] .tm-login-layout{grid-template-columns:1fr}[data-bs-theme="dark"] .tm-login-card,[data-bs-theme="dark"] .tm-login-secondary{background:#111827;border-color:#263449;color:#e5e7eb}[data-bs-theme="dark"] .tm-login-card h2,[data-bs-theme="dark"] .tm-login-field span,[data-bs-theme="dark"] .tm-login-card-brand{color:#f8fafc}

/* Responsive */
@media (max-width:1500px){:root{--tm-sidebar:286px}.tm-mail-board{grid-template-columns:minmax(460px,46%) minmax(520px,54%)}.tm-topbar{grid-template-columns:var(--tm-sidebar) minmax(340px,720px) auto}.tm-brand{font-size:26px}.tm-brand-logo{width:48px;height:48px}.tm-contact-detail{display:none}.tm-contacts-page{grid-template-columns:1fr}.tm-settings-grid{grid-template-columns:1fr}.tm-theme-toggle{width:42px}.tm-top-actions{gap:8px}}
@media (max-width:1180px){:root{--tm-sidebar:92px}.tm-topbar{grid-template-columns:var(--tm-sidebar) minmax(260px,1fr) auto;gap:16px;padding-left:18px}.tm-brand span{display:none}.tm-sidebar{padding:18px 12px}.tm-compose-main{width:62px;height:62px;margin:0 auto}.tm-compose-main span,.tm-nav-link span,.tm-storage-card{display:none}.tm-nav-link{grid-template-columns:1fr;justify-items:center;padding:0}.tm-nav-link b,.tm-nav-link em{display:none}.tm-main{padding-right:18px}.tm-mail-board{grid-template-columns:1fr}.tm-preview-panel{display:none}.tm-settings-page{grid-template-columns:1fr}.tm-settings-nav{display:none}.tm-login-layout{grid-template-columns:1fr}.tm-login-hero{display:none}.tm-login-page{background:#f5f8fe}}
@media (max-width:760px){:root{--tm-topbar:74px;--tm-sidebar:286px}.tm-app{grid-template-rows:var(--tm-topbar) 1fr}.tm-topbar{height:var(--tm-topbar);grid-template-columns:auto minmax(0,1fr) auto;padding:10px 14px;gap:10px}.tm-mobile-menu{display:inline-flex!important}.tm-brand-logo{width:42px;height:42px}.tm-search{height:50px;border-radius:16px}.tm-search kbd{display:none}.tm-top-actions .tm-icon-btn:not(.tm-theme-toggle):not(.tm-bell),.tm-top-actions .dropdown{display:none}.tm-workspace{display:block}.tm-sidebar{position:fixed;left:0;top:var(--tm-topbar);bottom:0;width:286px;z-index:1400;transform:translateX(-105%);transition:.22s ease}.tm-sidebar.open{transform:translateX(0)}.tm-sidebar .tm-compose-main span,.tm-sidebar .tm-nav-link span,.tm-sidebar .tm-storage-card{display:flex}.tm-sidebar .tm-nav-link{grid-template-columns:34px 1fr auto;justify-items:stretch}.tm-sidebar .tm-nav-link b,.tm-sidebar .tm-nav-link em{display:inline}.tm-main{padding:10px}.tm-mail-page,.tm-compose-page,.tm-contacts-page,.tm-settings-page,.tm-read-page{height:auto;min-height:calc(100vh - var(--tm-topbar) - 20px)}.tm-list-toolbar{gap:8px;padding:0 12px}.tm-category-tabs{grid-template-columns:1fr;gap:6px;height:auto;padding:10px}.tm-tab:not(.active),.tm-tab-plus{display:none}.tm-message-list{max-height:none}.tm-message-row{grid-template-columns:38px 1fr}.tm-message-link{grid-template-columns:10px minmax(0,1fr) 70px 28px}.tm-message-avatar,.tm-message-icons{display:none}.tm-section-header{display:flex;flex-wrap:wrap}.tm-inner-search{width:100%;order:10}.tm-contact-form{grid-template-columns:1fr}.tm-contact-notes{grid-column:auto}.tm-contact-table{min-width:820px}.tm-setting-row,.tm-preferences-grid{grid-template-columns:1fr}.tm-login-card{padding:34px 22px}.tm-login-footer{flex-direction:column;text-align:center;align-items:center}.tm-compose-actions{flex-wrap:wrap;height:auto;padding:16px}.tm-compose-modal{width:96vw}.tm-compose-editor{height:260px}.tm-preview-content{padding:20px}.tm-sender-card{grid-template-columns:42px minmax(0,1fr) auto}.tm-sender-card time,.tm-sender-card .tm-tool{display:none}.tm-preview-actions{flex-wrap:wrap}.tm-body-card{padding:18px}}

/* v6 functional UX corrections */
.tm-mail-board{grid-template-columns:minmax(470px,1fr) 8px minmax(560px,820px);gap:0;align-items:stretch;}
.tm-panel-resizer{width:8px;cursor:col-resize;position:relative;z-index:5;background:transparent;}
.tm-panel-resizer:before{content:"";position:absolute;left:3px;top:18px;bottom:18px;width:2px;border-radius:999px;background:transparent;transition:.18s ease;}
.tm-panel-resizer:hover:before,.tm-resizing .tm-panel-resizer:before{background:#c7d2fe;}
.tm-resizing{cursor:col-resize;user-select:none;}
.tm-preview-panel{min-width:480px;overflow:auto;}
.tm-inbox-panel{min-width:390px;}
.tm-context-menu{position:fixed;z-index:3000;display:none;min-width:230px;padding:8px;border:1px solid var(--tm-border);border-radius:16px;background:var(--tm-surface);box-shadow:0 20px 44px rgba(15,23,42,.16);}
.tm-context-menu.open{display:block;}
.tm-context-menu button{width:100%;border:0;background:transparent;color:var(--tm-text);display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;font-weight:700;font-size:14px;text-align:left;}
.tm-context-menu button:hover{background:var(--tm-blue-soft);color:var(--tm-blue);}
.tm-context-menu button.danger{color:#dc2626;}
.tm-context-menu button.danger:hover{background:#fee2e2;color:#b91c1c;}
.tm-context-menu hr{margin:6px 4px;border-color:var(--tm-border);}
.tm-settings-panel{display:none;animation:tmFade .18s ease;}
.tm-settings-panel.active{display:block;}
@keyframes tmFade{from{opacity:.55;transform:translateY(4px)}to{opacity:1;transform:none}}
.tm-settings-nav a{cursor:pointer;}
.tm-account-card{display:flex;align-items:center;gap:14px;padding:16px;border:1px solid var(--tm-border);border-radius:18px;background:var(--tm-surface-soft);}
.tm-account-card div{flex:1;min-width:0;}.tm-account-card strong{display:block;color:var(--tm-heading);}.tm-account-card small{display:block;color:var(--tm-muted);}
.tm-account-lines p{display:flex;justify-content:space-between;gap:20px;border-bottom:1px solid var(--tm-border);padding:12px 0;margin:0;}.tm-account-lines span{color:var(--tm-muted)}.tm-account-lines b{text-align:right;color:var(--tm-heading);word-break:break-word;}
.tm-chip.success{background:var(--tm-green-soft);color:var(--tm-green);}
.tm-theme-options{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:16px;}.tm-theme-options label{cursor:pointer;}.tm-theme-options input{position:absolute;opacity:0;}.tm-theme-options span{display:flex;align-items:center;gap:12px;border:1px solid var(--tm-border);border-radius:18px;padding:18px;background:var(--tm-surface-soft);font-weight:800;color:var(--tm-heading);}.tm-theme-options input:checked + span{border-color:var(--tm-blue);box-shadow:0 0 0 4px rgba(37,99,235,.10);color:var(--tm-blue);}
.tm-compose-page{min-height:calc(100vh - var(--tm-topbar));height:calc(100vh - var(--tm-topbar));position:relative;background:var(--tm-bg);overflow:hidden;}
.tm-compose-backdrop{position:absolute;inset:24px;border:1px solid var(--tm-border);border-radius:24px;background:linear-gradient(180deg,rgba(255,255,255,.78),rgba(255,255,255,.55));box-shadow:var(--tm-shadow-soft);}
.tm-compose-modal{position:fixed!important;right:34px;bottom:28px;top:auto!important;left:auto!important;width:min(760px,calc(100vw - 48px));height:min(680px,calc(100vh - 130px));max-width:calc(100vw - 48px);max-height:calc(100vh - 120px);resize:both;overflow:auto;z-index:2500;border-radius:22px!important;box-shadow:0 28px 80px rgba(15,23,42,.20)!important;}
.tm-compose-modal.maximized{inset:96px 28px 28px 28px!important;width:auto!important;height:auto!important;max-width:none;max-height:none;resize:none;}
.tm-compose-modal.minimized{height:58px!important;overflow:hidden;resize:none;}
.tm-compose-modal.minimized .tm-compose-fields,.tm-compose-modal.minimized .tm-compose-editor-wrap,.tm-compose-modal.minimized .tm-compose-attach-row,.tm-compose-modal.minimized .tm-compose-actions{display:none;}
.tm-compose-titlebar button,.tm-compose-titlebar a{cursor:pointer;}
.tm-email-render img{max-width:100%!important;height:auto!important;display:inline-block;}
.tm-email-render table{max-width:100%;}
.tm-storage-card .tm-progress span,.tm-storage-settings .tm-progress span{transition:width .25s ease;}
[data-bs-theme="dark"] .tm-context-menu{background:#111827;border-color:#263449;box-shadow:0 20px 44px rgba(0,0,0,.35)}
[data-bs-theme="dark"] .tm-account-card,[data-bs-theme="dark"] .tm-theme-options span{background:#162033;border-color:#263449}
@media(max-width:1180px){.tm-mail-board{grid-template-columns:1fr}.tm-panel-resizer{display:none}.tm-preview-panel{display:none}}
@media(max-width:760px){.tm-compose-modal{right:10px;bottom:10px;width:calc(100vw - 20px);height:calc(100vh - 100px)}.tm-theme-options{grid-template-columns:1fr}.tm-account-lines p{display:block}.tm-account-lines b{text-align:left;display:block;margin-top:4px}}

/* Torobyte Mail v7 feature polish */
.tm-search{position:relative;}
.tm-suggest-box{position:absolute;left:0;right:0;top:calc(100% + 8px);background:var(--tm-surface);border:1px solid var(--tm-border);border-radius:18px;box-shadow:0 22px 60px rgba(15,23,42,.16);padding:8px;display:none;z-index:3000;max-height:420px;overflow:auto;}
.tm-suggest-box.open{display:block;}
.tm-suggest-box a{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:12px;color:var(--tm-text);}
.tm-suggest-box a:hover{background:var(--tm-blue-soft);color:var(--tm-blue);}
.tm-suggest-box i{width:28px;height:28px;border-radius:9px;background:#eff6ff;color:#2563eb;display:flex;align-items:center;justify-content:center;}
.tm-suggest-box strong{display:block;font-size:14px;color:var(--tm-heading);}
.tm-suggest-box small{display:block;font-size:12px;color:var(--tm-muted);}
.tm-icon-plain{border:0;background:transparent;color:#475569;padding:0;font-size:20px;}
.tm-icon-plain:hover{color:#2563eb;}
.tm-star.active,.tm-preview-head-actions .fa-solid.fa-star{color:#f59e0b!important;}
.tm-row-labels{display:flex;gap:5px;margin-top:4px;font-style:normal;flex-wrap:wrap;}
.tm-local-label{display:inline-flex;align-items:center;border-radius:999px;padding:3px 9px;font-size:11px;font-weight:800;line-height:1;background:#dbeafe;color:#1d4ed8;white-space:nowrap;}
.tm-local-label.green{background:#dcfce7;color:#15803d}.tm-local-label.purple{background:#ede9fe;color:#6d28d9}.tm-local-label.orange{background:#ffedd5;color:#c2410c}.tm-local-label.red{background:#fee2e2;color:#b91c1c}.tm-local-label.blue{background:#dbeafe;color:#1d4ed8}
.tm-context-select{width:100%;border:1px solid var(--tm-border);border-radius:10px;padding:9px 10px;margin:6px 0;background:var(--tm-surface);color:var(--tm-text);}
.tm-inline-form{display:grid;grid-template-columns:minmax(220px,1fr) 160px auto;gap:10px;align-items:center;margin:14px 0 18px;}
.tm-rule-form{display:grid;grid-template-columns:1fr 150px 150px 1fr 170px 180px;gap:10px;align-items:center;margin:14px 0 18px;}
.tm-rule-form .tm-check-line{grid-column:1 / span 2}.tm-rule-form .tm-primary-btn{justify-self:start}
.tm-saved-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.tm-edit-signature-form{margin-top:12px;border-top:1px solid var(--tm-border);padding-top:12px}.tm-saved-signature{align-items:flex-start}.small-toolbar{border-bottom:1px solid var(--tm-border);border-radius:12px 12px 0 0}.tm-signature-box{min-height:150px}.tm-compose-modal{right:24px!important;bottom:20px!important;width:min(720px,calc(100vw - 40px))!important;height:min(640px,calc(100vh - 112px))!important;border-radius:16px!important}.tm-compose-titlebar{background:#f8fafc}.tm-compose-page{background:transparent!important;border:0!important;box-shadow:none!important}.tm-compose-backdrop{display:none}.tm-fake-list{display:none}
@media(max-width:980px){.tm-inline-form,.tm-rule-form{grid-template-columns:1fr}.tm-rule-form .tm-check-line{grid-column:auto}.tm-compose-modal{right:10px!important;bottom:10px!important;width:calc(100vw - 20px)!important;height:calc(100vh - 95px)!important}}
.tm-inner-search{position:relative}.tm-inner-search .tm-suggest-box{top:calc(100% + 8px);}
.tm-row-star-form{position:absolute;right:14px;top:50%;transform:translateY(-50%);z-index:5}.tm-row-star-form button{border:0;background:transparent;width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#98a2b3}.tm-row-star-form button:hover{background:var(--tm-blue-soft);color:#f59e0b}.tm-message-link{padding-right:54px!important}

/* Torobyte Mail v8: etiquetas/carpetas laterales, compose Gmail real y acciones funcionales */
.tm-sidebar-group-title{display:flex;align-items:center;justify-content:space-between;margin:8px 4px 4px;padding:0 12px;color:#667085;font-size:12px;font-weight:850;text-transform:uppercase;letter-spacing:.04em}.tm-sidebar-group-title a{width:28px;height:28px;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;color:#64748b}.tm-sidebar-group-title a:hover{background:var(--tm-blue-soft);color:var(--tm-blue)}.tm-label-nav .tm-label-dot{font-size:14px}.tm-label-dot.blue{color:#2563eb}.tm-label-dot.green{color:#16a34a}.tm-label-dot.purple{color:#7c3aed}.tm-label-dot.orange{color:#f97316}.tm-label-dot.red{color:#dc2626}.tm-sidebar-mini-form{display:grid;grid-template-columns:minmax(0,1fr) 34px;gap:6px;padding:0 6px;margin:4px 0 10px}.tm-sidebar-mini-form input{height:36px;border:1px solid var(--tm-border);border-radius:10px;background:var(--tm-surface);color:var(--tm-text);font-size:12px;padding:0 10px;min-width:0}.tm-sidebar-mini-form button{height:36px;width:34px;border:0;border-radius:10px;background:var(--tm-blue-soft);color:var(--tm-blue);display:flex;align-items:center;justify-content:center}.tm-sidebar-mini-form button:hover{background:var(--tm-blue);color:#fff}.tm-message-row{grid-template-columns:48px minmax(0,1fr) 44px}.tm-message-link{grid-template-columns:11px 40px minmax(0,1fr) 24px 88px!important}.tm-row-star-form{display:flex;align-items:center;justify-content:center;margin:0 10px 0 0}.tm-row-star{width:36px;height:36px;border:0;border-radius:50%;background:transparent;color:#98a2b3;display:flex;align-items:center;justify-content:center}.tm-row-star:hover{background:#eef4ff;color:#2563eb}.tm-row-star i.active{color:#f5b301}.tm-preview-toolbar form{margin:0}.tm-preview-toolbar .tm-tool{border:0}.tm-compose-gmail{position:fixed!important;right:26px!important;bottom:0!important;top:auto!important;left:auto!important;width:640px!important;max-width:calc(100vw - 44px)!important;height:620px!important;max-height:calc(100vh - 94px)!important;background:var(--tm-surface)!important;border:1px solid var(--tm-border)!important;border-radius:14px 14px 0 0!important;box-shadow:0 22px 80px rgba(15,23,42,.24)!important;z-index:2600!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;resize:both}.tm-compose-gmail.maximized{top:96px!important;right:28px!important;bottom:28px!important;left:calc(var(--tm-sidebar) + 28px)!important;width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;border-radius:18px!important;resize:none}.tm-compose-gmail.minimized{height:54px!important;width:360px!important;resize:none}.tm-compose-gmail.minimized .tm-compose-fields,.tm-compose-gmail.minimized .tm-compose-editor-wrap,.tm-compose-gmail.minimized .tm-compose-attach-row,.tm-compose-gmail.minimized .tm-compose-actions{display:none!important}.tm-compose-titlebar{height:50px;background:#f8fafc;border-bottom:1px solid var(--tm-border);padding:0 16px;flex:0 0 auto}.tm-compose-titlebar strong{font-size:15px;font-weight:850}.tm-compose-titlebar button,.tm-compose-titlebar a{width:32px;height:32px;border:0;background:transparent;border-radius:8px;color:#475467;display:inline-flex;align-items:center;justify-content:center}.tm-compose-titlebar button:hover,.tm-compose-titlebar a:hover{background:#e9eef7;color:#111827}.tm-compose-fields{padding:0 16px;flex:0 0 auto}.tm-field-line{min-height:44px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--tm-border)}.tm-field-line.is-hidden{display:none}.tm-field-line label{min-width:52px;color:#667085;font-weight:650;font-size:13px}.tm-field-line input{border:0!important;box-shadow:none!important;outline:0!important;background:transparent!important;flex:1;height:40px;color:var(--tm-text)}.tm-field-line a{font-size:13px;font-weight:800;color:var(--tm-blue)}.tm-compose-editor-wrap{display:flex;flex-direction:column;flex:1;min-height:0;padding:12px 16px 0}.tm-editor-toolbar{height:42px;border:1px solid var(--tm-border);border-radius:12px 12px 0 0;background:#fbfcfe;display:flex;align-items:center;gap:4px;padding:0 8px;flex:0 0 auto}.tm-editor-toolbar button{width:32px;height:32px;border:0;background:transparent;border-radius:8px;color:#475467}.tm-editor-toolbar button:hover{background:#eef4ff;color:#2563eb}.tm-editor-toolbar select{border:0;background:transparent;color:#475467;font-size:13px;max-width:112px}.tm-compose-editor{border:1px solid var(--tm-border);border-top:0;border-radius:0 0 12px 12px;min-height:180px;height:auto;flex:1;overflow:auto;padding:16px;font-size:14px;line-height:1.65;outline:0;background:var(--tm-surface)}.tm-compose-attach-row{height:48px;padding:0 16px;border-bottom:1px solid var(--tm-border);display:flex;align-items:center;gap:9px;flex:0 0 auto}.tm-compose-attach-row button,.tm-attach-button{border:0;background:transparent;color:#475467;border-radius:9px;height:34px;padding:0 10px;display:inline-flex;align-items:center;gap:8px;cursor:pointer}.tm-compose-attach-row button:hover,.tm-attach-button:hover{background:#eef4ff;color:#2563eb}.tm-compose-actions{height:62px;padding:0 16px;display:flex;align-items:center;gap:12px;flex:0 0 auto}.tm-send-btn{height:42px;border:0;border-radius:10px;background:#2563eb;color:#fff;font-weight:850;padding:0 22px;display:inline-flex;align-items:center;gap:12px}.tm-send-btn:hover{background:#1d4ed8}.tm-draft-btn{height:42px;border:1px solid var(--tm-border);border-radius:10px;color:#475467;padding:0 16px;display:inline-flex;align-items:center;gap:8px;background:var(--tm-surface);font-weight:700}.tm-draft-btn:hover{background:#f8fafc;color:#2563eb}.tm-compose-page{height:auto!important;min-height:0!important;background:transparent!important}.tm-compose-backdrop,.tm-fake-list{display:none!important}.tm-context-menu{z-index:4000}.tm-local-label.red,.tm-label-pill.red{background:#fee2e2;color:#b91c1c}.tm-empty-state{padding:60px 24px;text-align:center;color:#667085}.tm-empty-state i{font-size:36px;color:#94a3b8}.tm-empty-state h3{font-size:18px;margin:16px 0 6px;color:var(--tm-heading)}
[data-bs-theme="dark"] .tm-compose-titlebar,[data-bs-theme="dark"] .tm-editor-toolbar{background:#111827}[data-bs-theme="dark"] .tm-sidebar-mini-form input,[data-bs-theme="dark"] .tm-compose-editor{background:#111827;color:#e5e7eb}[data-bs-theme="dark"] .tm-field-line input{color:#e5e7eb!important}
@media(max-width:760px){.tm-compose-gmail{right:10px!important;bottom:0!important;width:calc(100vw - 20px)!important;height:calc(100vh - 92px)!important}.tm-compose-gmail.maximized{left:10px!important;top:84px!important;right:10px!important;bottom:10px!important}.tm-message-row{grid-template-columns:38px minmax(0,1fr) 38px}.tm-row-star-form{margin-right:4px}.tm-sidebar-mini-form{display:none}}


/* Torobyte Mail v9: orden, vistas, drag/drop, carpetas con color y calendario */
.tm-view-controls{display:flex;align-items:center;gap:10px;margin-left:8px;flex-wrap:wrap}.tm-view-controls label{display:flex;align-items:center;gap:6px;margin:0;color:#667085;font-size:12px;font-weight:800}.tm-view-controls select{height:34px;border:1px solid var(--tm-border);border-radius:10px;background:var(--tm-surface);color:var(--tm-text);font-size:12px;font-weight:700;padding:0 28px 0 10px}.tm-view-compact .tm-message-row{min-height:48px}.tm-view-compact .tm-message-link{padding-top:4px!important;padding-bottom:4px!important}.tm-view-compact .tm-message-avatar{width:30px;height:30px;font-size:12px}.tm-view-compact .tm-message-text small{display:none}.tm-view-compact .tm-message-text strong,.tm-view-compact .tm-message-text span{font-size:13px}.tm-view-spacious .tm-message-row{min-height:86px}.tm-view-spacious .tm-message-avatar{width:46px;height:46px}.tm-message-row[draggable="true"]{cursor:grab}.tm-message-row.is-dragging{opacity:.48}.tm-drop-active{background:#dbeafe!important;outline:2px dashed #2563eb;outline-offset:-3px}.tm-folder-nav-row{display:grid;grid-template-columns:minmax(0,1fr) 42px;align-items:center;gap:2px;border-radius:14px}.tm-folder-nav-row .tm-nav-link{min-width:0}.tm-folder-color-form{display:flex;align-items:center;justify-content:center}.tm-folder-color-form select{width:30px;height:30px;border:0;border-radius:999px;font-size:0;color:transparent;appearance:none;background:#e0ecff;cursor:pointer}.tm-folder-color-form select:focus{outline:2px solid #93c5fd}.tm-folder-color.blue,.tm-folder-color-form select option[value="blue"]{color:#2563eb}.tm-folder-color.green{color:#16a34a}.tm-folder-color.purple{color:#7c3aed}.tm-folder-color.orange{color:#f97316}.tm-folder-color.red{color:#dc2626}.tm-folder-color.gray{color:#64748b}.tm-folder-color-form:has(option[value="green"]:checked) select{background:#dcfce7}.tm-folder-color-form:has(option[value="purple"]:checked) select{background:#ede9fe}.tm-folder-color-form:has(option[value="orange"]:checked) select{background:#ffedd5}.tm-folder-color-form:has(option[value="red"]:checked) select{background:#fee2e2}.tm-folder-color-form:has(option[value="gray"]:checked) select{background:#e2e8f0}.tm-live-refresh-badge{position:fixed;top:82px;right:28px;z-index:5000;background:#2563eb;color:#fff;border-radius:14px;padding:12px 16px;box-shadow:0 16px 45px rgba(37,99,235,.28);font-weight:850;display:flex;align-items:center;gap:10px}.tm-calendar-page{padding:26px;min-height:calc(100vh - var(--tm-topbar));background:var(--tm-bg)}.tm-calendar-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:20px}.tm-section-kicker{display:inline-flex;align-items:center;gap:8px;color:#2563eb;font-weight:900;font-size:13px}.tm-calendar-head h1{margin:8px 0 4px;font-size:32px;font-weight:900;color:var(--tm-heading)}.tm-calendar-head p{margin:0;color:#667085}.tm-calendar-month-actions{display:flex;align-items:center;gap:12px;background:var(--tm-surface);border:1px solid var(--tm-border);border-radius:16px;padding:10px 14px;box-shadow:var(--tm-shadow-soft)}.tm-calendar-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:20px}.tm-calendar-card,.tm-card{background:var(--tm-surface);border:1px solid var(--tm-border);border-radius:22px;box-shadow:var(--tm-shadow-soft)}.tm-calendar-card{padding:16px;overflow:hidden}.tm-calendar-weekdays{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;margin-bottom:8px}.tm-calendar-weekdays span{text-align:center;font-size:12px;font-weight:900;color:#667085;text-transform:uppercase}.tm-calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}.tm-calendar-day{min-height:118px;border:1px solid var(--tm-border);border-radius:16px;background:#fbfcff;padding:10px;overflow:hidden}.tm-calendar-day.is-muted{background:transparent;border-color:transparent}.tm-calendar-day.is-today{border-color:#2563eb;box-shadow:inset 0 0 0 1px #2563eb}.tm-calendar-day b{display:block;color:var(--tm-heading);font-size:13px;margin-bottom:8px}.tm-calendar-event{border-radius:9px;padding:5px 7px;margin-top:5px;font-size:11px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:750}.tm-calendar-event span{font-weight:950}.tm-calendar-event.blue,.tm-folder-color-form select{background:#dbeafe;color:#1d4ed8}.tm-calendar-event.green{background:#dcfce7;color:#15803d}.tm-calendar-event.purple{background:#ede9fe;color:#6d28d9}.tm-calendar-event.orange{background:#ffedd5;color:#c2410c}.tm-calendar-event.red{background:#fee2e2;color:#b91c1c}.tm-calendar-side{display:flex;flex-direction:column;gap:18px}.tm-calendar-form,.tm-upcoming-card{padding:18px}.tm-calendar-form h2,.tm-upcoming-card h2{font-size:17px;font-weight:900;margin:0 0 14px;color:var(--tm-heading)}.tm-calendar-form label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:850;color:#667085;margin-bottom:12px}.tm-calendar-form input,.tm-calendar-form select,.tm-calendar-form textarea{border:1px solid var(--tm-border);border-radius:12px;background:var(--tm-surface);color:var(--tm-text);padding:10px 12px;font-size:14px;outline:0}.tm-calendar-form input:focus,.tm-calendar-form select:focus,.tm-calendar-form textarea:focus{border-color:#93c5fd;box-shadow:0 0 0 4px rgba(37,99,235,.10)}.tm-form-row-2{display:grid;grid-template-columns:1fr 1fr;gap:10px}.tm-upcoming-item{display:grid;grid-template-columns:16px minmax(0,1fr) 34px;gap:10px;align-items:center;border-top:1px solid var(--tm-border);padding:12px 0}.tm-upcoming-item:first-of-type{border-top:0}.tm-upcoming-item strong{display:block;font-size:13px;color:var(--tm-heading)}.tm-upcoming-item small{display:block;color:#667085;font-size:12px}.tm-folder-color{font-size:16px}.tm-folder-color.blue,.tm-folder-color-form option[value="blue"]{color:#2563eb}.tm-folder-color.green{color:#16a34a}.tm-folder-color.purple{color:#7c3aed}.tm-folder-color.orange{color:#f97316}.tm-folder-color.red{color:#dc2626}.tm-folder-color.gray{color:#64748b}.tm-upcoming-item .tm-folder-color{width:11px;height:11px;border-radius:50%;display:inline-block;background:#2563eb}.tm-upcoming-item .tm-folder-color.green{background:#16a34a}.tm-upcoming-item .tm-folder-color.purple{background:#7c3aed}.tm-upcoming-item .tm-folder-color.orange{background:#f97316}.tm-upcoming-item .tm-folder-color.red{background:#dc2626}.tm-upcoming-item .tm-folder-color.gray{background:#64748b}.tm-context-menu button:not(.danger){color:var(--tm-text)}
[data-bs-theme="dark"] .tm-view-controls select,[data-bs-theme="dark"] .tm-calendar-form input,[data-bs-theme="dark"] .tm-calendar-form select,[data-bs-theme="dark"] .tm-calendar-form textarea{background:#111827;color:#e5e7eb;border-color:#263244}[data-bs-theme="dark"] .tm-calendar-day{background:#101827}[data-bs-theme="dark"] .tm-calendar-card,[data-bs-theme="dark"] .tm-card,[data-bs-theme="dark"] .tm-calendar-month-actions{background:#0f172a;border-color:#263244}
@media(max-width:1180px){.tm-view-controls{order:10;width:100%;margin-left:0}.tm-calendar-layout{grid-template-columns:1fr}.tm-calendar-side{display:grid;grid-template-columns:1fr 1fr}.tm-calendar-day{min-height:94px}}
@media(max-width:760px){.tm-calendar-page{padding:14px}.tm-calendar-head{flex-direction:column}.tm-calendar-layout,.tm-calendar-side{display:block}.tm-calendar-side{margin-top:16px}.tm-calendar-form{margin-bottom:16px}.tm-calendar-grid,.tm-calendar-weekdays{gap:4px}.tm-calendar-day{min-height:82px;border-radius:10px;padding:6px}.tm-calendar-event{font-size:10px}.tm-view-controls{display:none}.tm-folder-color-form{display:none}}

/* Torobyte Mail v10: compose real Gmail abajo derecha y navegación AJAX fluida */
.tm-main,.tm-mail-page{position:relative;}
.tm-ajax-busy .tm-mail-board{opacity:.985;}
.tm-loading-panel{position:relative;}
.tm-loading-panel:before{content:"";position:absolute;top:12px;right:16px;width:18px;height:18px;border:2px solid #dbeafe;border-top-color:#2563eb;border-radius:50%;animation:tmSpin .7s linear infinite;z-index:4;}
@keyframes tmSpin{to{transform:rotate(360deg)}}
.tm-compose-modal.tm-compose-gmail{position:fixed!important;right:28px!important;bottom:0!important;top:auto!important;left:auto!important;transform:none!important;width:min(620px,calc(100vw - 40px))!important;height:min(580px,calc(100vh - 92px))!important;max-width:calc(100vw - 40px)!important;max-height:calc(100vh - 92px)!important;border-radius:14px 14px 0 0!important;resize:both;overflow:auto;z-index:5000!important;box-shadow:0 18px 70px rgba(15,23,42,.22)!important;}
.tm-compose-modal.tm-compose-gmail .tm-compose-titlebar{height:46px;padding:0 16px;font-size:15px;background:#f8fafc;}
.tm-compose-modal.tm-compose-gmail .tm-field-line{min-height:40px;padding:0 14px;}
.tm-compose-modal.tm-compose-gmail .tm-editor-toolbar{min-height:42px;padding:0 12px;}
.tm-compose-modal.tm-compose-gmail .tm-compose-editor{min-height:210px;}
.tm-compose-modal.tm-compose-gmail.maximized{inset:86px 24px 24px 24px!important;width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;border-radius:18px!important;resize:none;}
.tm-compose-modal.tm-compose-gmail.minimized{height:46px!important;width:360px!important;overflow:hidden!important;resize:none!important;}
.tm-compose-modal.tm-compose-gmail.minimized .tm-compose-fields,.tm-compose-modal.tm-compose-gmail.minimized .tm-compose-editor-wrap,.tm-compose-modal.tm-compose-gmail.minimized .tm-compose-attach-row,.tm-compose-modal.tm-compose-gmail.minimized .tm-compose-actions{display:none!important;}
.tm-sidebar .tm-folder-nav-row{min-height:48px;}
.tm-nav-link.tm-drop-active,.tm-folder-nav-row.tm-drop-active{background:#dbeafe!important;outline:2px dashed #2563eb;outline-offset:-3px;}
.tm-message-row.unread:not(.selected) .tm-message-text strong,.tm-message-row.unread:not(.selected) .tm-message-text span{font-weight:900;}
.tm-live-refresh-badge{animation:tmSlideIn .18s ease;}
@keyframes tmSlideIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
@media(max-width:760px){.tm-compose-modal.tm-compose-gmail{right:10px!important;bottom:0!important;width:calc(100vw - 20px)!important;height:calc(100vh - 86px)!important;max-width:none!important;max-height:none!important;}}

/* Torobyte Mail v11: login limpio, adjuntos inline, vistas con iconos y confirmaciones modales */
.tm-login-simple{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:48px 20px;background:linear-gradient(135deg,#f8fbff 0%,#eef5ff 100%)}
.tm-login-panel-clean{width:min(980px,100%);display:flex;flex-direction:column;align-items:center;gap:26px;background:transparent!important;box-shadow:none!important;border:0!important;padding:0!important}
.tm-login-card-clean{width:min(760px,100%);padding:84px 86px 78px!important;border-radius:44px!important;box-shadow:0 34px 100px rgba(15,23,42,.10)!important;background:#fff!important;border:1px solid rgba(203,213,225,.78)!important}
.tm-login-card-clean .tm-login-card-brand{justify-content:center;margin-bottom:64px!important}.tm-login-card-clean .tm-login-card-brand img{width:72px;height:72px}.tm-login-card-clean .tm-login-card-brand strong{font-size:34px}.tm-login-card-clean h2{text-align:center;font-size:36px!important;margin-bottom:18px!important}.tm-login-card-clean>p{text-align:center;font-size:20px!important;margin-bottom:52px!important}.tm-login-row-clean{justify-content:flex-start!important}.tm-login-footer-clean{width:min(760px,100%);color:#8090a6;font-size:18px}
.tm-storage-card a{display:none!important}.tm-storage-card{padding-bottom:18px!important}
.tm-view-picker{display:inline-flex;align-items:center;gap:6px;margin-left:8px}.tm-view-picker span{font-size:12px;color:#64748b;font-weight:800;margin-right:2px}.tm-view-picker button{width:34px;height:34px;border:1px solid var(--tm-border);border-radius:10px;background:var(--tm-surface);color:#64748b;display:inline-flex;align-items:center;justify-content:center;transition:.16s ease}.tm-view-picker button:hover,.tm-view-picker button.active{background:var(--tm-blue-soft);color:var(--tm-blue);border-color:#bfdbfe}
.tm-attachment{gap:12px}.tm-attachment strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tm-attachment-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}.tm-attach-preview{height:34px;display:inline-flex;align-items:center;gap:8px;border:1px solid #dbeafe;border-radius:10px;padding:0 11px;background:#eff6ff;color:#2563eb;font-weight:800;font-size:12px}.tm-attach-preview:hover{background:#dbeafe;color:#1d4ed8}.tm-attach-download{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;color:#475569}.tm-attach-download:hover{background:#f1f5f9;color:#2563eb}
.tm-confirm-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.34);backdrop-filter:blur(4px);z-index:9000;display:none;align-items:center;justify-content:center;padding:20px}.tm-confirm-backdrop.open{display:flex}.tm-confirm-box{width:min(430px,100%);background:var(--tm-surface);border:1px solid var(--tm-border);border-radius:22px;box-shadow:0 34px 90px rgba(15,23,42,.24);padding:26px;text-align:center}.tm-confirm-icon{width:52px;height:52px;margin:0 auto 14px;border-radius:16px;background:#fff7ed;color:#f97316;display:flex;align-items:center;justify-content:center;font-size:22px}.tm-confirm-box h3{margin:0 0 8px;color:var(--tm-heading);font-size:21px;font-weight:900}.tm-confirm-box p{color:var(--tm-muted);margin:0 0 22px;font-size:15px}.tm-confirm-actions{display:flex;gap:12px;justify-content:center}.tm-danger-btn{height:42px;border:0;border-radius:12px;background:#dc2626;color:#fff;font-weight:850;padding:0 20px}.tm-danger-btn:hover{background:#b91c1c}.tm-confirm-actions .tm-light-btn{height:42px;padding:0 20px;border-radius:12px}
[data-bs-theme="dark"] .tm-login-simple{background:#0b1220}[data-bs-theme="dark"] .tm-login-card-clean{background:#101827!important;border-color:#263244!important}[data-bs-theme="dark"] .tm-attach-preview{background:#172554;border-color:#1e3a8a;color:#93c5fd}[data-bs-theme="dark"] .tm-confirm-backdrop{background:rgba(0,0,0,.55)}
@media(max-width:760px){.tm-login-card-clean{padding:46px 24px!important;border-radius:28px!important}.tm-login-card-clean .tm-login-card-brand{margin-bottom:38px!important}.tm-login-card-clean .tm-login-card-brand strong{font-size:27px}.tm-login-card-clean h2{font-size:28px!important}.tm-login-card-clean>p{font-size:16px!important;margin-bottom:34px!important}.tm-login-footer-clean{font-size:14px;text-align:center}.tm-attachment{align-items:flex-start}.tm-attachment-actions{flex-direction:column;align-items:flex-end}.tm-attach-preview{font-size:0}.tm-attach-preview i{font-size:14px}}


/* Torobyte Mail v13: sidebar compacto, scroll independiente y menú contextual de carpetas */
:root{--tm-sidebar:272px;}
html,body.tm-auth{height:100%;overflow:hidden;}
.tm-auth .tm-app{height:100vh;overflow:hidden;display:grid;grid-template-rows:var(--tm-topbar) minmax(0,1fr);}
.tm-auth .tm-workspace{height:calc(100vh - var(--tm-topbar));min-height:0;overflow:hidden;}
.tm-auth .tm-main{min-height:0;overflow:auto;}
.tm-sidebar{height:calc(100vh - var(--tm-topbar))!important;min-height:0!important;overflow:hidden!important;padding:14px 14px 16px!important;gap:12px!important;}
.tm-compose-main{height:52px!important;border-radius:14px!important;font-size:15px!important;gap:12px!important;box-shadow:0 10px 20px rgba(37,99,235,.18)!important;}
.tm-compose-main i{font-size:18px!important;}
.tm-nav{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;gap:3px!important;padding-right:4px;scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent;}
.tm-nav::-webkit-scrollbar{width:7px}.tm-nav::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px}.tm-nav::-webkit-scrollbar-track{background:transparent}
.tm-nav-link{height:38px!important;border-radius:12px!important;grid-template-columns:26px minmax(0,1fr) auto!important;gap:8px!important;padding:0 10px!important;font-size:13px!important;font-weight:760!important;}
.tm-nav-link i{font-size:15px!important;}.tm-nav-link span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.tm-nav-link b,.tm-nav-link em,.tm-folder-unread{min-width:22px;border-radius:999px;padding:2px 7px;font-size:11px;font-weight:900;text-align:center;background:#dbeafe;color:#2563eb;}
.tm-sidebar-group-title{margin:8px 0 3px!important;padding:0 10px!important;font-size:10.5px!important;letter-spacing:.055em!important;}
.tm-sidebar-group-title a{width:24px!important;height:24px!important;}
.tm-sidebar-mini-form{grid-template-columns:minmax(0,1fr) 30px!important;gap:5px!important;padding:0 4px!important;margin:4px 0 8px!important;}
.tm-sidebar-mini-form input{height:32px!important;border-radius:9px!important;font-size:11px!important;padding:0 9px!important;}
.tm-sidebar-mini-form button{height:32px!important;width:30px!important;border-radius:9px!important;}
.tm-nav-divider{margin:8px 0!important;}.tm-storage-card{flex:0 0 auto;margin-top:8px!important;padding:12px!important;border-radius:14px!important;}
.tm-storage-title{font-size:12px!important;}.tm-storage-card p{font-size:11px!important;margin:8px 0!important;}.tm-progress{height:6px!important;}
.tm-folder-nav-row{position:relative;min-height:38px!important;display:flex;align-items:center;border-radius:12px;}
.tm-folder-nav-row .tm-nav-link{width:100%;padding-right:38px!important;}
.tm-folder-nav-row.level-1 .tm-nav-link{padding-left:18px!important;}.tm-folder-nav-row.level-2 .tm-nav-link{padding-left:30px!important;}.tm-folder-nav-row.level-3 .tm-nav-link{padding-left:42px!important;}
.tm-folder-color-dot{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:23px;height:23px;border-radius:50%;opacity:.75;background:#dbeafe;border:2px solid rgba(255,255,255,.85);box-shadow:0 0 0 1px rgba(148,163,184,.16);pointer-events:none;}
.tm-folder-color-dot.blue{background:#dbeafe}.tm-folder-color-dot.green{background:#dcfce7}.tm-folder-color-dot.purple{background:#ede9fe}.tm-folder-color-dot.orange{background:#ffedd5}.tm-folder-color-dot.red{background:#fee2e2}.tm-folder-color-dot.gray{background:#e2e8f0}
.tm-folder-context-menu{min-width:252px;}.tm-folder-color-menu{padding:8px 10px 10px;}.tm-folder-color-menu span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#64748b;font-weight:900;margin-bottom:8px}.tm-folder-color-menu .tm-color-choice{display:inline-flex;width:26px;height:26px;padding:0;margin:0 3px 3px 0;align-items:center;justify-content:center;border-radius:50%;}.tm-folder-color-menu .tm-color-choice i{font-size:14px}.tm-color-choice.blue i{color:#2563eb}.tm-color-choice.green i{color:#16a34a}.tm-color-choice.purple i{color:#7c3aed}.tm-color-choice.orange i{color:#f97316}.tm-color-choice.red i{color:#dc2626}.tm-color-choice.gray i{color:#64748b}
.tm-dragging-mail .tm-folder-nav-row:hover{background:#eff6ff;outline:2px dashed #2563eb;outline-offset:-4px;}
@media (max-width:1500px){:root{--tm-sidebar:256px;}.tm-sidebar{padding-left:12px!important;padding-right:12px!important;}}
@media (max-width:1180px){:root{--tm-sidebar:86px}.tm-sidebar{padding:12px 8px!important}.tm-compose-main{width:56px!important;height:56px!important}.tm-sidebar-group-title,.tm-sidebar-mini-form,.tm-folder-color-dot{display:none!important}.tm-folder-nav-row .tm-nav-link{padding-right:0!important}.tm-folder-nav-row.level-1 .tm-nav-link,.tm-folder-nav-row.level-2 .tm-nav-link,.tm-folder-nav-row.level-3 .tm-nav-link{padding-left:0!important}}
@media (max-width:760px){html,body.tm-auth{overflow:auto}.tm-auth .tm-app{height:auto;overflow:visible}.tm-auth .tm-workspace{height:auto;overflow:visible}.tm-sidebar{height:calc(100vh - var(--tm-topbar))!important}}

/* Torobyte Mail v14 - sidebar compacto, scroll lateral estable, árbol de carpetas y popups */
:root{--tm-sidebar:258px;--tm-row-compact:34px;}
html,body.tm-auth{height:100%;overflow:hidden;}
.tm-auth .tm-app{height:100vh;min-height:100vh;overflow:hidden;}
.tm-auth .tm-workspace{height:calc(100vh - var(--tm-topbar));min-height:0;overflow:hidden;}
.tm-auth .tm-main{min-height:0;overflow:hidden;}
.tm-sidebar{height:calc(100vh - var(--tm-topbar))!important;min-height:0!important;overflow:hidden!important;padding:14px 12px!important;gap:10px!important;display:flex!important;flex-direction:column!important;background:#fff;}
.tm-compose-main{height:52px!important;min-height:52px!important;border-radius:14px!important;font-size:15px!important;gap:12px!important;flex:0 0 auto;}
.tm-compose-main i{font-size:18px!important;}
.tm-nav{flex:1 1 auto;min-height:0;overflow-y:auto!important;overflow-x:hidden!important;gap:3px!important;padding:0 4px 8px 0;scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent;}
.tm-nav::-webkit-scrollbar{width:7px}.tm-nav::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px}.tm-nav::-webkit-scrollbar-track{background:transparent}
.tm-nav-link{height:var(--tm-row-compact)!important;border-radius:10px!important;grid-template-columns:24px minmax(0,1fr) auto!important;gap:8px!important;padding:0 9px!important;font-size:12.7px!important;font-weight:760!important;}
.tm-nav-link i{font-size:14.5px!important;}.tm-nav-link span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.tm-nav-link b,.tm-nav-link em,.tm-folder-unread{min-width:20px;border-radius:999px;padding:1px 6px;font-size:10.5px;font-weight:900;text-align:center;background:#dbeafe!important;color:#2563eb!important;}
.tm-sidebar-group-title{height:28px!important;margin:9px 0 3px!important;padding:0 8px!important;font-size:10px!important;letter-spacing:.07em!important;color:#64748b;display:flex!important;align-items:center!important;justify-content:space-between!important;}
.tm-sidebar-group-title span{text-transform:uppercase;font-weight:950;}
.tm-sidebar-group-title a,.tm-sidebar-group-title button{width:24px!important;height:24px!important;border:0!important;border-radius:8px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;background:transparent!important;color:#2563eb!important;}
.tm-sidebar-group-title a:hover,.tm-sidebar-group-title button:hover{background:#eaf2ff!important;}
.tm-sidebar-mini-form{display:none!important;}
.tm-nav-divider{margin:8px 0!important;}.tm-storage-card{flex:0 0 auto;margin-top:6px!important;padding:12px!important;border-radius:14px!important;}
.tm-storage-title{font-size:12px!important;}.tm-storage-card p{font-size:11px!important;margin:7px 0!important;}.tm-progress{height:6px!important;}
.tm-folder-nav-row{position:relative;min-height:var(--tm-row-compact)!important;display:grid;grid-template-columns:18px minmax(0,1fr) 24px;align-items:center;border-radius:10px;padding:0 3px 0 0;}
.tm-folder-nav-row .tm-nav-link{width:100%;padding-left:3px!important;padding-right:5px!important;}
.tm-folder-nav-row.level-1{padding-left:12px}.tm-folder-nav-row.level-2{padding-left:24px}.tm-folder-nav-row.level-3{padding-left:36px}.tm-folder-nav-row.level-4{padding-left:48px}.tm-folder-nav-row.level-5{padding-left:60px}.tm-folder-nav-row.level-6{padding-left:72px}
.tm-folder-toggle,.tm-folder-toggle-spacer{width:18px;height:24px;display:inline-flex;align-items:center;justify-content:center;}
.tm-folder-toggle{border:0;background:transparent;color:#64748b;border-radius:7px;font-size:10px;}
.tm-folder-toggle:hover{background:#eef4ff;color:#2563eb}.tm-folder-nav-row.is-collapsed>.tm-folder-toggle i{transform:rotate(-90deg)}.tm-folder-toggle i{transition:.15s ease}
.tm-folder-color-dot{width:18px!important;height:18px!important;border-radius:50%;opacity:1!important;position:static!important;transform:none!important;border:2px solid #fff!important;box-shadow:0 0 0 1px rgba(15,23,42,.10)!important;}
.tm-folder-nav-row.is-hidden-by-collapse{display:none!important;}
.tm-folder-nav-row .tm-folder-color{font-size:15px!important;}
.tm-folder-nav-row .tm-nav-link:hover,.tm-folder-nav-row .tm-nav-link.active{background:#eef4ff!important;}
.tm-folder-color.blue,.tm-label-dot.blue{color:#2563eb!important}.tm-folder-color-dot.blue,.tm-swatch.blue,.tm-swatch.blue span{background:#2563eb!important}.tm-calendar-event.blue{background:#dbeafe;color:#1d4ed8}
.tm-folder-color.sky,.tm-label-dot.sky{color:#0284c7!important}.tm-folder-color-dot.sky,.tm-swatch.sky,.tm-swatch.sky span{background:#0ea5e9!important}
.tm-folder-color.cyan,.tm-label-dot.cyan{color:#0891b2!important}.tm-folder-color-dot.cyan,.tm-swatch.cyan,.tm-swatch.cyan span{background:#06b6d4!important}
.tm-folder-color.teal,.tm-label-dot.teal{color:#0f766e!important}.tm-folder-color-dot.teal,.tm-swatch.teal,.tm-swatch.teal span{background:#14b8a6!important}
.tm-folder-color.green,.tm-label-dot.green{color:#16a34a!important}.tm-folder-color-dot.green,.tm-swatch.green,.tm-swatch.green span{background:#16a34a!important}
.tm-folder-color.emerald,.tm-label-dot.emerald{color:#059669!important}.tm-folder-color-dot.emerald,.tm-swatch.emerald,.tm-swatch.emerald span{background:#10b981!important}
.tm-folder-color.lime,.tm-label-dot.lime{color:#65a30d!important}.tm-folder-color-dot.lime,.tm-swatch.lime,.tm-swatch.lime span{background:#84cc16!important}
.tm-folder-color.yellow,.tm-label-dot.yellow{color:#ca8a04!important}.tm-folder-color-dot.yellow,.tm-swatch.yellow,.tm-swatch.yellow span{background:#eab308!important}
.tm-folder-color.amber,.tm-label-dot.amber{color:#d97706!important}.tm-folder-color-dot.amber,.tm-swatch.amber,.tm-swatch.amber span{background:#f59e0b!important}
.tm-folder-color.orange,.tm-label-dot.orange{color:#f97316!important}.tm-folder-color-dot.orange,.tm-swatch.orange,.tm-swatch.orange span{background:#f97316!important}
.tm-folder-color.red,.tm-label-dot.red{color:#dc2626!important}.tm-folder-color-dot.red,.tm-swatch.red,.tm-swatch.red span{background:#dc2626!important}
.tm-folder-color.rose,.tm-label-dot.rose{color:#e11d48!important}.tm-folder-color-dot.rose,.tm-swatch.rose,.tm-swatch.rose span{background:#e11d48!important}
.tm-folder-color.pink,.tm-label-dot.pink{color:#db2777!important}.tm-folder-color-dot.pink,.tm-swatch.pink,.tm-swatch.pink span{background:#ec4899!important}
.tm-folder-color.purple,.tm-label-dot.purple{color:#7c3aed!important}.tm-folder-color-dot.purple,.tm-swatch.purple,.tm-swatch.purple span{background:#8b5cf6!important}
.tm-folder-color.violet,.tm-label-dot.violet{color:#6d28d9!important}.tm-folder-color-dot.violet,.tm-swatch.violet,.tm-swatch.violet span{background:#7c3aed!important}
.tm-folder-color.indigo,.tm-label-dot.indigo{color:#4f46e5!important}.tm-folder-color-dot.indigo,.tm-swatch.indigo,.tm-swatch.indigo span{background:#6366f1!important}
.tm-folder-color.slate,.tm-label-dot.slate{color:#334155!important}.tm-folder-color-dot.slate,.tm-swatch.slate,.tm-swatch.slate span{background:#475569!important}
.tm-folder-color.gray,.tm-label-dot.gray{color:#64748b!important}.tm-folder-color-dot.gray,.tm-swatch.gray,.tm-swatch.gray span{background:#64748b!important}
.tm-action-modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(15,23,42,.28);backdrop-filter:blur(4px);z-index:9200;padding:18px;}.tm-action-modal.open{display:flex}.tm-action-modal-card{width:min(420px,100%);background:var(--tm-surface);border:1px solid var(--tm-border);border-radius:22px;box-shadow:0 30px 90px rgba(15,23,42,.22);padding:22px;position:relative}.tm-action-modal-wide{width:min(560px,100%)}.tm-action-modal-card h3{font-size:20px;font-weight:950;color:var(--tm-heading);margin:0 36px 16px 0}.tm-action-modal-close{position:absolute;right:14px;top:14px;width:34px;height:34px;border:0;border-radius:10px;background:#f1f5f9;color:#475569}.tm-action-modal-close:hover{background:#e2e8f0}.tm-popup-form{display:grid;gap:14px}.tm-popup-form label{display:grid;gap:7px;font-size:12px;font-weight:900;color:#475569}.tm-popup-form input{height:42px;border:1px solid var(--tm-border);border-radius:12px;padding:0 13px;outline:0;color:var(--tm-heading);background:var(--tm-surface)}.tm-popup-form input:focus{border-color:#93c5fd;box-shadow:0 0 0 4px rgba(37,99,235,.10)}.tm-popup-help{margin:-6px 0 8px;color:#667085;font-size:13px}.tm-palette{display:flex;flex-wrap:wrap;gap:9px}.tm-swatch{width:30px;height:30px;border-radius:999px;border:3px solid #fff;box-shadow:0 0 0 1px #cbd5e1;cursor:pointer}.tm-swatch.active{box-shadow:0 0 0 3px rgba(37,99,235,.22),0 0 0 1px #2563eb}.tm-palette-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.tm-palette-grid .tm-swatch{width:auto;height:38px;border-radius:12px;display:flex;align-items:center;gap:9px;justify-content:flex-start;padding:0 10px;border:1px solid var(--tm-border);background:#fff!important;color:#334155!important;font-size:12px;font-weight:850;box-shadow:none}.tm-palette-grid .tm-swatch span{width:18px;height:18px;border-radius:50%;display:inline-block;flex:0 0 auto}.tm-palette-grid .tm-swatch.active{border-color:#2563eb;background:#eff6ff!important;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.tm-folder-context-menu{min-width:252px;}.tm-context-menu button:not(.danger){color:var(--tm-text)}
.tm-dragging-mail .tm-folder-nav-row:hover{background:#eff6ff;outline:2px dashed #2563eb;outline-offset:-4px;}
[data-bs-theme="dark"] .tm-action-modal-card{background:#111827;border-color:#334155}[data-bs-theme="dark"] .tm-popup-form input{background:#0f172a;border-color:#334155;color:#e5e7eb}[data-bs-theme="dark"] .tm-palette-grid .tm-swatch{background:#111827!important;color:#d1d5db!important;border-color:#334155}[data-bs-theme="dark"] .tm-sidebar{background:#0f172a}
@media (max-width:1500px){:root{--tm-sidebar:248px}.tm-sidebar{padding-left:10px!important;padding-right:10px!important}}
@media (max-width:1180px){:root{--tm-sidebar:86px}.tm-sidebar{padding:12px 8px!important}.tm-compose-main{width:56px!important;height:56px!important}.tm-sidebar-group-title,.tm-folder-color-dot,.tm-folder-toggle,.tm-folder-toggle-spacer{display:none!important}.tm-folder-nav-row{display:block!important;padding-left:0!important}.tm-folder-nav-row .tm-nav-link{padding-right:0!important}.tm-folder-nav-row.level-1,.tm-folder-nav-row.level-2,.tm-folder-nav-row.level-3,.tm-folder-nav-row.level-4,.tm-folder-nav-row.level-5,.tm-folder-nav-row.level-6{padding-left:0!important}}
@media (max-width:760px){html,body.tm-auth{overflow:auto}.tm-auth .tm-app{height:auto;overflow:visible}.tm-auth .tm-workspace{height:auto;overflow:visible}.tm-sidebar{height:calc(100vh - var(--tm-topbar))!important}}

/* v15 - adjuntos en modal, perfil, reglas robustas */
.tm-avatar-img{object-fit:cover;background:#e5e7eb;color:transparent;box-shadow:0 7px 16px rgba(37,99,235,.18)}
.tm-password-eye{border:0;background:transparent;color:#667085;width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;border-radius:12px;margin-left:auto}.tm-password-eye:hover{background:#eff6ff;color:#2563eb}
.tm-login-field div .tm-password-eye i{position:static!important;margin:0!important}
.tm-profile-upload-row{display:grid;grid-template-columns:96px 1fr;gap:18px;align-items:center;border:1px solid var(--tm-border);border-radius:18px;padding:16px;margin:12px 0 18px;background:var(--tm-surface-soft)}
.tm-profile-avatar-preview{width:86px;height:86px;border-radius:24px;background:linear-gradient(135deg,#2563eb,#0ea5e9);box-shadow:0 12px 24px rgba(37,99,235,.2);display:flex;align-items:center;justify-content:center;color:#fff;font-size:32px;font-weight:900;overflow:hidden}.tm-profile-avatar-preview img{width:100%;height:100%;object-fit:cover}.tm-profile-upload-row strong{display:block;color:var(--tm-heading);font-weight:850}.tm-profile-upload-row small{display:block;color:var(--tm-muted);margin-top:3px}
.tm-flash{transition:opacity .25s ease,transform .25s ease}.tm-flash:not(.show){opacity:0;transform:translateY(-8px)}
.tm-attachments-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:24px;margin-bottom:10px}.tm-attachments-head strong{color:var(--tm-heading);font-weight:850;display:flex;gap:9px;align-items:center}.tm-attachment.is-previewable{cursor:pointer}.tm-attachment.is-previewable:hover{border-color:#bfdbfe;background:#f8fbff;box-shadow:0 8px 20px rgba(37,99,235,.08)}.tm-attach-preview{border:0;background:transparent;color:#2563eb;font-weight:800;display:inline-flex;align-items:center;gap:7px}.tm-attach-preview:hover{text-decoration:underline}.tm-attachment-modal{position:fixed;inset:0;background:rgba(15,23,42,.46);backdrop-filter:blur(4px);z-index:6000;display:none;align-items:center;justify-content:center;padding:24px}.tm-attachment-modal.open{display:flex}.tm-attachment-viewer{width:min(1120px,96vw);height:min(820px,92vh);background:var(--tm-surface);border:1px solid var(--tm-border);border-radius:22px;box-shadow:0 28px 80px rgba(15,23,42,.28);display:flex;flex-direction:column;overflow:hidden}.tm-attachment-head{height:72px;border-bottom:1px solid var(--tm-border);display:flex;align-items:center;justify-content:space-between;padding:0 20px;gap:14px}.tm-attachment-head strong{display:block;color:var(--tm-heading);font-size:17px}.tm-attachment-head small{display:block;color:var(--tm-muted);font-size:12px;margin-top:2px}.tm-attachment-head-actions{display:flex;align-items:center;gap:10px}.tm-attachment-body{flex:1;background:#f8fafc;overflow:auto;display:flex;align-items:center;justify-content:center}.tm-attachment-frame{width:100%;height:100%;border:0;background:#fff}.tm-attachment-img{max-width:100%;max-height:100%;object-fit:contain}.tm-attachment-loading{color:#64748b;font-weight:800;display:flex;gap:12px;align-items:center}.tm-rule-builder{display:grid;gap:16px;margin-top:18px}.tm-rule-builder.compact{margin-top:14px}.tm-rule-row{display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:14px}.tm-rule-row.full{grid-template-columns:1fr}.tm-rule-row label,.tm-rule-builder label{display:flex;flex-direction:column;gap:8px;color:var(--tm-heading);font-weight:780}.tm-rule-saved-item{border:1px solid var(--tm-border);border-radius:16px;padding:14px;display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:14px;align-items:center;margin-top:10px;background:var(--tm-surface-soft)}.tm-rule-saved-item strong{display:block;color:var(--tm-heading)}.tm-rule-saved-item small{display:block;color:var(--tm-muted);margin-top:3px}.tm-rule-popup-card{width:min(720px,94vw)}.tm-rule-popup-card .tm-form-row-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.tm-rule-popup-card p{color:var(--tm-muted);margin-bottom:12px}
@media (max-width:760px){.tm-profile-upload-row,.tm-rule-row,.tm-rule-popup-card .tm-form-row-2{grid-template-columns:1fr}.tm-attachment-viewer{width:98vw;height:92vh;border-radius:18px}.tm-attachment-head{height:auto;min-height:72px;align-items:flex-start;padding:14px;flex-direction:column}.tm-attachment-head-actions{width:100%;justify-content:flex-end}}

/* v16: impresión, correo aislado, sidebar fijo, modales y notificaciones */
.tm-auth .tm-app{height:100vh;overflow:hidden;}
.tm-auth .tm-workspace{height:calc(100vh - var(--tm-topbar));min-height:0;overflow:hidden;}
.tm-main{min-height:0;overflow:hidden;}
.tm-sidebar{height:calc(100vh - var(--tm-topbar))!important;min-height:0!important;overflow:hidden!important;gap:12px!important;}
.tm-sidebar>.tm-compose-main{flex:0 0 auto!important;}
.tm-sidebar>.tm-nav{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding-right:5px!important;overscroll-behavior:contain;scrollbar-width:thin;}
.tm-sidebar>.tm-storage-card{flex:0 0 auto!important;margin-top:8px!important;}
.tm-mail-page{height:100%!important;min-height:0!important;}
.tm-folder-nav-row .tm-nav-link{min-width:0;}
.tm-folder-nav-row .tm-nav-link span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tm-folder-color.blue{color:#2563eb!important}.tm-folder-color.sky{color:#0ea5e9!important}.tm-folder-color.cyan{color:#06b6d4!important}.tm-folder-color.teal{color:#14b8a6!important}.tm-folder-color.green{color:#16a34a!important}.tm-folder-color.emerald{color:#10b981!important}.tm-folder-color.lime{color:#84cc16!important}.tm-folder-color.yellow{color:#eab308!important}.tm-folder-color.amber{color:#f59e0b!important}.tm-folder-color.orange{color:#f97316!important}.tm-folder-color.red{color:#dc2626!important}.tm-folder-color.rose{color:#e11d48!important}.tm-folder-color.pink{color:#ec4899!important}.tm-folder-color.purple{color:#8b5cf6!important}.tm-folder-color.violet{color:#7c3aed!important}.tm-folder-color.indigo{color:#6366f1!important}.tm-folder-color.slate{color:#475569!important}.tm-folder-color.gray{color:#64748b!important}
.tm-popup-modal{position:fixed!important;inset:0!important;z-index:9600!important;display:none!important;align-items:center!important;justify-content:center!important;background:rgba(15,23,42,.32)!important;backdrop-filter:blur(5px)!important;padding:18px!important;}
.tm-popup-modal.open{display:flex!important;}
.tm-popup-card{width:min(560px,100%);max-height:min(92vh,760px);overflow:auto;background:var(--tm-surface);border:1px solid var(--tm-border);border-radius:24px;box-shadow:0 30px 90px rgba(15,23,42,.26);padding:24px;position:relative;}
.tm-rule-popup-card{width:min(680px,100%);}
.tm-popup-x{position:absolute;right:15px;top:15px;width:34px;height:34px;border:0;border-radius:10px;background:#f1f5f9;color:#475569;}
.tm-popup-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:14px;}
.tm-email-frame{width:100%;min-height:340px;border:0;background:#fff;border-radius:14px;display:block;overflow:hidden;}
.tm-body-card{overflow:visible!important;}
.tm-preview-content{scrollbar-width:thin;}
.tm-preview-toolbar .dropdown,.tm-list-toolbar .dropdown{display:inline-flex;}
.tm-setting-inline{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end;}
.tm-icon-btn.is-granted,.tm-bell.is-granted{background:#eaf7ef;color:#16a34a;}
.tm-rule-builder label.is-muted{opacity:.65;}
.tm-rule-builder label.is-muted select{background:#f8fafc;}
.tm-ajax-busy .tm-main:after{content:"";position:fixed;right:18px;bottom:18px;width:22px;height:22px;border-radius:50%;border:3px solid #dbeafe;border-top-color:#2563eb;animation:tmSpin .8s linear infinite;z-index:6000;}@keyframes tmSpin{to{transform:rotate(360deg)}}
@media print{body>*:not(.tm-print-root){display:none!important}.tm-email-frame{height:auto!important}.tm-body-card,.tm-preview-content{box-shadow:none!important;border:0!important;padding:0!important}}
@media (max-width:760px){.tm-auth .tm-app,.tm-auth .tm-workspace,.tm-main{height:auto!important;overflow:visible!important}.tm-sidebar{height:calc(100vh - var(--tm-topbar))!important;overflow:auto!important}}

/* v17: lateral estable estilo Gmail, árbol real y carpetas con acciones por hover */
:root{--tm-sidebar:286px;--tm-sidebar-top-height:auto;--tm-sidebar-bottom-height:auto;}
.tm-sidebar-v17{height:calc(100vh - var(--tm-topbar))!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;padding:18px 16px!important;gap:14px!important;background:#fff!important;}
.tm-sidebar-v17 .tm-sidebar-top-fixed{flex:0 0 auto!important;display:flex;flex-direction:column;gap:14px;}
.tm-sidebar-v17 .tm-sidebar-bottom-fixed{flex:0 0 auto!important;display:flex;flex-direction:column;gap:12px;border-top:1px solid #e8eef7;padding-top:12px;background:#fff;}
.tm-sidebar-v17 .tm-sidebar-scroll-area{flex:1 1 auto!important;min-height:160px!important;overflow-y:auto!important;overflow-x:hidden!important;padding-right:6px;scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent;overscroll-behavior:contain;}
.tm-sidebar-v17 .tm-sidebar-scroll-area::-webkit-scrollbar{width:7px}.tm-sidebar-v17 .tm-sidebar-scroll-area::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px}.tm-sidebar-v17 .tm-sidebar-scroll-area::-webkit-scrollbar-track{background:transparent}
.tm-sidebar-v17 .tm-nav{overflow:visible!important;flex:none!important;min-height:auto!important;padding:0!important;gap:3px!important;}
.tm-sidebar-v17 .tm-compose-main{height:56px!important;min-height:56px!important;border-radius:18px!important;font-size:16px!important;font-weight:900!important;box-shadow:0 14px 28px rgba(37,99,235,.20)!important;}
.tm-sidebar-v17 .tm-nav-link{height:38px!important;min-height:38px!important;border-radius:13px!important;grid-template-columns:28px minmax(0,1fr) auto!important;gap:10px!important;padding:0 12px!important;font-size:13.5px!important;font-weight:780!important;}
.tm-sidebar-v17 .tm-nav-link i{font-size:16px!important}.tm-sidebar-v17 .tm-nav-link span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tm-sidebar-v17 .tm-sidebar-primary .tm-nav-link{height:42px!important;font-size:14.2px!important;}
.tm-sidebar-v17 .tm-sidebar-footer-nav .tm-nav-link{height:38px!important;}
.tm-sidebar-v17 .tm-sidebar-group-title{height:30px!important;margin:10px 0 5px!important;padding:0 10px!important;font-size:11px!important;letter-spacing:.08em;color:#65758b;}
.tm-sidebar-v17 .tm-sidebar-group-title span{font-weight:950;text-transform:uppercase;}
.tm-sidebar-v17 .tm-sidebar-group-title button{width:28px!important;height:28px!important;border-radius:10px!important;color:#2563eb!important;background:transparent!important;border:0!important;}
.tm-sidebar-v17 .tm-sidebar-group-title button:hover{background:#eaf2ff!important;}
.tm-sidebar-v17 .tm-storage-card{margin:0!important;flex:0 0 auto!important;padding:14px!important;border-radius:18px!important;}
.tm-sidebar-v17 .tm-storage-title{font-size:13px!important}.tm-sidebar-v17 .tm-storage-card p{font-size:12px!important;margin:8px 0!important}.tm-sidebar-v17 .tm-progress{height:7px!important;}
.tm-folder-tree{display:flex;flex-direction:column;gap:2px;}
.tm-sidebar-v17 .tm-folder-nav-row{position:relative;display:grid!important;grid-template-columns:24px minmax(0,1fr) 28px;align-items:center;min-height:38px!important;border-radius:12px!important;padding-left:0!important;}
.tm-sidebar-v17 .tm-folder-nav-row:hover{background:#f8fbff;}
.tm-sidebar-v17 .tm-folder-nav-row.is-hidden-by-collapse{display:none!important;}
.tm-sidebar-v17 .tm-folder-nav-row.is-collapsed>.tm-folder-toggle i{transform:rotate(-90deg);}
.tm-sidebar-v17 .tm-folder-toggle,.tm-sidebar-v17 .tm-folder-toggle-spacer{width:24px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:0;background:transparent;color:#94a3b8;border-radius:8px;}
.tm-sidebar-v17 .tm-folder-toggle:hover{background:#eaf2ff;color:#2563eb;}
.tm-sidebar-v17 .tm-folder-toggle i{transition:transform .15s ease;font-size:11px;}
.tm-sidebar-v17 .tm-folder-nav-row .tm-nav-link{width:100%;height:38px!important;min-width:0!important;padding:0 8px!important;border-radius:11px!important;grid-column:2;}
.tm-sidebar-v17 .tm-folder-nav-row.level-1{padding-left:16px!important}.tm-sidebar-v17 .tm-folder-nav-row.level-2{padding-left:31px!important}.tm-sidebar-v17 .tm-folder-nav-row.level-3{padding-left:46px!important}.tm-sidebar-v17 .tm-folder-nav-row.level-4{padding-left:61px!important}.tm-sidebar-v17 .tm-folder-nav-row.level-5{padding-left:76px!important}.tm-sidebar-v17 .tm-folder-nav-row.level-6,.tm-sidebar-v17 .tm-folder-nav-row.level-7,.tm-sidebar-v17 .tm-folder-nav-row.level-8{padding-left:91px!important}
.tm-folder-solid{font-size:17px!important;color:#2563eb!important}.tm-folder-solid.blue{color:#2563eb!important}.tm-folder-solid.sky{color:#0ea5e9!important}.tm-folder-solid.cyan{color:#06b6d4!important}.tm-folder-solid.teal{color:#14b8a6!important}.tm-folder-solid.green{color:#16a34a!important}.tm-folder-solid.emerald{color:#10b981!important}.tm-folder-solid.lime{color:#84cc16!important}.tm-folder-solid.yellow{color:#eab308!important}.tm-folder-solid.amber{color:#f59e0b!important}.tm-folder-solid.orange{color:#f97316!important}.tm-folder-solid.red{color:#dc2626!important}.tm-folder-solid.rose{color:#e11d48!important}.tm-folder-solid.pink{color:#ec4899!important}.tm-folder-solid.purple{color:#8b5cf6!important}.tm-folder-solid.violet{color:#7c3aed!important}.tm-folder-solid.indigo{color:#6366f1!important}.tm-folder-solid.slate{color:#475569!important}.tm-folder-solid.gray{color:#64748b!important}
.tm-folder-more{grid-column:3;width:28px;height:28px;border:0;border-radius:9px;background:transparent;color:#94a3b8;display:inline-flex;align-items:center;justify-content:center;opacity:0;transform:scale(.96);transition:opacity .12s ease,background .12s ease,color .12s ease;}
.tm-folder-nav-row:hover .tm-folder-more,.tm-folder-nav-row:focus-within .tm-folder-more{opacity:1;}
.tm-folder-more:hover,.tm-folder-more.open{background:#eaf2ff;color:#2563eb;}
.tm-folder-color-dot{display:none!important;}
.tm-sidebar-v17 .tm-folder-unread,.tm-sidebar-v17 .tm-nav-link b,.tm-sidebar-v17 .tm-nav-link em{min-width:22px;padding:2px 7px;border-radius:999px;background:#dbeafe!important;color:#2563eb!important;font-size:11px;font-weight:950;text-align:center;}
.tm-sidebar-v17 .tm-folder-nav-row .tm-nav-link.active{background:#eaf2ff!important;color:#2563eb!important;}
.tm-dragging-mail .tm-folder-nav-row:hover{outline:2px dashed #2563eb;outline-offset:-2px;background:#eff6ff!important;}
.tm-sidebar-v17 .tm-nav-divider{display:none!important;}
.tm-rule-pro-grid{display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:12px;margin-top:12px}.tm-rule-actions-grid{display:grid;grid-template-columns:1fr 1.2fr auto;gap:12px;margin-top:12px;align-items:end}.tm-rule-options-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:12px 0}.tm-rule-help-box{background:#f8fbff;border:1px solid #dbeafe;color:#334155;border-radius:14px;padding:12px 14px;font-size:13px;margin:10px 0}.tm-calendar-modal-card{width:min(760px,96vw)}.tm-calendar-event{cursor:pointer}.tm-calendar-event:hover{filter:brightness(.96);transform:translateY(-1px)}
.tm-live-refresh-badge{position:fixed;right:20px;bottom:20px;z-index:9900;background:#0f172a;color:#fff;border-radius:14px;padding:12px 16px;box-shadow:0 14px 40px rgba(15,23,42,.25);font-weight:800;display:flex;align-items:center;gap:10px}
@media(max-width:1180px){:root{--tm-sidebar:86px}.tm-sidebar-v17 .tm-sidebar-scroll-area{padding-right:0}.tm-sidebar-v17 .tm-compose-main span,.tm-sidebar-v17 .tm-nav-link span,.tm-sidebar-v17 .tm-sidebar-group-title,.tm-sidebar-v17 .tm-storage-card,.tm-sidebar-v17 .tm-folder-more,.tm-sidebar-v17 .tm-folder-toggle,.tm-sidebar-v17 .tm-folder-toggle-spacer{display:none!important}.tm-sidebar-v17 .tm-folder-nav-row{display:block!important;padding-left:0!important}.tm-sidebar-v17 .tm-folder-nav-row .tm-nav-link{grid-column:auto;justify-content:center;padding:0!important}}
@media(max-width:760px){.tm-sidebar-v17{height:calc(100vh - var(--tm-topbar))!important}.tm-rule-pro-grid,.tm-rule-actions-grid,.tm-rule-options-grid{grid-template-columns:1fr}}
[data-bs-theme="dark"] .tm-sidebar-v17,[data-bs-theme="dark"] .tm-sidebar-v17 .tm-sidebar-bottom-fixed{background:#0f172a!important}[data-bs-theme="dark"] .tm-sidebar-v17 .tm-folder-nav-row:hover{background:#111d33!important}
.tm-calendar-layout-v17{grid-template-columns:minmax(720px,1fr) 360px}.tm-calendar-event{border:0;width:100%;text-align:left}.tm-calendar-side{min-width:0}.tm-upcoming-item[data-calendar-event]{cursor:pointer}.tm-calendar-form .tm-form-row-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.tm-calendar-form label{display:flex;flex-direction:column;gap:7px;color:var(--tm-heading);font-weight:780}.tm-calendar-form input,.tm-calendar-form select,.tm-calendar-form textarea{border:1px solid var(--tm-border);border-radius:12px;padding:10px 12px;background:var(--tm-surface);color:var(--tm-text)}
@media(max-width:1180px){.tm-calendar-layout-v17{grid-template-columns:1fr}.tm-calendar-side{display:block}}

/* Torobyte Mail v18 - logo oficial, impresión, modo oscuro optimizado, menú compacto y árbol estable */
:root{--tm-sidebar:272px;--tm-topbar:82px;}
.tm-brand-logo,.tm-login-card-brand img{object-fit:contain;border-radius:14px;filter:drop-shadow(0 10px 20px rgba(37,99,235,.20));}
.tm-brand-logo{width:48px!important;height:48px!important}.tm-login-card-brand img{width:58px!important;height:58px!important}
.tm-topbar{height:var(--tm-topbar)!important;grid-template-columns:var(--tm-sidebar) minmax(340px,780px) auto!important;padding:12px 24px!important;gap:24px!important}.tm-brand{font-size:25px!important;gap:12px!important}.tm-search{height:54px!important;border-radius:18px!important}.tm-workspace{min-height:calc(100vh - var(--tm-topbar))!important}.tm-main{padding:0 16px 16px 0!important}.tm-mail-page,.tm-settings-page,.tm-contacts-page,.tm-calendar-page{height:calc(100vh - var(--tm-topbar) - 16px)!important}
.tm-sidebar-v17{height:calc(100vh - var(--tm-topbar))!important;padding:12px 12px!important;gap:10px!important;display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;background:var(--tm-surface)!important;}
.tm-sidebar-v17 .tm-sidebar-top-fixed{gap:9px!important;min-height:auto!important;}.tm-sidebar-v17 .tm-sidebar-bottom-fixed{gap:9px!important;padding-top:9px!important;background:var(--tm-surface)!important;min-height:auto!important;}
.tm-sidebar-v17 .tm-sidebar-scroll-area{min-height:0!important;height:auto!important;overflow-y:auto!important;overflow-x:hidden!important;padding-right:4px!important;}
.tm-sidebar-v17 .tm-compose-main{height:48px!important;min-height:48px!important;border-radius:15px!important;font-size:15px!important;}
.tm-sidebar-v17 .tm-sidebar-primary .tm-nav-link{height:34px!important;min-height:34px!important;font-size:13.2px!important;border-radius:10px!important;}
.tm-sidebar-v17 .tm-sidebar-footer-nav .tm-nav-link{height:32px!important;min-height:32px!important;font-size:13px!important;border-radius:10px!important;}
.tm-sidebar-v17 .tm-nav-link{height:33px!important;min-height:33px!important;grid-template-columns:24px minmax(0,1fr) auto!important;gap:8px!important;padding:0 10px!important;font-size:12.8px!important;}
.tm-sidebar-v17 .tm-nav-link i{font-size:15px!important}.tm-sidebar-v17 .tm-sidebar-group-title{height:24px!important;margin:7px 0 2px!important;padding:0 8px!important;font-size:9.8px!important;}
.tm-sidebar-v17 .tm-sidebar-group-title button{width:22px!important;height:22px!important;border-radius:8px!important}.tm-sidebar-v17 .tm-storage-card{padding:11px 12px!important;border-radius:15px!important;}.tm-sidebar-v17 .tm-storage-title{font-size:12px!important}.tm-sidebar-v17 .tm-storage-card p{font-size:11px!important;margin:7px 0!important}.tm-sidebar-v17 .tm-progress{height:6px!important}
.tm-sidebar-v17 .tm-folder-nav-row{grid-template-columns:20px minmax(0,1fr) 28px!important;min-height:32px!important;border-radius:10px!important;}
.tm-sidebar-v17 .tm-folder-nav-row .tm-nav-link{height:32px!important;min-height:32px!important;border-radius:9px!important;padding:0 7px!important;}
.tm-sidebar-v17 .tm-folder-toggle,.tm-sidebar-v17 .tm-folder-toggle-spacer{width:20px!important;height:24px!important}.tm-sidebar-v17 .tm-folder-toggle i{font-size:10px!important}
.tm-sidebar-v17 .tm-folder-nav-row.level-1{padding-left:14px!important}.tm-sidebar-v17 .tm-folder-nav-row.level-2{padding-left:28px!important}.tm-sidebar-v17 .tm-folder-nav-row.level-3{padding-left:42px!important}.tm-sidebar-v17 .tm-folder-nav-row.level-4{padding-left:56px!important}.tm-sidebar-v17 .tm-folder-nav-row.level-5{padding-left:70px!important}.tm-sidebar-v17 .tm-folder-nav-row.level-6,.tm-sidebar-v17 .tm-folder-nav-row.level-7,.tm-sidebar-v17 .tm-folder-nav-row.level-8{padding-left:84px!important}
.tm-folder-solid{font-size:16px!important}.tm-sidebar-v17 .tm-folder-more{width:26px!important;height:26px!important;border-radius:8px!important}.tm-sidebar-v17 .tm-folder-nav-row.is-hidden-by-collapse{display:none!important}.tm-sidebar-v17 .tm-folder-nav-row.is-collapsed>.tm-folder-toggle i{transform:rotate(-90deg)!important}.tm-sidebar-v17 .tm-folder-nav-row.has-children>.tm-folder-toggle{visibility:visible!important}.tm-sidebar-v17 .tm-folder-toggle-spacer{visibility:hidden!important}
.tm-email-frame{background:#fff!important;color:#111827!important;}
@media print{.tm-topbar,.tm-sidebar,.tm-list-panel,.tm-preview-toolbar,.tm-preview-actions,.tm-compose-modal,.tm-context-menu,.tm-action-modal,.tm-confirm-backdrop{display:none!important}.tm-main{padding:0!important}.tm-preview-panel,.tm-read-shell,.tm-body-card,.tm-preview-content{border:0!important;box-shadow:none!important;background:#fff!important}.tm-email-frame{height:auto!important;min-height:auto!important}}

/* Modo oscuro completo */
[data-bs-theme="dark"] body.tm-body,[data-bs-theme="dark"] .tm-auth{background:#08111f!important;color:#dbe7f5!important;}
[data-bs-theme="dark"] .tm-app{background:linear-gradient(180deg,#0d1627 0%,#08111f 100%)!important;}
[data-bs-theme="dark"] .tm-topbar{background:rgba(12,20,35,.96)!important;border-color:#1d2a3d!important;}
[data-bs-theme="dark"] .tm-brand,[data-bs-theme="dark"] .tm-preview-head h1,[data-bs-theme="dark"] h1,[data-bs-theme="dark"] h2,[data-bs-theme="dark"] h3{color:#f8fafc!important;}
[data-bs-theme="dark"] .tm-search,[data-bs-theme="dark"] .tm-sidebar-v17,[data-bs-theme="dark"] .tm-sidebar-v17 .tm-sidebar-bottom-fixed,[data-bs-theme="dark"] .tm-inbox-panel,[data-bs-theme="dark"] .tm-preview-panel,[data-bs-theme="dark"] .tm-page-card,[data-bs-theme="dark"] .tm-settings-card,[data-bs-theme="dark"] .tm-settings-nav,[data-bs-theme="dark"] .tm-read-shell,[data-bs-theme="dark"] .tm-contact-detail,[data-bs-theme="dark"] .tm-body-card,[data-bs-theme="dark"] .tm-sender-card,[data-bs-theme="dark"] .tm-list-toolbar,[data-bs-theme="dark"] .tm-preview-toolbar,[data-bs-theme="dark"] .tm-category-tabs{background:#0f1a2b!important;border-color:#1f3046!important;box-shadow:0 12px 34px rgba(0,0,0,.22)!important;}
[data-bs-theme="dark"] .tm-search input,[data-bs-theme="dark"] input,[data-bs-theme="dark"] select,[data-bs-theme="dark"] textarea{color:#e5edf7!important;background:#101c2e!important;border-color:#27384f!important;}
[data-bs-theme="dark"] .tm-search input::placeholder{color:#7f8da3!important}[data-bs-theme="dark"] .tm-search i,[data-bs-theme="dark"] .tm-icon-btn,[data-bs-theme="dark"] .tm-tool,[data-bs-theme="dark"] .tm-nav-link,[data-bs-theme="dark"] .tm-nav-link i{color:#aebbd0!important;}
[data-bs-theme="dark"] .tm-nav-link:hover,[data-bs-theme="dark"] .tm-nav-link.active,[data-bs-theme="dark"] .tm-tab.active,[data-bs-theme="dark"] .tm-message-row.selected,[data-bs-theme="dark"] .tm-folder-nav-row .tm-nav-link.active{background:#14284a!important;color:#79a8ff!important;}
[data-bs-theme="dark"] .tm-nav-link:hover i,[data-bs-theme="dark"] .tm-nav-link.active i{color:#79a8ff!important;}
[data-bs-theme="dark"] .tm-folder-nav-row:hover,[data-bs-theme="dark"] .tm-message-row:hover{background:#111f35!important;}
[data-bs-theme="dark"] .tm-message-list,[data-bs-theme="dark"] .tm-message-row{background:#0f1a2b!important;border-color:#1f3046!important;}
[data-bs-theme="dark"] .tm-message-from,[data-bs-theme="dark"] .tm-message-subject,[data-bs-theme="dark"] .tm-sender-card strong,[data-bs-theme="dark"] .tm-message-row strong{color:#f1f5f9!important;}
[data-bs-theme="dark"] .tm-message-preview,[data-bs-theme="dark"] .tm-message-meta,[data-bs-theme="dark"] .tm-storage-card p,[data-bs-theme="dark"] small,[data-bs-theme="dark"] .tm-muted{color:#93a4ba!important;}
[data-bs-theme="dark"] .tm-storage-card,[data-bs-theme="dark"] .tm-dropdown,[data-bs-theme="dark"] .tm-action-modal-card,[data-bs-theme="dark"] .tm-confirm-box,[data-bs-theme="dark"] .tm-compose-modal{background:#0f1a2b!important;border-color:#23354e!important;color:#dbe7f5!important;}
[data-bs-theme="dark"] .dropdown-menu{background:#101c2e!important;border-color:#26384f!important}.dropdown-menu .dropdown-item{color:var(--tm-text)}[data-bs-theme="dark"] .dropdown-menu .dropdown-item:hover{background:#14284a!important;color:#fff!important}
[data-bs-theme="dark"] .tm-compose-editor,[data-bs-theme="dark"] .tm-signature-box,[data-bs-theme="dark"] .tm-email-render{background:#0b1423!important;color:#e5edf7!important;border-color:#27384f!important;}
[data-bs-theme="dark"] .tm-chip,[data-bs-theme="dark"] .tm-label-pill,[data-bs-theme="dark"] .tm-folder-unread{filter:saturate(.95) brightness(.92)}
[data-bs-theme="dark"] .tm-progress{background:#1e2c40!important}[data-bs-theme="dark"] .tm-flash{background:#101c2e!important;color:#e5edf7!important;border-color:#27384f!important;}
@media(max-width:1180px){:root{--tm-sidebar:82px}.tm-topbar{grid-template-columns:var(--tm-sidebar) minmax(0,1fr) auto!important}.tm-brand span{display:none}.tm-sidebar-v17{padding:10px 8px!important}}

/* Torobyte Mail v19 - impresión, árbol real y compactación lateral */
.tm-sidebar-v17 .tm-sidebar-primary{gap:3px!important;}
.tm-sidebar-v17 .tm-sidebar-primary .tm-nav-link{height:30px!important;min-height:30px!important;font-size:12.7px!important;}
.tm-sidebar-v17 .tm-sidebar-primary .tm-nav-link i{font-size:14px!important;}
.tm-sidebar-v17 .tm-compose-main{height:44px!important;min-height:44px!important;font-size:14px!important;}
.tm-sidebar-v17{grid-template-rows:auto minmax(0,1fr) auto!important;overflow:hidden!important;}
.tm-sidebar-v17 .tm-sidebar-scroll-area{overflow-y:auto!important;overflow-x:hidden!important;contain:layout paint;scrollbar-gutter:stable;}
.tm-sidebar-v17 .tm-sidebar-bottom-fixed{flex:0 0 auto!important;}
.tm-sidebar-v17 .tm-folder-nav-row.is-virtual .tm-nav-link{font-weight:800!important;color:#475569!important;background:transparent!important;cursor:pointer;}
.tm-sidebar-v17 .tm-folder-nav-row.is-virtual .tm-nav-link:hover{background:#f3f7ff!important;color:#2563eb!important;}
.tm-sidebar-v17 .tm-folder-nav-row.is-virtual .tm-folder-more{opacity:.35;}
.tm-sidebar-v17 .tm-folder-nav-row.is-hidden-by-collapse{display:none!important;}
.tm-sidebar-v17 .tm-folder-nav-row.is-collapsed>.tm-folder-toggle i{transform:rotate(-90deg)!important;}
.tm-sidebar-v17 .tm-folder-toggle i{transition:transform .14s ease!important;}
.tm-sidebar-v17 .tm-folder-more{opacity:0!important;transform:translateX(3px);transition:opacity .12s ease,transform .12s ease;background:transparent!important;color:#64748b!important;}
.tm-sidebar-v17 .tm-folder-nav-row:hover .tm-folder-more,.tm-sidebar-v17 .tm-folder-more.open{opacity:1!important;transform:none;}
.tm-sidebar-v17 .tm-folder-more:hover{background:#eaf2ff!important;color:#2563eb!important;}
.tm-sidebar-v17 .tm-folder-unread{margin-left:4px!important;}
.tm-sidebar-v17 .tm-storage-card{box-shadow:none!important;}
@media print{body{background:#fff!important}.tm-topbar,.tm-sidebar,.tm-list-panel,.tm-preview-toolbar,.tm-preview-actions,.tm-compose-modal,.tm-context-menu,.tm-action-modal,.tm-confirm-backdrop{display:none!important}.tm-main{padding:0!important}.tm-preview-panel,.tm-read-shell,.tm-body-card,.tm-preview-content{border:0!important;box-shadow:none!important;background:#fff!important}.tm-email-frame{height:auto!important;min-height:auto!important}}
[data-bs-theme="dark"] .tm-sidebar-v17 .tm-folder-nav-row.is-virtual .tm-nav-link{color:#dbe7f5!important;}
[data-bs-theme="dark"] .tm-sidebar-v17 .tm-folder-nav-row.is-virtual .tm-nav-link:hover{background:#14284a!important;color:#79a8ff!important;}


/* Torobyte Mail v20 - iconos color, sidebar compacto y herramientas de redacción */
.tm-sidebar-v17 .tm-sidebar-primary{gap:2px!important}.tm-sidebar-v17 .tm-sidebar-primary .tm-nav-link{height:28px!important;min-height:28px!important;border-radius:10px!important;font-size:12.3px!important}.tm-sidebar-v17 .tm-sidebar-footer-nav .tm-nav-link{height:29px!important;min-height:29px!important;font-size:12.3px!important}.tm-sidebar-v17 .tm-nav-link{gap:7px!important}.tm-sidebar-v17 .tm-nav-link i.tm-menu-icon{font-size:15px!important;width:18px;text-align:center}.tm-menu-icon.icon-inbox{color:#2563eb!important}.tm-menu-icon.icon-starred{color:#f59e0b!important}.tm-menu-icon.icon-sent{color:#06b6d4!important}.tm-menu-icon.icon-drafts{color:#64748b!important}.tm-menu-icon.icon-spam{color:#ef4444!important}.tm-menu-icon.icon-trash{color:#dc2626!important}.tm-menu-icon.icon-contacts{color:#10b981!important}.tm-menu-icon.icon-calendar{color:#8b5cf6!important}.tm-menu-icon.icon-settings{color:#475569!important}.tm-menu-icon.icon-storage{color:#0ea5e9!important}.tm-sidebar-v17 .tm-compose-main{height:42px!important;min-height:42px!important;border-radius:14px!important}.tm-sidebar-v17 .tm-sidebar-scroll-area{padding-top:4px!important}.tm-sidebar-v17 .tm-folder-nav-row{min-height:29px!important}.tm-sidebar-v17 .tm-folder-nav-row .tm-nav-link{height:29px!important;min-height:29px!important}.tm-folder-solid.blue{color:#2563eb!important}.tm-folder-solid.sky{color:#0ea5e9!important}.tm-folder-solid.cyan{color:#06b6d4!important}.tm-folder-solid.teal{color:#14b8a6!important}.tm-folder-solid.green{color:#16a34a!important}.tm-folder-solid.emerald{color:#10b981!important}.tm-folder-solid.lime{color:#84cc16!important}.tm-folder-solid.yellow{color:#eab308!important}.tm-folder-solid.amber{color:#f59e0b!important}.tm-folder-solid.orange{color:#f97316!important}.tm-folder-solid.red{color:#ef4444!important}.tm-folder-solid.rose{color:#f43f5e!important}.tm-folder-solid.pink{color:#ec4899!important}.tm-folder-solid.purple{color:#9333ea!important}.tm-folder-solid.violet{color:#8b5cf6!important}.tm-folder-solid.indigo{color:#4f46e5!important}.tm-folder-solid.slate{color:#475569!important}.tm-folder-solid.gray{color:#6b7280!important}
.tm-compose-modal{right:22px!important;bottom:22px!important;top:auto!important;left:auto!important;transform:none!important}.tm-compose-file-list{display:flex;flex-wrap:wrap;gap:6px;padding:6px 14px;border-top:1px solid var(--tm-border);background:var(--tm-surface)}.tm-compose-file-list[hidden]{display:none!important}.tm-file-chip{display:inline-flex;align-items:center;gap:7px;max-width:180px;padding:5px 8px;border:1px solid var(--tm-border);border-radius:999px;background:#f8fafc;color:#475569;font-size:12px}.tm-file-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tm-compose-modal.tm-drag-over{outline:2px dashed #2563eb;outline-offset:-8px;background:#f8fbff!important}.tm-compose-tool-modal{position:fixed;inset:0;background:rgba(15,23,42,.35);z-index:13000;display:none;align-items:center;justify-content:center;padding:22px}.tm-compose-tool-modal.open{display:flex}.tm-compose-tool-card{width:min(480px,96vw);background:var(--tm-surface);border:1px solid var(--tm-border);border-radius:20px;box-shadow:0 24px 70px rgba(15,23,42,.22);overflow:hidden}.tm-compose-tool-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--tm-border)}.tm-compose-tool-head strong{font-size:16px}.tm-compose-tool-body{padding:18px;display:grid;gap:12px}.tm-compose-tool-actions{display:flex;justify-content:flex-end;gap:8px;padding:14px 18px;border-top:1px solid var(--tm-border)}.tm-compose-tool-body label{display:grid;gap:6px;font-weight:800;color:var(--tm-text)}.tm-compose-tool-body input,.tm-compose-tool-body textarea{border:1px solid var(--tm-border);border-radius:12px;padding:10px 12px;background:var(--tm-surface);color:var(--tm-text)}.tm-emoji-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:8px}.tm-emoji-grid button{border:1px solid var(--tm-border);background:#f8fafc;border-radius:12px;font-size:22px;height:42px}.tm-more-grid{display:grid;gap:8px}.tm-more-grid button{display:flex;align-items:center;gap:10px;border:1px solid var(--tm-border);background:#f8fafc;border-radius:12px;padding:10px 12px;text-align:left;color:var(--tm-text)}
[data-bs-theme="dark"] .tm-file-chip,[data-bs-theme="dark"] .tm-emoji-grid button,[data-bs-theme="dark"] .tm-more-grid button{background:#111f35;border-color:#26384f;color:#e5edf8}[data-bs-theme="dark"] .tm-compose-tool-card{background:#0f1a2b;border-color:#26384f;color:#e5edf8}[data-bs-theme="dark"] .tm-compose-tool-body input,[data-bs-theme="dark"] .tm-compose-tool-body textarea{background:#0b1424;border-color:#26384f;color:#e5edf8}

/* Torobyte Mail v21 - impresión, compose redimensionable, autorespuesta y vistas */
.tm-compose-modal.tm-compose-gmail{right:22px!important;bottom:0!important;top:auto!important;left:auto!important;transform:none!important;width:min(640px,calc(100vw - 38px))!important;height:min(620px,calc(100vh - 92px))!important;min-width:420px;min-height:320px;resize:both!important;overflow:auto!important;max-width:calc(100vw - 28px)!important;max-height:calc(100vh - 28px)!important;}
.tm-compose-modal.tm-compose-gmail.maximized{left:18px!important;right:18px!important;top:18px!important;bottom:18px!important;width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;resize:none!important;}
.tm-compose-resize-handle{position:absolute;z-index:6;background:transparent;display:block}.tm-resize-left{left:0;top:10px;bottom:10px;width:10px;cursor:ew-resize}.tm-resize-top{left:10px;right:10px;top:0;height:10px;cursor:ns-resize}.tm-resize-top-left{left:0;top:0;width:18px;height:18px;cursor:nwse-resize}.tm-compose-resize-handle:hover{background:rgba(37,99,235,.08)}.tm-compose-resizing{user-select:none!important;cursor:nwse-resize!important}.tm-field-line.is-hidden{display:none!important}.tm-compose-editor{min-height:220px}.tm-autoreply-card h2{display:flex;align-items:center}.tm-autoreply-toolbar{border:1px solid var(--tm-border)!important;border-bottom:0!important;border-radius:14px 14px 0 0!important;background:#fbfcfe}.tm-autoreply-editor{min-height:260px;border:1px solid var(--tm-border);border-radius:0 0 14px 14px;background:var(--tm-surface);color:var(--tm-text);padding:18px;outline:0;overflow:auto}.tm-autoreply-editor:focus{border-color:#93c5fd;box-shadow:0 0 0 4px rgba(37,99,235,.08)}
.tm-view-picker-v21{gap:5px}.tm-view-picker-v21 button{width:34px;height:34px}.tm-view-minimal .tm-message-row{min-height:38px!important}.tm-view-minimal .tm-message-link{grid-template-columns:8px 24px minmax(0,1fr) 18px 76px!important;min-height:38px!important}.tm-view-minimal .tm-message-avatar,.tm-view-minimal .tm-message-text small,.tm-view-minimal .tm-row-labels{display:none!important}.tm-view-compact .tm-message-row{min-height:48px!important}.tm-view-spacious .tm-message-row{min-height:82px!important}.tm-view-spacious .tm-message-text small{display:block!important;white-space:normal!important}.tm-view-cards .tm-message-list{padding:12px;background:#f8fafc;display:grid;gap:10px}.tm-view-cards .tm-message-row{border:1px solid var(--tm-border)!important;border-radius:18px!important;background:var(--tm-surface)!important;box-shadow:0 6px 22px rgba(15,23,42,.05);overflow:hidden;min-height:82px}.tm-view-cards .tm-message-row.selected{box-shadow:0 0 0 2px rgba(37,99,235,.18),0 10px 28px rgba(15,23,42,.08)}.tm-view-cards .tm-message-link{min-height:82px}.tm-view-cards .tm-message-text small{display:block;white-space:normal}.tm-view-cards .tm-message-row+.tm-message-row{border-top:1px solid var(--tm-border)!important}
@media print{html,body{margin:0!important;background:#fff!important}.print-page,.tm-print-page{padding:14mm 16mm 18mm!important;margin:0 auto!important;max-width:178mm!important;width:auto!important}.mail-body,.tm-email-render{padding-left:0!important;max-width:100%!important}}
[data-bs-theme="dark"] .tm-autoreply-toolbar{background:#101c2e!important;border-color:#26384f!important}[data-bs-theme="dark"] .tm-autoreply-editor{background:#0b1424!important;border-color:#26384f!important;color:#e5edf8!important}[data-bs-theme="dark"] .tm-view-cards .tm-message-list{background:#08111f!important}[data-bs-theme="dark"] .tm-view-cards .tm-message-row{background:#0f1a2b!important;border-color:#26384f!important}
@media(max-width:760px){.tm-compose-modal.tm-compose-gmail{right:8px!important;bottom:8px!important;width:calc(100vw - 16px)!important;height:calc(100vh - 86px)!important;min-width:0}}


/* v22 - borradores, filtros y categorías */
.tm-compact-controls{gap:6px!important;flex-wrap:nowrap!important}.tm-compact-controls .tm-tool.active{background:#e8f1ff;color:#2563eb}.tm-category-tabs-v22{grid-template-columns:repeat(8,minmax(120px,1fr));overflow-x:auto;gap:8px;height:62px}.tm-category-tabs-v22 .tm-tab{height:40px;padding:0 10px;font-size:13px}.tm-category-tabs-v22::-webkit-scrollbar{height:6px}.tm-category-tabs-v22::-webkit-scrollbar-thumb{background:#d5deea;border-radius:999px}.tm-view-table .tm-message-row{min-height:42px!important;grid-template-columns:36px minmax(0,1fr) 34px}.tm-view-table .tm-message-link{grid-template-columns:8px minmax(160px,.9fr) minmax(220px,1.4fr) 20px 110px!important;padding:4px 12px 4px 0!important}.tm-view-table .tm-message-avatar,.tm-view-table .tm-message-text small,.tm-view-table .tm-row-labels{display:none!important}.tm-view-table .tm-message-text{display:grid!important;grid-template-columns:minmax(0,.8fr) minmax(0,1fr);gap:10px;align-items:center}.tm-view-table .tm-message-text strong,.tm-view-table .tm-message-text span{font-size:13px!important}.tm-rule-value-inline{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:8px}.tm-rule-pro [data-rule-condition-row]+[data-rule-condition-row]{margin-top:10px;padding-top:10px;border-top:1px dashed var(--tm-border)}[data-bs-theme="dark"] .tm-compact-controls .tm-tool.active{background:#14284a;color:#79a8ff}[data-bs-theme="dark"] .tm-category-tabs-v22{background:#0f1a2b}

/* Torobyte Mail v23 - ajustes Gmail, velocidad visual y lectura */
.tm-mail-page{min-height:calc(100vh - var(--tm-topbar) - 18px)!important;height:calc(100vh - var(--tm-topbar) - 18px)!important;}
.tm-mail-board{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:minmax(360px,52vh) minmax(360px,1fr)!important;gap:14px!important;overflow:hidden!important;}
.tm-panel-resizer{display:none!important;}
.tm-inbox-panel{min-height:0!important;}
.tm-preview-panel{min-height:0!important;display:flex!important;}
.tm-preview-content{padding:22px 26px!important;}
.tm-category-tabs-v22{height:58px!important;display:flex!important;align-items:stretch!important;overflow-x:auto!important;gap:0!important;padding:0 14px!important;border-top:1px solid var(--tm-border)!important;border-bottom:1px solid var(--tm-border)!important;}
.tm-category-tabs-v22 .tm-tab{height:58px!important;min-width:168px!important;border-radius:0!important;background:transparent!important;border-bottom:3px solid transparent!important;justify-content:center!important;color:#4b5565!important;}
.tm-category-tabs-v22 .tm-tab.active{background:transparent!important;border-bottom-color:var(--tm-blue)!important;color:var(--tm-blue)!important;}
.tm-category-tabs-v22 .tm-tab b{font-size:11px!important;padding:2px 8px!important;}
.tm-category-tabs-v22 .tm-tab-plus{height:58px!important;min-width:44px!important;}
.tm-message-row:not(.unread) .tm-message-text strong,
.tm-message-row:not(.unread) .tm-message-text span{font-weight:500!important;color:#334155!important;}
.tm-message-row.unread .tm-message-text strong,
.tm-message-row.unread .tm-message-text span{font-weight:850!important;color:#0f172a!important;}
.tm-message-row:not(.unread) .tm-unread-dot{opacity:0!important;}
.tm-message-row.unread .tm-unread-dot{opacity:1!important;}
.tm-list-toolbar{height:58px!important;padding:0 14px!important;gap:8px!important;}
.tm-tool{width:34px!important;height:34px!important;}
.tm-view-picker-v21 button{width:34px!important;height:34px!important;}
.tm-list-range{font-size:12px!important;gap:9px!important;}
.tm-preview-toolbar{height:54px!important;padding:0 18px!important;}
.tm-email-frame{background:#fff;border-radius:12px;}
.tm-signature-box:empty:before{content:'Escribe aquí la nueva firma...';color:#94a3b8;}
.tm-ajax-busy .tm-main{cursor:progress;}
.tm-ajax-busy .tm-inbox-panel{opacity:.98;}
.tm-live-refresh-badge{display:none!important;}
[data-bs-theme="dark"] .tm-category-tabs-v22 .tm-tab{color:#cbd5e1!important;}
[data-bs-theme="dark"] .tm-category-tabs-v22 .tm-tab.active{color:#7db0ff!important;border-bottom-color:#60a5fa!important;}
[data-bs-theme="dark"] .tm-message-row:not(.unread) .tm-message-text strong,
[data-bs-theme="dark"] .tm-message-row:not(.unread) .tm-message-text span{color:#cbd5e1!important;font-weight:500!important;}
[data-bs-theme="dark"] .tm-message-row.unread .tm-message-text strong,
[data-bs-theme="dark"] .tm-message-row.unread .tm-message-text span{color:#f8fafc!important;font-weight:850!important;}
@media(max-width:1180px){.tm-mail-board{grid-template-rows:minmax(440px,1fr)!important}.tm-preview-panel{display:none!important}.tm-category-tabs-v22 .tm-tab{min-width:150px!important}}

/* v24 - categorías sin scroll vertical, listado scrollable y vistas de lectura */
.tm-mail-page{min-height:0!important;height:calc(100vh - var(--tm-topbar) - 24px)!important;overflow:hidden!important;}
.tm-mail-board{min-height:0!important;}
.tm-inbox-panel{min-height:0!important;height:100%!important;}
.tm-list-toolbar{flex:0 0 56px!important;height:56px!important;min-height:56px!important;}
.tm-category-tabs-v22{flex:0 0 56px!important;height:56px!important;min-height:56px!important;max-height:56px!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;align-items:center!important;scrollbar-width:thin;}
.tm-category-tabs-v22 .tm-tab{height:56px!important;max-height:56px!important;overflow:hidden!important;align-items:center!important;line-height:1!important;}
.tm-category-tabs-v22 .tm-tab span{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.tm-message-list{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;background:var(--tm-surface)!important;}
.tm-preview-panel{min-height:0!important;overflow:hidden!important;}
.tm-preview-content{min-height:0!important;}
.tm-thread-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:20px;padding:0 7px;margin-left:7px;border-radius:999px;background:#e8f1ff;color:#2563eb;font-size:12px;font-weight:900;vertical-align:middle;}
.tm-view-conversation .tm-message-row{min-height:58px!important;}
.tm-view-conversation .tm-message-text strong{font-weight:850!important;}
.tm-view-conversation .tm-message-text span{font-weight:760!important;}
.tm-view-conversation .tm-message-text small{display:block!important;}
.tm-view-split .tm-mail-board{display:grid!important;grid-template-columns:minmax(440px,42%) minmax(520px,58%)!important;grid-template-rows:1fr!important;gap:14px!important;overflow:hidden!important;}
.tm-view-split .tm-inbox-panel,.tm-view-split .tm-preview-panel{height:100%!important;min-height:0!important;}
.tm-view-split .tm-panel-resizer{display:block!important;}
.tm-view-split .tm-message-row{min-height:64px!important;}
.tm-view-split .tm-message-link{grid-template-columns:10px 34px minmax(0,1fr) 20px 78px!important;gap:9px!important;padding:10px 12px 10px 0!important;}
.tm-view-split .tm-message-text small{display:block!important;}
.tm-view-split .tm-category-tabs-v22 .tm-tab{min-width:145px!important;}
@media(max-width:1180px){.tm-view-split .tm-mail-board{grid-template-columns:1fr!important;grid-template-rows:minmax(440px,1fr)!important}.tm-view-split .tm-preview-panel{display:none!important}}
[data-bs-theme="dark"] .tm-thread-count{background:#14284a;color:#93c5fd;}
[data-bs-theme="dark"] .tm-message-list{background:#0f1a2b!important;}

/* v25 - corrección real de vista dividida y scroll del listado */
.tm-inbox-panel > form#mailListForm{
  display:flex!important;
  flex-direction:column!important;
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}
.tm-inbox-panel > form#mailListForm > .tm-message-list{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
.tm-list-toolbar,
.tm-category-tabs-v22{
  flex-shrink:0!important;
}
.tm-category-tabs-v22{
  overflow-y:hidden!important;
  overscroll-behavior-x:contain!important;
}
.tm-view-split .tm-mail-board{
  display:grid!important;
  grid-template-columns:minmax(390px,38%) 8px minmax(560px,1fr)!important;
  grid-template-rows:1fr!important;
  gap:0!important;
  overflow:hidden!important;
  align-items:stretch!important;
}
.tm-view-split .tm-inbox-panel,
.tm-view-split .tm-preview-panel{
  height:100%!important;
  min-height:0!important;
  min-width:0!important;
  overflow:hidden!important;
}
.tm-view-split .tm-panel-resizer{
  display:block!important;
  width:8px!important;
  height:100%!important;
  cursor:col-resize!important;
  background:transparent!important;
  border:0!important;
}
.tm-view-split .tm-panel-resizer:hover{
  background:rgba(37,99,235,.14)!important;
}
.tm-view-split .tm-preview-panel{
  display:flex!important;
  flex-direction:column!important;
}
.tm-view-split .tm-preview-content{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
}
.tm-view-split .tm-message-list{
  max-height:none!important;
}
.tm-view-split .tm-category-tabs-v22{
  min-width:0!important;
}
.tm-view-split .tm-category-tabs-v22 .tm-tab{
  min-width:132px!important;
}
.tm-view-split .tm-message-row{
  min-height:62px!important;
}
.tm-view-split .tm-message-link{
  grid-template-columns:8px 30px minmax(0,1fr) 18px 72px!important;
  gap:8px!important;
  padding:8px 12px 8px 0!important;
}
.tm-view-split .tm-message-avatar{
  width:30px!important;
  height:30px!important;
  font-size:12px!important;
}
.tm-view-split .tm-message-text strong,
.tm-view-split .tm-message-text span{
  font-size:13px!important;
}
.tm-view-split .tm-message-text small{
  display:block!important;
  font-size:12px!important;
}
.tm-view-split .tm-message-date{
  font-size:12px!important;
}
.tm-view-split .tm-list-toolbar{
  overflow:hidden!important;
}
.tm-view-split .tm-compact-controls .tm-view-picker-v21{
  display:flex!important;
}
@media(max-width:1180px){
  .tm-view-split .tm-mail-board{
    grid-template-columns:1fr!important;
    grid-template-rows:minmax(440px,1fr)!important;
  }
  .tm-view-split .tm-panel-resizer,
  .tm-view-split .tm-preview-panel{
    display:none!important;
  }
}

/* v26 - header Gmail full width en vista panel lateral y scroll real del listado */
.tm-view-split .tm-mail-board{
  display:grid!important;
  grid-template-columns:minmax(420px,42%) 8px minmax(560px,1fr)!important;
  grid-template-rows:50px 56px minmax(0,1fr)!important;
  gap:0!important;
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  align-items:stretch!important;
  background:var(--tm-surface)!important;
  border:1px solid var(--tm-border)!important;
  border-radius:18px!important;
  box-shadow:var(--tm-shadow-soft)!important;
}
.tm-view-split .tm-inbox-panel,
.tm-view-split .tm-inbox-panel > form#mailListForm{
  display:contents!important;
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
}
.tm-view-split .tm-list-toolbar{
  grid-column:1 / 4!important;
  grid-row:1!important;
  height:50px!important;
  min-height:50px!important;
  max-height:50px!important;
  border:0!important;
  border-bottom:1px solid var(--tm-border)!important;
  border-radius:18px 18px 0 0!important;
  background:var(--tm-surface)!important;
  box-shadow:none!important;
  z-index:4!important;
  overflow:visible!important;
  padding:0 16px!important;
}
.tm-view-split .tm-category-tabs-v22{
  grid-column:1 / 4!important;
  grid-row:2!important;
  display:flex!important;
  width:100%!important;
  height:56px!important;
  min-height:56px!important;
  max-height:56px!important;
  flex:0 0 56px!important;
  align-items:stretch!important;
  gap:0!important;
  padding:0 14px!important;
  border:0!important;
  border-bottom:1px solid var(--tm-border)!important;
  background:var(--tm-surface)!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  white-space:nowrap!important;
  scrollbar-width:thin!important;
  z-index:3!important;
}
.tm-view-split .tm-category-tabs-v22 .tm-tab{
  flex:1 1 145px!important;
  min-width:128px!important;
  max-height:56px!important;
  height:56px!important;
  border-radius:0!important;
  border-bottom:3px solid transparent!important;
  background:transparent!important;
  justify-content:center!important;
  padding:0 10px!important;
}
.tm-view-split .tm-category-tabs-v22 .tm-tab.active{
  border-bottom-color:var(--tm-blue)!important;
  color:var(--tm-blue)!important;
}
.tm-view-split .tm-category-tabs-v22 .tm-tab-plus{
  flex:0 0 44px!important;
  height:56px!important;
  min-width:44px!important;
}
.tm-view-split .tm-message-list{
  grid-column:1!important;
  grid-row:3!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  border-right:0!important;
  border-radius:0 0 0 18px!important;
  background:var(--tm-surface)!important;
  overscroll-behavior:contain!important;
}
.tm-view-split .tm-panel-resizer{
  grid-column:2!important;
  grid-row:3!important;
  display:block!important;
  width:8px!important;
  min-width:8px!important;
  height:100%!important;
  cursor:col-resize!important;
  background:linear-gradient(90deg, transparent, rgba(148,163,184,.22), transparent)!important;
  border-left:1px solid var(--tm-border)!important;
  border-right:1px solid var(--tm-border)!important;
  z-index:2!important;
}
.tm-view-split .tm-panel-resizer:hover{
  background:rgba(37,99,235,.14)!important;
}
.tm-view-split .tm-preview-panel{
  grid-column:3!important;
  grid-row:3!important;
  display:flex!important;
  flex-direction:column!important;
  height:100%!important;
  min-height:0!important;
  min-width:0!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:0 0 18px 0!important;
  box-shadow:none!important;
  background:var(--tm-surface)!important;
}
.tm-view-split .tm-preview-content{
  flex:1 1 auto!important;
  min-height:0!important;
  height:100%!important;
  overflow:auto!important;
}
.tm-view-split .tm-preview-toolbar{
  flex:0 0 50px!important;
  height:50px!important;
  min-height:50px!important;
}
.tm-view-split .tm-message-row:first-child{border-top:0!important;}
.tm-view-split .tm-message-row{min-height:58px!important;}
.tm-view-split .tm-message-link{grid-template-columns:8px 28px minmax(0,1fr) 18px 70px!important;gap:8px!important;padding:7px 10px 7px 0!important;}
.tm-view-split .tm-message-avatar{width:28px!important;height:28px!important;font-size:12px!important;}
.tm-view-split .tm-message-text strong,.tm-view-split .tm-message-text span{font-size:12.5px!important;line-height:1.15!important;}
.tm-view-split .tm-message-text small{font-size:11.5px!important;line-height:1.2!important;}
.tm-view-split .tm-message-date{font-size:11.5px!important;}
[data-bs-theme="dark"] .tm-view-split .tm-mail-board,
[data-bs-theme="dark"] .tm-view-split .tm-list-toolbar,
[data-bs-theme="dark"] .tm-view-split .tm-category-tabs-v22,
[data-bs-theme="dark"] .tm-view-split .tm-message-list,
[data-bs-theme="dark"] .tm-view-split .tm-preview-panel{background:#0f1a2b!important;border-color:#1f3046!important;}
[data-bs-theme="dark"] .tm-view-split .tm-panel-resizer{border-color:#1f3046!important;background:linear-gradient(90deg, transparent, rgba(71,85,105,.45), transparent)!important;}
@media(max-width:1180px){
  .tm-view-split .tm-mail-board{
    grid-template-columns:1fr!important;
    grid-template-rows:50px 56px minmax(0,1fr)!important;
  }
  .tm-view-split .tm-list-toolbar,
  .tm-view-split .tm-category-tabs-v22,
  .tm-view-split .tm-message-list{grid-column:1!important;}
  .tm-view-split .tm-panel-resizer,
  .tm-view-split .tm-preview-panel{display:none!important;}
}

/* v27 - split redimensionable, categorías compactas a la izquierda, búsqueda rápida y lista sin estrella */
.tm-category-tabs-v22,
.tm-view-split .tm-category-tabs-v22{
  justify-content:flex-start!important;
  align-items:center!important;
  height:44px!important;
  min-height:44px!important;
  max-height:44px!important;
  flex:0 0 44px!important;
  padding:0 10px!important;
  gap:2px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:none!important;
}
.tm-category-tabs-v22::-webkit-scrollbar,
.tm-view-split .tm-category-tabs-v22::-webkit-scrollbar{display:none!important;}
.tm-category-tabs-v22 .tm-tab,
.tm-view-split .tm-category-tabs-v22 .tm-tab{
  flex:0 0 auto!important;
  min-width:0!important;
  width:auto!important;
  height:44px!important;
  max-height:44px!important;
  border-radius:0!important;
  justify-content:flex-start!important;
  gap:7px!important;
  padding:0 12px!important;
  font-size:12px!important;
  line-height:1!important;
}
.tm-category-tabs-v22 .tm-tab i,
.tm-view-split .tm-category-tabs-v22 .tm-tab i{font-size:13px!important;}
.tm-category-tabs-v22 .tm-tab b,
.tm-view-split .tm-category-tabs-v22 .tm-tab b{font-size:10px!important;padding:2px 6px!important;}
.tm-category-tabs-v22 .tm-tab-plus,
.tm-view-split .tm-category-tabs-v22 .tm-tab-plus{height:44px!important;min-width:34px!important;flex:0 0 34px!important;}
.tm-view-split .tm-mail-board{
  --tm-preview-width: min(58vw, 820px);
  grid-template-columns:minmax(320px, calc(100% - var(--tm-preview-width) - 8px)) 8px minmax(360px, var(--tm-preview-width))!important;
  grid-template-rows:48px 44px minmax(0,1fr)!important;
}
.tm-view-split .tm-list-toolbar{height:48px!important;min-height:48px!important;max-height:48px!important;padding:0 12px!important;}
.tm-view-split .tm-message-list{min-height:0!important;height:100%!important;overflow-y:auto!important;overflow-x:hidden!important;}
.tm-view-split .tm-preview-panel{min-width:360px!important;}
.tm-view-split .tm-panel-resizer{cursor:col-resize!important;touch-action:none!important;user-select:none!important;}
.tm-view-split .tm-panel-resizer::after{content:"";display:block;width:2px;height:36px;border-radius:999px;background:#cbd5e1;margin:calc(50vh - 160px) auto 0;opacity:.8;}
body.tm-resizing,body.tm-resizing *{cursor:col-resize!important;user-select:none!important;}
.tm-row-star-form,.tm-row-star{display:none!important;}
.tm-message-row{grid-template-columns:48px minmax(0,1fr)!important;}
.tm-message-link{padding-right:14px!important;}
.tm-search.is-searching::after{content:"";width:14px;height:14px;border:2px solid #cbd5e1;border-top-color:#2563eb;border-radius:50%;animation:tmSpin .8s linear infinite;}
@keyframes tmSpin{to{transform:rotate(360deg)}}
@media(max-width:1180px){.tm-view-split .tm-mail-board{grid-template-columns:1fr!important;grid-template-rows:48px 44px minmax(0,1fr)!important;}}

/* v28 - paginación masiva, búsqueda avanzada y panel lateral independiente */
.tm-mail-page{height:calc(100vh - var(--tm-topbar) - 16px)!important;min-height:0!important;overflow:hidden!important;}
.tm-mail-board{height:100%!important;min-height:0!important;overflow:hidden!important;}
.tm-inbox-panel{height:100%!important;min-height:0!important;display:flex!important;flex-direction:column!important;}
.tm-inbox-panel>form#mailListForm{height:100%!important;min-height:0!important;display:grid!important;grid-template-rows:auto auto minmax(0,1fr)!important;overflow:hidden!important;}
.tm-message-list{min-height:0!important;height:auto!important;overflow-y:auto!important;overflow-x:hidden!important;}
.tm-category-tabs-v22{height:46px!important;min-height:46px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:4px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0 10px!important;border-bottom:1px solid var(--tm-border)!important;}
.tm-category-tabs-v22 .tm-tab{height:40px!important;min-width:auto!important;flex:0 0 auto!important;padding:0 10px!important;gap:7px!important;border-radius:10px!important;font-size:12px!important;}
.tm-category-tabs-v22 .tm-tab span{max-width:96px!important;}
.tm-category-tabs-v22 .tm-tab b{padding:2px 6px!important;font-size:10px!important;}
.tm-list-toolbar{height:46px!important;min-height:46px!important;padding:0 10px!important;gap:5px!important;overflow:visible!important;}
.tm-tool-mini{font-size:10px;font-weight:900;margin-left:3px;color:inherit;}
.tm-layout-split .tm-mail-board{display:grid!important;grid-template-columns:minmax(420px,var(--tm-list-width,44%)) 8px minmax(420px,1fr)!important;grid-template-rows:auto auto minmax(0,1fr)!important;gap:0!important;background:var(--tm-surface)!important;border:1px solid var(--tm-border)!important;border-radius:18px!important;box-shadow:var(--tm-shadow-soft)!important;}
.tm-layout-split .tm-inbox-panel{display:contents!important;background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important;}
.tm-layout-split .tm-inbox-panel>form#mailListForm{display:contents!important;}
.tm-layout-split .tm-list-toolbar{grid-column:1 / -1!important;grid-row:1!important;background:var(--tm-surface)!important;border-bottom:1px solid var(--tm-border)!important;}
.tm-layout-split .tm-category-tabs{grid-column:1 / -1!important;grid-row:2!important;background:var(--tm-surface)!important;}
.tm-layout-split .tm-message-list{grid-column:1!important;grid-row:3!important;height:100%!important;min-height:0!important;overflow-y:auto!important;border-right:1px solid var(--tm-border)!important;background:var(--tm-surface)!important;}
.tm-layout-split .tm-panel-resizer{grid-column:2!important;grid-row:3!important;display:block!important;width:8px!important;cursor:col-resize!important;background:linear-gradient(90deg,transparent,#e2e8f0,transparent)!important;}
.tm-layout-split .tm-preview-panel{grid-column:3!important;grid-row:3!important;display:flex!important;min-width:360px!important;height:100%!important;min-height:0!important;overflow:hidden!important;background:var(--tm-surface)!important;border:0!important;border-radius:0!important;box-shadow:none!important;}
.tm-layout-bottom .tm-mail-board{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:minmax(280px,50vh) minmax(280px,1fr)!important;gap:14px!important;overflow:hidden!important;}
.tm-layout-bottom .tm-panel-resizer{display:none!important;}
.tm-layout-bottom .tm-preview-panel{display:flex!important;min-height:0!important;overflow:hidden!important;}
.tm-view-table .tm-message-link{grid-template-columns:10px 28px minmax(220px,1.3fr) 20px 118px!important;}
.tm-view-minimal .tm-message-link{grid-template-columns:8px minmax(0,1fr) 18px 76px!important;}
.tm-view-minimal .tm-message-avatar{display:none!important;}
.tm-search-advanced-btn{width:34px;height:34px;border:0;border-radius:11px;background:#f3f6fa;color:#536179;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;}
.tm-search-advanced-btn:hover{background:#e8f1ff;color:#2563eb;}
.tm-advanced-search-card{max-width:760px!important;width:min(760px,94vw)!important;}
.tm-advanced-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.tm-advanced-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:850;color:#64748b;}
.tm-advanced-checks{display:flex;gap:16px;flex-wrap:wrap;margin:14px 0;}
.tm-advanced-checks label{display:flex;align-items:center;gap:8px;font-weight:750;color:#475569;}
.tm-preview-actions .tm-round-action{display:none!important;}
[data-bs-theme="dark"] .tm-layout-split .tm-mail-board,[data-bs-theme="dark"] .tm-layout-split .tm-list-toolbar,[data-bs-theme="dark"] .tm-layout-split .tm-category-tabs,[data-bs-theme="dark"] .tm-layout-split .tm-message-list,[data-bs-theme="dark"] .tm-layout-split .tm-preview-panel{background:#0f1a2b!important;border-color:#1f3046!important;}
@media(max-width:1180px){.tm-layout-split .tm-mail-board{grid-template-columns:1fr!important;grid-template-rows:auto auto minmax(0,1fr)!important}.tm-layout-split .tm-preview-panel,.tm-layout-split .tm-panel-resizer{display:none!important}.tm-layout-split .tm-message-list{grid-column:1!important}}
@media(max-width:760px){.tm-advanced-grid{grid-template-columns:1fr}.tm-category-tabs-v22 .tm-tab span{max-width:130px!important}}

/* v29 - limpieza de cabecera de correo, búsqueda avanzada corregida y fecha completa */
.tm-preview-head-actions .fa-arrows-rotate{display:none!important;}
.tm-sender-card > .dropdown{display:none!important;}
.tm-search{overflow:visible!important;}
.tm-suggest-box{z-index:9800!important;}
.tm-popup-modal[data-popup-modal="advanced-search"]{
  align-items:flex-start!important;
  justify-content:center!important;
  padding-top:calc(var(--tm-topbar, 76px) + 16px)!important;
  padding-bottom:24px!important;
  overflow:auto!important;
}
.tm-popup-modal[data-popup-modal="advanced-search"] .tm-popup-card{
  width:min(820px, calc(100vw - 42px))!important;
  max-height:calc(100vh - var(--tm-topbar, 76px) - 54px)!important;
  overflow:auto!important;
  margin:0 auto!important;
  padding:20px!important;
}
.tm-popup-modal[data-popup-modal="advanced-search"] h3{font-size:18px!important;margin-bottom:4px!important;}
.tm-popup-modal[data-popup-modal="advanced-search"] p{margin-bottom:14px!important;font-size:13px!important;}
.tm-advanced-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px 12px!important;}
.tm-advanced-grid label{min-width:0!important;}
.tm-advanced-grid .form-control{height:42px!important;}
.tm-advanced-checks{margin:12px 0!important;gap:12px!important;}
.tm-message-date{
  min-width:118px!important;
  width:118px!important;
  max-width:118px!important;
  display:inline-flex!important;
  justify-content:flex-end!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  font-size:12px!important;
}
.tm-message-link{grid-template-columns:10px 32px minmax(0,1fr) 22px 118px!important;}
.tm-view-split .tm-message-link{grid-template-columns:8px 28px minmax(0,1fr) 18px 118px!important;}
.tm-view-minimal .tm-message-link{grid-template-columns:8px minmax(0,1fr) 18px 118px!important;}
.tm-view-table .tm-message-link{grid-template-columns:10px 28px minmax(220px,1.3fr) 20px 126px!important;}
.tm-layout-split .tm-message-list{overflow-y:auto!important;scrollbar-gutter:stable!important;}
.tm-layout-split .tm-preview-panel{overflow:hidden!important;}
.tm-layout-split .tm-preview-content{overflow:auto!important;}
@media(max-width:760px){
  .tm-popup-modal[data-popup-modal="advanced-search"]{padding-top:14px!important;}
  .tm-popup-modal[data-popup-modal="advanced-search"] .tm-popup-card{width:calc(100vw - 24px)!important;max-height:calc(100vh - 28px)!important;}
  .tm-advanced-grid{grid-template-columns:1fr!important;}
  .tm-message-date{min-width:82px!important;width:82px!important;max-width:82px!important;font-size:11px!important;}
  .tm-message-link{grid-template-columns:10px minmax(0,1fr) 82px!important;}
}

/* v30 - búsqueda avanzada estable y resultados recientes primero */
.tm-popup-modal[data-popup-modal="advanced-search"]{
  position:fixed!important;
  inset:0!important;
  width:100vw!important;
  height:100vh!important;
  z-index:20000!important;
  display:none!important;
  align-items:center!important;
  justify-content:center!important;
  padding:24px!important;
  overflow:auto!important;
  background:rgba(15,23,42,.42)!important;
  backdrop-filter:blur(6px)!important;
}
.tm-popup-modal[data-popup-modal="advanced-search"].open{display:flex!important;}
.tm-popup-modal[data-popup-modal="advanced-search"] .tm-popup-card,
.tm-popup-modal[data-popup-modal="advanced-search"] .tm-advanced-search-card{
  position:relative!important;
  transform:none!important;
  margin:auto!important;
  top:auto!important;
  left:auto!important;
  right:auto!important;
  bottom:auto!important;
  width:min(760px, calc(100vw - 48px))!important;
  max-width:760px!important;
  max-height:calc(100vh - 48px)!important;
  overflow:auto!important;
  padding:20px 22px!important;
  border-radius:22px!important;
  box-shadow:0 28px 80px rgba(15,23,42,.30)!important;
}
.tm-popup-modal[data-popup-modal="advanced-search"] .tm-popup-x{
  position:absolute!important;
  top:14px!important;
  right:14px!important;
}
.tm-popup-modal[data-popup-modal="advanced-search"] h3{
  margin:0 42px 4px 0!important;
}
.tm-popup-modal[data-popup-modal="advanced-search"] p{
  margin:0 42px 16px 0!important;
}
.tm-advanced-search-form{display:block!important;}
.tm-advanced-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
}
.tm-advanced-grid label{min-width:0!important;}
.tm-advanced-checks{display:flex!important;align-items:center!important;gap:14px!important;flex-wrap:wrap!important;}
.tm-advanced-checks label{white-space:nowrap!important;}
.tm-popup-modal[data-popup-modal="advanced-search"] .tm-popup-actions{position:sticky!important;bottom:-20px!important;background:var(--tm-surface)!important;padding-top:12px!important;}
@media(max-width:760px){
  .tm-popup-modal[data-popup-modal="advanced-search"]{align-items:flex-start!important;padding:14px!important;}
  .tm-popup-modal[data-popup-modal="advanced-search"] .tm-popup-card{width:calc(100vw - 28px)!important;max-height:calc(100vh - 28px)!important;}
  .tm-advanced-grid{grid-template-columns:1fr!important;}
}

/* v31 - búsqueda y resaltado */
.tm-search-hit{
  display:inline;
  padding:0 2px;
  border-radius:4px;
  background:#fff3a3;
  color:#0f172a;
  box-shadow:inset 0 -1px 0 rgba(245,158,11,.35);
}
[data-bs-theme="dark"] .tm-search-hit{
  background:#854d0e;
  color:#fff7ed;
  box-shadow:inset 0 -1px 0 rgba(251,191,36,.45);
}

/* v32 reglas profesionales y eliminación segura de carpetas */
.tm-rule-builder.is-editing-rule{outline:2px solid rgba(37,99,235,.22);box-shadow:0 18px 48px rgba(37,99,235,.12);}
.tm-rule-from-mail{display:grid!important;gap:12px!important;}
.tm-rule-from-mail .tm-rule-compact-head{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:12px;align-items:end;}
.tm-rule-match-mode{display:flex;align-items:center;gap:10px;border:1px solid var(--tm-border);border-radius:14px;padding:10px 12px;background:#f8fafc;min-height:48px;}
.tm-rule-match-mode span{font-size:12px;font-weight:900;color:#64748b;text-transform:uppercase;letter-spacing:.04em;margin-right:auto}.tm-rule-match-mode label{display:flex!important;align-items:center;gap:6px;margin:0!important;font-size:13px!important;font-weight:800!important;color:var(--tm-text)!important;}
.tm-rule-from-mail .tm-rule-pro-grid{grid-template-columns:minmax(160px,1fr) minmax(160px,1fr) minmax(220px,1.25fr)!important;gap:10px!important;margin-bottom:8px!important;}
.tm-rule-from-mail .tm-rule-actions-grid{grid-template-columns:minmax(170px,1fr) minmax(220px,1.2fr) auto!important;gap:10px!important;align-items:end!important;}
.tm-rule-add-compact{justify-self:start!important;min-height:36px!important;padding:0 13px!important;}
.tm-delete-folder-summary{border:1px solid #fecaca;background:#fff1f2;border-radius:14px;padding:12px 14px;display:grid;gap:3px;color:#991b1b}.tm-delete-folder-summary strong{font-size:15px}.tm-delete-folder-summary small{color:#7f1d1d}.tm-check-line.danger{background:#fff7ed;border:1px solid #fed7aa;border-radius:12px;padding:10px 12px;color:#9a3412!important}.tm-primary-btn.danger{background:#dc2626!important;border-color:#dc2626!important}.tm-primary-btn.danger:hover{background:#b91c1c!important}
.tm-rule-saved-item{grid-template-columns:minmax(0,1fr) auto auto auto!important;gap:10px!important;}
.tm-rule-saved-item .tm-tool{height:34px!important;width:34px!important;border:1px solid var(--tm-border)!important;border-radius:10px!important;background:var(--tm-surface)!important;}
[data-bs-theme="dark"] .tm-rule-match-mode{background:#111827;border-color:#26354d}[data-bs-theme="dark"] .tm-delete-folder-summary{background:#3f1218;border-color:#7f1d1d;color:#fecaca}[data-bs-theme="dark"] .tm-delete-folder-summary small{color:#fecaca}[data-bs-theme="dark"] .tm-check-line.danger{background:#3a2110;border-color:#7c2d12;color:#fed7aa!important}
@media(max-width:900px){.tm-rule-from-mail .tm-rule-compact-head,.tm-rule-from-mail .tm-rule-pro-grid,.tm-rule-from-mail .tm-rule-actions-grid{grid-template-columns:1fr!important}}

/* Torobyte Mail v34 - etiquetas y atajos */
.tm-label-nav-row{position:relative;display:flex;align-items:center;gap:4px;border-radius:12px;min-height:32px;}
.tm-label-nav-row .tm-nav-link{flex:1;min-width:0;}
.tm-label-more{width:28px;height:28px;border:0;background:transparent;color:var(--tm-muted,#667085);border-radius:10px;display:inline-flex;align-items:center;justify-content:center;opacity:0;transition:.16s ease;}
.tm-label-nav-row:hover .tm-label-more,.tm-label-more:focus{opacity:1;background:#eef4ff;color:#2563eb;}
.tm-label-context-menu{min-width:238px;}
.tm-label-color.blue{color:#2563eb}.tm-label-color.green{color:#16a34a}.tm-label-color.purple{color:#7c3aed}.tm-label-color.orange{color:#f97316}.tm-label-color.red{color:#ef4444}.tm-label-color.sky{color:#0ea5e9}.tm-label-color.cyan{color:#06b6d4}.tm-label-color.teal{color:#14b8a6}.tm-label-color.emerald{color:#10b981}.tm-label-color.lime{color:#84cc16}.tm-label-color.yellow{color:#eab308}.tm-label-color.amber{color:#f59e0b}.tm-label-color.rose{color:#f43f5e}.tm-label-color.pink{color:#ec4899}.tm-label-color.violet{color:#8b5cf6}.tm-label-color.indigo{color:#4f46e5}.tm-label-color.slate{color:#475569}.tm-label-color.gray{color:#6b7280}
.tm-shortcuts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 18px;margin-top:14px;}
.tm-shortcuts-grid span{display:flex;align-items:center;gap:10px;color:#475569;font-weight:700;}
.tm-shortcuts-grid kbd{min-width:34px;text-align:center;border:1px solid #dbe4f0;background:#f8fafc;border-bottom-width:2px;color:#0f172a;border-radius:8px;padding:5px 8px;font-size:12px;}
body.tm-dark .tm-label-more:hover, body.tm-dark .tm-label-more:focus{background:#172554;color:#93c5fd;}
body.tm-dark .tm-shortcuts-grid kbd{background:#101827;color:#e5e7eb;border-color:#334155;}
body.tm-dark .tm-shortcuts-grid span{color:#cbd5e1;}


/* Torobyte Mail v35 */
.tm-message-row{cursor:pointer;}
.tm-message-link{pointer-events:auto;}


/* v38 - Altura completa del cuerpo del mensaje en vista panel lateral */
.tm-layout-split .tm-preview-panel{
  height:100%!important;
  min-height:0!important;
}
.tm-layout-split .tm-preview-content{
  height:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:auto!important;
}
.tm-layout-split .tm-preview-content .tm-preview-head,
.tm-layout-split .tm-preview-content .tm-sender-card{
  flex:0 0 auto!important;
}
.tm-layout-split .tm-preview-content .tm-body-card{
  flex:1 1 auto!important;
  min-height:calc(100vh - var(--tm-topbar) - 245px)!important;
  height:auto!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:visible!important;
}
.tm-layout-split .tm-preview-content .tm-body-card .tm-email-frame{
  flex:1 1 auto!important;
  width:100%!important;
  min-height:calc(100vh - var(--tm-topbar) - 310px)!important;
  height:auto;
}
.tm-layout-split .tm-preview-actions,
.tm-layout-split .tm-attachments{
  flex:0 0 auto!important;
}
.tm-layout-bottom .tm-preview-content .tm-body-card{
  min-height:520px!important;
  display:flex!important;
  flex-direction:column!important;
}
.tm-layout-bottom .tm-email-frame{
  min-height:480px!important;
}
@media(max-width:1180px){
  .tm-layout-split .tm-preview-content .tm-body-card,
  .tm-layout-split .tm-preview-content .tm-body-card .tm-email-frame{
    min-height:420px!important;
  }
}


/* Torobyte Mail v39 - notificaciones compactas */
.tm-flash{
  position:fixed!important;
  top:auto!important;
  right:22px!important;
  bottom:22px!important;
  z-index:9500!important;
  width:auto!important;
  min-width:220px!important;
  max-width:min(360px,calc(100vw - 32px))!important;
  min-height:0!important;
  padding:10px 42px 10px 14px!important;
  border-radius:12px!important;
  border:1px solid rgba(15,23,42,.08)!important;
  box-shadow:0 10px 26px rgba(15,23,42,.14)!important;
  font-size:13px!important;
  line-height:1.3!important;
  font-weight:700!important;
  letter-spacing:-.01em!important;
  margin:0!important;
  transform:translateY(0)!important;
}
.tm-flash.alert-success{background:#ecfdf3!important;color:#166534!important;border-color:#bbf7d0!important;}
.tm-flash.alert-danger{background:#fef2f2!important;color:#991b1b!important;border-color:#fecaca!important;}
.tm-flash.alert-warning{background:#fffbeb!important;color:#92400e!important;border-color:#fde68a!important;}
.tm-flash.alert-info{background:#eff6ff!important;color:#1d4ed8!important;border-color:#bfdbfe!important;}
.tm-flash .btn-close{
  width:22px!important;
  height:22px!important;
  padding:0!important;
  right:10px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  opacity:.55!important;
  background-size:11px!important;
}
.tm-flash .btn-close:hover{opacity:.9!important;}
.tm-flash.fade{transition:opacity .18s ease,transform .18s ease!important;}
.tm-flash.fade.show{opacity:1!important;transform:translateY(0)!important;}
.tm-flash.fade:not(.show){opacity:0!important;transform:translateY(8px)!important;}
[data-bs-theme="dark"] .tm-flash.alert-success{background:#052e1b!important;color:#bbf7d0!important;border-color:#14532d!important;}
[data-bs-theme="dark"] .tm-flash.alert-danger{background:#450a0a!important;color:#fecaca!important;border-color:#7f1d1d!important;}
[data-bs-theme="dark"] .tm-flash.alert-warning{background:#451a03!important;color:#fde68a!important;border-color:#78350f!important;}
[data-bs-theme="dark"] .tm-flash.alert-info{background:#082f49!important;color:#bfdbfe!important;border-color:#1e3a8a!important;}
@media (max-width:760px){.tm-flash{right:12px!important;bottom:12px!important;max-width:calc(100vw - 24px)!important;}}

/* v40 - Login profesional y composición robusta en carpetas */
.tm-login-pro{min-height:100vh;position:relative;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:44px 22px;background:radial-gradient(circle at 18% 15%,rgba(37,99,235,.16),transparent 32%),radial-gradient(circle at 86% 70%,rgba(14,165,233,.16),transparent 34%),linear-gradient(135deg,#f8fbff 0%,#eef5ff 54%,#f9fbff 100%);color:#0f172a}.tm-login-bg-orb{position:absolute;border-radius:999px;filter:blur(4px);opacity:.65;pointer-events:none}.tm-login-bg-orb.orb-a{width:420px;height:420px;background:rgba(37,99,235,.10);left:-150px;top:-110px}.tm-login-bg-orb.orb-b{width:520px;height:520px;background:rgba(6,182,212,.10);right:-180px;bottom:-180px}.tm-login-pro-shell{position:relative;z-index:1;width:min(1180px,100%);display:grid;grid-template-columns:1.08fr .92fr;gap:28px;align-items:stretch}.tm-login-pro-hero,.tm-login-pro-card{background:rgba(255,255,255,.74);border:1px solid rgba(203,213,225,.82);box-shadow:0 30px 90px rgba(15,23,42,.10);backdrop-filter:blur(18px);border-radius:34px}.tm-login-pro-hero{padding:44px;min-height:610px;display:flex;flex-direction:column;justify-content:space-between;overflow:hidden;position:relative}.tm-login-pro-hero:after{content:"";position:absolute;right:-90px;top:90px;width:360px;height:360px;border-radius:90px;background:linear-gradient(135deg,rgba(37,99,235,.18),rgba(14,165,233,.05));transform:rotate(26deg)}.tm-login-pro-brand{display:flex;align-items:center;gap:14px;font-size:26px;font-weight:950;letter-spacing:-.04em}.tm-login-pro-brand img{width:58px;height:58px;object-fit:contain;filter:drop-shadow(0 14px 28px rgba(37,99,235,.22))}.tm-login-kicker{display:inline-flex;align-items:center;gap:9px;padding:10px 14px;border-radius:999px;background:#eaf2ff;color:#1d4ed8;font-weight:850;margin-bottom:24px}.tm-login-pro-copy{max-width:620px;position:relative;z-index:2}.tm-login-pro-copy h1{font-size:58px;line-height:1.02;letter-spacing:-.06em;margin:0 0 22px;font-weight:950}.tm-login-pro-copy p{font-size:19px;line-height:1.65;color:#64748b;margin:0;max-width:560px}.tm-login-pro-stats{position:relative;z-index:2;display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.tm-login-pro-stats div{background:#fff;border:1px solid #e6edf8;border-radius:22px;padding:18px;display:grid;grid-template-columns:42px 1fr;column-gap:12px;align-items:center}.tm-login-pro-stats i{grid-row:span 2;width:42px;height:42px;border-radius:14px;background:#edf4ff;color:#2563eb;display:flex;align-items:center;justify-content:center}.tm-login-pro-stats strong{font-weight:900}.tm-login-pro-stats span{font-size:13px;color:#64748b}.tm-login-pro-card{padding:54px;display:flex;flex-direction:column;justify-content:center}.tm-login-pro-card-brand{justify-content:flex-start!important;margin:0 0 42px!important}.tm-login-pro-card-brand img{width:54px!important;height:54px!important}.tm-login-pro-card-brand strong{font-size:27px}.tm-login-pro-card h2{font-size:42px!important;text-align:left!important;margin:0 0 10px!important;letter-spacing:-.055em}.tm-login-pro-card>p{text-align:left!important;font-size:17px!important;color:#64748b;margin:0 0 34px!important}.tm-login-pro-field{margin-bottom:22px}.tm-login-pro-field div{height:60px!important;border-radius:17px!important;background:#f8fbff;border-color:#d7e2f2!important;transition:.16s}.tm-login-pro-field div:focus-within{background:#fff;border-color:#2563eb!important;box-shadow:0 0 0 5px rgba(37,99,235,.10)}.tm-login-pro-field input{font-size:16px}.tm-login-row-pro{justify-content:flex-start!important;margin:2px 0 28px!important}.tm-login-pro-submit{height:62px!important;border-radius:17px!important;background:linear-gradient(135deg,#2563eb,#1d4ed8)!important;box-shadow:0 18px 38px rgba(37,99,235,.22)}.tm-login-pro-footer{position:relative;z-index:1;margin-top:26px;color:#7b8aa2;font-size:15px;text-align:center}[data-bs-theme="dark"] .tm-login-pro{background:radial-gradient(circle at 18% 15%,rgba(59,130,246,.18),transparent 32%),linear-gradient(135deg,#08111f 0%,#0f172a 100%);color:#f8fafc}[data-bs-theme="dark"] .tm-login-pro-hero,[data-bs-theme="dark"] .tm-login-pro-card{background:rgba(15,23,42,.82);border-color:#263449}[data-bs-theme="dark"] .tm-login-pro-copy p,[data-bs-theme="dark"] .tm-login-pro-card>p,[data-bs-theme="dark"] .tm-login-pro-footer{color:#94a3b8}[data-bs-theme="dark"] .tm-login-pro-stats div{background:#111827;border-color:#263449}[data-bs-theme="dark"] .tm-login-pro-field div{background:#0b1220;border-color:#263449!important}[data-bs-theme="dark"] .tm-login-pro-field div:focus-within{background:#0f172a;border-color:#60a5fa!important}.tm-password-eye{border:0;background:transparent;color:#64748b;padding:0 2px;display:inline-flex;align-items:center;justify-content:center}@media(max-width:980px){.tm-login-pro-shell{grid-template-columns:1fr}.tm-login-pro-hero{display:none}.tm-login-pro-card{width:min(620px,100%);margin:auto}.tm-login-pro-card-brand{justify-content:center!important}.tm-login-pro-card h2,.tm-login-pro-card>p{text-align:center!important}}@media(max-width:620px){.tm-login-pro{padding:22px 14px}.tm-login-pro-card{padding:36px 22px;border-radius:26px}.tm-login-pro-card h2{font-size:32px!important}.tm-login-pro-card-brand strong{font-size:23px}.tm-login-pro-card-brand img{width:48px!important;height:48px!important}}

/* Torobyte Mail v41: login profesional sin panel duplicado, logo solo en formulario */
.tm-login-v41{background:radial-gradient(circle at 20% 12%,rgba(37,99,235,.14),transparent 30%),radial-gradient(circle at 80% 88%,rgba(14,165,233,.12),transparent 34%),linear-gradient(135deg,#f7fbff 0%,#eef5ff 52%,#f8fbff 100%)}
.tm-login-v41-shell{position:relative;z-index:1;width:min(560px,calc(100vw - 36px));display:flex;align-items:center;justify-content:center}.tm-login-v41-card{width:100%;padding:58px 58px 52px!important;border-radius:34px!important;background:rgba(255,255,255,.86)!important;box-shadow:0 34px 100px rgba(15,23,42,.12)!important;border:1px solid rgba(203,213,225,.82)!important;backdrop-filter:blur(18px)}.tm-login-v41-brand{justify-content:center!important;margin:0 0 34px!important}.tm-login-v41-brand img{width:64px!important;height:64px!important}.tm-login-v41-brand strong{font-size:31px!important}.tm-login-v41-card h2{text-align:center!important;font-size:38px!important;letter-spacing:-.055em;margin-bottom:10px!important}.tm-login-v41-card>p{text-align:center!important;margin-bottom:34px!important;color:#64748b}.tm-login-v41 .tm-login-pro-field div{background:#f8fbff}.tm-login-v41 .tm-login-pro-submit{margin-top:8px}.tm-login-v41 .tm-login-pro-footer{margin-top:22px}.tm-login-v41 .tm-login-bg-orb.orb-a{left:8%;top:8%;width:360px;height:360px}.tm-login-v41 .tm-login-bg-orb.orb-b{right:10%;bottom:8%;width:420px;height:420px}[data-bs-theme="dark"] .tm-login-v41{background:radial-gradient(circle at 20% 12%,rgba(59,130,246,.18),transparent 30%),linear-gradient(135deg,#08111f 0%,#0f172a 100%)}[data-bs-theme="dark"] .tm-login-v41-card{background:rgba(15,23,42,.88)!important;border-color:#263449!important}@media(max-width:620px){.tm-login-v41-card{padding:38px 24px 34px!important;border-radius:26px!important}.tm-login-v41-brand strong{font-size:25px!important}.tm-login-v41-card h2{font-size:30px!important}}

/* v42: acciones superiores centralizadas + categorías estilo Gmail */
.tm-preview-toolbar-actions{gap:8px!important;overflow-x:auto;scrollbar-width:thin;white-space:nowrap;position:sticky;top:0;z-index:20}.tm-preview-toolbar-actions .tm-tool-action{background:#eef4ff;color:#2563eb;border-color:#d8e7ff}.tm-preview-toolbar-actions .tm-tool-action:hover{background:#dbeafe;color:#1d4ed8}.tm-toolbar-separator{width:1px;height:28px;background:var(--tm-border);display:inline-block;margin:0 4px;flex:0 0 1px}.tm-dropdown-scroll{max-height:340px;overflow:auto}.tm-sender-card{grid-template-columns:48px minmax(0,1fr) auto!important}.tm-category-badge{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:5px 10px;font-size:11px;font-weight:850;line-height:1;white-space:nowrap;background:#eef2ff;color:#3730a3;border:1px solid rgba(55,48,163,.12)}.tm-category-badge i{font-size:11px}.tm-category-badge.primary{background:#e0f2fe;color:#0369a1;border-color:rgba(3,105,161,.14)}.tm-category-badge.shopping{background:#ecfdf3;color:#047857;border-color:rgba(4,120,87,.14)}.tm-category-badge.social{background:#eff6ff;color:#1d4ed8;border-color:rgba(29,78,216,.14)}.tm-category-badge.notifications{background:#fff7ed;color:#c2410c;border-color:rgba(194,65,12,.14)}.tm-category-badge.forums{background:#f5f3ff;color:#6d28d9;border-color:rgba(109,40,217,.14)}.tm-category-badge.promotions{background:#fef2f2;color:#b91c1c;border-color:rgba(185,28,28,.14)}.tm-category-badge.mini{padding:3px 8px;font-size:10px;margin-right:4px}.tm-row-labels{display:flex!important;align-items:center;gap:5px;min-width:0;overflow:hidden}.tm-tab b.muted{background:#f1f5f9!important;color:#64748b!important}[data-bs-theme="dark"] .tm-preview-toolbar-actions .tm-tool-action{background:#14284a;color:#93c5fd;border-color:#1d3b65}[data-bs-theme="dark"] .tm-toolbar-separator{background:#24364f}[data-bs-theme="dark"] .tm-category-badge{filter:saturate(.95) brightness(.9)}@media(max-width:760px){.tm-preview-toolbar-actions{height:auto!important;min-height:54px;padding:8px 12px!important}.tm-toolbar-separator{display:none}.tm-category-badge.mini{display:none}.tm-sender-card{grid-template-columns:42px minmax(0,1fr)!important}}

/* Torobyte Mail v43 - colores de categorías y separación visual de etiquetas */
.tm-category-tabs-v22 .tm-category-tab{
  position:relative!important;
  border:1px solid transparent!important;
  font-weight:800!important;
  transition:background .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease!important;
}
.tm-category-tabs-v22 .tm-category-tab i{opacity:.95!important;}
.tm-category-tabs-v22 .tm-category-tab-primary{background:#e0f2fe!important;color:#0369a1!important;border-color:rgba(3,105,161,.16)!important;}
.tm-category-tabs-v22 .tm-category-tab-shopping{background:#ecfdf3!important;color:#047857!important;border-color:rgba(4,120,87,.16)!important;}
.tm-category-tabs-v22 .tm-category-tab-social{background:#eff6ff!important;color:#1d4ed8!important;border-color:rgba(29,78,216,.16)!important;}
.tm-category-tabs-v22 .tm-category-tab-notifications{background:#fff7ed!important;color:#c2410c!important;border-color:rgba(194,65,12,.16)!important;}
.tm-category-tabs-v22 .tm-category-tab-forums{background:#f5f3ff!important;color:#6d28d9!important;border-color:rgba(109,40,217,.16)!important;}
.tm-category-tabs-v22 .tm-category-tab-promotions{background:#fef2f2!important;color:#b91c1c!important;border-color:rgba(185,28,28,.16)!important;}
.tm-category-tabs-v22 .tm-category-tab.active{
  box-shadow:inset 0 -3px 0 currentColor,0 8px 18px rgba(15,23,42,.08)!important;
  border-bottom-color:currentColor!important;
  filter:saturate(1.08)!important;
}
.tm-category-tabs-v22 .tm-category-tab b{
  background:rgba(255,255,255,.75)!important;
  color:inherit!important;
  border:1px solid rgba(255,255,255,.72)!important;
}
.tm-row-labels{
  gap:9px!important;
  padding-top:5px!important;
  flex-wrap:wrap!important;
}
.tm-row-labels .tm-category-badge.mini{
  margin-right:3px!important;
  padding:4px 9px!important;
  gap:7px!important;
}
.tm-row-labels .tm-category-badge.mini i{
  margin-right:1px!important;
  flex:0 0 auto!important;
}
.tm-row-labels .tm-local-label{
  margin-left:2px!important;
}
[data-bs-theme="dark"] .tm-category-tabs-v22 .tm-category-tab-primary{background:#082f49!important;color:#7dd3fc!important;border-color:rgba(125,211,252,.18)!important;}
[data-bs-theme="dark"] .tm-category-tabs-v22 .tm-category-tab-shopping{background:#052e1a!important;color:#86efac!important;border-color:rgba(134,239,172,.18)!important;}
[data-bs-theme="dark"] .tm-category-tabs-v22 .tm-category-tab-social{background:#0b2c62!important;color:#93c5fd!important;border-color:rgba(147,197,253,.18)!important;}
[data-bs-theme="dark"] .tm-category-tabs-v22 .tm-category-tab-notifications{background:#431407!important;color:#fdba74!important;border-color:rgba(253,186,116,.18)!important;}
[data-bs-theme="dark"] .tm-category-tabs-v22 .tm-category-tab-forums{background:#2e1065!important;color:#c4b5fd!important;border-color:rgba(196,181,253,.18)!important;}
[data-bs-theme="dark"] .tm-category-tabs-v22 .tm-category-tab-promotions{background:#450a0a!important;color:#fca5a5!important;border-color:rgba(252,165,165,.18)!important;}
[data-bs-theme="dark"] .tm-category-tabs-v22 .tm-category-tab b{background:rgba(15,23,42,.55)!important;border-color:rgba(255,255,255,.12)!important;}
@media(max-width:760px){.tm-row-labels{gap:6px!important;padding-top:3px!important}.tm-row-labels .tm-category-badge.mini{display:inline-flex!important}}

/* Torobyte Mail v44 - ajustes de etiquetas, categorías y toolbar */
.tm-row-labels .tm-category-badge.mini{gap:9px!important;margin-right:8px!important;}
.tm-row-labels .tm-category-badge.mini i{margin-right:2px!important;}
.tm-row-labels .tm-local-label{margin-left:4px!important;}
.tm-category-tabs-v22 .tm-tab i{margin-right:2px!important;}
.tm-list-toolbar .tm-tool:disabled,.tm-list-toolbar .tm-tool.disabled{opacity:.45;pointer-events:none;}
.tm-label-nav-row .tm-nav-link.active{background:#eef4ff!important;color:#2563eb!important;}
[data-bs-theme="dark"] .tm-label-nav-row .tm-nav-link.active{background:#14284a!important;color:#93c5fd!important;}

/* Torobyte Mail v45 - toolbar funcional, filtro no leídos y toggle de categorías */
.tm-list-toolbar .tm-tool.active{
  background:#e8f1ff!important;
  color:#2563eb!important;
  border-color:#cfe0ff!important;
}
.tm-category-toggle-form{display:flex;align-items:center;flex:0 0 auto;margin-right:8px;}
.tm-category-toggle{
  height:38px;border:1px solid #d7e2f2;background:#f8fafc;color:#475569;border-radius:999px;
  padding:0 12px;display:inline-flex;align-items:center;gap:7px;font-weight:850;font-size:12px;white-space:nowrap;
  transition:.18s ease;box-shadow:0 5px 12px rgba(15,23,42,.04);
}
.tm-category-toggle span{width:28px;height:16px;border-radius:999px;background:#cbd5e1;position:relative;display:inline-block;}
.tm-category-toggle span:before{content:"";position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#fff;transition:.18s ease;box-shadow:0 1px 3px rgba(15,23,42,.22);}
.tm-category-toggle.on{background:#ecfdf3;color:#047857;border-color:rgba(4,120,87,.18);}
.tm-category-toggle.on span{background:#10b981;}
.tm-category-toggle.on span:before{transform:translateX(12px);}
.tm-category-toggle.off{background:#fff7ed;color:#c2410c;border-color:rgba(194,65,12,.18);}
.tm-category-disabled .tm-category-tab{opacity:.58;filter:grayscale(.2);}
.tm-category-disabled .tm-category-tab.active{box-shadow:none!important;border-bottom-color:transparent!important;}
[data-bs-theme="dark"] .tm-list-toolbar .tm-tool.active{background:#14284a!important;color:#93c5fd!important;border-color:#1d3b65!important;}
[data-bs-theme="dark"] .tm-category-toggle{background:#111827;color:#cbd5e1;border-color:#263449;}
[data-bs-theme="dark"] .tm-category-toggle.on{background:#052e1a;color:#86efac;border-color:rgba(134,239,172,.18);}
[data-bs-theme="dark"] .tm-category-toggle.off{background:#431407;color:#fdba74;border-color:rgba(253,186,116,.18);}
@media(max-width:760px){.tm-category-toggle{height:34px;font-size:11px;padding:0 10px}.tm-category-toggle-form{margin-right:4px}}

/* v46 - toolbar superior con colores, unread activo y categorías solo en Entrada */
.tm-list-toolbar .tm-tool{transition:background .16s ease,color .16s ease,border-color .16s ease,transform .12s ease}
.tm-list-toolbar .tm-tool:hover{transform:translateY(-1px)}
.tm-list-toolbar .tm-tool-refresh{color:#2563eb!important;background:#eff6ff!important;border-color:#dbeafe!important}
.tm-list-toolbar .tm-tool-unread-filter{color:#7c3aed!important;background:#f5f3ff!important;border-color:#ede9fe!important}
.tm-list-toolbar .tm-tool-unread-filter.active{color:#fff!important;background:#16a34a!important;border-color:#16a34a!important;box-shadow:0 10px 24px rgba(22,163,74,.22)!important}
.tm-list-toolbar .tm-tool-read{color:#0891b2!important;background:#ecfeff!important;border-color:#cffafe!important}
.tm-list-toolbar .tm-tool-unread{color:#9333ea!important;background:#faf5ff!important;border-color:#f3e8ff!important}
.tm-list-toolbar .tm-tool-delete{color:#dc2626!important;background:#fef2f2!important;border-color:#fee2e2!important}
.tm-list-toolbar .tm-tool-not-spam{color:#059669!important;background:#ecfdf5!important;border-color:#d1fae5!important}
.tm-list-toolbar .tm-tool-more{color:#475569!important;background:#f8fafc!important;border-color:#e2e8f0!important}
.tm-list-toolbar .tm-tool.active:not(.tm-tool-unread-filter){color:#2563eb!important;background:#eaf2ff!important;border-color:#bfdbfe!important}
.tm-list-toolbar .tm-tool i{opacity:1!important}
.tm-preview-toolbar-actions .tm-tool:nth-child(2){color:#2563eb!important;background:#eff6ff!important;border-color:#dbeafe!important}
.tm-preview-toolbar-actions .tm-tool:nth-child(3){color:#7c3aed!important;background:#f5f3ff!important;border-color:#ede9fe!important}
.tm-preview-toolbar-actions .tm-tool:nth-child(4){color:#0891b2!important;background:#ecfeff!important;border-color:#cffafe!important}
.tm-preview-toolbar-actions form .tm-tool[title*="Eliminar"]{color:#dc2626!important;background:#fef2f2!important;border-color:#fee2e2!important}
.tm-preview-toolbar-actions form .tm-tool[title*="leído"],.tm-preview-toolbar-actions form .tm-tool[title*="Leído"]{color:#16a34a!important;background:#f0fdf4!important;border-color:#dcfce7!important}
.tm-preview-toolbar-actions .tm-tool[title*="Etiquetar"],.tm-preview-toolbar-actions .tm-tool-category{color:#2563eb!important;background:#eff6ff!important;border-color:#dbeafe!important}
.tm-preview-toolbar-actions .tm-tool[title*="Mover"]{color:#d97706!important;background:#fffbeb!important;border-color:#fef3c7!important}
.tm-category-tabs-disabled-view{gap:10px!important;align-items:center!important}
.tm-category-off-note{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:800;color:#64748b;background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;padding:9px 12px;white-space:nowrap}
.tm-row-labels{gap:8px!important;margin-top:5px!important}.tm-category-badge.mini{margin-right:2px!important}.tm-local-label{margin-left:2px!important}
.tm-shortcuts-modal.open{display:flex!important;align-items:center;justify-content:center}.tm-shortcuts-modal .tm-action-modal-card{max-width:760px}.tm-shortcuts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.tm-shortcuts-grid span{display:flex;align-items:center;gap:10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:12px 14px;font-weight:800;color:#334155}.tm-shortcuts-grid kbd{background:#111827;color:#fff;border-radius:8px;padding:5px 9px;font-size:12px;min-width:34px;text-align:center}
[data-bs-theme="dark"] .tm-list-toolbar .tm-tool-refresh{background:#14284a!important;color:#93c5fd!important;border-color:#1d3b65!important}
[data-bs-theme="dark"] .tm-list-toolbar .tm-tool-unread-filter{background:#27144a!important;color:#c4b5fd!important;border-color:#42206c!important}
[data-bs-theme="dark"] .tm-list-toolbar .tm-tool-unread-filter.active{background:#15803d!important;color:#fff!important;border-color:#22c55e!important}
[data-bs-theme="dark"] .tm-list-toolbar .tm-tool-read{background:#083344!important;color:#67e8f9!important;border-color:#155e75!important}
[data-bs-theme="dark"] .tm-list-toolbar .tm-tool-unread{background:#2e1065!important;color:#d8b4fe!important;border-color:#581c87!important}
[data-bs-theme="dark"] .tm-list-toolbar .tm-tool-delete{background:#450a0a!important;color:#fca5a5!important;border-color:#7f1d1d!important}
[data-bs-theme="dark"] .tm-list-toolbar .tm-tool-more{background:#111827!important;color:#cbd5e1!important;border-color:#334155!important}
[data-bs-theme="dark"] .tm-category-off-note,[data-bs-theme="dark"] .tm-shortcuts-grid span{background:#111827;color:#cbd5e1;border-color:#334155}
[data-bs-theme="dark"] .tm-shortcuts-grid kbd{background:#020617;color:#f8fafc;border:1px solid #334155}
@media(max-width:760px){.tm-shortcuts-grid{grid-template-columns:1fr}.tm-category-off-note{display:none}}

/* v47: contadores de etiquetas y notificaciones compactas AJAX */
.tm-sidebar-labels .tm-nav-link .tm-label-count{margin-left:auto;min-width:22px;height:22px;padding:0 7px;border-radius:999px;background:#eef4ff;color:#2563eb;font-size:12px;font-weight:800;display:inline-flex;align-items:center;justify-content:center}
[data-bs-theme="dark"] .tm-sidebar-labels .tm-nav-link .tm-label-count{background:#14284a;color:#93c5fd}
.tm-toast-stack{position:fixed;right:22px;bottom:22px;z-index:3000;display:grid;gap:8px;pointer-events:none}.tm-toast{transform:translateY(8px);opacity:0;transition:.18s ease;border:1px solid #dbeafe;background:#eff6ff;color:#1d4ed8;border-radius:14px;padding:10px 14px;font-weight:750;box-shadow:0 14px 34px rgba(15,23,42,.14);font-size:13px}.tm-toast.show{transform:translateY(0);opacity:1}.tm-toast-success{border-color:#bbf7d0;background:#f0fdf4;color:#15803d}.tm-toast-danger{border-color:#fecaca;background:#fef2f2;color:#b91c1c}[data-bs-theme="dark"] .tm-toast{background:#111827;border-color:#334155;color:#e5e7eb;box-shadow:0 18px 40px rgba(0,0,0,.35)}

/* v48 - etiquetas con el mismo color definido y refuerzo visual */
.tm-local-label{border:1px solid currentColor!important;gap:6px!important;box-shadow:0 4px 10px rgba(15,23,42,.04)}
.tm-local-label:before{content:"";width:7px;height:7px;border-radius:999px;background:currentColor;display:inline-block;flex:0 0 7px;opacity:.95}
.tm-local-label.blue{background:#dbeafe!important;color:#1d4ed8!important}.tm-local-label.green{background:#dcfce7!important;color:#15803d!important}.tm-local-label.purple{background:#ede9fe!important;color:#6d28d9!important}.tm-local-label.orange{background:#ffedd5!important;color:#c2410c!important}.tm-local-label.red{background:#fee2e2!important;color:#b91c1c!important}
.tm-local-label.sky{background:#e0f2fe!important;color:#0369a1!important}.tm-local-label.cyan{background:#cffafe!important;color:#0e7490!important}.tm-local-label.teal{background:#ccfbf1!important;color:#0f766e!important}.tm-local-label.emerald{background:#d1fae5!important;color:#047857!important}.tm-local-label.lime{background:#ecfccb!important;color:#4d7c0f!important}
.tm-local-label.yellow{background:#fef9c3!important;color:#a16207!important}.tm-local-label.amber{background:#fef3c7!important;color:#b45309!important}.tm-local-label.rose{background:#ffe4e6!important;color:#be123c!important}.tm-local-label.pink{background:#fce7f3!important;color:#be185d!important}.tm-local-label.violet{background:#ede9fe!important;color:#7c3aed!important}.tm-local-label.indigo{background:#e0e7ff!important;color:#4338ca!important}.tm-local-label.slate{background:#e2e8f0!important;color:#334155!important}.tm-local-label.gray{background:#f3f4f6!important;color:#4b5563!important}
.tm-dropdown .tm-local-label{font-size:12px;padding:5px 9px!important}
.tm-list-toolbar .tm-tool{position:relative}.tm-ajax-busy .tm-list-toolbar .tm-tool{pointer-events:none;opacity:.72}.tm-ajax-busy .tm-list-toolbar:after{content:"";width:16px;height:16px;border:2px solid #bfdbfe;border-top-color:#2563eb;border-radius:50%;display:inline-block;animation:tmspin .75s linear infinite;margin-left:6px}@keyframes tmspin{to{transform:rotate(360deg)}}
[data-bs-theme="dark"] .tm-local-label{filter:saturate(.95) brightness(.95)}

/* v49 - refuerzo visual: la etiqueta del correo mantiene exactamente el color elegido */
.tm-row-labels{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important;min-height:22px}
.tm-row-labels .tm-local-label,.tm-preview-head .tm-local-label,.tm-dropdown .tm-local-label{display:inline-flex!important;align-items:center!important;line-height:1!important;border-radius:999px!important;font-weight:850!important;letter-spacing:.01em}
.tm-row-labels .tm-local-label{padding:5px 9px!important;font-size:11px!important;margin-left:0!important}


/* v50 - acciones silenciosas, dropdowns sobre el correo, impresión visible y un solo scroll */
.tm-ajax-soft-busy .tm-list-toolbar .tm-tool,
.tm-ajax-soft-busy .tm-preview-toolbar-actions .tm-tool{opacity:.92!important;cursor:progress!important}
.tm-compose-loading-note{color:#64748b;font-weight:700;font-size:13px;margin-top:12px}.tm-compose-loading-note i{margin-right:8px;color:#2563eb}
.tm-preview-toolbar-actions{overflow:visible!important;position:sticky!important;top:0!important;z-index:1200!important}
.tm-preview-toolbar-actions .dropdown{position:relative!important}.tm-preview-toolbar-actions .dropdown-menu{z-index:10080!important;max-height:70vh!important;overflow:auto!important}
.tm-dropdown{z-index:10080!important}.tm-category-dropdown .dropdown-menu{min-width:220px!important}
.tm-tool-print{color:#0f766e!important;background:#ccfbf1!important;border-color:#99f6e4!important}
.tm-preview-content,.tm-read-content{scrollbar-width:thin!important}.tm-body-card{overflow:visible!important}.tm-email-render,.tm-email-frame{overflow:hidden!important}.tm-email-frame{height:auto;border:0!important}
.tm-read-page,.tm-read-shell{min-height:0!important;overflow:hidden!important}.tm-read-content{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding-bottom:34px!important}
.tm-layout-split .tm-preview-content .tm-body-card .tm-email-frame{height:auto!important;max-height:none!important;overflow:hidden!important}
.tm-preview-panel,.tm-read-shell{contain:none!important}.tm-preview-toolbar-actions .tm-tool:nth-child(9),.tm-preview-toolbar-actions .tm-tool-print{color:#0f766e!important;background:#ccfbf1!important;border-color:#99f6e4!important}
.tm-toast-stack{z-index:10090!important}.tm-toast{transition:.16s ease!important}
[data-bs-theme="dark"] .tm-tool-print{background:#042f2e!important;color:#5eead4!important;border-color:#115e59!important}

/* Torobyte Mail v51 - correo completo, adjuntos compactos arriba y categoría similar */
.tm-body-card{
  overflow:visible!important;
  display:block!important;
  max-height:none!important;
}
.tm-email-frame{
  width:100%!important;
  border:0!important;
  display:block!important;
  overflow:hidden!important;
  max-height:none!important;
  background:#fff!important;
}
.tm-attachments-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  margin:0 0 10px!important;
  padding:0 0 8px!important;
  border-bottom:1px solid var(--tm-border)!important;
}
.tm-attachments-compact,
.tm-body-card > .tm-attachments{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:8px!important;
  margin:0 0 16px!important;
}
.tm-attachments-compact .tm-attachment,
.tm-body-card > .tm-attachments .tm-attachment{
  min-width:220px!important;
  max-width:340px!important;
  height:42px!important;
  padding:7px 9px!important;
  border-radius:10px!important;
  gap:8px!important;
  background:#f8fafc!important;
}
.tm-attachments-compact .tm-attachment span,
.tm-body-card > .tm-attachments .tm-attachment span{
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
  border-radius:8px!important;
  font-size:13px!important;
}
.tm-attachments-compact .tm-attachment strong,
.tm-body-card > .tm-attachments .tm-attachment strong{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:12px!important;
}
.tm-attachments-compact .tm-attachment small,
.tm-body-card > .tm-attachments .tm-attachment small{
  font-size:10px!important;
  white-space:nowrap!important;
}
.tm-attachments-compact .tm-attachment-actions,
.tm-body-card > .tm-attachments .tm-attachment-actions{gap:4px!important;display:flex!important;align-items:center!important;}
.tm-attachments-compact .tm-attach-preview,
.tm-body-card > .tm-attachments .tm-attach-preview,
.tm-attachments-compact .tm-attach-download,
.tm-body-card > .tm-attachments .tm-attach-download{
  width:26px!important;
  height:26px!important;
  border-radius:8px!important;
  padding:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:12px!important;
}
.tm-similar-option{
  font-size:12px!important;
  font-weight:750!important;
  color:#475569!important;
  white-space:normal!important;
  align-items:center!important;
}
.tm-category-dropdown .dropdown-menu{z-index:12000!important;}
.tm-category-disabled .tm-category-tab{pointer-events:none!important;opacity:.45!important;}
.tm-category-disabled:after{
  content:"Categorización desactivada";
  display:inline-flex;
  align-items:center;
  height:32px;
  padding:0 10px;
  border-radius:999px;
  background:#fff7ed;
  color:#c2410c;
  border:1px solid rgba(194,65,12,.14);
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}
.tm-preview-content.tm-read-content{overflow-y:auto!important;overflow-x:hidden!important;}
.tm-layout-split .tm-preview-content .tm-body-card .tm-email-frame,
.tm-layout-bottom .tm-email-frame{
  flex:none!important;
  min-height:420px!important;
  height:auto!important;
}
[data-bs-theme="dark"] .tm-attachments-compact .tm-attachment,
[data-bs-theme="dark"] .tm-body-card > .tm-attachments .tm-attachment{background:#111827!important;}
[data-bs-theme="dark"] .tm-category-disabled:after{background:#431407;color:#fdba74;border-color:rgba(253,186,116,.18)}

/* Torobyte Mail v53 - redacción rápida, redimensionar imágenes y galería completa de emoticons */
.tm-compose-modal.tm-compose-gmail{
  overflow:hidden!important;
  resize:none!important;
  display:flex!important;
  flex-direction:column!important;
}
.tm-compose-modal.tm-compose-gmail .tm-compose-fields,
.tm-compose-modal.tm-compose-gmail .tm-compose-attach-row,
.tm-compose-modal.tm-compose-gmail .tm-compose-file-list,
.tm-compose-modal.tm-compose-gmail .tm-compose-actions,
.tm-compose-modal.tm-compose-gmail .tm-compose-titlebar{flex:0 0 auto!important;}
.tm-compose-modal.tm-compose-gmail .tm-compose-editor-wrap{flex:1 1 auto!important;min-height:160px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;}
.tm-compose-modal.tm-compose-gmail .tm-compose-editor{flex:1 1 auto!important;height:auto!important;min-height:160px!important;}
.tm-resize-right{right:0;top:10px;bottom:10px;width:12px;cursor:ew-resize;}
.tm-resize-bottom{left:10px;right:10px;bottom:0;height:12px;cursor:ns-resize;}
.tm-resize-bottom-right{right:0;bottom:0;width:22px;height:22px;cursor:nwse-resize;background:linear-gradient(135deg,transparent 55%,rgba(37,99,235,.20) 56%,rgba(37,99,235,.20) 68%,transparent 69%)!important;border-bottom-right-radius:18px;}
.tm-resize-bottom-right:hover{background:linear-gradient(135deg,transparent 50%,rgba(37,99,235,.34) 51%,rgba(37,99,235,.34) 66%,transparent 67%)!important;}
.tm-compose-image-box{display:inline-block;position:relative;max-width:100%;vertical-align:middle;margin:6px 4px 6px 0;border:1px solid transparent;border-radius:10px;line-height:0;}
.tm-compose-image-box img{display:block;max-width:100%;height:auto;border-radius:8px;}
.tm-compose-image-box.is-selected{border-color:#2563eb;box-shadow:0 0 0 4px rgba(37,99,235,.12);}
.tm-compose-image-handle{position:absolute;right:-8px;bottom:-8px;width:18px;height:18px;border-radius:8px;background:#2563eb;border:2px solid #fff;box-shadow:0 8px 18px rgba(15,23,42,.24);cursor:nwse-resize;display:none;}
.tm-compose-image-box.is-selected .tm-compose-image-handle{display:block;}
.tm-image-resizing{cursor:nwse-resize!important;user-select:none!important;}
.tm-emoji-picker{display:grid;gap:12px;min-width:min(680px,calc(100vw - 80px));}
.tm-emoji-search{height:42px;border:1px solid var(--tm-border);border-radius:13px;padding:0 13px;background:var(--tm-surface);color:var(--tm-text);outline:0;font-weight:700;}
.tm-emoji-tabs{display:flex;gap:7px;overflow:auto;padding-bottom:4px;scrollbar-width:thin;}
.tm-emoji-tabs button{height:32px;border:1px solid var(--tm-border);border-radius:999px;background:#f8fafc;color:#475569;padding:0 11px;font-size:12px;font-weight:850;white-space:nowrap;}
.tm-emoji-tabs button.active{background:#e8f1ff;color:#2563eb;border-color:#bfdbfe;}
.tm-emoji-grid{display:grid!important;grid-template-columns:repeat(12,42px)!important;gap:7px!important;max-height:310px;overflow:auto;padding:2px 3px 8px;}
.tm-emoji-grid button{width:42px!important;height:42px!important;border-radius:12px!important;font-size:23px!important;line-height:1!important;background:#f8fafc!important;border:1px solid #e2e8f0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;transition:.12s ease;}
.tm-emoji-grid button:hover{background:#e8f1ff!important;border-color:#bfdbfe!important;transform:translateY(-1px);}
.tm-compose-tool-card{width:min(760px,96vw)!important;}
[data-bs-theme="dark"] .tm-emoji-search{background:#0b1424;border-color:#26384f;color:#e5edf8;}
[data-bs-theme="dark"] .tm-emoji-tabs button,[data-bs-theme="dark"] .tm-emoji-grid button{background:#111827!important;border-color:#26384f!important;color:#e5edf8!important;}
[data-bs-theme="dark"] .tm-emoji-tabs button.active,[data-bs-theme="dark"] .tm-emoji-grid button:hover{background:#14284a!important;color:#93c5fd!important;border-color:#1d3b65!important;}
@media(max-width:760px){.tm-emoji-picker{min-width:0}.tm-emoji-grid{grid-template-columns:repeat(7,38px)!important}.tm-emoji-grid button{width:38px!important;height:38px!important;font-size:21px!important}.tm-compose-tool-card{width:calc(100vw - 24px)!important}.tm-compose-modal.tm-compose-gmail{min-height:calc(100vh - 86px)!important}}


/* Torobyte Mail v54 - composer flotante sin afectar el correo abierto, redimensionable y contadores totales */
.tm-compose-modal.tm-compose-gmail{
  position:fixed!important;
  right:28px!important;
  bottom:0!important;
  left:auto!important;
  top:auto!important;
  transform:none!important;
  width:min(680px,calc(100vw - 44px))!important;
  height:min(650px,calc(100vh - 96px))!important;
  max-width:calc(100vw - 24px)!important;
  max-height:calc(100vh - 24px)!important;
  min-width:460px!important;
  min-height:360px!important;
  resize:both!important;
  overflow:hidden!important;
  z-index:12000!important;
  display:flex!important;
  flex-direction:column!important;
}
.tm-compose-modal.tm-compose-gmail .tm-compose-editor-wrap{flex:1 1 auto!important;min-height:190px!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;}
.tm-compose-modal.tm-compose-gmail .tm-compose-editor{flex:1 1 auto!important;min-height:190px!important;height:auto!important;overflow:auto!important;}
.tm-compose-resize-handle{position:absolute!important;display:block!important;z-index:15!important;background:transparent!important;}
.tm-resize-left{left:0!important;top:12px!important;bottom:12px!important;width:12px!important;cursor:ew-resize!important;}
.tm-resize-top{left:12px!important;right:12px!important;top:0!important;height:12px!important;cursor:ns-resize!important;}
.tm-resize-top-left{left:0!important;top:0!important;width:20px!important;height:20px!important;cursor:nwse-resize!important;}
.tm-resize-right{right:0!important;top:12px!important;bottom:12px!important;width:12px!important;cursor:ew-resize!important;}
.tm-resize-bottom{left:12px!important;right:12px!important;bottom:0!important;height:12px!important;cursor:ns-resize!important;}
.tm-resize-bottom-right{right:0!important;bottom:0!important;width:26px!important;height:26px!important;cursor:nwse-resize!important;background:linear-gradient(135deg,transparent 52%,rgba(37,99,235,.30) 53%,rgba(37,99,235,.30) 65%,transparent 66%,transparent 73%,rgba(37,99,235,.30) 74%,rgba(37,99,235,.30) 86%,transparent 87%)!important;}
.tm-message-row.selected{background:rgba(37,99,235,.08)!important;box-shadow:inset 3px 0 0 #2563eb!important;}
.tm-category-tab b{min-width:22px!important;text-align:center!important;}
@media(max-width:760px){.tm-compose-modal.tm-compose-gmail{left:10px!important;right:10px!important;bottom:0!important;width:auto!important;min-width:0!important;height:calc(100vh - 86px)!important;}}

/* Torobyte Mail v55 - redacción flotante real, resize desde izquierda y firma preservada */
body.tm-compose-open{overflow:auto!important;}
.tm-compose-modal.tm-compose-gmail{
  position:fixed!important;
  right:28px!important;
  bottom:0!important;
  left:auto!important;
  top:auto!important;
  transform:none!important;
  width:min(700px,calc(100vw - 52px))!important;
  height:min(660px,calc(100vh - 98px))!important;
  min-width:460px!important;
  min-height:360px!important;
  max-width:calc(100vw - 24px)!important;
  max-height:calc(100vh - 24px)!important;
  resize:none!important;
  overflow:hidden!important;
  z-index:30000!important;
  display:flex!important;
  flex-direction:column!important;
  contain:layout style!important;
}
.tm-compose-modal.tm-compose-gmail.maximized{
  left:24px!important;
  right:24px!important;
  top:24px!important;
  bottom:24px!important;
  width:auto!important;
  height:auto!important;
  max-width:none!important;
  max-height:none!important;
  resize:none!important;
}
.tm-compose-modal.tm-compose-gmail.minimized{
  width:380px!important;
  height:50px!important;
  min-height:50px!important;
  resize:none!important;
}
.tm-compose-modal.tm-compose-gmail .tm-compose-titlebar,
.tm-compose-modal.tm-compose-gmail .tm-compose-fields,
.tm-compose-modal.tm-compose-gmail .tm-compose-attach-row,
.tm-compose-modal.tm-compose-gmail .tm-compose-file-list,
.tm-compose-modal.tm-compose-gmail .tm-compose-actions{flex:0 0 auto!important;}
.tm-compose-modal.tm-compose-gmail .tm-compose-editor-wrap{
  flex:1 1 auto!important;
  min-height:180px!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
.tm-compose-modal.tm-compose-gmail .tm-compose-editor{
  flex:1 1 auto!important;
  height:auto!important;
  min-height:180px!important;
  overflow:auto!important;
}
.tm-compose-modal.tm-compose-gmail .tm-compose-resize-handle{position:absolute!important;display:block!important;z-index:40!important;background:transparent!important;}
.tm-compose-modal.tm-compose-gmail .tm-resize-left{
  left:-7px!important;
  top:48px!important;
  bottom:8px!important;
  width:20px!important;
  cursor:ew-resize!important;
}
.tm-compose-modal.tm-compose-gmail .tm-resize-left:after{
  content:"";
  position:absolute;
  left:7px;
  top:50%;
  width:4px;
  height:74px;
  transform:translateY(-50%);
  border-radius:999px;
  background:rgba(37,99,235,.20);
  opacity:.72;
}
.tm-compose-modal.tm-compose-gmail .tm-resize-left:hover:after{background:rgba(37,99,235,.55);opacity:1;}
.tm-compose-modal.tm-compose-gmail .tm-resize-top,
.tm-compose-modal.tm-compose-gmail .tm-resize-right,
.tm-compose-modal.tm-compose-gmail .tm-resize-bottom,
.tm-compose-modal.tm-compose-gmail .tm-resize-top-left,
.tm-compose-modal.tm-compose-gmail .tm-resize-bottom-right{display:none!important;}
body.tm-compose-resizing-left, body.tm-compose-resizing-left *{cursor:ew-resize!important;user-select:none!important;}
/* Firma: no forzar medidas/tabla; se preserva el HTML original de la firma. */
.tm-compose-signature{display:block;max-width:100%;}
.tm-compose-signature img{height:auto;}
@media(max-width:760px){
  .tm-compose-modal.tm-compose-gmail{
    left:10px!important;
    right:10px!important;
    bottom:0!important;
    width:auto!important;
    min-width:0!important;
    height:calc(100vh - 86px)!important;
  }
  .tm-compose-modal.tm-compose-gmail .tm-resize-left{display:none!important;}
}

/* Torobyte Mail v56 - compose flotante prioritario y resize real desde borde izquierdo */
body.tm-compose-open{overflow:auto!important;}
.tm-compose-modal.tm-compose-gmail.tm-compose-v56,
.tm-compose-modal.tm-compose-gmail{
  position:fixed!important;
  right:28px!important;
  bottom:0!important;
  left:auto!important;
  top:auto!important;
  transform:none!important;
  width:min(720px,calc(100vw - 56px))!important;
  height:min(660px,calc(100vh - 92px))!important;
  min-width:460px!important;
  min-height:360px!important;
  max-width:calc(100vw - 24px)!important;
  max-height:calc(100vh - 24px)!important;
  resize:none!important;
  overflow:hidden!important;
  z-index:40000!important;
  display:flex!important;
  flex-direction:column!important;
  contain:none!important;
}
.tm-compose-modal.tm-compose-gmail.is-manual-size{max-width:none!important;}
.tm-compose-modal.tm-compose-gmail .tm-compose-titlebar,
.tm-compose-modal.tm-compose-gmail .tm-compose-fields,
.tm-compose-modal.tm-compose-gmail .tm-compose-attach-row,
.tm-compose-modal.tm-compose-gmail .tm-compose-file-list,
.tm-compose-modal.tm-compose-gmail .tm-compose-actions{flex:0 0 auto!important;}
.tm-compose-modal.tm-compose-gmail .tm-compose-editor-wrap{flex:1 1 auto!important;min-height:170px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;}
.tm-compose-modal.tm-compose-gmail .tm-compose-editor{flex:1 1 auto!important;height:auto!important;min-height:170px!important;overflow:auto!important;}
.tm-compose-modal.tm-compose-gmail .tm-compose-resize-handle{position:absolute!important;display:block!important;z-index:999!important;background:transparent!important;touch-action:none!important;}
.tm-compose-modal.tm-compose-gmail .tm-resize-left{left:0!important;top:46px!important;bottom:0!important;width:22px!important;cursor:ew-resize!important;pointer-events:auto!important;}
.tm-compose-modal.tm-compose-gmail .tm-resize-left:before{content:"";position:absolute;left:0;top:0;bottom:0;width:8px;background:rgba(37,99,235,.05);}
.tm-compose-modal.tm-compose-gmail .tm-resize-left:after{content:"";position:absolute;left:7px;top:50%;width:5px;height:86px;transform:translateY(-50%);border-radius:999px;background:rgba(37,99,235,.32);box-shadow:0 0 0 1px rgba(37,99,235,.08);}
.tm-compose-modal.tm-compose-gmail .tm-resize-left:hover:before{background:rgba(37,99,235,.10);}
.tm-compose-modal.tm-compose-gmail .tm-resize-left:hover:after{background:rgba(37,99,235,.70);}
.tm-compose-modal.tm-compose-gmail .tm-resize-top,
.tm-compose-modal.tm-compose-gmail .tm-resize-right,
.tm-compose-modal.tm-compose-gmail .tm-resize-bottom,
.tm-compose-modal.tm-compose-gmail .tm-resize-top-left,
.tm-compose-modal.tm-compose-gmail .tm-resize-bottom-right{display:none!important;}
body.tm-compose-resizing-left, body.tm-compose-resizing-left *{cursor:ew-resize!important;user-select:none!important;}
.tm-compose-modal.tm-compose-gmail.maximized{left:24px!important;right:24px!important;top:24px!important;bottom:24px!important;width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;}
.tm-compose-modal.tm-compose-gmail.minimized{width:380px!important;height:50px!important;min-height:50px!important;overflow:hidden!important;}
@media(max-width:760px){.tm-compose-modal.tm-compose-gmail{left:10px!important;right:10px!important;bottom:0!important;width:auto!important;min-width:0!important;height:calc(100vh - 86px)!important}.tm-compose-modal.tm-compose-gmail .tm-resize-left{display:none!important;}}

/* v57 - compose flotante real, resizer confiable, búsqueda por alcance y sin barra extra fuera de Entrada */
.tm-search-scope{
  height:34px;
  max-width:148px;
  border:0;
  border-left:1px solid var(--tm-border);
  background:transparent;
  color:#475569;
  font-size:12px;
  font-weight:800;
  outline:0;
  padding:0 8px;
  flex:0 0 auto;
}
.tm-search-scope:focus{color:#2563eb;}
.tm-layout-split .tm-mail-board{
  grid-template-columns:minmax(320px,var(--tm-list-width,44%)) 10px minmax(360px,1fr)!important;
}
.tm-layout-split .tm-panel-resizer{
  width:10px!important;
  z-index:60!important;
  touch-action:none!important;
  user-select:none!important;
  background:linear-gradient(90deg, transparent, rgba(148,163,184,.42), transparent)!important;
}
.tm-layout-split .tm-panel-resizer::after{
  content:""!important;
  display:block!important;
  width:4px!important;
  height:54px!important;
  border-radius:999px!important;
  background:#94a3b8!important;
  margin:calc(50vh - 190px) auto 0!important;
  opacity:.75!important;
}
.tm-layout-split .tm-panel-resizer:hover::after,
body.tm-resizing .tm-layout-split .tm-panel-resizer::after{background:#2563eb!important;opacity:1!important;}
body.tm-resizing,body.tm-resizing *{cursor:col-resize!important;user-select:none!important;}
.tm-compose-modal.tm-compose-gmail,
body > .tm-compose-modal.tm-compose-gmail{
  position:fixed!important;
  right:24px!important;
  bottom:0!important;
  top:auto!important;
  left:auto!important;
  transform:none!important;
  width:640px!important;
  height:min(620px,calc(100vh - 92px))!important;
  min-width:430px!important;
  min-height:330px!important;
  max-width:calc(100vw - 28px)!important;
  max-height:calc(100vh - 28px)!important;
  z-index:50000!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  contain:layout style paint!important;
}
.tm-compose-modal.tm-compose-gmail.is-manual-size{max-width:none!important;}
.tm-compose-modal.tm-compose-gmail .tm-compose-resize-handle{position:absolute!important;display:block!important;z-index:1000!important;pointer-events:auto!important;touch-action:none!important;}
.tm-compose-modal.tm-compose-gmail .tm-resize-left{
  left:0!important;
  top:50px!important;
  bottom:0!important;
  width:34px!important;
  cursor:ew-resize!important;
  background:linear-gradient(90deg, rgba(37,99,235,.10), transparent)!important;
}
.tm-compose-modal.tm-compose-gmail .tm-resize-left::after{
  content:"";
  position:absolute;
  left:10px;
  top:50%;
  width:6px;
  height:96px;
  transform:translateY(-50%);
  border-radius:999px;
  background:rgba(37,99,235,.52);
}
.tm-compose-modal.tm-compose-gmail .tm-resize-left:hover::after{background:#2563eb;}
.tm-compose-modal.tm-compose-gmail .tm-compose-titlebar,
.tm-compose-modal.tm-compose-gmail .tm-compose-fields,
.tm-compose-modal.tm-compose-gmail .tm-compose-attach-row,
.tm-compose-modal.tm-compose-gmail .tm-compose-file-list,
.tm-compose-modal.tm-compose-gmail .tm-compose-actions{flex:0 0 auto!important;}
.tm-compose-modal.tm-compose-gmail .tm-compose-editor-wrap{flex:1 1 auto!important;min-height:170px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;}
.tm-compose-modal.tm-compose-gmail .tm-compose-editor{flex:1 1 auto!important;height:auto!important;min-height:170px!important;overflow:auto!important;}
.tm-compose-modal.tm-compose-gmail.maximized{left:24px!important;right:24px!important;top:24px!important;bottom:24px!important;width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;}
.tm-compose-modal.tm-compose-gmail.minimized{width:380px!important;height:50px!important;min-height:50px!important;overflow:hidden!important;}
.tm-preview-panel{min-height:0!important;}
.tm-preview-content{min-height:0!important;overflow:auto!important;}
.tm-body-card{min-height:0!important;overflow:visible!important;}
.tm-email-frame{
  display:block!important;
  width:100%!important;
  height:clamp(520px, calc(100vh - 330px), 860px)!important;
  min-height:520px!important;
  max-height:860px!important;
  overflow:auto!important;
}
@media(max-width:760px){
  .tm-search-scope{display:none;}
  .tm-compose-modal.tm-compose-gmail{left:8px!important;right:8px!important;bottom:0!important;width:auto!important;min-width:0!important;height:calc(100vh - 86px)!important;}
  .tm-compose-modal.tm-compose-gmail .tm-resize-left{display:none!important;}
}

/* Torobyte Mail v59 - compose estable, resize arriba/izquierda y contactos predictivos */
.tm-compose-modal.tm-compose-gmail,
body > .tm-compose-modal.tm-compose-gmail{
  position:fixed!important;
  z-index:60000!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  min-width:430px!important;
  min-height:330px!important;
}
.tm-compose-modal.tm-compose-gmail .tm-compose-resize-handle{
  position:absolute!important;
  display:block!important;
  z-index:2000!important;
  pointer-events:auto!important;
  touch-action:none!important;
  background:transparent!important;
}
.tm-compose-modal.tm-compose-gmail .tm-resize-left{left:0!important;top:46px!important;bottom:0!important;width:22px!important;cursor:ew-resize!important;}
.tm-compose-modal.tm-compose-gmail .tm-resize-left::after{content:"";position:absolute;left:7px;top:50%;width:5px;height:86px;transform:translateY(-50%);border-radius:999px;background:rgba(37,99,235,.45);}
.tm-compose-modal.tm-compose-gmail .tm-resize-top{display:block!important;left:20px!important;right:20px!important;top:0!important;height:16px!important;cursor:ns-resize!important;}
.tm-compose-modal.tm-compose-gmail .tm-resize-top::after{content:"";position:absolute;left:50%;top:5px;width:86px;height:5px;transform:translateX(-50%);border-radius:999px;background:rgba(37,99,235,.28);}
.tm-compose-modal.tm-compose-gmail .tm-resize-top-left{display:block!important;left:0!important;top:0!important;width:30px!important;height:30px!important;cursor:nwse-resize!important;}
.tm-compose-modal.tm-compose-gmail .tm-resize-right{display:block!important;right:0!important;top:46px!important;bottom:0!important;width:10px!important;cursor:ew-resize!important;}
.tm-compose-modal.tm-compose-gmail .tm-resize-bottom{display:block!important;left:20px!important;right:20px!important;bottom:0!important;height:10px!important;cursor:ns-resize!important;}
.tm-compose-modal.tm-compose-gmail .tm-resize-bottom-right{display:block!important;right:0!important;bottom:0!important;width:24px!important;height:24px!important;cursor:nwse-resize!important;}
.tm-compose-modal.tm-compose-gmail .tm-compose-editor-wrap{flex:1 1 auto!important;min-height:150px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;}
.tm-compose-modal.tm-compose-gmail .tm-compose-editor{flex:1 1 auto!important;height:auto!important;min-height:150px!important;overflow:auto!important;}
.tm-autosave-status{display:inline-flex;align-items:center;margin-left:10px;font-size:12px;color:#64748b;font-weight:600;white-space:nowrap;}
.tm-field-line{position:relative;}
.tm-recipient-suggest{position:absolute;left:64px;right:0;top:calc(100% - 2px);background:var(--tm-surface);border:1px solid var(--tm-border);border-radius:12px;box-shadow:0 18px 46px rgba(15,23,42,.16);z-index:70000;max-height:250px;overflow:auto;padding:6px;}
.tm-recipient-suggest[hidden]{display:none!important;}
.tm-recipient-suggest button{width:100%;border:0;background:transparent;border-radius:10px;padding:9px 10px;display:flex;align-items:center;gap:10px;text-align:left;color:var(--tm-text);}
.tm-recipient-suggest button:hover{background:var(--tm-blue-soft);color:var(--tm-blue);}
.tm-recipient-suggest span{display:flex;flex-direction:column;min-width:0;}
.tm-recipient-suggest strong,.tm-recipient-suggest small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.tm-recipient-suggest small{color:var(--tm-muted);font-size:12px;}
body.tm-compose-resizing{cursor:nwse-resize!important;user-select:none!important;}
@media(max-width:760px){.tm-compose-modal.tm-compose-gmail{left:8px!important;right:8px!important;bottom:0!important;width:auto!important;min-width:0!important;height:calc(100vh - 86px)!important}.tm-compose-modal.tm-compose-gmail .tm-compose-resize-handle{display:none!important;}}

/* Torobyte Mail v60 - compose visible, flotante y redimensionable */
body > .tm-compose-modal.tm-compose-gmail.tm-compose-v60,
body > .tm-compose-modal.tm-compose-gmail{
  position:fixed!important;
  right:24px!important;
  bottom:0!important;
  left:auto!important;
  top:auto!important;
  transform:none!important;
  width:680px!important;
  height:min(650px, calc(100vh - 80px))!important;
  min-width:430px!important;
  min-height:330px!important;
  max-width:calc(100vw - 24px)!important;
  max-height:calc(100vh - 18px)!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  z-index:70000!important;
  visibility:visible!important;
  opacity:1!important;
  contain:layout style paint!important;
}
body > .tm-compose-modal.tm-compose-gmail.is-manual-size,
body > .tm-compose-modal.tm-compose-gmail.tm-compose-v60.is-manual-size{
  right:auto!important;
  bottom:auto!important;
  max-width:none!important;
  max-height:none!important;
}
body > .tm-compose-modal.tm-compose-gmail .tm-compose-titlebar,
body > .tm-compose-modal.tm-compose-gmail .tm-compose-fields,
body > .tm-compose-modal.tm-compose-gmail .tm-compose-attach-row,
body > .tm-compose-modal.tm-compose-gmail .tm-compose-actions,
body > .tm-compose-modal.tm-compose-gmail .tm-compose-file-list{flex:0 0 auto!important;}
body > .tm-compose-modal.tm-compose-gmail .tm-compose-editor-wrap{flex:1 1 auto!important;min-height:160px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;}
body > .tm-compose-modal.tm-compose-gmail .tm-compose-editor{flex:1 1 auto!important;height:auto!important;min-height:150px!important;overflow:auto!important;}
body > .tm-compose-modal.tm-compose-gmail .tm-compose-resize-handle{position:absolute!important;display:block!important;z-index:90000!important;pointer-events:auto!important;touch-action:none!important;background:transparent!important;}
body > .tm-compose-modal.tm-compose-gmail .tm-resize-left{left:0!important;top:46px!important;bottom:0!important;width:26px!important;cursor:ew-resize!important;background:linear-gradient(90deg, rgba(37,99,235,.10), transparent)!important;}
body > .tm-compose-modal.tm-compose-gmail .tm-resize-left::after{content:"";position:absolute;left:8px;top:50%;width:5px;height:92px;transform:translateY(-50%);border-radius:999px;background:rgba(37,99,235,.55);}
body > .tm-compose-modal.tm-compose-gmail .tm-resize-top{left:26px!important;right:26px!important;top:0!important;height:18px!important;cursor:ns-resize!important;}
body > .tm-compose-modal.tm-compose-gmail .tm-resize-top::after{content:"";position:absolute;left:50%;top:6px;width:90px;height:5px;transform:translateX(-50%);border-radius:999px;background:rgba(37,99,235,.32);}
body > .tm-compose-modal.tm-compose-gmail .tm-resize-top-left{left:0!important;top:0!important;width:34px!important;height:34px!important;cursor:nwse-resize!important;}
body > .tm-compose-modal.tm-compose-gmail .tm-resize-right{right:0!important;top:46px!important;bottom:0!important;width:14px!important;cursor:ew-resize!important;}
body > .tm-compose-modal.tm-compose-gmail .tm-resize-bottom{left:24px!important;right:24px!important;bottom:0!important;height:14px!important;cursor:ns-resize!important;}
body > .tm-compose-modal.tm-compose-gmail .tm-resize-bottom-right{right:0!important;bottom:0!important;width:28px!important;height:28px!important;cursor:nwse-resize!important;}
body.tm-compose-resizing, body.tm-compose-resizing *{user-select:none!important;}
.tm-compose-status{font-size:12px;color:#64748b;margin-left:12px;font-weight:600;}
.tm-draft-resume i{color:#7c3aed!important;}
@media(max-width:760px){body > .tm-compose-modal.tm-compose-gmail{left:8px!important;right:8px!important;bottom:0!important;width:auto!important;min-width:0!important;height:calc(100vh - 86px)!important;}body > .tm-compose-modal.tm-compose-gmail .tm-compose-resize-handle{display:none!important;}}

/* Torobyte Mail v62 - compositor siempre visible y redimensionable */
body > .tm-compose-modal.tm-compose-rescue,
body > .tm-compose-modal.tm-compose-gmail{
  position:fixed!important;
  display:flex!important;
  flex-direction:column!important;
  visibility:visible!important;
  opacity:1!important;
  z-index:90000!important;
  overflow:hidden!important;
  min-width:430px!important;
  min-height:330px!important;
  max-width:calc(100vw - 16px)!important;
  max-height:calc(100vh - 16px)!important;
}
body > .tm-compose-modal.tm-compose-rescue:not(.is-manual-size){
  right:24px!important;
  bottom:0!important;
  left:auto!important;
  top:auto!important;
  width:680px!important;
  height:min(650px, calc(100vh - 80px))!important;
}
body > .tm-compose-modal.tm-compose-rescue .tm-compose-resize-handle,
body > .tm-compose-modal.tm-compose-gmail .tm-compose-resize-handle{
  position:absolute!important;
  display:block!important;
  z-index:91000!important;
  pointer-events:auto!important;
  touch-action:none!important;
  background:transparent!important;
}
body > .tm-compose-modal.tm-compose-rescue .tm-resize-left,
body > .tm-compose-modal.tm-compose-gmail .tm-resize-left{left:0!important;top:44px!important;bottom:0!important;width:28px!important;cursor:ew-resize!important;background:linear-gradient(90deg,rgba(37,99,235,.12),transparent)!important;}
body > .tm-compose-modal.tm-compose-rescue .tm-resize-left:after,
body > .tm-compose-modal.tm-compose-gmail .tm-resize-left:after{content:"";position:absolute;left:9px;top:50%;width:5px;height:96px;transform:translateY(-50%);border-radius:999px;background:rgba(37,99,235,.65);}
body > .tm-compose-modal.tm-compose-rescue .tm-resize-top,
body > .tm-compose-modal.tm-compose-gmail .tm-resize-top{left:28px!important;right:28px!important;top:0!important;height:18px!important;cursor:ns-resize!important;}
body > .tm-compose-modal.tm-compose-rescue .tm-resize-top-left,
body > .tm-compose-modal.tm-compose-gmail .tm-resize-top-left{left:0!important;top:0!important;width:34px!important;height:34px!important;cursor:nwse-resize!important;}
body > .tm-compose-modal.tm-compose-rescue .tm-resize-right,
body > .tm-compose-modal.tm-compose-gmail .tm-resize-right{right:0!important;top:44px!important;bottom:0!important;width:14px!important;cursor:ew-resize!important;}
body > .tm-compose-modal.tm-compose-rescue .tm-resize-bottom,
body > .tm-compose-modal.tm-compose-gmail .tm-resize-bottom{left:28px!important;right:28px!important;bottom:0!important;height:14px!important;cursor:ns-resize!important;}
body > .tm-compose-modal.tm-compose-rescue .tm-resize-bottom-right,
body > .tm-compose-modal.tm-compose-gmail .tm-resize-bottom-right{right:0!important;bottom:0!important;width:30px!important;height:30px!important;cursor:nwse-resize!important;}
body.tm-compose-resizing{user-select:none!important;cursor:grabbing!important;}
@media(max-width:760px){body > .tm-compose-modal.tm-compose-rescue,body > .tm-compose-modal.tm-compose-gmail{left:8px!important;right:8px!important;bottom:0!important;top:auto!important;width:auto!important;min-width:0!important;height:calc(100vh - 86px)!important;}body > .tm-compose-modal.tm-compose-rescue .tm-compose-resize-handle,body > .tm-compose-modal.tm-compose-gmail .tm-compose-resize-handle{display:none!important;}}
