:root {
    --nav-bg: #c41230;
    --nav-text: #ffffff;
    --nav-accent: #ffffff;
    --nav-muted: #f7d6dc;
    --tech-header-height: 64px;
    --tech-subheader-height: 48px;
}

a, a:visited { color: #c41230 !important; text-decoration: none; }
a:hover, a:focus { color: #c41230 !important; text-decoration: underline; }

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background-color: #e9ecef;
    border-color: #d9dee3;
    color: #1b1c1e;
}

.nav-tabs .nav-link { color: #1b1c1e !important; }
.nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus { color: #1b1c1e !important; text-decoration: underline; }
.nav-tabs .nav-link.active {
    color: #c41230 !important;
    background-color: #ffffff;
    border-color: #e6e2dd #e6e2dd #ffffff;
}

.tech-header { background: var(--nav-bg) !important; border-bottom: 1px solid rgba(255,255,255,0.2) !important; position: fixed; top: 0; left: 0; right: 0; z-index: 999; height: var(--tech-header-height); }
.tech-subheader { position: fixed; top: var(--tech-header-height); left: 0; right: 0; z-index: 998; min-height: var(--tech-subheader-height); }
.tech-header-spacer { height: calc(var(--tech-header-height) + var(--tech-subheader-height)); }
.tech-subheader {
    background: #f3efea;
    color: #1b1c1e;
    font-weight: 600;
    padding: 8px 18px;
    border-bottom: 1px solid #e6e2dd;
}
.tech-subheader-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tech-subheader-search { position: relative; display: flex; align-items: center; gap: 8px; margin: 0; }
.tech-subheader-search input {
    background: #ffffff;
    border: 1px solid #d7d2cd;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    min-width: 240px;
    width: 240px;
    transition: width 0.2s ease;
}
.tech-subheader-search input.is-expanded { width: 340px; }
.tech-subheader-search input:focus { outline: none; border-color: #c41230; box-shadow: 0 0 0 2px rgba(196,18,48,0.15); }
.tech-subheader-activity {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e1ddda;
    border-radius: 14px;
    padding: 6px 10px;
    flex: 1 1 420px;
    max-width: 520px;
}
.tech-subheader-activity-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tech-subheader-activity-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: #8b6f73; }
.tech-subheader-activity-meta { font-size: 12px; color: #3d3d3d; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tech-subheader-activity-problem { font-size: 12px; color: #6c757d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.tech-subheader-activity-actions { flex-shrink: 0; }
.tech-subheader-activity .activity-timer { font-variant-numeric: tabular-nums; font-weight: 700; color: #c41230; }
.activity-divider { color: #b0a5a7; }

.tech-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 18, 20, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.tech-modal-backdrop.show { display: flex; }
.tech-modal-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.2);
    width: min(620px, 92vw);
}
.tech-modal-header { padding: 16px 20px; border-bottom: 1px solid #eee; font-weight: 700; }
.tech-modal-body { padding: 20px; }
.tech-modal-footer { padding: 16px 20px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 10px; }
.modal { z-index: 3000; }
.modal-backdrop { z-index: 2990; }
.tech-search-results {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 360px;
    background: #ffffff;
    border: 1px solid #e1ddda;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    border-radius: 12px;
    padding: 6px;
    display: none;
    z-index: 1000;
    flex-direction: column;
}
.tech-search-results.is-open { display: block; }
.tech-search-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: #1b1c1e;
    border-bottom: 1px solid #eee9e4;
}
.tech-search-item:last-child { border-bottom: none; }
.tech-search-item:hover,
.tech-search-item.is-active { background: #f3efea; color: #1b1c1e; }
.tech-search-label { font-weight: 600; }
.tech-search-sub { font-size: 12px; color: #6c757d; }
.tech-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 18px; position: relative; height: var(--tech-header-height); }
.tech-brand { display: flex; align-items: center; }
.tech-logo { height: 36px; width: auto; display: block; }
.tech-menu-toggle { display: none; background: transparent; border: 1px solid rgba(255,255,255,0.6); border-radius: 10px; padding: 8px 10px; }
.tech-menu-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; }
.tech-menu-panel { display: block; }
.tech-menu-overlay { display: none; }
.tech-menu-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 8px; }
.tech-menu a { text-decoration: none; color: #ffffff !important; font-size: 13px; padding: 8px 10px; border-radius: 0; display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.tech-menu a:hover { background: rgba(255,255,255,0.18) !important; color: var(--nav-text) !important; }
.menu-item { position: relative; }
.menu-item.has-sub > a:after { content: "▾"; font-size: 10px; color: var(--nav-muted); }
.submenu { display: none; position: absolute; top: 100%; left: 0; background: #ffffff; border: 1px solid #e6e2dd; border-radius: 0; padding: 6px; min-width: 200px; box-shadow: 0 10px 24px rgba(0,0,0,0.12); z-index: 20; }
.profile-menu .submenu { left: auto; right: 0; }
.submenu li { list-style: none; }
.submenu a { width: 100%; justify-content: flex-start; color: #1b1c1e !important; text-transform: none !important; font-weight: 600; }
.submenu a:hover { color: #1b1c1e !important; background: #f3efea !important; }
.menu-item:hover > .submenu { display: block; }
.menu-item.logout a { color: #ffffff; border: 1px solid rgba(255,255,255,0.35); }
.menu-item.logout a:hover { background: rgba(255,255,255,0.2); }
.menu-icon { display: none; font-size: 16px; color: #b7b7b7; }
.menu-icon svg { width: 18px; height: 18px; display: block; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffffff;
    color: #c41230;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.profile-menu > a { padding: 6px 6px; }
.count-badge {
    background: #ffffff;
    color: #c41230;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    padding: 2px 6px;
    margin-left: auto;
}

@media (max-width: 980px) {
    .tech-nav { flex-direction: row; align-items: center; }
    .tech-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        background: #8b0f22;
        border: none;
        border-radius: 6px;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
    }
    .tech-menu-toggle span { width: 22px; }
    .tech-menu { width: 100%; }
    .tech-menu-panel {
        display: block;
        position: fixed;
        top: var(--tech-header-height);
        left: 0;
        height: calc(100vh - var(--tech-header-height));
        width: min(82vw, 360px);
        background: #ffffff;
        padding: 18px 18px 80px;
        border-right: 1px solid #e6e2dd;
        z-index: 1001;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        overflow-y: auto;
        visibility: hidden;
        pointer-events: none;
    }
    .tech-menu-panel.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
    .tech-menu-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.35);
        z-index: 1000;
    }
    .tech-menu-overlay.is-open { display: block; }
    .tech-menu-list { flex-direction: column; align-items: flex-start; width: 100%; gap: 6px; }
    .tech-menu a { width: 100%; justify-content: space-between; color: #1b1c1e !important; }
    .tech-menu a:hover { background: #f3efea !important; color: #1b1c1e !important; }
    .menu-item.has-sub > a:after { color: #1b1c1e; }
    .menu-icon { display: inline-flex; width: 24px; justify-content: center; }
    .menu-text { flex: 1; }
    .submenu { position: static; box-shadow: none; border: 1px solid #e6e2dd; margin-top: 6px; width: 100%; }
    .submenu a { color: #1b1c1e !important; }
    .menu-item.has-sub .submenu { display: none; }
    .menu-item.has-sub.is-open .submenu { display: block; }
    .profile-avatar { background: #c41230; color: #ffffff; }
    .tech-subheader-inner { flex-direction: column; align-items: flex-start; }
    .tech-subheader-search { width: 100%; }
    .tech-subheader-search input { width: 100%; min-width: 0; }
    .tech-subheader-search input.is-expanded { width: 100%; }
    .tech-search-results { width: 100%; right: auto; left: 0; }
    .tech-subheader-activity { width: 100%; max-width: 100%; }
    .tech-subheader-activity-problem { max-width: 100%; }
}
