/* TSS CARD SYSTEM    Optimized for Dashboard Grids (In-Progress & Upcoming) */

/* 1. Base Card Layouts */
.column-card, .card-compact {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 220px; /* Fixed height ensures row alignment in grids */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.column-card:hover, .card-compact:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--portal-primary-color, #0078d4);
    transform: translateY(-4px);
}

/* 2. Visual Accents (Priority & Status) */
.column-card.priority-medium { border-left: 5px solid #f59e0b; }
.column-card.priority-high { border-left: 5px solid #ef4444; }
.card-wo-inprogress { border-left: 6px solid #28a745; }
.card-wo-upcoming { border-top: 4px solid #00bcf2; }

/* 3. Header & Date Components */
.card-top-row {
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start;
    margin-bottom: 8px;
}

.date-box {
    text-align: left;
    min-width: 50px;
}

.date-box .day {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    color: #0078d4;
}

.date-box .month {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #666;
}

/* 4. Typography & Info Area */
.card-main-info h4, .wo-title, .wo-incident {
    margin: 0 0 5px 0;
    font-weight: 700;
    color: #333;
    font-size: 14px;
    /* Line clamping for vertical alignment */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 20px;
}

.wo-incident {
    color: #0078d4;
}

.card-meta-text, .detail-item {
    font-size: 11px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
}

.detail-item i { width: 16px; color: #0078d4; margin-right: 4px; }

/* Time Remaining Status Colors */
.time-remaining-positive { color: #28a745 !important; }
.time-remaining-negative { color: #dc3545 !important; }

/* 5. Grids & Footers */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.progress-section {
    margin-top: 10px;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: #999;
}

.time-value {
    color: #333;
    font-weight: 600;
    font-size: 12px;
}

/* 6. Buttons & Badges */
.status-indicator .label, .status-badge {
    font-size: 12px;
    text-transform: uppercase;
    padding: 3px 6px;
    font-weight: 700;
}

.label-time {
    background-color: #00bcf2;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.btn-chevron {
    background: #f3f2f1;
    border: none;
    width: 32px;
    position: absolute;
    right: 15px;
    bottom: 15px;
}

.btn-chevron:hover {
    background: #e1dfdd;
    color: #0078d4;
}

/* 7. Responsive Overrides */
@media (max-width: 768px) {
    .column-card, .card-compact { height: auto; min-height: 165px; }
}

/* 7. In-Progress Card Components */
.appointment-item-inprogress, .appointment-item-upcoming {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.status-badge {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 4px 8px;
    background-color: #28a745;
    color: #fff;
    border-radius: 4px;
}

.detail-grid-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
    font-size: 11px;
}

.progress-section-compact {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}