/* ============================================================
   PREMIUM SEPIA THEME – VINTAGE FÖR MYNTSAMLARE
============================================================ */

/* Theme switching - reduce flicker */
html.theme-switching {
    opacity: 0 !important;
    transition: opacity 0.15s ease;
}
html.theme-switching * {
    transition: none !important;
}

/* Ensure goal progress bars in Sepia theme are brown-only and cannot be overridden by other styles */
.sepia-theme .goal-progress {
    background: #efe5d6 !important;
    border: 1px solid rgba(101,67,33,0.08) !important;
    box-shadow: inset 0 1px 0 rgba(255,250,240,0.6) !important;
    height: 12px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
}
.sepia-theme .goal-progress-fill {
    background-image: none !important;
    background: linear-gradient(90deg, #6f4a2f 0% , #9a6b49 45% , #c79b6a 100%) !important;
    box-shadow: inset 0 -6px 12px rgba(0,0,0,0.05) !important;
    height: 100% !important;
    transition: width 600ms cubic-bezier(.2,.9,.2,1) !important;
}
.sepia-theme .goal-progress-fill::after {
    content: '';
    display: block;
    height: 100%;
    width: 100%;
    pointer-events: none;
    background-image: linear-gradient(45deg, rgba(255,255,255,0.02) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.02) 50%, rgba(255,255,255,0.02) 75%, transparent 75%, transparent) !important;
    background-size: 8px 8px !important;
    opacity: 0.28 !important;
}

