/*
==============================================================================
  Warframe Tracker - Vitruvian Theme
==============================================================================
  Organized stylesheet for the Warframe Tracker web app.

  Sections
  01. Theme tokens and base page
  02. Sidebar
  03. Main layout and header
  04. Forms, settings and common utilities
  05. Cards, buttons, tables, badges and progress
  06. Market
  07. Relics and relic view
  08. Prime Farm
  09. Prime Inventory
  10. Dashboard News
  11. Login Prime Access banner
  12. Responsive rules
==============================================================================
*/

:root {
    --bg-main: #080706;
    --bg-deep: #030302;
    --bg-soft: #12100d;
    --bg-card: rgba(19, 16, 13, 0.88);
    --bg-card-light: rgba(34, 29, 22, 0.86);

    --border-soft: rgba(209, 184, 112, 0.16);
    --border-glow: rgba(218, 190, 111, 0.42);

    --text-main: #efe6c8;
    --text-muted: #a99a70;
    --text-soft: #d8c892;

    --accent-cyan: #d8bd67;
    --accent-purple: #8d7440;
    --accent-gold: #d6b85f;
    --accent-green: #b9d982;
    --accent-red: #c86d5a;

    --vitruvian-gold: #d8bd67;
    --vitruvian-gold-soft: #a98b43;
    --vitruvian-cream: #f0e4b6;
    --vitruvian-bronze: #5f4a27;
    --vitruvian-black: #070604;

    --sidebar-width: 280px;
    --header-height: 74px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, Arial, sans-serif;
    background:
        radial-gradient(circle at 72% 18%, rgba(216, 189, 103, 0.12), transparent 360px),
        radial-gradient(circle at 20% 82%, rgba(95, 74, 39, 0.20), transparent 460px),
        linear-gradient(135deg, rgba(216, 189, 103, 0.035) 0 1px, transparent 1px 90px),
        linear-gradient(45deg, rgba(216, 189, 103, 0.025) 0 1px, transparent 1px 120px),
        var(--bg-main);
    color: var(--text-main);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.18;
    background:
        radial-gradient(circle at 12% 18%, transparent 0 34px, rgba(216, 189, 103, 0.18) 35px, transparent 37px),
        radial-gradient(circle at 84% 70%, transparent 0 48px, rgba(216, 189, 103, 0.14) 49px, transparent 52px),
        radial-gradient(circle at 28% 86%, transparent 0 42px, rgba(216, 189, 103, 0.12) 43px, transparent 46px);
    filter: blur(0.2px);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(216, 189, 103, 0.045), transparent 18%, transparent 82%, rgba(216, 189, 103, 0.035)),
        radial-gradient(circle at 68% 35%, rgba(216, 189, 103, 0.11), transparent 360px);
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

/* ==========================================================================
   02. Sidebar
   ========================================================================== */

.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    background:
        linear-gradient(180deg, rgba(216, 189, 103, 0.08), transparent 32%),
        linear-gradient(90deg, rgba(216, 189, 103, 0.045), transparent),
        rgba(7, 6, 4, 0.96);
    border-right: 1px solid rgba(216, 189, 103, 0.20);
    display: flex;
    flex-direction: column;
    z-index: 50;
    backdrop-filter: blur(18px);
    box-shadow: 24px 0 80px rgba(0, 0, 0, 0.34);
}

.sidebar-brand {
    padding: 24px 22px;
    border-bottom: 1px solid rgba(216, 189, 103, 0.16);
    background:
        radial-gradient(circle at top left, rgba(216, 189, 103, 0.10), transparent 220px);
    text-align: center;
}


.mastery-brand-mark {
    width: 112px;
    height: 112px;
    margin: 0 auto 16px;
    border-radius: 0;
    background: transparent;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    overflow: visible;
}

.mastery-rank-image {
    width: 104px;
    height: 104px;
    object-fit: contain;
    display: block;
    filter:
        drop-shadow(0 0 8px rgba(216, 189, 103, 0.24))
        drop-shadow(0 0 18px rgba(0, 0, 0, 0.45));
}

.sidebar-mastery-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
    filter:
        drop-shadow(0 0 5px rgba(216, 189, 103, 0.22))
        drop-shadow(0 0 8px rgba(0, 0, 0, 0.42));
}

.brand-mark {
    width: 86px;
    height: 64px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(216, 189, 103, 0.14), rgba(95, 74, 39, 0.10)),
        rgba(10, 8, 5, 0.88);
    border: 1px solid rgba(216, 189, 103, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vitruvian-gold);
    margin-bottom: 14px;
    box-shadow:
        0 0 28px rgba(216, 189, 103, 0.12),
        inset 0 0 24px rgba(216, 189, 103, 0.055);
    overflow: hidden;
}

.brand-mark img {
    width: 72px;
    height: auto;
    display: block;
    object-fit: contain;
    filter:
        drop-shadow(0 0 8px rgba(216, 189, 103, 0.28))
        drop-shadow(0 0 18px rgba(216, 189, 103, 0.10));
}

.brand-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0;
    text-transform: uppercase;
    color: var(--vitruvian-cream);
}

.brand-subtitle {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.sidebar-section-label {
    padding: 20px 22px 8px;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.sidebar-nav {
    padding: 0 12px;
    display: grid;
    gap: 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 13px;
    border-radius: 13px;
    color: var(--text-soft);
    border: 1px solid transparent;
    transition: 0.18s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: var(--border-soft);
    transform: translateX(2px);
}

.sidebar-link.active {
    color: var(--vitruvian-cream);
    background:
        linear-gradient(135deg, rgba(216, 189, 103, 0.18), rgba(95, 74, 39, 0.14));
    border-color: rgba(216, 189, 103, 0.42);
    box-shadow:
        0 0 24px rgba(216, 189, 103, 0.08),
        inset 0 0 18px rgba(216, 189, 103, 0.035);
}

.sidebar-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(216, 189, 103, 0.08);
    border: 1px solid rgba(216, 189, 103, 0.13);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vitruvian-gold);
    font-size: 15px;
}

.sidebar-footer {
    margin-top: auto;
    padding: 18px 22px 22px;
    border-top: 1px solid var(--border-soft);
}

