/**
 * ClaimArmor Member Portal Styles
 */

/* Base Reset for Portal */
.woocommerce-account .ca-portal-dashboard,
.woocommerce-account .ca-portal-sessions,
.woocommerce-account .ca-portal-reports,
.woocommerce-account .ca-portal-tokens,
.woocommerce-account .ca-portal-modules {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Welcome Banner */
.ca-welcome-banner {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.ca-welcome-content h2 {
    margin: 0 0 8px;
    font-size: 24px;
    color: #fff;
}

.ca-welcome-content p {
    margin: 0;
    opacity: 0.85;
}

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

.ca-btn-primary {
    background: #3b82f6;
    color: #fff !important;
}

.ca-btn-primary:hover {
    background: #2563eb;
    color: #fff !important;
}

.ca-btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.ca-btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.ca-btn-outline {
    background: transparent;
    border: 2px solid #3b82f6;
    color: #3b82f6 !important;
}

.ca-btn-outline:hover {
    background: #3b82f6;
    color: #fff !important;
}

/* Stats Grid */
.ca-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ca-stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: box-shadow 0.2s;
}

.ca-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ca-stat-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.ca-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.ca-stat-label {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 12px;
}

.ca-stat-link {
    font-size: 13px;
    color: #3b82f6;
    text-decoration: none;
}

.ca-stat-link:hover {
    text-decoration: underline;
}

/* Quick Actions */
.ca-quick-actions {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
}

.ca-quick-actions h3 {
    margin: 0 0 16px;
    font-size: 18px;
    color: #1e293b;
}

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

.ca-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.2s;
}

.ca-action-btn:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.ca-action-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

/* Section Headers */
.ca-section-header {
    margin-bottom: 24px;
}

.ca-section-header h2 {
    margin: 0 0 8px;
    font-size: 22px;
    color: #1e293b;
}

.ca-section-header p {
    margin: 0;
    color: #64748b;
}

/* Info Notices */
.ca-info-notice {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #1e40af;
}

.ca-info-notice.ca-info-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

/* Empty State */
.ca-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.ca-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.ca-empty-state h3 {
    margin: 0 0 8px;
    color: #1e293b;
}

.ca-empty-state p {
    margin: 0 0 20px;
    color: #64748b;
}

/* Data Tables */
.ca-data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ca-data-table th {
    background: #f8fafc;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.ca-data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}

.ca-data-table tbody tr:hover {
    background: #f8fafc;
}

/* Badges */
.ca-module-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.ca-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.ca-status-locked {
    background: #fee2e2;
    color: #dc2626;
}

.ca-status-active {
    background: #d1fae5;
    color: #059669;
}

.ca-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ca-badge-success {
    background: #d1fae5;
    color: #059669;
}

.ca-badge-locked {
    background: #f1f5f9;
    color: #64748b;
}

/* Token Balance Card */
.ca-token-balance-card {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 30px;
}

.ca-balance-number {
    display: block;
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ca-balance-label {
    font-size: 18px;
    opacity: 0.9;
}

.ca-low-balance-warning {
    margin-top: 16px;
    padding: 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    font-size: 14px;
}

/* Token Packs */
.ca-token-packs {
    margin-bottom: 30px;
}

.ca-token-packs h3 {
    margin: 0 0 16px;
    font-size: 18px;
}

.ca-packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.ca-pack-card {
    background: #fff;
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.ca-pack-tokens {
    font-size: 28px;
    font-weight: 700;
    color: #10b981;
}

.ca-pack-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

.ca-pack-price {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

/* Transaction Colors */
.ca-positive {
    color: #10b981;
    font-weight: 600;
}

.ca-negative {
    color: #ef4444;
    font-weight: 600;
}

/* Modules Grid */
.ca-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ca-module-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
}

.ca-module-card.ca-module-active {
    border-color: #10b981;
}

.ca-module-card.ca-module-locked {
    opacity: 0.7;
}

.ca-module-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.ca-module-card h4 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #1e293b;
}

.ca-module-card p {
    margin: 0 0 16px;
    color: #64748b;
    font-size: 14px;
}

.ca-module-status {
    margin-bottom: 16px;
}

/* Reports Grid */
.ca-reports-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ca-report-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
}

.ca-report-icon {
    font-size: 36px;
}

.ca-report-info {
    flex: 1;
}

.ca-report-info h4 {
    margin: 0 0 4px;
    font-size: 16px;
    color: #1e293b;
}

.ca-report-meta {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.ca-report-expiry {
    margin: 4px 0 0;
    font-size: 12px;
    color: #64748b;
}

.ca-expiry-warning {
    color: #f59e0b !important;
    font-weight: 600;
}

/* Upgrade Notice */
.ca-upgrade-notice {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.ca-upgrade-notice h4 {
    margin: 0 0 8px;
    color: #1e293b;
}

.ca-upgrade-notice p {
    margin: 0 0 16px;
    color: #64748b;
}

/* Pagination */
.ca-pagination {
    margin-top: 24px;
    text-align: center;
}

.ca-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #1e293b;
    text-decoration: none;
}

.ca-pagination .page-numbers.current {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

/* WooCommerce Menu Override */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-MyAccount-navigation li {
    margin-bottom: 4px;
}

.woocommerce-MyAccount-navigation a {
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
}

.woocommerce-MyAccount-navigation a:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.woocommerce-MyAccount-navigation .is-active a {
    background: #3b82f6;
    color: #fff;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ca-welcome-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .ca-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ca-balance-number {
        font-size: 42px;
    }
    
    .ca-data-table {
        display: block;
        overflow-x: auto;
    }
}
