/* ═══════════════════════════════════════════════════════════════
   Trimble Tools — "Trimble Access" Theme
   Matches the Trimble Access desktop/tablet UI exactly:
   Dark navy sidebar + toolbar, light content area,
   yellow/gold accent icons, bright blue action buttons
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Design Tokens ──────────────────────────────────────────── */
:root {
    /* Primary navy — sidebar, toolbar, bottom bar */
    --navy:          #0a2d4d;
    --navy-light:    #133d63;
    --navy-lighter:  #1a5276;
    --navy-darkest:  #061e35;

    /* Content area — light grey background */
    --bg:            #e8ecf0;
    --surface:       #ffffff;
    --surface-2:     #f4f6f8;
    --surface-3:     #edf0f3;
    --line:          #d1d5db;
    --line-strong:   #b8c0cc;

    /* Text — on light backgrounds */
    --text:          #1e2330;
    --text-bright:   #0f1419;
    --muted:         #4a5568;
    --dim:           #6b7280;

    /* Text — on dark backgrounds (sidebar/header) */
    --text-on-dark:  #ffffff;
    --text-on-dark-muted: #b8cce0;
    --text-on-dark-dim:   #7a96b4;

    /* Trimble Blue — primary actions, active states (official: Trimble Access #0063a3) */
    --brand:         #0063a3;
    --brand-light:   rgba(0,99,163,0.14);
    --brand-h:       #004f83;
    --brand-glow:    rgba(0,99,163,0.30);

    /* Trimble Yellow — icons, stars, section labels on dark (official #fbad26) */
    --accent:        #fbad26;
    --accent-warm:   #e49325;
    --accent-light:  rgba(251,173,38,0.14);
    --accent-on-dark: #fbad26;

    /* Status */
    --danger:        #e74c3c;
    --danger-light:  rgba(231,76,60,0.10);
    --ok:            #27ae60;
    --ok-light:      rgba(39,174,96,0.10);
    --info:          #0063a3;
    --info-light:    rgba(0,99,163,0.10);

    /* Radii */
    --r:             6px;
    --r-lg:          8px;
    --r-pill:        999px;

    /* Shadows — lighter for light theme */
    --shadow:        0 2px 12px rgba(0,0,0,0.10), 0 8px 24px rgba(0,0,0,0.08);
    --shadow-sm:     0 1px 4px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
    --shadow-card:   0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);

    /* Typography */
    --mono:          'Consolas', 'JetBrains Mono', 'Courier New', monospace;
    --sans:          'Segoe UI', system-ui, -apple-system, sans-serif;

    /* Motion tokens */
    --dur-micro:     140ms;
    --dur-tooltip:   180ms;
    --dur-panel:     250ms;
    --dur-expand:    200ms;
    --dur-toast:     220ms;
    --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out:   cubic-bezier(0.45, 0, 0.55, 1);

    /* Layout */
    --sidebar-w:     290px;
    --header-h:      52px;
}


/* ── 2. Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--sans);
    font-size: 13px;
    line-height: 1.5;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-h); }


/* ── 3. Scrollbars — dark theme for sidebar context ───────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.30); }

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.18) transparent;
}

/* Light scrollbars for content areas */
.light-scroll::-webkit-scrollbar-thumb {
    background: var(--line-strong);
}
.light-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}


/* ── 4. Header / Topbar — Trimble Access dark navy toolbar ───── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 300;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--navy);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-mark {
    width: 34px;
    height: 30px;
    border-radius: var(--r);
    background: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    color: #fff;
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: -0.05em;
    flex-shrink: 0;
}

.brand-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-on-dark);
    letter-spacing: -0.02em;
}
.brand-name em {
    font-style: normal;
    color: var(--accent-on-dark);
}

.header-badge {
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(0,99,163,0.15);
    color: var(--accent-on-dark);
    border: 1px solid rgba(240,196,0,0.25);
    border-radius: var(--r-pill);
    padding: 2px 9px;
    margin-left: 8px;
}

.header-logout {
    font-size: 0.75rem;
    color: var(--text-on-dark-muted);
    text-decoration: none;
    padding: 5px 11px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--r);
    background: rgba(255,255,255,0.06);
    transition: all 0.15s;
}
.header-logout:hover {
    color: var(--text-on-dark);
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
}


/* ── 5. Layout ─────────────────────────────────────────────────── */
#container {
    display: flex;
    flex: 1;
    height: 100%;
    overflow: hidden;
}

#sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    height: 100%;
    overflow-y: auto;
    background: var(--navy);
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    color: var(--text-on-dark);
}

#map {
    flex: 1;
    height: 100%;
    position: relative;
    background: var(--bg);
}


/* ── 6. Tool Tabs ──────────────────────────────────────────────── */
.tool-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 11px 4px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-on-dark-dim);
    cursor: pointer;
    font-size: 11px;
    font-family: var(--sans);
    transition: all 0.15s;
    line-height: 1.2;
}
.tool-tab svg { width: 22px; height: 22px; }
.tool-tab:hover {
    color: var(--text-on-dark);
    background: rgba(255,255,255,0.05);
}
.tool-tab.active {
    color: var(--accent-on-dark);
    border-bottom-color: var(--accent);
    font-weight: 600;
}


/* ── 7. Sections — dark sidebar sections ──────────────────────── */
.section {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.section-label {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--accent-on-dark);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.12);
}


/* ── 8. Inputs — on dark sidebar ──────────────────────────────── */
input[type="text"],
input[type="url"],
input[type="search"],
input[type="number"],
textarea,
select {
    width: 100%;
    background: var(--navy-light);
    color: var(--text-on-dark);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--r);
    padding: 6px 9px;
    font-size: 12px;
    font-family: var(--sans);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: var(--brand);
    background: var(--navy-darkest);
    box-shadow: 0 0 0 2px var(--brand-glow);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-on-dark-dim);
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--brand);
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    cursor: pointer;
}

textarea {
    resize: vertical;
    min-height: 60px;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%23b8cce0' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 26px;
}


/* ── 9. Buttons ────────────────────────────────────────────────── */
button {
    background: rgba(255,255,255,0.08);
    color: var(--text-on-dark-muted);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--r);
    padding: 6px 12px;
    font-size: 12px;
    font-family: var(--sans);
    cursor: pointer;
    transition: background var(--dur-micro) var(--ease-out),
                border-color var(--dur-micro) var(--ease-out),
                color var(--dur-micro) var(--ease-out),
                box-shadow var(--dur-micro) var(--ease-out),
                transform var(--dur-micro) var(--ease-out);
}
button:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.22);
    color: var(--text-on-dark);
}
button:active {
    transform: scale(0.97);
}

.btn-primary {
    width: 100%;
    background: var(--brand);
    color: #ffffff;
    border-color: var(--brand);
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-top: 7px;
}
.btn-primary:hover {
    background: var(--brand-h);
    border-color: var(--brand-h);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(0,99,163,0.25);
}

.btn-secondary {
    width: 100%;
    background: rgba(255,255,255,0.06);
    color: var(--text-on-dark-muted);
    border-color: rgba(255,255,255,0.15);
    margin-top: 4px;
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(0,99,163,0.35);
    color: var(--text-on-dark);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: rgba(231,76,60,0.35);
}
.btn-danger:hover {
    background: var(--danger-light);
    border-color: var(--danger);
    color: #f87171;
}

.btn-sm {
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 4px;
}


/* ── 10. Status Indicator ──────────────────────────────────────── */
#status,
.status-bar {
    font-size: 11px;
    padding: 5px 8px;
    margin-top: 8px;
    border-left: 2px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.04);
    border-radius: 0 4px 4px 0;
    min-height: 1.6em;
    color: var(--text-on-dark-muted);
    word-break: break-all;
    line-height: 1.45;
}

#status.ok, .status-bar.ok {
    border-color: var(--ok);
    color: #5ec49a;
    background: rgba(39,174,96,0.10);
}
#status.error, .status-bar.error {
    border-color: var(--danger);
    color: #f87171;
    background: rgba(231,76,60,0.10);
}
#status.info, .status-bar.info {
    border-color: var(--accent);
    color: var(--accent-on-dark);
    background: rgba(240,196,0,0.08);
}


