/* Jarvis Finance Pro - Ultra Modern Design */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --bg-main: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;
    --bg-input: #1e1e2a;
    --border: #2a2a3a;
    --border-light: #3a3a4a;
    
    /* Accent Colors */
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --success: #10b981;
    --success-light: #34d399;
    --danger: #ef4444;
    --danger-light: #f87171;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Text */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-glow: radial-gradient(ellipse at top, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.3);
    
    /* Radius */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Font */
    --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.jf-body { 
    font-family: var(--font); 
    background: var(--bg-main); 
    color: var(--text-primary); 
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    background-image: var(--gradient-glow);
    overflow-x: hidden; /* verhindert horizontalen Scroll auf Mobile */
}

/* === Website (nicht Dashboard) – globale Dark SaaS Optik === */
body:not(.jf-body) {
    font-family: var(--font);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    background-image: var(--gradient-glow);
    overflow-x: hidden;
}

body:not(.jf-body) a {
    color: var(--primary-light);
}

body:not(.jf-body) a:hover {
    color: #ffffff;
}

body:not(.jf-body) .wp-site-blocks,
body:not(.jf-body) .wp-block-group,
body:not(.jf-body) main {
    background: transparent;
}

body:not(.jf-body) h1,
body:not(.jf-body) h2,
body:not(.jf-body) h3,
body:not(.jf-body) h4 {
    color: var(--text-primary);
}

body:not(.jf-body) p,
body:not(.jf-body) li {
    color: var(--text-secondary);
}

/* App Container */
.jf-app {
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

/* Header */
.jf-header {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.jf-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jf-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.jf-logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}

.jf-logo-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.jf-logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.jf-logo-text span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.jf-user-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.jf-subscription-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.jf-status-premium {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.jf-status-test {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.jf-status-basis {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.jf-status-admin {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: #fff;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.jf-user-info {
    text-align: right;
}

.jf-user-name {
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
}

.jf-user-status {
    font-size: 0.8rem;
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.jf-user-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.jf-site-btn,
.jf-logout-btn {
    width: 44px;
    height: 44px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.jf-site-btn:hover {
    background: rgba(139,92,246,.14);
    border-color: rgba(167,139,250,.28);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Classic: small V2 switch button (next to Home icon) */
.jf-site-btn.jf-v2-btn{
    font-weight: 900;
    letter-spacing: .08em;
    font-size: 12px;
    line-height: 1;
    color: rgba(255,255,255,.92);
    border-color: rgba(167,139,250,.22);
    background: rgba(139,92,246,.14);
}
.jf-site-btn.jf-v2-btn:hover{
    border-color: rgba(167,139,250,.35);
    box-shadow: 0 10px 34px rgba(139,92,246,.16);
}

.jf-logout-btn:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    transform: translateY(-2px);
}

/* Welcome Section */
.jf-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 20px;
}

.jf-welcome-text h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}

.jf-welcome-text p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.jf-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    font-family: var(--font);
}

.jf-add-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.jf-add-btn svg {
    width: 20px;
    height: 20px;
}

/* Stats Grid */
.jf-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

@media (max-width: 900px) {
    .jf-stats-grid { grid-template-columns: 1fr; }
    .jf-welcome { flex-direction: column; align-items: flex-start; }
    .jf-welcome-text h2 { font-size: 1.5rem; }
}

.jf-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.jf-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.jf-stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
    box-shadow: var(--shadow-xl);
}

.jf-stat-card:hover::before {
    opacity: 1;
}

.jf-stat-income::before { background: var(--gradient-success); }
.jf-stat-expense::before { background: var(--gradient-danger); }
.jf-stat-balance::before { background: var(--gradient-primary); }

.jf-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.jf-stat-income .jf-stat-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.jf-stat-expense .jf-stat-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.jf-stat-balance .jf-stat-icon {
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary);
}

.jf-stat-icon svg {
    width: 28px;
    height: 28px;
}

.jf-stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.jf-stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.jf-stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    word-break: break-word;
}

.jf-stat-income .jf-stat-value { color: var(--success-light); }
.jf-stat-expense .jf-stat-value { color: var(--danger-light); }

.jf-stat-balance.positive .jf-stat-value { color: var(--primary-light); }
.jf-stat-balance.negative .jf-stat-value { color: var(--danger-light); }

/* Content Grid */
.jf-content-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .jf-content-grid { grid-template-columns: 1fr; }
}

