/**
 * Cybokron Exchange Rate & Portfolio Tracking
 * Dashboard Styles
 */

/* ─── Reset & Base ──────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --surface-hover: #22263a;
    --surface-rgb: 26, 29, 39;
    --border: #2a2e3f;
    --text: #e4e6f0;
    --text-muted: #8b8fa3;
    --primary: #60a5fa;
    --primary-strong: #2563eb;
    --success: #22c55e;
    --danger: #f87171;
    --warning: #f59e0b;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    --radius: 8px;
}

/* Light theme */
[data-theme="light"] {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --surface-rgb: 255, 255, 255;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-muted: #64748b;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) {
        --bg: #f8fafc;
        --surface: #ffffff;
        --surface-hover: #f1f5f9;
        --surface-rgb: 255, 255, 255;
        --border: #e2e8f0;
        --text: #1e293b;
        --text-muted: #64748b;
    }
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    transition: max-width 0.35s ease;
}

[data-layout="fullwidth"] .container {
    max-width: 100%;
}

[data-layout="fullwidth"] .container.login-container {
    max-width: 400px;
}

.login-container {
    max-width: 400px;
    margin: 80px auto;
}

.login-back-link {
    margin-top: 16px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
}
.remember-me label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -120px;
    z-index: 1000;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
}

.skip-link:focus-visible {
    top: 12px;
    text-decoration: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ─── Header ────────────────────────────────────────────────────────────── */
/* ─── Premium Header ────────────────────────────────────────────────────── */
/* ─── Header ─────────────────────────────────────────────────────────── */
.header {
    background: rgba(var(--surface-rgb, 255, 255, 255), 0.85);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
}

.header-container {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 56px;
}

/* Brand */
.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.header-brand:hover {
    opacity: 0.85;
    text-decoration: none;
}

.header-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.header-brand-text {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
}

/* Nav (center) */
.header-nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.header-nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--surface-hover);
    padding: 3px;
    border-radius: 10px;
}

.header-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.82rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.header-nav-link:hover {
    background: rgba(255, 255, 255, 0.6);
    color: var(--text);
    text-decoration: none;
}

[data-theme="dark"] .header-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.header-nav-link.active {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.3);
}

/* Right actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Action buttons (theme, lang) */
.header-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0;
    font-family: var(--font);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.header-action-btn:hover {
    background: var(--surface-hover);
    border-color: var(--text-muted);
}

/* Language dropdown */
.header-lang-dropdown {
    position: relative;
}

.header-lang-trigger {
    font-size: 0.75rem;
}

.header-lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 100;
}

.header-lang-dropdown.open .header-lang-menu {
    display: block;
    animation: dropdownFade 0.15s ease;
}

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

.header-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: background 0.15s;
}

.header-lang-option:hover {
    background: var(--surface-hover);
    color: var(--text);
    text-decoration: none;
}

.header-lang-option.active {
    color: var(--primary);
    font-weight: 600;
}

.header-lang-option .lang-code {
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    min-width: 24px;
}

.header-lang-option .lang-name {
    flex: 1;
}

.header-lang-option .lang-check {
    color: var(--primary);
    font-weight: 700;
}

/* Auth buttons */
.header-auth-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid;
    white-space: nowrap;
    cursor: pointer;
    font-family: var(--font);
}

.header-auth-btn--login {
    color: var(--primary);
    background: transparent;
    border-color: var(--primary);
}

.header-auth-btn--login:hover {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
}

.header-auth-btn--logout {
    color: var(--text-muted);
    background: transparent;
    border-color: var(--border);
}

.header-auth-btn--logout:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fca5a5;
    text-decoration: none;
}

[data-theme="dark"] .header-auth-btn--logout:hover {
    background: rgba(220, 38, 38, 0.12);
    color: #fca5a5;
    border-color: rgba(252, 165, 165, 0.3);
}

/* Hamburger (mobile only) */
.header-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.header-menu-toggle:hover {
    background: var(--surface-hover);
}

