:root {
    --side: #1B2A4A;
    --side-h: #253757;
    --side-a: #2E4470;
    --accent: #E8913A;
    --green: #22C55E;
    --green-bg: #DCFCE7;
    --green-t: #166534;
    --red: #EF4444;
    --red-bg: #FEE2E2;
    --red-t: #991B1B;
    --yellow: #F59E0B;
    --yellow-bg: #FEF3C7;
    --yellow-t: #92400E;
    --blue: #3B82F6;
    --blue-bg: #DBEAFE;
    --blue-t: #1E40AF;
    --purple: #8B5CF6;
    --purple-bg: #EDE9FE;
    --purple-t: #5B21B6;
    --teal: #14B8A6;
    --bg: #F1F5F9;
    --card: #FFF;
    --text: #1E293B;
    --t2: #64748B;
    --bdr: #E2E8F0;
    --r: 12px;
    --rs: 8px;
    --sh: 0 1px 3px rgba(0, 0, 0, .08);
    --shl: 0 10px 25px rgba(0, 0, 0, .08)
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text)
}

/* MODE BAR */
.mode-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: #0F172A;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 13px
}

.mode-bar span {
    opacity: .6
}

.mbtn {
    background: 0;
    border: 1.5px solid rgba(255, 255, 255, .25);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    transition: .2s
}

.mbtn:hover {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .4)
}

.mbtn.active {
    background: var(--accent);
    border-color: var(--accent)
}

.mlabel {
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: .5px
}

/* LAYOUT */
.app {
    display: flex;
    min-height: 100vh;
    padding-top: 44px
}

.screen {
    display: none
}

.screen.vis {
    display: block
}

/* SIDEBAR */
.sb {
    width: 240px;
    background: var(--side);
    color: #fff;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 44px;
    left: 0;
    bottom: 0;
    z-index: 50
}

.sb-logo {
    padding: 8px 24px 24px;
    font-family: 'Fraunces', serif;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px
}

.sb-logo .dot {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%
}

.sb-sec {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: .4;
    padding: 14px 24px 6px;
    font-weight: 600
}

.si {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    cursor: pointer;
    font-size: 14px;
    color: rgba(255, 255, 255, .6);
    transition: .15s;
    font-weight: 500;
    border-left: 3px solid transparent
}

.si:hover {
    background: var(--side-h);
    color: #fff
}

.si.act {
    background: var(--side-a);
    color: #fff;
    border-left-color: var(--accent)
}

.si svg {
    width: 18px;
    height: 18px;
    opacity: .7;
    flex-shrink: 0
}

.si.act svg {
    opacity: 1
}

.si .badge {
    margin-left: auto;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px
}

.sb-spacer {
    flex: 1
}

.sb-bot {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding-top: 10px;
    margin-top: 10px
}

/* MAIN */
.mn {
    flex: 1;
    margin-left: 240px
}

.pg {
    padding: 28px 36px
}

.pg-title {
    font-family: 'Fraunces', serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px
}

.pg-sub {
    color: var(--t2);
    font-size: 13px;
    margin-bottom: 20px
}

.org-name {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    font-weight: 700
}

/* CARDS & UI */
.card {
    background: var(--card);
    border-radius: var(--r);
    box-shadow: var(--sh);
    padding: 20px;
    margin-bottom: 16px
}

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

.form-group {
    margin-bottom: 12px
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px
}

.req {
    color: var(--red)
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--bdr);
    border-radius: var(--rs);
    font-size: 13px;
    font-family: inherit;
    background: #fff
}

.form-textarea {
    min-height: 70px;
    resize: vertical
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--rs);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: .15s
}

.btn-p {
    background: var(--side);
    color: #fff
}

.btn-a {
    background: var(--accent);
    color: #fff
}

.btn-g {
    background: var(--green);
    color: #fff
}

.btn-o {
    background: 0;
    border: 1.5px solid var(--bdr);
    color: var(--text)
}