/* Very specific overrides to prevent other styles from introducing blue/green fills */
html.sepia-theme .goal-progress-fill,
:root.sepia-theme .goal-progress-fill,
.sepia-theme .goal-progress-fill {
    background-image: none !important;
    background: linear-gradient(90deg, #6f4a2f 0% , #9a6b49 45% , #c79b6a 100%) !important;
}

/* Also ensure any generic .goal-progress-fill rule is overridden */
.sepia-theme .goal-progress-fill[style] {
    background-image: none !important;
    background: linear-gradient(90deg, #6f4a2f 0% , #9a6b49 45% , #c79b6a 100%) !important;
}


:root {
    --ui-scale: 1;
    --bg-main: #f5e6d0;
    --bg-elevated: #ebdcb8;
    --bg-card: #fffaf0;
    --bg-hover: #e8d4b8;
    --accent: #9b6a3b;
    --accent-light: #e4b87b;
    --accent-dark: #7b5420;
    --accent-soft: rgba(155, 106, 59, 0.18);
    --accent-warm: #d9b67b;
    --accent-highlight: rgba(255, 250, 240, 0.5);
    --text-main: #3d3226;
    --text-muted: #7d6d5b;
    --border-subtle: #d4c4a8;
    --border-input: #c9b898;
    --radius-card: 14px;
    --shadow-soft: 0 28px 68px rgba(61, 50, 38, 0.25);
    --shadow-card: 0 10px 28px rgba(61, 50, 38, 0.20);
    --shadow-hover: 0 18px 44px rgba(61, 50, 38, 0.30);
    --transition-fast: 0.18s ease-out;
    --transition-med: 0.28s ease-out;
    /* Diagram-färger för sepia tema */
    --chart-text: #3d3226;
    --chart-grid: #c9b898;
    --ucoin-color: #d9b67b;
    --silver-color: #7d6d5b;
    /* Accent RGB för box-shadow */
    --accent-rgb: 155, 106, 59;
}

* {
    box-sizing: border-box;
    caret-color: #3d3226;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: calc(16px * var(--ui-scale));
    background:
        radial-gradient(circle at top left, #ebdcb8 0%, transparent 50%),
        radial-gradient(circle at bottom right, #e5d5b0 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(155, 106, 59, 0.04) 0%, rgba(155, 106, 59, 0.10) 100%),
        var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    caret-color: #3d3226;
    transition: opacity 0.5s ease-in-out;
    min-height: 100vh;
}

body.fade-out {
    opacity: 0;
}

/* ============================================================
   TAB BUTTONS – SEPIA THEME
============================================================ */
.tab-btn {
    background: linear-gradient(135deg, #8b5a2b 0%, #a67c4b 50%, #c9a66b 100%);
    color: #faf3e8;
    border: 1px solid rgba(139, 90, 43, 0.4);
    padding: 8px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.3),
                inset 0 1px 0 rgba(255, 250, 240, 0.4);
}

.tab-btn:hover {
    color: #faf3e8;
    background: linear-gradient(135deg, #9b6a3b 0%, #b68c52 50%, #d9b67b 100%);
    transform: translateY(-1px);
    box-shadow:
        0 4px 12px rgba(139, 90, 43, 0.3),
        inset 0 1px 0 rgba(255, 250, 240, 0.4);
    border-color: rgba(139, 90, 43, 0.5);
}

.tab-btn.active {
    color: #faf3e8;
    background: linear-gradient(135deg, #9b6a3b 0%, #b68c52 50%, #d9b67b 100%);
    box-shadow:
        0 4px 12px rgba(139, 90, 43, 0.3),
        inset 0 1px 0 rgba(255, 250, 240, 0.4);
    border-color: rgba(139, 90, 43, 0.5);
}

/* ============================================================
   VALUEINDEX LIST ITEMS – SEPIA THEME
============================================================ */
#viewValueIndexStats div[style*="padding: 12px 0"] {
    border-radius: 6px;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

#viewValueIndexStats div[style*="padding: 12px 0"]:hover {
    background: rgba(155, 106, 59, 0.08);
    border-left: 2px solid rgba(155, 106, 59, 0.4);
    padding-left: 8px;
    padding-right: 8px;
}

#viewValueIndexStats div[style*="padding: 12px 0"]:hover span:first-child {
    color: var(--accent);
}

/* ============================================================
   HEADER + NAVIGATION
============================================================ */
header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 14px 20px;
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    background: linear-gradient(135deg, rgba(255, 250, 240, 0.98), rgba(245, 230, 208, 0.95), rgba(235, 220, 184, 0.93));
    border-bottom: 1px solid rgba(155, 106, 59, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 6px 24px rgba(61, 50, 38, 0.12);
}

header nav {
    flex: 1;
}

nav {
    display: flex;
    gap: 8px;
    position: relative;
}

nav button {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
    padding: 7px 13px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: var(--transition-fast);
}

nav button:hover {
    background: rgba(74, 60, 46, 0.05);
    color: var(--text-main);
    border-color: rgba(74, 60, 46, 0.1);
    transform: translateY(-1px);
}

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

.dropbtn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
    padding: 7px 13px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: var(--transition-fast);
}

.dropbtn:hover {
    background: rgba(74, 60, 46, 0.05);
    color: var(--text-main);
}

.dropdown-content {
    display: none;
    position: absolute;
    background: var(--bg-elevated);
    min-width: 160px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    z-index: 100;
    padding: 8px 0;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: var(--transition-fast);
}

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

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

/* ============================================================
   BUTTONS
============================================================ */
.btn {
    background: linear-gradient(135deg, #8b5a2b 0%, #a67c4b 50%, #c9a66b 100%);
    color: #faf3e8;
    border: 1px solid rgba(139, 90, 43, 0.4);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: var(--transition-fast);
    box-shadow:
        0 2px 8px rgba(139, 90, 43, 0.2),
        inset 0 1px 0 rgba(255, 250, 240, 0.3);
}

.btn:hover {
    background: linear-gradient(135deg, #9b6a3b 0%, #b68c52 50%, #d9b67b 100%);
    transform: translateY(-1px);
    box-shadow:
        0 4px 12px rgba(139, 90, 43, 0.3),
        inset 0 1px 0 rgba(255, 250, 240, 0.4);
    border-color: rgba(139, 90, 43, 0.5);
}

.btn.secondary {
    background: linear-gradient(135deg, rgba(139, 90, 43, 0.15) 0%, rgba(166, 124, 75, 0.12) 50%, rgba(201, 166, 107, 0.18) 100%);
    color: var(--text-main);
    border: 1px solid rgba(139, 90, 43, 0.3);
    box-shadow:
        0 2px 6px rgba(61, 50, 38, 0.1),
        inset 0 1px 0 rgba(255, 250, 240, 0.4);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.btn.secondary:hover {
    background: linear-gradient(135deg, rgba(139, 90, 43, 0.22) 0%, rgba(166, 124, 75, 0.18) 50%, rgba(201, 166, 107, 0.25) 100%);
    border-color: rgba(139, 90, 43, 0.4);
    box-shadow:
        0 3px 8px rgba(61, 50, 38, 0.15),
        inset 0 1px 0 rgba(255, 250, 240, 0.5);
}

.btn.secondary.selected {
    border-color: var(--accent) !important;
    background: rgba(217, 182, 123, 0.3) !important;
}

/* ============================================================
   CARDS
============================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.marketCard {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.marketCard:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* ============================================================
   INPUTS
============================================================ */
input, select, textarea {
    background: var(--bg-elevated);
    color: var(--text-main);
    border: 1px solid var(--border-input);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: inset 0 1px 3px rgba(61, 50, 38, 0.10);
}

input:hover, select:hover, textarea:hover {
    background: rgba(250, 243, 232, 0.9);
    border-color: rgba(155, 106, 59, 0.32);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    background: rgba(255, 250, 240, 0.98);
    border-color: var(--accent-warm);
    box-shadow:
        0 0 0 3px rgba(217, 182, 123, 0.28),
        inset 0 1px 3px rgba(61, 50, 38, 0.08);
}

/* ============================================================
   INFO-IKON FÖR KÖPTA MYNT - SEPIA TEMA
============================================================ */
.info-icon {
    color: #5d4d3b;
    font-size: 16px;
    cursor: default;
    border: 2px solid #c9b898;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    font-weight: 600;
    -webkit-user-select: none;
    user-select: none;
    transition: all 0.2s ease;
    background: linear-gradient(145deg, #fafaf0, #fffaf8);
    box-shadow: 0 3px 6px rgba(61, 50, 38, 0.12);
}

.info-icon:hover {
    color: #3d3226;
    border-color: #b8a888;
    box-shadow: 0 5px 10px rgba(61, 50, 38, 0.18);
}

/* ============================================================
   SORTERA-DROPDOWN FÖR KÖPTA MYNT
============================================================ */
#sortPurchasedCoinsDropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.15s ease;
}

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

#sortPurchasedCoinsDropdown .dropdown-item.active {
    background-color: var(--bg-hover);
    font-weight: 500;
}

#sortPurchasedCoinsDropdown .dropdown-item.active::before {
    content: "✓";
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
    min-width: 16px;
}

/* ============================================================
   DROPDOWN
============================================================ */
.dropdown-content {
    line-height: 1.2 !important;
    display: none;
    position: absolute;
    background: var(--bg-card);
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(74, 60, 46, 0.15);
    border-radius: 8px;
    z-index: 50;
    padding: 0;
    border: 1px solid var(--border-subtle);
}

.dropdown-content a {
    color: var(--text-main);
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 13px;
    cursor: pointer;
    line-height: 1.2 !important;
}

.dropdown-content a:hover {
    background: rgba(74, 60, 46, 0.05);
}

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

#appTitle {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: 18px;
    /* Sepia vintage gradient */
    background: linear-gradient(180deg, #9b6a3b 0%, #d9b67b 40%, #b68c52 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Subtil vintage glow */
    text-shadow:
        0 0 8px rgba(155, 106, 59, 0.38),
        0 0 16px rgba(217, 182, 123, 0.22);
    opacity: 0;
    animation: fadeInTitle 0.8s ease forwards;
    pointer-events: none;
}

#viewForm {
    position: relative;
    z-index: 9999 !important;
}

@keyframes fadeInTitle {
    to { opacity: 1; }
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    color: var(--text-muted);
    text-decoration: none;
    line-height: 1.2 !important;
}

.menu-text {
    font-size: 14px;
    color: var(--text-muted);
}

.menu-icon {
    width: 16px;
    height: 16px;
    opacity: 1;
    margin-left: 8px;
    stroke: #8b5a2b;
}

.menu-icon.market-icon {
    width: 14px;
    height: 14px;
}

/* ============================================================
   PREMIUM INPUT BASE – SEPIA VINTAGE STYLE
============================================================ */
#searchInput,
#silverPriceInput {
    background: rgba(245, 236, 208, 0.92);
    border: 1px solid rgba(155, 106, 59, 0.28);
    box-shadow:
        0 0 14px rgba(217, 182, 123, 0.28),
        0 0 28px rgba(217, 182, 123, 0.18);
    transition: 0.25s ease;
}

/* HOVER – SEPIA CHROME */
#searchInput:hover,
#silverPriceInput:hover {
    background: rgba(250, 243, 232, 0.95);
    border-color: rgba(155, 106, 59, 0.38);
    box-shadow:
        0 0 18px rgba(217, 182, 123, 0.38),
        0 0 36px rgba(217, 182, 123, 0.24);
    transform: translateY(-1px);
}

/* FOCUS – SEPIA METALLRING */
#searchInput:focus,
#silverPriceInput:focus {
    background: rgba(255, 250, 240, 0.98);
    border-color: rgba(217, 182, 123, 0.75);
    box-shadow:
        0 0 0 2px rgba(217, 182, 123, 0.45),
        0 0 24px rgba(217, 182, 123, 0.50),
        0 0 48px rgba(217, 182, 123, 0.28);
    color: var(--text-main);
}