.user-box {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 13px;
}

.user-name {
    font-weight: 700;
    margin-bottom: 4px;
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
}

.user-arrow {
    color: var(--vitruvian-gold);
    opacity: 0.85;
}

.user-name,
.user-role {
    word-break: break-word;
}

/* ==========================================================================
   03. Main layout and header
   ========================================================================== */

.main-area {
    width: 100%;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-header {
    min-height: var(--header-height);
    padding: 18px 32px;
    border-bottom: 1px solid rgba(216, 189, 103, 0.16);
    background:
        linear-gradient(90deg, rgba(216, 189, 103, 0.055), transparent 38%),
        rgba(7, 6, 4, 0.74);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.page-title {
    margin: 0;
    font-size: 26px;
    letter-spacing: -0.04em;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-icon-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 14px;
}

.header-svg-icon {
    width: 23px;
    height: 23px;
    display: block;
    color: currentColor;
}

.header-home-btn {
    background:
        linear-gradient(135deg, rgba(216, 189, 103, 0.13), rgba(8, 6, 4, 0.88)),
        rgba(8, 6, 4, 0.86);
    border-color: rgba(216, 189, 103, 0.24);
    color: var(--vitruvian-gold);
}

.header-home-btn:hover {
    border-color: rgba(216, 189, 103, 0.48);
    color: var(--vitruvian-cream);
    box-shadow: 0 0 18px rgba(216, 189, 103, 0.08);
}

.header-logout-btn {
    background:
        linear-gradient(135deg, rgba(200, 109, 90, 0.12), rgba(8, 6, 4, 0.90)),
        rgba(8, 6, 4, 0.86);
    border-color: rgba(200, 109, 90, 0.30);
    color: #f4c7bd;
}

.header-logout-btn:hover {
    border-color: rgba(200, 109, 90, 0.56);
    color: #ffe1dc;
    box-shadow: 0 0 20px rgba(200, 109, 90, 0.10);
}

.header-back-btn {
    background:
        linear-gradient(135deg, rgba(216, 189, 103, 0.12), rgba(8, 6, 4, 0.88)),
        rgba(8, 6, 4, 0.86);
    border-color: rgba(216, 189, 103, 0.24);
    color: var(--vitruvian-gold);
}

.header-back-btn:hover {
    border-color: rgba(216, 189, 103, 0.48);
    color: var(--vitruvian-cream);
    box-shadow: 0 0 18px rgba(216, 189, 103, 0.08);
}

.header-settings-btn {
    background:
        linear-gradient(135deg, rgba(216, 189, 103, 0.10), rgba(8, 6, 4, 0.88)),
        rgba(8, 6, 4, 0.86);
    border-color: rgba(216, 189, 103, 0.22);
    color: var(--vitruvian-gold);
}

.header-settings-btn:hover {
    border-color: rgba(216, 189, 103, 0.48);
    color: var(--vitruvian-cream);
    box-shadow: 0 0 18px rgba(216, 189, 103, 0.08);
}

/* ==========================================================================
   04. Forms, settings and common utilities
   ========================================================================== */

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--vitruvian-cream);
    font-weight: 800;
}

.form-help {
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 13px;
}

.settings-alert {
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 18px;
    border: 1px solid var(--border-soft);
}

.settings-alert-success {
    color: var(--accent-green);
    background: rgba(185, 217, 130, 0.08);
    border-color: rgba(185, 217, 130, 0.22);
}

.settings-alert-error {
    color: #fecaca;
    background: rgba(200, 109, 90, 0.08);
    border-color: rgba(200, 109, 90, 0.24);
}

.content {
    flex: 1;
    padding: 30px 32px;
}

.page-footer {
    padding: 18px 32px;
    border-top: 1px solid var(--border-soft);
    color: var(--text-muted);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* ==========================================================================
   05. Cards, buttons, tables, badges and progress
   ========================================================================== */

.card {
    background:
        linear-gradient(180deg, rgba(216, 189, 103, 0.055), transparent 42%),
        rgba(19, 16, 13, 0.88);
    border: 1px solid rgba(216, 189, 103, 0.16);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.30),
        inset 0 1px 0 rgba(240, 228, 182, 0.035);
}

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

.card-title {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.card-description {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    background:
        linear-gradient(180deg, rgba(216, 189, 103, 0.065), transparent),
        rgba(18, 15, 11, 0.92);
    border: 1px solid rgba(216, 189, 103, 0.16);
    border-radius: var(--radius-lg);
    padding: 18px;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    display: none;
}

.stat-label {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

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

.form-control,
input,
select,
textarea {
    background:
        linear-gradient(180deg, rgba(216, 189, 103, 0.045), rgba(7, 6, 4, 0.94)),
        #080604;
    color: var(--vitruvian-cream);
    border: 1px solid rgba(216, 189, 103, 0.22);
    border-radius: var(--radius-md);
    padding: 11px 13px;
    outline: none;
    transition: 0.15s ease;
    box-shadow:
        inset 0 1px 0 rgba(240, 228, 182, 0.035),
        0 0 0 rgba(216, 189, 103, 0);
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: rgba(216, 189, 103, 0.55);
    box-shadow:
        0 0 0 3px rgba(216, 189, 103, 0.10),
        0 0 22px rgba(216, 189, 103, 0.08);
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: rgba(216, 189, 103, 0.48);
    opacity: 1;
}

select.form-control,
select {
    color: var(--vitruvian-cream);
    background-color: #080604;
    border-color: rgba(216, 189, 103, 0.22);
}

select option {
    background: #080604;
    color: var(--vitruvian-cream);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-text-fill-color: var(--vitruvian-cream);
    -webkit-box-shadow: 0 0 0 1000px #080604 inset;
    box-shadow: 0 0 0 1000px #080604 inset;
    caret-color: var(--vitruvian-cream);
    border: 1px solid rgba(216, 189, 103, 0.35);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(22, 18, 12, 0.92);
    border: 1px solid rgba(216, 189, 103, 0.16);
    color: var(--text-main);
    border-radius: var(--radius-md);
    padding: 11px 14px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
    border-color: var(--border-glow);
}

.btn-primary {
    background:
        linear-gradient(135deg, rgba(216, 189, 103, 0.30), rgba(95, 74, 39, 0.28));
    border-color: rgba(216, 189, 103, 0.45);
    color: var(--vitruvian-cream);
}

.btn-danger {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.25);
    background: rgba(248, 113, 113, 0.08);
}

.table-card {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(216, 189, 103, 0.16);
    background: rgba(14, 11, 8, 0.94);
}

.table-card table thead {
    background:
        linear-gradient(
            90deg,
            rgba(216, 189, 103, 0.18) 0%,
            rgba(216, 189, 103, 0.08) 42%,
            rgba(216, 189, 103, 0.14) 100%
        );
}

.table-card table thead tr {
    background: transparent;
}


table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    text-align: left;
}

