/**
 * JagLab AI Frontend Styles
 */

.jaglab-dashboard {
    max-width: 800px;
}

.jaglab-dashboard h2 {
    margin-top: 0;
    margin-bottom: 30px;
}

/* Notice */
.jaglab-notice {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.jaglab-notice-info {
    background: #e3f2fd;
    color: #1565c0;
}

/* License Card */
.jaglab-license-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 30px;
    overflow: hidden;
}

.jaglab-license-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
}

.jaglab-license-tier {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tier-badge {
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.tier-badge.tier-starter { background: rgba(66, 165, 245, 0.3); }
.tier-badge.tier-pro { background: rgba(171, 71, 188, 0.3); }
.tier-badge.tier-team { background: rgba(255, 167, 38, 0.3); }
.tier-badge.tier-business { background: rgba(76, 175, 80, 0.3); }
.tier-badge.tier-enterprise_selfhosted { background: rgba(255, 215, 0, 0.3); }

.jaglab-license-status {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 3px;
    background: rgba(255,255,255,0.2);
}

.jaglab-license-status.status-active {
    background: rgba(76, 175, 80, 0.3);
}

.jaglab-license-status.status-suspended {
    background: rgba(255, 152, 0, 0.3);
}

.jaglab-license-key {
    text-align: right;
}

.jaglab-license-key label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 5px;
}

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

.key-display code {
    background: rgba(0,0,0,0.2);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    color: #fff;
}

.jaglab-copy-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.jaglab-copy-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* =============================================================================
   Tabs Navigation
   ============================================================================= */

.jaglab-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    background: #fafbfc;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.jaglab-tab {
    background: none;
    border: none;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.jaglab-tab:hover {
    color: #333;
    background: rgba(102, 126, 234, 0.05);
}

.jaglab-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #fff;
}

.jaglab-tab .tab-count {
    background: #667eea;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

/* Tab Content */
.jaglab-tab-content {
    padding: 0;
}

.jaglab-dashboard .jaglab-tab-pane {
    display: none !important;
    padding: 20px;
}

.jaglab-dashboard .jaglab-tab-pane.active {
    display: block !important;
}

/* Overview Grid */
.jaglab-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.jaglab-overview-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

.jaglab-overview-card h4 {
    margin: 0 0 12px 0;
    font-size: 12px;
}

.credits-balance-large {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.credits-balance-large.over-limit {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.credits-hint {
    font-size: 12px;
    color: #888;
    margin: 5px 0 0 0;
}

/* Quickstart Compact */
.jaglab-quickstart-compact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 13px;
}

.jaglab-quickstart-compact strong {
    margin-right: 10px;
}

/* Create Key Section */
.jaglab-create-key {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.jaglab-create-key h4 {
    margin: 0 0 15px 0;
}

.jaglab-create-key .key-count {
    font-weight: normal;
    color: #888;
}

/* Usage History Header */
.usage-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.usage-history-header h4 {
    margin: 0;
}

/* Credits Balance Section */
.jaglab-credits-balance-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
}

.credits-balance-display {
    margin-bottom: 10px;
}

.credits-balance-display .credits-label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.credits-balance-display .credits-amount {
    font-size: 36px;
    font-weight: 800;
}

.jaglab-credits-balance-section .jaglab-credits-info {
    color: rgba(255,255,255,0.85);
    margin: 0;
}

/* Resources Grid */
.jaglab-resources-grid {
    display: grid;
    gap: 25px;
}

.jaglab-resource-section h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #333;
}

.jaglab-resource-section pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0 0 0;
    font-size: 13px;
}

.jaglab-resource-section code {
    font-family: 'Monaco', 'Consolas', monospace;
}