/* PREMIUM PLACEHOLDER – SEPIA TON */
#searchInput::placeholder,
#silverPriceInput::placeholder {
    color: rgba(139, 90, 43, 0.55);
    transition: 0.25s ease;
}

#searchInput:focus::placeholder,
#silverPriceInput:focus::placeholder {
    color: rgba(139, 90, 43, 0.68);
}

/* ============================================================
   SEARCH + HEADER CONTROLS
============================================================ */
header .rightControls {
    margin-left: auto;
    display: flex;
    gap: 10px;
    align-items: center;
}

#searchInput, #silverPriceInput {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--text-main);
    font-size: 13px;
    outline: none;
    min-width: 140px;
    transition: var(--transition-fast);
}

#searchInput { width: 170px; }
#silverPriceInput { width: 140px; }

/* Premium sökfält – isolerad klass */
.vc-search {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.vc-search input[type="text"] {
    width: 70%;
    padding: 10px 14px;
    background: #faf3e8;
    color: #4a3c2e;
    border: 1px solid rgba(139, 90, 43, 0.2);
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 0 6px rgba(139, 90, 43, 0.05);
}

.vc-search input[type="text"]:focus {
    border-color: rgba(139, 90, 43, 0.55);
    box-shadow: 0 0 10px rgba(139, 90, 43, 0.12);
}

#searchResults {
    max-height: 70vh;
    overflow-y: auto;
    min-height: 0;
}

.searchRow {
    padding: 18px 20px;
    border-radius: 8px;
}

/* Premium kort scroll – sepia tema */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #ebdcb8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d9b67b, #9b6a3b);
    border-radius: 4px;
    border: 1px solid #d4c4a8;
    min-height: 30px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #e4c68a, #a67c4b);
}

.compactRow-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

/* ============================================================
   VIEWS
============================================================ */
.view {
    display: none;
    max-width: 980px;
    margin: 26px auto 40px auto;
    padding: 0 18px 40px 18px;
}

.sectionHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

h2 {
    margin: 0 0 14px 0;
    font-size: 22px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-main);
}

h3 {
    margin-top: 18px;
    margin-bottom: 8px;
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ============================================================
   BUTTONS
============================================================ */
.btn {
    background: linear-gradient(135deg, var(--accent), #c9a66b);
    color: #faf3e8;
    border: 1px solid rgba(139, 90, 43, 0.2);
    border-radius: 10px;
    cursor: pointer;
    font-size: calc(13px * var(--ui-scale));
    font-weight: 500;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px rgba(139, 90, 43, 0.15);
    transition: var(--transition-fast);
    padding: calc(10px * var(--ui-scale)) calc(20px * var(--ui-scale));
}

.btn:hover {
    background: linear-gradient(135deg, var(--accent-warm), #d9b67b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.25);
    border-color: rgba(139, 90, 43, 0.3);
}

.btn.secondary {
    background: rgba(245, 236, 208, 0.6);
    color: var(--text-main);
    border: 1px solid rgba(155, 106, 59, 0.2);
    box-shadow: 0 1px 4px rgba(61, 50, 38, 0.08);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.btn.secondary:hover {
    background: rgba(250, 243, 232, 0.8);
    border-color: rgba(155, 106, 59, 0.3);
    box-shadow: 0 2px 8px rgba(61, 50, 38, 0.12);
}


/* Ensure refresh icon inherits proper color in Market view */
#viewMarket .btn.icon-only .refresh-icon {
    stroke: currentColor !important;
    fill: none !important;
    color: var(--text-main) !important;
}

#viewMarket .btn.icon-only {
    color: var(--text-main) !important;
}

/* Market view buttons - brown premium look (same as primary btn) */
#viewMarket .btn.secondary,
#viewMarketSellForm .btn.secondary,
#viewMarketBuyForm .btn.secondary,
#viewMarketForSaleForm .btn.secondary,
#viewPurchasedCoins .btn.secondary,
#viewStorage .btn.secondary,
#viewStoragePlaces .btn.secondary,
#viewDetail .btn.secondary,
#viewForm .btn.secondary {
    background: linear-gradient(135deg, #8b5a2b 0%, #a67c4b 50%, #c9a66b 100%);
    color: #faf3e8;
    border: 1px solid rgba(139, 90, 43, 0.4);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: var(--transition-fast);
    box-shadow:
        0 2px 8px rgba(139, 90, 43, 0.2),
        inset 0 1px 0 rgba(255, 250, 240, 0.3);
}

#viewMarket .btn.secondary:hover,
#viewMarketSellForm .btn.secondary:hover,
#viewMarketBuyForm .btn.secondary:hover,
#viewMarketForSaleForm .btn.secondary:hover,
#viewPurchasedCoins .btn.secondary:hover,
#viewStorage .btn.secondary:hover,
#viewStoragePlaces .btn.secondary:hover,
#viewDetail .btn.secondary:hover,
#viewForm .btn.secondary:hover {
    background: linear-gradient(135deg, #9b6a3b 0%, #b68c52 50%, #d9b67b 100%);
    transform: translateY(-1px);
    box-shadow:
        0 4px 12px rgba(139, 90, 43, 0.3),
        inset 0 1px 0 rgba(255, 250, 240, 0.4);
    border-color: rgba(139, 90, 43, 0.5);
}

/* Cancel buttons - distinguished, subtle style */
.btn.secondary[data-i18n="common.cancel"],
.btn.secondary#btnCancelEdit,
.btn.secondary#closeSearchInfoModal {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(139, 90, 43, 0.25);
    font-weight: 500;
}

.btn.secondary[data-i18n="common.cancel"]:hover,
.btn.secondary#btnCancelEdit:hover,
.btn.secondary#closeSearchInfoModal:hover {
    background: rgba(139, 90, 43, 0.08);
    color: var(--text-main);
    border-color: rgba(139, 90, 43, 0.35);
    transform: none;
    box-shadow: none;
}