.btn-r {
    background: var(--red-bg);
    color: var(--red-t)
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px
}

.btn-block {
    width: 100%;
    justify-content: center
}

.btn svg {
    width: 14px;
    height: 14px
}

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

th {
    text-align: left;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--t2);
    font-weight: 600;
    padding: 8px 12px;
    border-bottom: 2px solid var(--bdr)
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--bdr);
    font-size: 13px
}

tr:last-child td {
    border-bottom: 0
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600
}

.pill-n {
    background: var(--blue-bg);
    color: var(--blue-t)
}

.pill-p {
    background: var(--yellow-bg);
    color: var(--yellow-t)
}

.pill-d {
    background: var(--green-bg);
    color: var(--green-t)
}

.pill-r {
    background: var(--red-bg);
    color: var(--red-t)
}

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--rs);
    margin-bottom: 16px;
    font-size: 13px
}

.alert-w {
    background: var(--yellow-bg);
    color: var(--yellow-t);
    border: 1px solid #FDE68A
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0
}

.lic-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600
}

.lic-badge.active {
    background: var(--green-bg);
    color: var(--green-t)
}

.lic-badge.inactive {
    background: var(--yellow-bg);
    color: var(--yellow-t)
}

.lic-badge .bd {
    width: 6px;
    height: 6px;
    border-radius: 50%
}

.lic-badge.active .bd {
    background: var(--green)
}

.lic-badge.inactive .bd {
    background: var(--yellow)
}

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

.stat {
    text-align: center;
    padding: 16px
}

.stat .n {
    font-family: 'Fraunces', serif;
    font-size: 32px;
    font-weight: 800;
    line-height: 1
}

.stat .l {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--t2);
    font-weight: 600;
    margin-top: 2px
}

.token-card {
    text-align: center;
    max-width: 380px;
    margin: 0 auto 16px;
    padding: 24px
}

.token-num {
    font-family: 'Fraunces', serif;
    font-size: 60px;
    font-weight: 800;
    color: var(--side);
    line-height: 1
}

.token-sub {
    font-size: 14px;
    color: var(--t2);
    margin-top: 2px
}

.token-bar {
    height: 8px;
    background: var(--bdr);
    border-radius: 4px;
    margin: 12px 30px;
    overflow: hidden
}

.token-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--side), var(--blue));
    border-radius: 4px
}

.token-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    font-size: 11px;
    color: var(--t2)
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px
}

.qa {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 10px;
    background: #fff;
    border: 1.5px solid var(--bdr);
    border-radius: var(--r);
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: .2s
}

.qa:hover {
    border-color: var(--side);
    background: #F8FAFC;
    transform: translateY(-1px)
}

.qa svg {
    width: 20px;
    height: 20px;
    color: var(--side)
}

.product-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--bdr)
}

.product-row:last-child {
    border-bottom: 0
}

.product-info {
    flex: 1
}

.product-info h4 {
    font-size: 13px;
    font-weight: 600
}

.product-info span {
    font-size: 11px;
    color: var(--t2)
}

.product-price {
    font-weight: 600;
    font-size: 13px;
    min-width: 80px;
    text-align: right
}

.qty-input {
    width: 55px;
    padding: 6px;
    text-align: center;
    border: 1.5px solid var(--bdr);
    border-radius: var(--rs);
    font-size: 13px;
    font-family: inherit
}

.locked {
    text-align: center;
    padding: 40px;
    color: var(--t2)
}

.locked svg {
    width: 40px;
    height: 40px;
    opacity: .25;
    margin-bottom: 8px
}

.support-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px
}

.support-card {
    padding: 20px;
    text-align: center;
    border: 1.5px solid var(--bdr);
    border-radius: var(--r);
    cursor: pointer;
    transition: .2s;
    background: #fff
}

.support-card:hover {
    border-color: var(--side);
    transform: translateY(-2px)
}

.support-card svg {
    width: 32px;
    height: 32px;
    color: var(--accent);
    margin-bottom: 8px
}

