/* ============================================
   ACCOUNT PAGES - COMMON STYLES
   Utilisé par: account.html, show_apikey.html, pricing.html
   ============================================ */

/* ============================================
   BASE LAYOUT
   ============================================ */

.account-section,
.apikey-section,
.pricing-section {
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    padding: 60px 0 80px;
    min-height: calc(100vh - 200px);
}

.page-header,
.account-header,
.pricing-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-header h1,
.account-header h1,
.pricing-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.page-header p,
.account-header p,
.pricing-header p {
    font-size: 1.2rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   CARDS & CONTAINERS
   ============================================ */

.info-card,
.account-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    max-width: 800px;
    margin: 0 auto 30px;
    border: 2px solid #e9ecef;
}

.info-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

/* ============================================
   SUBSCRIPTION STATUS BANNERS
   ============================================ */

.alert-subscription-status {
    border-radius: 16px;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.5s ease;
    margin-bottom: 30px;
    max-width: 100%;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alert Types */
.alert-active {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
}

.alert-trial {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ff9800;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
}

.alert-canceled {
    background: linear-gradient(135deg, #e2e3e5 0%, #d6d8db 100%);
    border: 2px solid #6c757d;
}

.alert-upgrade {
    background: linear-gradient(135deg, #cfe2ff 0%, #b6d4fe 100%);
    border: 2px solid #195eb3;
}

/* Alert Icons */
.alert-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.alert-active .alert-icon {
    color: #28a745;
}

.alert-trial .alert-icon {
    color: #ff9800;
}

.alert-danger .alert-icon {
    color: #dc3545;
}

.alert-canceled .alert-icon {
    color: #6c757d;
}

.alert-upgrade .alert-icon {
    color: #195eb3;
}

/* Alert Content */
.alert-content {
    flex-grow: 1;
}

.alert-content h4 {
    margin: 0 0 5px 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.alert-content p {
    margin: 0;
    font-size: 1rem;
}

.alert-active .alert-content h4 {
    color: #155724;
}

.alert-active .alert-content p {
    color: #1e7e34;
}

.alert-trial .alert-content h4 {
    color: #f57c00;
}

.alert-trial .alert-content p {
    color: #e65100;
}

.alert-danger .alert-content h4 {
    color: #721c24;
}

.alert-danger .alert-content p {
    color: #a71d2a;
}

.alert-canceled .alert-content h4 {
    color: #383d41;
}

.alert-canceled .alert-content p {
    color: #495057;
}

.alert-upgrade .alert-content h4 {
    color: #0d47a1;
}

.alert-upgrade .alert-content p {
    color: #084298;
}

.alert-content strong {
    font-weight: 700;
}

/* Alert Actions */
.alert-actions {
    flex-shrink: 0;
}

/* ============================================
   BUTTONS - ALERT BUTTONS
   ============================================ */

.btn-alert {
    display: inline-block;
    padding: 12px 28px;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.btn-alert:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: white;
    text-decoration: none;
}

.btn-alert i {
    margin-right: 8px;
}

.btn-success,
.btn-alert.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.btn-success:hover,
.btn-alert.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
}

.btn-trial,
.btn-alert.btn-trial {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.btn-trial:hover,
.btn-alert.btn-trial:hover {
    background: linear-gradient(135deg, #f57c00 0%, #ff9800 100%);
}

.btn-danger,
.btn-alert.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.btn-danger:hover,
.btn-alert.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
}

.btn-primary,
.btn-alert.btn-primary {
    background: linear-gradient(135deg, #195eb3 0%, #0d47a1 100%);
}

.btn-primary:hover,
.btn-alert.btn-primary:hover {
    background: linear-gradient(135deg, #0d47a1 0%, #195eb3 100%);
}

.btn-upgrade,
.btn-alert.btn-upgrade {
    background: linear-gradient(135deg, #195eb3 0%, #0d47a1 100%);
}

.btn-upgrade:hover,
.btn-alert.btn-upgrade:hover {
    background: linear-gradient(135deg, #0d47a1 0%, #195eb3 100%);
}

.btn-warning,
.btn-alert.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #000;
}

.btn-warning:hover,
.btn-alert.btn-warning:hover {
    background: linear-gradient(135deg, #ff9800 0%, #ffc107 100%);
    color: #000;
}

/* ============================================
   PLAN BADGES & STATUS BADGES
   ============================================ */

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-active {
    background-color: #d4edda;
    color: #155724;
}

.badge-trial {
    background-color: #cce5ff;
    color: #004085;
}

.badge-expired {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-canceled {
    background-color: #e2e3e5;
    color: #383d41;
}

.plan-badge-display,
.plan-badge-inline {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(25, 94, 179, 0.3);
}

.plan-badge-display.free,
.plan-badge-inline.free {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.plan-badge-display.starter,
.plan-badge-inline.starter {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.plan-badge-display.researcher,
.plan-badge-inline.researcher {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.plan-badge-display.standard,
.plan-badge-inline.standard {
    background: linear-gradient(135deg, #195eb3 0%, #0d47a1 100%);
    color: white;
}

.plan-badge-display.professional,
.plan-badge-inline.professional {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #000;
}

.plan-badge-display.enterprise,
.plan-badge-inline.enterprise {
    background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
    color: white;
}

/* ============================================
   INFO GRID & ITEMS
   ============================================ */

.info-grid {
    display: grid;
    gap: 30px;
}

.info-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #195eb3;
}

.info-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.info-label i {
    margin-right: 5px;
}

.info-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    word-break: break-all;
}

/* ============================================
   PLAN INFO
   ============================================ */

.plan-info {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #195eb3;
}

.plan-name-display {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

/* ============================================
   API KEY DISPLAY
   ============================================ */

.api-key-container,
.api-key-display {
    position: relative;
}

.api-key-value,
.api-key-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #e9ecef;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.api-key-text {
    flex: 1;
    font-size: 1rem;
    color: #495057;
    word-break: break-all;
    user-select: none;
}

.api-key-text.blurred {
    filter: blur(8px);
    cursor: pointer;
}

.api-key-text.revealed {
    filter: none;
    user-select: text;
}

.api-key-actions {
    display: flex;
    gap: 10px;
}

.btn-toggle-key,
.btn-copy-key,
.btn-api-action {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-toggle-key,
.btn-show,
.btn-api-action.btn-show {
    background: #195eb3;
    color: white;
}

.btn-toggle-key:hover,
.btn-show:hover,
.btn-api-action.btn-show:hover {
    background: #0d47a1;
    transform: translateY(-2px);
}

.btn-copy-key,
.btn-copy,
.btn-api-action.btn-copy {
    background: #28a745;
    color: white;
}

.btn-copy-key:hover,
.btn-copy:hover,
.btn-api-action.btn-copy:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-copy-key.copied,
.btn-copy.copied,
.btn-api-action.btn-copy.copied {
    background: #20c997;
}

.api-key-note {
    margin-top: 15px;
    padding: 12px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    color: #856404;
    font-size: 0.9rem;
}

.api-key-note i {
    color: #ffc107;
    margin-right: 8px;
}

/* ============================================
   STATS & USAGE
   ============================================ */

.stats-grid,
.usage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-card,
.usage-stat {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #dee2e6;
}

.stat-label,
.usage-stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value,
.usage-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #195eb3;
}

/* ============================================
   QUICK LINKS
   ============================================ */

.quick-links {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.quick-links h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
}

.links-grid,
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.quick-link,
.quick-link-btn {
    display: block;
    padding: 15px 20px;
    background: white;
    border: 2px solid #195eb3;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: #195eb3;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quick-link:hover,
.quick-link-btn:hover {
    background: #195eb3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(25, 94, 179, 0.3);
    text-decoration: none;
}

.quick-link i,
.quick-link-btn i {
    margin-right: 8px;
}

/* ============================================
   RENEW API KEY SECTION
   ============================================ */

.renew-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.btn-renew {
    width: 100%;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid #dc3545;
    background: white;
    color: #dc3545;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-renew:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.renew-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    color: #856404;
    font-size: 0.9rem;
}

.renew-warning i {
    color: #ffc107;
    margin-right: 8px;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */

.toast,
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    font-weight: 600;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast.show,
.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.toast i,
.toast-notification i {
    margin-right: 8px;
}

/* ============================================
   TEXT UTILITIES
   ============================================ */

.text-muted {
    color: #6c757d;
}

.text-danger {
    color: #dc3545;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .page-header h1,
    .account-header h1,
    .pricing-header h1 {
        font-size: 2rem;
    }
    
    .info-card,
    .account-card {
        padding: 25px;
    }
    
    .alert-subscription-status {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }
    
    .alert-icon {
        font-size: 2rem;
    }
    
    .btn-alert {
        width: 100%;
    }
    
    .api-key-value,
    .api-key-box {
        flex-direction: column;
        align-items: stretch;
    }
    
    .api-key-actions {
        width: 100%;
    }
    
    .btn-toggle-key,
    .btn-copy-key,
    .btn-api-action {
        flex: 1;
    }
    
    .stats-grid,
    .usage-stats {
        grid-template-columns: 1fr;
    }
    
    .links-grid,
    .quick-links-grid {
        grid-template-columns: 1fr;
    }
    
    .plan-name-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}