/* ============================================================
   PREMIUM LIGHT THEME – MJUKARE OCH MER ELEGANT LJUS TEMA
============================================================ */

.hidden-field {
    display: none !important;
}

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

:root{
    --ui-scale: 1;
    --bg-main:#f1f5f9;
    --bg-elevated:#ffffff;
    --bg-card:#ffffff;
    --accent:#0ea5e9;
    --accent-light:#38bdf8;
    --accent-dark:#0284c7;
    --accent-soft:rgba(14,165,233,0.12);
    --accent-warm:#f97316;
    --accent-highlight:rgba(255,255,255,0.5);
    --text-main:#0f172a;
    --text-muted:#475569;
    --border-subtle:#e2e8f0;
    --radius-card:14px;
    --shadow-soft:0 12px 30px rgba(0,0,0,0.10);
    --shadow-card:0 8px 24px rgba(0,0,0,0.12);
    --shadow-hover:0 16px 40px rgba(0,0,0,0.18);
    --transition-fast:0.18s ease-out;
    --transition-med:0.28s ease-out;
    /* Diagram-färger för ljust tema - exklusiva */
    --chart-text:#0f172a;
    --chart-grid:#cbd5e1;
    --ucoin-color:#d97706;
    --silver-color:#0ea5e9;
    --bg-hover:#f8fafc;
    --border-input:#e2e8f0;
}


/* ------------------------------------------------------------
   DELETE ALL MODAL - Light theme specifik
------------------------------------------------------------ */
#deleteAllModal .modal-content {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 
        0 24px 60px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

#purchasedCoinsAnalysisModal .modal-content {
    background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 50%, #e2e8f0 100%) !important;
    border: 1px solid #cbd5e1 !important;
    border-top: 3px solid #3b82f6 !important;
    border-radius: 20px !important;
    box-shadow: 
        0 30px 100px rgba(0, 0, 0, 0.18),
        0 15px 40px rgba(0, 0, 0, 0.12),
        0 5px 15px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    overflow: hidden !important;
}

#goalIndexModal .modal-content {
    background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 50%, #e2e8f0 100%) !important;
    border: 1px solid #cbd5e1 !important;
    border-top: 3px solid #3b82f6 !important;
    border-radius: 20px !important;
    box-shadow:
        0 30px 100px rgba(0, 0, 0, 0.18),
        0 15px 40px rgba(0, 0, 0, 0.12),
        0 5px 15px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    overflow: hidden !important;
}

#deleteAllModal .modal-body {
    background: #ffffff !important;
}

#purchasedCoinsAnalysisModal .modal-body {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%) !important;
    border-radius: 0 0 18px 18px !important;
    padding: 28px 32px !important;
}

#deleteAllModal .modal-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

#purchasedCoinsAnalysisModal .modal-header {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%) !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-radius: 18px 18px 0 0 !important;
    padding: 24px 32px !important;
}

#purchasedCoinsAnalysisModal .modal-header h3 {
    color: #0f172a !important;
    font-weight: 700 !important;
    font-size: 20px !important;
    letter-spacing: -0.5px !important;
}

#purchasedCoinsAnalysisModal .modal-body > div > div {
    padding: 6px 0 !important;
    border-bottom: none !important;
}

/* Minska mellanrum mellan 'total inköpspris' och 'snittpris' */
#purchasedCoinsAnalysisModal .modal-body > div:nth-child(3) {
    margin-bottom: 10px !important;
}

#purchasedCoinsAnalysisModal .modal-body > div > div:last-child {
    border-bottom: none !important;
}

/* Subtil och elegant markering mellan snittpris och katalogvärde */
#purchasedCoinsAnalysisModal .modal-body > div > div:nth-child(5) {
    border-bottom: 1px solid var(--border-subtle) !important;
    padding-bottom: 12px !important;
    margin-bottom: 12px !important;
}



#deleteAllModal .modal-header h3 {
    color: #0f172a !important;
}
*{ box-sizing:border-box; caret-color: #000000 !important; }
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 16px;
    line-height: 1.6;
    caret-color: #0f172a;
    transition: opacity 0.5s ease-in-out;
    min-height: 100vh;
}
body.fade-out {
    opacity: 0;
}
/* ============================================================
   TAB BUTTONS – LIGHT THEME
============================================================ */
.tab-btn {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.96) 0%,
        rgba(243, 246, 252, 0.96) 50%,
        rgba(255, 255, 255, 0.96) 100%
    );
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
    padding: 8px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(15,23,42,0.08),
                inset 0 0 0 1px rgba(255,255,255,0.70);
}

.tab-btn:hover {
    color: var(--text-main);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 1.0) 0%,
        rgba(248, 250, 252, 1.0) 50%,
        rgba(255, 255, 255, 1.0) 100%
    );
    border-color: var(--accent);
    box-shadow: 0 12px 24px rgba(15,23,42,0.12),
                inset 0 0 0 1px rgba(255,255,255,0.85);
    transform: translateY(-1px);
}

