.notification,
body.index-page .notification:not(.notification-confirm),
.notification-confirm {
    transition-timing-function: cubic-bezier(.22, .61, .36, 1) !important; /* smooth natural */
}

@media (prefers-reduced-motion: reduce) {
    .notification,
    body.index-page .notification:not(.notification-confirm),
    .notification-confirm {
        transition: none !important;
        animation: none !important;
    }
}
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    
    /* Color variables for Light Mode (default) */
    --bg-color: #f5f5f5;
    --surface-color: #fff;
    --text-color: #414141;
    --border-color: #e1e1e1;
    --input-border-color: #ccc;
    
    /* Shadow variables */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;

    /* Make footer sticky */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.dark-mode {
    /* Modern dark theme with a cooler, softer palette */
    --bg-color: #0d1117;
    --surface-color: #161b22;
    --text-color: #c9d1d9;
    --border-color: #30363d;
    --input-border-color: #484f58;
}

/* Modern Notification System */
.notification-container {
    position: fixed;
    top: 70px; /* Giảm từ 80px xuống 70px */
    right: 15px; /* Giảm từ 20px xuống 15px */
    z-index: 10000;
    pointer-events: none;
    max-width: 380px; /* Giảm từ 400px xuống 380px */
    min-width: 280px; /* Giảm từ 300px xuống 280px */
    width: auto;
    height: auto;
    display: block;
}

.notification {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px; /* Giảm từ 8px xuống 6px để gọn hơn */
    box-shadow: var(--shadow-md);
    margin-bottom: 6px; /* Giảm từ 8px xuống 6px để gọn hơn */
    padding: 12px; /* Giảm từ 14px xuống 12px */
    pointer-events: auto;
    position: relative;
    max-width: 380px; /* Giảm từ 400px xuống 380px */
    min-width: 280px; /* Giảm từ 300px xuống 280px */
    transform: translateX(100%);
    opacity: 0;
    transition: transform 220ms cubic-bezier(.22, .61, .36, 1), opacity 220ms ease-out;
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translate3d(100%, 0, 0);
    border-left: 3px solid var(--border-color); /* Giảm từ 4px xuống 3px */
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 10px; /* Giảm từ 12px xuống 10px */
    box-sizing: border-box;
}