th {
    color: var(--text-muted);
    background: transparent !important;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.025);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
    font-size: 12px;
}

.badge-cyan {
    color: var(--vitruvian-gold);
    border-color: rgba(216, 189, 103, 0.28);
    background: rgba(216, 189, 103, 0.07);
}

.badge-purple {
    color: var(--vitruvian-bronze);
    border-color: rgba(95, 74, 39, 0.38);
    background: rgba(95, 74, 39, 0.12);
}

.badge-green {
    color: var(--accent-green);
    border-color: rgba(134, 239, 172, 0.28);
}

/* Owned badge inside tables */
.table-card table .badge-owned-count {
    color: var(--vitruvian-gold);
    border-color: rgba(216, 189, 103, 0.42);
    background: transparent;
    box-shadow: none;
    font-weight: 800;
}

/* Base Chance badge inside tables: Vitruvian filled */
.table-card table .badge-base-chance {
    color: var(--vitruvian-cream);
    border-color: rgba(216, 189, 103, 0.46);
    background:
        linear-gradient(
            180deg,
            rgba(216, 189, 103, 0.16),
            rgba(8, 6, 4, 0.72)
        );
    box-shadow: 0 0 12px rgba(216, 189, 103, 0.06);
    font-weight: 900;
}


.badge-gold {
    color: var(--accent-gold);
    border-color: rgba(250, 204, 21, 0.28);
    background: rgba(216, 189, 103, 0.07);
}

.empty-state {
    padding: 28px;
    color: var(--text-muted);
    text-align: center;
}

.progress {
    width: 100%;
    height: 14px;
    background:
        linear-gradient(180deg, rgba(216, 189, 103, 0.05), rgba(3, 3, 2, 0.95)),
        #050403;
    border: 1px solid rgba(216, 189, 103, 0.22);
    border-radius: 999px;
    overflow: hidden;
    box-shadow:
        inset 0 0 12px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(240, 228, 182, 0.025);
}

.progress-fill {
    height: 100%;
    background:
        linear-gradient(
            90deg,
            #8a6a2f 0%,
            #d8bd67 48%,
            #f0e4b6 100%
        );
    box-shadow:
        0 0 18px rgba(216, 189, 103, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

/* ==========================================================================
   06. Market
   ========================================================================== */

.market-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.market-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    overflow: hidden;
    position: relative;
}

.market-hero::before {
    content: "";
    position: absolute;
    inset: -90px -120px auto auto;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(216, 189, 103, 0.13),
        rgba(216, 189, 103, 0.04) 42%,
        transparent 72%
    );
    pointer-events: none;
}

.market-hero-title {
    margin: 8px 0 8px;
    color: var(--text-main);
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1;
    letter-spacing: -0.04em;
}

.market-hero-badge {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
}

.market-search-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 760px;
}

.market-search-form .form-group {
    width: 100%;
    max-width: 760px;
}

.market-autocomplete {
    position: relative;
    width: 100%;
    max-width: 760px;
}

.market-autocomplete input {
    width: 100%;
    min-height: 48px;
}

.market-suggestions-panel {
    position: absolute;
    left: 0;
    right: auto;
    top: calc(100% + 8px);
    z-index: 999;
    display: none;
    width: min(560px, 100%);
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid rgba(216, 189, 103, 0.24);
    background:
        linear-gradient(180deg, rgba(18, 15, 10, 0.98), rgba(7, 6, 4, 0.98));
    box-shadow:
        0 22px 48px rgba(0, 0, 0, 0.42),
        0 0 22px rgba(216, 189, 103, 0.08),
        inset 0 1px 0 rgba(240, 228, 182, 0.05);
    backdrop-filter: blur(12px);
}

.market-suggestions-panel.is-open {
    display: block;
}

.market-suggestion-option {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text-main);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.market-suggestion-option:hover,
.market-suggestion-option.is-active {
    color: var(--vitruvian-cream);
    background:
        linear-gradient(90deg, rgba(216, 189, 103, 0.16), rgba(216, 189, 103, 0.04));
    box-shadow:
        inset 3px 0 0 rgba(216, 189, 103, 0.72),
        0 0 16px rgba(216, 189, 103, 0.06);
}

.market-suggestions-panel::-webkit-scrollbar {
    width: 8px;
}

.market-suggestions-panel::-webkit-scrollbar-track {
    background: rgba(8, 6, 4, 0.65);
    border-radius: 999px;
}

.market-suggestions-panel::-webkit-scrollbar-thumb {
    background: rgba(216, 189, 103, 0.32);
    border-radius: 999px;
}

.market-suggestions-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(216, 189, 103, 0.48);
}

.market-stats-grid .stat-note {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.market-grid {
    align-items: start;
}

.market-stat-item {
    font-size: clamp(18px, 2vw, 26px);
    line-height: 1.12;
}

.market-stat-link a {
    color: var(--vitruvian-gold);
    text-decoration: none;
}

.market-stat-link a:hover {
    color: var(--vitruvian-cream);
}

.market-orders-table {
    margin-top: 16px;
}

.market-orders-table table {
    min-width: 620px;
}


@media (max-width: 760px) {
    .market-hero {
        flex-direction: column;
    }

    .market-search-form,
    .market-search-form .form-group,
    .market-autocomplete {
        max-width: 100%;
    }

    .market-suggestions-panel {
        width: 100%;
    }
}

/* ==========================================================================
   07. Relics and relic view
   ========================================================================== */

.vaulted-relic-state {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow: hidden;
}

.vaulted-relic-state::before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(216, 189, 103, 0.16) 0%,
        rgba(216, 189, 103, 0.08) 34%,
        rgba(216, 189, 103, 0.03) 58%,
        rgba(216, 189, 103, 0.00) 76%
    );
    filter: blur(10px);
    pointer-events: none;
}