.tab-btn.active {
    color: var(--text-main);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 1.0) 0%,
        rgba(248, 250, 252, 1.0) 50%,
        rgba(255, 255, 255, 1.0) 100%
    );
    border-color: var(--accent);
    box-shadow: 0 12px 24px rgba(15,23,42,0.12),
                inset 0 0 0 1px rgba(255,255,255,0.85);
}

/* ============================================================
   VALUEINDEX LIST ITEMS – LIGHT 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(37, 99, 235, 0.08);
    border-left: 2px solid rgba(37, 99, 235, 0.3);
    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,255,255,0.98), rgba(248,250,252,0.95), rgba(241,245,249,0.92));
    border-bottom:1px solid rgba(37,99,235,0.1);
    display:flex;
    align-items:center;
    justify-content:space-between;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
header nav { flex: 1; }
nav{
    display:flex;
    gap:8px;
    position: relative;
}
nav button{
    background:transparent;
    color:var(--text-muted);
    border:1px solid transparent;
    padding:8px 14px;
    border-radius:999px;
    cursor:pointer;
    font-size:13px;
    letter-spacing:0.03em;
    text-transform:uppercase;
    transition:var(--transition-fast);
}
nav button:hover{
    background:rgba(37,99,235,0.1);
    color:var(--accent-dark);
    border-color:rgba(37,99,235,0.2);
    transform:translateY(-1px);
}

/* 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-warm);
    border-bottom-color: var(--accent-warm);
}

/* 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-input);
    border-radius: var(--radius-card);
    box-shadow: 
        0 24px 60px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    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-input);
    background: var(--bg-hover);
}

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

.seller-modal-body {
    padding: 32px 40px 40px 40px;
    background: transparent;
}

.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-input);
}

.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-divider {
    height: 1px;
    background: var(--border-input);
    margin: 12px 0;
}

.seller-subheading {
    font-size: 12px;
    font-weight: 600;
    color: #5B7FFF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 8px 0 4px 0;
}
.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 1px 3px rgba(0, 0, 0, 0.08);
}
.seller-coins-link:hover {
    background: rgba(14, 165, 233, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.2);
}
/* ============================================================
   SÄLJAR MYNT LISTA MODAL
============================================================ */
.seller-coins-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    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-hover),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    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-hover);
}
.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(0, 0, 0, 0.05);
    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;
}

/* DROPDOWN */
.dropdown { position: relative; display: inline-block; }
.dropbtn{
    background:transparent;
    color:var(--text-muted);
    border:1px solid transparent;
    padding:8px 14px;
    border-radius:999px;
    cursor:pointer;
    font-size:13px;
    letter-spacing:0.03em;
    text-transform:uppercase;
    transition:var(--transition-fast);
}
.dropbtn:hover{
    background:rgba(37,99,235,0.08);
    color:var(--text-main);
}
.dropdown-content{
    display:none;
    position:absolute;
    background:var(--bg-card);
    min-width:200px;
    box-shadow:0 4px 12px rgba(0,0,0,0.15);
    border-radius:8px;
    z-index:50;
    padding:0;
}
.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(37,99,235,0.08);
}
.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;
    /* Metallisk blå glans */
    background: linear-gradient(180deg, #2563eb 0%, #3b82f6 40%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Subtil premiumglow */
    text-shadow:
        0 0 8px rgba(37,99,235,0.25),
        0 0 16px rgba(37,99,235,0.15);
    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: #475569;
  text-decoration: none;
  line-height: 1.2 !important;
}
.menu-text {
  font-size: 14px;
  color: #475569;
  line-height: 1.2 !important;
}
.menu-icon {
  width: 16px;
  height: 16px;
  opacity: 0.85;
  margin-left: 8px;
}
.dropdown-content .menu-icon [stroke] {
  stroke: #334155;
}
.dropdown-content .menu-icon [fill]:not([fill="none"]) {
    fill: #334155;
}
.menu-icon.market-icon {
  width: 14px;
  height: 14px;
}
/* === PREMIUM INPUT BASE – LJUS PREMIUM === */
#searchInput,
#silverPriceInput {
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.9),
        rgba(248,249,251,0.95),
        rgba(241,245,249,0.9)
    );
    border: 1px solid var(--border-subtle);
    box-shadow:
        inset 0 0 8px rgba(37,99,235,0.08),
        0 2px 8px rgba(0,0,0,0.04);
    transition: 0.25s ease;
}
/* === PREMIUM INPUT HOVER – LJUS GLANS === */
#searchInput:hover,
#silverPriceInput:hover {
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.95),
        rgba(248,249,251,1.0),
        rgba(241,245,249,0.95)
    );
    border-color: rgba(37,99,235,0.3);
    box-shadow:
        inset 0 0 12px rgba(37,99,235,0.12),
        0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