.hamburger-line {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.header-menu-toggle.open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header-menu-toggle.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.header-menu-toggle.open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.header-mobile-menu {
    display: none;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.header-mobile-menu.open {
    display: block;
    animation: dropdownFade 0.2s ease;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}

.mobile-nav-link:hover {
    background: var(--surface-hover);
    color: var(--text);
    text-decoration: none;
}

.mobile-nav-link.active {
    background: var(--primary);
    color: #fff;
}

.mobile-nav-icon {
    font-size: 1rem;
    width: 24px;
    text-align: center;
}

.mobile-nav-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-lang-row {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.mobile-lang-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.mobile-lang-btn:hover {
    color: var(--text);
    text-decoration: none;
}

.mobile-lang-btn.active {
    background: var(--primary);
    color: #fff;
}

.mobile-actions-row {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.mobile-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: var(--font);
}

.mobile-action-btn:hover {
    background: var(--surface-hover);
    text-decoration: none;
}

.mobile-action-btn--danger {
    color: #dc2626;
    border-color: #fca5a5;
}

body.menu-open {
    overflow: hidden;
}

/* Portfolio section header */
.portfolio-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.portfolio-section-header h2 {
    margin: 0;
}

/* ─── Tables ────────────────────────────────────────────────────────────── */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.rates-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.rates-table thead th {
    background: var(--surface-hover);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.rates-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.rates-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

.rates-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.04);
}

.rates-table td {
    padding: 10px 14px;
    white-space: nowrap;
}

.text-right {
    text-align: right;
}

.mono {
    font-family: var(--mono);
    font-size: 0.88rem;
}

.currency-code {
    display: inline-block;
    background: var(--surface-hover);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 600;
}

.currency-name {
    font-weight: 500;
}

.text-success {
    color: var(--success);
    font-weight: 600;
}

.text-danger {
    color: var(--danger);
    font-weight: 600;
}

.text-warning {
    color: var(--warning);
    font-weight: 600;
}

/* ─── Converter Widget (Premium) ───────────────────────────────────────── */
.converter-section {
    padding: 0 !important;
    overflow: hidden;
}

.converter-section h2 {
    padding: 16px 20px 0 !important;
}

.converter-section .converter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto 1fr 1fr 1fr;
    gap: 12px;
    align-items: end;
    padding: 12px 20px 16px;
}

.converter-field {
    position: relative;
}

.converter-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.converter-field input,
.converter-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    font-family: var(--font);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.converter-field input:focus,
.converter-field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.converter-field input[type="number"] {
    font-family: var(--mono);
    font-weight: 600;
    font-size: 1rem;
}

/* Swap button between From and To */
.converter-swap-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--primary);
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 1rem;
    flex-shrink: 0;
    align-self: flex-end;
    margin-bottom: 2px;
}

.converter-swap-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: rotate(180deg);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Result card: spans the full width below the inputs */
.converter-result {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    margin: 0 -20px -16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(139, 92, 246, 0.06));
    border-top: 1px solid var(--border);
}

.converter-result-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.converter-result-value {
    font-size: 1.6rem;
    font-weight: 700;
    font-family: var(--mono);
    color: var(--primary);
    letter-spacing: -0.02em;
}

/* Responsive: stack on small screens */
@media (max-width: 900px) {
    .converter-section .converter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .converter-swap-btn {
        align-self: center;
        justify-self: center;
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    .converter-result {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }
}

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

    .tags-pills-list {
        grid-template-columns: 1fr;
    }
}

/* ─── Premium Dashboard Widgets ────────────────────────────────────────── */
.widgets-section {
    padding: 0 !important;
    overflow: hidden;
}

.widgets-section>h2 {
    padding: 20px 24px 0 !important;
}

.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    padding: 16px 24px 24px;
}

/* --- Widget Card (Premium Glass) --- */
.widget-card {
    position: relative;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.widget-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .widget-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* Card header with gradient accent */
.widget-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.04), rgba(139, 92, 246, 0.04));
}