.support-card h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px
}

.support-card p {
    font-size: 12px;
    color: var(--t2)
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1.5px solid var(--bdr);
    border-radius: var(--rs);
    font-size: 13px
}

.section-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--t2);
    font-weight: 700;
    margin-bottom: 10px
}

.dev-note {
    background: #FFFBEB;
    border: 2px dashed #F59E0B;
    border-radius: var(--rs);
    padding: 12px 16px;
    font-size: 12px;
    color: #92400E;
    margin: 16px 0;
    line-height: 1.6
}

.dev-note::before {
    content: '🔧 NOTE DEV — ';
    font-weight: 700;
    color: #78350F
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--side);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0
}

.card-success {
    color: green;
    background-color: lightgreen;
    padding-bottom: 12px;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
}

.card-warning {
    color: black;
    background-color: darkorange;
    padding-bottom: 12px;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
}

.card-danger {
    color: red;
    background-color: lightpink;
    padding-bottom: 12px;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
}

.card-info {
    color: blue;
    background-color: lightblue;
    padding-bottom: 12px;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
}

/* ===== LEAD PAGE ===== */
.lead-page {
    margin-left: 0 !important;
    padding: 0 !important
}

.lead-hero {
    background: linear-gradient(135deg, #4F6410 0%, #95AA1F 45%, #7F961A 70%, #44570D 100%);
    color: #fff;
    padding: 48px 32px;
    text-align: center;
    position: relative;
    overflow: hidden
}

.lead-hero h1 {
    font-family: 'Fraunces', serif;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px
}

.lead-hero p {
    opacity: .75;
    font-size: 15px;
    max-width: 500px;
    margin: 0 auto
}

.lead-form {
    max-width: 620px;
    margin: -24px auto 40px;
    background: #fff;
    border-radius: var(--r);
    box-shadow: var(--shl);
    padding: 32px;
    position: relative;
    z-index: 2
}

/* ===== LIBRARY ===== */
.lib-hero {
    background: linear-gradient(135deg, #4F6410 0%, #95AA1F 45%, #7F961A 70%, #44570D 100%);
    color: #fff;
    padding: 28px 36px 72px;
    position: relative;
    overflow: hidden
}

.lib-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 145, 58, .12) 0%, transparent 70%)
}

.lib-hero h1 {
    font-family: 'Fraunces', serif;
    font-size: 26px;
    font-weight: 800;
    position: relative;
    z-index: 1
}

.lib-hero p {
    font-size: 13px;
    opacity: .7;
    position: relative;
    z-index: 1
}

.lib-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 1
}

.tok-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px)
}

.tok-icon {
    width: 28px;
    height: 28px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px
}

.search-wrap {
    max-width: 660px;
    margin: -28px auto 0;
    position: relative;
    z-index: 10;
    padding: 0 36px
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: var(--r);
    padding: 13px 18px;
    box-shadow: var(--shl);
    border: 2px solid transparent;
    transition: .2s
}

.search-bar:focus-within {
    border-color: var(--blue)
}

.search-bar svg {
    width: 20px;
    height: 20px;
    color: var(--t2);
    flex-shrink: 0
}

.search-bar input {
    flex: 1;
    border: 0;
    outline: 0;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: 0
}

.search-bar input::placeholder {
    color: var(--t2)
}

.filter-area {
    padding: 18px 36px 0
}

.type-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--bdr);
    margin-bottom: 14px
}

.ttab {
    padding: 9px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--t2);
    cursor: pointer;
    border: 0;
    background: 0;
    font-family: inherit;
    position: relative;
    transition: .2s;
    display: flex;
    align-items: center;
    gap: 5px
}

.ttab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: .2s
}

.ttab:hover {
    color: var(--text)
}

.ttab.act {
    color: var(--side)
}

.ttab.act::after {
    background: var(--side)
}

.ttab svg {
    width: 15px;
    height: 15px
}

