/* Reset mặc định */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f7fb;
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    position: fixed;
    height: 100%;
    overflow-y: auto;
}

.sidebar .logo {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
}

.sidebar .menu-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.sidebar .menu-item i {
    margin-right: 10px;
}

.sidebar .menu-item:hover {
    background-color: #34495e;
}

.sidebar .menu-item.active {
    background-color: #1abc9c;
}

.sidebar .version {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 12px;
    opacity: 0.7;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 20px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2c3e50;
}

/* Dashboard */
.stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex: 1;
    text-align: center;
}

.stat-card h3 {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.recent-proxies {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.recent-proxies h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

th {
    background-color: #f4f7fb;
    font-weight: bold;
    color: #2c3e50;
}

/* Proxy Tables */
.proxy-table-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.proxy-table-container h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-size: 14px;
    color: #7f8c8d;
}

.filter-group select, .filter-group input[type="text"] {
    padding: 8px;
    border: 1px solid #dfe6e9;
    border-radius: 5px;
    font-size: 14px;
}

.checkbox-cell {
    width: 40px;
    text-align: center;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.action-cell {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-secondary {
    background-color: #7f8c8d;
    color: white;
}

.btn-secondary:hover {
    background-color: #95a5a6;
}

.btn-warning {
    background-color: #f1c40f;
    color: white;
}

.btn-warning:hover {
    background-color: #f39c12;
}

.btn-success {
    background-color: #2ecc71;
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.edit-icon {
    cursor: pointer;
    color: #3498db;
    margin-left: 10px;
}

.edit-icon:hover {
    color: #2980b9;
}

/* Status Badges */
.status-badge {
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
}

.status-active {
    background-color: #2ecc71;
}

.status-warning {
    background-color: #f1c40f;
}

.status-danger {
    background-color: #e74c3c;
}

.status-success {
    background-color: #3498db;
}

/* Platform Badges */
.platform-badge {
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
}

.platform-fb {
    background-color: #3b5998;
}

.platform-ig {
    background-color: #e4405f;
}

/* Bulk Actions */
.bulk-actions {
    display: none;
    margin-bottom: 20px;
}

.bulk-actions.active {
    display: block;
}

.bulk-action-btn {
    padding: 8px 12px;
    margin-right: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

/* Proxy Status Colors */
.usage-0 {
    background-color: #ffffff;
}

.usage-1 {
    background-color: #dff0d8;
}

.usage-2 {
    background-color: #fcf8e3;
}

.usage-3 {
    background-color: #f2dede;
}

.dead-proxy {
    background-color: #f9ebeb;
    opacity: 0.7;
}

/* Add Proxy Page */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-item {
    padding: 10px 20px;
    background-color: #ecf0f1;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.tab-item:hover {
    background-color: #dfe6e9;
}

.tab-item.active {
    background-color: #1abc9c;
    color: white;
}

.tab-content {
    display: none;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dfe6e9;
    border-radius: 5px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    position: relative;
}

.modal-content h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    color: #7f8c8d;
}

.close-modal:hover {
    color: #2c3e50;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* History Page */
.history-table-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.history-table-container h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

/* Settings Page */
.settings-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 600px;
}

.settings-container h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

.settings-group {
    margin-bottom: 20px;
}

.settings-group label {
    display: block;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.settings-group input, .settings-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #dfe6e9;
    border-radius: 5px;
    font-size: 14px;
}

.settings-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

.settings-actions {
    display: flex;
    gap: 10px;
}

/* Action Buttons */
.action-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.action-btn-edit {
    background-color: #3498db;
    color: white;
}

.action-btn-edit:hover {
    background-color: #2980b9;
}

.action-btn-delete {
    background-color: #e74c3c;
    color: white;
}

.action-btn-delete:hover {
    background-color: #c0392b;
}

/* Hiệu ứng nhấp nháy khi cập nhật */
.highlight {
    background-color: #e6f3ff !important;
    transition: background-color 0.3s;
}

/* Hiệu ứng khi hàng được chọn */
.selected-row {
    background-color: #d4edda !important;
    transition: background-color 0.3s;
}

/* Đảm bảo các hàng có transition cho opacity */
tr {
    transition: opacity 0.3s;
}

/* Style cho nút Copy STT */
.btn-info {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 5px 10px;
    margin: 0 5px;
    cursor: pointer;
}

.btn-info:hover {
    background-color: #138496;
}