/* Sections */
.jaglab-usage-section,
.jaglab-engines-section,
.jaglab-apikeys-section,
.jaglab-quickstart {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.jaglab-quickstart {
    border-bottom: none;
}

.jaglab-license-card h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Usage Bar */
.jaglab-usage-bar {
    background: #e0e0e0;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.jaglab-usage-bar .usage-progress {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.jaglab-usage-info {
    font-size: 14px;
    color: #666;
}

.jaglab-usage-info .usage-count {
    font-weight: 600;
    color: #333;
    font-size: 18px;
}

.jaglab-usage-info .usage-sep {
    margin: 0 5px;
}

.jaglab-period-end {
    color: #888;
    font-size: 13px;
    margin-top: 10px;
    margin-bottom: 0;
}

/* Engines */
.jaglab-engines {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.jaglab-engine {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 8px;
    background: #f5f5f5;
    font-weight: 500;
}

.jaglab-engine.enabled {
    background: #e8f5e9;
    color: #2e7d32;
}

.jaglab-engine.disabled {
    background: #f5f5f5;
    color: #9e9e9e;
}

.jaglab-engine .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* API Keys Table */
.jaglab-apikeys-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.jaglab-apikeys-table th,
.jaglab-apikeys-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.jaglab-apikeys-table th {
    font-size: 12px;
    text-transform: uppercase;
    color: #888;
    font-weight: 500;
}

.jaglab-apikeys-table code {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.jaglab-revoke-key {
    color: #dc3545 !important;
    cursor: pointer;
}

.jaglab-no-keys {
    color: #888;
    font-style: italic;
    margin: 0;
}

/* Create Key Form */
.jaglab-create-key-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.jaglab-create-key-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.jaglab-create-key-form .button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.jaglab-create-key-form .button:hover {
    opacity: 0.9;
}

/* Quick Start */
.jaglab-quickstart ol {
    margin: 0 0 15px 20px;
    padding: 0;
}

.jaglab-quickstart li {
    margin-bottom: 8px;
    color: #555;
}

/* Modal */
.jaglab-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jaglab-modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    text-align: center;
}

.jaglab-modal-content h3 {
    margin-top: 0;
    color: #2e7d32;
}

.jaglab-modal-content .key-display {
    justify-content: center;
    margin: 20px 0;
}

.jaglab-modal-content code {
    background: #f5f5f5;
    padding: 12px 20px;
    font-size: 16px;
    color: #333;
}

/* Stripe Card Element */
#jaglab-stripe-card-element {
    background: #fff;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

#jaglab-stripe-card-element.StripeElement--focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

#jaglab-stripe-card-element.StripeElement--invalid {
    border-color: #dc3545;
}

#jaglab-stripe-card-errors {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.jaglab-test-mode {
    background: #fff3cd;
    color: #856404;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 13px;
}

/* Documentation Section */
.jaglab-documentation,
.jaglab-extension-download {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.jaglab-extension-download {
    border-bottom: none;
}

.jaglab-docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.jaglab-doc-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    text-align: center;
}

.jaglab-doc-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.jaglab-doc-card .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #667eea;
    margin-bottom: 10px;
}

.jaglab-doc-card .doc-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
}

.jaglab-doc-card .doc-desc {
    font-size: 12px;
    color: #666;
}

/* Extension Download Buttons */
.jaglab-extension-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.jaglab-ext-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #f5f5f5;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.jaglab-ext-btn:hover {
    background: #e9ecef;
}

.jaglab-ext-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.jaglab-ext-btn .coming-soon {
    font-size: 10px;
    background: #667eea;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    position: absolute;
    top: -8px;
    right: -8px;
}

.jaglab-ci-hint {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 13px;
    margin: 0;
}

.jaglab-ci-hint code {
    display: block;
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 10px;
    border-radius: 4px;
    margin-top: 8px;
    font-size: 12px;
    overflow-x: auto;
}

/* =============================================================================
   Credits Section
   ============================================================================= */

.jaglab-credits-section {
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
}