/* Cards */
.jf-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.jf-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jf-card-title {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.jf-card-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.jf-card-badge {
    background: var(--bg-input);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.jf-card-body {
    padding: 24px;
}

/* Categories */
.jf-category-row {
    margin-bottom: 20px;
}

.jf-category-row:last-child { margin-bottom: 0; }

.jf-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.jf-category-name {
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jf-category-icon {
    font-size: 1.1rem;
}

.jf-category-amount {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--danger-light);
}

.jf-progress {
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
}

.jf-progress-bar {
    height: 100%;
    border-radius: 3px;
    background: var(--gradient-primary);
    transition: width 0.5s ease;
}

/* Transactions */
.jf-trans-list {
    max-height: 500px;
    overflow-y: auto;
}

.jf-trans-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.jf-trans-row:last-child { border-bottom: none; }

.jf-trans-row:hover {
    background: rgba(139, 92, 246, 0.05);
    margin: 0 -24px;
    padding: 18px 24px;
}

.jf-trans-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.jf-trans-desc {
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jf-trans-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.jf-trans-date {
    color: var(--text-muted);
}

.jf-trans-cat {
    font-size: 0.7rem;
    padding: 3px 10px;
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary-light);
    border-radius: 12px;
    font-weight: 500;
}

.jf-trans-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.jf-trans-amount {
    font-weight: 700;
    font-size: 1rem;
    min-width: 100px;
    text-align: right;
}

.jf-trans-amount.einnahme { color: var(--success-light); }
.jf-trans-amount.ausgabe { color: var(--danger-light); }

.jf-trans-delete {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0;
}

.jf-trans-row:hover .jf-trans-delete {
    opacity: 1;
}

.jf-trans-delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* Edit Button */
.jf-trans-edit {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0;
}

.jf-trans-row:hover .jf-trans-edit {
    opacity: 1;
}

.jf-trans-edit:hover {
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary);
}

/* Loading */
.jf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    color: var(--text-muted);
    gap: 16px;
}

.jf-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.jf-empty {
    text-align: center;
    padding: 50px;
    color: var(--text-muted);
}

/* Modal */
.jf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.jf-modal-overlay.active {
    display: flex;
}

.jf-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
    box-shadow: var(--shadow-xl);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.jf-modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jf-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.jf-modal-close {
    width: 36px;
    height: 36px;
    background: var(--bg-input);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.jf-modal-close:hover {
    background: var(--danger);
    color: white;
}

/* Form */
.jf-form {
    padding: 24px;
}

.jf-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.jf-form-group {
    margin-bottom: 20px;
}

.jf-form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.jf-form-group input,
.jf-form-group select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font);
    color: var(--text-primary);
    transition: all 0.2s;
}

.jf-form-group input:focus,
.jf-form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.jf-form-group select {
    cursor: pointer;
}

/* Type Selector */
.jf-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.jf-type-btn {
    cursor: pointer;
}

.jf-type-btn input {
    display: none;
}

.jf-type-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.2s;
}

.jf-type-ausgabe .jf-type-content { color: var(--danger); }
.jf-type-einnahme .jf-type-content { color: var(--success); }

.jf-type-btn input:checked + .jf-type-content {
    border-color: currentColor;
}

.jf-type-btn.jf-type-ausgabe input:checked + .jf-type-content {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.jf-type-btn.jf-type-einnahme input:checked + .jf-type-content {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

/* Submit */
.jf-submit-btn {
    width: 100%;
    padding: 18px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    font-family: var(--font);
    margin-top: 8px;
}

.jf-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

/* Scrollbar */
.jf-trans-list::-webkit-scrollbar {
    width: 6px;
}

.jf-trans-list::-webkit-scrollbar-track {
    background: var(--bg-input);
}

.jf-trans-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.jf-trans-list::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* Search Box */
.jf-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.jf-search-box svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.jf-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font);
    outline: none;
}

.jf-search-box input::placeholder {
    color: var(--text-muted);
}

/* Quick Add Buttons */
.jf-quick-add {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.jf-quick-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: var(--font);
}