/* ── 11. Layer List ────────────────────────────────────────────── */
#layerList,
.layer-list {
    overflow-y: auto;
    margin-top: 6px;
    min-height: 0;
    flex: 1;
}

.layer-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 5px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: background 0.1s;
}
.layer-row:hover {
    background: rgba(255,255,255,0.06);
}
.layer-row label {
    flex: 1;
    cursor: pointer;
    font-size: 11.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-on-dark-muted);
}
.layer-row:hover label {
    color: var(--text-on-dark);
}

.layer-row--active {
    background: rgba(0,99,163,0.12) !important;
    border-color: rgba(0,99,163,0.25);
}
.layer-row--active label {
    color: #4da6d9;
    font-weight: 500;
}

.layer-row--loading {
    opacity: 0.55;
}
.layer-row--loading .load-btn::after { content: '\2026'; }


/* ── 12. Row Action Buttons ────────────────────────────────────── */
.zoom-btn,
.load-btn {
    padding: 2px 7px;
    margin: 0;
    font-size: 11px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 4px;
}

.zoom-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-on-dark-dim);
}
.zoom-btn:hover:not(:disabled) {
    border-color: var(--brand);
    color: var(--brand);
    background: rgba(0,99,163,0.10);
}
.zoom-btn:disabled {
    opacity: 0.25;
    cursor: default;
}

.load-btn {
    background: var(--brand);
    color: #ffffff;
    border: 1px solid var(--brand);
    min-width: 3.5em;
    text-align: center;
    font-weight: 600;
}
.load-btn:hover {
    background: var(--brand-h);
    border-color: var(--brand-h);
}

.load-btn--remove {
    background: transparent;
    color: var(--danger);
    border-color: rgba(231,76,60,0.35);
}
.load-btn--remove:hover {
    background: var(--danger-light);
    border-color: var(--danger);
}


/* ── 13. Filter Controls ───────────────────────────────────────── */
.filter-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-on-dark-muted);
    margin-top: 6px;
    cursor: pointer;
    user-select: none;
}
.filter-check:hover { color: var(--text-on-dark); }


/* ── 14. EPSG List ─────────────────────────────────────────────── */
#epsgList,
.epsg-list {
    overflow-y: auto;
    margin-top: 6px;
    min-height: 0;
    flex: 1;
}

.epsg-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 3px 5px;
    border-radius: 3px;
}
.epsg-item:hover { background: rgba(255,255,255,0.06); }
.epsg-item label {
    font-size: 11.5px;
    color: var(--text-on-dark-muted);
    cursor: pointer;
    font-family: var(--mono);
}
.epsg-item:hover label { color: var(--text-on-dark); }


/* ── 15. Export Preview ────────────────────────────────────────── */
#exportPreview,
.export-preview {
    background: var(--navy-darkest);
    color: var(--text-on-dark-muted);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 10.5px;
    resize: vertical;
    margin-top: 8px;
    min-height: 80px;
    padding: 8px;
}
#exportPreview:focus,
.export-preview:focus {
    border-color: var(--brand);
    color: var(--text-on-dark);
    box-shadow: 0 0 0 2px var(--brand-glow);
}


/* ── 16. Shape Tool Selection Grid ─────────────────────────────── */
.shp-sel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5px;
    margin-top: 4px;
}

.shp-sel-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: var(--r-lg);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-on-dark-muted);
    font-size: 10px;
    font-family: var(--sans);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.shp-sel-btn svg { width: 22px; height: 22px; }
.shp-sel-btn:hover {
    background: rgba(0,99,163,0.10);
    color: var(--brand);
    border-color: rgba(0,99,163,0.30);
}
.shp-sel-btn.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}