/* Delete button on Goals page - distinguished style */
#viewGoals .btn.secondary[onclick*="deleteGoal"] {
    background: rgba(127, 29, 29, 0.15);
    color: #991b1b;
    border: 1px solid rgba(127, 29, 29, 0.4);
}

#viewGoals .btn.secondary[onclick*="deleteGoal"]:hover {
    background: rgba(127, 29, 29, 0.22);
    color: #7f1d1d;
    border-color: rgba(127, 29, 29, 0.5);
}

/* Delete button on coin editing view - distinguished style */
#viewForm .btn.secondary#btnDeleteCoin {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

#viewForm .btn.secondary#btnDeleteCoin:hover {
    background: rgba(220, 38, 38, 0.18);
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.4);
    transform: none;
    box-shadow: none;
}

/* Scale font-size in purchased coins view */
#viewPurchasedCoins {
    font-size: calc(1em * var(--ui-scale));
}

#viewPurchasedCoins .marketRow,
#viewPurchasedCoins .coinRow,
#viewPurchasedCoins .countryRow,
#viewPurchasedCoins .yearRow {
    font-size: inherit;
}

/* Scale font-size in about view */
#viewAbout {
    font-size: calc(1em * var(--ui-scale));
}

/* ============================================================
   MARKET ROW
============================================================ */
.marketRow {
    background: linear-gradient(135deg, rgba(255, 248, 240, 0.5), rgba(244, 232, 216, 0.9));
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    transition: 0.2s ease;
}

.marketRow:hover {
    border-color: var(--accent);
}

.deleteIcon {
    color: #c96666;
    font-weight: bold;
    opacity: 0.7;
    transition: 0.15s;
}

.marketRow:hover .deleteIcon {
    opacity: 1;
}

/* ============================================================
   CANVAS (diagram)
============================================================ */
canvas {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
}

/* ============================================================
   TAG FILTER
============================================================ */
#viewList #tagFilter {
    background: rgba(244, 232, 216, 0.8);
    border: 1px solid rgba(74, 60, 46, 0.6) !important;
    border-radius: 10px;
    color: var(--text-main);
    font-size: 14px;
    width: 150px !important;
    height: 34px;
    padding: 10px 12px;
    box-sizing: border-box;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: 0.2s ease;
}

#viewList #tagFilter::placeholder {
    color: rgba(139, 90, 43, 0.5);
}

#viewList #tagFilter:focus {
    border-color: rgba(74, 60, 46, 0.6) !important;
    background: rgba(250, 243, 232, 0.9);
}
/* ============================================================
   VALUTA-VAL MODAL KNAPPAR
============================================================ */
#currencyModal .btn.primary {
    background: linear-gradient(
        135deg,
        #dfe4ef 0%,
        #f8f9fb 35%,
        #caced8 55%,
        #e6e8ee 100%
    );
    color: #0a0c14;
    border: 1px solid rgba(74, 60, 46, 0.25);
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow:
        0 2px 8px rgba(74, 60, 46, 0.15),
        0 0 0 1px rgba(244, 232, 216, 0.8);
    transition: 0.25s ease;
}
#currencyModal .btn.primary:hover {
    background: linear-gradient(
        135deg,
        #e8ecf5 0%,
        #ffffff 35%,
        #d8dce4 55%,
        #f0f2f6 100%
    );
    box-shadow:
        0 4px 12px rgba(74, 60, 46, 0.25),
        0 0 0 1px rgba(244, 232, 216, 0.9);
    transform: translateY(-1px);
}
#currencyModal .btn.primary:active {
    transform: translateY(0);
}

#reportView {
    background: rgba(201, 66, 66, 0.1);
}

canvas {
    pointer-events: auto;
}

/* ============================================================
   COUNTRY/YEAR/COIN ROWS
============================================================ */
.countryRow, .yearRow, .coinRow {
    border-radius: 10px;
    border: 1px solid rgba(139, 90, 43, 0.25);
    background: linear-gradient(135deg, rgba(232, 220, 200, 0.7), rgba(244, 232, 216, 0.9));
    box-shadow: 0 8px 20px rgba(74, 60, 46, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(6px * var(--ui-scale)) calc(14px * var(--ui-scale));
    margin-bottom: calc(4px * var(--ui-scale));
    cursor: pointer;
    transition: var(--transition-fast);
}

.countryRow:hover, .yearRow:hover, .coinRow:hover {
    transform: translateY(-2px);
    border-color: var(--accent-warm);
    background: linear-gradient(135deg, rgba(244, 232, 216, 0.85), rgba(250, 243, 232, 0.95));
    box-shadow: 0 12px 28px rgba(74, 60, 46, 0.25);
}

.yearRow { margin-left: 10px; }
.coinRow { margin-left: 26px; }

.coinThumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(74, 60, 46, 0.2);
    object-fit: cover;
}