.jf-quick-btn.income {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.jf-quick-btn.income:hover {
    background: var(--success);
    color: white;
}

.jf-quick-btn.expense {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.jf-quick-btn.expense:hover {
    background: var(--danger);
    color: white;
}

/* Welcome Actions */
.jf-welcome-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.jf-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.jf-export-btn:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

/* Export/Zeitraum nur in Einstellungen (Classic) */
.jf-export-top,
#export-menu{
    display: none !important;
}

.jfpro-export-grid{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.jfpro-export-option{
    appearance:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border: 1px solid var(--border);
    background: rgba(18,18,26,.55);
    color: var(--text-primary);
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.jfpro-export-option:hover{
    transform: translateY(-1px);
    border-color: rgba(167,139,250,.42);
    box-shadow: 0 10px 34px rgba(139,92,246,.18);
}

@media (max-width: 520px){
    .jfpro-export-option{ width: 100%; justify-content:center; }
}

.jf-export-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    z-index: 100;
    min-width: 150px;
    box-shadow: var(--shadow-lg);
}

.jf-export-menu.active {
    display: block;
}

.jf-export-menu button {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.jf-export-menu button:hover {
    background: var(--bg-input);
}

/* Budget Warning */
.jf-budget-warning {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.jf-budget-warning.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

/* Financial Health Card */
#health-card .jf-card-body {
    padding: 20px;
}

.jf-health-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.jf-score-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: conic-gradient(var(--color) calc(var(--score) * 1%), var(--bg-input) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.jf-score-ring::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-card);
}

.jf-score-value {
    position: relative;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.jf-score-label {
    margin-top: 8px;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.jf-health-details {
    display: flex;
    justify-content: space-around;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius);
}

.jf-health-stat {
    text-align: center;
}

.jf-health-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.jf-health-stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.jf-monthly-budget {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.jf-budget-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.jf-budget-remaining {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: right;
}

.jf-progress {
    background: var(--bg-input);
    border-radius: 10px;
    overflow: hidden;
}

.jf-progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.jf-goals-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.jf-goals-section h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.jf-goal-item {
    margin-bottom: 12px;
}

.jf-goal-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.jf-goal-amount {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Category Wrapper */
.jf-kategorie-wrapper {
    display: flex;
    gap: 8px;
}

.jf-kategorie-wrapper select {
    flex: 1;
}

.jf-add-category-btn {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jf-add-category-btn:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

/* Icon Grid */
.jf-icon-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.jf-icon-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.jf-icon-btn:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.jf-icon-btn.selected {
    border-color: var(--primary);
    background: var(--primary);
}

/* Spartöpfe */
.jf-spartopf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.jf-spartopf-card {
    background: var(--bg-input);
    border-radius: var(--radius);
    padding: 15px;
}

.jf-spartopf-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.jf-spartopf-icon {
    font-size: 1.5rem;
}

.jf-spartopf-name {
    font-weight: 600;
    flex: 1;
}

.jf-spartopf-progress {
    margin-bottom: 8px;
}

.jf-spartopf-amount {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.jf-spartopf-actions {
    display: flex;
    gap: 8px;
}

.jf-deposit-btn {
    flex: 1;
    padding: 8px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.jf-deposit-btn:hover {
    background: var(--primary-light);
}

.jf-total-spartopf {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(124, 58, 237, 0.15);
    border-radius: var(--radius);
    text-align: center;
}

.jf-total-spartopf strong {
    color: var(--primary-light);
    font-size: 1.3rem;
}

.jf-add-spartopf-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
}

/* Toggle Buttons */
.jf-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.jf-toggle-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

.jf-toggle-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.jf-toggle-btn.active svg {
    stroke: white;
}

/* Toggle Sections Container */
.jf-toggle-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 15px;
}

.jf-toggle-sections.two-active {
    grid-template-columns: 1fr 1fr;
}

.jf-toggle-section {
    display: none;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
}

.jf-toggle-section.visible {
    display: block;
}

.jf-toggle-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.jf-toggle-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Analytics Improvements */
.jf-analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.jf-analytics-stat {
    background: var(--bg-input);
    border-radius: var(--radius);
    padding: 15px;
    text-align: center;
}

.jf-analytics-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.jf-analytics-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-light);
}

.jf-analytics-stat-value.negative {
    color: var(--danger);
}

.jf-analytics-stat-value.positive {
    color: var(--success);
}

/* Chart placeholder - bar visualization */
.jf-chart-container {
    margin: 20px 0;
}

.jf-chart-bar {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.jf-chart-label {
    width: 100px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.jf-chart-track {
    flex: 1;
    height: 24px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 10px;
}

.jf-chart-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.jf-chart-value {
    width: 80px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* === TRANSACTION CARDS - MODERN DESIGN === */
.jfpro-trans-card {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 12px;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
}

.jfpro-trans-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

.jfpro-trans-left {
    flex: 1;
}

.jfpro-trans-kategorie {
    font-size: 1rem;
    font-weight: 600;
}

.jfpro-trans-datum {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

.jfpro-trans-beschreibung {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 6px;
}

.jfpro-trans-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}

.jfpro-trans-amount.einnahme {
    color: #10b981 !important;
}

.jfpro-trans-amount.ausgabe {
    color: #ef4444 !important;
}

.jfpro-trans-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.jfpro-trans-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    transition: color 0.2s;
}

.jfpro-trans-actions button:hover {
    color: var(--primary-light);
}

/* Hide old styles */
.jfpro-trans-row, .jfpro-trans-info, .jfpro-trans-desc, .jfpro-trans-cat {
    display: none !important;
}

/* === FOTO UPLOAD === */
.jf-upload-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jf-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-input);
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.jf-upload-btn:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(139, 92, 246, 0.05);
}

.jf-upload-preview {
    margin-top: 10px;
}

.jf-upload-preview img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    border: 2px solid var(--border);
}


/* === Mobile Fixes: Welcome / Action Buttons === */
.jf-welcome-actions {
    flex-wrap: wrap;
    width: 100%;
}

.jf-welcome-actions > * {
    min-width: 0;
}

.jf-export-btn,
.jf-toggle-btn,
.jf-add-btn {
    max-width: 100%;
}

.jf-export-btn,
.jf-toggle-btn {
    justify-content: center;
}

.jf-toggle-btn span {
    min-width: 0;
}

@media (max-width: 900px) {
    .jf-welcome-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        align-items: stretch;
    }

    .jf-export-btn,
    .jf-toggle-btn,
    .jf-add-btn {
        width: 100%;
        min-width: 0;
        white-space: normal;
        text-align: center;
        line-height: 1.25;
        padding: 14px 16px;
    }

    .jf-add-btn {
        grid-column: 1 / -1;
    }

    .jf-export-menu {
        left: 0;
        right: auto;
        width: min(300px, calc(100vw - 40px));
    }
}

@media (max-width: 520px) {
    .jf-welcome {
        gap: 16px;
    }

    .jf-welcome-text,
    .jf-welcome-actions {
        width: 100%;
    }

    .jf-welcome-actions {
        grid-template-columns: 1fr 1fr;
    }

    .jf-export-btn,
    .jf-toggle-btn,
    .jf-add-btn {
        font-size: 0.9rem;
        border-radius: 14px;
    }

    .jf-export-btn svg,
    .jf-toggle-btn svg,
    .jf-add-btn svg {
        flex-shrink: 0;
    }
}

/* === Mobile Fixes: Header (Logout sichtbar) === */
@media (max-width: 520px) {
    .jf-app {
        padding: 0 14px 32px;
    }

    .jf-header {
        padding: 16px 0;
        margin-bottom: 20px;
    }

    .jf-header-inner {
        flex-wrap: wrap;
        gap: 12px;
        align-items: flex-start;
    }

    .jf-logo {
        flex: 1 1 100%;
    }

    .jf-logo-text span {
        display: none;
    }

    .jf-user-section {
        flex: 1 1 100%;
        justify-content: space-between;
        gap: 10px;
    }

    /* Name/Status-Text auf sehr kleinen Screens ausblenden,
       aber den "Online"-Punkt beibehalten (wir setzen ihn am Badge). */
    .jf-user-info {
        display: none;
    }

    .jf-subscription-badge {
        padding: 6px 10px;
        font-size: 0.7rem;
        position: relative;
        padding-right: 22px; /* Platz für Online-Punkt */
    }

    .jf-subscription-badge::after {
        content: '';
        width: 8px;
        height: 8px;
        background: var(--success);
        border-radius: 50%;
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
    }

    .jf-logout-btn {
        flex-shrink: 0;
    }
}

/* === Site Navigation (Block Theme) – Professional Menu === */
body:not(.jf-body) .jf-nav-cta > a,
body:not(.jf-body) .wp-block-navigation-item.jf-nav-cta > a {
    background: var(--gradient-primary);
    color: #fff !important;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.25);
}

body:not(.jf-body) .jf-nav-cta > a:hover,
body:not(.jf-body) .wp-block-navigation-item.jf-nav-cta > a:hover {
    filter: brightness(1.05);
}

body:not(.jf-body) .wp-block-navigation .wp-block-navigation-item__label {
    font-weight: 600;
}

@media (max-width: 900px) {
    body:not(.jf-body) .wp-block-navigation__responsive-container.is-menu-open {
        background: var(--bg-card);
    }
}

/* === PWA Install Section (Marketing) === */
body:not(.jf-body) .jf-install-grid{
    display:grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

body:not(.jf-body) .jf-install-card{
    background: rgba(18,18,26,.70);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 18px 55px rgba(0,0,0,.35);
    backdrop-filter: blur(10px);
}

body:not(.jf-body) .jf-install-card h3{
    margin: 0 0 10px;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

body:not(.jf-body) .jf-install-card ol{
    margin: 0;
    padding-left: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
}

body:not(.jf-body) .jf-install-card li{ margin: 6px 0; }

body:not(.jf-body) .jf-install-note{
    margin-top: 12px;
    color: rgba(255,255,255,.62);
    font-size: .95rem;
}

@media (max-width: 980px){
    body:not(.jf-body) .jf-install-grid{ grid-template-columns: 1fr; }
}

/* === App Preview Toggle + Device Mockups (Marketing) === */
body:not(.jf-body) .jf-preview{
    margin: 18px 0 0;
}

body:not(.jf-body) .jf-preview-tabs{
    display:flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 16px 0 18px;
}

body:not(.jf-body) .jf-preview-btn{
    appearance:none;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(18,18,26,.55);
    color: rgba(255,255,255,.78);
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

body:not(.jf-body) .jf-preview-btn:hover{
    transform: translateY(-1px);
    border-color: rgba(167,139,250,.42);
    box-shadow:
        0 0 0 1px rgba(139,92,246,.20),
        0 10px 34px rgba(139,92,246,.18);
    color: rgba(255,255,255,.92);
}

body:not(.jf-body) .jf-preview-btn.is-active{
    background: var(--gradient-primary);
    color: #fff;
    border-color: rgba(255,255,255,.10);
    box-shadow:
        0 0 0 1px rgba(139,92,246,.25),
        0 12px 40px rgba(139,92,246,.25);
}

body:not(.jf-body) .jf-preview-panel{
    animation: jfPreviewFade .18s ease-out;
}

body:not(.jf-body) .jf-preview-image{
    position: relative;
    margin: 0;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(18,18,26,.55);
    box-shadow: 0 22px 70px rgba(0,0,0,.45);
}

body:not(.jf-body) .jf-preview-image img{
    display:block;
    width:100%;
    height:auto;
}

body:not(.jf-body) .jf-preview-image--mobile{
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

@keyframes jfPreviewFade{
    from{opacity:.0; transform: translateY(4px);}
    to{opacity:1; transform: translateY(0);}
}

/* Rendered mockups (real images) */
body:not(.jf-body) .jf-render{
    position: relative;
    margin: 0;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(18,18,26,.55);
    box-shadow:
        0 30px 90px rgba(0,0,0,.55),
        0 0 0 1px rgba(139,92,246,.14);
}

body:not(.jf-body) .jf-render::after{
    content:"";
    position:absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 44%);
    mix-blend-mode: overlay;
    pointer-events:none;
}

body:not(.jf-body) .jf-render img{
    display:block;
    width:100%;
    height:auto;
}

body:not(.jf-body) .jf-render-mobile{ max-width: 520px; margin-left:auto; margin-right:auto; }

/* Device mockup base */
body:not(.jf-body) .jf-device{
    position: relative;
    margin: 0;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,.10);
    background: radial-gradient(1200px 600px at 30% -20%, rgba(139,92,246,.22), transparent 55%),
                radial-gradient(900px 500px at 90% 120%, rgba(59,130,246,.14), transparent 60%),
                rgba(18,18,26,.70);
    box-shadow: 0 22px 70px rgba(0,0,0,.45);
    overflow: hidden;
}

body:not(.jf-body) .jf-device::after{
    content:"";
    position:absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 40%);
    mix-blend-mode: overlay;
    pointer-events:none;
}

body:not(.jf-body) .jf-device-screen{
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(0,0,0,.25);
}

body:not(.jf-body) .jf-device-screen img{
    display:block;
    width:100%;
    height:100%;
    object-fit: cover;
}

/* Desktop mockup */
body:not(.jf-body) .jf-device--desktop{
    padding: 16px 16px 26px;
    border-radius: 26px;
}

body:not(.jf-body) .jf-device--desktop .jf-device-screen{
    aspect-ratio: 16 / 10;
    border-radius: 18px;
}

body:not(.jf-body) .jf-device--desktop::before{
    content:"";
    position:absolute;
    left: 18px;
    right: 18px;
    top: 10px;
    height: 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.06);
    pointer-events:none;
}

/* bottom base */
body:not(.jf-body) .jf-device--desktop .jf-device-base{
    height: 14px;
    margin: 14px auto 0;
    width: 58%;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

/* Phone mockup */
body:not(.jf-body) .jf-device--phone{
    padding: 14px;
    border-radius: 44px;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
    box-shadow:
        0 26px 90px rgba(0,0,0,.55),
        0 0 0 1px rgba(255,255,255,.06) inset;
}

body:not(.jf-body) .jf-device--phone .jf-device-screen{
    aspect-ratio: 9 / 19.5;
    border-radius: 34px;
}

body:not(.jf-body) .jf-device--phone::before{
    content:"";
    position:absolute;
    left: 50%;
    top: 12px;
    width: 132px;
    height: 22px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(0,0,0,.55);
    border: 1px solid rgba(255,255,255,.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
    pointer-events:none;
}

@media (max-width: 980px){
    body:not(.jf-body) .jf-device--desktop{ padding: 14px 14px 22px; }
}

/* === WooCommerce (Mein Konto / Kasse / Warenkorb) – Jarvis SaaS Look === */
body:not(.jf-body) .woocommerce {
    color: var(--text-primary);
}

body:not(.jf-body).woocommerce-account .woocommerce,
body:not(.jf-body).woocommerce-checkout .woocommerce,
body:not(.jf-body).woocommerce-cart .woocommerce {
    max-width: 1180px;
    margin: 28px auto 90px;
    padding: 0 18px;
}

/* Notices */
body:not(.jf-body) .woocommerce-message,
body:not(.jf-body) .woocommerce-info,
body:not(.jf-body) .woocommerce-error {
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(18,18,26,.78);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    box-shadow: var(--shadow);
}

body:not(.jf-body) .woocommerce-message { border-color: rgba(16,185,129,.35); }
body:not(.jf-body) .woocommerce-info { border-color: rgba(59,130,246,.35); }
body:not(.jf-body) .woocommerce-error { border-color: rgba(239,68,68,.35); }

/* Forms / Inputs */
body:not(.jf-body) .woocommerce form {
    background: rgba(18,18,26,.78) !important;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-xl);
    padding: 18px;
    box-shadow: var(--shadow);
}

body:not(.jf-body) .woocommerce form .form-row label {
    color: var(--text-secondary);
    font-weight: 600;
}

body:not(.jf-body) .woocommerce input.input-text,
body:not(.jf-body) .woocommerce textarea,
body:not(.jf-body) .woocommerce select,
body:not(.jf-body) .woocommerce .select2-container .select2-selection {
    background: var(--bg-input) !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 12px !important;
    color: var(--text-primary) !important;
    min-height: 44px;
    padding: 10px 12px;
}

body:not(.jf-body) .woocommerce input.input-text:focus,
body:not(.jf-body) .woocommerce textarea:focus,
body:not(.jf-body) .woocommerce select:focus,
body:not(.jf-body) .woocommerce .select2-container--default.select2-container--focus .select2-selection {
    outline: none;
    border-color: rgba(167,139,250,.55) !important;
    box-shadow: 0 0 0 4px rgba(139,92,246,.20);
}

/* Buttons */
body:not(.jf-body) .woocommerce a.button,
body:not(.jf-body) .woocommerce button.button,
body:not(.jf-body) .woocommerce input.button,
body:not(.jf-body) .woocommerce #respond input#submit {
    background: var(--gradient-primary) !important;
    border: none !important;
    border-radius: 999px !important;
    color: #fff !important;
    font-weight: 800 !important;
    padding: 12px 16px !important;
    box-shadow: 0 10px 28px rgba(139,92,246,.22);
    text-transform: none !important;
}

body:not(.jf-body) .woocommerce a.button:hover,
body:not(.jf-body) .woocommerce button.button:hover,
body:not(.jf-body) .woocommerce input.button:hover,
body:not(.jf-body) .woocommerce #respond input#submit:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

body:not(.jf-body) .woocommerce a.button.alt,
body:not(.jf-body) .woocommerce button.button.alt,
body:not(.jf-body) .woocommerce input.button.alt {
    background: var(--gradient-primary) !important;
}

body:not(.jf-body) .woocommerce a.button.secondary,
body:not(.jf-body) .woocommerce button.button.secondary {
    background: rgba(20,24,36,.75) !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    box-shadow: none !important;
}

/* Tables */
body:not(.jf-body) .woocommerce table.shop_table {
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: rgba(18,18,26,.78) !important;
    box-shadow: var(--shadow);
}

body:not(.jf-body) .woocommerce table.shop_table th,
body:not(.jf-body) .woocommerce table.shop_table td {
    border-color: rgba(255,255,255,.06) !important;
    color: var(--text-primary);
}

body:not(.jf-body) .woocommerce table.shop_table th {
    color: var(--text-secondary);
    font-weight: 800;
}

/* MY ACCOUNT layout */
body:not(.jf-body).woocommerce-account .woocommerce {
    display: grid !important;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 18px;
}

/* Woo default float layout breaks our grid sizing → reset it */
body:not(.jf-body).woocommerce-account .woocommerce-MyAccount-navigation,
body:not(.jf-body).woocommerce-account .woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
    max-width: none !important;
}

/* WooCommerce adds clearfix pseudo-elements which break CSS grid auto-placement */
body:not(.jf-body).woocommerce-account .woocommerce::before,
body:not(.jf-body).woocommerce-account .woocommerce::after,
body:not(.jf-body).woocommerce-checkout .woocommerce::before,
body:not(.jf-body).woocommerce-checkout .woocommerce::after,
body:not(.jf-body).woocommerce-cart .woocommerce::before,
body:not(.jf-body).woocommerce-cart .woocommerce::after {
    content: none !important;
    display: none !important;
}

/* Dropdown exists in DOM but only shown on mobile */
body:not(.jf-body).woocommerce-account .jf-account-nav-select {
    display: none;
}

@media (min-width: 861px) {
    /* Force desktop layout even if some theme CSS interferes */
    body:not(.jf-body).woocommerce-account .woocommerce {
        grid-template-columns: 300px minmax(0, 1fr) !important;
    }

    body:not(.jf-body).woocommerce-account .woocommerce-MyAccount-navigation ul {
        display: grid !important;
    }

    body:not(.jf-body).woocommerce-account .jf-account-nav-select {
        display: none !important;
    }
}

/* My Account dashboard (root) – make it look like 2 clean desktop cards */
@media (min-width: 861px) {
    body:not(.jf-body).woocommerce-account.woocommerce-dashboard .woocommerce-MyAccount-content {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        align-items: start;
    }

    body:not(.jf-body).woocommerce-account.woocommerce-dashboard .woocommerce-MyAccount-content > p {
        margin: 0;
        padding: 14px 14px;
        background: rgba(255,255,255,.03);
        border: 1px solid rgba(255,255,255,.06);
        border-radius: 16px;
        color: var(--text-secondary);
    }

    body:not(.jf-body).woocommerce-account.woocommerce-dashboard .woocommerce-MyAccount-content > p strong {
        color: var(--text-primary);
    }
}

body:not(.jf-body) .woocommerce-MyAccount-navigation,
body:not(.jf-body) .woocommerce-MyAccount-content {
    min-width: 0;
}

body:not(.jf-body) .woocommerce-MyAccount-navigation {
    background: rgba(18,18,26,.78) !important;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-xl);
    padding: 12px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

body:not(.jf-body) .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

/* Theme typography resets can blow up spacing/font sizes here (desktop) */
body:not(.jf-body).woocommerce-account .woocommerce-MyAccount-navigation li {
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    line-height: normal !important;
}

body:not(.jf-body) .woocommerce-MyAccount-navigation li a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

body:not(.jf-body).woocommerce-account .woocommerce-MyAccount-navigation li a {
    font-size: 15px !important;
    line-height: 1.3 !important;
    font-weight: 700;
}

body:not(.jf-body) .woocommerce-MyAccount-navigation li.is-active a {
    background: rgba(139,92,246,.14);
    border-color: rgba(167,139,250,.28);
    color: var(--text-primary);
}

body:not(.jf-body) .woocommerce-MyAccount-navigation li a:hover {
    background: rgba(255,255,255,.04);
    color: var(--text-primary);
}

body:not(.jf-body) .woocommerce-MyAccount-content {
    background: rgba(18,18,26,.78) !important;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-xl);
    padding: 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

/* Checkout layout */
body:not(.jf-body).woocommerce-checkout .woocommerce {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 18px;
    align-items: start;
}

body:not(.jf-body).woocommerce-checkout #customer_details,
body:not(.jf-body).woocommerce-checkout #order_review {
    min-width: 0;
}