/* ── 17. Map Overlays ──────────────────────────────────────────── */
#mapLoading,
.map-loading {
    display: none;
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(10,45,77,0.92);
    color: var(--accent-on-dark);
    border: 1px solid rgba(240,196,0,0.30);
    padding: 7px 20px;
    border-radius: 20px;
    font-size: 12px;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
#mapLoading.visible,
.map-loading.visible { display: block; }

.zoom-indicator {
    position: absolute;
    bottom: 24px;
    right: 8px;
    z-index: 1000;
    background: rgba(255,255,255,0.90);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    font-family: var(--mono);
    color: var(--muted);
    pointer-events: none;
}


/* ── 18. CORS Helper Box ───────────────────────────────────────── */
#corsHelper,
.cors-helper {
    margin-top: 8px;
    padding: 10px;
    border: 1px solid rgba(240,196,0,0.30);
    border-radius: var(--r-lg);
    background: rgba(240,196,0,0.06);
    font-size: 0.82em;
    color: var(--accent-on-dark);
    line-height: 1.5;
}


/* ── 19. Counters & Metadata Text ──────────────────────────────── */
.counter-text,
#layerCounter,
#epsgCounter {
    font-size: 10.5px;
    color: var(--text-on-dark-dim);
    margin: 4px 0 2px;
    min-height: 1.3em;
    flex-shrink: 0;
}


/* ── 20. Result Section ────────────────────────────────────────── */
.result-info {
    font-size: 12px;
    margin-bottom: 10px;
    color: var(--text-on-dark);
}


/* ── 21. Badges & Tags ─────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--r-pill);
    letter-spacing: 0.02em;
}
.badge--brand {
    background: var(--brand-light);
    color: var(--brand);
    border: 1px solid rgba(0,99,163,0.25);
}
.badge--accent {
    background: var(--accent-light);
    color: var(--accent-warm);
    border: 1px solid rgba(240,196,0,0.25);
}
.badge--danger {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(231,76,60,0.25);
}
.badge--muted {
    background: rgba(255,255,255,0.06);
    color: var(--text-on-dark-muted);
    border: 1px solid rgba(255,255,255,0.12);
}


/* ── 22. Tooltips ──────────────────────────────────────────────── */
[data-tooltip] {
    position: relative;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--navy-darkest);
    color: var(--text-on-dark);
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    box-shadow: var(--shadow-sm);
    z-index: 500;
}
[data-tooltip]:hover::after { opacity: 1; }


/* ── 23. Leaflet Overrides (light basemap context) ──────────────── */
.leaflet-control-zoom a {
    background: var(--surface) !important;
    color: var(--text) !important;
    border-color: var(--line) !important;
}
.leaflet-control-zoom a:hover {
    background: var(--surface-2) !important;
    color: var(--brand) !important;
}

.leaflet-control-attribution {
    background: rgba(255,255,255,0.85) !important;
    color: var(--dim) !important;
    font-size: 10px !important;
}
.leaflet-control-attribution a {
    color: var(--muted) !important;
}

.leaflet-popup-content-wrapper {
    background: var(--surface) !important;
    color: var(--text) !important;
    border-radius: var(--r-lg) !important;
    box-shadow: var(--shadow) !important;
}
.leaflet-popup-tip { background: var(--surface) !important; }


