/* ============================================
   Invest Monitoring - Base Styles
   ============================================ */

/* === CSS Variables / Design Tokens === */
:root {
    /* Backgrounds */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-hover: #22222e;

    /* Borders */
    --border-color: #2a2a3a;

    /* Text */
    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #5c5c70;

    /* Accent Colors */
    --accent-green: #22c55e;
    --accent-green-dim: #16a34a;
    --accent-red: #ef4444;
    --accent-amber: #f59e0b;
    --accent-blue: #3b82f6;
    --accent-violet: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-rose: #f43f5e;
    --accent-pink: #ec4899;
    --accent-lime: #84cc16;
    --accent-orange: #f97316;
    --accent-teal: #14b8a6;
    --accent-indigo: #6366f1;
    --accent-fuchsia: #d946ef;

    /* Gradients - Can be overridden per view */
    --gradient-start: #22c55e;
    --gradient-end: #3b82f6;
}

/* === Reset === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === Base Typography === */
body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* === Layout === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* === Header === */
header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.language-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
}

.language-btn {
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    line-height: 1;
    font-weight: 600;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.language-btn.active {
    color: white;
    background: linear-gradient(135deg, var(--accent-blue), #2563eb);
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.22);
}

.hidden {
    display: none !important;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 0.5rem;
    font-weight: 300;
}

/* === Navigation === */
.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.nav-link.active {
    color: var(--accent-green);
}

/* === Navigation Dropdowns === */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle:focus-visible {
    color: var(--text-primary);
    background: var(--bg-card);
    outline: none;
}

.nav-dropdown-toggle.active {
    color: var(--accent-green);
}

.nav-dropdown-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.nav-dropdown.open .nav-dropdown-icon,
.nav-dropdown:focus-within .nav-dropdown-icon {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 160px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

@media (hover: hover) and (pointer: fine) {
    .nav-dropdown:hover .nav-dropdown-icon {
        transform: rotate(180deg);
    }

    .nav-dropdown:hover .nav-dropdown-menu {
        opacity: 1;
        visibility: visible;
    }
}

.nav-dropdown-item {
    display: block;
    padding: 0.6rem 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.nav-dropdown-item:hover {
    background: rgba(var(--accent-green-rgb, 34, 197, 94), 0.1);
    color: var(--text-primary);
}

.nav-dropdown-item.active {
    color: var(--accent-green);
}

/* === Logo === */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon {
    font-size: 1.75rem;
    -webkit-text-fill-color: initial;
}

/* === Footer === */
footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-separator {
    color: var(--border-color);
}

/* === Stats Grid === */
/* === Stats Pane === */
.stats-pane {
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.4) 0%, rgba(20, 20, 35, 0.6) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.stats-pane-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    border-left: 3px solid var(--gradient-start);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-pane .stats-grid {
    margin-bottom: 0;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--gradient-start);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(34, 197, 94, 0.1);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

/* Stat value colors */
.stat-value.green {
    color: var(--accent-green);
}

.stat-value.red {
    color: var(--accent-red);
}

.stat-value.amber {
    color: var(--accent-amber);
}

.stat-value.blue {
    color: var(--accent-blue);
}

.stat-value.violet {
    color: var(--accent-violet);
}

.stat-value.cyan {
    color: var(--accent-cyan);
}

.stat-value.rose {
    color: var(--accent-rose);
}

/* === Table Styles === */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.table-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.record-count {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-family: 'JetBrains Mono', monospace;
}

.table-scroll {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-secondary);
}

th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background: var(--bg-hover);
}

/* Group headers for collapsible tables */
.group-header {
    cursor: pointer;
}

.group-header:hover {
    background: var(--bg-hover) !important;
}

.toggle-icon {
    color: var(--text-secondary);
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    display: inline-block;
    width: 1rem;
}

.group-detail {
    background: var(--bg-secondary);
}

/* Table cell colors */
.date-cell {
    color: var(--accent-blue);
}

.price-cell {
    color: var(--accent-amber);
}

.quantity-cell {
    color: var(--text-primary);
}

.amount-cell {
    color: var(--accent-green);
    font-weight: 500;
}

.symbol {
    color: var(--accent-cyan);
    font-weight: 500;
}

.amount {
    color: var(--accent-amber);
}

/* P/L Colors */
.pl-positive {
    color: var(--accent-green);
}

.pl-negative {
    color: var(--accent-red);
}

.type-buy {
    color: var(--accent-green);
}

.type-sell {
    color: var(--accent-red);
}

/* === Empty State === */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 3rem;
    background: rgba(30, 30, 46, 0.6);
    color: var(--text-secondary);
    border: 2px dashed rgba(75, 85, 99, 0.4);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    /* ✅ Centers button horizontally */
    justify-content: center;
    /* ✅ Centers content vertically */
}


/* === Buttons === */
.action-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    font-weight: 400;
    pointer-events: auto;
}

