/*
 * Custom Styles for Building Maintenance Project
 * Theme: TBS Navy Blue & Gold
 */

/* === GLOBAL THEME VARIABLES === */
:root {
    --tbs-navy: #266293;
    --tbs-gold: #FFC107;
    --tbs-gold-darker: #e0a800;
    --tbs-highlight-blue: #A9CCE3;
    --tbs-light-gray: #f8f9fa;
    --tbs-text-dark: #212529;
}

body {
    font-family: 'IBM Plex Sans Thai', sans-serif;
}


/* === PUBLIC-FACING PAGES STYLES === */

/* --- Main Container for Public Forms & Details --- */
.repair-container {
    max-width: 960px;
    margin: 2rem auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #dee2e6;
    overflow: hidden;
}
.short-text {
    max-width: 300px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.form-section-header {
    color: var(--tbs-navy);
    font-weight: 600;
    border-left: 4px solid var(--tbs-gold);
    padding-left: 10px;
}

.card-header-tabs-container {
    background-color: var(--tbs-light-gray);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-link.active {
    color: var(--tbs-navy);
    background-color: #ffffff;
    border-color: #dee2e6 #dee2e6 #ffffff;
    border-bottom: 3px solid var(--tbs-navy);
}

.btn-tbs-primary {
    background-color: var(--tbs-gold);
    border-color: var(--tbs-gold);
    color: var(--tbs-text-dark);
}

    .btn-tbs-primary:hover {
        background-color: var(--tbs-gold-darker);
        border-color: var(--tbs-gold-darker);
        color: var(--tbs-text-dark);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
    }


/* --- Responsive Table (ListService.cshtml) --- */
#scholarshipTable thead {
    background-color: var(--tbs-navy);
    color: white;
}

#scholarshipTable tbody tr:hover {
    background-color: #f1f7ff;
}

@media screen and (max-width: 768px) {
    #scholarshipTable thead {
        display: none;
    }

    #scholarshipTable tr {
        display: block;
        margin-bottom: 1.5rem;
        border: 1px solid #dee2e6;
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
        padding: 1rem;
    }

    #scholarshipTable td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 0.5rem 0;
        border: none;
        border-bottom: 1px solid #f0f0f0;
    }

        #scholarshipTable td:last-child {
            border-bottom: none;
        }

        #scholarshipTable td::before {
            content: attr(data-label);
            font-weight: 600;
            text-align: left;
            padding-right: 1rem;
            color: var(--tbs-navy);
        }

        #scholarshipTable td[data-label="Ê¶Ò¹Ð"],
        #scholarshipTable td[data-label="¨Ñ´¡ÒÃ"] {
            justify-content: center;
            padding-top: 1rem;
        }

            #scholarshipTable td[data-label="Ê¶Ò¹Ð"]::before,
            #scholarshipTable td[data-label="¨Ñ´¡ÒÃ"]::before {
                display: none;
            }
}


/* --- Status Badges --- */
.status-badge {
    display: inline-block;
    padding: 0.4em 0.8em;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 50rem;
    text-decoration: none;
}

.status-new {
    color: #fff;
    background-color: #6c757d;
}

.status-progress {
    color: var(--tbs-text-dark);
    background-color: #ffca2c;
}

.status-done {
    color: #fff;
    background-color: #198754;
}


/* --- Timeline (Detail.cshtml) --- */
.detail-page-container {
    padding: 2rem;
}

.status-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--tbs-navy);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50rem;
}

.timeline::before {
    background: #e9ecef;
}

.timeline-item::after {
    background: var(--tbs-navy);
    border: 4px solid var(--tbs-gold);
}

.timeline-item .card-body h3 {
    color: var(--tbs-navy);
    display: flex;
    align-items: center;
    gap: 10px;
}


/* === ADMIN DASHBOARD LAYOUT === */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: #f5f7fb;
}

.admin-sidebar {
    width: 260px;
    background-color: var(--tbs-navy);
    color: #e9ecef;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    height: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

    .sidebar-header h5 {
        margin: 0;
        color: white;
    }

.sidebar-nav {
    list-style: none;
    padding: 1rem 0;
    flex-grow: 1;
}

.sidebar-item-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 1rem 1.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: white;
    text-decoration: none;
}

    .sidebar-link i {
        font-size: 1.2rem;
        min-width: 30px;
        text-align: center;
    }

    .sidebar-link span {
        margin-left: 1rem;
    }

    .sidebar-link:hover {
        background-color: rgba(255, 255, 255, 0.05);
        color: white;
    }

    .sidebar-link.active {
        background-color: var(--tbs-gold);
        color: var(--tbs-text-dark);
        font-weight: 600;
    }
/* --- »ÃÑº»ÃØ§ Stat Card Title --- */
.stat-card .card-title {
    font-size: 0.95rem; /* Å´¢¹Ò´¿Í¹µìÅ§àÅç¡¹éÍÂ */
    font-weight: 400; /* ·ÓãËé¿Í¹µìäÁèË¹Òà¡Ô¹ä» */
    opacity: 0.8; /* Å´¤ÇÒÁà¢éÁ¢Í§ÊÕÅ§ */
    margin-bottom: 0.2rem; /* Å´ÃÐÂÐËèÒ§´éÒ¹ÅèÒ§ */
}

.stat-card h3 {
    font-weight: 700; /* à¹é¹µÑÇàÅ¢ãËéà´è¹¢Öé¹ */
}

.admin-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: calc(100% - 260px);
}

.admin-header {
    height: 60px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
}

.admin-main-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.admin-wrapper.sidebar-collapsed .admin-sidebar {
    width: 80px;
}

    .admin-wrapper.sidebar-collapsed .admin-sidebar .sidebar-header h5,
    .admin-wrapper.sidebar-collapsed .admin-sidebar .sidebar-link span {
        display: none;
    }

.admin-wrapper.sidebar-collapsed .admin-content {
    width: calc(100% - 80px);
}

@media (max-width: 992px) {
    .admin-sidebar {
        position: absolute;
        left: -260px;
        z-index: 1000;
        height: 100%;
    }

    .admin-wrapper.sidebar-collapsed .admin-sidebar {
        left: 0;
    }

    .admin-content {
        width: 100%;
    }
}

.admin-card {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.admin-card-header {
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    color: var(--tbs-navy);
}

.admin-card-body {
    padding: 1.5rem;
}

.stat-card {
    border-radius: 0px;
    color: white;

}

    .stat-card .card-body {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
.stat-card-icon-top {
    font-size: 2.5rem;
    opacity: 0.5;
    display: block; /* ·ÓãËé¢Öé¹ºÃÃ·Ñ´ãËÁè */
    margin-bottom: 0.5rem;
}

.stat-card-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}