.vaulted-relic-icon {
    position: relative;
    z-index: 1;
    width: min(360px, 92%);
    height: auto;
    max-height: 390px;
    object-fit: contain;
    display: block;
    opacity: 0.98;
    filter:
        drop-shadow(0 0 10px rgba(216, 189, 103, 0.24))
        drop-shadow(0 0 24px rgba(216, 189, 103, 0.14))
        drop-shadow(0 0 42px rgba(0, 0, 0, 0.55));
}

.rarity-badge {
    font-weight: 800;
    min-width: 86px;
    justify-content: center;
}

.rarity-common {
    color: #c28a56;
    border-color: rgba(194, 138, 86, 0.42);
    background:
        linear-gradient(180deg, rgba(194, 138, 86, 0.13), rgba(8, 6, 4, 0.70));
}

.rarity-uncommon {
    color: #d8dde4;
    border-color: rgba(216, 221, 228, 0.42);
    background:
        linear-gradient(180deg, rgba(216, 221, 228, 0.11), rgba(8, 6, 4, 0.70));
}

.rarity-rare {
    color: var(--vitruvian-gold);
    border-color: rgba(216, 189, 103, 0.50);
    background:
        linear-gradient(180deg, rgba(216, 189, 103, 0.16), rgba(8, 6, 4, 0.70));
    box-shadow: 0 0 14px rgba(216, 189, 103, 0.08);
}

.stat-card-platinum {
    position: relative;
    overflow: hidden;
}

.stat-card-platinum .stat-label,
.stat-card-platinum .stat-value {
    position: relative;
    z-index: 2;
}

.platinum-card-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    height: 72%;
    max-height: 82px;
    width: auto;
    object-fit: contain;
    opacity: 0.22;
    z-index: 1;
    pointer-events: none;
    filter:
        drop-shadow(0 0 8px rgba(216, 189, 103, 0.16))
        drop-shadow(0 0 16px rgba(0, 0, 0, 0.42));
}

.stat-value-muted {
    margin-left: 4px;
    color: var(--text-muted);
    font-size: 20px;
    font-weight: 700;
}

.relic-stat-card {
    position: relative;
    overflow: hidden;
}

.relic-stat-card .stat-label,
.relic-stat-card .stat-value {
    position: relative;
    z-index: 2;
}

.relic-stat-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    height: 74%;
    max-height: 84px;
    width: auto;
    object-fit: contain;
    opacity: 0.24;
    z-index: 1;
    pointer-events: none;
    filter:
        drop-shadow(0 0 8px rgba(216, 189, 103, 0.16))
        drop-shadow(0 0 18px rgba(0, 0, 0, 0.45));
}

/* ==========================================================================
   08. Prime Farm
   ========================================================================== */

.prime-farm-preferred-grid {
    margin-bottom: 18px;
}

.preferred-farm-card {
    position: relative;
    overflow: hidden;
    min-height: 116px;
}

.preferred-farm-card .stat-label,
.preferred-farm-main,
.preferred-farm-sub {
    position: relative;
    z-index: 2;
}

.preferred-farm-main {
    margin-top: 8px;
    color: var(--vitruvian-cream);
    font-size: 28px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.preferred-farm-sub {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 750;
}

.preferred-farm-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    height: 74%;
    max-height: 84px;
    width: auto;
    object-fit: contain;
    opacity: 0.22;
    z-index: 1;
    pointer-events: none;
    filter:
        drop-shadow(0 0 8px rgba(216, 189, 103, 0.16))
        drop-shadow(0 0 18px rgba(0, 0, 0, 0.45));
}

/* Prime Farm nested result cards */

.prime-farm-results-card {
    min-width: 0;
    overflow: hidden;
}

.prime-farm-result-list {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.prime-farm-result-card {
    min-width: 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(216, 189, 103, 0.045), transparent 44%),
        rgba(12, 9, 6, 0.78);
}

.prime-farm-relic-table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.prime-farm-relic-table table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.prime-farm-relic-table th,
.prime-farm-relic-table td {
    white-space: normal;
    word-break: break-word;
    vertical-align: middle;
}

.relic-tier-icon-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.prime-farm-relic-table th:nth-child(1),
.prime-farm-relic-table td:nth-child(1) {
    width: 90px;
    text-align: center;
}

.prime-farm-relic-table th:nth-child(2),
.prime-farm-relic-table td:nth-child(2) {
    width: 28%;
}

.prime-farm-relic-table th:nth-child(3),
.prime-farm-relic-table td:nth-child(3) {
    width: 18%;
}

.prime-farm-relic-table th:nth-child(4),
.prime-farm-relic-table td:nth-child(4) {
    width: 18%;
}

.prime-farm-relic-table th:nth-child(5),
.prime-farm-relic-table td:nth-child(5) {
    width: 20%;
}

.prime-farm-relic-table td:nth-child(1) .relic-icon {
    margin: 0 auto;
}

/* Prime Farm autocomplete */

.prime-farm-search-form {
    align-items: flex-start;
}