.flagSmall {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* ============================================================
   FLEX HELPER CLASSES
============================================================ */
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-20 { gap: 20px; }
.cursor-pointer { cursor: pointer; }

/* ============================================================
   MARGIN HELPER CLASSES
============================================================ */
.margin-bottom-12 { margin-bottom: 12px; }
.margin-bottom-20 { margin-bottom: 20px; }
.margin-top-0 { margin-top: 0; }
.margin-top-4 { margin-top: 4px; }
.margin-top-6 { margin-top: 6px; }
.margin-top-10 { margin-top: 10px; }
.margin-top-14 { margin-top: 14px; }

/* ============================================================
   FONT HELPER CLASSES
============================================================ */
.font-small { font-size: 12px; }
.font-24 { font-size: 24px; }
.font-weight-600 { font-weight: 600; }
.font-14 { font-size: 14px; }
.font-16 { font-size: calc(16px * var(--ui-scale)); }
.font-13 { font-size: 13px; }
.line-height-155 { line-height: 1.55; }
.color-main { color: var(--text-main); }
.opacity-90 { opacity: 0.9; }

/* ============================================================
   TEXT COLOR HELPER CLASSES
============================================================ */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.color-accent { color: var(--accent); }

/* ============================================================
   BUTTON ROW
============================================================ */
.button-row {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* ============================================================
   DETAIL BOX
============================================================ */
.detailBox {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    padding: 20px;
    margin-bottom: 20px;
}

.detailImage {
    width: 110px;
    height: 110px;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(74, 60, 46, 0.3);
    margin-bottom: 12px;
    object-fit: cover;
}

/* ============================================================
   LABEL STYLES
============================================================ */
label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================================
   CUSTOM DROPDOWN
============================================================ */
.custom-dropdown {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
}

.custom-dropdown input {
    width: 100%;
    padding: 12px 36px 12px 16px;
    background: rgba(244, 232, 216, 0.5);
    border: 1px solid var(--border-input);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 14px;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(74, 60, 46, 0.1), inset 0 1px 0 rgba(255, 248, 240, 0.3);
    box-sizing: border-box;
}

.custom-dropdown input:focus {
    background: rgba(250, 243, 232, 0.8);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(201, 166, 107, 0.35);
    outline: none;
}

.custom-dropdown input:hover {
    background: rgba(244, 232, 216, 0.7);
    border-color: var(--border-subtle);
}

.dropdown-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #8B7355;
    pointer-events: none;
    font-size: 10px;
    transition: transform 0.3s ease;
    display: none;
}

.custom-dropdown.open .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: rgba(244, 232, 216, 0.95);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(74, 60, 46, 0.2);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.custom-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-item {
    padding: 10px 16px;
    color: var(--text-main);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    line-height: 1.2 !important;
}

.dropdown-item:hover {
    background: rgba(201, 166, 107, 0.2);
}

.dropdown-item.hidden {
    display: none;
}

.card label {
    display: block;
    margin-bottom: 4px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ============================================================
   CARD INPUT
============================================================ */
.card input {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 15px;
    letter-spacing: 0.02em;
    transition: 0.25s ease;
    box-shadow: inset 0 0 0 0 rgba(201, 166, 107, 0);
    caret-color: var(--text-main);
    box-sizing: border-box;
}

.card input:hover {
    background: rgba(244, 232, 216, 0.7);
    border-color: var(--border-subtle);
}

.card input:focus {
    background: rgba(250, 243, 232, 0.8);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(201, 166, 107, 0.35);
    outline: none;
}

/* ============================================================
   PREMIUM INPUT WITH DATALIST – SEPIA THEME
============================================================ */
input.premium-select {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: 0.25s ease;
  box-shadow: inset 0 0 0 0 rgba(201, 166, 107, 0);
}

input.premium-select:hover {
    background: rgba(244, 232, 216, 0.7);
    border-color: var(--border-subtle);
}

input.premium-select:focus {
    background: rgba(250, 243, 232, 0.8);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(201, 166, 107, 0.35);
    outline: none;
}

datalist option {
    background: var(--bg-elevated);
    color: var(--text-main);
    padding: 10px;
}

/* ============================================================
   SÄLLSYNTHET-SLIDER
============================================================ */
.rarity-container {
    margin: 8px 0 16px 0;
}

.rarity-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right,
        #cc0000 0%,     /* Djup röd - mycket ovanlig */
        #ff0000 20%,    /* Stark röd - ovanlig */
        #ff4444 40%,    /* Medium röd */
        #8888ff 60%,    /* Medium blå */
        #4444ff 80%,    /* Stark blå - vanlig */
        #0066ff 100%    /* Djup blå - mycket vanlig */
    );
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.rarity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 2px solid #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.rarity-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.rarity-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 2px solid #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.rarity-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.rarity-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.rarity-rare {
    color: #ff4444;
    font-weight: 500;
}

.rarity-common {
    color: #4444ff;
    font-weight: 500;
}

.rarity-current {
    font-weight: 600;
    color: var(--text-main);
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg-elevated);
}

/* ============================================================
   RARITY TOOLTIP
============================================================ */
.rarity-tooltip {
    position: relative;
    text-decoration: none;
    border-bottom: 1px dotted transparent;
    transition: border-bottom-color 0.2s ease;
    cursor: text;
}

.rarity-tooltip:hover {
    border-bottom-color: var(--accent);
}

.rarity-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    padding: 8px 14px;
    background: var(--bg-elevated);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    box-shadow: 0 6px 20px rgba(74, 60, 46, 0.3);
    z-index: 1000;
}

.rarity-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-6px);
}
/* ============================================================
   SILVER TOOLTIP
============================================================ */
.silver-tooltip {
    position: relative;
    cursor: help;
}
.silver-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%) translateX(-8px);
    padding: 10px 16px;
    background: var(--bg-elevated);
    color: var(--text-main);
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(74, 60, 46, 0.3);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.silver-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-12px);
}

/* ============================================================
   TEXTAREA-NOTERING
============================================================ */
.textarea-notering {
    width: 100%;
    min-height: 80px;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 14px;
    letter-spacing: 0.02em;
    resize: vertical;
    box-sizing: border-box;
}

/* ------------------------------------------------------------
   SAMLINGENS VÄGLEDNING
------------------------------------------------------------ */
.guidance-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 0 16px 0;
    font-style: italic;
}

.guidance-textarea {
    width: 100%;
    min-height: 420px;
    padding: 20px 22px;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.8;
    letter-spacing: 0.02em;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.guidance-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.guidance-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    opacity: 0.7;
}

.textarea-notering:focus {
    background: var(--bg-elevated);
    border-color: var(--accent);
    outline: none;
}

/* ============================================================
   TOPPLISTA – PREMIUM FÄRGER FÖR TOPP 10
============================================================ */
.topHeader {
    text-align: center;
}
.toplist-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(244, 232, 216, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    letter-spacing: 0.02em;
}