/* ── 24. Utility Classes ───────────────────────────────────────── */
.mono       { font-family: var(--mono); }
.text-brand { color: var(--brand); }
.text-muted { color: var(--muted); }
.text-dim   { color: var(--dim); }
.text-ok    { color: var(--ok); }
.text-warn  { color: var(--accent); }
.text-danger{ color: var(--danger); }
.bg-surface { background: var(--surface); }
.bg-surface2{ background: var(--surface-2); }
.fw-600     { font-weight: 600; }
.gap-4      { gap: 4px; }
.gap-8      { gap: 8px; }
.mt-4       { margin-top: 4px; }
.mt-8       { margin-top: 8px; }
.w-full     { width: 100%; }
.flex-1     { flex: 1; }
.truncate   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* ── 25. Animation Recipes ─────────────────────────────────────── */
@keyframes tt-popover-in {
    from { opacity: 0; transform: translateY(6px) scale(0.93); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes tt-tooltip-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes tt-slide-right {
    from { opacity: 0.98; transform: translateX(24px); }
    to   { opacity: 1;    transform: translateX(0); }
}
@keyframes tt-slide-left {
    from { opacity: 0.98; transform: translateX(-24px); }
    to   { opacity: 1;    transform: translateX(0); }
}
@keyframes tt-slide-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes tt-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes tt-pulse-soft {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.6; }
}

/* Recipe classes */
.anim-popover  { animation: tt-popover-in var(--dur-tooltip) var(--ease-out) both; }
.anim-tooltip  { animation: tt-tooltip-in var(--dur-tooltip) var(--ease-out) both; }
.anim-panel-r  { animation: tt-slide-right var(--dur-panel) var(--ease-out) both; }
.anim-panel-l  { animation: tt-slide-left  var(--dur-panel) var(--ease-out) both; }
.anim-toast    { animation: tt-slide-up    var(--dur-toast) var(--ease-out) both; }
.anim-fade     { animation: tt-fade-in     var(--dur-expand) var(--ease-out) both; }
.anim-pulse    { animation: tt-pulse-soft  1.8s var(--ease-in-out) infinite; }


/* ── 26. Reduced Motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* ═══════════════════════════════════════════════════════════════
   27. INDEX PAGE — Trimble Access "Favorites" Tile Grid
   ═══════════════════════════════════════════════════════════════ */

.ta-favorites {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-h, 52px));
    padding: 48px 24px;
    background: var(--bg);
}

.ta-favorites__title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--text);
}

.ta-favorites__subtitle {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0 0 32px;
}

.ta-favorites__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 200px));
    gap: 16px;
    justify-content: center;
    width: 100%;
    max-width: 640px;
}

.ta-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 28px 20px 24px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow-card);
    transition: transform var(--dur-micro) var(--ease-out),
                box-shadow var(--dur-micro) var(--ease-out),
                border-color var(--dur-micro) var(--ease-out);
    cursor: pointer;
}

.ta-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--brand);
}

.ta-tile:active {
    transform: scale(0.97);
}

.ta-tile__badge {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: grid;
    place-items: center;
    line-height: 1;
}

.ta-tile__icon {
    width: 40px;
    height: 40px;
    color: var(--accent-warm);
    filter: drop-shadow(0 1px 2px rgba(230,184,0,0.25));
}

.ta-tile__label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--navy);
    text-align: center;
}

.ta-tile__desc {
    font-size: 0.78rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.4;
    margin-top: -4px;
}


/* ═══════════════════════════════════════════════════════════════
   28. Bottom Bar (Trimble Access style)
   ═══════════════════════════════════════════════════════════════ */

.ta-bottom-bar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    background: var(--navy);
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.ta-bottom-bar button {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.10);
    color: var(--text-on-dark-muted);
    padding: 5px 14px;
    font-size: 11px;
    border-radius: 4px;
}

.ta-bottom-bar button:hover {
    background: rgba(255,255,255,0.10);
    color: var(--text-on-dark);
}


/* ═══════════════════════════════════════════════════════════════
   29. Project/Job info bar (like "Project: Geoteam" in sidebar)
   ═══════════════════════════════════════════════════════════════ */

.ta-project-info {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 11px;
    color: var(--text-on-dark-dim);
    background: var(--navy-darkest);
}

.ta-project-info strong {
    color: var(--text-on-dark);
    font-weight: 600;
}

/* ─── Trademark-note i header ──────────────────────────────────────────────
   Trimble er registreret varemærke. Værktøjssiderne må ikke kunne læses som
   Trimble-officielle — derfor et fast forbehold i headeren med link til det
   fulde varsel på forsiden. margin-left:auto vinder over space-between, så
   brand/badge bliver liggende hvor de er.                                   */
.tt-legal-note {
    margin-left: auto;
    font-size: 10.5px;
    line-height: 1.3;
    letter-spacing: .01em;
    white-space: nowrap;
    color: rgba(255,255,255,.42);
    text-decoration: none;
}
.tt-legal-note:hover {
    color: rgba(255,255,255,.75);
    text-decoration: underline;
}
@media (max-width: 900px) { .tt-legal-note { display: none; } }