body:not(.jf-body).woocommerce-checkout #order_review {
    position: sticky;
    top: 24px;
}

body:not(.jf-body).woocommerce-checkout #order_review_heading {
    margin-top: 0;
}

/* Cart layout */
body:not(.jf-body).woocommerce-cart .woocommerce-cart-form,
body:not(.jf-body).woocommerce-cart .cart-collaterals {
    background: rgba(18,18,26,.78) !important;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-xl);
    padding: 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

@media (max-width: 980px) {
    body:not(.jf-body).woocommerce-checkout .woocommerce {
        grid-template-columns: 1fr;
    }

    body:not(.jf-body).woocommerce-checkout #order_review {
        position: static;
    }

    body:not(.jf-body).woocommerce-cart .woocommerce {
        grid-template-columns: 1fr;
    }

    body:not(.jf-body).woocommerce-cart .cart-collaterals {
        position: static;
    }
}

/* My Account: switch to mobile layout later (prevents "desktop feels mobile" on smaller/zoomed desktops) */
@media (max-width: 860px) {
    body:not(.jf-body).woocommerce-account .woocommerce {
        grid-template-columns: 1fr;
    }

    /* Mobile: make navigation compact + professional */
    body:not(.jf-body).woocommerce-account .woocommerce-MyAccount-navigation {
        position: sticky;
        top: 12px;
        z-index: 5;
    }

    body:not(.jf-body).woocommerce-account .woocommerce-MyAccount-navigation ul {
        display: none;
    }

    body:not(.jf-body).woocommerce-account .jf-account-nav-select {
        width: 100%;
        display: block;
        background: var(--bg-input) !important;
        border: 1px solid rgba(255,255,255,.10) !important;
        color: var(--text-primary) !important;
        border-radius: 14px;
        min-height: 46px;
        padding: 10px 12px;
        font-weight: 700;
        outline: none;
    }

    body:not(.jf-body).woocommerce-account .woocommerce-MyAccount-content {
        padding: 16px;
    }
}

