﻿html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@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;
}

body {
    background: #f2f7ff;
}

.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;
}

/* =========================================
   SIDEBAR
========================================= */

#sidebar {
    width: 260px;
    flex-shrink: 0;
}

    #sidebar .sidebar-wrapper {
        display: flex;
        flex-direction: column;
        height: 100vh;
    }

    #sidebar .sidebar-menu {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
    }

        #sidebar .sidebar-menu .menu {
            flex: 1 1 auto;
            overflow-y: auto;
            margin-top: 0.75rem;
        }

    #sidebar .sidebar-footer {
        flex-shrink: 0;
    }

.sidebar-wrapper {
    min-height: 100vh;
}

.sidebar-item .sidebar-link {
    border-radius: 0.7rem;
}

.sidebar-item.active > .sidebar-link {
    border-radius: 0.7rem;
}

/* =========================================
   MAIN APP LAYOUT
========================================= */

#main {
    margin-left: 300px;
    min-height: 100vh;
    background: #f2f7ff;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

@media screen and (max-width: 1199px) {
    #main {
        margin-left: 0;
    }
}

.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Wrapper that keeps footer at bottom */
.ts-main-shell {
    min-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
}

/* Shared content width so headings/cards/tables/footer align */
.ts-content-shell {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

/* Main page content grows to push footer down */
.page-content {
    flex: 1 1 auto;
    padding: 0;
}

/* Footer spacing */
.ts-page-footer {
    margin-top: 2rem;
    margin-bottom: 0;
}

/* =========================================
   USER PANEL
========================================= */

.ts-user-panel {
    border-radius: 0.9rem;
}

.ts-user-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: #435ebe;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

/* =========================================
   PUBLIC / LANDING PAGE
========================================= */

html.public-page,
html.public-page body {
    height: 100%;
    overflow: hidden;
}

.ts-public-shell {
    min-height: 100vh;
    height: 100vh;
    display: grid;
    grid-template-rows: 1fr auto;
    background: #f2f7ff;
    overflow: hidden;
}

.ts-public-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 1rem 1rem;
    min-height: 0;
}

.ts-public-footer {
    text-align: center;
    padding: 0 1rem 1.5rem 1rem;
    color: #7c8db5;
    font-size: 0.9rem;
}

.ts-login-card {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    border-radius: 1rem;
}

.ts-login-logo {
    max-height: 110px;
    width: auto;
}

/* =========================================
   CARD HEADERS
========================================= */

.card-header {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

    .card-header h4,
    .card-header .card-title {
        font-size: 1.1rem;
        font-weight: 600;
        color: #435ebe;
        margin-bottom: 0;
    }

/* =========================================
   FORM CONSISTENCY
========================================= */

.form-group {
    margin-bottom: 1.25rem;
}

    .form-group .form-label,
    .form-group label,
    .card-body dl dt {
        display: inline-block;
        margin-bottom: 0.45rem;
        font-weight: 600;
        color: #6f86b6;
        line-height: 1.2;
    }

    .form-group .form-control,
    .form-group .form-select,
    .form-group textarea {
        min-height: 46px;
    }

    .form-group .text-danger {
        display: block;
        margin-top: 0.35rem;
    }

    /* Optional: avoid extra space on the last field in a card/form block */
    .form-group:last-child {
        margin-bottom: 0;
    }

/* Detail page values */
.card-body dl dd {
    color: #526e8a;
    font-weight: 400;
}