.toplist-1 {
    background: linear-gradient(
        135deg,
        #8b6914 0%,
        #c9a227 25%,
        #e6c875 50%,
        #c9a227 75%,
        #8b6914 100%
    );
    color: #ffffff;
    border: 1px solid rgba(139, 105, 20, 0.5);
    box-shadow: 
        0 5px 16px rgba(139, 105, 20, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.6),
        0 1px 2px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.toplist-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.toplist-2 {
    background: linear-gradient(
        135deg,
        #5a6a7a 0%,
        #9aa0a8 25%,
        #c8cdd0 50%,
        #9aa0a8 75%,
        #5a6a7a 100%
    );
    color: #ffffff;
    border: 1px solid rgba(90, 106, 122, 0.5);
    box-shadow: 
        0 4px 14px rgba(90, 106, 122, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.toplist-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );
    animation: shimmer 3.5s infinite;
    animation-delay: 0.5s;
}

.toplist-3 {
    background: linear-gradient(
        135deg,
        #6b3a0f 0%,
        #a0522d 25%,
        #c9946a 50%,
        #a0522d 75%,
        #6b3a0f 100%
    );
    color: #ffffff;
    border: 1px solid rgba(107, 58, 15, 0.5);
    box-shadow: 
        0 4px 12px rgba(107, 58, 15, 0.25),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.6),
        0 1px 2px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.toplist-3::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shimmer 4s infinite;
    animation-delay: 1s;
}

.coinThumbWrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.coinThumbWrapper:hover {
    opacity: 0.7;
}

.toplist-item {
    cursor: pointer;
    transition: 0.2s ease;
}

.toplist-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: rgba(250, 243, 232, 0.9);
}

/* ============================================================
   WELCOME TIP - NY ANVÄNDARE
============================================================ */
.welcome-tip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    color: var(--text-main);
    padding: 18px 22px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(74, 60, 46, 0.2);
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    z-index: 99999;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid var(--border-subtle);
    font-size: 14px !important;
    overflow-y: auto;
}

.welcome-tip * {
    font-size: inherit !important;
}

.welcome-tip.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -10px);
}

/* ------------------------------------------------------------
   SPOTLIGHT MODAL - DAGENS MYNT
============================================================ */
.spotlight-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.spotlight-image {
    width: 100%;
    max-width: 300px;
    max-height: 300px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    align-self: center;
    background: var(--bg-elevated);
}

.spotlight-text {
    line-height: 1.6;
    font-size: 14px;
}

.spotlight-subtitle {
    font-size: 16px;
    font-weight: 600;
    margin-top: -8px;
    margin-bottom: 8px;
    color: var(--accent);
}

.tip-btn {
    margin-top: 12px;
    width: 100%;
    padding: 10px;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    color: #fff8f0;
    cursor: pointer;
    font-size: 14px;
}

.search-info-input-wrapper {
    margin: 15px 0;
}

.search-info-input-wrapper input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 15px;
    letter-spacing: 0.02em;
    transition: 0.25s ease;
    box-shadow: inset 0 0 0 0 rgba(201, 166, 107, 0);
}

.search-info-input-wrapper input:hover {
    background: rgba(244, 232, 216, 0.7);
    border-color: var(--border-subtle);
}

.search-info-input-wrapper input:focus {
    background: rgba(250, 243, 232, 0.8);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(201, 166, 107, 0.35);
    outline: none;
}

.search-info-input-wrapper input::placeholder {
    color: rgba(139, 115, 85, 0.6);
}

.tip-checkbox {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

/* ============================================================
   STATISTIK – ÖVERSIKT
============================================================ */
.statsOverview {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.statsBox {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    padding: 18px;
    text-align: center;
}

.statsNumber {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 6px;
}

.statsLabel {
    font-size: 14px;
    opacity: 0.7;
}

/* ============================================================
   STATISTIK – BÄSTA KÖP
============================================================ */
.bestBuys {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.bestBuyCategory {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    padding: calc(12px * var(--ui-scale));
}

.bestBuyTitle {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 0.9;
}

.bestBuyItem {
    font-size: 15px;
    opacity: 0.85;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
    cursor: pointer;
}

.collectionSort {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.tagFilterWrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    flex-shrink: 0;
}
/* Lägg till button in tagFilterWrapper - match Rapport button exactly */
#viewList .tagFilterWrapper #btnAddCoin {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.2);
}

.tagFilterLabel {
    font-size: 14px;
    color: var(--text-main);
    opacity: 0.8;
    white-space: nowrap;
}
/* Clear button for input fields */
.clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    color: rgba(74, 60, 46, 0.5);
    padding: 0 4px;
    line-height: 1;
    -webkit-user-select: none;
    user-select: none;
    display: none;
}
.clear-btn:hover {
    color: rgba(74, 60, 46, 0.7);
}
/* Show clear button when input has value */
input:not(:placeholder-shown) + .clear-btn {
    display: block;
}

#viewList #tagFilter {
    background: rgba(244, 232, 216, 0.5);
    border: 1px solid rgba(74, 60, 46, 0.6) !important;
    padding: 10px 12px;
    border-radius: 10px;
    width: 150px !important;
    height: 34px;
    box-sizing: border-box;
    color: var(--text-main);
    font-size: 14px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: 0.2s ease;
    box-sizing: border-box;
}

#viewList #tagFilter::placeholder {
    color: rgba(74, 60, 46, 0.5);
}

#viewList #tagFilter:focus {
    border-color: rgba(74, 60, 46, 0.6) !important;
    background: rgba(250, 243, 232, 0.7);
    outline: none;
}

.sortBtn {
    padding: 10px 18px;
    background: rgba(244, 232, 216, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    flex-shrink: 0;
    white-space: nowrap;
}

.sortBtn:hover {
    background: rgba(244, 232, 216, 0.8);
    border-color: var(--border-input);
}

/* ------------------------------------------------------------
   MENY - DIVIDER
------------------------------------------------------------ */
.menu-divider {
    border-top: 1px solid rgba(0,0,0,0.1);
    margin: 6px 0;
}

.sortBtn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff8f0;
}

