/* ===========================
   Contracts Page Styles
   =========================== */

/* Table Controls */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.table-control-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.per-page-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.per-page-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #2c2c2c;
    background-color: #ffffff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.per-page-select:focus {
    outline: none;
    border-color: #18dac6;
}

.per-page-label {
    font-size: 0.875rem;
    color: #718096;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 300px;
}

.search-icon {
    position: absolute;
    left: 12px;
    font-size: 20px;
    color: #a0aec0;
    pointer-events: none;
}

.search-input {
    padding: 8px 16px 8px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #2c2c2c;
    background-color: #ffffff;
    width: 100%;
    height: 36px;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #18dac6;
}

.search-input::placeholder {
    color: #a0aec0;
}

.search-btn {
    width: 36px;
    height: 36px;
    background-color: #18dac6;
    border: none;
    border-radius: 6px;
    color: #000000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.search-btn:hover {
    background-color: #14c4b0;
}

.search-btn .material-icons-outlined {
    font-size: 20px;
}

/* Table Wrapper */
.table-wrapper {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

/* Contracts Table */
.contracts-table {
    width: 100%;
    border-collapse: collapse;
}

.contracts-table thead {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e2e8f0;
}

.contracts-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #718096;
    letter-spacing: 0.5px;
}

.th-content {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.sort-icon {
    font-size: 16px;
    color: #cbd5e0;
    cursor: pointer;
}

.contracts-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

.contracts-table tbody tr:hover {
    background-color: #f9fafb;
}

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

.contracts-table td {
    padding: 20px;
    font-size: 0.875rem;
    color: #2c2c2c;
}

/* Contract Link */
.contract-link {
    color: #2c2c2c;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contract-link:hover {
    color: #18dac6;
    text-decoration: underline;
}

/* Contract Type */
.contract-type {
    color: #2c2c2c;
    font-weight: 500;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.draft {
    background-color: #FDAD35;
    color: #2c2c2c;
}

.status-badge.active {
    background-color: #d1fae5;
    color: #065f46;
}

.status-badge.pending {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Table Footer */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.table-info {
    font-size: 0.875rem;
    color: #718096;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .contracts-table {
        font-size: 0.8125rem;
    }
    
    .contracts-table th,
    .contracts-table td {
        padding: 12px 16px;
    }
}

@media (max-width: 992px) {
    .table-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .table-control-right {
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .table-wrapper {
        overflow-x: auto;
    }
    
    .contracts-table {
        min-width: 900px;
    }
}

@media (max-width: 768px) {
    .per-page-control {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