.notification.show {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

.notification.hide {
    transform: translate3d(100%, 0, 0);
    opacity: 0;
    pointer-events: none;
    margin-bottom: 0;
    padding: 0;
    height: 0;
}

/* Confirm Dialog - Center positioned notifications */
.notification-confirm {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate3d(-50%, -50%, 0) scale(0.95) !important;
    opacity: 0 !important;
    pointer-events: none !important; /* disable interactions until shown */
    z-index: 10001 !important;
    max-width: 420px !important; /* Giảm từ 450px xuống 420px */
    min-width: 320px !important; /* Giảm từ 350px xuống 320px */
    width: auto !important;
    margin: 0 !important;
    padding: 16px !important; /* Thêm padding để kiểm soát spacing bên trong */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    background: #111827 !important; /* Even darker background for maximum contrast */
    border: 2px solid #374151 !important; /* Thicker border */
    border-radius: 8px !important; /* Đảm bảo border radius đồng nhất */
}

.notification-confirm.show {
    transform: translate3d(-50%, -50%, 0) scale(1) !important;
    opacity: 1 !important;
    pointer-events: auto !important; /* allow interactions when visible */
}

.notification-confirm.hide {
    transform: translate3d(-50%, -50%, 0) scale(0.9) !important;
    opacity: 0 !important;
}

/* Backdrop for confirm dialogs */
.notification-confirm::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    pointer-events: none; /* don't block clicks when dialog hidden */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-confirm.show::after {
    opacity: 1;
    pointer-events: auto; /* backdrop interactive only when visible */
}

/* Dark mode backdrop */
body.dark-mode .notification-confirm::after {
    background: rgba(0, 0, 0, 0.7);
}

/* Dark mode background for confirm dialogs */
body.dark-mode .notification-confirm {
    background: #1f2937 !important; /* Dark background for dark mode */
    border-color: #374151 !important; /* Dark border */
}

/* Mobile responsive for confirm dialogs */
@media (max-width: 480px) {
    .notification-confirm {
        max-width: 90vw !important;
        min-width: 260px !important; /* Giảm từ 280px xuống 260px */
        margin: 0 15px !important; /* Giảm từ 20px xuống 15px */
        padding: 14px !important; /* Giảm padding trên mobile */
    }
    
    .notification-container {
        right: 10px; /* Giảm khoảng cách từ cạnh phải trên mobile */
        max-width: calc(100vw - 20px);
        min-width: 250px;
    }
    
    .notification {
        max-width: calc(100vw - 20px);
        min-width: 250px;
        margin-bottom: 4px; /* Giảm spacing trên mobile */
        padding: 10px; /* Giảm padding trên mobile */
    }
}

@media (max-width: 320px) {
    .notification-confirm {
        max-width: 95vw !important;
        min-width: 240px !important; /* Giảm từ 260px xuống 240px */
        margin: 0 8px !important; /* Giảm từ 10px xuống 8px */
        padding: 12px !important; /* Giảm padding hơn nữa */
    }
    
    .notification {
        padding: 8px;
        gap: 8px;
        margin-bottom: 3px;
    }
}

/* Enhanced styling for confirm dialog buttons */
.notification-confirm .notification-buttons {
    margin-top: 16px !important; /* Giảm từ 20px xuống 16px */
    padding-top: 12px !important; /* Giảm từ 16px xuống 12px */
    border-top: 1px solid var(--border-color) !important;
}

.notification-confirm .confirm-btn {
    min-height: 40px !important; /* Giảm từ 44px xuống 40px */
    font-size: 13px !important; /* Giảm từ 14px xuống 13px */
    font-weight: 600 !important;
    padding: 10px 20px !important; /* Giảm từ 12px 24px xuống 10px 20px */
}

.notification-confirm .notification-content {
    padding-bottom: 0 !important;
}

/* Dark mode for confirm dialog buttons */
body.dark-mode .notification-confirm .notification-buttons {
    border-top-color: #374151 !important;
}

/* FORCE HIGH CONTRAST TEXT - OVERRIDE ALL OTHER STYLES */
.notification-confirm .notification-title,
.notification-confirm .notification-message,
.notification.notification-confirm .notification-title,
.notification.notification-confirm .notification-message,
body .notification-confirm .notification-title,
body .notification-confirm .notification-message {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px #000000 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.notification-confirm .notification-title,
.notification.notification-confirm .notification-title,
body .notification-confirm .notification-title {
    font-weight: 500 !important;
    font-size: 18px !important;
    letter-spacing: 1px !important;
}

.notification-confirm .notification-message,
.notification.notification-confirm .notification-message,
body .notification-confirm .notification-message {
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.6 !important;
}

/* Enhanced text colors for confirm dialogs - HIGH PRIORITY */
.notification-confirm .notification-title {
    color: #ffffff !important; /* Pure white for maximum contrast */
    font-weight: 500 !important; /* Medium weight với highlight qua màu sắc và shadow */
    font-size: 18px !important; /* Larger size */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important; /* Strong black shadow */
    letter-spacing: 1px !important; /* More spacing for clarity */
}

.notification-confirm .notification-message {
    color: #ffffff !important; /* Pure white for message too */
    font-size: 15px !important; /* Larger message text */
    line-height: 1.6 !important; /* More line spacing */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8) !important; /* Strong shadow */
    font-weight: 500 !important; /* Medium weight for better visibility */
}

/* Dark mode text for confirm dialogs */
body.dark-mode .notification-confirm .notification-title {
    color: #ffffff !important; /* Pure white for maximum contrast */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important; /* Subtle shadow for depth */
}

body.dark-mode .notification-confirm .notification-message {
    color: #e5e7eb !important; /* Light gray with good contrast */
}

/* Enhanced icon styling for confirm dialogs */
.notification-confirm .notification-icon {
    background: #92400e !important; /* Darker yellow/orange background for contrast */
    color: #fbbf24 !important; /* Bright yellow icon matching title */
    border: 2px solid #fbbf24 !important; /* Bright yellow border */
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.2) !important; /* Subtle glow effect */
}

body.dark-mode .notification-confirm .notification-icon {
    background: #92400e !important; /* Keep same for consistency */
    color: #fbbf24 !important; /* Bright yellow icon */
    border: 2px solid #fbbf24 !important; /* Bright yellow border */
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.2) !important; /* Subtle glow effect */
}

.notification::before {
    display: none; /* Remove the color bar since we use border-left now */
}

.notification-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.notification-icon svg {
    width: 14px;
    height: 14px;
    color: inherit;
}

.notification.success {
    border-left-color: #10b981;
}

.notification.error {
    border-left-color: #ef4444;
}

.notification.warning {
    border-left-color: #f59e0b;
}

.notification.info {
    border-left-color: #3b82f6;
}

.notification.success .notification-icon {
    background: #dcfce7;
    color: #166534;
}

.notification.error .notification-icon {
    background: #fecaca;
    color: #dc2626;
}