/* Desktop polish */
@media (min-width: 981px) {
    /* Sticky sidebar for My Account */
    body:not(.jf-body).woocommerce-account .woocommerce-MyAccount-navigation {
        position: sticky;
        top: 24px;
        align-self: start;
    }

    body:not(.jf-body).woocommerce-account .woocommerce-MyAccount-content {
        padding: 22px 22px;
    }
}

/* My Account: active indicator + typography */
body:not(.jf-body).woocommerce-account .woocommerce-MyAccount-navigation li a {
    position: relative;
    overflow: hidden;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

body:not(.jf-body).woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
    transform: translateY(-1px);
}

body:not(.jf-body).woocommerce-account .woocommerce-MyAccount-navigation li.is-active a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 4px;
    background: var(--gradient-primary);
    border-radius: 999px;
}

body:not(.jf-body).woocommerce-account .woocommerce-MyAccount-content h2 {
    margin: 0 0 14px;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

body:not(.jf-body).woocommerce-account .woocommerce-MyAccount-content h3 {
    margin: 18px 0 10px;
    font-size: 1.05rem;
}

body:not(.jf-body).woocommerce-account .woocommerce-MyAccount-content p {
    color: var(--text-secondary);
}

/* Addresses as cards */
body:not(.jf-body).woocommerce-account .woocommerce-Addresses {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

@media (max-width: 980px) {
    body:not(.jf-body).woocommerce-account .woocommerce-Addresses {
        grid-template-columns: 1fr;
    }
}

body:not(.jf-body).woocommerce-account .woocommerce-Address {
    background: rgba(18,18,26,.78) !important;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-xl);
    padding: 18px;
    box-shadow: var(--shadow);
}

/* Orders: action buttons smaller */
body:not(.jf-body).woocommerce-account .woocommerce-orders-table__cell-order-actions a.button {
    padding: 8px 12px !important;
    font-size: 0.9rem !important;
}

/* Cart: desktop 2-col layout */
body:not(.jf-body).woocommerce-cart .woocommerce {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 18px;
    align-items: start;
}

body:not(.jf-body).woocommerce-cart .cart-collaterals {
    position: sticky;
    top: 24px;
}