.widget-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.widget-card-icon.icon-movers {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.widget-card-icon.icon-portfolio {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.widget-card h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
}

.widget-card-body {
    padding: 16px 20px 20px;
}

/* --- Top Movers List (Premium) --- */
.widget-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.widget-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--surface-hover);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.widget-list li:hover {
    background: var(--bg);
    transform: translateX(4px);
}

/* Background bar showing magnitude */
.widget-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--change-width, 0%);
    opacity: 0.08;
    border-radius: 10px;
    transition: width 0.6s ease;
}

.widget-list li.text-success::before {
    background: linear-gradient(90deg, var(--success), transparent);
}

.widget-list li.text-danger::before {
    background: linear-gradient(90deg, var(--danger), transparent);
}

.widget-list li.text-warning::before {
    background: linear-gradient(90deg, var(--warning), transparent);
}

.widget-list li .mover-currency {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.widget-list li .currency-code {
    font-size: 0.82rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    min-width: 48px;
    text-align: center;
    flex-shrink: 0;
}

.widget-list li .currency-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-list li .mover-change {
    margin-left: auto;
    font-family: var(--mono);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

.widget-list li .mover-rank {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 16px;
}

/* --- Portfolio Summary (Premium) --- */
.portfolio-metrics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portfolio-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--surface-hover);
    transition: all 0.2s ease;
}

.portfolio-metric:hover {
    background: var(--bg);
}

.portfolio-metric-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.portfolio-metric-value {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

/* Profit/Loss highlight metric */
.portfolio-metric.metric-highlight {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.portfolio-metric.metric-profit {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.04));
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.portfolio-metric.metric-profit .portfolio-metric-value {
    color: var(--success);
}

.portfolio-metric.metric-loss {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.04));
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.portfolio-metric.metric-loss .portfolio-metric-value {
    color: var(--danger);
}

/* Profit badge */
.portfolio-profit-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 10px 18px;
    border-radius: 12px;
    font-family: var(--mono);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.portfolio-profit-badge.badge-profit {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.04));
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.portfolio-profit-badge.badge-loss {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.04));
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.portfolio-profit-badge .badge-arrow {
    font-size: 0.85rem;
}

/* Portfolio action button */
.widget-card .btn-portfolio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
}

.widget-card .btn-portfolio:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
    text-decoration: none;
}

.widget-card .btn-portfolio .btn-arrow {
    transition: transform 0.2s ease;
}

.widget-card .btn-portfolio:hover .btn-arrow {
    transform: translateX(3px);
}

/* Legacy compat: keep .btn-sm working */
.widget-card .btn-sm {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    text-decoration: none;
}

.widget-card .btn-sm:hover {
    background: var(--primary-strong);
    text-decoration: none;
}

/* Responsive: stack on small screens */
@media (max-width: 700px) {
    .widgets-grid {
        grid-template-columns: 1fr;
        padding: 12px 16px 16px;
    }

    .widget-list li {
        padding: 8px 12px;
    }

    .portfolio-profit-badge {
        font-size: 1rem;
    }
}

/* Portfolio analytics */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.analytics-card {
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.analytics-card h3 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.analytics-value {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: var(--mono);
}

.analytics-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.text-muted {
    color: var(--text-muted);
}

/* ─── Bank Section ──────────────────────────────────────────────────────── */
.bank-section {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin: 24px 0;
    overflow: hidden;
}

.bank-section h2 {
    padding: 16px 20px 0;
    font-size: 1.1rem;
}

.last-update {
    padding: 4px 20px 12px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ─── Chart ───────────────────────────────────────────────────────────────── */
.chart-section .chart-controls {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 20px 16px;
}

.chart-section .chart-controls label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.chart-section .chart-controls select {
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
}

.chart-container {
    height: 280px;
    padding: 0 20px 20px;
}

.chart-container canvas {
    max-height: 280px;
}

/* ─── Summary Cards ─────────────────────────────────────────────────────── */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.card h3 {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.card-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--mono);
}

.card-value small {
    font-size: 0.85rem;
    font-weight: 500;
}

.card-profit .card-value {
    color: var(--success);
}

.card-loss .card-value {
    color: var(--danger);
}

.portfolio-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.portfolio-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4, #10b981);
}

