/* Inherit variables from style.css */

/* Main Layout */
.flex-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    gap: 2rem;
    animation: fadeIn 0.5s ease-out;
}

/* Panel Containers */
.back-container1 {
    background-color: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    flex: 1; /* Take full available width */
    max-width: 100%;
    overflow-x: auto; /* Handle horizontal scroll if needed */
}

/* Header Tools */
.header-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

h2 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-green);
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Select Input */
.ds-list {
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: var(--text-dark);
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
    min-width: 200px;
}

.ds-list:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* Table Styles */
.table-widget {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

thead th {
    background-color: var(--primary-green);
    color: white;
    padding: 1rem;
    font-weight: 500;
    text-align: left;
    font-size: 0.95rem;
    white-space: nowrap;
}

thead th:first-child {
    border-top-left-radius: 8px;
}

thead th:last-child {
    border-top-right-radius: 8px;
}

tbody td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    color: var(--text-dark);
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

tbody tr:hover td {
    background-color: #f9fdf9;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.status {
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.status--Nuevo {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status--Visto {
    background-color: #fff3e0;
    color: #f57c00;
}

.status--Aceptado {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status--Rechazado {
    background-color: #ffebee;
    color: #c62828;
}

/* Action Links/Tags */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-right: 0.5rem;
    border: none; /* Remove default button border */
    cursor: pointer; /* Pointer for buttons */
    font-family: 'Poppins', sans-serif; /* Inherit font */
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag--details {
    background-color: var(--text-dark);
    color: white;
}

.tag--details:hover {
    background-color: black;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.tag--accept {
    background-color: #2e7d32;
    color: white;
}

.tag--accept:hover {
    background-color: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 125, 50, 0.2);
}

.tag--reject {
    background-color: #d32f2f;
    color: white;
}

.tag--reject:hover {
    background-color: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(211, 47, 47, 0.2);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: flex-end;
    list-style: none;
    gap: 0.5rem;
    padding: 1rem 0 0 0;
    margin: 0;
}

.pagination li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    transition: background-color 0.2s, color 0.2s;
}

.pagination li a:hover,
.pagination li a.active {
    background-color: var(--primary-green);
    color: white;
}

/* Responsive */
@media (max-width: 900px) {
    .header-tools {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ds-list {
        width: 100%;
    }
    
    table, thead, tbody, th, td, tr {
        display: block;
    }
    
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    tbody tr {
        border: 1px solid #eee;
        border-radius: 8px;
        margin-bottom: 1rem;
        padding: 1rem;
        background: #fff;
    }
    
    tbody td {
        border: none;
        position: relative;
        padding-left: 50%;
        text-align: right;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    tbody td:before {
        position: absolute;
        top: 0.5rem;
        left: 0;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: var(--text-muted);
    }
    
    /* Headers for mobile view */
    /* Special styling for the first column (Profile) on mobile to look like a header */
    tbody td:nth-of-type(1) {
        text-align: left;
        padding-left: 1rem; /* Reset padding */
        border-bottom: 1px solid #f0f0f0;
        background-color: #fcfcfc;
        margin-bottom: 0.5rem;
    }

    tbody td:nth-of-type(1):before { 
        display: none; /* Hide label for the name */
    }

    /* Adjust padding for other cells */
    td:nth-of-type(2):before { content: "Faltó el"; }
    td:nth-of-type(3):before { content: "Fecha Envío"; }
    td:nth-of-type(4):before { content: "Tutor"; }
    td:nth-of-type(5):before { content: "Respuesta"; }
    td:nth-of-type(6):before { content: "Fecha Resp."; }
    td:nth-of-type(7):before { content: "Estado"; }
    td:nth-of-type(8):before { content: "Opciones"; }
    
    .tag {
        display: inline-block;
        margin-top: 0.5rem;
        width: 100%;
        text-align: center;
    }
}
