/* --- Login page styles --- */
body.login-page {
    background: #222d32;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    width: 350px;
    padding: 40px 30px 30px 30px;
    text-align: center;
}
.login-logo {
    margin-bottom: 18px;
}
.login-logo img {
    width: 60px;
    height: 60px;
}
.login-title {
    font-size: 1.5rem;
    color: #3c8dbc;
    margin-bottom: 18px;
    font-weight: bold;
}
.login-form .form-group {
    margin-bottom: 18px;
    text-align: left;
}
.login-form label {
    font-size: 1rem;
    color: #222d32;
    margin-bottom: 6px;
    display: block;
}
.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    background: #f7f7f7;
    color: #222d32;
    outline: none;
    transition: border-color 0.2s;
}
.login-form input:focus {
    border-color: #3c8dbc;
}
.login-form .btn-login {
    width: 100%;
    background: #3c8dbc;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 0;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.login-form .btn-login:hover {
    background: #367fa9;
}
.login-footer {
    margin-top: 18px;
    font-size: 0.95rem;
    color: #888;
}
@media (max-width: 400px) {
    .login-container {
        width: 98vw;
        padding: 20px 5vw 20px 5vw;
    }
}

body { background: #f7f7f7; }
.sidebar-fixed {
    width: 220px;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    background: #222d32;
    color: #fff;
    z-index: 1000;
    padding-top: 56px;
    transition: width 0.2s;
}
.sidebar-collapsed { width: 60px !important; }
#sidebar-content { padding: 20px 0; }
#nav { list-style: none; padding: 0; margin: 0; }
#nav > li { margin-bottom: 10px; }
#nav > li > a {
    color: #b8c7ce;
    display: flex;
    align-items: center;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 3px;
    white-space: nowrap;
}
#nav > li > a .menu-text { margin-left: 10px; }
#nav > li > a:hover, #nav > li.active > a { background: #1e282c; color: #fff; }
.sidebar-widget { margin: 30px 0 0 0; }
.sidebar-widget .btn-group label { color: #fff; }
.sidebar-widget .btn-group .btn { background: #1e282c; border: none; }
.sidebar-widget .btn-group .btn.active { background: #3c8dbc; }
#content { margin-left: 220px; padding: 30px 20px 20px 20px; transition: margin-left 0.2s; }
.sidebar-collapsed ~ #content { margin-left: 60px !important; }
.sidebar-toggle-btn {
    position: fixed;
    top: 10px; left: 10px;
    z-index: 1100;
    background: #3c8dbc;
    color: #fff;
    border: none;
    border-radius: 3px;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
}
.page-header { background: #fff; border-radius: 5px; padding: 20px 20px 10px 20px; margin-bottom: 20px; }
.page-stats { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; }
.page-stats li { flex: 1; min-width: 180px; margin-right: 20px; }
.page-stats li:last-child { margin-right: 0; }
.summary span { font-size: 15px; color: #888; }
.summary h3 { font-size: 22px; margin: 5px 0 0 0; color: #3c8dbc; }
.widget { background: #fff; border-radius: 5px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(0,0,0,0.04);}
.widget-header { padding: 15px 20px; border-bottom: 1px solid #eee; }
.widget-content { padding: 20px; }
.table th, .table td { vertical-align: middle !important; }
.label.label-default { background: #e0e0e0; color: #333; margin-right: 5px; cursor: pointer; }
.modal-title { font-size: 1.5rem; }
.required { color: red; }
.form-group.ptb5 { margin-bottom: 10px; }
.breadcrumb { background: none; padding: 0; margin-bottom: 20px; }
.breadcrumb .icon-home { margin-right: 5px; }
.btn-xs { font-size: 0.8rem; padding: 2px 8px; }
.details-row { background: #f9f9f9; }
.details-content { padding: 15px 30px; }
.remind-date { color: #f39c12; font-weight: bold; }
.action-btns .btn { margin-right: 3px; }

/* Status badges for contract table */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-completed {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-overdue {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-closed {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* Responsive */
/* Modal tối ưu cho desktop và mobile */
@media (min-width: 1200px) {
    .modal-dialog {
        max-width: 1100px;
        width: 85vw;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .modal-dialog {
        max-width: 95vw;
        width: 95vw;
    }
    /* Trên tablet ẩn cột "Ngày đóng" (cột cuối) */
    .modal-body .table th:nth-child(5),
    .modal-body .table td:nth-child(5) {
        display: none;
    }
}

@media (max-width: 767px) {
    .modal-dialog {
        max-width: 100vw;
        width: 100vw;
        height: 100vh;
        margin: 0;
    }
    .modal-content {
        height: 100vh;
        border-radius: 0;
        border: none;
    }
    .modal-body {
        padding: 15px;
        overflow-y: auto;
        flex: 1;
    }
    .modal-header {
        padding: 10px 15px;
    }
    .modal-footer {
        padding: 10px 15px;
    }
    .table-responsive {
        font-size: 0.8rem;
    }
    .modal-body .table th:nth-child(4),
    .modal-body .table td:nth-child(4) {
        display: none;
    }
    .nav-tabs .nav-link {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 991px) {
    .sidebar-fixed { position: fixed; width: 60px !important; padding-top: 56px; }
    #content { margin-left: 60px !important; }
    .sidebar-toggle-btn { left: 10px; }
}
@media (max-width: 575px) {
    .sidebar-fixed { display: none !important; }
    #content { margin-left: 0 !important; }
    .sidebar-toggle-btn { left: 10px; }
    .page-header, .widget, .widget-header, .widget-content {
        padding: 10px !important;
    }
    .form-group.row > label, .form-group.row > div {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    .modal-dialog {
        max-width: 98vw !important;
        margin: 0.5rem auto;
    }
    .table th, .table td {
        font-size: 13px;
        padding: 4px;
    }
}
@media (max-width: 575px) {
    .sidebar-fixed {
        display: block !important;
        left: -220px;
        width: 220px !important;
        transition: left 0.2s;
        z-index: 2000;
    }
    .sidebar-fixed.sidebar-open {
        left: 0;
        box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    }
    #sidebarOverlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.3);
        z-index: 1999;
    }
    #sidebarOverlay.active {
        display: block;
    }
}