/* ============================================================
   STORAGE BOX (Förvaringsplatser)
============================================================ */
.storageBox {
    background: var(--bg-card);
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.storageBox:hover {
    transform: translateY(-3px);
    background: var(--bg-elevated);
}

.storageBox .statsNumber {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
}

.storageBox .statsLabel {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================================
   STORAGE ITEM (Värde per förvaringsplats)
============================================================ */
.storageItem {
    background: rgba(244, 232, 216, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s ease;
    cursor: pointer;
}

.storageItem:hover {
    background: rgba(250, 243, 232, 0.9);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.storagePlace {
    font-size: 15px;
    color: var(--text-main);
    letter-spacing: 0.3px;
}

.storageValue {
    font-size: 17px;
    font-weight: 600;
    color: var(--accent);
}

.statsHeader {
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* ============================================================
   BILDFÖRHANDSVISNINGAR
============================================================ */
.image-preview-small {
    width: 120px;
    border-radius: 10px;
    cursor: pointer;
}

/* Date input styling - make calendar picker more visible */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.8;
    padding: 5px;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Date input tooltip */
input[type="date"] {
    position: relative;
}

input[type="date"]::after {
    content: "Klicka på kalendern för att välja datum";
    position: absolute;
    top: -30px;
    right: 0;
    background: var(--bg-card);
    color: var(--text-main);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

input[type="date"]:hover::after,
input[type="date"]:focus::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-4px);
}

/* Date field tooltip - one-time tip */
.date-field-tooltip {
    margin-top: 8px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(74, 60, 46, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.tooltip-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tooltip-close:hover {
    background: rgba(74, 60, 46, 0.1);
    color: var(--text-main);
}

/* ============================================================
   STORAGE NOTE BLOCK
============================================================ */
.storage-note-block {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(74, 60, 46, 0.35);
    border: 1px solid var(--border-subtle);
    margin-bottom: 32px;
    animation: fadeIn 0.25s ease-out;
}

.storage-note-title {
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
}

.storage-note-input {
    width: 100%;
    min-height: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border-input);
    box-shadow: inset 0 0 6px rgba(74, 60, 46, 0.05),
                0 0 6px rgba(74, 60, 46, 0.10);
    border-radius: 6px;
    padding: 12px 14px;
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.45;
    resize: vertical;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    box-sizing: border-box;
}

.storage-note-input:focus {
    border-color: var(--accent);
    box-shadow:
        inset 0 0 6px rgba(201, 166, 107, 0.18),
        0 0 5px rgba(201, 166, 107, 0.20);
}

.storage-note-input::placeholder {
    color: rgba(74, 60, 46, 0.55);
}

/* --- Platser (kapacitet / använda) — sepia --- */
.storage-slots-card {
    margin-bottom: 24px;
}
.storage-slots-hint {
    text-align: center;
    margin: 0 auto 14px;
    max-width: 520px;
    line-height: 1.45;
}
.storage-slots-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
    margin-bottom: 14px;
}
@media (max-width: 520px) {
    .storage-slots-grid {
        grid-template-columns: 1fr;
    }
}
.storage-slot-field label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-align: center;
}
.storage-slots-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    border: 1px solid var(--border-input);
    background: rgba(255, 252, 245, 0.35);
    color: var(--text-main);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.storage-slots-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow:
        inset 0 0 6px rgba(201, 166, 107, 0.12),
        0 0 0 2px rgba(201, 166, 107, 0.18);
}
.storage-slots-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(74, 60, 46, 0.12);
    overflow: hidden;
}
.storage-slots-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), rgba(201, 166, 107, 0.55));
    transition: width 0.35s ease;
}
.storage-slots-fill--warn,
.storage-box-slots-fill--warn {
    background: linear-gradient(90deg, #a85a42, #c97d5c);
}
.storage-box-slots {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}
.storage-box-slots-meta {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
    opacity: 0.92;
}
.storage-box-slots-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(74, 60, 46, 0.12);
    overflow: hidden;
}
.storage-box-slots-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), rgba(201, 166, 107, 0.45));
    transition: width 0.3s ease;
}

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

/* ============================================================
   VÄRDEÖVERSIKT MODAL
============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse at center, rgba(61, 50, 38, 0.4) 0%, rgba(61, 50, 38, 0.7) 100%);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.modal-overlay.show {
    opacity: 1;
}

.modal-overlay.show .value-overview-modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.modal-overlay.show .report-modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.value-overview-modal {
    background: var(--bg-card);
    border: 1px solid rgba(139, 90, 43, 0.15);
    border-radius: 24px;
    max-width: 70%;
    width: 70%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 
        0 25px 80px rgba(74, 60, 46, 0.35),
        0 10px 30px rgba(74, 60, 46, 0.25),
        inset 0 1px 0 rgba(255, 250, 240, 0.1);
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   DELETE ALL MODAL
============================================================ */
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(74, 60, 46, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

#goalIndexModal .modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(74, 60, 46, 0.3) !important;
}

#goalIndexModal .modal-body {
    background: var(--bg-card) !important;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 40px 20px 40px;
    border-bottom: 1px solid rgba(139, 90, 43, 0.1);
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 90, 43, 0.2), transparent);
}

.modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-main);
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 1;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--accent) 50%, var(--text-main) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.value-trend-indicator {
    display: flex;
    align-items: center;
    position: absolute;
    right: 50px;
}

.report-content {
    padding: 48px 60px;
    max-height: 60vh;
    overflow-y: auto;
}

.report-text {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 17px;
    line-height: 2.0;
    color: var(--text-main);
    white-space: pre-wrap;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    text-align: center;
    letter-spacing: 0.3px;
}

.report-footer {
    padding: 32px 60px 48px 60px;
    border-top: 1px solid rgba(205, 133, 63, 0.12);
    background: var(--bg-card);
    display: flex;
    justify-content: center;
}

.report-footer .btn {
    min-width: 120px;
    max-width: 200px;
}

.modal-body {
    padding: 32px 40px 40px 40px;
    background: var(--bg-card);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: absolute;
    right: 8px;
}

.modal-close:hover {
    background: var(--bg-elevated);
    color: var(--text-main);
}

.report-header {
    position: relative;
    padding: 48px 60px 32px 60px;
    border-bottom: 1px solid rgba(205, 133, 63, 0.2);
    background: var(--bg-card);
}

.report-header .modal-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.report-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(205, 133, 63, 0.3), transparent);
}