.prime-farm-autocomplete {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.prime-farm-suggestions-panel {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 999;
    display: none;
    width: min(620px, 100%);
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid rgba(216, 189, 103, 0.24);
    background:
        linear-gradient(180deg, rgba(18, 15, 10, 0.98), rgba(7, 6, 4, 0.98));
    box-shadow:
        0 22px 48px rgba(0, 0, 0, 0.42),
        0 0 22px rgba(216, 189, 103, 0.08),
        inset 0 1px 0 rgba(240, 228, 182, 0.05);
    backdrop-filter: blur(12px);
}

.prime-farm-suggestions-panel.is-open {
    display: block;
}

.prime-farm-suggestion-option {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text-main);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.prime-farm-suggestion-option:hover,
.prime-farm-suggestion-option.is-active {
    color: var(--vitruvian-cream);
    background:
        linear-gradient(90deg, rgba(216, 189, 103, 0.16), rgba(216, 189, 103, 0.04));
    box-shadow:
        inset 3px 0 0 rgba(216, 189, 103, 0.72),
        0 0 16px rgba(216, 189, 103, 0.06);
}

@media (max-width: 760px) {
    .prime-farm-autocomplete {
        width: 100%;
        min-width: 0;
    }

    .prime-farm-search-form .btn {
        width: 100%;
    }
}

/* Prime Inventory Ducats badge with icon */

.inventory-ducats-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--vitruvian-gold);
    border-color: rgba(216, 189, 103, 0.42);
    background:
        linear-gradient(
            180deg,
            rgba(216, 189, 103, 0.14),
            rgba(8, 6, 4, 0.76)
        );
    box-shadow:
        0 0 14px rgba(216, 189, 103, 0.07),
        inset 0 1px 0 rgba(240, 228, 182, 0.05);
    font-weight: 900;
}

.inventory-ducats-value {
    line-height: 1;
}

.inventory-ducats-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
    filter:
        drop-shadow(0 0 5px rgba(216, 189, 103, 0.18))
        drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
}

.inventory-ducats-missing {
    color: var(--text-muted);
    border-color: rgba(216, 189, 103, 0.18);
    background: transparent;
    box-shadow: none;
}

/* Prime Inventory Platinum badge */

.inventory-platinum-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--vitruvian-cream);
    border-color: rgba(216, 189, 103, 0.42);
    background:
        linear-gradient(
            180deg,
            rgba(216, 189, 103, 0.14),
            rgba(8, 6, 4, 0.76)
        );
    box-shadow:
        0 0 14px rgba(216, 189, 103, 0.07),
        inset 0 1px 0 rgba(240, 228, 182, 0.05);
    font-weight: 900;
}

.inventory-platinum-value {
    line-height: 1;
}

.inventory-platinum-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
    filter:
        drop-shadow(0 0 5px rgba(216, 189, 103, 0.18))
        drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
}

.inventory-platinum-missing {
    color: var(--text-muted);
    border-color: rgba(216, 189, 103, 0.18);
    background: transparent;
    box-shadow: none;
}


/* ==========================================================================
   12. Responsive rules
   ========================================================================== */

.mobile-menu-button {
    display: none;
}

@media (max-width: 1000px) {
    .sidebar {
        transform: translateX(-100%);
        transition: 0.22s ease;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .main-area {
        margin-left: 0;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

    .stats-grid,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .top-header {
        padding: 16px 18px;
    }

    .header-actions {
        gap: 8px;
    }

    .header-icon-btn {
        width: 42px;
        height: 42px;
        min-width: 42px;
        padding: 0;
    }

    .header-svg-icon {
        width: 23px;
        height: 23px;
    }
    
    .content {
        padding: 22px 18px;
    }

    .page-footer {
        padding: 16px 18px;
    }
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--vitruvian-gold);
    cursor: pointer;
}

.relic-tier {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.relic-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(216, 189, 103, 0.18);
    background:
        radial-gradient(circle at 35% 25%, rgba(240, 228, 182, 0.14), transparent 42%),
        linear-gradient(135deg, rgba(216, 189, 103, 0.10), rgba(95, 74, 39, 0.12)),
        rgba(8, 6, 4, 0.72);
    box-shadow:
        inset 0 0 14px rgba(216, 189, 103, 0.04),
        0 0 14px rgba(216, 189, 103, 0.06);
    overflow: hidden;
    flex-shrink: 0;
}

.relic-icon-img {
    width: 34px;
    height: 34px;
    display: block;
    object-fit: contain;
    filter:
        drop-shadow(0 0 7px rgba(216, 189, 103, 0.18))
        drop-shadow(0 0 14px rgba(0, 0, 0, 0.40));
}

.relic-tier-name {
    color: var(--vitruvian-cream);
    font-weight: 700;
}

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

.relic-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(216, 189, 103, 0.16);
    background:
        linear-gradient(135deg, rgba(216, 189, 103, 0.06), transparent),
        rgba(10, 8, 5, 0.76);
    transition: 0.16s ease;
}

.relic-card:hover {
    transform: translateY(-2px);
    border-color: rgba(216, 189, 103, 0.38);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.relic-card-icon .relic-icon {
    width: 64px;
    height: 64px;
}

.relic-card-icon .relic-icon-img {
    width: 60px;
    height: 60px;
}

.relic-card-title {
    display: inline-block;
    font-size: 17px;
    font-weight: 800;
    color: var(--vitruvian-cream);
    margin-bottom: 14px;
    line-height: 1.25;
}

.relic-card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}


.relic-card-actions {
    align-self: stretch;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.relic-card-actions .btn {
    padding: 7px 11px;
    min-width: 38px;
}

.relic-card-title:hover {
    color: var(--vitruvian-gold);
}

.relic-view-hero {
    min-height: 150px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 22px;
    position: relative;
}

.relic-view-main {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
    flex: 1;
}

.relic-view-image {
    width: 120px;
    min-width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.relic-view-image .relic-icon {
    width: 116px;
    height: 116px;
    border-radius: 18px;
}

.relic-view-image .relic-icon-img {
    width: 108px;
    height: 108px;
}

.relic-view-title-block {
    min-width: 0;
}

.relic-view-title {
    font-size: 30px;
    margin-bottom: 8px;
}

.relic-quantity-control {
    width: 88px;
    min-width: 88px;
    border-radius: 18px;
    border: 1px solid rgba(216, 189, 103, 0.22);
    background:
        linear-gradient(
            180deg,
            rgba(216, 189, 103, 0.16) 0%,
            rgba(216, 189, 103, 0.08) 34%,
            rgba(8, 6, 4, 0.78) 58%,
            rgba(216, 189, 103, 0.10) 100%
        ),
        rgba(8, 6, 4, 0.88);
    box-shadow:
        inset 0 1px 0 rgba(240, 228, 182, 0.04),
        0 0 22px rgba(216, 189, 103, 0.08);
    overflow: hidden;
    display: grid;
    grid-template-rows: 38px 1fr 38px;
}

.relic-quantity-arrow {
    border: 0;
    background: transparent;
    color: var(--vitruvian-gold);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.15s ease;
}

.relic-quantity-arrow:hover {
    background: rgba(216, 189, 103, 0.08);
    color: var(--vitruvian-cream);
}

.relic-quantity-arrow:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.relic-quantity-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.relic-quantity-display,
.relic-quantity-display.badge-green,
.relic-quantity-display.relic-owned-badge.badge-green {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.relic-quantity-arrow:first-child {
    border-radius: 18px 18px 0 0;
}

.relic-quantity-arrow:last-child {
    border-radius: 0 0 18px 18px;
}

.relic-quantity-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.10em;
}

.relic-quantity-number {
    font-size: 28px;
    line-height: 1;
    font-weight: 900;
    color: var(--vitruvian-cream);
}

.relic-quantity-display.badge-green .relic-quantity-number {
    color: var(--vitruvian-gold);
}



.relic-card-clickable {
    cursor: pointer;
}

.relic-card-clickable:focus {
    outline: none;
    border-color: rgba(216, 189, 103, 0.55);
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.28),
        0 0 0 3px rgba(216, 189, 103, 0.10);
}

.relic-card-clickable .relic-card-actions,
.relic-card-clickable .relic-quantity-btn {
    cursor: default;
}

.relic-card-clickable .relic-quantity-btn {
    cursor: pointer;
}

.relic-view-table table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}