/* === PREMIUM INPUT FOCUS – BLÅ RING + INRE SHINE === */
#searchInput:focus,
#silverPriceInput:focus {
    background: linear-gradient(
        135deg,
        rgba(255,255,255,1.0),
        rgba(248,249,251,1.0),
        rgba(241,245,249,1.0)
    );
    border-color: var(--accent);
    box-shadow:
        0 0 0 2px rgba(37,99,235,0.25),
        inset 0 0 16px rgba(37,99,235,0.15),
        0 4px 16px rgba(37,99,235,0.12);
    color: var(--text-main);
}
/* ============================================================
   SEARCH + HEADER CONTROLS
============================================================ */
header .rightControls{
    margin-left:auto;
    display:flex;
    gap:10px;
    align-items:center;
}
#searchInput,#silverPriceInput{
    padding:8px 12px;
    border-radius:999px;
    border:1px solid var(--border-subtle);
    background:rgba(255,255,255,0.9);
    color:var(--text-main);
    font-size:13px;
    outline:none;
    min-width:140px;
    transition:var(--transition-fast);
}
#searchInput{ width:170px; }
#silverPriceInput{ width:140px; }
#searchInput:focus,#silverPriceInput:focus{
    border-color:var(--accent);
    box-shadow:0 0 0 1px rgba(37,99,235,0.25);
    background:rgba(255,255,255,1.0);
}
/* 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: #f1f5f9;
  color: #1e293b;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.vc-search input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}
#searchResults {
    max-height: 70vh;
    overflow-y: auto;
    min-height: 0;
}
.searchRow {
    padding: 18px 20px;
    border-radius: 8px;
}
/* Premium kort scroll */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #cbd5e1, #94a3b8);
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    min-height: 30px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #94a3b8, #64748b);
}
.compactRow-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}
.compactThumb {
    width: 60px !important;
    height: 60px !important;
    flex: 0 0 62px !important;
    object-fit: cover;
    border-radius: 6px;
}
.compactInfo strong {
    font-size: 15px;
    line-height: 1.25;
}
.compactInfo span {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.2;
}
/* --- Notisblock för förvaringsplats (ljus premium version) --- */
.storage-note-block {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid var(--border-subtle);
    margin-bottom: 32px;
    animation: fadeIn 0.25s ease-out;
}
/* Titel – diskret, mörkgrå, premium */
.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-subtle);
    box-shadow: inset 0 0 6px rgba(37,99,235,0.05),
                0 2px 6px rgba(0,0,0,0.04);
    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;
}
.storage-note-input:focus {
    border-color: var(--accent);
    box-shadow:
        inset 0 0 6px rgba(37,99,235,0.15),
        0 0 0 2px rgba(37,99,235,0.15);
}
.storage-note-input::placeholder {
    color: var(--text-muted);
}
/* --- Platser (kapacitet / använda) — ljust tema --- */
.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-subtle);
    background: var(--bg-elevated, #f8fafc);
    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: 0 0 0 2px rgba(37, 99, 235, 0.12);
}
.storage-slots-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    overflow: hidden;
}
.storage-slots-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), rgba(37, 99, 235, 0.35));
    transition: width 0.35s ease;
}
.storage-slots-fill--warn,
.storage-box-slots-fill--warn {
    background: linear-gradient(90deg, #b4533c, #dc7a5c);
}
.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(15, 23, 42, 0.08);
    overflow: hidden;
}
.storage-box-slots-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), rgba(37, 99, 235, 0.3));
    transition: width 0.3s ease;
}
/* Subtil fade-in */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.imageRow {
    display: flex;
    gap: 12px;
    align-items: center;
}
/* ============================================================
   TAGGAR
============================================================ */
.tagContainer {
    margin-top: 12px;
    margin-bottom: 8px;
}
.tagChip {
    display: inline-block;
    background: var(--accent-soft);
    padding: 4px 10px;
    margin: 3px;
    border-radius: 8px;
    font-size: 12px;
    letter-spacing: 0.03em;
    color: var(--accent);
}
.tagFilterWrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}
/* 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.3);
}
.tagFilterLabel {
    font-size: 14px;
    color: var(--text-main);
    opacity: 0.8;
}
/* Clear button for input fields */
.clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    color: rgba(0,0,0,0.4);
    padding: 0 4px;
    line-height: 1;
    -webkit-user-select: none;
    user-select: none;
    display: none;
}
.clear-btn:hover {
    color: rgba(0,0,0,0.6);
}
/* Show clear button when input has value */
input:not(:placeholder-shown) + .clear-btn {
    display: block;
}
#viewList #tagFilter {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,0,0,0.3) !important;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-main);
    font-size: 14px;
    width: 150px !important;
    height: 34px;
    box-sizing: border-box;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: 0.2s ease;
}
#viewList #tagFilter::placeholder {
    color: var(--text-muted);
}
/* ============================================================
   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(0,0,0,0.15);
    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(0,0,0,0.1),
        0 0 0 1px rgba(255,255,255,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(0,0,0,0.15),
        0 0 0 1px rgba(255,255,255,0.9);
    transform: translateY(-1px);
}
#currencyModal .btn.primary:active {
    transform: translateY(0);
}

#reportView {
    background: rgba(239,68,68,0.08);
}
canvas {
    pointer-events: auto;
}
/* ============================================================
   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-dark), var(--accent), var(--accent-light));
    color:#0f172a;
    border:none;
    padding: 9px 18px;
    border-radius:999px;
    cursor:pointer;
    font-size:13px;
    font-weight:600;
    letter-spacing:0.06em;
    text-transform:uppercase;
    box-shadow:
        0 10px 25px rgba(14,165,233,0.45),
        inset 0 1px 0 rgba(255,255,255,0.2);
    transition:var(--transition-fast);
    position: relative;
}
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        var(--accent-highlight) 0%,
        transparent 50%,
        var(--accent-highlight) 100%);
    border-radius: 999px;
    opacity: 0.4;
}
.btn:hover{
    transform:translateY(-1px);
    background:linear-gradient(135deg, var(--accent-dark), var(--accent-light), var(--accent-light));
    box-shadow:
        0 14px 32px rgba(14,165,233,0.55),
        inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn.secondary{
    background:linear-gradient(135deg, rgba(255,255,255,0.96), rgba(243,246,252,0.96));
    color:var(--text-main);
    border:1px solid var(--border-subtle);
    box-shadow:
        0 8px 18px rgba(15,23,42,0.08),
        inset 0 0 0 1px rgba(255,255,255,0.70);
    position: relative;
}
.btn.secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.3) 0%,
        transparent 50%,
        rgba(255,255,255,0.15) 100%);
    border-radius: 999px;
    opacity: 0.5;
}
.btn.secondary:hover{
    color:var(--text-main);
    border-color:var(--accent);
    background:linear-gradient(135deg, rgba(255,255,255,1.0), rgba(248,250,252,1.0));
    box-shadow:
        0 12px 24px rgba(15,23,42,0.12),
        inset 0 0 0 1px rgba(255,255,255,0.85);
}

#viewTop .accContent{
    display:block;
}

#viewSettings .btn.secondary{
    background:linear-gradient(135deg, rgba(255,255,255,0.96), rgba(243,246,252,0.96));
    color:var(--text-main);
    border:1px solid rgba(15,23,42,0.12);
    box-shadow:0 8px 18px rgba(15,23,42,0.08), inset 0 0 0 1px rgba(255,255,255,0.70);
}
#viewSettings .btn.secondary:hover{
    transform:translateY(-1px);
    border-color:rgba(37,99,235,0.35);
    box-shadow:0 12px 24px rgba(15,23,42,0.12), inset 0 0 0 1px rgba(255,255,255,0.85);
}
#viewSettings .btn.secondary:active{
    transform:translateY(0px);
    box-shadow:0 6px 14px rgba(15,23,42,0.10), inset 0 0 0 1px rgba(255,255,255,0.70);
}
#viewSettings .btn.secondary:focus-visible{
    outline:none;
    box-shadow:0 0 0 3px rgba(37,99,235,0.22), 0 10px 22px rgba(15,23,42,0.12);
}

#viewSettings .btn.secondary.bg-delete{
    background:linear-gradient(135deg, #d06060, #a83030);
    color:#ffffff;
    border:1px solid rgba(255,255,255,0.30);
    box-shadow:0 8px 18px rgba(153,27,27,0.16);
}
#viewSettings .btn.secondary.bg-delete:hover{
    box-shadow:0 12px 24px rgba(153,27,27,0.20);
}
#viewSettings .btn.secondary.bg-delete:focus-visible{
    outline:none;
    box-shadow:0 0 0 3px rgba(208,96,96,0.20), 0 12px 24px rgba(153,27,27,0.20);
}
/* Ensure refresh icon inherits proper color in Market view - LIGHT THEME */
#viewMarket .btn.secondary.icon-only .refresh-icon {
    stroke: #1e293b !important;
    fill: none !important;
    color: #1e293b !important;
    width: 18px !important;
    height: 18px !important;
    display: block !important;
}
#viewMarket .btn.secondary.icon-only {
    color: #1e293b !important;
}
#viewMarket .btn.secondary.icon-only svg {
    stroke: #1e293b !important;
}

