/* Table Section Container */
.table-section {
    padding: 10px 20px 50px;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.table-container {
    width: 100%;
    max-width: 1180px;
    overflow-x: auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: #fff;
    min-width: 0;
    table-layout: fixed;
}

.custom-table thead th {
    background: linear-gradient(135deg, #17a2b8 0%, #1493a7 52%, #0f7f90 100%);
    color: #ffffff;
    padding: 12px 6px;
    font-weight: 600;
    text-align: center;
    font-size: 0.78rem;
    white-space: normal;
    line-height: 1.2;
    word-break: break-word;
    border: none;
}

.custom-table thead th:first-child { border-top-left-radius: 10px; }
.custom-table thead th:last-child { border-top-right-radius: 10px; }

.custom-table tbody td {
    padding: 10px 6px;
    border-bottom: 1px solid #eee;
    text-align: center;
    vertical-align: middle;
}

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

.table-input {
    width: 100%;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.75rem;
    outline: none;
    transition: border-color 0.3s;
    color: #333;
}

.table-input:focus { border-color: #9b42f5; }
.table-input:disabled { background-color: #f5f5f5; color: #999; cursor: not-allowed; }

.btn {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.btn-secondary { background-color: #e0e0e0; color: #888; cursor: not-allowed; min-width: 70px; }
.btn-secondary.active { background-color: #6c757d; color: #fff; cursor: pointer; }

.btn-delete { background-color: #dc3545; color: white; width: 24px; height: 24px; padding: 0; border-radius: 50%; font-size: 1rem; line-height: 1; }
.btn-delete:hover { background-color: #c82333; }
.btn-delete:disabled { background-color: #e0e0e0; cursor: not-allowed; }
.btn-download { min-width: 78px; }

.btn-add-row { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(45deg, #17a2b8, #9b42f5); color: white; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; transition: transform 0.3s, box-shadow 0.3s; margin-top: 0; }
.btn-add-row:hover { transform: translateY(-2px) rotate(1deg); }

.input-with-btn { position: relative; width: 100%; display: flex; align-items: center; }
.input-with-btn .table-input { padding-right: 44px; }
.btn-auto-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); height: 22px; padding: 2px 8px; border: 1px solid #ddd; border-radius: 4px; background-color: #f9f9f9; color: #666; font-size: 11px; line-height: 16px; white-space: nowrap; cursor: pointer; transition: all 0.2s ease; }
.btn-auto-toggle:hover { background-color: #eee; color: #333; }
.btn-auto-toggle.active { background-color: #007bff; color: #fff; border-color: #0056b3; }
.btn-auto-toggle.active:hover { background-color: #0069d9; }
.fixed-count { display: inline-block; padding: 6px 10px; border-radius: 6px; background: #f3f4f6; color: #333; font-size: 0.8rem; }

.col-domain { width: 14%; }
.col-name { width: 14%; }
.col-desc { width: 20%; }
.col-inner-link { width: 16%; }
.col-lang { width: 10%; }
.col-link { width: 16%; }
.col-download { width: 7%; }
.col-action { width: 3%; }

@media (max-width: 900px) {
    .table-section {
        padding-left: 12px;
        padding-right: 12px;
    }

    .table-container {
        width: calc(100vw - 24px);
    }

    .custom-table {
        min-width: 920px;
        table-layout: auto;
    }

    .custom-table thead th {
        white-space: nowrap;
    }
}