.relic-view-table th,
.relic-view-table td {
    padding: 11px 10px;
    white-space: normal;
    word-break: break-word;
}

.relic-view-table th {
    font-size: 11px;
}

.relic-view-table .badge {
    white-space: nowrap;
}

.relic-card-owned {
    border-color: rgba(216, 189, 103, 0.38);
    background:
        linear-gradient(135deg, rgba(216, 189, 103, 0.12), rgba(95, 74, 39, 0.12)),
        rgba(10, 8, 5, 0.82);
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.24),
        0 0 20px rgba(216, 189, 103, 0.075),
        inset 0 1px 0 rgba(240, 228, 182, 0.035);
}

.relic-owned-badge.badge-green {
    color: var(--vitruvian-gold);
    border-color: rgba(216, 189, 103, 0.36);
    background: rgba(216, 189, 103, 0.08);
}

.relic-owned-badge.badge-green .relic-owned-value {
    color: var(--vitruvian-cream);
}

.relic-card-body {
    min-width: 0;
    flex: 1;
}


.relic-owned-badge {
    font-weight: 800;
}

.relic-owned-value {
    color: var(--vitruvian-cream);
    font-weight: 900;
}


.relic-quantity-btn {
    min-width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 12px;
    font-size: 18px;
    line-height: 1;
}

.relic-quantity-btn-minus {
    color: #f0c7bd;
    border-color: rgba(200, 109, 90, 0.25);
    background:
        linear-gradient(180deg, rgba(200, 109, 90, 0.08), rgba(8, 6, 4, 0.82));
}

.relic-quantity-btn-minus:hover {
    border-color: rgba(200, 109, 90, 0.48);
    color: #ffe1dc;
}

.relic-quantity-btn-plus {
    color: var(--vitruvian-cream);
}

/* ==========================================================================
   09. Prime Inventory
   ========================================================================== */

.inventory-table-card {
    overflow-x: visible;
}

.inventory-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}

.inventory-table th,
.inventory-table td {
    padding: 11px 10px;
    white-space: normal;
    word-break: break-word;
    vertical-align: middle;
}

.inventory-table th {
    font-size: 11px;
}

.inventory-table th:nth-child(1),
.inventory-table td:nth-child(1) {
    width: 30%;
}

.inventory-table th:nth-child(2),
.inventory-table td:nth-child(2) {
    width: 110px;
}

.inventory-table th:nth-child(3),
.inventory-table td:nth-child(3) {
    width: 150px;
}

.inventory-table th:nth-child(4),
.inventory-table td:nth-child(4) {
    width: 120px;
}

.inventory-table th:nth-child(5),
.inventory-table td:nth-child(5) {
    width: 120px;
}

.inventory-table th:nth-child(6),
.inventory-table td:nth-child(6) {
    width: 100px;
}

.inventory-table th:nth-child(7),
.inventory-table td:nth-child(7) {
    width: 110px;
}

.inventory-quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.inventory-table .btn {
    white-space: nowrap;
}

.inventory-quantity-btn {
    min-width: 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 12px;
    font-size: 18px;
    line-height: 1;
}

.inventory-quantity-minus {
    color: #f0c7bd;
    border-color: rgba(200, 109, 90, 0.25);
    background:
        linear-gradient(180deg, rgba(200, 109, 90, 0.08), rgba(8, 6, 4, 0.82));
}

.inventory-quantity-minus:hover {
    border-color: rgba(200, 109, 90, 0.48);
    color: #ffe1dc;
}

.inventory-quantity-plus {
    color: var(--vitruvian-cream);
}

.inventory-quantity-value {
    min-width: 46px;
    justify-content: center;
    color: var(--vitruvian-gold);
    border-color: rgba(216, 189, 103, 0.34);
    background: rgba(216, 189, 103, 0.08);
    font-weight: 900;
}

.inventory-autocomplete {
    position: relative;
    width: 100%;
}

.inventory-suggestions-panel {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 999;
    display: none;
    width: min(560px, 100%);
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid rgba(216, 189, 103, 0.24);
    background:
        linear-gradient(180deg, rgba(18, 15, 10, 0.98), rgba(7, 6, 4, 0.98));
    box-shadow:
        0 22px 48px rgba(0, 0, 0, 0.42),
        0 0 22px rgba(216, 189, 103, 0.08),
        inset 0 1px 0 rgba(240, 228, 182, 0.05);
    backdrop-filter: blur(12px);
}

.inventory-suggestions-panel.is-open {
    display: block;
}

.inventory-suggestion-option {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text-main);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.inventory-suggestion-option:hover {
    color: var(--vitruvian-cream);
    background:
        linear-gradient(90deg, rgba(216, 189, 103, 0.16), rgba(216, 189, 103, 0.04));
    box-shadow:
        inset 3px 0 0 rgba(216, 189, 103, 0.72),
        0 0 16px rgba(216, 189, 103, 0.06);
}