.portfolio-section > h2 {
    margin: 0 0 1.25rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.portfolio-export-link {
    margin-bottom: 16px;
    display: flex;
    justify-content: flex-end;
}

/* Row action buttons hover-reveal */
.rates-table td:last-child {
    white-space: nowrap;
}

.rates-table td:last-child .btn {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.rates-table tbody tr:hover td:last-child .btn {
    opacity: 1;
}

/* ─── Forms ─────────────────────────────────────────────────────────────── */
.form-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin: 24px 0;
}

.form-section h2 {
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 180px;
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    font-family: var(--font);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}

.btn-primary {
    background: var(--primary-strong);
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    padding: 6px 10px;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.8rem;
    min-height: 44px;
}

/* ─── Alerts ────────────────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin: 16px 0;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.field-error {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--danger);
}

/* ─── Empty State ───────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state h2 {
    margin-bottom: 12px;
    color: var(--text);
}

.empty-state code {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--mono);
    font-size: 0.85rem;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 24px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-links {
    line-height: 1.8;
}

/* ─── Responsive (medium) ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .header-nav-link {
        padding: 6px 10px;
        font-size: 0.78rem;
    }

    .header-brand-text {
        display: none;
    }
}

/* ─── Responsive (small) ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    .header-nav {
        display: none;
    }

    .header-actions {
        display: none;
    }

    .header-menu-toggle {
        display: flex;
    }

    .form-row {
        flex-direction: column;
    }

    .form-group {
        min-width: 100%;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .rates-table {
        font-size: 0.82rem;
    }

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

/* ─── Portfolio Groups Section ──────────────────────────────────────── */

.hidden {
    display: none !important;
}

.groups-section {
    margin-top: 24px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
}

.groups-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #f97316, #ef4444);
}

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

