﻿:root {
    --sidebar-width: 280px;
    --sidebar-width-collapsed: 80px;
    --toggle-btn-size: 34px;
    --main-content-gap: 22px;
}

a {
    text-decoration: none;
}

.welcome-page .logo {
    width: 64px;
}

.icon-banner {
    width: auto;
    height: 32px;
}

.body-container {
    margin-top: 60px;
    padding-bottom: 40px;
}

.welcome-page li {
    list-style: none;
    padding: 4px;
}

.logged-out-page iframe {
    display: none;
    width: 0;
    height: 0;
}

.grants-page .card {
    margin-top: 20px;
    border-bottom: 1px solid lightgray;
}

    .grants-page .card .card-title {
        font-size: 120%;
        font-weight: bold;
    }

        .grants-page .card .card-title img {
            width: 100px;
            height: 100px;
        }

    .grants-page .card label {
        font-weight: bold;
    }

.required:after {
    content: " (Required)";
    font-weight: normal;
    color: #dc3545;
}

/* Sidebar */
.admin-sidebar-shell {
    position: relative;
}

.sidebar {
    top: 60px;
    left: 0;
    height: calc(100vh - 60px);
    overflow: hidden;
    z-index: 1030;
}

.sidebar.collapse-horizontal {
    width: 0;
}

.sidebar.collapse-horizontal.show {
    width: var(--sidebar-width);
}

.sidebar.collapse:not(.show) {
    pointer-events: none;
}

.sidebar-nav {
    width: var(--sidebar-width);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-right: 1px solid #e9ecef;
    padding: 0.75rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-radius: 0.5rem;
    margin: 0.125rem 0.75rem;
    color: #495057;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-link:hover {
    background-color: #f1f3f5;
    color: #212529;
}

.sidebar-link.active {
    background-color: #e7f1ff;
    color: #0d6efd;
    font-weight: 600;
}

.sidebar-link:focus-visible {
    outline: 2px solid #86b7fe;
    outline-offset: 1px;
}

.toggle-btn {
    position: fixed;
    left: calc(var(--sidebar-width) - (var(--toggle-btn-size) / 2));
    top: 80px;
    background: white;
    border-radius: 0.5rem;
    width: var(--toggle-btn-size);
    height: var(--toggle-btn-size);
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 1060;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: left 0.3s ease;
}

.toggle-icon {
    width: 16px;
    height: 16px;
    color: #495057;
    transition: transform 0.3s ease;
}

.sidebar.collapse:not(.show) + .toggle-btn {
    left: 8px;
}

.sidebar.collapse:not(.show) + .toggle-btn .toggle-icon {
    transform: rotate(180deg);
}

/* Main content */
.main-content {
    margin-left: calc(var(--sidebar-width) + var(--main-content-gap));
    padding-left: 0.5rem;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

@supports selector(.admin-layout:has(#adminMenu.show)) {
    .admin-layout:has(#adminMenu:not(.show)) .main-content {
        margin-left: calc(var(--toggle-btn-size) + var(--main-content-gap));
    }
}

/* Migration traceability UI */
/*.trace-card {*/
/*    margin-bottom: 2rem;*/
/*}*/

/*.trace-section-label {*/
/*    font-size: 0.95rem;*/
/*    font-weight: 600;*/
/*}*/


/*.trace-summary-badges {*/
/*    display: flex;*/
/*    flex-wrap: wrap;*/
/*    gap: 0.3rem;*/
/*    align-items: center;*/
/*    justify-content: flex-end;*/
/*}*/

/*.trace-summary-handled {*/
/*    color: #218838;*/
/*    font-weight: 600;*/
/*    font-size: 0.85rem;*/
/*}*/

/*.trace-summary-unmapped {*/
/*    background-color: #dc3545;*/
/*    color: #fff;*/
/*    font-weight: 600;*/
/*    font-size: 0.85rem;*/
/*    padding: 0.15rem 0.45rem;*/
/*    border-radius: 0.25rem;*/
/*}*/

/*.trace-summary-zero {*/
/*    color: #6c757d;*/
/*    font-size: 0.85rem;*/
/*}*/

/*.trace-status-handled {*/
/*    color: #218838;*/
/*    font-weight: 600;*/
/*}*/

/*.trace-status-ignored {*/
/*    color: #6c757d;*/
/*    font-weight: 600;*/
/*}*/

/*.trace-status-unmapped {*/
/*    background-color: #dc3545;*/
/*    color: #fff;*/
/*    font-weight: 600;*/
/*    padding: 0.15rem 0.45rem;*/
/*    border-radius: 0.25rem;*/
/*}*/

/*.trace-link-list {*/
/*    display: flex;*/
/*    flex-direction: column;*/
/*    gap: 0.4rem;*/
/*}*/

/*.trace-link-row {*/
/*    display: grid;*/
/*    grid-template-columns: minmax(140px, auto) 100px 1fr;*/
/*    gap: 0.5rem;*/
/*    align-items: baseline;*/
/*    font-size: 0.875rem;*/
/*}*/

/*.trace-link-type {*/
/*    color: #495057;*/
/*    font-weight: 600;*/
/*}*/