/* 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));
}

/* ============================================================
   PREMIUM BLÅKNAPP – LJUS VERSION
============================================================ */
nav .dropbtn,
nav button[onclick="showView('list')"] {
    background: linear-gradient(
        135deg,
        #f8fafc 0%,     /* ljus bas */
        #ffffff 35%,    /* highlight */
        #f1f5f9 55%,    /* mittljus */
        #e2e8f0 100%    /* subtil skugga */
    );
    color: #1e293b;
    border: 1px solid var(--border-subtle);
    padding: 7px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.04),
        inset 0 0 6px rgba(255,255,255,0.8);
    transition: 0.25s ease;
}
nav .dropbtn:hover,
nav button[onclick="showView('list')"]:hover {
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #f8fafc 40%,
        #f1f5f9 70%,
        #e2e8f0 100%
    );
    box-shadow:
        0 4px 12px rgba(37,99,235,0.15),
        inset 0 0 8px rgba(255,255,255,1.0);
    transform: translateY(-1px);
    border-color: var(--accent);
}
/* ============================================================
   PREMIUM BLÅTITEL – LJUS VERSION
============================================================ */
.CoinIndex-title {
    display: inline-block;
    background: linear-gradient(
        135deg,
        #e0e7ff 0%,      /* ljus blå bas */
        #c7d2fe 22%,     /* blå highlight */
        #a5b4fc 48%,     /* djupare blå */
        #ddd6fe 100%     /* mjuk lavendel glans */
    );
    color: #1e293b;
    border: 1px solid var(--border-subtle);
    padding: 14px 32px;
    border-radius: 999px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    box-shadow:
        0 4px 12px rgba(37,99,235,0.15),
        inset 0 0 10px rgba(255,255,255,0.8);
    transition: 0.25s ease;
}
.CoinIndex-title:hover {
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #e0e7ff 30%,
        #c7d2fe 65%,
        #ddd6fe 100%
    );
    box-shadow:
        0 6px 16px rgba(37,99,235,0.25),
        inset 0 0 12px rgba(255,255,255,1.0);
    transform: translateY(-1px);
}
/* ============================================================
   SÖKFUNKTION
=============================================================*/
.compactRow {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
}
.compactThumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    background: rgba(0,0,0,0.04);
}
.compactInfo {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    line-height: 1.2;
}
/* ============================================================
   LISTVY
============================================================ */
.card{
    background:var(--bg-card);
    border-radius:var(--radius-card);
    border:1px solid var(--border-subtle);
    box-shadow:var(--shadow-card);
    padding: calc(12px * var(--ui-scale));
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}
.card:hover {
    box-shadow:var(--shadow-hover);
    transform: translateY(-2px);
}
.countryRow,.yearRow,.coinRow{
    border-radius:10px;
    border:1px solid rgba(37,99,235,0.15);
    background:linear-gradient(135deg, rgba(248,250,252,0.95), rgba(241,245,249,1.0));
    box-shadow:0 4px 12px rgba(0,0,0,0.06);
    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);
    background:linear-gradient(135deg, rgba(248,250,252,1.0), rgba(255,255,255,1.0));
    box-shadow:0 8px 20px rgba(0,0,0,0.10);
}
.yearRow{ margin-left:10px; }
.coinRow{ margin-left:26px; }
.coinThumb{
    width:60px;
    height:60px;
    border-radius:10px;
    box-shadow:0 4px 12px rgba(0,0,0,0.08);
    object-fit:cover;
}
.flagSmall{
    width:20px;
    height:20px;
    border-radius:6px;
    box-shadow:0 0 0 1px var(--border-subtle);
}
/* ============================================================
   DETALJVY
============================================================ */
.detailBox{
    background:var(--bg-card);
    border-radius:var(--radius-card);
    border:1px solid var(--border-subtle);
    box-shadow:var(--shadow-soft);
    padding:18px;
    margin-bottom:16px;
}
.detailImage{
    width:110px;
    height:110px;
    border-radius:12px;
    box-shadow:0 4px 12px rgba(0,0,0,0.12);
    margin-bottom:12px;
    object-fit:cover;
}
/* ============================================================
   MARKNAD
============================================================ */
.marketCard{
    background:var(--bg-card);
    border-radius:var(--radius-card);
    border:1px solid var(--border-subtle);
    box-shadow:var(--shadow-soft);
    padding:16px 18px;
    margin-bottom:14px;
}
.marketRow{
    background:linear-gradient(135deg, rgba(255,255,255,0.9), rgba(248,249,251,0.95));
    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:rgba(37,99,235,0.3);
    box-shadow:0 2px 8px rgba(37,99,235,0.08);
}
.deleteIcon{
    color:#ef4444;
    font-weight:bold;
    opacity:0.7;
    transition:0.15s;
}
.marketRow:hover .deleteIcon{
    opacity:1;
}
/* ============================================================
   CANVAS (diagram)
============================================================ */
canvas{
    background:#f8fafc;
    border-radius:var(--radius-card);
    border:1px solid var(--border-subtle);
    box-shadow:var(--shadow-soft);
    padding:18px;
    margin-top:10px;
    min-height: 300px;
}
/* ============================================================
   PREMIUM LIGHT INPUTS – MATCHAR LJUSA DESIGNEN
============================================================ */
.card input {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: 0.25s ease;
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.02),
    inset 0 1px 3px rgba(0,0,0,0.03);
  caret-color: #000000 !important;
  color: #0f172a !important;
}
/* Hover – subtil premiumeffekt */
.card input:hover {
    background: rgba(255,255,255,1.0);
    border-color: rgba(37,99,235,0.25);
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.04),
        inset 0 1px 3px rgba(0,0,0,0.04);
    caret-color: #000000;
}
/* Focus – accentfärgad premiumglow */
.card input:focus {
    background: rgba(255,255,255,1.0);
    border-color: var(--accent-light);
    box-shadow: 
        0 0 0 2px rgba(37,99,235,0.2),
        inset 0 1px 3px rgba(0,0,0,0.02);
    outline: none;
    caret-color: #000000;
}
datalist option {
    background: rgba(255,255,255,0.95) !important;
    color: #0f172a !important;
}