.ttab .tc {
    background: var(--bg);
    color: var(--t2);
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700
}

.ttab.act .tc {
    background: var(--side);
    color: #fff
}

.theme-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px
}

.tpill {
    padding: 5px 12px;
    border-radius: 18px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid var(--bdr);
    background: #fff;
    color: var(--t2);
    transition: .15s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 4px
}

.tpill:hover {
    border-color: var(--t2);
    color: var(--text)
}

.tpill.act {
    background: var(--side);
    color: #fff;
    border-color: var(--side)
}

.tpill .pd {
    width: 5px;
    height: 5px;
    border-radius: 50%
}

.approach-pills {
    display: flex;
    gap: 5px;
    margin-bottom: 16px
}

.apill {
    padding: 4px 11px;
    border-radius: 14px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid var(--bdr);
    background: #fff;
    color: var(--t2);
    transition: .15s;
    font-family: inherit
}

.apill:hover {
    border-color: var(--purple);
    color: var(--purple)
}

.apill.act {
    background: var(--purple-bg);
    color: var(--purple-t);
    border-color: var(--purple)
}

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

.result-count {
    font-size: 12px;
    color: var(--t2)
}

.result-count strong {
    color: var(--text)
}

.sort-select {
    padding: 5px 10px;
    border: 1.5px solid var(--bdr);
    border-radius: var(--rs);
    font-size: 11px;
    font-family: inherit;
    cursor: pointer
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    padding: 0 36px 36px
}

.ccard {
    background: #fff;
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--sh);
    transition: .25s;
    border: 1.5px solid transparent
}

.ccard:hover {
    transform: translateY(-3px);
    box-shadow: var(--shl);
    border-color: rgba(27, 42, 74, .12)
}

.cc-cover {
    height: 120px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center
}

.cc-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, .18);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px)
}

.cc-icon svg {
    width: 22px;
    height: 22px;
    color: rgba(255, 255, 255, .85)
}

.cc-type {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: rgba(255, 255, 255, .2);
    color: #fff;
    backdrop-filter: blur(6px)
}

.cc-new {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent);
    color: #fff;
    padding: 2px 7px;
    border-radius: 7px;
    font-size: 9px;
    font-weight: 700
}

.cc-body {
    padding: 14px
}

.cc-body h3 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 3px;
    line-height: 1.3
}

.cc-desc {
    font-size: 11px;
    color: var(--t2);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.cc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-bottom: 8px
}

.cc-tag {
    padding: 1px 7px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
    background: var(--bg);
    color: var(--t2)
}

.cc-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px
}

.cc-meta-item {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: var(--t2);
    font-weight: 500
}

.cc-meta-item svg {
    width: 12px;
    height: 12px
}

.cc-cost {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px
}

.cc-cost.paid {
    color: var(--blue-t);
    background: var(--blue-bg)
}

.cc-cost.free {
    color: var(--green-t);
    background: var(--green-bg)
}

.cc-actions {
    display: flex;
    gap: 6px
}

.cc-btn {
    flex: 1;
    padding: 8px 6px;
    border-radius: var(--rs);
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: .15s
}

.cc-btn.open {
    background: var(--side);
    color: #fff
}

.cc-btn.open:hover {
    background: #253757
}

.cc-btn.dl {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--bdr)
}

.cc-btn.dl:hover {
    background: var(--bdr)
}

.cc-btn.fr {
    background: var(--green-bg);
    color: var(--green-t)
}

.cc-btn svg {
    width: 13px;
    height: 13px
}

