body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

main {
    flex: 1;
}

/* Auth pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175);
}

.auth-logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0d6efd;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 .125rem .5rem rgba(0,0,0,.08);
    border-radius: .75rem;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

/* Tables */
.table th {
    font-weight: 600;
    font-size: .875rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6c757d;
}

/* Badges */
.badge-role {
    font-size: .75rem;
    padding: .35em .65em;
}

/* Clickable cards */
.card-hover {
    transition: transform .15s ease, box-shadow .15s ease;
    cursor: pointer;
}
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.12) !important;
}

/* Avatar initials */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
    line-height: 1;
}
.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 12px;
}
.avatar-lg {
    width: 80px;
    height: 80px;
    font-size: 28px;
}

/* Collapsible location tree (maintenance module) */
/* Visibility is driven entirely by inline style (set server-side for the
   initial collapsed state, then by the toggle script) — no stylesheet rule
   here, so JS never has to fight a CSS default when showing a row again. */
.tree-toggle .bi-chevron-right {
    display: inline-block;
    transition: transform .15s ease;
}
.tree-toggle:not(.collapsed) .bi-chevron-right {
    transform: rotate(90deg);
}

/* Searchable location tree picker (equipment form) */
.location-picker {
    position: relative;
}
.location-picker-menu {
    position: absolute;
    z-index: 1050;
    width: 100%;
    max-height: 280px;
    overflow-y: auto;
    margin-top: 2px;
}

/* QR code for 2FA */
.qr-wrapper {
    background: #fff;
    display: inline-block;
    padding: .75rem;
    border-radius: .5rem;
    box-shadow: 0 .125rem .5rem rgba(0,0,0,.1);
}