.groups-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.group-form-panel {
    margin-bottom: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.group-form-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.group-name-input {
    flex: 1;
    min-width: 150px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
}

.group-color-input {
    width: 40px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2px;
    cursor: pointer;
    background: var(--bg);
}

.group-icon-input {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    text-align: center;
}

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.group-card {
    position: relative;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    border-left: 4px solid var(--group-color, var(--primary));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.group-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.group-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.group-card-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.group-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.group-icon {
    font-size: 1.05rem;
}

.group-count {
    font-size: 0.78rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.group-card-actions {
    display: flex;
    gap: 6px;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.group-card:hover .group-card-actions {
    opacity: 1;
}

.group-edit-form {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.btn-xs {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 6px;
    min-height: 44px;
}

/* ─── Filter Bar ────────────────────────────────────────────────────── */

.filter-bar {
    margin-bottom: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.03), rgba(139, 92, 246, 0.02));
    border: 1px solid var(--border);
    border-radius: 12px;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.filter-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.filter-pill:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.filter-pill.active {
    background: var(--pill-color, var(--primary));
    color: #fff;
    border-color: var(--pill-color, var(--primary));
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.filter-dates {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-date-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-date-field label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.filter-date-field input[type="date"] {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.85rem;
}

.filter-summary {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.88rem;
}

.filter-result-count {
    padding: 4px 10px;
    background: var(--primary);
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
}

.filter-result-total {
    color: var(--text-secondary);
}

/* ─── Group Badges in Table ─────────────────────────────────────────── */

.group-badge-sm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 0.73rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.group-icon-sm {
    font-size: 0.8rem;
}

.text-muted {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* ─── Responsive for Groups & Filters ───────────────────────────────── */

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

    .group-form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .group-color-input {
        width: 100%;
    }

    .group-icon-input {
        width: 100%;
    }

    .filter-dates {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .filter-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .portfolio-section {
        padding: 1rem;
        border-radius: 12px;
    }

    .rates-table td:last-child .btn {
        opacity: 1;
    }

    .portfolio-export-link {
        justify-content: center;
    }
}

/* ═══ COMBINED MANAGEMENT PANEL (Groups & Tags in Tabs) ════════════════ */
.manage-panel {
    margin-bottom: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.manage-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

.manage-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.manage-panel-header:hover {
    background: rgba(59, 130, 246, 0.04);
}

.manage-panel-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.manage-toggle-icon {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.manage-panel.collapsed .manage-toggle-icon {
    transform: rotate(-90deg);
}

.manage-panel-body {
    padding: 0 1.5rem 1.5rem;
    overflow: hidden;
    max-height: 4000px;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        padding 0.3s ease,
        opacity 0.3s ease;
    opacity: 1;
}

.manage-panel.collapsed .manage-panel-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

/* Tab Navigation */
.manage-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.25rem;
}

.manage-tab {
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: -2px;
}

.manage-tab:hover {
    color: var(--text);
    background: rgba(59, 130, 246, 0.05);
}

.manage-tab.active {
    color: var(--primary, #3b82f6);
    border-bottom-color: var(--primary, #3b82f6);
}

.manage-tab.active[data-tab="tags-tab"] {
    color: #8b5cf6;
    border-bottom-color: #8b5cf6;
}

.manage-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--border);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 20px;
}

.manage-tab.active .manage-tab-badge {
    background: var(--primary, #3b82f6);
    color: #fff;
}

.manage-tab.active[data-tab="tags-tab"] .manage-tab-badge {
    background: #8b5cf6;
}

/* Tab content */
.manage-tab-content {
    display: none;
    animation: fadeTabIn 0.25s ease;
}

.manage-tab-content.active {
    display: block;
}

@keyframes fadeTabIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.manage-tab-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.manage-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.manage-empty-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
    display: block;
}

/* ─── Tags Section (inside tab) ──────────────────────────────────────── */
.tags-pills-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.tag-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    flex-wrap: wrap;
    transition: all 0.2s ease;
    border-left: 4px solid var(--tag-color, #8b5cf6);
}

.tag-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border-radius: 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.tag-pill-sm {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    margin-right: 3px;
    margin-bottom: 2px;
    cursor: default;
}

.tag-card-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-left: auto;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.tag-card:hover .tag-card-actions {
    opacity: 1;
}

.tag-card .group-edit-form {
    width: 100%;
    margin-top: 6px;
}

/* Clickable item count in tag/group cards */
.group-count-link,
.tag-count-link {
    color: var(--text-muted);
    font-size: 0.82rem;
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}

.group-count-link:hover,
.tag-count-link:hover {
    color: var(--primary, #3b82f6);
    text-decoration: underline;
}

.col-tags {
    max-width: 200px;
}

/* ─── Inline Tag Dropdown ──────────────────────────────────────────────── */
.inline-tag-wrapper {
    position: relative;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
}

.inline-tag-add {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--background);
    border: 1px dashed var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.inline-tag-add:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.06);
}

.inline-tag-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    min-width: 180px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 6px 0;
    display: none;
    animation: dropIn 0.15s ease;
}

.inline-tag-dropdown.open {
    display: block;
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.inline-tag-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: var(--text);
}

.inline-tag-option:hover {
    background: rgba(139, 92, 246, 0.08);
}

.inline-tag-option .tag-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.inline-tag-option.remove-option {
    color: #ef4444;
    border-top: 1px solid var(--border);
    margin-top: 2px;
    padding-top: 8px;
}

.tag-pill-sm .tag-remove {
    display: none;
    margin-left: 2px;
    font-size: 0.65rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.tag-pill-sm:hover .tag-remove {
    display: inline;
}

.tag-pill-sm .tag-remove:hover {
    opacity: 1;
}

/* ─── Form Tag Selector ────────────────────────────────────────────────── */
.form-tag-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--background);
    min-height: 40px;
    align-items: center;
}

.form-tag-checkbox {
    display: none;
}

.form-tag-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.form-tag-label:hover {
    border-color: var(--tag-color, #8b5cf6);
    background: rgba(139, 92, 246, 0.06);
}

.form-tag-checkbox:checked+.form-tag-label {
    background: var(--tag-color, #8b5cf6);
    border-color: var(--tag-color, #8b5cf6);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    font-weight: 600;
}

.form-tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.form-tag-checkbox:checked+.form-tag-label .form-tag-dot {
    background: #fff !important;
}

/* ─── Checkbox Column ──────────────────────────────────────────────────── */
.col-checkbox {
    width: 40px;
    text-align: center !important;
    padding: 6px 8px !important;
}

.col-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
    border-radius: 4px;
}

/* ─── Bulk Actions Bar (Sticky Bottom) ─────────────────────────────────── */
.bulk-actions-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(30, 27, 75, 0.95));
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(139, 92, 246, 0.3);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
    animation: slideUpBar 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #e2e8f0;
}

.bulk-actions-bar.hidden {
    display: none;
}

@keyframes slideUpBar {
    from {
        opacity: 0;
        transform: translateY(100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bulk-info {
    font-size: 0.9rem;
    font-weight: 600;
    color: #93c5fd;
    white-space: nowrap;
}

.bulk-info span {
    font-size: 1.15rem;
    font-weight: 700;
    margin-right: 4px;
    color: #60a5fa;
}

.bulk-section {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.bulk-section:first-child {
    border-left: none;
}

.bulk-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
}

.bulk-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.bulk-form {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.bulk-select {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-size: 0.82rem;
    min-width: 110px;
}

.bulk-select option {
    background: #1e293b;
    color: #e2e8f0;
}

.bulk-actions-bar .btn-primary {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.bulk-actions-bar .btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.bulk-actions-bar .btn-danger {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.bulk-actions-bar .btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

/* ─── Group Analytics Summary ──────────────────────────────────────────── */
.group-analytics-strip {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(139, 92, 246, 0.04));
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
}

.group-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.group-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
}

.group-stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

/* ─── Tag Analytics Strip ─────────────────────────────────────────────── */
.tag-analytics-strip {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), rgba(168, 85, 247, 0.04));
    border-color: rgba(139, 92, 246, 0.15);
}

/* ─── Currency Totals Strip ──────────────────────────────────────────── */
.currency-totals-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.06), rgba(245, 158, 11, 0.04));
    border: 1px solid rgba(234, 179, 8, 0.18);
    border-radius: 12px;
}

.currency-totals-label {
    flex-shrink: 0;
}

.currency-totals-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.currency-total-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(234, 179, 8, 0.10);
    border: 1px solid rgba(234, 179, 8, 0.22);
    color: var(--text-primary);
}

.currency-total-chip.chip-metal {
    background: rgba(234, 179, 8, 0.12);
    border-color: rgba(234, 179, 8, 0.25);
}

.currency-total-chip.chip-crypto {
    background: rgba(245, 158, 11, 0.10);
    border-color: rgba(245, 158, 11, 0.22);
}

.currency-total-chip.chip-fiat {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.18);
}

.currency-total-code {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.8rem;
}

.currency-total-amount {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
}

.currency-total-name {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ─── Filter Pill Tag Variant ──────────────────────────────────────────── */
.filter-pill-tag {
    border-style: dashed;
}

.filter-pill-tag.active {
    border-style: solid;
    background: var(--pill-color, #8b5cf6) !important;
    border-color: var(--pill-color, #8b5cf6) !important;
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.filter-pill-gold.active {
    --pill-color: #d4af37;
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #1a1a1a;
}

.filter-pill-gold:not(.active):hover {
    --pill-color: #d4af37;
}

.filter-pill-tag:not(.active):hover {
    border-color: var(--pill-color, #8b5cf6);
    color: var(--pill-color, #8b5cf6);
}

/* ─── Goals ────────────────────────────────────────────────────────────── */
.goal-form {
    padding: 0;
}

.goal-form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.goal-form-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.goal-form-field input,
.goal-form-field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.88rem;
    box-sizing: border-box;
}

.goal-form-field input:focus,
.goal-form-field select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.goal-sources-section {
    margin-bottom: 12px;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.goal-sources-section > label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.goal-source-add {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.goal-source-select {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.84rem;
    min-width: 140px;
}

.goal-source-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 4px 4px 0;
}

.goal-source-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.goal-source-group {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.goal-source-tag {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.goal-source-item {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.goal-form-actions {
    margin-top: 8px;
}

/* ─── Goal Cards List — Grid Layout ─────────────────────────────────── */
.goals-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 10px;
}

.goal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0;
    transition: box-shadow 0.2s, transform 0.15s;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.goal-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 14px 0 0 14px;
    background: var(--goal-accent, #3b82f6);
}

/* Goal type accent colors */
.goal-card[data-goal-type="value"]::before,
.goal-card[data-goal-type="cost"]::before { background: #3b82f6; }
.goal-card[data-goal-type="amount"]::before { background: #8b5cf6; }
.goal-card[data-goal-type="currency_value"]::before { background: #6366f1; }
.goal-card[data-goal-type="percent"]::before { background: #f59e0b; }
.goal-card[data-goal-type="cagr"]::before { background: #10b981; }
.goal-card[data-goal-type="drawdown"]::before { background: #ef4444; }

.goal-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.goal-card-body {
    padding: 14px 16px 12px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.goal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 8px;
}

.goal-card-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.goal-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.goal-name {
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.goal-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    line-height: 1.4;
}

.goal-currency-badge {
    display: inline-block;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.goal-bank-badge {
    display: inline-block;
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    vertical-align: middle;
}

.goal-percent-mode-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    vertical-align: middle;
}

.goal-danger {
    color: var(--danger) !important;
}

.goal-card-drawdown .goal-progress-bar {
    background: linear-gradient(90deg, #22c55e, #eab308, var(--danger));
}

.goal-form-grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.goal-currency-field select {
    min-width: 180px;
}

.goal-edit-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.goal-card-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    opacity: 0.4;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.goal-card:hover .goal-card-actions {
    opacity: 1;
}

/* Favori Yıldız Butonu */
.goal-favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 1px 3px;
    color: var(--text-muted);
    transition: color 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.goal-favorite-btn:hover { transform: scale(1.2); }
.goal-favorite-btn.active { color: #f59e0b; }

/* Filtre Bar */
.goal-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 10px;
    padding: 6px 0;
}

.goal-filter-btn {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.76rem;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 32px;
    font-weight: 500;
}

.goal-filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.goal-filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.goal-filter-clear { color: var(--danger); border-color: var(--danger); }
.goal-filter-clear:hover { background: var(--danger); color: white; }

.goal-filter-select {
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.76rem;
    min-height: 32px;
}

/* ─── Progress Section ───────────────────────────────────────────────── */
.goal-progress-section {
    margin-top: auto;
}

.goal-card-extras {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.goal-period-select {
    padding: 2px 6px;
    font-size: 0.72rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
}

.goal-deadline-badge {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--card-bg, #f0f9ff);
    color: var(--text-secondary, #64748b);
    border: 1px solid var(--border);
}

.goal-deadline-expired {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

/* Progress bar — thicker & more prominent */
.goal-progress {
    height: 8px;
    background: var(--bg);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid var(--border);
}

.goal-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 8px;
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    min-width: 0;
}

.goal-progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.78rem;
    margin-bottom: 0;
    gap: 4px;
}

.goal-current {
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text);
    font-size: 0.78rem;
}

.goal-percent {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.5px;
}

.goal-target {
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-align: right;
}

.goal-complete {
    color: #22c55e !important;
}

/* Goal Deposit Comparison */
.goal-deposit-comparison {
    font-size: 0.72rem;
    padding: 6px 8px;
    margin-top: 6px;
    border-radius: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 3px;
    line-height: 1.4;
}

.deposit-header {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.deposit-header .deposit-icon {
    font-size: 0.8rem;
}

.deposit-header .deposit-meta {
    font-size: 0.65rem;
    opacity: 0.7;
    font-weight: 400;
}

.deposit-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    padding: 2px 0;
}

.deposit-row + .deposit-row {
    border-top: 1px dashed color-mix(in srgb, var(--border) 50%, transparent);
}

.deposit-row-label {
    font-size: 0.68rem;
    opacity: 0.8;
    white-space: nowrap;
}

.deposit-row-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.deposit-diff-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding-top: 2px;
}

.deposit-diff-badge {
    font-size: 0.65rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.goal-deposit-comparison.deposit-better .deposit-diff-badge {
    background: color-mix(in srgb, #dc2626 12%, transparent);
    color: #dc2626;
}

.goal-deposit-comparison.deposit-worse .deposit-diff-badge {
    background: color-mix(in srgb, #16a34a 12%, transparent);
    color: #16a34a;
}

.goal-deposit-comparison.deposit-better .deposit-row-value.deposit-val {
    color: #dc2626;
}

.goal-deposit-comparison.deposit-worse .deposit-row-value.current-val {
    color: #16a34a;
}

.deposit-single-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 1px 0;
}

/* Goal Sources Display */
.goal-card-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px 10px 20px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    min-height: 0;
}

.goal-sources-display {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Goal Edit Form */
.goal-edit-form {
    margin-top: 16px;
    padding: 20px 16px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    border-radius: 0 0 14px 14px;
}

.goal-edit-form .goal-form-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 14px 12px;
}

.goal-edit-form .goal-sources-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

/* ─── Goals Responsive ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .goals-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .goal-filter-bar { gap: 5px; }
    .goal-filter-btn { font-size: 0.7rem; padding: 4px 9px; min-height: 28px; }
    .goal-filter-select { font-size: 0.7rem; min-height: 28px; }

    .goal-card-body {
        padding: 12px 14px 10px 18px;
    }

    .goal-card-footer {
        padding: 6px 14px 8px 18px;
    }

    .goal-card-actions {
        opacity: 1;
    }

    .goal-name {
        font-size: 0.85rem;
    }

    .goal-percent {
        font-size: 1rem;
    }

    .goal-progress-stats {
        font-size: 0.72rem;
    }

    .goal-current,
    .goal-target {
        font-size: 0.72rem;
    }
}

/* ─── Enhanced Delete Confirmation Dialog ─────────────────────────────── */
.confirm-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.confirm-dialog {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.2s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.confirm-dialog-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 12px;
}

.confirm-dialog-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.confirm-dialog-message {
    font-size: 0.88rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
    margin-bottom: 20px;
}

.confirm-dialog-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-dialog-buttons .btn {
    min-width: 100px;
}

/* ─── Responsive: Tags & Bulk ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .manage-panel-header {
        padding: 0.8rem 1rem;
    }

    .manage-panel-body {
        padding: 0 1rem 1rem;
    }

    .manage-tabs {
        overflow-x: auto;
    }

    .manage-tab {
        padding: 8px 16px;
        font-size: 0.82rem;
    }

    .bulk-actions-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px 16px;
    }

    .bulk-section {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding: 8px 0 0;
        flex-wrap: wrap;
    }

    .bulk-section:first-child {
        border-top: none;
        padding-top: 0;
    }

    .bulk-buttons {
        flex-direction: column;
    }

    .bulk-form {
        width: 100%;
    }

    .bulk-select {
        flex: 1;
    }

    .col-tags {
        max-width: 120px;
    }

    .tag-card-actions,
    .group-card-actions {
        opacity: 1;
    }

    .group-analytics-strip {
        flex-direction: column;
    }

    .currency-totals-strip {
        flex-direction: column;
    }

    .inline-tag-dropdown {
        left: auto;
        right: 0;
    }

    .goal-form-grid {
        grid-template-columns: 1fr;
    }

    .goal-edit-form .goal-form-grid {
        grid-template-columns: 1fr;
    }

    .goal-source-add {
        flex-direction: column;
        align-items: stretch;
    }
}