.inventory-price-badge {
    color: var(--vitruvian-gold);
    border-color: rgba(216, 189, 103, 0.34);
    background: rgba(216, 189, 103, 0.08);
    font-weight: 800;
}

.inventory-total-badge {
    color: var(--vitruvian-cream);
    border-color: rgba(216, 189, 103, 0.46);
    background:
        linear-gradient(180deg, rgba(216, 189, 103, 0.14), rgba(8, 6, 4, 0.70));
    font-weight: 900;
}

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

.inventory-toolbar {
    justify-content: space-between;
}

.inventory-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.inventory-view-btn.is-active {
    border-color: rgba(216, 189, 103, 0.50);
    color: var(--vitruvian-cream);
}

.inventory-grid-view {
    margin-top: 4px;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.inventory-part-card {
    min-height: 292px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(216, 189, 103, 0.18);
    background:
        radial-gradient(circle at 50% 22%, rgba(216, 189, 103, 0.12), transparent 95px),
        linear-gradient(180deg, rgba(216, 189, 103, 0.055), transparent 46%),
        rgba(10, 8, 5, 0.82);
    box-shadow:
        0 22px 60px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(240, 228, 182, 0.035);
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    transition: 0.16s ease;
}

.inventory-part-card:hover {
    transform: translateY(-2px);
    border-color: rgba(216, 189, 103, 0.38);
    box-shadow:
        0 26px 70px rgba(0, 0, 0, 0.30),
        0 0 18px rgba(216, 189, 103, 0.06);
}

.inventory-part-icon {
    flex: 1;
    width: 100%;
    min-height: 116px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inventory-part-icon-img {
    width: min(132px, 78%);
    height: min(132px, 78%);
    object-fit: contain;
    display: block;
    filter:
        drop-shadow(0 0 10px rgba(216, 189, 103, 0.22))
        drop-shadow(0 0 28px rgba(0, 0, 0, 0.55));
}

.inventory-part-name {
    width: 100%;
    min-height: 38px;
    color: var(--vitruvian-cream);
    font-weight: 850;
    font-size: 14px;
    line-height: 1.25;
    text-align: center;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.inventory-part-rarity {
    display: flex;
    justify-content: center;
}

.inventory-part-market-row {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 14px;
    color: var(--text-muted);
    font-size: 13px;
}

.inventory-part-market-row strong {
    color: var(--vitruvian-gold);
    font-weight: 900;
}

.inventory-card-quantity-row {
    width: 100%;
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

.inventory-card-qty {
    color: var(--text-muted);
    text-align: center;
    font-size: 13px;
    font-weight: 800;
}

.inventory-card-qty strong {
    color: var(--vitruvian-cream);
    font-size: 16px;
}

.inventory-card-qty .inventory-quantity-value {
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--vitruvian-cream);
    font-size: 16px;
    font-weight: 900;
    display: inline;
}

.inventory-part-market-row .inventory-total-value {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--vitruvian-gold);
    font-weight: 900;
    display: inline;
    min-width: 0;
}

.inventory-view-icon-btn {
    width: 44px;
    height: 42px;
    min-width: 44px;
    padding: 0;
}

.inventory-view-icon {
    width: 22px;
    height: 22px;
    display: block;
    fill: currentColor;
}

.inventory-view-toggle .inventory-view-btn {
    color: var(--vitruvian-gold);
}

.inventory-view-toggle .inventory-view-btn.is-active {
    color: var(--vitruvian-cream);
}

/* ==========================================================================
   10. Dashboard Overview Cards
   ========================================================================== */

.dashboard-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-overview-card {
    min-height: 180px;
    display: grid;
    align-items: center;
    gap: 18px;
    overflow: hidden;
    position: relative;
}

.dashboard-overview-kicker {
    color: var(--vitruvian-gold);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 11px;
    font-weight: 900;
    margin-bottom: 8px;
}

.dashboard-overview-title {
    margin: 0;
    color: var(--vitruvian-cream);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.dashboard-overview-description {
    margin-top: 8px;
    color: var(--text-muted);
    line-height: 1.5;
    font-size: 14px;
}

.dashboard-overview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}

.dashboard-overview-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid rgba(216, 189, 103, 0.16);
    background: rgba(216, 189, 103, 0.045);
}

/* Mastery card */

.dashboard-mastery-card {
    grid-template-columns: minmax(0, 1fr) auto;
}

.dashboard-mastery-left {
    min-width: 0;
}

.dashboard-mastery-ring {
    --progress: 0;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    padding: 9px;
    background:
        conic-gradient(
            var(--vitruvian-gold) calc(var(--progress) * 1%),
            rgba(216, 189, 103, 0.12) 0
        );
    box-shadow:
        0 0 24px rgba(216, 189, 103, 0.10),
        inset 0 0 18px rgba(0, 0, 0, 0.38);
}

.dashboard-mastery-ring-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 40% 30%, rgba(216, 189, 103, 0.10), transparent 52%),
        rgba(8, 6, 4, 0.94);
    border: 1px solid rgba(216, 189, 103, 0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dashboard-mastery-rank {
    color: var(--vitruvian-cream);
    font-size: 38px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.dashboard-mastery-label {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* Platinum card */

.dashboard-platinum-card {
    grid-template-columns: 170px minmax(0, 1fr) 150px;
}

.dashboard-wallet-box {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 18px;
    border-right: 1px solid rgba(216, 189, 103, 0.12);
}

.dashboard-wallet-controls {
    display: grid;
    gap: 10px;
}

.dashboard-wallet-input {
    width: 100%;
    text-align: center;
    font-weight: 900;
}

.dashboard-wallet-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.dashboard-wallet-btn {
    min-height: 40px;
    padding: 0;
    color: var(--vitruvian-gold);
    font-size: 18px;
    font-weight: 950;
}

.dashboard-wallet-btn-remove {
    color: #f0c7bd;
    border-color: rgba(200, 109, 90, 0.28);
}

.dashboard-profit-center {
    text-align: center;
    min-width: 0;
}

.dashboard-wallet-total {
    text-align: right;
}

.dashboard-platinum-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--vitruvian-cream);
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.dashboard-platinum-value img,
.dashboard-projected-total img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter:
        drop-shadow(0 0 6px rgba(216, 189, 103, 0.18))
        drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
}

.dashboard-platinum-current {
    font-size: clamp(24px, 2.6vw, 34px);
}

.dashboard-projected-total {
    margin-top: 12px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 800;
}

.dashboard-projected-total strong {
    color: var(--vitruvian-gold);
}

/* Dashboard overview responsive */

@media (max-width: 1100px) {
    .dashboard-overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .dashboard-mastery-card,
    .dashboard-platinum-card {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .dashboard-mastery-ring {
        margin: 0 auto;
    }

    .dashboard-wallet-box {
        padding-right: 0;
        padding-bottom: 16px;
        border-right: 0;
        border-bottom: 1px solid rgba(216, 189, 103, 0.12);
    }

    .dashboard-profit-center,
    .dashboard-wallet-total {
        text-align: left;
    }
}

/* ==========================================================================
   11. Dashboard News
   ========================================================================== */

.dashboard-news-grid {
    display: grid;
    gap: 18px;
}

.dashboard-news-card {
    overflow: hidden;
}

.dashboard-news-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-news-item {
    display: grid;
    grid-template-rows: 150px auto;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(216, 189, 103, 0.14);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(216, 189, 103, 0.07), transparent 46%),
        rgba(8, 6, 4, 0.54);
    color: var(--text-main);
    text-decoration: none;
    transition:
        border-color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.dashboard-news-item:hover {
    transform: translateY(-2px);
    border-color: rgba(216, 189, 103, 0.34);
    background:
        linear-gradient(180deg, rgba(216, 189, 103, 0.12), transparent 52%),
        rgba(12, 9, 6, 0.78);
    box-shadow:
        0 18px 36px rgba(0, 0, 0, 0.24),
        0 0 20px rgba(216, 189, 103, 0.07);
}

.dashboard-news-image-wrap {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: rgba(8, 6, 4, 0.72);
    border-bottom: 1px solid rgba(216, 189, 103, 0.12);
}

.dashboard-news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.94;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.dashboard-news-item:hover .dashboard-news-image {
    transform: scale(1.025);
    opacity: 1;
}

.dashboard-news-content {
    min-width: 0;
    padding: 14px;
}

.dashboard-news-title {
    color: var(--vitruvian-cream);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.35;
}

.dashboard-news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 750;
}

.dashboard-news-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(216, 189, 103, 0.14);
    background: rgba(216, 189, 103, 0.045);
}

