:root {
    --tblr-primary: #f76707;
    --tblr-primary-rgb: 247, 103, 7;
    --tblr-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
html, body { margin: 0 !important; }
.navbar-nav .nav-link { display: flex; align-items: center; }
.navbar-nav .nav-link-icon { display: inline-flex; align-items: center; }
.navbar-nav .nav-link-icon .bi { font-size: 1.1rem; line-height: 1; }
.navbar-brand-image { font-size: 1.75rem; line-height: 1; }
.avatar-primary { background-color: var(--tblr-primary); color: #fff; font-weight: 600; }
#page-loader { z-index: 2000; }
#page-loader .progress { height: 3px; border-radius: 0; background: transparent; }

.prompt-cell { max-width: 32rem; }
.prompt-cell div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pre-wrap { white-space: pre-wrap; word-break: break-word; margin: 0; font-size: .8125rem; }
.sf-log { max-height: 65vh; overflow: auto; }
.sf-log-short { max-height: 18rem; }
.sf-log .list-group-item { padding: .4rem .9rem; }
.sf-log .log-tool { color: var(--tblr-blue); }
.sf-log .log-result { color: var(--tblr-secondary); padding-left: 1.75rem; }
.sf-log .log-info { color: var(--tblr-green); font-style: italic; }
.sf-log .log-raw { color: var(--tblr-red); }

.login-brand { font-size: 2rem; line-height: 1; }
.login-brand-name { font-size: 1.35rem; letter-spacing: -.3px; }
.hero { background: linear-gradient(145deg, #1f1206 0%, #3a1f08 55%, #241307 100%); min-height: 100vh; }
.hero-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(247,103,7,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(247,103,7,.05) 1px, transparent 1px);
    background-size: 52px 52px;
}
.hero-glow {
    position: absolute; width: 700px; height: 700px; border-radius: 50%;
    background: radial-gradient(circle, rgba(247,103,7,.14) 0%, transparent 65%);
    top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.hero-content { position: relative; z-index: 1; max-width: 580px; padding: 3rem 2.5rem; }
.hero-logo { font-size: 3.5rem; color: #f76707; filter: drop-shadow(0 0 24px rgba(247,103,7,.6)); }
.hero-title { color: #fff; font-size: 2rem; letter-spacing: -.5px; font-weight: 700; }
.hero-tagline { color: rgba(247,140,60,.85); font-size: .72rem; font-weight: 700; letter-spacing: .25em; text-transform: uppercase; }
.hero-tile {
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 10px;
    padding: .75rem .65rem; text-align: left; display: flex; align-items: flex-start; gap: .55rem;
}
.hero-tile i { color: #ff9a4d; font-size: 1.05rem; margin-top: 1px; }
.hero-tile-title { color: #fbeee6; font-size: .78rem; font-weight: 600; line-height: 1.2; }
.hero-tile-desc { color: rgba(251,238,230,.5); font-size: .68rem; line-height: 1.35; margin-top: 2px; }
.hero-footer { color: rgba(251,238,230,.35); font-size: .7rem; }
#login-loader { z-index: 2000; }
#login-loader .progress { width: 12rem; }

.sf-pre-box { color: var(--tblr-body-color); background: var(--tblr-bg-surface-secondary); border: 1px solid var(--tblr-border-color); border-radius: 6px; padding: .6rem .8rem; max-height: 22rem; overflow: auto; }
.sf-markdown h2 { font-size: 1rem; margin: 1rem 0 .4rem; }
.sf-markdown h2:first-child { margin-top: 0; }
.sf-markdown h3 { font-size: .9rem; margin: .8rem 0 .3rem; }
.sf-markdown ol, .sf-markdown ul { padding-left: 1.3rem; margin-bottom: .5rem; }
.sf-markdown p { margin-bottom: .5rem; }
.sf-markdown pre { color: var(--tblr-body-color); background: var(--tblr-bg-surface-secondary); padding: .5rem .7rem; border-radius: 6px; white-space: pre-wrap; }
.sf-diff { font: 12px/1.45 var(--tblr-font-monospace); max-height: 70vh; overflow: auto; white-space: pre; }
.sf-diff div { padding: 0 .9rem; }
.sf-diff .d-add { background: rgba(47,179,68,.14); }
.sf-diff .d-del { background: rgba(214,57,57,.14); }
.sf-diff .d-hunk { color: var(--tblr-purple); background: rgba(174,62,201,.07); }
.sf-diff .d-file { font-weight: 700; background: var(--tblr-bg-surface-secondary); padding-top: .3rem; padding-bottom: .3rem; margin-top: .4rem; }
.sf-diff .d-meta { color: var(--tblr-secondary); }

/* Board */
.sf-board-cols { display: flex; gap: .75rem; overflow-x: auto; padding-bottom: .5rem; align-items: flex-start; }
.sf-col { flex: 1 0 15rem; min-width: 15rem; max-width: 24rem; }
.sf-col-body { min-height: 6rem; display: flex; flex-direction: column; gap: .5rem; }
.sf-card { cursor: pointer; transition: box-shadow .15s; }
.sf-card[draggable="true"] { cursor: grab; }
.sf-card:hover { box-shadow: var(--tblr-box-shadow-card-hover, 0 .25rem .75rem rgba(0,0,0,.12)); text-decoration: none; }
.sf-card-running { border-left: 3px solid var(--tblr-blue); }
.sf-card-title { font-weight: 500; line-height: 1.3; word-break: break-word; }
.sf-card-error { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.sf-dragging { opacity: .45; }

/* Square buttons (Tabler uses --tblr-btn-border-radius) */
.btn, .btn-sm, .btn-lg, .btn-icon, .btn-group > .btn, .btn-group-vertical > .btn { --tblr-btn-border-radius: 0; border-radius: 0; }

/* Square avatars (user letter, robot, project icon) */
.avatar { --tblr-avatar-border-radius: 0; border-radius: 0; }

/* Board tab keeps the standard primary colour when active */
.btn-primary.sf-nav-board.active, .btn-primary.sf-nav-board:active, .btn-primary.sf-nav-board.show {
    --tblr-btn-active-bg: var(--tblr-btn-bg);
    --tblr-btn-active-border-color: var(--tblr-btn-border-color);
    background-color: var(--tblr-btn-bg);
    border-color: var(--tblr-btn-border-color);
}

/* Board button: twice as wide so it stands out (not on a phone) */
.sf-nav-board { justify-content: center; }
@media (min-width: 576px) { .sf-nav-board { min-width: 10rem; } }

/* Project navigation: keep the buttons on one line on a phone */
.sf-nav-advanced { flex-wrap: nowrap; }

/* QR code of the second factor */
.totp-qr svg { width: 12rem; height: 12rem; background: #fff; }

/* Maintenance round button: a short, small shake every 5 s once the threshold is reached */
@keyframes sf-shake {
    0%, 8%, 100% { transform: translateX(0); }
    2% { transform: translateX(-2px); }
    4% { transform: translateX(2px); }
    6% { transform: translateX(-2px); }
}
.sf-shake { animation: sf-shake 5s infinite; }
@media (prefers-reduced-motion: reduce) { .sf-shake { animation: none; } }
