:root {
    --primary: #4e73df;
    --secondary: #6f42c1;
    --success: #1cc88a;
    --info: #36b9cc;
    --warning: #f6c23e;
    --danger: #e74a3b;
    --light: #f8f9fc;
    --dark: #5a5c69;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fc;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 2.5rem 0;
    text-align: center;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: rotate(30deg);
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    position: relative;
}

header p {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.logo {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.payment-container {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .payment-container {
        flex-direction: column;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    header p {
        font-size: 1.1rem;
    }
}

.payment-form, .payment-qr {
    flex: 1;
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 1.8rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.card-title {
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 1.2rem;
    border-bottom: 2px solid var(--light);
    padding-bottom: 0.7rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--dark);
}

input[type="text"],
input[type="number"],
input[type="password"],
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s;
}

input:focus, select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.2);
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
}

button:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.account-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 1.8rem;
    margin-bottom: 2rem;
    position: relative;
}

.list-group {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-group-item {
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-group-item:last-child {
    border-bottom: none;
}

.copy {
    background: transparent;
    border: 1px solid #ddd;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--dark);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: 10px;
    flex-shrink: 0;
}

.copy:hover {
    background: #f8f9fc;
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.1);
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    z-index: 1001;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.notification.success {
    background: var(--success);
}

.notification.error {
    background: var(--danger);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

footer {
    text-align: center;
    padding: 2.5rem 0;
    color: var(--dark);
    font-size: 0.95rem;
}

.payment-instruction {
    margin-top: 1.8rem;
    padding: 1.2rem;
    background-color: #f8f9fc;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.payment-instruction h3 {
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.py-3 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.stk {
    color: green;
    font-weight: bold;
}

.noidung {
    color: red;
    font-weight: bold;
}

.placeholder-text {
    color: #6c757d;
    font-style: italic;
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #6c757d;
    text-align: center;
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 25px;
    background-color: #f9f9f9;
}

.qr-placeholder i {
    font-size: 4.5rem;
    margin-bottom: 1.2rem;
    color: #b4b4b4;
}

.qr-placeholder p {
    font-size: 1.1rem;
    max-width: 80%;
}

.payment-success {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 10px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.payment-success i {
    font-size: 5rem;
    color: var(--success);
    margin-bottom: 1.5rem;
    animation: successScale 0.5s ease-in-out;
}

@keyframes successScale {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.qr-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.bank-info-list {
    display: none;
}

.bank-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    box-sizing: border-box;
    width: 100%;
}

.bank-info-item:last-child {
    border-bottom: none;
}

.bank-info-label {
    font-weight: 600;
    min-width: 170px;
    color: var(--dark);
    flex-shrink: 0;
}

.bank-info-value {
    flex: 1;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.stk-value {
    color: green;
    font-weight: bold;
    word-break: break-all;
}

.content-value {
    color: red;
    font-weight: bold;
    word-break: break-all;
    max-width: calc(100% - 40px);
}

.account-value {
    font-weight: bold;
}

.bank-value {
    font-weight: bold;
}

.countdown {
    margin-top: 15px;
    font-size: 15px;
    color: var(--dark);
    font-weight: 500;
}

.bank-info-container {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background: linear-gradient(to right, #f8f9fc, #e9ecef);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.book-selection {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fc;
    border-radius: 8px;
    border: 1px solid #e3e6f0;
}

.book-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.book-checkbox:hover {
    background-color: #e9ecef;
}

.book-checkbox input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

.book-checkbox label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

.total-amount {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--success) 0%, #17a673 100%);
    color: white;
    border-radius: 12px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.total-amount::before {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.total-amount::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: -15px;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.total-amount:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.total-amount i {
    font-size: 1.5rem;
    margin-right: 10px;
    vertical-align: middle;
}

.total-amount span {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.transaction-section {
    width: 100%;
    margin-top: 2rem;
}

.transaction-history {
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 15px;
}

.transaction-header h3 {
    margin: 0;
    color: var(--primary);
    font-size: 1.5rem;
}

.transaction-filter {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: white;
    font-size: 0.9rem;
    min-width: 120px;
}

.transaction-table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 8px;
    border: 1px solid #e3e6f0;
    max-height: 400px;
    overflow-y: auto;
}

.transaction-table {
    width: 100%;
    border-collapse: collapse;
}

.transaction-table th {
    background: linear-gradient(to bottom, #f8f9fc, #e9ecef);
    position: sticky;
    top: 0;
    z-index: 10;
}

.transaction-table th,
.transaction-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.transaction-table th {
    font-weight: 600;
    color: var(--dark);
    white-space: nowrap;
}

.transaction-table tr {
    transition: background-color 0.2s;
}

.transaction-table tr:hover {
    background-color: #f8f9fc;
}

.transaction-amount {
    font-weight: 600;
    color: var(--success);
    white-space: nowrap;
}

.transaction-status {
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    display: inline-block;
    min-width: 90px;
}

.status-completed {
    background-color: rgba(28, 200, 138, 0.15);
    color: var(--success);
    border: 1px solid rgba(28, 200, 138, 0.3);
}

.status-pending {
    background-color: rgba(246, 194, 62, 0.15);
    color: var(--warning);
    border: 1px solid rgba(246, 194, 62, 0.3);
}

.status-failed {
    background-color: rgba(231, 74, 59, 0.15);
    color: var(--danger);
    border: 1px solid rgba(231, 74, 59, 0.3);
}

.no-transactions {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.no-transactions i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ddd;
}

.transaction-description {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
    cursor: pointer;
}

.transaction-description:hover::after {
    content: attr(data-full);
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    width: 300px;
    white-space: normal;
    word-wrap: break-word;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 8px;
}

.pagination button {
    width: auto;
    padding: 8px 15px;
    background-color: #f8f9fc;
    color: var(--dark);
    border: 1px solid #ddd;
    font-size: 0.9rem;
    width: auto;
}

.pagination button:hover:not(.active):not(:disabled) {
    background-color: #e9ecef;
}

.pagination button.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .transaction-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .transaction-filter {
        width: 100%;
    }
    
    .filter-select {
        flex: 1;
        min-width: unset;
    }
    
    .transaction-table th,
    .transaction-table td {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .transaction-status {
        font-size: 0.75rem;
        padding: 4px 8px;
        min-width: 80px;
    }
    
    .total-amount {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    .total-amount span {
        font-size: 1.2rem;
    }
    
    .bank-info-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 10px;
    }
    
    .bank-info-label {
        min-width: unset;
        margin-bottom: 5px;
        width: 100%;
    }
    
    .bank-info-value {
        width: 100%;
        text-align: left;
        justify-content: flex-start;
        margin-top: 5px;
    }
    
    .copy {
        margin-left: 0;
        margin-top: 5px;
    }
    
    .content-value {
        max-width: calc(100% - 35px);
    }
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 2rem;
    color: var(--primary);
}

.loading-spinner i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
   100% { transform: rotate(360deg); }
}