/* ============================================================
   PREMIUM INPUT WITH DATALIST – LIGHT THEME
============================================================ */
input.premium-select {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  color: #0f172a;
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

input.premium-select:hover {
    background: rgba(255,255,255,0.98);
    border-color: rgba(0,0,0,0.18);
}

input.premium-select:focus {
    background: rgba(255,255,255,1);
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
    outline: none;
}

datalist option {
    background: rgba(255,255,255,0.95);
    color: #0f172a;
    padding: 10px;
}
/* Custom Dropdown */
.custom-dropdown {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
}
.custom-dropdown input {
    width: 100%;
    padding: 12px 36px 12px 16px;
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: #0f172a;
    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(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
    caret-color: #000000;
}
.custom-dropdown input:focus {
    background: rgba(255,255,255,1.0);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
    outline: none;
}
.custom-dropdown input:hover {
    background: rgba(255,255,255,1.0);
    border-color: rgba(37,99,235,0.2);
}
.dropdown-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    font-size: 10px;
    transition: transform 0.3s ease;
}
.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(255,255,255,0.98);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}
.custom-dropdown.open .dropdown-menu {
    display: block;
}
.dropdown-item {
    padding: 10px 16px;
    color: #0f172a;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    line-height: 1.2 !important;
}
.dropdown-item:hover {
    background: rgba(37,99,235,0.1);
}
.dropdown-item.hidden {
    display: none;
}
/* Labels – diskret premiumstil */
.card label {
    display: block;
    margin-bottom: 4px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
/* ============================================================
   TOPPLISTA – ENDAST UNDERRUBRIKER
============================================================ */
.topHeader {
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 15px;
    padding: 14px 0;
    margin-top: 18px;
    cursor: pointer;
    color: var(--text-main);
    transition: 0.25s ease;
}
.topHeader:hover {
    color: var(--accent);
}
/* ============================================================
   TOPPLISTA – PREMIUM FÄRGER FÖR TOPP 10 (LJUS)
============================================================ */
.toplist-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.9);
    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;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