.notification.warning .notification-icon {
    background: #fef3c7;
    color: #d97706;
}

.notification.info .notification-icon {
    background: #dbeafe;
    color: #2563eb;
}

.notification-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    margin: 0 0 2px 0;
    color: #1f2937;
    line-height: 1.3;
}

.notification-message {
    font-size: 13px;
    line-height: 1.4;
    margin: 0 0 0 0;
    color: #6b7280;
    word-wrap: break-word;
    flex: 1;
}

.notification-message svg {
    flex-shrink: 0;
    vertical-align: middle;
}

.notification-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.notification-close svg {
    width: 14px;
    height: 14px;
}

/* Animation cho loading spinner */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Confirm Buttons trong Notification */
.confirm-btn {
    border: none !important;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: Arial, sans-serif;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
    text-align: center;
    color: white !important;
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
    opacity: 1 !important;
    visibility: visible !important;
}

.confirm-btn-primary {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.2);
    min-width: 80px;
}

.confirm-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, #059669, #047857) !important;
}

.confirm-btn-primary:active {
    transform: translateY(0);
}

.confirm-btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563) !important;
    color: white !important;
    box-shadow: 0 1px 3px rgba(107, 114, 128, 0.2);
}

.confirm-btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(107, 114, 128, 0.3);
    background: linear-gradient(135deg, #4b5563, #374151) !important;
}

.confirm-btn-secondary:active {
    transform: translateY(0);
}

/* Dark mode adjustments cho confirm buttons */
body.dark-mode .confirm-btn {
    color: white !important;
}

