/* ========================================
   Bento Card Grid System
   Mobile-first, responsive card layouts
   Reusable across all list/index pages
   ======================================== */

/* ----------------------------------------
   Bento Grid Single Column
   Always 1 card per row at any screen size
   ---------------------------------------- */

.bento-grid-single {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

/* ----------------------------------------
   History Card variant
   ---------------------------------------- */

.bento-history-card {
    background: #fafbff;
    border-radius: 10px;
    border: 1px solid #e8ecf8;
    overflow: hidden;
}

.bento-history-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 8px;
}

.bento-history-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.bento-history-meta-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.bento-history-meta-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #aaa;
    font-weight: 600;
}

.bento-history-meta-value {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

.bento-history-card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.bento-history-card-notes {
    padding: 8px 14px;
    font-size: 12px;
    color: #555;
    border-left: 3px solid #667eea;
    background: #f5f6ff;
}

.bento-history-card-notes-label {
    font-weight: 700;
    color: #667eea;
    margin-right: 4px;
}

/* ----------------------------------------
   Bento Grid Container
   ---------------------------------------- */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

/* ----------------------------------------
   Bento Card Base
   ---------------------------------------- */

.bento-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    border: 1px solid #eef0f4;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.bento-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

/* ----------------------------------------
   Card Header - Status + Secondary badge
   ---------------------------------------- */

.bento-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 0 16px;
}

/* ----------------------------------------
   Card Body - Primary content
   ---------------------------------------- */

.bento-card-body {
    padding: 10px 16px 12px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ----------------------------------------
   Candidate / Title Primary Text
   ---------------------------------------- */

.bento-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
    margin: 0;
}

.bento-card-subtitle {
    font-size: 12px;
    color: #888;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ----------------------------------------
   Meta Row - Key/Value pairs
   ---------------------------------------- */

.bento-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.bento-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bento-meta-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #aaa;
    font-weight: 600;
}

.bento-meta-value {
    font-size: 12px;
    color: #333;
    font-weight: 500;
    line-height: 1.3;
}

.bento-meta-value-full {
    grid-column: 1 / -1;
}

.bento-meta-item-full {
    grid-column: 1 / -1;
}

/* ----------------------------------------
   Divider
   ---------------------------------------- */

.bento-divider {
    border: none;
    border-top: 1px solid #f0f0f0;
    margin: 0;
}

/* ----------------------------------------
   Card Footer - ID + Actions
   ---------------------------------------- */

.bento-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 12px 16px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}

.bento-card-id {
    font-size: 11px;
    color: #bbb;
}

.bento-card-actions {
    display: flex;
    gap: 4px;
}

/* ----------------------------------------
   Days / Retention Badge
   ---------------------------------------- */

.bento-days-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    background: #eef2ff;
    color: #667eea;
}

.bento-days-badge-success {
    background: #e6f9f0;
    color: #27ae60;
}

.bento-days-badge-warning {
    background: #fff8e6;
    color: #e67e22;
}

.bento-days-badge-danger {
    background: #fdecea;
    color: #e74c3c;
}

/* ----------------------------------------
   Filter Card (used above grid)
   ---------------------------------------- */

.bento-filter-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #eef0f4;
    padding: 16px 20px;
    margin-bottom: 4px;
}

.bento-filter-form {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.bento-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bento-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin: 0;
}

.bento-filter-control {
    min-width: 180px;
}

/* ----------------------------------------
   Empty State
   ---------------------------------------- */

.bento-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #999;
    background: white;
    border-radius: 12px;
    border: 1px dashed #ddd;
}

.bento-empty-icon {
    font-size: 32px;
    margin-bottom: 12px;
    color: #ccc;
}

.bento-empty-text {
    font-size: 14px;
}

/* ----------------------------------------
   Page Header (reusing .page-banner)
   Banner-specific text when used with bento
   ---------------------------------------- */

.bento-page-title {
    margin: 0;
    font-weight: 700;
    font-size: 20px;
    color: white;
}

.bento-page-subtitle {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

/* ----------------------------------------
   Responsive Breakpoints
   ---------------------------------------- */

@media (max-width: 1100px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bento-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .bento-filter-control {
        min-width: 100%;
        width: 100%;
    }

    .bento-filter-group {
        width: 100%;
    }

    .bento-filter-group .form-control {
        width: 100%;
    }

    .bento-page-title {
        font-size: 15px;
    }

    .bento-page-subtitle {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .bento-card-body {
        padding: 8px 12px 10px 12px;
    }

    .bento-card-header {
        padding: 10px 12px 0 12px;
    }

    .bento-card-footer {
        padding: 8px 12px 10px 12px;
    }
}
