body {
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(135deg, #4a00e0, #8e2de2);
    color: #fff;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    animation: gradientAnimation 15s ease infinite;
}

@keyframes gradientAnimation {
    0% {
        background: linear-gradient(135deg, #4a00e0, #8e2de2);
    }

    33% {
        background: linear-gradient(135deg, #8e2de2, #ff6bcb);
    }

    66% {
        background: linear-gradient(135deg, #ff6bcb, #4a00e0);
    }

    100% {
        background: linear-gradient(135deg, #4a00e0, #8e2de2);
    }
}

/* Input và Select */
input {
    color: #fff;
    background: #2c3639;
    border: 1px solid #3a4249;
    border-radius: 10px;
    padding: 8px 12px;
}

input::placeholder {
    color: #a1a1a1;
    /* Màu placeholder nhẹ hơn để dễ đọc */
}

select {
    height: 100%;
    background: #2c3639;
    border: 1px solid #3a4249;
    border-radius: 10px;
    color: #fff;
    padding: 8px 12px;
}

select:focus {
    outline: none;
    border-color: #8e2de2;
    box-shadow: 0 0 5px rgba(142, 45, 226, 0.5);
}

/* Sidebar */
.sidebar {
    background: #1c2526;
    width: 250px;
    height: 100vh;
    position: fixed;
    padding: 1.5rem;
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #5e2bff #1c2526;
}

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1c2526;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #5e2bff;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #7b3fff;
}

.sidebar h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.sidebar h4:first-child {
    margin-top: 0;
}

/* Navigation Items */
.nav-item {
    margin-bottom: 0.5rem;
    position: relative;
}

.nav-item > a,
.sidebar a {
    color: #e9e9e9;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item > a i,
.sidebar a i {
    margin-right: 0.75rem;
    width: 16px;
    text-align: center;
}

.nav-item > a:hover,
.nav-item > a.active,
.sidebar a:hover,
.sidebar a.active {
    background: linear-gradient(135deg, #5e2bff, #2b1466);
    color: #fff;
}

/* Dropdown Arrow */
.dropdown-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.nav-item.active > a .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #232c2e;
    border-radius: 8px;
    margin-top: 0.5rem;
    margin-left: 1rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dropdown-menu.active {
    max-height: 300px;
}

.dropdown-menu a {
    color: #b8c0c2;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    margin: 0.25rem 0;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.dropdown-menu a i {
    margin-right: 0.5rem;
    width: 14px;
    text-align: center;
    opacity: 0.8;
}

.dropdown-menu a:hover {
    background: #2f3a3c;
    color: #fff;
    transform: translateX(5px);
}

.dropdown-menu a.active {
    background: linear-gradient(135deg, #4a00e0, #8e2de2);
    color: #fff;
}

a {
    text-decoration: none;
}

/* Hamburger Button */
.hamburger {
    display: none;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #5e2bff, #2b1466);
    border: none;
    border-radius: 10px;
    color: #fff;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hamburger:hover {
    background: linear-gradient(135deg, #4a00e0, #8e2de2);
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 2rem;
    transition: margin-left 0.3s ease-in-out;
    background: none;
}

/* Card */
.card {
    background: #1c2526;
    border: none;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.card h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.card p {
    color: #a1a1a1;
    font-size: 0.9rem;
}

/* Table Styles */
.activity-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #1a1f24;
    border-radius: 10px;
    overflow: hidden;
}

.activity-table th {
    background: linear-gradient(135deg, #5e2bff, #2b1466);
    color: #fff;
    padding: 12px 10px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: middle;
    font-size: 0.95em;
    color: #e0e0e0;
}

.activity-table tr:last-child td {
    border-bottom: none;
}

.activity-table tr:nth-child(even) {
    background-color: #222b2f;
}

.activity-table tr:hover {
    background-color: #2a3239;
    transition: background-color 0.2s ease;
}

.activity-table textarea {
    background: #2a3239;
    border: 1px solid #3a4249;
    color: #e0e0e0;
    resize: none;
    font-size: 0.9em;
    padding: 5px 8px;
    border-radius: 5px;
    width: 100%;
}

.activity-table textarea:focus {
    outline: none;
    border-color: #8e2de2;
    box-shadow: 0 0 5px rgba(142, 45, 226, 0.5);
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
    text-transform: capitalize;
}

.status-Completed {
    background: #34ff89;
    color: #000000;
}

.status-Canceled {
    background: #f1c40f;
    color: #1c2526;
}

.status-Partial {
    background: #f10f7c;
    color: #000000;
}


.status-Inprogress {
    background: #0bffef;
    color: #000000;
}

.status-Processing {
    background: #3498db;
    color: #fff;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 500;
}

/* Balance Box */
.balance-box {
    background: #2c3639;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.balance-box h6 {
    color: #a1a1a1;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.balance-box p {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
}

/* Button */
.btn-primary {
    background: linear-gradient(45deg, #4a00e0, #8e2de2);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 300;
    color: #fff;
    transition: opacity 0.2s ease;
}

.btn-primary:hover {
    opacity: 0.9;
}

/* Select (ghi đè style của Bootstrap) */
.form-select {
    background: #2a3239 !important;
    /* Nhạt hơn nền card (#1c2526) */
    border: 1px solid #3a4249 !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 0.95rem !important;
    padding: 8px 12px !important;
    height: 45px !important;
    -webkit-appearance: none !important;
    /* Xóa giao diện mặc định */
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url('data:image/svg+xml;utf8,<svg fill="white" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.form-select:focus {
    outline: none !important;
    border-color: #8e2de2 !important;
    box-shadow: 0 0 5px rgba(142, 45, 226, 0.5) !important;
}

/* Input (đồng bộ với select) */
.form-control {
    background: #2a3239 !important;
    border: 1px solid #3a4249 !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 0.95rem !important;
    padding: 8px 12px !important;
    height: 45px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.form-control::placeholder {
    color: #a1a1a1 !important;
}

.form-control:focus {
    outline: none !important;
    border-color: #8e2de2 !important;
    box-shadow: 0 0 5px rgba(142, 45, 226, 0.5) !important;
}


/* Responsive Design 768*/
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .hamburger {
        display: block;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1100;
    }

    .card {
        padding: 1rem;
    }

    .balance-box {
        margin-bottom: 1rem;
    }

    .btn-primary {
        padding: 0.5rem 1rem;
    }

    select,
    input {
        font-size: 0.9rem;
        padding: 6px 10px;
    }

    .activity-table th,
    .activity-table td {
        min-width: 100px;
    }

    .activity-table textarea {
        min-width: 200px;
    }
}

.btn-gradients {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    background: linear-gradient(45deg, #4b5ef7, #a64bf7, #f74b8c, #f7b04b);
    background-size: 400% 400%;
    animation: gradientAnimation 10s ease infinite;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

    100% {
        background-position: 0% 0%;
    }
}

.btn-gradients:hover {
    opacity: 0.9;
}

.btn-copy {
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: transform 0.2s ease;
    color: #fff;
    margin-left: 10px;
}

.btn-copy:hover {
    transform: scale(1.2);
    /* Enlarge by 20% on hover */
    color: #00ffcc;
    /* Optional: Change color on hover */
}

.btn-copy i {
    margin-right: 4px;
}

.search-form {
    margin-bottom: 20px;
}

.pagination {
    justify-content: center;
    margin-top: 20px;
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-field {
    flex: 1;
    min-width: 200px;
}

.search-form {
    width: 100%;
    /* Ensure the form takes full width of its container */
}

.search-form .d-flex {
    flex-wrap: nowrap;
    /* Prevent wrapping to the next line */
    gap: 10px;
    /* Add spacing between input and button */
}

.search-form .form-control {
    width: 200px;
    /* Fixed width for the input field */
    min-width: 150px;
    /* Minimum width to prevent shrinking too much */
    height: 38px;
    /* Consistent height */
}

.search-form .btn {
    height: 45px;
    /* Match input height */
    white-space: nowrap;
    /* Prevent button text from wrapping */
    padding: 0 50px;
    /* Compact padding for the button */
}

.pagination .page-link {
    color: #fff;
    background-color: #2c3e50;
    border-color: #2c3e50;
}

.pagination .page-item.active .page-link {
    background-color: #3498db;
    border-color: #3498db;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.6;
    cursor: not-allowed;
}

.api-doc {
    background-color: #1c2526;
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.api-doc h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.api-doc .doc-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

.api-doc .doc-item label {
    font-weight: bold;
}

.api-doc .doc-item span {
    color: #d3d3d3;
}

.api-doc .doc-item .value {
    color: #fff;
}

.api-doc .doc-item .redacted {
    color: rgb(255, 0, 0);
    border-radius: 12px;
}

.pagination .page-link {
    color: #fff;
    background-color: #2c3e50;
    border-color: #2c3e50;
}

.pagination .page-item.active .page-link {
    background-color: #3498db;
    border-color: #3498db;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-copy {
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: transform 0.2s ease;
    color: #fff;
    margin-left: 10px;
}

.btn-copy:hover {
    transform: scale(1.2);
    color: #00ffcc;
}

.btn-copy i {
    margin-right: 4px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

.loading-text {
    color: white;
    font-size: 18px;
    margin-top: 20px;
    font-family: 'Quicksand', sans-serif;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.fade-out {
    opacity: 0;
}