/* Dashboard News sections */

.dashboard-news-section {
    margin-top: 18px;
}

.dashboard-section-title {
    margin-bottom: 12px;
    color: var(--vitruvian-gold);
    font-size: 13px;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-news-featured {
    border-color: rgba(216, 189, 103, 0.28);
    background:
        linear-gradient(180deg, rgba(216, 189, 103, 0.12), transparent 52%),
        rgba(12, 9, 6, 0.78);
}

.dashboard-news-featured .dashboard-news-title {
    color: var(--vitruvian-gold);
}

/* Dashboard News load more */

.dashboard-news-item.is-hidden {
    display: none !important;
}

.dashboard-news-load-more-wrap {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.dashboard-news-load-more {
    min-width: 180px;
}

/* ==========================================================================
   12. Login Prime Access banner
   ========================================================================== */

.auth-prime-banner {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    border-radius: 24px;
    border: 1px solid rgba(201, 169, 97, 0.18);
    background:
        linear-gradient(rgba(7, 6, 4, 0.18), rgba(7, 6, 4, 0.42)),
        url("/assets/images/citrine_p.png") center center / cover no-repeat;
}

.auth-prime-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(10, 8, 5, 0.82) 0%,
            rgba(10, 8, 5, 0.54) 34%,
            rgba(10, 8, 5, 0.12) 72%,
            rgba(10, 8, 5, 0.04) 100%
        );
    pointer-events: none;
}

.auth-prime-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 24px 30px;
}

.auth-prime-kicker {
    position: absolute;
    top: 24px;
    left: 30px;
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--vitruvian-gold);
    opacity: 0.95;
}

.auth-prime-logo {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: block;
    width: 280px;
    height: auto;
    object-fit: contain;
}


@media (max-width: 900px) {
    .dashboard-news-list {
        grid-template-columns: 1fr;
    }

    .dashboard-news-item {
        grid-template-rows: 160px auto;
    }

    .dashboard-news-image-wrap {
        height: 160px;
    }
}


@media (max-width: 760px) {
    .inventory-toolbar {
        justify-content: flex-start;
    }

    .inventory-view-toggle {
        width: 100%;
        margin-left: 0;
    }

    .inventory-view-toggle .btn {
        flex: 1;
    }

    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .inventory-part-card {
        min-height: 260px;
    }
}

@media (max-width: 900px) {
    .inventory-table {
        table-layout: auto;
        min-width: 760px;
    }

    .inventory-table-card {
        overflow-x: auto;
    }
}

@media (max-width: 640px) {
    .relic-card {
        align-items: flex-start;
    }

    .relic-card-actions {
        flex-direction: column-reverse;
        align-self: center;
    }

    .relic-quantity-btn {
        width: 38px;
    }
}

@media (max-width: 760px) {
    .relic-view-hero {
        flex-direction: column;
    }

    .relic-view-main {
        align-items: flex-start;
    }

    .relic-view-image {
        width: 88px;
        min-width: 88px;
        height: 88px;
    }

    .relic-view-image .relic-icon {
        width: 84px;
        height: 84px;
    }

    .relic-view-image .relic-icon-img {
        width: 78px;
        height: 78px;
    }

    .relic-quantity-control {
        width: 100%;
        min-width: 0;
        grid-template-columns: 52px 1fr 52px;
        grid-template-rows: 64px;
    }

    .relic-quantity-arrow:first-child {
        order: 1;
    }

    .relic-quantity-display {
        order: 2;
        border: 0;
    }

    .relic-quantity-arrow:last-child {
        order: 3;
    }
}