.action-open {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(59, 130, 246, 0.2));
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.action-open:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(59, 130, 246, 0.3));
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.action-settings {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #6366f1;
}

.action-settings:hover {
    background: rgba(99, 102, 241, 0.3);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.action-delete {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.action-delete:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.action-create {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    /* ✅ Blue gradient */
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: white;
    padding: 1rem 2.5rem;
    /* Larger button */
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    min-width: 200px;
    /* Consistent width */
}

.action-create:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb, #1e40af);
}

.action-login {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: white;
    padding: 1rem 2.5rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
    min-width: 200px;
    width: 100%;
    /* ✅ Fills full container width */
    justify-content: center;
    /* ✅ Centers text horizontally */
}

.action-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(34, 197, 94, 0.4);
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.member-photo-container {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;  /* ✅ Clips image to circle */
  flex-shrink: 0;
  margin-right: 1rem;
}

.member-icon {
  width: 100% !important;      /* ✅ Force full size */
  height: 100% !important;     /* ✅ Force full size */
  object-fit: cover;           /* ✅ Fill circle, crop excess */
  object-position: center;     /* ✅ Center image */
  border-radius: 50%;          /* ✅ Circular clipping */
  display: none;
  transition: opacity 0.2s ease;
}

.photo-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: 400;
  z-index: 1;  /* ✅ Behind image */
}

.photo-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Member card layout */
.member-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 16px;
    transition: all 0.25s ease;
    cursor: default;
}

.member-card-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.member-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-card);
    margin: 0 0 0.25rem 0;
}

.member-meta {
    color: #9ca3af;
    font-size: 0.875rem;
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
}



/* Authentik Button */
.btn-authentik {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    border: 1px solid #FEA000;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
    min-height: 56px;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
    font-family: inherit;
}

.btn-authentik:hover {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    border-color: #FBBF24;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.35);
}

.btn-authentik img {
    filter: brightness(0) invert(1);
}

/* Logout Button */
.logout-btn {
    color: var(--accent-red) !important;
    font-weight: 600 !important;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: var(--accent-red) !important;
    transform: translateY(-1px) !important;
}

.logout-btn svg {
    margin-right: 0.25rem;
}

/* === Modal Styles === */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* === Form Styles === */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--gradient-start);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

/* === Shared Panel Layout === */
.panel-page-container {
    max-width: 420px;
    margin: 4rem auto;
}

.panel-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 1px solid var(--gradient-start);
}

.panel-card-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.panel-card-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    margin: 0;
}

.panel-card-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0.5rem 0 0;
    font-weight: 300;
}

.stack-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.error-box {
    color: var(--accent-red);
    font-size: 0.875rem;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    display: none;
}

.separator-or {
    margin: 1.5rem 0;
    text-align: center;
}

.separator-or span {
    background: var(--bg-card);
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.form-input-multi {
    height: 120px;
}

.field-hint {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

.btn-full-width {
    width: 100%;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* === Dropdown === */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 200px;
    z-index: 100;
    margin-top: 0.5rem;
    overflow: hidden;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

/* === Toast Notifications === */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    z-index: 1001;
    display: none;
    font-family: 'Outfit', sans-serif;
}

.toast.success {
    border-color: var(--accent-green);
}

.toast.error {
    border-color: var(--accent-red);
}

/* === Tabs === */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.tab {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
}

.tab:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.tab.active {
    color: var(--gradient-start);
    background: var(--bg-card);
}

.tab-content {
    display: none;
}

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

/* === Section === */
.section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    /* margin-bottom: 1rem; */
    color: var(--text-primary);
}

/* === Badges === */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.asset-type {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.asset-type-share {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.asset-type-etf {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.currency-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.currency-pln {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.currency-usd {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.currency-eur {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.currency-other {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.year-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--bg-primary);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* === Chart Styles === */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.chart-legend {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.mean {
    background: var(--accent-green);
}

.legend-dot.max {
    background: var(--accent-amber);
}

.legend-dot.min {
    background: var(--accent-blue);
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

.no-chart-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-secondary);
}

.no-chart-data svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* === Utility Classes === */
.current-value-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--bg-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

/* === Animations === */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

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

.stat-card,
.table-container,
.chart-container {
    animation: fadeInUp 0.5s ease forwards;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.15s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.25s;
}

.stat-card:nth-child(5) {
    animation-delay: 0.3s;
}

.stat-card:nth-child(6) {
    animation-delay: 0.35s;
}

.stat-card:nth-child(7) {
    animation-delay: 0.4s;
}

.stat-card:nth-child(8) {
    animation-delay: 0.45s;
}

.table-container {
    animation-delay: 0.5s;
}

.chart-container {
    animation-delay: 0.6s;
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .table-container {
        border-radius: 12px;
    }

    th,
    td {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }

    .chart-container {
        height: 250px;
    }

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

    .nav-links {
        flex-wrap: wrap;
    }
}