.report-modal {
    background: var(--bg-card);
    border: 1px solid rgba(205, 133, 63, 0.35);
    border-radius: 16px;
    width: 80%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 
        0 30px 90px rgba(74, 60, 46, 0.4),
        0 15px 40px rgba(74, 60, 46, 0.3),
        inset 0 1px 0 rgba(255, 250, 240, 0.15);
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.report-header h3 {
    margin: 0 auto;
    font-size: 28px;
    font-weight: 600;
    color: var(--text-main);
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
    max-width: calc(100% - 60px);
    padding-bottom: 8px;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 8px;
}

.value-item.full-width {
    grid-column: span 2;
}

.value-item {
    background: linear-gradient(145deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
    border: 1px solid rgba(139, 90, 43, 0.12);
    border-radius: 16px;
    padding: 24px 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(155, 106, 59, 0.08), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.value-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(74, 60, 46, 0.25);
    border-color: rgba(139, 90, 43, 0.25);
}

.value-item:hover::before {
    opacity: 1;
}

.value-item label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    text-align: center;
    opacity: 0.7;
}

.value-amount {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0;
    text-align: center;
    letter-spacing: -0.5px;
}

.value-item:nth-child(4) .value-amount {
    color: var(--accent);
    font-size: 30px;
    text-shadow: 0 0 30px rgba(201, 166, 107, 0.3);
}

.trend-arrow {
    font-size: 18px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    cursor: help;
}

.trend-arrow.up {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
}

.trend-arrow.neutral {
    color: var(--text-muted);
    background: rgba(139, 146, 163, 0.1);
}

.trend-arrow.down {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

.trend-arrow::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    color: var(--text-main);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 12px rgba(74, 60, 46, 0.3);
    max-width: 200px;
    white-space: normal;
}

.trend-arrow:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* SELLER OVERVIEW MODAL
============================================================ */
#sellerOverviewModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
}

/* Image Fullscreen Overlay */
#imageFullscreenOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
}

#imageFullscreenOverlay[style*="flex"] {
    opacity: 1;
}

#imageFullscreenOverlay[style*="flex"] ~ body,
body:has(#imageFullscreenOverlay[style*="flex"]) {
    overflow: hidden;
}

.seller-overview-modal {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    max-width: 280px;
    width: auto;
    margin: 0;
}

.seller-modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    overflow: visible;
    max-height: 80vh;
    overflow-y: auto;
}

.seller-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
}

.seller-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.seller-modal-body {
    padding: 0;
}

.seller-info-grid {
    padding: 16px 20px;
}

.seller-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.seller-info-item:last-child {
    border-bottom: none;
}

.seller-info-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.seller-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}
.seller-coins-list {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 12px;
    padding: 8px 20px;
}
.seller-coin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 13px;
}
.seller-coin-item:last-child {
    border-bottom: none;
}
.seller-coin-name {
    color: var(--text-main);
    font-weight: 500;
}
.seller-coin-price {
    color: var(--text-muted);
    font-size: 12px;
}
.seller-coins-link {
    cursor: pointer;
    text-decoration: none;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 5px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(74, 60, 46, 0.1);
}
.seller-coins-link:hover {
    background: rgba(139, 90, 43, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(139, 90, 43, 0.2);
}
/* ============================================================
   SÄLJAR MYNT LISTA MODAL
============================================================ */
.seller-coins-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(74, 60, 46, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease-out;
}
.seller-coins-modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    max-width: 400px;
    width: 90%;
    max-height: 60vh;
    overflow: hidden;
    animation: modalSlideIn 0.25s ease-out;
}
.seller-coins-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
}
.seller-coins-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}
.seller-coins-modal-header .modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: var(--transition-fast);
}
.seller-coins-modal-header .modal-close:hover {
    background: rgba(74, 60, 46, 0.1);
    color: var(--text-main);
}
.seller-coins-modal-body {
    padding: 16px 20px;
    max-height: calc(60vh - 60px);
    overflow-y: auto;
}
.seller-coins-modal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 14px;
}
.seller-coins-modal-item:last-child {
    border-bottom: none;
}
.seller-coins-modal-name {
    color: var(--text-main);
    font-weight: 500;
}
.seller-coins-modal-price {
    color: var(--text-muted);
    font-size: 13px;
}

/* ============================================================
   RESPONSIVE - TABLET
============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .view {
        max-width: 100%;
        padding: 0 24px 40px 24px;
    }
    header {
        padding: 16px 24px;
    }
    .btn {
        padding: 9px 18px;
        min-height: 44px;
        touch-action: manipulation;
    }
    .vc-search input[type="text"],
    .card input {
        padding: 14px 18px;
        min-height: 48px;
    }
}

@media (max-width: 768px) {
    .btn {
        padding: 9px 18px;
        min-height: 44px;
        touch-action: manipulation;
    }
    .vc-search input[type="text"],
    .card input {
        padding: 14px 18px;
        min-height: 48px;
    }
    header {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    nav {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    nav button {
        padding: 10px 16px;
        font-size: 12px;
    }
}


/* ============================================================
   SELLER LINK STYLING
============================================================ */
.seller-link {
    color: var(--accent);
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px dotted var(--accent);
    transition: all 0.2s ease;
}

.seller-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ============================================================
   SCROLL TO TOP BUTTON
============================================================ */
.scroll-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #C9A66B);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(74, 60, 46, 0.4);
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(74, 60, 46, 0.6);
}

.scroll-to-top:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(74, 60, 46, 0.5);
}

.scroll-to-top svg {
    color: #1a1a1a;
    transition: transform 0.3s ease;
}

.scroll-to-top:hover svg {
    transform: translateY(-2px);
}

/* ============================================================
   HIDDEN CLASS
============================================================ */
.hidden {
    display: none !important;
}

/* ============================================================
   MÅL (GOALS) - SEPIA THEME
============================================================ */
.goal-years-container {
    margin-top: 15px;
}

.goal-year-badge {
    padding: 10px 14px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(61, 50, 38, 0.08);
    border: 1px solid rgba(61, 50, 38, 0.15);
    color: var(--text-main);
    position: relative;
}

.goal-year-badge:hover {
    transform: scale(1.05);
    background: rgba(61, 50, 38, 0.12);
}

.goal-year-badge.exists {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.5);
    color: #16a34a;
}

.goal-year-badge.missing {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.5);
    color: #dc2626;
}

.goal-year-badge .remove-hint {
    position: absolute;
    top: 2px;
    right: 6px;
    font-size: 12px;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.goal-year-badge:hover .remove-hint {
    opacity: 0.8;
}
.imageRow {
    display: flex;
    gap: 12px;
    align-items: center;
}
