* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.header-text {
    flex: 1;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(15deg);
}

.main-panel {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 1px solid #e0e0e0;
}

/* Enhanced Auth Section */
.auth-form h2 {
    color: #2d3748;
    margin-bottom: 25px;
    font-size: 1.5rem;
    border-bottom: 2px solid #4facfe;
    padding-bottom: 10px;
    text-align: center;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrapper input {
    flex: 1;
    padding-right: 90px;
}

.toggle-password, .paste-code {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.toggle-password {
    right: 45px;
}

.paste-code {
    right: 5px;
}

.toggle-password:hover, .paste-code:hover {
    background-color: #f0f9ff;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    font-size: 13px;
}

.remember-option input {
    width: auto;
    margin: 0;
    padding: 0;
}

.quick-demo {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.quick-demo a {
    color: #4facfe;
    text-decoration: none;
    margin: 0 5px;
}

.quick-demo a:hover {
    text-decoration: underline;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    transition: all 0.3s ease;
    background: #f7fafc;
}

input[type="text"]:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
    background: white;
}

input[type="text"]::placeholder {
    text-transform: none;
    letter-spacing: normal;
    text-align: center;
}

small {
    color: #718096;
    font-size: 14px;
    display: block;
    margin-top: 5px;
    text-align: center;
}

/* Enhanced User Dashboard */
.user-info {
    margin-bottom: 30px;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.user-title-section {
    flex: 1;
}

.user-header h2 {
    color: #2d3748;
    margin: 0 0 8px 0;
    font-size: 1.8rem;
}

.user-auth-info {
    margin-top: 5px;
}

.auth-code-display {
    background: #f0f9ff;
    color: #4facfe;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.auth-code-display:hover {
    background: #4facfe;
    color: white;
    transform: translateY(-1px);
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.15);
}

.stat-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f0f9ff;
}

.credit-stat .stat-icon { background: linear-gradient(135deg, #fef3c7, #fcd34d); }
.download-stat .stat-icon { background: linear-gradient(135deg, #dbeafe, #60a5fa); }
.spending-stat .stat-icon { background: linear-gradient(135deg, #fce7f3, #f472b6); }
.recent-stat .stat-icon { background: linear-gradient(135deg, #ecfdf5, #34d399); }

.stat-content {
    flex: 1;
}

.stat-label {
    font-weight: 500;
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 4px;
    display: block;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2px;
}

.stat-trend {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Quick Actions */
.quick-actions {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.quick-actions h4 {
    color: #374151;
    margin: 0 0 15px 0;
    font-size: 1.1rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.quick-btn {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-size: 0.9rem;
}

.quick-btn:hover:not(:disabled) {
    border-color: #4facfe;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.2);
}

.quick-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quick-icon {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.quick-text {
    display: block;
    font-weight: 500;
    color: #374151;
}

/* Enhanced Dashboard Navigation */
.dashboard-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    justify-content: center;
    background: #f8fafc;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.nav-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #6b7280;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 80px;
    position: relative;
}

.nav-btn:hover:not(.active) {
    background: #e5e7eb;
    color: #374151;
    transform: translateY(-1px);
}

.nav-btn.active {
    background: #4facfe;
    color: white;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
}

.nav-icon {
    font-size: 1.2rem;
}

.nav-text {
    font-size: 0.85rem;
    display: block;
    margin-top: 2px;
}

.nav-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn.active .nav-count {
    background: #1e40af;
}

/* Dashboard Sections */
.dashboard-section {
    display: none;
}

.dashboard-section.active {
    display: block;
}

.dashboard-section h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #4facfe;
    padding-bottom: 10px;
}

.account-item {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.account-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.account-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.favorite-star {
    background: none !important;
    border: none !important;
    font-size: 20px !important;
    cursor: pointer !important;
    padding: 5px !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 35px !important;
    height: 35px !important;
}

.favorite-star:hover {
    background: #f0f9ff !important;
    transform: scale(1.1) !important;
}

.product-logo {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    transition: transform 0.3s ease;
}

.product-logo:hover {
    transform: scale(1.05);
}

.account-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
}

.price-tag {
    display: inline-block;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 10px;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.account-cost {
    background: #4facfe;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
}

.account-description {
    color: #4a5568;
    margin-bottom: 15px;
    line-height: 1.5;
}



.account-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid #e5e7eb;
    display: flex;
    flex-direction: row;
    gap: 16px;
    justify-content: stretch;
}

.quantity-selector, .buy-action-container {
    flex: 1 1 0;
    min-width: 0;
}

.buy-action-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.cost-display {
    display: flex;
    align-items: center;
}

.cost-display span {
    padding: 5px 10px;
    background: #f0f9ff;
    border: 1px solid #4facfe;
    border-radius: 6px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-selector label {
    font-weight: 500;
    color: #374151;
}

.quantity-selector input {
    padding: 5px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}

.btn-buy-now {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #257cff !important;
    color: #fff !important;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid #257cff !important;
    border-radius: 0 12px 12px 0;
    padding: 0 1.5em;
    box-shadow: 0 2px 8px rgba(37,124,255,0.04);
    cursor: pointer;
    transition: none;
    height: 56px;
}
.btn-buy-now:hover,
.btn-buy-now:active {
    background: #257cff !important;
    color: #fff !important;
    border-color: #257cff !important;
    transform: none;
}
.btn-buy-now:disabled {
    background: #257cff !important;
    color: #fff !important;
    border-color: #257cff !important;
    opacity: 1;
    cursor: not-allowed;
}
.btn-buy-now:disabled span, .btn-buy-now:disabled i {
    opacity: 0.5;
}

.btn-buy-now:hover:not(:disabled), .btn-buy-now:active:not(:disabled) {
    background: #005be8;
    color: #fff;
    border-color: #005be8;
    transform: translateY(-2px) scale(1.04);
}
.btn-buy-now:disabled {
    background: #257cff !important;
    color: #fff !important;
    border-color: #257cff !important;
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-buy-now[disabled]:not(:disabled) {
    /* Nếu bị set disabled nhưng vẫn bấm được (do JS), vẫn giữ màu xanh */
    background: #257cff;
    color: #fff;
    border-color: #257cff;
    cursor: pointer;
    opacity: 1;
}

@media (max-width: 768px) {
    .buy-action-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .btn-buy-now {
        min-width: 100px;
        max-width: 100%;
        width: 100%;
        font-size: 1rem;
        padding: 0.6em 1em;
    }
}

.btn-download {
    width: 80px;
    height: 36px;
    padding: 0 8px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px solid #cbd5e0;
    background: linear-gradient(135deg, #4ade80, #22d3ee);
    color: #166534;
}

.btn-download span {
    display: inline;
    font-size: 1em;
    font-weight: 700;
    line-height: 1;
}

@media (max-width: 768px) {
.account-actions {
        flex-direction: column;
        gap: 12px;
    }
    .btn-download {
        width: 70px;
        height: 32px;
        font-size: 0.85rem;
        padding: 0 6px;
        gap: 4px;
    }
    .buy-action-label, .quantity-selector label {
        font-size: 0.85rem;
}
}

/* Enhanced Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 12px;
    border: 1px solid #cbd5e0;
    flex: 1;
}

.quantity-selector label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    min-width: 70px;
}

.quantity-selector input[type="number"] {
    width: 70px;
    height: 36px;
    padding: 8px;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.quantity-selector input[type="number"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

.quantity-selector input[type="number"]::-webkit-outer-spin-button,
.quantity-selector input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-selector input[type="number"] {
    -moz-appearance: textfield;
}

/* Enhanced Cost Display */
.total-cost {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #92400e;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #fcd34d;
    box-shadow: 0 1px 3px rgba(251, 191, 36, 0.3);
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.total-cost::before {
    content: "💰";
    font-size: 0.8rem;
}

/* Account Actions Improvements */
.account-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid #e5e7eb;
    display: flex;
    flex-direction: row;
    gap: 16px;
    justify-content: stretch;
}

.buy-action-container {
    display: flex;
    flex-direction: row;
    gap: 16px;
    width: 100%;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 12px;
    border: 1px solid #cbd5e0;
    padding: 12px 16px;
    align-items: center;
    justify-content: stretch;
}

.buy-action-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #166534;
    min-width: 70px;
    margin-right: 8px;
}

.btn-buy-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #257cff;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid #257cff;
    border-radius: 12px;
    padding: 0.7em 1.5em;
    box-shadow: 0 2px 8px rgba(37,124,255,0.04);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    height: 40px;
}
.btn-buy-now:hover:not(:disabled), .btn-buy-now:active:not(:disabled) {
    background: #005be8;
    color: #fff;
    border-color: #005be8;
    transform: translateY(-2px) scale(1.04);
}
.btn-buy-now:disabled {
    background: #257cff !important;
    color: #fff !important;
    border-color: #257cff !important;
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-buy-now[disabled]:not(:disabled) {
    /* Nếu bị set disabled nhưng vẫn bấm được (do JS), vẫn giữ màu xanh */
    background: #257cff;
    color: #fff;
    border-color: #257cff;
    cursor: pointer;
    opacity: 1;
}

@media (max-width: 768px) {
    .buy-action-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .btn-buy-now {
        min-width: 100px;
        max-width: 100%;
        width: 100%;
        font-size: 1rem;
        padding: 0.6em 1em;
    }
}

.btn-download {
    width: 80px;
    height: 36px;
    padding: 0 8px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px solid #cbd5e0;
    background: linear-gradient(135deg, #4ade80, #22d3ee);
    color: #166534;
}

.btn-download span {
    display: inline;
    font-size: 1em;
    font-weight: 700;
    line-height: 1;
}

@media (max-width: 768px) {
    .account-actions {
        flex-direction: column;
        gap: 12px;
    }
    .btn-download {
        width: 70px;
        height: 32px;
        font-size: 0.85rem;
        padding: 0 6px;
        gap: 4px;
    }
    .buy-action-label, .quantity-selector label {
        font-size: 0.85rem;
    }
}

.btn-download:not(:disabled) {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
}

.btn-download:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
}

.btn-download:disabled {
    background: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
}



/* Responsive improvements */
@media (max-width: 768px) {
    .quantity-selector {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 12px;
    }
    
    .quantity-selector label {
        min-width: auto;
        font-size: 0.85rem;
    }
    
    .quantity-selector input[type="number"] {
        width: 80px;
        height: 32px;
    }
    
    .total-cost {
        font-size: 0.8rem;
    }
    
    .account-stats {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px;
    }
    
    .account-stats span {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .account-cost {
        padding: 6px 12px;
        font-size: 0.75rem;
        min-width: 80px;
    }
    
    .buy-action-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 12px;
    }
    
    .buy-action-label {
        min-width: auto;
        font-size: 0.85rem;
    }
    
    .btn-download {
        width: 70px;
        height: 32px;
        font-size: 0.8rem;
        padding: 0 6px;
        gap: 3px;
    }
    
    .btn-download span:first-child {
        font-size: 1rem;
    }
    
    .btn-download span:last-child {
        font-size: 0.7rem;
    }
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    width: 100%;
    padding: 15px;
    font-size: 18px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.btn-primary:disabled {
    background: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #4299e1;
    color: white;
}

.btn-secondary:hover {
    background: #3182ce;
    transform: translateY(-2px);
}

.btn-danger {
    background: #e53e3e;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-danger:hover {
    background: #c53030;
}

.btn-download {
    background: #48bb78;
    color: white;
    padding: 10px 20px;
}

.btn-download:hover {
    background: #38a169;
}

.btn-download:disabled {
    background: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.account-details h4 {
    color: #2d3748;
    margin-bottom: 10px;
}

.account-data {
    margin: 20px 0;
}

.account-data label {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.account-data textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    background: #f7fafc;
}

.download-info {
    background: #fffbeb;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
    margin-top: 20px;
}

.download-info p {
    margin: 5px 0;
    color: #92400e;
    font-weight: 500;
}

/* History Section */
.history-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.history-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.history-item:hover::before {
    opacity: 1;
}

.history-item:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    transform: translateY(-3px);
    border-color: #3b82f6;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.history-product-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.history-logo {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
}

.history-product-details {
    flex: 1;
}

.history-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

.history-description {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.4;
}

.order-code {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
    border: 2px solid #60a5fa;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.order-code:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    border-color: #3b82f6;
}

.history-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 10px;
}

.history-info-item {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 14px 16px;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
    transition: all 0.3s ease;
}

.history-info-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.history-info-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.history-info-value {
    font-size: 1.1rem;
    color: #1f2937;
    font-weight: 700;
}

/* Search Results Styling */
.search-result {
    border-left: 4px solid #4facfe;
    background: #f0f9ff;
}

.search-matches {
    font-size: 0.8rem;
    color: #3b82f6;
    font-weight: 600;
    margin-top: 4px;
}

.purchased-data-preview {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.purchased-data-preview h5 {
    color: #374151;
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.data-preview {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #4a5568;
    line-height: 1.4;
    max-height: 120px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    padding: 10px;
    background: #f7fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.data-preview mark {
    background: #fbbf24;
    color: #1f2937;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Help Section */
.help-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.help-section h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.4rem;
    text-align: center;
}

.help-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.help-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #4facfe;
}

.help-item h4 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.help-item ol,
.help-item ul {
    margin: 0;
    padding-left: 20px;
    color: #4a5568;
}

.help-item li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Alert Styles */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4facfe;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dark Mode Styles */
body.dark-mode {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: #e2e8f0;
}

body.dark-mode .main-panel {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

body.dark-mode .auth-form h2 {
    color: #f7fafc;
    border-bottom-color: #4facfe;
}

body.dark-mode .form-group label {
    color: #e2e8f0;
}

body.dark-mode input[type="text"] {
    background: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
}

body.dark-mode input[type="text"]:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}

body.dark-mode small {
    color: #a0aec0;
}

body.dark-mode .user-header h2 {
    color: #f7fafc;
}

body.dark-mode .user-header {
    border-bottom-color: #4a5568;
}

body.dark-mode .stat-item {
    background: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
}

body.dark-mode .stat-label {
    color: #a0aec0;
}

body.dark-mode .stat-value {
    color: #f7fafc;
}

body.dark-mode .stat-trend {
    color: #a0aec0;
}

body.dark-mode .dashboard-nav {
    background: #4a5568;
    border-color: #718096;
}

body.dark-mode .nav-btn {
    color: #a0aec0;
}

body.dark-mode .nav-btn:hover:not(.active) {
    background: #718096;
    color: #f7fafc;
}

body.dark-mode .nav-btn.active {
    background: #4facfe;
    color: white;
}

body.dark-mode .dashboard-section h3 {
    color: #f7fafc;
    border-bottom-color: #4facfe;
}

body.dark-mode .account-item {
    background: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
}

body.dark-mode .account-title {
    color: #f7fafc;
}

body.dark-mode .price-tag {
    background: linear-gradient(135deg, #047857, #065f46);
    color: #d1fae5;
}

body.dark-mode .account-description {
    color: #a0aec0;
}

body.dark-mode .account-actions {
    border-top-color: #718096;
}

body.dark-mode .quantity-selector {
    background: linear-gradient(135deg, #4a5568, #718096);
    border-color: #a0aec0;
}

body.dark-mode .quantity-selector label {
    color: #e2e8f0;
}

body.dark-mode .quantity-selector input[type="number"] {
    background: #2d3748;
    border-color: #718096;
    color: #e2e8f0;
}

body.dark-mode .quantity-selector input[type="number"]:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}

body.dark-mode .buy-action-container {
    background: linear-gradient(135deg, #2d3748, #4a5568);
    border-color: #718096;
}

body.dark-mode .buy-action-label {
    color: #e2e8f0;
}

body.dark-mode .modal-content {
    background: #2d3748;
    color: #e2e8f0;
}

body.dark-mode .modal-header h3 {
    color: #f7fafc;
}

body.dark-mode .close {
    color: #a0aec0;
}

body.dark-mode .close:hover {
    color: #f7fafc;
}

body.dark-mode .account-details h4 {
    color: #f7fafc;
}

body.dark-mode .account-data textarea {
    background: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
}

body.dark-mode .search-filter-panel,
body.dark-mode .history-filters {
    background: #4a5568;
    border-color: #718096;
}

body.dark-mode .search-group label,
body.dark-mode .filter-group label,
body.dark-mode .sort-group label {
    color: #e2e8f0;
}

body.dark-mode .search-group input {
    background: #2d3748;
    border-color: #718096;
    color: #e2e8f0;
}

body.dark-mode .search-group input:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}

body.dark-mode .filter-group select,
body.dark-mode .sort-group select {
    background: #2d3748;
    border-color: #718096;
    color: #e2e8f0;
}

body.dark-mode .filter-group select:focus,
body.dark-mode .sort-group select:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}

body.dark-mode .filter-stats {
    border-top-color: #718096;
    color: #a0aec0;
}

body.dark-mode .history-item {
    background: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
}

body.dark-mode .history-item:hover {
    background: #718096;
}

body.dark-mode .history-title {
    color: #f7fafc;
}

body.dark-mode .history-description {
    color: #a0aec0;
}

body.dark-mode .history-info-item {
    background: linear-gradient(135deg, #4a5568, #718096);
    border-left-color: #4facfe;
}

body.dark-mode .history-info-label {
    color: #a0aec0;
}

body.dark-mode .history-info-value {
    color: #f7fafc;
}

body.dark-mode .help-section {
    background: rgba(45, 55, 72, 0.95);
    color: #e2e8f0;
}

body.dark-mode .help-section h3 {
    color: #f7fafc;
}

body.dark-mode .help-item {
    background: #4a5568;
    border-left-color: #4facfe;
    color: #e2e8f0;
}

body.dark-mode .help-item h4 {
    color: #f7fafc;
}

body.dark-mode .help-item ol,
body.dark-mode .help-item ul {
    color: #a0aec0;
}

body.dark-mode .tfa-item {
    background: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
}

body.dark-mode .tfa-name {
    color: #f7fafc;
}

body.dark-mode .tfa-issuer {
    color: #a0aec0;
}

body.dark-mode .tfa-code {
    background: #2d3748;
    border-color: #718096;
    color: #f7fafc;
}

body.dark-mode .shared-account-card {
    background: linear-gradient(135deg, #4a5568, #2d3748);
}

body.dark-mode .shared-account-title {
    color: #f7fafc;
}

body.dark-mode .shared-account-email {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .shared-account-description {
    color: #a0aec0;
}

body.dark-mode .shared-account-input-card {
    background: linear-gradient(135deg, #4a5568, #2d3748);
    border-color: #718096;
}

body.dark-mode .shared-account-input-card .account-info h3 {
    color: #f7fafc;
}

body.dark-mode .shared-account-input-card .account-info p {
    color: #a0aec0;
}

body.dark-mode .shared-account-input-card .input-with-button input {
    background: #2d3748;
    border-color: #718096;
    color: #e2e8f0;
}

body.dark-mode .shared-account-input-card .input-with-button input:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}

body.dark-mode .shared-account-input-card .account-description small {
    color: #a0aec0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .main-panel {
        padding: 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .theme-toggle {
        order: -1;
        margin-bottom: 0.5rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .user-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .user-stats {
        grid-template-columns: 1fr;
    }
    
    .account-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .account-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    input[type="text"] {
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .help-content {
        grid-template-columns: 1fr;
    }
    
    .dashboard-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-btn {
        width: 100%;
    }
    
    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .history-info {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .history-item {
        padding: 20px;
        margin-bottom: 16px;
    }
    
    .order-code {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* Additional Button Styles */
.btn-info {
    background: #3182ce;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-info:hover {
    background: #2c5aa0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.history-actions {
    margin-top: 15px;
    text-align: center;
}

/* ========== ENHANCED UI COMPONENTS ========== */

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.section-title h3 {
    color: #2d3748;
    margin: 0 0 5px 0;
    font-size: 1.4rem;
}

.section-subtitle {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

.section-actions {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

/* Search and Filter Panels */
.search-filter-panel, .history-filters {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.search-filter-panel.collapsed {
    display: none;
}

.search-row, .filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    align-items: end;
    margin-bottom: 15px;
}

.search-group, .filter-group, .sort-group {
    display: flex;
    flex-direction: column;
}

.search-group label, .filter-group label, .sort-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.search-group input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    background: white;
}

.search-group input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.filter-group select, .sort-group select {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-group select:focus, .sort-group select:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.filter-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.history-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Enhanced Account Cards */
.account-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.account-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.account-item:hover::before {
    opacity: 1;
}

.account-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(79, 172, 254, 0.15);
    border-color: #4facfe;
}

/* Enhanced Modals */
.purchase-modal, .success-modal {
    max-width: 500px;
    border-radius: 16px;
    overflow: hidden;
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-header h3 {
    color: #1f2937;
    font-size: 1.5rem;
    margin: 0;
}

.product-preview {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.preview-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.preview-info h4 {
    color: #1f2937;
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.preview-info p {
    color: #6b7280;
    margin: 0;
    font-size: 0.9rem;
}

.purchase-details {
    margin-bottom: 25px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row.total-row {
    font-weight: 700;
    font-size: 1.1rem;
    border-top: 2px solid #e5e7eb;
    padding-top: 15px;
    margin-top: 10px;
}

.detail-row.remaining-row {
    color: #6b7280;
    font-size: 0.9rem;
}

.detail-label {
    color: #374151;
    font-weight: 500;
}

.detail-value {
    color: #1f2937;
    font-weight: 600;
}

.total-cost {
    color: #dc2626;
    font-size: 1.2rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #374151;
    transition: all 0.2s;
}

.qty-btn:hover {
    border-color: #4facfe;
    background: #f0f9ff;
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.purchase-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Success Modal */
.success-header {
    text-align: center;
    margin-bottom: 30px;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.order-info, .account-data-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.order-info h4, .account-data-section h4 {
    color: #1f2937;
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    text-align: center;
}

.order-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.order-detail:last-child {
    border-bottom: none;
}

.order-label {
    color: #6b7280;
    font-weight: 500;
}

.order-value {
    color: #1f2937;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.copy-btn {
    background: #4facfe;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 8px;
}

.data-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 10px;
}

.account-data-display {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: white;
    resize: vertical;
}

.success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Loading States */
.loading-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.skeleton-card, .skeleton-history {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 12px;
    padding: 20px;
    animation: skeleton-loading 2s infinite;
}

.skeleton-card {
    height: 200px;
}

.skeleton-history {
    height: 120px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #f9fafb;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-state h4 {
    color: #374151;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 0.95rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* Purchase Modal Styles */
.purchase-options {
    margin: 20px 0;
}

.purchase-options .form-group {
    margin-bottom: 20px;
}

.coupon-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.coupon-input-wrapper input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    text-transform: uppercase;
}

.coupon-input-wrapper input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.coupon-status {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

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

.coupon-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.coupon-status.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

.user-discount-display {
    background: #e8f5e8;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 12px;
}

.discount-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #155724;
}

.discount-info::before {
    content: "✅";
    font-size: 16px;
}

.purchase-summary {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 18px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.85rem;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row span:first-child {
    color: #6b7280;
    font-weight: 500;
}

.summary-row span:last-child {
    color: #374151;
    font-weight: 600;
}

.summary-row.total-row {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    margin: 15px -18px -18px -18px;
    padding: 16px 18px;
    border-radius: 0 0 12px 12px;
    border-bottom: none;
    border-top: 3px solid #10b981;
    font-size: 1rem;
}

.summary-row.total-row span {
    color: #047857;
    font-weight: 700;
}

/* Styling for Available/Sold info */
.summary-row.credits-row {
    background: #fef3c7;
    margin: 0 -18px;
    padding: 12px 18px;
    border-left: 4px solid #f59e0b;
    border-bottom: 1px solid #fbbf24;
}

.summary-row.credits-row span:first-child {
    color: #92400e;
    font-weight: 600;
}

.summary-row.credits-row span:last-child {
    color: #b45309;
    font-weight: 700;
}

.summary-row.after-purchase-row {
    background: #e0f2fe;
    margin: 0 -18px;
    padding: 12px 18px;
    border-left: 4px solid #0ea5e9;
    border-bottom: 1px solid #38bdf8;
}

.summary-row.after-purchase-row span:first-child {
    color: #0c4a6e;
    font-weight: 600;
}

.summary-row.after-purchase-row span:last-child {
    color: #0369a1;
    font-weight: 700;
}

.download-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Enhanced Button States */
.btn-loading .btn-text {
    display: none;
}

.btn-loading .btn-loading {
    display: inline-block !important;
}

/* Mobile Improvements */
@media (max-width: 768px) {
    .search-row, .filter-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .user-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .auth-input-wrapper input {
        padding-right: 50px;
        font-size: 16px;
    }
    
    .toggle-password {
        right: 10px;
    }
    
    .paste-code {
        display: none;
    }
    
    .dashboard-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 6px;
    }
    
    .nav-btn {
        flex: 1;
        min-width: 70px;
        padding: 10px 8px;
    }
    
    .nav-text {
        font-size: 0.9rem;
        display: block;
    }
    
    .purchase-actions, .success-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 5% auto;
        max-height: 90vh;
    }
    
    .purchase-summary {
        padding: 15px;
        margin: 15px 0;
    }
    
    .summary-row.credits-row,
    .summary-row.after-purchase-row {
        margin: 0 -15px;
        padding: 10px 15px;
    }
    
    .summary-row.total-row {
        margin: 12px -15px -15px -15px;
        padding: 14px 15px;
    }
}

/* 2FA Styles */
.tfa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tfa-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.tfa-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.15);
    border-color: #4facfe;
}

.tfa-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.tfa-info {
    flex: 1;
}

.tfa-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.tfa-issuer {
    font-size: 0.9rem;
    color: #6b7280;
    font-style: italic;
}

.tfa-actions {
    display: flex;
    gap: 5px;
}

.tfa-code-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tfa-code {
    flex: 1;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    position: relative;
    overflow: hidden;
}

.code-display {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: #1f2937;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.code-progress {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #27ae60;
    transition: width 0.1s linear;
    border-radius: 2px;
}

.tfa-timer {
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

/* Add 2FA Modal specific styles */
#add2faModal .form-group input {
    font-family: inherit;
    text-transform: none;
    letter-spacing: normal;
    text-align: left;
}

#add2faModal .form-group input[type="text"]#tfaSecret {
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Mobile responsiveness for 2FA */
@media (max-width: 768px) {
    .tfa-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tfa-code-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .tfa-code {
        width: 100%;
    }
    
    .code-display {
        font-size: 1.3rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}

/* ============ HISTORY TABLE STYLES ============ */

.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-top: 20px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.history-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border: none;
    position: relative;
}

.history-table th:first-child {
    width: 60px;
    text-align: center;
}

.history-table th:nth-child(2) {
    width: 140px;
}

.history-table th:nth-child(3) {
    width: auto;
    min-width: 200px;
}

.history-table th:nth-child(4) {
    width: 80px;
    text-align: center;
}

.history-table th:nth-child(5) {
    width: 120px;
    text-align: center;
}

.history-table th:nth-child(6) {
    width: 160px;
}

.history-table th:nth-child(7) {
    width: 200px;
    text-align: center;
}

.history-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.history-table tbody tr:hover {
    background-color: #f8fafc;
}

.history-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.history-table tbody tr:nth-child(even):hover {
    background-color: #f1f5f9;
}

.trans-id {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #4f46e5;
    cursor: pointer;
    transition: color 0.2s;
}

.trans-id:hover {
    color: #3730a3;
    text-decoration: underline;
}

.product-name {
    font-weight: 500;
    color: #1f2937;
}

.amount, .pay {
    text-align: center;
}

.amount-value {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.pay-value {
    display: inline-block;
    background: #fef3c7;
    color: #d97706;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.time {
    color: #6b7280;
    font-size: 13px;
}

.action {
    text-align: center;
}

.action-cell {
    text-align: center;
    white-space: nowrap;
}

.action .btn {
    margin: 0 2px;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.action .btn-info {
    background: #3b82f6;
    color: white;
}

.action .btn-info:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.action .btn-success {
    background: #10b981;
    color: white;
}

.action .btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
}

.empty-cell {
    text-align: center;
    padding: 40px;
}

.loading-cell {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

/* Responsive table */
@media (max-width: 768px) {
    .table-container {
        margin: 10px;
        border-radius: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .history-table {
        font-size: 12px;
        min-width: 800px; /* Ensure table has minimum width for scrolling */
    }
    
    .history-table th,
    .history-table td {
        padding: 8px 6px;
    }
    
    .history-table th:nth-child(3) {
        min-width: 150px;
    }
    
    .history-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
        min-width: 70px;
        margin: 0 1px;
    }
    
    .trans-id {
        font-size: 11px;
    }
    
    .product-name {
        font-size: 12px;
    }
    
    .time {
        font-size: 11px;
    }
    
    /* Add scroll indicator */
    .table-container::after {
        content: "← Swipe to scroll →";
        display: block;
        text-align: center;
        padding: 10px;
        background: #f8fafc;
        color: #6b7280;
        font-size: 0.8rem;
        font-style: italic;
        border-top: 1px solid #e2e8f0;
    }
}

/* ============ TABLE CONTROLS & PAGINATION STYLES ============ */

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.entries-control label {
    font-size: 14px;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.entries-control select {
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    color: #495057;
}

.table-info {
    font-size: 14px;
    color: #6c757d;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
}

.pagination-info {
    font-size: 14px;
    color: #6c757d;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-controls button {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.pagination-controls button:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #adb5bd;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-numbers button {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    min-width: 40px;
    transition: all 0.2s;
}

.page-numbers button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.page-numbers button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.page-numbers button.active:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.empty-state-cell {
    text-align: center;
    padding: 40px 20px;
}

.empty-state-cell .empty-state {
    margin: 0;
}

/* ============ SHARED ACCOUNTS STYLES ============ */

.shared-accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.shared-account-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 25px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.shared-account-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: rotate(45deg);
    pointer-events: none;
}

.shared-account-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.shared-account-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.shared-account-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.shared-account-email {
    font-size: 0.9rem;
    opacity: 0.9;
    font-family: 'Courier New', monospace;
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.shared-account-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.shared-account-description {
    background: rgba(255,255,255,0.1);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.shared-account-actions {
    display: flex;
    justify-content: center;
}

.btn-request-2fa {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-request-2fa:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: scale(1.05);
}

/* Updated Shared Accounts Styles */
.info-section {
    margin-bottom: 2rem;
}

.info-card {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.info-card h4 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.info-card ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.info-card li {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.info-card li::before {
    content: attr(data-icon);
    position: absolute;
    left: 0;
}

.request-2fa-container {
    margin-bottom: 2rem;
}

.request-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.request-card h4 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.quick-2fa-form .form-group {
    margin-bottom: 0;
}

.input-with-button {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.input-with-button input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.input-with-button input:focus {
    border-color: #667eea;
    outline: none;
}

.input-with-button button {
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
}

.totp-result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.totp-result-card h4 {
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.account-result-card {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.account-result-card h4 {
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.account-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.account-display .account-info {
    background: rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.info-row:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.account-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.account-actions .btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.account-actions .btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-1px);
}

.totp-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.totp-code-large {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5rem;
    text-align: center;
    background: rgba(255,255,255,0.1);
    padding: 1rem 2rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.totp-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 400px;
}

.account-info {
    background: rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 8px;
    text-align: left;
    flex: 1;
    margin-right: 1rem;
}

.totp-timer {
    display: flex;
    align-items: center;
}

.timer-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

.totp-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.totp-actions .btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.totp-actions .btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-1px);
}

.request-history-section {
    margin-top: 2rem;
}

.request-history-section h4 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.request-history-list {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-height: 120px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item:hover {
    background-color: #f7fafc;
}

.history-item-info {
    flex: 1;
}

.history-item-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.history-item-details {
    font-size: 0.875rem;
    color: #718096;
}

.history-item-time {
    font-size: 0.875rem;
    color: #a0aec0;
    text-align: right;
}

@media (max-width: 768px) {
    .totp-code-large {
        font-size: 2rem;
        letter-spacing: 0.25rem;
        padding: 0.75rem 1rem;
    }
    
    .totp-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .account-info {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .input-with-button {
        flex-direction: column;
        gap: 1rem;
    }
    
    .input-with-button button {
        width: 100%;
    }
}

/* Request History Styles */
.request-history-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

.request-history-section h4 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.request-history-grid {
    display: grid;
    gap: 15px;
}

.request-history-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.request-history-item:hover {
    border-color: #4facfe;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.1);
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.request-account-info {
    font-weight: 600;
    color: #2d3748;
}

.request-date {
    font-size: 0.9rem;
    color: #6b7280;
}

.request-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.request-totp-display {
    background: #f0f9ff;
    border: 2px solid #bfdbfe;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.request-totp-code {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
    letter-spacing: 2px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.request-totp-code:hover {
    color: #1d4ed8;
    transform: scale(1.05);
}

.totp-copy-hint {
    font-size: 0.8rem;
    color: #6b7280;
    font-style: italic;
}

/* Request 2FA Modal Styles */
#request2faModal .modal-content {
    max-width: 500px;
}

.account-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.account-info h4 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.account-info p {
    margin: 5px 0;
    color: #4a5568;
}

.totp-success {
    text-align: center;
    padding: 20px 0;
}

.totp-code-display {
    background: linear-gradient(135deg, #e8f5e8, #d4edda);
    border: 2px solid #28a745;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
}

.totp-code-display h4 {
    color: #155724;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.totp-code {
    font-family: 'Courier New', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: #155724;
    letter-spacing: 4px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255,255,255,0.7);
    border-radius: 10px;
    user-select: all;
}

.totp-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.usage-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    color: #856404;
}

.usage-info p {
    margin: 0 0 5px 0;
    font-weight: 600;
}

.usage-info small {
    font-size: 0.85rem;
    color: #6c5700;
}

/* Mobile Responsiveness for Shared Accounts */
@media (max-width: 768px) {
    .shared-accounts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .shared-account-card {
        padding: 20px;
    }
    
    .shared-account-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .shared-account-title {
        font-size: 1.1rem;
    }
    
    .request-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .totp-code {
        font-size: 2rem;
        letter-spacing: 2px;
    }
    
    .totp-actions {
        flex-direction: column;
    }
    
    .totp-actions button {
        width: 100%;
    }
}

/* Shared Accounts Input Interface */
.shared-accounts-input-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.shared-accounts-input-section .input-group {
    margin-bottom: 2rem;
}

.shared-accounts-input-section .input-group label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.shared-accounts-input-section .input-with-button {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.shared-accounts-input-section .input-with-button input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
    transition: all 0.3s ease;
}

.shared-accounts-input-section .input-with-button input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.shared-accounts-input-section .input-with-button button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.shared-accounts-input-section .input-with-button button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.shared-accounts-input-section .shared-accounts-info {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid #667eea;
}

.shared-accounts-input-section .info-card h4 {
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shared-accounts-input-section .info-card p {
    color: #4a5568;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.shared-accounts-input-section .info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shared-accounts-input-section .info-card li {
    color: #4a5568;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.5;
}

.shared-accounts-input-section .info-card li:last-child {
    margin-bottom: 0;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .shared-accounts-input-section {
        padding: 1rem;
    }
    
    .shared-accounts-input-section .input-with-button {
        flex-direction: column;
        gap: 1rem;
    }
    
    .shared-accounts-input-section .input-with-button input,
    .shared-accounts-input-section .input-with-button button {
        width: 100%;
    }
}

/* Shared Accounts Input Cards */
.shared-account-input-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.shared-account-input-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #cbd5e0;
}

.shared-account-input-card .account-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.shared-account-input-card .account-icon {
    font-size: 2.5rem;
    margin-right: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.shared-account-input-card .account-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 0.5rem 0;
}

.shared-account-input-card .account-info p {
    font-size: 0.9rem;
    color: #718096;
    margin: 0;
}

.shared-account-input-card .input-section {
    margin-bottom: 1rem;
}

.shared-account-input-card .input-group label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.75rem;
}

.shared-account-input-card .input-with-button {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.shared-account-input-card .input-with-button input {
    flex: 1;
    padding: 1.25rem;
    border: 2px solid #cbd5e0;
    border-radius: 12px;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 3px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.shared-account-input-card .input-with-button input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: scale(1.02);
}

.shared-account-input-card .input-with-button input::placeholder {
    color: #a0aec0;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.shared-account-input-card .btn-request-2fa {
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.shared-account-input-card .btn-request-2fa:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.shared-account-input-card .account-description {
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 1rem;
}

.shared-account-input-card .account-description small {
    color: #718096;
    font-style: italic;
    line-height: 1.5;
}

/* Grid layout for cards */
.shared-accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

/* Loading and empty states */
.loading-state, .empty-state {
    text-align: center;
    padding: 3rem;
    color: #718096;
}

.loading-icon, .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.loading-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .shared-accounts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.5rem;
    }
    
    .shared-account-input-card {
        padding: 1.5rem;
    }
    
    .shared-account-input-card .input-with-button {
        flex-direction: column;
        gap: 1rem;
    }
    
    .shared-account-input-card .input-with-button input,
    .shared-account-input-card .btn-request-2fa {
        width: 100%;
    }
    
    .shared-account-input-card .account-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .shared-account-input-card .account-icon {
        margin-right: 0;
    }
}

/* Shared Accounts Input Cards - Compact Design */
.shared-account-input-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.shared-account-input-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #48bb78 100%);
}

.shared-account-input-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: #cbd5e0;
}

.shared-account-input-card .account-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.shared-account-input-card .account-icon {
    font-size: 2rem;
    margin-right: 1rem;
    padding: 0.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    min-width: 60px;
    text-align: center;
}

.shared-account-input-card .account-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 0.3rem 0;
}

.shared-account-input-card .account-info p {
    font-size: 0.85rem;
    color: #718096;
    margin: 0;
}

.shared-account-input-card .input-section {
    margin-bottom: 0.8rem;
}

.shared-account-input-card .input-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.shared-account-input-card .input-with-button {
    display: flex;
    gap: 0.8rem;
    align-items: stretch;
}

.shared-account-input-card .input-with-button input {
    flex: 1;
    padding: 0.9rem;
    border: 2px solid #cbd5e0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.shared-account-input-card .input-with-button input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    transform: scale(1.01);
}

.shared-account-input-card .input-with-button input::placeholder {
    color: #a0aec0;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.shared-account-input-card .btn-request-2fa {
    padding: 0.9rem 1.5rem;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
    min-width: 130px;
}

.shared-account-input-card .btn-request-2fa:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.shared-account-input-card .account-description {
    padding-top: 0.8rem;
    border-top: 1px solid #f1f5f9;
    margin-top: 0.8rem;
}

.shared-account-input-card .account-description small {
    color: #718096;
    font-style: italic;
    line-height: 1.4;
    font-size: 0.8rem;
}

/* Compact Grid layout for cards */
.shared-accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Loading and empty states */
.loading-state, .empty-state {
    text-align: center;
    padding: 3rem;
    color: #718096;
    grid-column: 1 / -1;
}

.loading-icon, .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.loading-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .shared-accounts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.5rem;
    }
    
    .shared-account-input-card {
        padding: 1.2rem;
    }
    
    .shared-account-input-card .input-with-button {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .shared-account-input-card .input-with-button input,
    .shared-account-input-card .btn-request-2fa {
        width: 100%;
    }
    
    .shared-account-input-card .account-header {
        flex-direction: row;
        text-align: left;
    }
    
    .shared-account-input-card .account-icon {
        margin-right: 1rem;
        min-width: 50px;
        font-size: 1.5rem;
        padding: 0.6rem;
    }
    
    .shared-account-input-card .account-info h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .shared-account-input-card .account-header {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
    
    .shared-account-input-card .account-icon {
        margin-right: 0;
    }
}

/* Enhanced Account Stats */
.account-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.account-stats span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.account-stats span:first-child {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    border: 1px solid #22c55e;
}

.account-stats span:last-child {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border: 1px solid #3b82f6;
}

.account-stats span:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Enhanced Account Cost Badge - Redesigned */
.account-cost {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #92400e;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    border: 2px solid #fcd34d;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    min-width: 90px;
    justify-content: center;
}

.account-cost::before {
    content: "💎";
    font-size: 0.9rem;
}

.btn-buy-now {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #257cff !important;
    color: #fff !important;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid #257cff !important;
    border-radius: 0 12px 12px 0;
    padding: 0 1.5em;
    box-shadow: 0 2px 8px rgba(37,124,255,0.04);
    cursor: pointer;
    transition: none;
    height: 56px;
}
.btn-buy-now:hover,
.btn-buy-now:active {
    background: #257cff !important;
    color: #fff !important;
    border-color: #257cff !important;
    transform: none;
}
.btn-buy-now:disabled {
    background: #257cff !important;
    color: #fff !important;
    border-color: #257cff !important;
    opacity: 1;
    cursor: not-allowed;
}
.btn-buy-now:disabled span, .btn-buy-now:disabled i {
    opacity: 0.5;
}
.btn-buy-now span {
    display: inline-flex;
    align-items: center;
    font-size: 1.1em;
    font-weight: 700;
    line-height: 1;
}

.buy-now-simple-box {
    border: 2px solid #000;
    background: #fff;
    color: #111;
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    padding: 32px 0;
    border-radius: 8px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 2px;
    margin-top: 0;
}

.buy-action-container.buy-action-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: #fff;
    border-radius: 12px;
    border: none;
    padding: 0;
    width: 100%;
    min-height: 0;
    height: 60px;
}
.btn-buy-now {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #257cff !important;
    color: #fff !important;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid #257cff !important;
    border-radius: 0 12px 12px 0;
    padding: 0 1.5em;
    box-shadow: 0 2px 8px rgba(37,124,255,0.04);
    cursor: pointer;
    transition: none;
    height: 56px;
}
.btn-buy-now:hover,
.btn-buy-now:active {
    background: #257cff !important;
    color: #fff !important;
    border-color: #257cff !important;
    transform: none;
}
.btn-buy-now:disabled {
    background: #257cff !important;
    color: #fff !important;
    border-color: #257cff !important;
    opacity: 1;
    cursor: not-allowed;
}
.btn-buy-now:disabled span, .btn-buy-now:disabled i {
    opacity: 0.5;
}
.btn-buy-now span {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.history-table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 2rem;
}
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    background: #fff;
}
.history-table th, .history-table td {
    border: 1px solid #e5e7eb;
    padding: 10px 14px;
    text-align: center;
}
.history-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #222;
    font-size: 1.05rem;
}
.history-table tbody tr:hover {
    background: #f0f6ff;
}
.history-amount {
    color: #0066ff;
    font-weight: 700;
}
.history-pay {
    color: #ff0000;
    font-weight: 700;
}
.amount-badge {
    color: #0066ff;
    font-weight: 700;
}
.pay-badge {
    color: #ff0000;
    font-weight: 700;
}
.history-btn {
    border: none;
    outline: none;
    padding: 8px 16px;
    margin: 0 3px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    text-align: center;
    white-space: nowrap;
}
.history-btn.see-more {
    background: #2563eb;
    color: #fff;
}
.history-btn.see-more:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}
.history-btn.download {
    background: #10b981;
    color: #fff;
}
.history-btn.download:hover {
    background: #059669;
    transform: translateY(-1px);
}
.history-btn.delete {
    background: #f59e42;
    color: #fff;
}
.history-btn.delete:hover {
    background: #d97706;
    transform: translateY(-1px);
}

/* Additional mobile improvements */
@media (max-width: 768px) {
    /* Improve form inputs on mobile */
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.75rem;
    }
    
    /* Better button spacing on mobile */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Improve modal on mobile */
    .modal {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Better table responsiveness */
    .history-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .history-table {
        min-width: 800px;
    }
    
    /* Ensure action buttons are visible on mobile */
    .action-cell {
        min-width: 160px;
    }
}