/* ── Brand variables ─────────────────────────────────────────────────────── */
:root {
    --brand-primary:   #292661;
    --brand-secondary: #8dc240;

    /* Override Bootstrap primary to match brand */
    --bs-primary:          #292661;
    --bs-primary-rgb:      41, 38, 97;
    --bs-btn-bg:           #292661;
    --bs-btn-border-color: #292661;
    --bs-link-color:       #292661;
    --bs-link-color-rgb:   41, 38, 97;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.page {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    height: 100vh;
    position: sticky;
    top: 0;
    background-color: var(--brand-primary);
    flex-shrink: 0;
    overflow-y: auto;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.top-row {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    height: 3.5rem;
}

.content {
    padding: 1.5rem;
}

/* ── Sidebar nav ──────────────────────────────────────────────────────────── */
.sidebar-header {
    padding: 1.25rem 1rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 0.5rem;
}

.navbar-brand {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff !important;
    text-decoration: none;
    padding: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding-top: 0.25rem;
}

.nav-item {
    font-size: 0.95rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin: 2px 8px;
    display: block;
    text-decoration: none;
}

.nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.12);
}

.nav-link.active {
    color: #ffffff !important;
    background-color: var(--brand-secondary);
}

/* ── Bootstrap primary button override ───────────────────────────────────── */
.btn-primary {
    background-color: var(--brand-primary) !important;
    border-color:     var(--brand-primary) !important;
    color:            #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #1e1b4e !important;
    border-color:     #1e1b4e !important;
}

/* ── Leave cards (dashboard) ─────────────────────────────────────────────── */
.leave-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.leave-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.leave-card-name {
    font-weight: 600;
    font-size: 1.05rem;
}

.leave-card-dates {
    color: #6c757d;
    font-size: 0.9rem;
}

.leave-card-time {
    color: #6c757d;
    font-size: 0.85rem;
}

.leave-card-message {
    font-size: 0.9rem;
    color: #495057;
    border-left: 3px solid var(--brand-secondary);
    padding-left: 0.6rem;
    margin-top: 0.25rem;
}

.leave-card-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

/* ── Status badges ───────────────────────────────────────────────────────── */
.badge.bg-primary {
    background-color: var(--brand-primary) !important;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

/* ── Confirm modal ───────────────────────────────────────────────────────── */
.confirm-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-modal {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.75rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.confirm-modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.confirm-modal-message {
    color: #495057;
    margin-bottom: 1.5rem;
}

.confirm-modal-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.confirm-modal-list li {
    color: #495057;
    font-size: 0.95rem;
}

.confirm-label {
    font-weight: 600;
    margin-right: 0.4rem;
}

.confirm-label::after {
    content: ':';
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ── Error UI ────────────────────────────────────────────────────────────── */
#blazor-error-ui .dismiss {
    float: right;
    cursor: pointer;
}