.jaglab-credits-section h4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.credits-balance {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.credits-balance.over-limit {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.jaglab-credits-info {
    color: #666;
    font-size: 13px;
    margin: 0 0 20px 0;
}

/* Credit Purchase (Dynamic Pricing) */
.jaglab-credit-purchase {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.credit-pricing-info {
    flex: 1;
    min-width: 250px;
}

.pricing-rate {
    margin-bottom: 12px;
}

.pricing-rate strong {
    font-size: 18px;
    color: #333;
    display: block;
}

.pricing-rate .pricing-range {
    font-size: 13px;
    color: #888;
}

.bonus-tiers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bonus-tier {
    background: #f0f4ff;
    color: #667eea;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
}

.bonus-tier.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.jaglab-buy-credits-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 14px 30px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.jaglab-buy-credits-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* =============================================================================
   Usage Console
   ============================================================================= */

.jaglab-usage-console {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.jaglab-usage-console h4 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jaglab-refresh-usage {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #667eea;
    border-radius: 4px;
    transition: background 0.2s;
}

.jaglab-refresh-usage:hover {
    background: #f0f0f0;
}

.jaglab-refresh-usage .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Usage Stats Cards */
.jaglab-usage-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-card .stat-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    font-size: 12px;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Alt color variants for visual distinction */
.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Usage History Table */
.jaglab-usage-history {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
}

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

.jaglab-history-table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
}

.jaglab-history-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}

.jaglab-history-table tr:last-child td {
    border-bottom: none;
}

.jaglab-history-table tr:hover td {
    background: #fafbfc;
}

.jaglab-history-table code {
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #e83e8c;
}

.jaglab-history-table .loading,
.jaglab-history-table .no-data {
    text-align: center;
    color: #888;
    padding: 30px !important;
    font-style: italic;
}

/* Engine Badges */
.engine-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.engine-badge.engine-spark {
    background: #e3f2fd;
    color: #1565c0;
}

.engine-badge.engine-nova {
    background: #f3e5f5;
    color: #7b1fa2;
}

.engine-badge.engine-apex {
    background: #fff3e0;
    color: #ef6c00;
}

/* Usage Controls */
.jaglab-usage-controls {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.jaglab-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.jaglab-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.jaglab-filter-group label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.5px;
}

.jaglab-filter-group select,
.jaglab-filter-group input[type="month"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    min-width: 140px;
}

.jaglab-filter-group select:focus,
.jaglab-filter-group input[type="month"]:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.jaglab-filter-actions {
    margin-left: auto;
}

.jaglab-export-csv {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    cursor: pointer;
}

.jaglab-export-csv:hover {
    opacity: 0.9;
}

.jaglab-export-csv .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Pagination Row */
.jaglab-pagination-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 10px;
}

.jaglab-pagination-info {
    font-size: 13px;
    color: #666;
}

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

.jaglab-page-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.jaglab-page-btn:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.jaglab-page-current {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

/* Legacy Pagination (keep for compatibility) */
.jaglab-pagination {
    padding: 12px 15px;
    background: #f8f9fa;
    font-size: 13px;
    color: #666;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

/* =============================================================================
   Responsive
   ============================================================================= */

@media (max-width: 768px) {
    .jaglab-usage-stats {
        grid-template-columns: 1fr;
    }

    .jaglab-credit-packages {
        grid-template-columns: repeat(2, 1fr);
    }

    .jaglab-history-table {
        font-size: 12px;
    }

    .jaglab-history-table th,
    .jaglab-history-table td {
        padding: 10px;
    }

    .jaglab-overview-grid {
        grid-template-columns: 1fr;
    }

    .jaglab-tabs {
        gap: 0;
    }

    .jaglab-tab {
        padding: 12px 15px;
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    .jaglab-license-header {
        flex-direction: column;
    }

    .jaglab-license-key {
        text-align: left;
        width: 100%;
    }

    .key-display {
        flex-direction: column;
        align-items: flex-start;
    }

    .jaglab-engines {
        flex-direction: column;
    }

    .jaglab-create-key-form {
        flex-direction: column;
    }

    .jaglab-credit-packages {
        grid-template-columns: 1fr;
    }

    .stat-card .stat-value {
        font-size: 22px;
    }

    /* Make table scrollable on mobile */
    .jaglab-usage-history {
        overflow-x: auto;
    }

    .jaglab-history-table {
        min-width: 500px;
    }
}

/* =============================================================================
   Resources Tab - Beautiful Modern Design
   ============================================================================= */

/* Hero Section */
.jaglab-resources-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    text-align: center;
}

.jaglab-resources-hero h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
}

.jaglab-resources-hero p {
    margin: 0;
    opacity: 0.9;
    font-size: 15px;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.section-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-icon .dashicons {
    color: #fff;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.section-title h4 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.section-title p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Templates Section */
.jaglab-templates-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.jaglab-templates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

/* Template Cards */
.jaglab-template-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fc;
    border: 2px solid transparent;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.jaglab-template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.jaglab-template-card:hover {
    border-color: #667eea;
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.jaglab-template-card:hover::before {
    opacity: 1;
}

.template-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.template-review .template-icon { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.template-security .template-icon { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.template-docs .template-icon { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.template-changelog .template-icon { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }

.template-icon .dashicons {
    color: #fff;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.template-content {
    flex: 1;
}

.template-content h5 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    font-family: 'Monaco', 'Consolas', monospace;
}

.template-content p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.template-action {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.jaglab-template-card:hover .template-action {
    opacity: 1;
    transform: translateX(0);
}

.template-action .dashicons {
    color: #667eea;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Quick Start Code Block */
.jaglab-quickstart-code {
    background: #1e1e2e;
    border-radius: 12px;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.code-label {
    color: #a6adc8;
    font-size: 13px;
    font-weight: 500;
}

.jaglab-copy-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #cdd6f4;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.jaglab-copy-code:hover {
    background: rgba(255,255,255,0.2);
}

.jaglab-copy-code .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.jaglab-quickstart-code pre {
    margin: 0;
    padding: 20px;
    background: transparent;
    overflow-x: auto;
}

.jaglab-quickstart-code code {
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #cdd6f4;
}

.view-example-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    color: #89b4fa;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.view-example-link:hover {
    background: rgba(255,255,255,0.1);
    color: #b4befe;
}

.view-example-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.view-example-link:hover .dashicons {
    transform: translateX(4px);
}

/* Downloads Section */
.jaglab-downloads-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.jaglab-downloads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.jaglab-download-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 25px 20px;
    background: #f8f9fc;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.jaglab-download-card:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.12);
}

.download-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.download-content h5 {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.download-content p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.download-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.download-badge.coming-soon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.download-badge.available {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
}

/* Documentation Section */
.jaglab-docs-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.jaglab-docs-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.jaglab-doc-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f8f9fc;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.jaglab-doc-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    transform: translateX(5px);
}

.jaglab-doc-link .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #667eea;
    transition: color 0.3s ease;
}

.jaglab-doc-link:hover .dashicons {
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .jaglab-templates-grid {
        grid-template-columns: 1fr;
    }

    .jaglab-downloads-grid {
        grid-template-columns: 1fr;
    }

    .jaglab-docs-links {
        grid-template-columns: 1fr;
    }

    .jaglab-template-card {
        padding: 15px;
    }

    .template-content p {
        display: none;
    }

    .jaglab-resources-hero {
        padding: 20px;
    }

    .jaglab-resources-hero h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .section-header {
        flex-direction: column;
        text-align: center;
    }

    .code-header {
        flex-direction: column;
        gap: 10px;
    }
}

/* =============================================================================
   Credits Tab - Beautiful Modern Design
   ============================================================================= */

/* Credits Hero */
.jaglab-credits-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.jaglab-credits-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.credits-icon {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    backdrop-filter: blur(10px);
}

.credits-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #ffd700;
}

.credits-balance-main {
    margin-bottom: 15px;
}

.credits-balance-main .balance-label {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.credits-balance-main .balance-value {
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    display: block;
}

.credits-balance-main .balance-unit {
    display: block;
    font-size: 16px;
    opacity: 0.8;
    margin-top: 5px;
}

.credits-description {
    margin: 0;
    font-size: 14px;
    opacity: 0.85;
    max-width: 400px;
    margin: 0 auto;
}

/* Purchase Section */
.jaglab-credits-purchase-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.purchase-header {
    text-align: center;
    margin-bottom: 30px;
}

.purchase-header h4 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

.purchase-header p {
    margin: 0;
    color: #666;
    font-size: 15px;
}

/* Pricing Card */
.pricing-card {
    background: linear-gradient(135deg, #f8f9fc 0%, #eef1f8 100%);
    border-radius: 16px;
    padding: 30px;
    border: 2px solid #e9ecef;
}

.pricing-main {
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 2px dashed #ddd;
    margin-bottom: 25px;
}

.price-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.price-display .price-value {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-display .price-per {
    font-size: 16px;
    color: #666;
}

.price-display .price-dollar {
    font-size: 36px;
    font-weight: 700;
    color: #333;
}

.price-range {
    font-size: 14px;
    color: #888;
}

/* Bonus Ladder */
.bonus-ladder {
    margin-bottom: 30px;
}

.bonus-title {
    display: block;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 15px;
}

.bonus-items {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.bonus-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    min-width: 70px;
    transition: all 0.3s ease;
    position: relative;
}

.bonus-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.bonus-item.featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    transform: scale(1.05);
}

.bonus-item.featured:hover {
    transform: scale(1.05) translateY(-3px);
}

.bonus-item .bonus-amount {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.bonus-item.featured .bonus-amount {
    color: rgba(255,255,255,0.9);
}

.bonus-item .bonus-percent {
    font-size: 16px;
    font-weight: 800;
    color: #11998e;
}

.bonus-item.featured .bonus-percent {
    color: #fff;
}

.bonus-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ffd700;
    color: #333;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* New Buy Credits Button */
.jaglab-buy-credits-btn-new {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.jaglab-buy-credits-btn-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.jaglab-buy-credits-btn-new:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    color: #fff;
}

.jaglab-buy-credits-btn-new:hover::before {
    left: 100%;
}

.jaglab-buy-credits-btn-new .btn-icon .dashicons,
.jaglab-buy-credits-btn-new .btn-arrow .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.jaglab-buy-credits-btn-new .btn-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.jaglab-buy-credits-btn-new:hover .btn-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Responsive for Credits */
@media (max-width: 600px) {
    .jaglab-credits-hero {
        padding: 30px 20px;
    }

    .credits-balance-main .balance-value {
        font-size: 42px;
    }

    .bonus-items {
        gap: 8px;
    }

    .bonus-item {
        min-width: 60px;
        padding: 10px 12px;
    }

    .price-display .price-value {
        font-size: 36px;
    }

    .price-display .price-dollar {
        font-size: 28px;
    }
}

/* =============================================================================
   Subscription Tab - Pause/Resume Controls
   ============================================================================= */

/* Status Hero */
.jaglab-subscription-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 25px;
}

.jaglab-subscription-hero.active {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
}

.jaglab-subscription-hero.paused {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.jaglab-subscription-hero .status-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.jaglab-subscription-hero .status-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.jaglab-subscription-hero .status-content {
    flex: 1;
}

.jaglab-subscription-hero .status-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.85;
    margin-bottom: 5px;
}

.jaglab-subscription-hero .status-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
}

/* Subscription Info */
.jaglab-subscription-info {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.jaglab-subscription-info .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.jaglab-subscription-info .info-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fc;
    border-radius: 10px;
}

.jaglab-subscription-info .info-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 8px;
}

.jaglab-subscription-info .info-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Subscription Controls */
.jaglab-subscription-controls {
    margin-bottom: 25px;
}

.jaglab-subscription-controls .control-card {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.jaglab-subscription-controls .control-card.pause {
    border-color: #ffeaa7;
    background: linear-gradient(135deg, #fffdf7 0%, #fff9e6 100%);
}

.jaglab-subscription-controls .control-card.resume {
    border-color: #81ecec;
    background: linear-gradient(135deg, #f7ffff 0%, #e6fff9 100%);
}

.jaglab-subscription-controls .control-info h4 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.jaglab-subscription-controls .control-info p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

.jaglab-subscription-controls .pause-effects,
.jaglab-subscription-controls .resume-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
}

.jaglab-subscription-controls .pause-effects li,
.jaglab-subscription-controls .resume-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: #555;
}

.jaglab-subscription-controls .pause-effects li .dashicons {
    color: #f39c12;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.jaglab-subscription-controls .resume-benefits li .dashicons {
    color: #27ae60;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.jaglab-pause-btn,
.jaglab-resume-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    align-self: flex-start;
}

.jaglab-pause-btn {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffc107;
}

.jaglab-pause-btn:hover {
    background: #ffc107;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.jaglab-resume-btn {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
}

.jaglab-resume-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
}

.jaglab-pause-btn .dashicons,
.jaglab-resume-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Spinning animation for loading */
.jaglab-pause-btn .spin,
.jaglab-resume-btn .spin {
    animation: spin 1s linear infinite;
}

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

/* Manage Subscription Link */
.jaglab-subscription-manage {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 5px;
}

.jaglab-subscription-manage .manage-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
}

.jaglab-subscription-manage .manage-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
}

.jaglab-subscription-manage .manage-link .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #667eea;
    transition: color 0.3s ease;
}

.jaglab-subscription-manage .manage-link:hover .dashicons {
    color: #fff;
}

.jaglab-subscription-manage .manage-link .dashicons:last-child {
    margin-left: auto;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.jaglab-subscription-manage .manage-link:hover .dashicons:last-child {
    opacity: 1;
    transform: translateX(0);
}

/* Paused status badge in header */
.jaglab-license-status.status-paused {
    background: rgba(240, 147, 251, 0.3);
}

/* Responsive */
@media (max-width: 600px) {
    .jaglab-subscription-hero {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }

    .jaglab-subscription-hero .status-value {
        font-size: 24px;
    }

    .jaglab-subscription-controls .control-card {
        padding: 20px;
    }

    .jaglab-pause-btn,
    .jaglab-resume-btn {
        width: 100%;
    }
}

/* =============================================================================
   Token FAQ Tab - Educational Content Design
   ============================================================================= */

/* Hero Section */
.jaglab-tokenfaq-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.jaglab-tokenfaq-hero .hero-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.jaglab-tokenfaq-hero .hero-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.jaglab-tokenfaq-hero h3 {
    margin: 0 0 5px 0;
    font-size: 22px;
    font-weight: 700;
}

.jaglab-tokenfaq-hero p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

/* FAQ Sections */
.jaglab-faq-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.jaglab-faq-section:last-child {
    margin-bottom: 0;
}

.faq-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f2f5;
}

.faq-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.faq-icon .dashicons {
    color: #fff;
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.faq-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.faq-content {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}

.faq-content p {
    margin: 0 0 15px 0;
}

.faq-content p:last-child {
    margin-bottom: 0;
}

/* Token Examples */
.token-examples {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    background: #f8f9fc;
    border-radius: 12px;
    padding: 20px 25px;
}

.token-examples li {
    padding: 10px 0;
    border-bottom: 1px dashed #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.token-examples li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.token-examples li:first-child {
    padding-top: 0;
}

.token-note {
    background: linear-gradient(135deg, #e8f4f8 0%, #e0f0ff 100%);
    padding: 15px 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    font-size: 14px;
    color: #555;
}

/* Engine Tiers Grid */
.engine-tiers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.engine-tier-card {
    background: #f8f9fc;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.engine-tier-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.engine-tier-card.tier-spark {
    border-color: #bbdefb;
}

.engine-tier-card.tier-spark:hover {
    border-color: #1565c0;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.engine-tier-card.tier-nova {
    border-color: #e1bee7;
}

.engine-tier-card.tier-nova:hover {
    border-color: #7b1fa2;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

.engine-tier-card.tier-apex {
    border-color: #ffe0b2;
}

.engine-tier-card.tier-apex:hover {
    border-color: #ef6c00;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

.tier-header {
    margin-bottom: 15px;
}

.tier-header .tier-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 10px;
}

.tier-header h5 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.tier-header .tier-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #e0e0e0;
    color: #666;
}

.tier-header .tier-badge.featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.tier-header .tier-badge.premium {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #333;
}

.tier-description {
    margin-bottom: 15px;
}

.tier-description p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.tier-pricing {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(0,0,0,0.05);
}

.tier-pricing .price-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #333;
    line-height: 1;
}

.tier-pricing .price-unit {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.tier-usecases {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.tier-usecases li {
    padding: 6px 0;
    font-size: 13px;
    color: #555;
    position: relative;
    padding-left: 20px;
}

.tier-usecases li::before {
    content: '•';
    position: absolute;
    left: 5px;
    color: #667eea;
    font-weight: bold;
}

/* Pricing Table */
.jaglab-pricing-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.jaglab-pricing-table th {
    background: #f8f9fc;
    padding: 15px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
}

.jaglab-pricing-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.jaglab-pricing-table tr:last-child td {
    border-bottom: none;
}

.jaglab-pricing-table tr:hover td {
    background: #fafbfc;
}

.pricing-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    padding: 18px 20px;
    border-radius: 12px;
    border-left: 4px solid #ffc107;
    margin-top: 20px;
}

.pricing-note .dashicons {
    color: #f39c12;
    font-size: 22px;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.pricing-note p {
    margin: 0;
    font-size: 14px;
    color: #856404;
    line-height: 1.5;
}

/* Credits Flow */
.credits-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.flow-step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: #f8f9fc;
    padding: 25px;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.flow-step:hover {
    border-color: #667eea;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.12);
}

.step-number {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content strong {
    display: block;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.step-content p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.flow-arrow {
    padding: 10px 0;
    color: #ccc;
}

.flow-arrow .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

/* Example Calculation */
.example-calc {
    background: #f8f9fc;
    border-radius: 16px;
    padding: 25px;
    border: 2px solid #e9ecef;
}

.calc-scenario {
    background: #fff;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
    font-size: 15px;
    color: #444;
}

.calc-scenario strong {
    color: #333;
}

.calc-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.calc-row .engine-badge {
    min-width: 70px;
    text-align: center;
}

.calc-math {
    font-size: 15px;
    color: #555;
    font-family: 'Monaco', 'Consolas', monospace;
}

.calc-math strong {
    color: #333;
    font-size: 16px;
}

/* Responsive for Token FAQ */
@media (max-width: 900px) {
    .engine-tiers-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .engine-tier-card {
        padding: 20px 15px;
    }
}

@media (max-width: 600px) {
    .jaglab-tokenfaq-hero {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }

    .jaglab-pricing-table {
        font-size: 12px;
    }

    .jaglab-pricing-table th,
    .jaglab-pricing-table td {
        padding: 10px 8px;
    }

    .flow-step {
        padding: 20px 15px;
    }

    .calc-row {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .pricing-note {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================
   Upgrade/Downgrade Plan Section
   ======================================== */

/* Scheduled Downgrade Notice */
.jaglab-scheduled-downgrade-notice {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 1px solid #ffb74d;
    border-radius: 12px;
    padding: 20px 25px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.jaglab-scheduled-downgrade-notice .notice-icon {
    background: #ff9800;
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.jaglab-scheduled-downgrade-notice .notice-icon .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.jaglab-scheduled-downgrade-notice .notice-content {
    flex: 1;
    min-width: 200px;
}

.jaglab-scheduled-downgrade-notice .notice-content strong {
    display: block;
    color: #e65100;
    font-size: 14px;
    margin-bottom: 5px;
}

.jaglab-scheduled-downgrade-notice .notice-content p {
    margin: 0;
    color: #bf360c;
    font-size: 14px;
}

.jaglab-scheduled-downgrade-notice .jaglab-cancel-downgrade-btn {
    background: #fff;
    color: #e65100;
    border: 1px solid #ffb74d;
    white-space: nowrap;
}

.jaglab-scheduled-downgrade-notice .jaglab-cancel-downgrade-btn:hover {
    background: #e65100;
    color: #fff;
    border-color: #e65100;
}

/* Change Plan Section */
.jaglab-change-plan-section {
    margin: 25px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
}

.jaglab-change-plan-section .section-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.jaglab-change-plan-section .section-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.jaglab-change-plan-section .section-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.jaglab-change-plan-section .section-title h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 18px;
}

.jaglab-change-plan-section .section-title p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Plans Grid */
.jaglab-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* Plan Card */
.jaglab-plan-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.jaglab-plan-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.jaglab-plan-card.current {
    border-color: #4caf50;
    background: #f1f8e9;
}

.jaglab-plan-card.upgrade {
    border-color: #667eea;
}

.jaglab-plan-card.downgrade {
    border-color: #9e9e9e;
}

/* Plan Badge */
.jaglab-plan-card .plan-badge {
    position: absolute;
    top: -10px;
    right: 15px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jaglab-plan-card .current-badge {
    background: #4caf50;
    color: #fff;
}

.jaglab-plan-card .upgrade-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.jaglab-plan-card .downgrade-badge {
    background: #9e9e9e;
    color: #fff;
}

/* Plan Header */
.jaglab-plan-card .plan-header {
    text-align: center;
    margin-bottom: 15px;
    padding-top: 5px;
}

.jaglab-plan-card .plan-header h5 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.jaglab-plan-card .plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
}

.jaglab-plan-card .price-amount {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.jaglab-plan-card .price-period {
    font-size: 14px;
    color: #666;
}

/* Plan Features */
.jaglab-plan-card .plan-features {
    flex: 1;
    margin-bottom: 15px;
}

.jaglab-plan-card .plan-features .feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

.jaglab-plan-card .plan-features .feature .dashicons {
    color: #4caf50;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Plan Button */
.jaglab-plan-card .jaglab-select-plan-btn {
    width: 100%;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.jaglab-plan-card .jaglab-select-plan-btn.button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
}

.jaglab-plan-card .jaglab-select-plan-btn.button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Current Plan Indicator */
.jaglab-plan-card .current-plan-indicator {
    text-align: center;
    padding: 10px;
    background: #e8f5e9;
    border-radius: 6px;
    color: #2e7d32;
    font-weight: 500;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.jaglab-plan-card .current-plan-indicator .dashicons {
    color: #4caf50;
}

/* Plan Change Preview */
.jaglab-plan-change-preview {
    margin-top: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
}

.jaglab-plan-change-preview .preview-loading {
    text-align: center;
    padding: 30px;
    color: #666;
}

.jaglab-plan-change-preview .preview-loading .dashicons {
    font-size: 30px;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

.jaglab-plan-change-preview .preview-error {
    text-align: center;
    padding: 20px;
    color: #c62828;
    background: #ffebee;
    border-radius: 8px;
}

/* Upgrade Preview */
.upgrade-preview .preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.upgrade-preview .preview-header.upgrade-header {
    color: #4527a0;
}

.upgrade-preview .preview-header .dashicons {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.upgrade-preview .preview-header h4 {
    margin: 0;
    font-size: 18px;
}

/* Math/Proration Breakdown */
.upgrade-preview .preview-math {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

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

.upgrade-preview .math-row:last-child {
    border-bottom: none;
}

.upgrade-preview .math-row.total {
    border-top: 2px solid #333;
    margin-top: 10px;
    padding-top: 15px;
    font-weight: 600;
}

.upgrade-preview .math-label {
    color: #555;
    font-size: 14px;
}

.upgrade-preview .math-value {
    font-size: 14px;
    font-weight: 500;
}

.upgrade-preview .math-value.credit {
    color: #4caf50;
}

.upgrade-preview .math-value.total-value {
    font-size: 18px;
    color: #333;
}

/* Next Bill Info */
.upgrade-preview .preview-next-bill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #1565c0;
    font-size: 14px;
}

.upgrade-preview .preview-next-bill .dashicons {
    color: #1976d2;
}

/* Downgrade Preview */
.downgrade-preview .preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.downgrade-preview .preview-header.downgrade-header {
    color: #616161;
}

.downgrade-preview .preview-header .dashicons {
    background: #9e9e9e;
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.downgrade-preview .preview-header h4 {
    margin: 0;
    font-size: 18px;
}

/* Downgrade Info */
.downgrade-preview .preview-info {
    display: flex;
    gap: 15px;
    background: #fff3e0;
    border: 1px solid #ffcc80;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.downgrade-preview .preview-info .info-icon {
    color: #f57c00;
    flex-shrink: 0;
}

.downgrade-preview .preview-info .info-text p {
    margin: 0 0 5px 0;
    color: #e65100;
    font-size: 14px;
}

.downgrade-preview .preview-info .savings-note {
    color: #2e7d32 !important;
}

/* Comparison View */
.downgrade-preview .preview-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.downgrade-preview .comparison-item {
    text-align: center;
    padding: 15px 25px;
    border-radius: 8px;
    min-width: 150px;
}

.downgrade-preview .comparison-item.current {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
}

.downgrade-preview .comparison-item.new {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
}

.downgrade-preview .comparison-label {
    display: block;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.downgrade-preview .comparison-plan {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.downgrade-preview .comparison-price {
    display: block;
    font-size: 14px;
    color: #666;
}

.downgrade-preview .comparison-arrow {
    color: #9e9e9e;
}

/* Preview Actions */
.preview-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.preview-actions .button {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-actions .jaglab-confirm-upgrade-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
}

.preview-actions .jaglab-confirm-upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.preview-actions .jaglab-confirm-downgrade-btn {
    background: #ff9800;
    border-color: #ff9800;
    color: #fff;
}

.preview-actions .jaglab-confirm-downgrade-btn:hover {
    background: #f57c00;
}

/* Responsive for Plan Change */
@media (max-width: 768px) {
    .jaglab-plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .jaglab-scheduled-downgrade-notice {
        flex-direction: column;
        text-align: center;
    }

    .jaglab-scheduled-downgrade-notice .notice-content {
        text-align: center;
    }

    .downgrade-preview .preview-comparison {
        flex-direction: column;
    }

    .downgrade-preview .comparison-arrow {
        transform: rotate(90deg);
    }

    .preview-actions {
        flex-direction: column;
    }

    .preview-actions .button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .jaglab-plans-grid {
        grid-template-columns: 1fr;
    }

    .jaglab-change-plan-section {
        padding: 20px 15px;
    }

    .upgrade-preview .math-row {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}
