.tm { --tm-border:#e4e4e7; --tm-muted:#71717a; --tm-text:#18181b; color:var(--tm-text); font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; padding-bottom:56px; }
.tm * { box-sizing:border-box; }
.tm [hidden] { display:none!important; }
.tm :is(button,input,textarea,select) { font:inherit; }
.tm :is(button,a,input,textarea,select,summary):focus-visible { outline:3px solid #93b8f4; outline-offset:3px; }
.tm a { color:inherit; }
.tm-intro { display:flex; justify-content:space-between; align-items:flex-end; gap:24px; padding:22px 0 30px; }
.tm-eyebrow { font-size:11px; letter-spacing:1.6px; font-weight:700; color:var(--tm-muted); }
.tm h1 { font-size:38px; line-height:1.16; letter-spacing:-1.3px; margin:10px 0; font-weight:650; }
.tm-intro h1 { margin-top:0; }
.tm-intro p { max-width:690px; color:var(--tm-muted); font-size:16px; line-height:1.6; }
.tm-intro>a { white-space:nowrap; font-size:13px; padding-bottom:4px; }
.tm-workspace { display:grid; grid-template-columns:365px minmax(0,1fr); align-items:start; gap:20px; }
.tm-card { min-width:0; border:1px solid var(--tm-border); border-radius:12px; background:#fff; box-shadow:0 1px 3px #00000008; }
.tm-section { padding:22px; }
.tm h2 { font-size:18px; line-height:1.35; font-weight:650; letter-spacing:-.35px; margin:0; }
.tm-section p { color:var(--tm-muted); font-size:12px; line-height:1.6; margin:7px 0 0; }
.tm-territory-list { display:grid; gap:12px; margin:18px 0 12px; }
.tm-territory { padding:14px; border:1px solid var(--tm-border); border-radius:9px; background:#fff; }
.tm-territory.tm-active { border-color:#93b8f4; box-shadow:0 0 0 2px #dbeafe; }
.tm-activate { width:17px; height:17px; margin:0 0 10px; align-self:end; accent-color:#2563eb; cursor:pointer; }
.tm-count { color:var(--tm-muted); font-size:12px; white-space:nowrap; }
.tm-territory-fields { display:grid; grid-template-columns:24px minmax(0,1fr) 72px; gap:12px 8px; }
.tm-territory-fields label { display:grid; gap:5px; min-width:0; font-size:11px; font-weight:600; color:#52525b; }
.tm-territory-fields .tm-details-field { grid-column:2 / -1; }
.tm-territory-fields input[type=text],.tm-territory-fields textarea { width:100%; min-width:0; border:1px solid #d4d4d8; border-radius:6px; background:#fff; color:#18181b; padding:9px 10px; font-size:13px; font-weight:400; }
.tm-territory-fields textarea { resize:vertical; min-height:92px; line-height:1.5; }
.tm-territory-fields input[type=color] { width:100%; height:38px; border:1px solid #d4d4d8; border-radius:6px; background:#fff; padding:3px; cursor:pointer; }
.tm-territory-footer { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:11px 0 0 32px; }
.tm-delete { color:#a33636!important; }
.tm-button { display:inline-flex; justify-content:center; align-items:center; gap:7px; border:1px solid var(--tm-border); border-radius:6px; background:#fff; padding:10px 13px; color:#27272a; cursor:pointer; font-size:13px!important; font-weight:600!important; text-decoration:none; }
.tm-button:hover:not(:disabled) { background:#f4f4f5; }
.tm-button:disabled { opacity:.55; cursor:default; }
.tm-add { width:100%; border-style:dashed; }
.tm-primary { background:#18181b; color:#fff; border-color:#18181b; }
.tm-primary:hover:not(:disabled) { background:#3f3f46; }
.tm-text-button { border:0; background:transparent; color:var(--tm-muted); padding:5px 0; cursor:pointer; font-size:12px!important; }
.tm-text-button:hover:not(:disabled) { color:#18181b; }
.tm-text-button:disabled { opacity:.5; cursor:default; }
.tm-legend { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px 18px; margin:5px 24px 20px; }
.tm-legend-row { display:flex; align-items:center; gap:9px; min-width:0; font-size:13px; line-height:1.4; }
.tm-legend-row span:nth-child(2) { overflow-wrap:anywhere; }
.tm-legend-swatch { width:17px; height:17px; flex:none; border:1px solid #0002; border-radius:4px; }
.tm-result-head { display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:15px; padding:22px 24px 17px; }
.tm-result-head p { margin:5px 0 0; color:var(--tm-muted); font-size:13px; }
.tm-result-head p strong { color:#18181b; }
.tm-result-actions { display:flex; flex-direction:column; align-items:flex-end; gap:8px; }
.tm-result-actions a { font-size:12px; color:#52525b; }
.tm-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; border-top:1px solid #f4f4f5; border-bottom:1px solid #f4f4f5; padding:10px 24px; }
.tm-toolbar p { margin:0; color:#52525b; font-size:12px; line-height:1.5; }
.tm-toolbar button { white-space:nowrap; }
.tm-map-stage { padding:10px 20px 0; min-height:320px; display:flex; align-items:center; justify-content:center; }
#territory-map { width:100%; max-width:690px; position:relative; }
#territory-map svg path { cursor:pointer; }
#territory-map .fm-tooltip { min-width:0; pointer-events:none; }
#territory-map.tm-unassigned-hover .fm-tooltip { display:none!important; }
#territory-map .fm-tooltip-frame { max-width:290px; border:1px solid var(--tm-border); border-radius:7px; box-shadow:0 3px 12px #0002; padding:0px 0px; }
#territory-map .fm-tooltip-name { font:600 14px/1.4 Inter,Arial,sans-serif; color:#18181b; }
#territory-map .fm-tooltip-comment { font:13px/1.5 Inter,Arial,sans-serif; color:#52525b; overflow-wrap:anywhere; }
.tm-settings-export { border-top:1px solid #bfdbfe; background:#eff6ff; padding:26px 24px 28px; scroll-margin-top:100px; }
.tm-settings-export h2 { margin-bottom:7px; }
.tm-settings-export p { color:#475569; line-height:1.6; font-size:13px; margin:0; }
.tm-settings-export .tm-export-intro { max-width:680px; }
.tm-export-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin-top:20px; }
.tm-export-option { display:flex; flex-direction:column; align-items:flex-start; min-width:0; padding-left:14px; border-left:2px solid #bfdbfe; }
.tm-export-option h3 { margin:0 0 5px; font-size:15px; line-height:1.4; font-weight:650; }
.tm-export-option p { flex:1; margin-bottom:8px; }
.tm-export-option a { color:#1d4ed8; text-decoration:underline; font-size:13px; line-height:1.5; }
.tm-export-option .tm-button { margin-top:15px; }
.tm-legend-note { margin-top:22px; padding-top:17px; border-top:1px solid #bfdbfe; }
.tm-legend-note p { max-width:740px; }
.tm-legend-note a { display:inline-block; margin-top:8px; color:#1d4ed8; font-size:13px; font-weight:600; text-decoration:underline; }
.tm-message { margin:13px 24px; border:1px solid #bfdbfe; border-radius:7px; background:#eff6ff; padding:10px 13px; color:#1e40af; font-size:13px; }
.tm-message a { margin-left:4px; }
.tm-settings-export .tm-message { margin:13px 0 0; }
.tm-guide { display:grid; grid-template-columns:1fr 1.3fr; gap:42px; margin:40px 0 30px; padding:30px; background:#fafafa; border:1px solid var(--tm-border); border-radius:12px; }
.tm-guide h2 { font-size:26px; margin-top:9px; }
.tm-guide ol { display:grid; gap:16px; margin:0; padding-left:22px; }
.tm-guide li { padding-left:6px; font-size:13px; }
.tm-guide li p { color:var(--tm-muted); margin:4px 0 0; line-height:1.6; }
.tm-faq { margin-bottom:34px; }
.tm-faq h2 { margin-bottom:8px; }
.tm-faq details { border-bottom:1px solid var(--tm-border); padding:15px 0; }
.tm-faq summary { font-size:14px; cursor:pointer; }
.tm-faq p { max-width:900px; color:var(--tm-muted); line-height:1.7; font-size:13px; }
.tm-related { display:flex; justify-content:space-between; align-items:center; gap:25px; border-top:1px solid var(--tm-border); padding:25px 0; }
.tm-related p { color:var(--tm-muted); font-size:13px; margin:5px 0 0; }
.tm-related-links { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:10px 20px; }
.tm-related-links a { white-space:nowrap; color:#1d4ed8; font-size:13px; font-weight:600; text-decoration:underline; }
.tm-confirm-dialog { width:min(420px,calc(100% - 32px)); max-width:none; border:1px solid var(--tm-border); border-radius:12px; background:#fff; color:var(--tm-text); padding:24px; box-shadow:0 20px 55px #0003; }
.tm-confirm-dialog::backdrop { background:#18181b88; }
.tm-confirm-dialog h2 { margin:0 0 9px; font-size:20px; }
.tm-confirm-dialog p { margin:0; color:#52525b; font-size:14px; line-height:1.6; }
.tm-confirm-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; margin-top:23px; }
.tm-danger { background:#b91c1c; color:#fff; border-color:#b91c1c; }
.tm-danger:hover:not(:disabled) { background:#991b1b; }
@media(min-width:1300px) { .tm.container { max-width:1280px; } }
@media(max-width:1000px) { .tm-workspace { grid-template-columns:310px minmax(0,1fr); gap:14px; } .tm-map-stage { min-height:280px; padding:10px 8px 0; } .tm-legend { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) { .tm-intro { flex-direction:column; align-items:flex-start; gap:9px; } .tm h1 { font-size:30px; } .tm-intro p { font-size:14px; } .tm-workspace { grid-template-columns:1fr; } .tm-section { padding:19px; } .tm-result-head { padding:20px; } .tm-result-actions { align-items:flex-start; } .tm-toolbar { padding:10px 20px; } .tm-map-stage { min-height:0; } .tm-legend { margin:5px 20px 18px; } .tm-settings-export { padding:20px; } .tm-export-options { grid-template-columns:1fr; gap:22px; } .tm-guide { grid-template-columns:1fr; gap:18px; padding:23px; } .tm-guide h2 { font-size:23px; } .tm-related { align-items:flex-start; flex-direction:column; } .tm-related-links { justify-content:flex-start; } .tm-territory-fields input[type=text],.tm-territory-fields textarea { font-size:16px; } }
