html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}/* ====== Wizard thumbnail cards ====== */
.wizard-thumb-card {
    display: block;
    border: 2px solid var(--bs-border-color);
    border-radius: .75rem;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: transform .25s ease,
                box-shadow .25s ease,
                border-color .2s ease;
    height: 100%;
    margin: 0;
    position: relative;
}

.wizard-thumb-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 .75rem 1.5rem rgba(0,0,0,.08);
    border-color: var(--bs-primary);
}

.wizard-thumb-svg {
    aspect-ratio: 16 / 10;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    overflow: hidden;
    position: relative;
}

.wizard-thumb-svg svg {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform .35s ease;
}

.wizard-thumb-card:hover .wizard-thumb-svg svg {
    transform: scale(1.04);
}

.wizard-thumb-body {
    padding: .75rem 1rem 1rem;
}

.wizard-thumb-check {
    color: var(--bs-primary);
    opacity: 0;
    transition: opacity .2s ease;
    font-size: 1.25rem;
}

/* Selected state */
.btn-check:checked + .wizard-thumb-card {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 4px rgba(13,110,253,.15),
                0 .5rem 1rem rgba(0,0,0,.06);
    background: rgba(13,110,253,.03);
}

.btn-check:checked + .wizard-thumb-card .wizard-thumb-check {
    opacity: 1;
}

.btn-check:checked + .wizard-thumb-card .wizard-thumb-svg::after {
    content: "";
    position: absolute;
    inset: 0;
    border-bottom: 3px solid var(--bs-primary);
    pointer-events: none;
}

/* Idle accent pulse — subtly hint that previews are interactive */
.wizard-thumb-card:hover .wizard-thumb-svg svg rect[fill="#3b82f6"],
.wizard-thumb-card:hover .wizard-thumb-svg svg circle[fill="#3b82f6"],
.wizard-thumb-card:hover .wizard-thumb-svg svg polyline[stroke="#3b82f6"] {
    animation: wiz-accent-pulse .9s ease-in-out infinite;
    transform-origin: center;
    transform-box: fill-box;
}

@keyframes wiz-accent-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .55; }
}

/* Focus ring for keyboard users */
.btn-check:focus-visible + .wizard-thumb-card {
    outline: 3px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Reduce-motion respect */
@media (prefers-reduced-motion: reduce) {
    .wizard-thumb-card,
    .wizard-thumb-svg svg,
    .wizard-thumb-card:hover .wizard-thumb-svg svg rect[fill="#3b82f6"],
    .wizard-thumb-card:hover .wizard-thumb-svg svg circle[fill="#3b82f6"],
    .wizard-thumb-card:hover .wizard-thumb-svg svg polyline[stroke="#3b82f6"] {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

/* ===== Admin shell ===== */
.admin-body { background: #f8fafc; min-height: 100vh; }
.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: 240px;
    background: #0f172a;
    color: #cbd5e1;
    padding: 1.25rem 0;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-brand {
    padding: 0 1.25rem 1rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: .5rem;
    border-bottom: 1px solid #1e293b;
    margin-bottom: 1rem;
}

.admin-brand i { color: #60a5fa; font-size: 1.25rem; }

.admin-nav { display: flex; flex-direction: column; padding: 0 .5rem; }
.admin-nav hr { border-color: #1e293b; }

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .75rem;
    margin-bottom: .15rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: .375rem;
    font-size: .92rem;
    transition: background .15s, color .15s;
}

.admin-nav-link:hover { background: #1e293b; color: #f1f5f9; }
.admin-nav-link.active { background: #2563eb; color: #fff; }
.admin-nav-link i { width: 1.1rem; text-align: center; }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: .65rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-breadcrumb { font-size: .9rem; color: #64748b; }
.admin-breadcrumb .breadcrumb { margin: 0; }

.admin-content { padding: 1.5rem; }

@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        left: -240px;
        z-index: 1040;
        transition: left .25s ease;
    }
    .admin-sidebar-open .admin-sidebar { left: 0; }
}

/* Admin form helpers */
.admin-section-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: .5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #1e293b;
    font-weight: 600;
}

.admin-kpi-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: .75rem;
    padding: 1.25rem;
    transition: box-shadow .15s;
}
.admin-kpi-card:hover { box-shadow: 0 .25rem .75rem rgba(15,23,42,.06); }
.admin-kpi-icon {
    width: 42px; height: 42px; border-radius: .5rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
}
.admin-kpi-value { font-size: 1.85rem; font-weight: 700; line-height: 1.1; }
.admin-kpi-label { color: #64748b; font-size: .85rem; text-transform: uppercase; letter-spacing: .025em; }

/* Admin tech mini preview in list */
.admin-tech-thumb {
    width: 80px; height: 50px; border-radius: .25rem;
    background: #f1f5f9; overflow: hidden; flex-shrink: 0;
}
.admin-tech-thumb svg { width: 100%; height: 100%; display: block; }

/* Admin slide-down edit panel */
.tech-edit-panel {
    position: fixed;
    top: 0; left: 240px; right: 0;
    background: #fff; border-bottom: 2px solid #ff4d1c;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    z-index: 200;
    transform: translateY(-100%);
    transition: transform 350ms cubic-bezier(.2,.8,.2,1);
    max-height: 92vh; overflow-y: auto;
}
.tech-edit-panel.is-open { transform: translateY(0); }
.tech-edit-panel-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 24px;
    background: #0f172a; color: #fafaf7;
    position: sticky; top: 0; z-index: 5;
    font-family: 'JetBrains Mono', monospace; font-size: 13px;
}
.tech-edit-panel-bar .btn { font-family: 'JetBrains Mono', monospace; }
.tech-edit-panel-body { padding: 24px; }
@media (max-width: 991px) {
    .tech-edit-panel { left: 0; }
}
.tech-edit-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.4);
    z-index: 199; opacity: 0; pointer-events: none;
    transition: opacity .25s;
}
.tech-edit-backdrop.is-open { opacity: 1; pointer-events: auto; }