/* 1:a plats – Light Gold */
.toplist-1 {
    background: linear-gradient(
        135deg,
        #fef3c7 0%,   /* ljus guldskugga */
        #fde68a 35%, /* gyllene mittton */
        #fcd34d 55%, /* highlight/blänk */
        #fbbf24 100% /* djup guldton */
    );
    color: #78350f;
    font-weight: 700;
}
/* 2:a plats – Light Silver */
.toplist-2 {
    background: linear-gradient(
        135deg,
        #f3f4f6 0%,   /* ljus stålskugga */
        #e5e7eb 35%, /* silver mittton */
        #d1d5db 55%, /* highlight/blänk */
        #9ca3af 100% /* djup silverton */
    );
    color: #374151;
    font-weight: 700;
}
/* 3:e plats – Light Bronze */
.toplist-3 {
    background: linear-gradient(
        135deg,
        #fed7aa 0%,   /* ljus bronsbas */
        #fdba74 35%, /* brons mittton */
        #fb923c 55%, /* highlight/blänk */
        #f97316 100% /* djup brons */
    );
    color: #7c2d12;
    font-weight: 700;
}
.coinThumbWrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}
.clickHint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    opacity: 0.7;
}
/*============================================================
  MARKERING VID MUSKLICK
============================================================ */
.toplist-item {
    cursor: pointer;
    transition: 0.2s ease;
}
.toplist-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(37,99,235,0.12);
}
/* ============================================================
   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: 16px;
}
/* Titel */
.bestBuyTitle {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 0.9;
}
/* Objekt i listan */
.bestBuyItem {
    font-size: 15px;
    opacity: 0.85;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
    line-height: 1.35;
    cursor: pointer;
    transition: 0.15s ease;
}
/* Hover-effekt */
.bestBuyItem:hover {
    transform: translateY(-2px);
    background: rgba(37,99,235,0.08);
    border-radius: 6px;
    padding: 4px 8px;
    margin: -4px -8px 4px -8px;
}
/* Namn på myntet */
.coinName {
    font-weight: 500;
    opacity: 0.9;
    color: var(--accent);
}
.storageItem {
    background: rgba(255,255,255,0.9);
    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;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.storageItem:hover {
    background: rgba(37,99,235,0.08);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37,99,235,0.08);
}
.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;
}
/* ------------------------------------------------------------
   DROP HEIGHT
------------------------------------------------------------ */
#marketSellList {
    min-height: 40px;
}
/* ------------------------------------------------------------
   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(0, 0, 0, 0.1);
    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(0, 0, 0, 0.05);
    color: var(--text-main);
}

/* ------------------------------------------------------------
   FORMULÄR - 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;
}

/* ------------------------------------------------------------
   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;
}

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

/* ------------------------------------------------------------
   HIDDEN ELEMENTS
------------------------------------------------------------ */
.hidden {
    display: none;
}

/* ------------------------------------------------------------
   BUTTON ROWS
------------------------------------------------------------ */
.button-row {
    display: flex;
    gap: 10px;
}