/* GRADIENTS */
.g-blue {
    background: linear-gradient(135deg, #3B82F6, #1D4ED8)
}

.g-green {
    background: linear-gradient(135deg, #10B981, #047857)
}

.g-purple {
    background: linear-gradient(135deg, #8B5CF6, #6D28D9)
}

.g-orange {
    background: linear-gradient(135deg, #F59E0B, #D97706)
}

.g-red {
    background: linear-gradient(135deg, #EF4444, #B91C1C)
}

.g-navy {
    background: linear-gradient(135deg, #1B2A4A, #2E4470)
}

.g-teal {
    background: linear-gradient(135deg, #14B8A6, #0E7490)
}

.g-pink {
    background: linear-gradient(135deg, #EC4899, #BE185D)
}

.g-slate {
    background: linear-gradient(135deg, #475569, #334155)
}

.g-indigo {
    background: linear-gradient(135deg, #6366F1, #4338CA)
}

/* THEME DOTS */
.d-anx {
    background: #EF4444
}

.d-emo {
    background: #F59E0B
}

.d-com {
    background: #3B82F6
}

.d-est {
    background: #8B5CF6
}

.d-cri {
    background: #DC2626
}

.d-plc {
    background: #14B8A6
}

.d-tra {
    background: #475569
}

.d-pro {
    background: #10B981
}

.d-deu {
    background: #78716C
}

.d-res {
    background: #0EA5E9
}

/* ===== DOCUMENT VIEWER OVERLAY ===== */
.viewer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(4px);
    align-items: stretch;
    justify-content: center
}

.viewer-overlay.open {
    display: flex
}

.viewer-panel {
    display: flex;
    width: 95%;
    max-width: 1200px;
    margin: 20px auto;
    background: #fff;
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .3)
}

.viewer-sidebar-panel {
    width: 280px;
    background: var(--bg);
    border-right: 1px solid var(--bdr);
    padding: 24px;
    overflow-y: auto;
    flex-shrink: 0
}

.viewer-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #E8E8E8
}

.viewer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid var(--bdr)
}

.viewer-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px
}

.viewer-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px
}

.viewer-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg);
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .15s;
    font-size: 18px;
    color: var(--t2)
}

.viewer-close:hover {
    background: var(--red-bg);
    color: var(--red)
}

.viewer-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: auto
}

.viewer-page {
    background: #fff;
    width: 595px;
    min-height: 750px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
    position: relative
}

.viewer-page h2 {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--side);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--accent)
}

.viewer-page p {
    font-size: 13px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 10px
}

.viewer-page .vp-section {
    font-size: 15px;
    font-weight: 700;
    color: var(--side);
    margin: 18px 0 8px
}

.viewer-page .vp-bullet {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 6px
}

.viewer-page .vp-bullet::before {
    content: '•';
    color: var(--accent);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.4
}

.viewer-page .vp-watermark {
    position: absolute;
    bottom: 16px;
    right: 20px;
    font-size: 9px;
    color: #ccc;
    font-weight: 600
}

.viewer-info h3 {
    font-family: 'Fraunces', serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px
}

.viewer-info .vi-meta {
    font-size: 12px;
    color: var(--t2);
    margin-bottom: 16px
}

.viewer-info .vi-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 16px
}

.viewer-info .vi-tag {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: var(--bg);
    color: var(--t2)
}

.viewer-info .vi-section {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--t2);
    font-weight: 700;
    margin: 16px 0 6px
}

.viewer-toc {
    list-style: none;
    padding: 0
}

.viewer-toc li {
    padding: 8px 10px;
    font-size: 12px;
    border-radius: var(--rs);
    cursor: pointer;
    transition: .1s;
    color: var(--text);
    font-weight: 500
}

.viewer-toc li:hover {
    background: #fff
}

.viewer-toc li.act {
    background: #fff;
    font-weight: 700;
    color: var(--side);
    border-left: 3px solid var(--accent);
    padding-left: 7px
}

.viewer-dl-box {
    background: #fff;
    border-radius: var(--rs);
    padding: 14px;
    margin-top: 16px;
    text-align: center
}

.viewer-dl-box .cost {
    font-size: 18px;
    font-weight: 800;
    color: var(--side);
    margin-bottom: 4px
}

.viewer-dl-box .eq {
    font-size: 11px;
    color: var(--t2);
    margin-bottom: 10px
}