/* Bodek Tools. Navbar, logo, avatar, button and dropdown rules follow the other Bodek apps (dev/files style.css). */
:root { --bt-accent: #0d6efd; --bt-radius: 14px; }
[data-bs-theme="dark"] { --bt-bg: #121212; --bt-surface: #1e1e1e; --bt-surface-2: #252525; --bt-border: #2f2f33; --bt-muted: #a3a3aa; --bs-body-bg: #121212; --bs-body-color: #e0e0e0; }
[data-bs-theme="light"] { --bt-bg: #f4f6fa; --bt-surface: #ffffff; --bt-surface-2: #f6f7f9; --bt-border: #e3e6ea; --bt-muted: #5f6570; --bs-body-bg: #f4f6fa; --bs-body-color: #1a1a1a; }

html, body { min-height: 100%; }
body { background-color: var(--bt-bg); color: var(--bs-body-color); display: flex; flex-direction: column; min-height: 100vh; -webkit-font-smoothing: antialiased; }
main { flex: 1 0 auto; }
a { color: #4d9bff; }
[data-bs-theme="light"] a { color: #0b5ed7; }
.text-secondary { color: var(--bt-muted) !important; }
.bt-skip-link { position: absolute; left: 1rem; top: .5rem; z-index: 1100; background: var(--bt-surface); padding: .4rem .7rem; border-radius: 8px; }

/* ---- Navbar (same as the other Bodek apps) */
.bf-navbar { background-color: #1e1e1e; border-bottom: 1px solid #333; position: sticky; top: 0; z-index: 1030; padding-top: 12px; padding-bottom: 12px; min-height: 70px; }
.bf-navbar .navbar-brand, .bf-navbar .dropdown-toggle { color: #e0e0e0; }
.bf-navbar .navbar-brand { padding-top: 0; padding-bottom: 0; flex-shrink: 1; min-width: 0; }
.bf-logo { height: 44px; width: auto; max-height: 100%; display: block; }
.bf-logo-light { display: none; }
.bf-avatar-initial { display: inline-block; text-align: center; background: #0d6efd; color: #fff; border-radius: 50%; font-weight: 600; }
.bf-navbar .bf-usermenu { color: inherit; text-decoration: none; }
[data-bs-theme="light"] .bf-navbar { background-color: #fff; border-bottom: 1px solid #e3e6ea; }
[data-bs-theme="light"] .bf-navbar .navbar-brand, [data-bs-theme="light"] .bf-navbar .dropdown-toggle { color: #1a1a1a; }
[data-bs-theme="light"] .bf-logo-dark { display: none; }
[data-bs-theme="light"] .bf-logo-light { display: inline; }
.bt-brand-sub { padding-left: .6rem; border-left: 1px solid var(--bt-border); color: var(--bt-muted); }
.bt-navlink { color: var(--bs-body-color); opacity: .85; }
.bt-navlink:hover, .bt-navlink.active { opacity: 1; color: var(--bs-body-color); }
@media (max-width: 767px) {
    .bf-navbar { padding: 6px 10px !important; min-height: 60px; }
    .bf-logo { height: 32px !important; max-width: 150px; object-fit: contain; }
    .bf-navbar .container-fluid { flex-wrap: nowrap; }
}

/* Avatars (no inline styles: CSP forbids them) */
.bt-av { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.bt-av-24 { width: 24px; height: 24px; line-height: 24px; font-size: .8rem; }
.bt-av-32 { width: 32px; height: 32px; line-height: 32px; }
.bt-av-40 { width: 40px; height: 40px; line-height: 40px; font-size: 1.1rem; }
@media (max-width: 767px) { .bf-navbar .bt-av-32 { width: 28px; height: 28px; line-height: 28px; } }
.bt-usermenu-list { min-width: 280px; }
.bt-menu-label { letter-spacing: .06em; }

/* App switcher (same tiles as accounts) */
.bt-appgrid-btn { width: 36px; height: 36px; padding: 0 !important; display: inline-flex !important; align-items: center; justify-content: center; }
.bt-apps-menu { padding: 14px !important; min-width: 290px; }
.bt-apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bt-app-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 8px; border-radius: 12px; border: 1px solid transparent; color: var(--bs-body-color) !important; text-decoration: none; min-height: 96px; text-align: center; transition: background .12s, border-color .12s; }
.bt-app-tile:hover { background: rgba(125, 140, 160, .18); border-color: var(--bs-primary-border-subtle, #9ec5fe); }
.bt-app-tile-icon { width: 40px; height: 40px; border-radius: 8px; background: var(--bs-primary-bg-subtle); color: var(--bs-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.bt-app-tile-name { font-size: .85rem; font-weight: 500; line-height: 1.2; }

/* Buttons + dropdowns (from the shared Bodek style.css) */
.btn-solid, .btn-primary.btn-solid { background-color: var(--bt-accent); border-color: var(--bt-accent); color: #fff; }
.btn-solid:hover, .btn-primary.btn-solid:hover, .btn-solid:focus-visible { background-color: #0b5ed7; border-color: #0b5ed7; color: #fff; }
.btn-action { background: transparent !important; border: 1px solid transparent !important; border-radius: 999px !important; padding: 7px 12px !important; color: inherit; }
.btn-action:hover { background-color: rgba(125, 140, 160, .18) !important; color: inherit !important; }
.btn-action.text-danger:hover { background-color: rgba(220, 53, 69, .16) !important; color: #dc3545 !important; }
.btn-sm { padding: 4px 12px; font-size: .88rem; }
.dropdown-menu { border: none; border-radius: 14px; padding: 6px; box-shadow: 0 10px 32px rgba(0, 0, 0, .28); background-color: #252525; }
[data-bs-theme="light"] .dropdown-menu { background-color: #fff; box-shadow: 0 10px 32px rgba(15, 23, 42, .12); }
.dropdown-item { border-radius: 9px; padding: 8px 12px; transition: background-color .12s ease; }
.dropdown-item:hover, .dropdown-item:focus { background-color: rgba(125, 140, 160, .18); color: inherit; }
[data-bs-theme="light"] .dropdown-item:hover, [data-bs-theme="light"] .dropdown-item:focus { background-color: rgba(15, 23, 42, .06); color: #1a1a1a; }
.dropdown-divider { margin: 6px 4px; opacity: .35; }
.dropdown-toggle::after { margin-left: 6px; opacity: .6; }

/* Forms */
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select { background-color: var(--bt-surface-2); border-color: #3a3a3f; color: #e0e0e0; }
[data-bs-theme="dark"] .form-control:focus, [data-bs-theme="dark"] .form-select:focus { background-color: var(--bt-surface-2); color: #e0e0e0; }
.form-control-color { max-width: 3.2rem; padding: .3rem; }
.bt-colour .form-control.font-monospace { max-width: 7.5rem; }

/* Layout */
.bt-section { margin-top: 2rem; }
.bt-narrow { max-width: 860px; }
.bt-h2 { font-size: 1.05rem; font-weight: 600; margin-bottom: 1rem; }
.bt-card { background: var(--bt-surface); border: 1px solid var(--bt-border); border-radius: var(--bt-radius); }
.bt-card-title { font-weight: 600; margin-bottom: 1rem; }
@media (min-width: 992px) { .bt-sticky { position: sticky; top: 90px; } }

/* Home */
.bt-hero { padding: 3.5rem 0 2rem; text-align: center; background: radial-gradient(1200px 300px at 50% 0, rgba(13, 110, 253, .16), transparent); }
.bt-hero h1 { font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -.02em; }
.bt-hero-lead { max-width: 640px; margin: .5rem auto 0; font-size: 1.05rem; }
.bt-hero-search { position: relative; max-width: 480px; margin: 1.5rem auto 0; }
.bt-hero-search i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--bt-muted); }
.bt-hero-search input { width: 100%; padding: .7rem 1rem .7rem 2.6rem; border-radius: 12px; border: 1px solid var(--bt-border); background: var(--bt-surface); color: inherit; }
.bt-tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.bt-tool-card { display: flex; flex-direction: column; gap: .5rem; padding: 1.4rem; border-radius: var(--bt-radius); border: 1px solid var(--bt-border); background: var(--bt-surface); color: inherit !important; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.bt-tool-card:hover { border-color: var(--bt-accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.bt-tool-icon { width: 48px; height: 48px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; background: var(--bs-primary-bg-subtle); color: var(--bs-primary); }
.bt-tool-title { font-weight: 600; font-size: 1.1rem; }
.bt-tool-desc { color: var(--bt-muted); font-size: .93rem; flex: 1; }
.bt-tool-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.bt-tag { background: var(--bt-surface-2); color: var(--bt-muted); border: 1px solid var(--bt-border); font-weight: 500; }
.bt-tag-save { color: var(--bs-primary); }
.bt-tool-open { color: var(--bt-accent); font-weight: 600; font-size: .92rem; margin-top: .3rem; }
.bt-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.bt-info > div { display: flex; gap: .8rem; padding: 1rem 1.1rem; border-radius: var(--bt-radius); border: 1px solid var(--bt-border); background: var(--bt-surface); font-size: .93rem; }
.bt-info i { font-size: 1.3rem; color: var(--bt-accent); }

/* QR tool */
.bt-type-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.bt-type-pills .btn { border-radius: 999px; }
.bt-preview { position: relative; background: repeating-conic-gradient(rgba(127, 127, 127, .12) 0% 25%, transparent 0% 50%) 50% / 20px 20px; border-radius: 12px; padding: 12px; display: flex; align-items: center; justify-content: center; min-height: 240px; }
.bt-preview canvas { width: 100%; max-width: 360px; height: auto; aspect-ratio: 1 / 1; image-rendering: auto; border-radius: 4px; }
.bt-preview-empty { display: flex; flex-direction: column; align-items: center; gap: .5rem; color: var(--bt-muted); text-align: center; padding: 2rem 1rem; }
.bt-preview-empty i { font-size: 3rem; opacity: .5; }

/* Saved lists */
.bt-saved-list { display: flex; flex-direction: column; gap: .4rem; }
.bt-saved-row { display: flex; align-items: center; gap: .8rem; padding: .55rem .7rem; border: 1px solid var(--bt-border); border-radius: 12px; background: var(--bt-surface); }
.bt-saved-thumb { width: 44px; height: 44px; border-radius: 6px; flex-shrink: 0; }
.bt-saved-name { flex: 1; min-width: 0; font-weight: 500; }
.bt-saved-actions { display: inline-flex; gap: .1rem; flex-shrink: 0; }
@media (max-width: 575px) { .bt-saved-row > .text-nowrap { display: none; } }
.bt-empty { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--bt-border); border-radius: var(--bt-radius); }
.bt-empty > i { font-size: 2.4rem; color: var(--bt-muted); }

/* Footer */
.bt-footer { border-top: 1px solid var(--bt-border); margin-top: 4rem; padding: 1.5rem 0; color: var(--bt-muted); font-size: .9rem; flex-shrink: 0; }
.bt-footer a { color: var(--bt-muted); text-decoration: none; }
.bt-footer a:hover { text-decoration: underline; }