/* ------------------------------------------------------------
   MARGIN HELPER CLASSES
------------------------------------------------------------ */
.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; }
.margin-top-16 { margin-top: 16px; }
.margin-top-18 { margin-top: 18px; }
.margin-top-20 { margin-top: 20px; }
.margin-top-neg6 { margin-top: -6px; }

.margin-bottom-14 { margin-bottom: 14px; }
.margin-bottom-12 { margin-bottom: 12px; }
.margin-bottom-20 { margin-bottom: 20px; }

/* ------------------------------------------------------------
   TEXT HELPER CLASSES
------------------------------------------------------------ */
.font-small { font-size: 12px; }
.text-muted { color: var(--text-muted); }
.font-italic { font-style: italic; }
.opacity-70 { opacity: 0.7; }

.font-24 { font-size: 24px; }
.font-weight-600 { font-weight: 600; }
.color-accent { color: var(--accent); }
.text-center { text-align: center; }

.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; }
.white-space-pre-wrap { white-space: pre-wrap; }

/* ------------------------------------------------------------
   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; }

/* ------------------------------------------------------------
   BACKGROUND HELPER CLASSES
------------------------------------------------------------ */
.bg-danger { background: #922; }
.bg-delete { background: #b00020; }
.bg-modal { background: #141824; }
.bg-report-btn { background: #4da3ff; }
.bg-gradient-light { background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03)); }

/* ------------------------------------------------------------
   PADDING HELPER CLASSES
------------------------------------------------------------ */
.padding-4 { padding: 4px; }
.padding-8 { padding: 8px; }
.padding-10 { padding: 10px; }
.padding-12 { padding: 12px; }
.padding-20 { padding: 20px; }
.padding-24 { padding: 24px; }
.padding-10-20 { padding: 10px 20px; }

/* ------------------------------------------------------------
   VÄRDEÖVERSIKT MODAL
------------------------------------------------------------ */
#marketSellList {
    min-height: 40px;
}
/* ------------------------------------------------------------
   Förvaringsplats-rutor i Min samling (grid)
------------------------------------------------------------ */
.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);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.storageBox .statsNumber {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
}
.storageBox .statsLabel {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}
/* slut */
/* ------------------------------------------------------------
   Premium-sorteringsknappar
------------------------------------------------------------ */
.collectionSort {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.sortBtn {
    padding: 10px 18px;
    background: rgba(255,255,255,0.9);
    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);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.sortBtn:hover {
    background: rgba(37,99,235,0.08);
    border-color: var(--accent);
}
.sortBtn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}
.btn.danger {
    background: #dc2626;
    color: #ffffff;
    border: 1px solid #b91c1c;
    transition: 0.25s ease;
}
.btn.danger:hover {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(220,38,38,0.25);
    transform: translateY(-1px);
}
#btnDeleteCoin {
    margin-left: 20px;
}

.btn.secondary.selected {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 1px var(--accent) !important;
}

/* 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;
}

/* ============================================================
   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), #7bc4ff);
    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(77, 163, 255, 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(77, 163, 255, 0.6);
}
.scroll-to-top:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(77, 163, 255, 0.5);
}
.scroll-to-top svg {
    color: #05060a;
    transition: transform 0.3s ease;
}
.scroll-to-top:hover svg {
    transform: translateY(-2px);
}
/* ============================================================
   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: #ffffff;
    color: #1a1f2e;
    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(0, 0, 0, 0.15);
    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: #ffffff;
    color: #1a1f2e;
    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(0, 0, 0, 0.15);
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.1);
}
.silver-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-12px);
}
#detailImage2 {
    opacity: 1;
}

/* ============================================================
   HJÄLP SEKTION STYLES (LJUS VERSION)
============================================================ */
.help-container {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    padding: 24px;
    margin-bottom: 20px;
}

.help-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.help-section {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 24px;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.help-container p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 16px;
}

.help-container ul {
    margin: 12px 0;
    padding-left: 20px;
}

.help-container li {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-main);
    margin-bottom: 6px;
}

.help-container strong {
    color: var(--accent);
    font-weight: 600;
}

.help-container em {
    color: var(--accent-warm);
    font-style: italic;
}

:root {
    --chart-text: #000000;
    --bg-input: #ffffff;
    --border-input: #e0e0e0;
}

/* ============================================================
   CHART SECTIONS - LIGHT THEME
============================================================ */
.chart-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
}

.chart-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

.chart-section canvas {
    max-height: 380px;
    width: 100%;
}

:root {
    --chart-text: #000000;
    --chart-label-bg: transparent;
}

/* ============================================================
   PREMIUM RAPPORT MODAL - LIGHT THEME
============================================================ */
.report-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s ease;
}

.report-modal-overlay.show {
    display: flex;
    opacity: 1;
}

.report-modal {
    background: #ffffff;
    border: 1px solid rgba(156, 163, 175, 0.4);
    border-radius: 16px;
    width: 80%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 
        0 30px 90px rgba(0, 0, 0, 0.15),
        0 15px 40px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    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 {
    position: relative;
    padding: 48px 60px 32px 60px;
    border-bottom: 1px solid rgba(156, 163, 175, 0.2);
    background: #ffffff;
}

.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(156, 163, 175, 0.3), transparent);
}

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