body.dark-mode .confirm-btn-primary {
    background: linear-gradient(135deg, #059669, #047857) !important;
    box-shadow: 0 1px 3px rgba(5, 150, 105, 0.3);
    color: white !important;
}

body.dark-mode .confirm-btn-primary:hover {
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.4);
    background: linear-gradient(135deg, #047857, #065f46) !important;
}

body.dark-mode .confirm-btn-secondary {
    background: linear-gradient(135deg, #4b5563, #374151) !important;
    box-shadow: 0 1px 3px rgba(75, 85, 99, 0.3);
    color: white !important;
}

body.dark-mode .confirm-btn-secondary:hover {
    box-shadow: 0 2px 6px rgba(75, 85, 99, 0.4);
    background: linear-gradient(135deg, #374151, #1f2937) !important;
}

/* High specificity để đảm bảo text hiển thị */
.notification .confirm-btn,
.notification .confirm-btn-primary,
.notification .confirm-btn-secondary {
    color: white !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-indent: 0 !important;
    text-shadow: none !important;
    letter-spacing: normal !important;
    padding: 10px 20px !important;
    margin: 6px 6px 0 0 !important;
    border-radius: 6px !important;
    min-width: 80px !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    touch-action: manipulation !important;
    border: none !important;
    outline: none !important;
    flex: 1 !important;
    max-width: 120px !important;
}

/* Button container để cân bằng layout */
.notification .confirm-buttons,
.notification .notification-buttons,
.notification div[style*="display: flex"] {
    display: flex !important;
    gap: 8px !important;
    margin-top: 8px !important;
    width: 100% !important;
    justify-content: flex-end !important;
    align-items: center !important;
}

/* Override any potential conflicts */
.notification-content .confirm-btn {
    color: white !important;
}

.notification-close:hover {
    color: #374151;
    background: #f3f4f6;
}

body.dark-mode .notification-close:hover {
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.1);
}

/* Dark mode improvements for notifications */
body.dark-mode .notification {
    background: #1f2937;
    border-color: #374151;
}

body.dark-mode .notification-title {
    color: #f9fafb;
}

body.dark-mode .notification-message {
    color: #d1d5db;
}

body.dark-mode .notification.success {
    border-left-color: #10b981;
}

body.dark-mode .notification.error {
    border-left-color: #ef4444;
}

body.dark-mode .notification.warning {
    border-left-color: #f59e0b;
}

body.dark-mode .notification.info {
    border-left-color: #3b82f6;
}

body.dark-mode .notification.success .notification-icon {
    background: #065f46;
    color: #34d399;
}

body.dark-mode .notification.error .notification-icon {
    background: #7f1d1d;
    color: #f87171;
}

body.dark-mode .notification.warning {
    border-left-color: #f59e0b;
}

body.dark-mode .notification.info {
    border-left-color: #3b82f6;
}

body.dark-mode .notification.success .notification-icon {
    background: #064e3b;
    color: #34d399;
}

body.dark-mode .notification.error .notification-icon {
    background: #7f1d1d;
    color: #f87171;
}

body.dark-mode .notification.warning .notification-icon {
    background: #78350f;
    color: #fbbf24;
}

body.dark-mode .notification.info .notification-icon {
    background: #1e3a8a;
    color: #60a5fa;
}

/* Progress bar for auto-dismiss */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width linear;
    border-radius: 0 0 8px 8px;
}

.notification.error .notification-progress {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.notification.warning .notification-progress {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.notification.info .notification-progress {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

body.dark-mode .notification-progress {
    background: linear-gradient(90deg, #10b981, #059669);
}

body.dark-mode .notification.error .notification-progress {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

body.dark-mode .notification.warning .notification-progress {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

body.dark-mode .notification.info .notification-progress {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

/* Responsive Design */
/* Medium screens (tablets) */
@media (max-width: 768px) and (min-width: 481px) {
    .notification-container {
        top: 12px; /* Giảm từ 16px xuống 12px */
        right: 12px; /* Giảm từ 16px xuống 12px */
        max-width: calc(100vw - 24px); /* Giảm từ 32px xuống 24px */
        padding-left: 2px; /* Giảm từ 4px xuống 2px */
    }
    
    .notification {
        padding: 12px 14px; /* Giảm padding */
        border-radius: 10px; /* Giảm từ 14px xuống 10px */
        max-width: calc(100vw - 28px); 
        min-width: 260px; /* Giảm từ 276px xuống 260px */
        margin-bottom: 6px; /* Giảm từ mặc định xuống 6px */
    }
    
    .notification .confirm-btn,
    .notification .confirm-btn-primary,
    .notification .confirm-btn-secondary {
        padding: 8px 16px !important; /* Giảm padding */
        min-width: 70px !important; /* Giảm từ 80px xuống 70px */
        height: 36px !important; /* Giảm từ 40px xuống 36px */
        font-size: 13px !important;
    }
    
    .notification .confirm-buttons,
    .notification .notification-buttons,
    .notification div[style*="display: flex"] {
        gap: 6px !important; /* Giảm từ 8px xuống 6px */
        margin-top: 6px !important; /* Giảm từ 8px xuống 6px */
        justify-content: flex-end !important;
    }
}

@media (max-width: 480px) {
    .notification-container {
        top: 8px; /* Giảm từ 12px xuống 8px */
        right: 12px; /* Giảm từ 16px xuống 12px */
        max-width: calc(100vw - 24px); /* Giảm từ 32px xuống 24px */
        padding-left: 2px; /* Giảm từ 4px xuống 2px */
    }
    
    .notification {
        margin-bottom: 6px; /* Giảm từ 8px xuống 6px */
        padding: 12px 14px; /* Giảm từ 14px 16px xuống 12px 14px */
        border-radius: 10px; /* Giảm từ 12px xuống 10px */
        transform: translateY(-100px); /* Giảm từ -120px xuống -100px */
        min-height: 48px; /* Giảm từ 52px xuống 48px */
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); /* Giảm shadow */
        max-width: calc(100vw - 28px); 
        min-width: 240px; /* Giảm từ 256px xuống 240px */
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .notification.hide {
        transform: translateY(-100px); /* Giảm từ -120px xuống -100px */
    }
    
    .notification-title {
        font-size: 14px;
        margin-bottom: 2px;
    }
    
    .notification-message {
        font-size: 13px;
        line-height: 1.3;
    }
    
    .notification-icon {
        width: 20px;
        height: 20px;
        margin-top: 1px;
    }
    
    .notification-icon svg {
        width: 14px;
        height: 14px;
    }
    
    /* Improve confirm buttons on mobile */
    .notification .confirm-btn,
    .notification .confirm-btn-primary,
    .notification .confirm-btn-secondary {
        font-size: 13px !important;
        padding: 12px 16px !important;
        min-width: 90px !important;
        height: 44px !important;
        border-radius: 8px !important;
        font-weight: 500 !important;
        flex: 1 !important;
        max-width: 140px !important;
    }
    
    .notification .confirm-buttons,
    .notification .notification-buttons,
    .notification div[style*="display: flex"] {
        gap: 10px !important;
        margin-top: 10px !important;
        display: flex !important;
        width: 100% !important;
        justify-content: flex-end !important;
    }
    
    /* Stack buttons vertically on very small screens */
    .notification-message {
        flex-direction: column;
        align-items: stretch;
    }
    
    .notification-message > div:last-child {
        display: flex;
        flex-direction: row;
        gap: 8px;
        margin-top: 8px;
        justify-content: flex-end;
    }
}

@media (max-width: 320px) {
    .notification-container {
        top: 6px; /* Giảm từ 8px xuống 6px */
        right: 8px; /* Giảm từ 12px xuống 8px */
        max-width: calc(100vw - 16px); /* Giảm từ 24px xuống 16px */
        padding-left: 2px; /* Giảm từ 4px xuống 2px */
    }
    
    .notification {
        padding: 10px 12px; /* Giảm từ 12px 14px xuống 10px 12px */
        border-radius: 8px; /* Giảm từ 10px xuống 8px */
        gap: 8px; /* Giảm từ 10px xuống 8px */
        max-width: calc(100vw - 20px); /* Giảm từ 28px xuống 20px */
        min-width: 200px; /* Giảm từ 236px xuống 200px */
        margin-bottom: 4px; /* Thêm margin-bottom nhỏ hơn */
    }
    
    .notification-icon {
        width: 16px; /* Giảm từ 18px xuống 16px */
        height: 16px; /* Giảm từ 18px xuống 16px */
        font-size: 10px; /* Giảm từ 11px xuống 10px */
    }
    
    .notification-icon svg {
        width: 10px; /* Giảm từ 12px xuống 10px */
        height: 10px; /* Giảm từ 12px xuống 10px */
    }
    
    .notification-title {
        font-size: 12px; /* Giảm từ 13px xuống 12px */
        margin-bottom: 1px; /* Giảm margin */
    }
    
    .notification-message {
        font-size: 11px; /* Giảm từ 12px xuống 11px */
    }
    
    .notification-close {
        width: 18px; /* Giảm từ 20px xuống 18px */
        height: 18px; /* Giảm từ 20px xuống 18px */
        padding: 1px; /* Giảm từ 2px xuống 1px */
    }
    
    .notification-close svg {
        width: 10px; /* Giảm từ 12px xuống 10px */
        height: 10px; /* Giảm từ 12px xuống 10px */
    }
    
    /* Make buttons more touch-friendly on very small screens */
    .notification .confirm-btn,
    .notification .confirm-btn-primary,
    .notification .confirm-btn-secondary {
        font-size: 10px !important; /* Giảm từ 11px xuống 10px */
        padding: 10px 12px !important; /* Giảm từ 12px 14px xuống 10px 12px */
        min-width: 60px !important; /* Giảm từ 70px xuống 60px */
        height: 40px !important; /* Giảm từ 44px xuống 40px */
        margin: 6px 3px 0 0 !important; /* Giảm margin */
        border-radius: 6px !important; /* Giảm từ 8px xuống 6px */
    }
    
    /* Stack buttons on very small screens */
    .notification-message > div:last-child {
        flex-direction: column;
        gap: 4px; /* Giảm từ 6px xuống 4px */
    }
    
    .notification .confirm-btn,
    .notification .confirm-btn-primary,
    .notification .confirm-btn-secondary {
        width: 100% !important;
        margin: 3px 0 !important; /* Giảm từ 4px xuống 3px */
    }
}

.page-header {
    background-color: var(--surface-color);
    padding: 12px 40px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s, border-bottom 0.3s;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 3px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 5px;
}

.theme-toggle-btn {
    background: none;
    border: none; /* Xóa đường viền */
    border-radius: 3px; /* Thêm bo tròn cho hiệu ứng hover */
    color: #f1c40f;
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease-in-out;
    outline: none; /* Loại bỏ viền focus */
}

.theme-toggle-btn:focus {
    outline: none; /* Đảm bảo không có viền khi focus */
}

.theme-toggle-btn:hover {
    transform: scale(0.9);
}

.theme-toggle-btn svg path {
    fill: currentColor;
}

.store-name {
    font-size: 24px;
    font-weight: bold;
}

.store-logo {
    max-height: 50px;
}

.main-content {
    display: flex;
    gap: 30px;
    padding: 28px;
    max-width: 1000px;
    margin: auto;
    flex-grow: 1; /* Allow this section to grow and push the footer down */
    width: 100%;
    box-sizing: border-box;
}

.payment-column {
    flex: 1.5;
}

.summary-column {
    flex: 1;
}

.payment-box, .summary-box {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 24px;
    transition: background-color 0.3s, border 0.3s;
}

h3 {
    margin-top: 0;
    font-size: 18px;
}

.transfer-info-section {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    align-items: flex-start;
}

.transfer-details {
    flex: 1;
}

.transfer-details h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: bold;
}

.info-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.info-row .label {
    min-width: 100px;
    font-weight: normal;
    color: var(--text-color);
}

.info-row .value {
    flex: 1;
    font-weight: bold;
    margin-right: 8px;
}

.qr-section {
    flex-shrink: 0;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    background-color: #f8f9fa;
    transition: background-color 0.3s, border 0.3s;
    max-width: 200px;
    width: 200px;
    box-sizing: border-box;
}

body.dark-mode .qr-section {
    background-color: #21262d;
    border-color: var(--border-color);
}

.qr-section h4 {
    margin: 0 0 10px 0;
    font-size: 12px;
    font-weight: bold;
    color: var(--text-color);
    word-wrap: break-word;
}

.qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.qr-img {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* QR Copy Button */
.qr-copy-btn {
    position: absolute;
    top: 0px;
    right: 8px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #dee2e6;
    padding: 6px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    z-index: 10;
}

.qr-container:hover .qr-copy-btn {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.qr-copy-btn:hover {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.qr-copy-btn:active {
    transform: scale(0.95);
}

.qr-copy-btn svg {
    display: block;
}

.qr-copy-btn svg path {
    stroke: currentColor;
}

/* Dark mode for QR copy button */
body.dark-mode .qr-copy-btn {
    background: rgba(73, 80, 87, 0.95);
    border-color: #6c757d;
    color: #c9d1d9;
}

body.dark-mode .qr-copy-btn:hover {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.copy-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.2s ease;
    min-width: 32px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.copy-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.copy-btn:active {
    background: #dee2e6;
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

body.dark-mode .copy-btn {
    background: #495057;
    border-color: #6c757d;
    color: var(--text-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

body.dark-mode .copy-btn:hover {
    background: #5a6268;
    border-color: #7d868f;
}

.copy-btn-small {
    background: #e3e3e3;
    border: 1px solid #ccc;
    padding: 2px 6px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 10px;
    transition: background-color 0.2s, transform 0.1s;
    min-width: 24px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    flex-shrink: 0;
}

.copy-btn-small:hover {
    background: #d4d4d4;
    transform: scale(0.95);
}

.copy-btn-small:active {
    background: #c0c0c0;
}

body.dark-mode .copy-btn-small {
    background: #484f58;
    border-color: #6e7681;
    color: var(--text-color);
}

body.dark-mode .copy-btn-small:hover {
    background: #5d6269;
}

.summary-value-with-copy {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

.copy-btn-inline {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 2px 6px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 10px;
    transition: all 0.2s ease;
    min-width: 22px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.copy-btn-inline:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.copy-btn-inline:active {
    background: #dee2e6;
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

body.dark-mode .copy-btn-inline {
    background: #495057;
    border-color: #6c757d;
    color: var(--text-color);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

body.dark-mode .copy-btn-inline:hover {
    background: #5a6268;
    border-color: #7d868f;
}

.highlight {
    color: #e53935;
    font-weight: bold;
}

.highlight2 {
    color: #000000;
    font-weight: bold;
}

body.dark-mode .highlight2 {
    color: #c9d1d9; /* Make highlight2 visible in dark mode */
}

.error-message {
    color: #e53935;
    font-size: 13px;
    margin-top: 5px;
    min-height: 1.2em;
}

.input-group {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group label {
    font-weight: bold;
    font-size: 14px;
}

.input-group input {
    padding: 8px;
    width: 100%; /* Đơn giản hóa nhờ box-sizing */
    border: 1px solid var(--input-border-color);
    border-radius: 4px;
    background-color: var(--surface-color);
    color: var(--text-color);
    transition: background-color 0.3s, border 0.3s, color 0.3s;
}

.create-transaction-section {
    margin-top: 16px;
    text-align: center;
}

.create-transaction-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.create-transaction-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.create-transaction-btn:active {
    transform: translateY(0);
}

.create-transaction-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.transaction-help-text {
    margin-top: 8px;
    color: #666;
}

/* Payment Complete Button (in summary box) */
.payment-complete-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: not-allowed;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(158, 158, 158, 0.3);
    margin-top: 16px;
}

/* Payment button states */
.payment-complete-btn.pending {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
    color: white;
    cursor: not-allowed;
    box-shadow: 0 2px 8px rgba(158, 158, 158, 0.3);
}

.payment-complete-btn.waiting {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    position: relative;
    overflow: hidden;
    cursor: not-allowed;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.payment-complete-btn.waiting::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: loading-sweep 2s infinite;
}

@keyframes loading-sweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

.payment-complete-btn.success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.payment-complete-btn.success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

/* Payment button layout for text and countdown */
.payment-complete-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.payment-complete-btn .btn-text {
    font-weight: bold;
}

.payment-complete-btn .btn-countdown {
    font-size: 12px;
    font-family: 'Courier New', monospace;
    opacity: 0.9;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.payment-complete-btn.waiting .btn-countdown {
    color: rgba(255, 255, 255, 0.9);
}

.payment-complete-btn.pending .btn-countdown {
    color: rgba(255, 255, 255, 0.8);
}

.countdown-text {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 4px;
}

.summary-box .summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

/* Summary Header Styles */
.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.summary-header h3 {
    margin: 0;
    font-size: 18px;
}

/* Payment Status Styles */
.payment-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    display: none; /* Hidden by default */
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.payment-status.show {
    display: inline-flex;
}

.payment-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

.payment-status.status-waiting {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.payment-status.status-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.payment-status.status-failed {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f1aeb5;
}

.payment-status.status-cancelled {
    background-color: #e2e3e5;
    color: #495057;
    border: 1px solid #ced4da;
}

/* Dark mode adjustments for payment status */
body.dark-mode .payment-status.status-waiting {
    background-color: #3d2f00;
    color: #ffeb3b;
    border-color: #5d4e00;
}

body.dark-mode .payment-status.status-success {
    background-color: #1b4332;
    color: #4caf50;
    border-color: #2d5a3d;
}

body.dark-mode .payment-status.status-failed {
    background-color: #4a1e1e;
    color: #f44336;
    border-color: #6d2c2c;
}

body.dark-mode .payment-status.status-cancelled {
    background-color: #2c2c2c;
    color: #9e9e9e;
    border-color: #424242;
}

/* Responsive adjustments for small screens */
@media (max-width: 480px) {
    .summary-header {
        align-items: flex-start;
        gap: 8px;
    }
    
    .summary-header h3 {
        font-size: 16px;
        margin: 0;
        flex: 1;
    }
    
    .payment-status {
        font-size: 10px;
        padding: 3px 8px;
        max-width: 120px;
    }
}

.summary-box .total {
    font-weight: bold;
    font-size: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: 16px;
    transition: border-top 0.3s;
}

.summary-note {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 12px;
    margin: 16px 0;
    font-size: 13px;
    line-height: 1.4;
}

.summary-note p {
    margin: 0;
    color: #6c757d;
}

.summary-note strong {
    color: #e53935;
}

body.dark-mode .summary-note {
    background-color: #21262d;
    border-color: var(--border-color);
}

body.dark-mode .summary-note p {
    color: #8b949e;
}

body.dark-mode .summary-note strong {
    color: var(--text-color);
}

.secure-payment-btn {
    background-color: #25a85c;
    color: white;
    border: none;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 16px;
}

.cancel-payment {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

.page-footer {
    text-align: center;
    padding: 15px;
    font-size: 12px;
    color: #888;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    transition: border-top 0.3s;
}

select {
    width: 100%;
    padding: 8px;
    margin-bottom: 16px;
    border: 1px solid var(--input-border-color);
    border-radius: 4px;
    background-color: var(--surface-color);
    color: var(--text-color);
    transition: background-color 0.3s, border 0.3s, color 0.3s;
}

.bank-selection {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding: 4px;
}

.bank-option {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--surface-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    flex-shrink: 0;
}

.bank-option:hover {
    border-color: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.bank-option.active {
    border-color: #4CAF50;
    background-color: #f8fff8;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

body.dark-mode .bank-option.active {
    background-color: #1a2e1a;
    border-color: #4CAF50;
}

.bank-option.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

.bank-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 4px;
}

.bank-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        padding: 16px;
    }
    .page-header {
        padding: 10px;
    }
    .transfer-info-section {
        flex-direction: column;
        gap: 15px;
    }
    .qr-section {
        max-width: 100%;
        width: 100%;
        align-self: center;
    }
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideInRight 0.3s ease-out;
}

.notification button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
}

.notification-success {
    background-color: #28a745;
}

.notification-error {
    background-color: #dc3545;
}

.notification-warning {
    background-color: #ffc107;
    color: #212529;
}

.notification-info {
    background-color: #17a2b8;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Transaction status styles */
.transaction-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
}

.status-pending {
    background-color: #ffc107;
    color: #212529;
}

.status-verified {
    background-color: #28a745;
    color: white;
}

.status-failed {
    background-color: #dc3545;
    color: white;
}

.status-expired {
    background-color: #6c757d;
    color: white;
}

/* Loading indicator */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

/* Confirm Dialog Buttons */
.confirm-btn {
    position: relative;
    overflow: hidden;
    user-select: none;
}

.confirm-btn:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.confirm-btn:active:before {
    width: 300px;
    height: 300px;
}

/* Protection Indicator Styles */
#protection-indicator {
    position: static !important; /* inline within header-left */
    margin-left: 8px !important;
    width: 22px !important;
    height: 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #10b981 !important; /* green lock */
    background: rgba(16, 185, 129, 0.12) !important;
    border-radius: 50% !important;
    animation: pulse 2s infinite !important;
}

#protection-indicator svg {
    width: 70% !important;
    height: 70% !important;
}

/* Responsive adjustments for protection indicator */
@media (max-width: 768px) {
    #protection-indicator {
        margin-left: 6px !important;
        width: 20px !important;
        height: 20px !important;
    }
}

@media (max-width: 480px) {
    #protection-indicator {
        margin-left: 6px !important;
        width: 18px !important;
        height: 18px !important;
    }
}

/* Ensure protection indicator doesn't conflict with notifications */
.notification-container.with-protection {
    margin-top: 60px !important;
}

@media (max-width: 480px) {
    .notification-container.with-protection {
        margin-top: 50px !important;
    }
}

/* Index page: enforce uniform notification sizing and spacing */
body.index-page .notification-container {
    position: fixed; /* center horizontally at the top */
    top: 12px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    display: grid;
    grid-auto-rows: auto; /* auto height to show full content */
    gap: 6px; /* tighter spacing */
    width: clamp(360px, 60vw, 820px); /* larger width so text can fit on big screens */
    pointer-events: auto; /* allow interactions with toasts */
}

/* Apply only to standard toasts, not confirm dialogs */
body.index-page .notification:not(.notification-confirm) {
    width: 100%;
    min-width: 0; /* allow container to control width */
    max-width: none;
    margin: 0; /* spacing handled by grid gap */
    padding: 12px 14px; /* comfortable padding */
    align-items: center; /* vertically center content */
    transform: translate3d(0, -12px, 0); /* vertical slide animation baseline */
    opacity: 0;
    position: relative !important; /* behave as grid items */
    top: auto !important; /* neutralize JS top stacking */
    right: auto !important;
    left: auto !important;
    pointer-events: none; /* hidden by default should not capture clicks */
}

/* Override slide animation to vertical for centered layout */
body.index-page .notification:not(.notification-confirm).show {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    pointer-events: auto; /* only visible toasts are interactive */
}

body.index-page .notification:not(.notification-confirm).hide {
    transform: translate3d(0, -12px, 0);
    opacity: 0;
}

/* Make inner layout consistent regardless of content length */
body.index-page .notification:not(.notification-confirm) .notification-content {
    display: grid;
    grid-template-rows: auto auto; /* allow message to grow */
    min-width: 0;
}

/* Clamp text so height stays fixed across messages */
body.index-page .notification:not(.notification-confirm) .notification-title {
    overflow: visible;
    white-space: nowrap; /* single line for large screens */
    margin-bottom: 2px;
}

body.index-page .notification:not(.notification-confirm) .notification-message {
    overflow: visible;
    white-space: nowrap; /* single line on large screens */
}

/* Keep icon and close button sized and aligned consistently */
body.index-page .notification:not(.notification-confirm) .notification-icon {
    width: 20px;
    height: 20px;
    margin-top: 0;
}

body.index-page .notification:not(.notification-confirm) .notification-close {
    width: 20px;
    height: 20px;
}

/* Responsive tweaks for small screens while keeping uniformity */
@media (max-width: 768px) {
    body.index-page .notification-container {
        width: calc(100vw - 24px);
        gap: 6px;
        grid-auto-rows: auto; /* grow by content */
    }
    body.index-page .notification:not(.notification-confirm) {
        padding: 10px 12px;
    }
    body.index-page .notification:not(.notification-confirm) .notification-message {
        white-space: normal; /* wrap on small screens */
    }
    body.index-page .notification:not(.notification-confirm) .notification-title {
        white-space: normal; /* wrap title if needed on smaller screens */
    }
}

@media (max-width: 320px) {
    body.index-page .notification-container {
        width: calc(100vw - 16px);
        gap: 4px;
        grid-auto-rows: auto;
    }
    body.index-page .notification:not(.notification-confirm) {
        padding: 10px 12px;
    }
}

/* Real-time Indicator */
.header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.realtime-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #10b981;
    transition: all 0.3s ease;
}

.realtime-indicator.disconnected {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.indicator-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.realtime-indicator.disconnected .indicator-dot {
    background: #ef4444;
    animation: none;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.5; 
        transform: scale(1.2);
    }
}

/* Dark mode for real-time indicator */
body.dark-mode .realtime-indicator {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

body.dark-mode .realtime-indicator.disconnected {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

body.dark-mode .indicator-dot {
    background: #34d399;
}

body.dark-mode .realtime-indicator.disconnected .indicator-dot {
    background: #f87171;
}