/* =====================================================
   CONTRACT LIST (CT) – ISOLATED STYLE
===================================================== */

/* Container chính */
#contractList {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

/* Base Grid Layout: Mặc định cho Mobile */
.ct-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Chia 2 cột trên mobile */
    gap: 12px;
}

/* Header: Ẩn trên Mobile */
.ct-header {
    display: none !important;
}

/* Item Card cho Mobile */
.ct-item {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.ct-item:active { background: #f9f9f9; transform: scale(0.99); }

/* Typography */
.ct-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.ct-val { font-size: 14px; color: #333; }
.ct-val.val-bold { font-weight: 700; color: #1a1a1a; }
.ct-sub { font-size: 12px; color: #777; margin-top: 2px; }

/* Status Badges */
.ct-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}
.ct-badge.status-active { background: #e3fcef; color: #00875a; }
.ct-badge.status-draft { background: #ebecf0; color: #42526e; }
.ct-badge.status-warning { background: #fff7e6; color: #d48806; }
.ct-badge.status-expired { background: #fff1f0; color: #cf1322; }

/* ================= DESKTOP VIEW (>= 1024px) ================= */
@media (min-width: 1024px) {
    /* Dàn hàng ngang: Họ tên(2) | Loại(1.5) | Từ(1) | Đến(1) | Trạng thái(1) */
    .ct-grid-layout {
        grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr;
        gap: 20px;
        align-items: center;
    }

    /* Hiện header */
    .ct-header {
        display: grid !important;
        padding: 12px 20px;
        background: #f8f9fa;
        border-radius: 8px;
        color: #666;
        font-weight: 700;
        font-size: 12px;
        border: none;
    }

    .ct-item {
        padding: 12px 20px;
        border-radius: 8px;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        box-shadow: none;
    }

    .ct-item:hover {
        background: #f4f9ff;
        border-bottom-color: #d1e9ff;
    }

    .ct-label {
        display: none; /* Desktop đã có Header nên ẩn label trong item */
    }

    .ct-col.col-status {
        text-align: right;
    }

    .ct-sub {
        font-size: 11px;
    }
}