/* Container for the whole table section */
.table-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0 auto;
    padding: 40px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border-top: 4px solid #7c8fb8;
    max-width: 1200px;
}

.table-container h1 {
    font-size: 2rem;
    color: #1a202c;
    margin-bottom: 30px;
    text-align: center;
}

/* Search form and controls */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin-bottom: 25px;
    gap: 12px;
    flex-wrap: wrap;
}

.search-form {
    display: flex;
    gap: 8px;
    flex-grow: 1;
    max-width: 500px;
    min-width: 200px;
    align-items: stretch;
}

/* Common height for all controls */
.search-form input[type="text"],
.search-form button,
.add-button {
    height: 44px;
    border-radius: 10px;
    font-size: 0.95rem;
    border: 2px solid #cbd5e0;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.search-form input[type="text"] {
    flex-grow: 1;
    background: #f8fafc;
    color: #1a202c;
    padding: 0 16px;
    margin: 0;
    vertical-align: top;
}

.search-form input[type="text"]:focus {
    outline: none;
    border-color: #7c8fb8;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(124, 143, 184, 0.15);
}

.search-form input[type="text"]::placeholder {
    color: #a0aec0;
}

.search-form button,
.add-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #7c8fb8 0%, #6b7a9f 100%) !important;
    color: white !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    text-decoration: none !important;
    text-align: center !important;
    box-shadow: 0 2px 8px rgba(124, 143, 184, 0.3) !important;
    border: 2px solid transparent !important;
    padding: 0 20px !important;
    white-space: nowrap !important;
    margin: 0 !important;
    vertical-align: top !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    height: 44px !important;
    border-radius: 10px !important;
}

.search-form button:hover,
.add-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 143, 184, 0.4);
    background: linear-gradient(135deg, #6b7a9f 0%, #5a6a8f 100%);
    border-color: rgba(124, 143, 184, 0.3);
}

.search-form button:active,
.add-button:active {
    transform: translateY(0);
}

/* Add button specific */
.add-button {
    flex-shrink: 0;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form {
        max-width: 100%;
        width: 100%;
    }

    .add-button {
        width: 100%;
    }
}


/* Main data table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.data-table th, .data-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

/* Table header */
.data-table thead {
    background-color: #f8fafc;
}

.data-table th {
    font-size: 0.8rem;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.data-table th a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.data-table th a:hover {
    color: #7c8fb8;
}

.sort-arrow {
    font-size: 10px;
    color: #7c8fb8;
    transition: transform 0.2s ease;
}

.data-table th a:hover .sort-arrow {
    transform: scale(1.2);
}

/* Table body */
.data-table tbody tr[data-href] {
    cursor: pointer;
}

.data-table tbody tr:hover {
    background-color: #edf2f7;
}

.data-table tbody td {
    font-size: 0.95rem;
    color: #2d3748;
}

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

/* Empty state */
.data-table tbody tr td[colspan] {
    text-align: center;
    padding: 50px;
    color: #718096;
    font-style: italic;
    font-size: 1rem;
}