.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;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.report-text {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 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(156, 163, 175, 0.15);
    background: #ffffff;
    display: flex;
    justify-content: center;
}

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

/* Scrollbar styling för rapport-content */
.report-content::-webkit-scrollbar {
    width: 6px;
}

.report-content::-webkit-scrollbar-track {
    background: var(--bg-main);
    border-radius: 3px;
}

.report-content::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 3px;
}

.report-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================================
   PREMIUM VALUE BUTTON - LIGHT THEME
============================================================ */
.premium-value-btn {
    background: linear-gradient(145deg, #f5f7fa, #d1d5db, #9ca3af);
    color: #1f2937;
    border: none;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 
        0 2px 8px rgba(156, 163, 175, 0.4),
        inset 0 1px 2px rgba(255,255,255,0.8),
        inset 0 -1px 2px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.premium-value-btn:hover {
    background: linear-gradient(145deg, #ffffff, #e5e7eb, #b8bcc4);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 12px rgba(156, 163, 175, 0.5),
        inset 0 1px 2px rgba(255,255,255,0.9),
        inset 0 -1px 2px rgba(0,0,0,0.1);
}

.premium-value-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 6px rgba(156, 163, 175, 0.3),
        inset 0 1px 2px rgba(255,255,255,0.6),
        inset 0 -1px 2px rgba(0,0,0,0.2);
}

.premium-value-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent,
        rgba(255,255,255,0.2),
        transparent
    );
    transition: left 0.5s;
}

.premium-value-btn:hover::before {
    left: 100%;
}

.premium-value-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.3),
        transparent
    );
    border-radius: 999px 999px 0 0;
    pointer-events: none;
}

/* ============================================================
   VALUE OVERVIEW MODAL - LIGHT THEME
============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.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: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.12),
        0 10px 30px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   STORAGE DETAILS MODAL - LIGHT THEME
============================================================ */
#storageDetailsModal .modal-content {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
}

#storageDetailsModal .modal-header h3 {
    color: #1e293b !important;
}

#storageDetailsModal .modal-body h4 {
    color: #334155 !important;
}

#storageDetailsModal .storage-detail-item label {
    color: #64748b !important;
}

#storageDetailsModal .storage-detail-value {
    color: #0f172a !important;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 40px 20px 40px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    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(0, 0, 0, 0.1), 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, #1e293b 0%, #3b82f6 50%, #1e293b 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;
}

.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;
}

.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: #16a34a;
    background: rgba(22, 163, 74, 0.1);
}

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

.trend-arrow.down {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

/* Tooltip för trend-pil - ljust tema */
.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(0, 0, 0, 0.15);
    max-width: 200px;
    white-space: normal;
    word-wrap: break-word;
}

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


.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;
}

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

.modal-body {
    padding: 32px 40px 40px 40px;
    background: transparent;
}

.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, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    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(14, 165, 233, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.value-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.12);
}

.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(59, 130, 246, 0.2);
}

.value-item:nth-child(5) .value-amount {
    color: var(--text-muted);
}

/* ============================================================
   WELCOME TIP - NY ANVÄNDARE
============================================================ */
.welcome-tip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    color: var(--text-color);
    padding: 18px 22px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    z-index: 99999;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    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: #fff;
    cursor: pointer;
    font-size: 14px;
}

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

.search-info-input-wrapper input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    color: #0f172a;
    font-size: 15px;
    letter-spacing: 0.02em;
    transition: 0.25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.search-info-input-wrapper input:hover {
    background: rgba(255,255,255,0.98);
    border-color: rgba(0,0,0,0.18);
}

.search-info-input-wrapper input:focus {
    background: rgba(255,255,255,1);
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
    outline: none;
}

.search-info-input-wrapper input::placeholder {
    color: rgba(0,0,0,0.55);
}

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

/* ============================================================
   SÄLLSYNTHET-SLIDER - LJUSTEMA
============================================================ */
.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: #cc0000;
    font-weight: 500;
}

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

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

.textarea-notering {
    margin-top: 20px;
    border: 2px solid var(--border-input);
    border-radius: 8px;
    padding: 12px;
    background: var(--bg-elevated);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s ease;
}

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

/* 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;
}

/* Info-ikon för köpta mynt - ljust tema */
.info-icon {
    color: #5a5a5a;
    font-size: 16px;
    cursor: default;
    border: 2px solid #c0c0c0;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   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;
    }
}

.info-icon {
    font-style: italic;
    font-weight: 600;
    -webkit-user-select: none;
    user-select: none;
    transition: all 0.2s ease;
    background: linear-gradient(145deg, #f8f8f8, #ffffff);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* ============================================================
   MÅL (GOALS) - LIGHT 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(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: var(--text-main);
    position: relative;
}

.goal-year-badge:hover {
    transform: scale(1.05);
    background: rgba(15, 23, 42, 0.1);
}

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

.goal-year-badge.missing {
    background: rgba(239, 68, 68, 0.15);
    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;
}

.info-icon:hover {
    color: #3a3a3a;
    border-color: #a0a0a0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}