/*
    thecodesales stylesheet
    Created on : 18-Apr-2020 by Kodly, refreshed November 2026.
    All class names are unchanged; colours, spacing and type come from the tokens below.
*/

/* ===================== TOKENS ===================== */
:root{
    --navy-950: #0F1524;
    --navy-900: #141B2D;
    --navy-800: #1C2336;
    --navy-700: #202A3D;
    --navy-600: #2C3852;

    --accent: #4F6BFF;
    --accent-hover: #3A55E6;
    --accent-soft: #EEF1FF;

    --bg: #F3F5F9;
    --surface: #FFFFFF;
    --surface-muted: #F7F8FB;
    --border: #E3E7EF;
    --border-strong: #CBD2DF;

    --text: #1A2133;
    --text-muted: #667085;
    --text-on-dark: #E6E9F2;
    --text-on-dark-muted: #A7AFC4;

    --success: #15803D;
    --success-soft: #ECFDF3;
    --danger: #C62828;
    --danger-soft: #FEF2F2;
    --warning: #B45309;
    --warning-soft: #FFFBEB;
    --info: #1D4ED8;
    --info-soft: #EFF6FF;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 4px 12px rgba(16, 24, 40, 0.05);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.14);

    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --container: 1200px;
}

/* ===================== BASE ===================== */
*{
    box-sizing: border-box;
}

html, body{
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body{
    position: relative;
}

body::-webkit-scrollbar{
    width: 10px;
}

body::-webkit-scrollbar-thumb{
    background-color: var(--border-strong);
    border-radius: 10px;
}

h1, h2, h3, h4, h5, h6{
    color: inherit;
    line-height: 1.3;
    margin: 0 0 0.5em;
}

h1{
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h4{
    font-weight: 600;
}

h5, h6{
    font-weight: 500;
    color: var(--text-muted);
}

p{
    margin: 0 0 0.75em;
}

a{
    color: var(--accent);
    text-decoration: none;
    font-size: inherit;
    transition: color 0.15s ease, background-color 0.15s ease;
}

a:hover{
    color: var(--accent-hover);
}

span{
    font-size: inherit;
}

hr{
    border: none;
    border-bottom: 1px solid var(--border);
    width: 100%;
    margin: 12px 0;
    padding: 0;
}

img{
    max-width: 100%;
}

kbd{
    background-color: var(--navy-800);
    color: var(--text-on-dark);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.85em;
    word-break: break-all;
}

iframe{
    border: none;
}

:focus-visible{
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ===================== NAVBAR ===================== */
nav{
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 8px;
    padding: 0 max(16px, calc((100% - var(--container)) / 2));
}

nav ul{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    margin: 0;
    padding: 0;
}

nav a{
    font-size: 0.9rem;
    display: inline-flex !important;
    align-items: center;
}

nav.bg-dark{
    justify-content: flex-start;
    min-height: 64px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 2px 12px rgba(0, 0, 0, 0.18);
}

/* links sit after the logo; the account area is pushed to the right */
nav.bg-dark > ul:first-of-type{
    margin-left: 16px;
}

nav.bg-dark > ul:last-of-type{
    margin-left: auto;
}

nav.bg-dark ul a,
nav.bg-dark .dropbtn{
    color: var(--text-on-dark-muted);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

nav.bg-dark ul a:hover,
nav.bg-dark .dropbtn:hover{
    color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.07);
}

nav.bg-light{
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    min-height: 48px;
}

nav.bg-light ul a,
nav.bg-light .dropbtn{
    color: var(--text);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

nav.bg-light ul a:hover,
nav.bg-light .dropbtn:hover{
    background-color: var(--surface-muted);
    color: var(--accent);
}

.nav-brand{
    max-width: 100%;
    height: 100%;
    padding: 12px 0;
    vertical-align: middle;
}

.nav-brand img{
    display: block;
    height: auto;
}

/* ===================== LAYOUT ===================== */
.content{
    min-height: 100%;
}

.container-fluid{
    width: 100%;
    max-width: var(--container);
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px 40px;
    position: relative;
}

.container{
    padding-right: 16px;
    padding-left: 16px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 1170px;
}

/* the last home-page section has height:100% inline, which left a screen of empty space */
.container-fluid[style*="height"]{
    height: auto !important;
}

/* section titles on the home page, e.g. "Featured Items" */
.container-fluid > h1{
    font-size: 1.4rem;
    margin: 36px 0 16px;
}

.container-fluid > h1 span + span{
    color: var(--text-muted);
    font-weight: 600;
}

.row{
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    margin: 0 -8px;
    width: calc(100% + 16px);
}

.col,
.col-auto,
.col-1,
.col-2{
    height: auto;
    padding: 0 8px 16px;
    min-width: 0;
}

.col{
    flex: 1 1 25%;
    min-width: 25%;
}

.col-auto{
    flex: 0 0 auto;
    width: auto;
    margin-left: auto;
    margin-right: auto;
}

.col-1{
    flex: 1 1 70%;
    min-width: 0;
}

.col-2{
    flex: 1 1 50%;
    min-width: 50%;
}

/* item page and category page: main column + sidebar */
.col-1 + .col{
    flex: 0 0 30%;
    min-width: 260px;
}

@media (max-width: 828px){
    .row{
        display: block;
        margin: 0;
        width: 100%;
    }

    .col, .col-1, .col-2, .col-1 + .col{
        width: 100%;
        min-width: 0;
        padding: 0 0 16px;
    }

    .container-fluid{
        padding: 0 16px 32px;
    }
}

/* ===================== HEADERS / HERO ===================== */
.cover{
    width: 100%;
    position: relative;
    background-image:
        linear-gradient(180deg, rgba(15, 21, 36, 0.72) 0%, rgba(15, 21, 36, 0.88) 100%),
        url("../../template/images/header-dark.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 56px 0 64px;
}

.cover .container-fluid{
    padding-bottom: 0;
    text-align: center;
}

.cover .heading{
    display: block;
    font-size: clamp(1.7rem, 3.4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    max-width: 760px;
    margin: 0 auto;
}

div.header div.cover div.container-fluid{
    width: 50% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.bg-header{
    width: 100%;
    padding: 32px max(24px, calc((100% - var(--container)) / 2 + 24px));
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.bg-header .container-fluid{
    padding: 0;
}

.bg-header .heading{
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.bg-header h5{
    font-size: 1rem;
    margin: 0;
}

.profile-header{
    background-image: url("../../template/images/advert.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: block;
}

.profile-picture{
    border: 3px solid white;
    z-index: 2;
    border-radius: var(--radius);
    vertical-align: middle;
    margin-right: 20px;
    box-shadow: var(--shadow);
}

.image-d{
    float: left;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    height: 80px;
    width: 80px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.heading{
    font-family: var(--font);
    font-size: 1.5em;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.container .heading{
    color: var(--text-on-dark);
}

small.heading{
    font-size: 1.1em;
}

.marketplace{
    line-height: 1.4;
}

.h-hd{
    height: 240px;
}

.h-wdt{
    width: 100%;
    max-width: 1140px;
}

.m-n{
    margin-top: -50px;
}

@media (max-width: 828px){
    .h-hd{
        height: 120px;
    }

    .cover{
        padding: 40px 0 44px;
    }

    div.header div.cover div.container-fluid{
        width: 100% !important;
    }
}

/* ===================== UTILITIES ===================== */
.img-fluid{
    max-width: 100%;
    height: auto;
}

.screenshot-box{
    padding: 0 5px 10px;
}

.w-100{
    width: 100% !important;
}

.float-left{
    float: left;
}

.float-right{
    float: right;
}

.clear{
    clear: both;
}

.p-10{
    padding: 16px !important;
}

.p-l-5{
    padding: 5px !important;
}

.m-20{
    margin-left: 20px;
}

.p-30{
    padding: 30px !important;
}

.p-l-10{
    padding-left: 10px;
}

.m-50{
    margin-left: 40px;
}

.rounded-circle{
    border-radius: 50%;
}

.inline{
    display: inline-block;
}

.strong{
    font-weight: 700;
}

.s-t{
    font-size: 0.85rem;
    padding-left: 0;
    color: var(--text-muted);
    font-weight: 500;
}

h1.s-t, h3.s-t{
    font-size: 1rem;
    color: var(--text);
    font-weight: 700;
}

/* ===================== TEXT ===================== */
.text-white{
    color: white;
}

.text-right{
    text-align: right;
}

.text-center{
    text-align: center;
}

.text-left{
    text-align: left;
}

.text-danger{
    color: var(--danger) !important;
}

.text-success{
    color: var(--success) !important;
}

/* ===================== TABS / LINKS ===================== */
.link{
    padding-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.link a{
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 500;
    margin-right: 4px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border-bottom: 2px solid transparent;
}

.link a:hover{
    color: var(--text);
    background-color: var(--surface-muted);
    border-bottom-color: transparent;
}

.active{
    font-weight: 600;
    border-bottom: 2px solid var(--accent);
}

.link a.active{
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.container a:hover{
    color: var(--accent);
}

.menu{
    display: inline-block;
    font-size: 0.95rem !important;
    color: var(--text);
    padding: 4px 6px;
    border-radius: var(--radius-sm);
}

.menu:hover{
    color: var(--accent);
    background-color: var(--surface-muted);
}

.menu.active{
    border: 0 !important;
    color: var(--accent);
}

/* ===================== TABLES ===================== */
table{
    border-spacing: 0;
}

.table{
    width: 100%;
    overflow-x: auto;
}

.table::-webkit-scrollbar{
    height: 8px;
    background-color: var(--surface-muted);
}

.table::-webkit-scrollbar-thumb{
    background-color: var(--border-strong);
    border-radius: 8px;
}

.table table{
    width: 100%;
}

table.fullborder,
table.borderless{
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.fullborder th, .fullborder td,
.borderless th, .borderless td{
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
}

table.fullborder, .fullborder td, .fullborder th{
    border: 1px solid var(--border);
}

.borderless tr{
    border-bottom: 1px solid var(--border);
}

.fullborder th, .borderless th{
    background-color: var(--surface-muted);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fullborder tr:nth-child(even),
.borderless tr:nth-child(even){
    background-color: var(--surface-muted);
}

.table-border{
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* ===================== BADGES ===================== */
.badge{
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-secondary{
    background-color: var(--text-muted);
}

/* ===================== PAGINATION ===================== */
.pagination{
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-left: 0;
    list-style: none;
}

.page-link{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background-color: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

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

.page-item.active{
    border: 0;
}

.disabled{
    pointer-events: none;
    opacity: 0.5;
}

.active .page-link{
    color: white;
    pointer-events: none;
    background-color: var(--accent);
    border-color: var(--accent);
}

.active .page-link:hover{
    color: white;
}

/* ===================== BUTTONS ===================== */
.button{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 2px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background-color: var(--surface);
    color: var(--text) !important;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.button:active{
    transform: translateY(1px);
}

.button-secondary{
    border-color: var(--border-strong);
    color: var(--text) !important;
    background-color: var(--surface);
}

.button-secondary:hover{
    background-color: var(--surface-muted);
    border-color: var(--text-muted);
}

.button-primary{
    color: white !important;
    background-color: var(--accent);
    border-color: var(--accent);
}

.button-primary:hover{
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

.button-warning{
    color: white !important;
    background-color: #D97706;
    border-color: #D97706;
}

.button-warning:hover{
    background-color: #B45309;
}

.button-success{
    color: white !important;
    background-color: var(--success);
    border-color: var(--success);
}

.button-success:hover{
    background-color: #166534;
}

.button-danger{
    color: white !important;
    background-color: var(--danger);
    border-color: var(--danger);
}

.button-danger:hover{
    background-color: #A61B1B;
}

.table .button{
    padding: 8px 12px !important;
}

/* ===================== PANELS / CARDS ===================== */
.panel{
    width: 100%;
    background-color: var(--surface);
    display: inline-block;
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    vertical-align: top;
}

.panel-body{
    padding: 14px 16px;
}

.panel-body h1, .panel-body h1 span{
    font-size: 1rem !important;
    padding: 0 !important;
}

.panel-body a:hover{
    color: var(--accent-hover);
}

.panel-header{
    background-color: var(--surface-muted);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    max-width: 100%;
    padding: 12px 16px;
}

.panel-footer{
    max-width: 100%;
    padding: 12px 16px;
}

.panel-footer a{
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.panel-footer a:hover{
    color: var(--accent);
}

.price{
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted) !important;
    text-decoration: line-through;
    text-decoration-color: var(--danger);
}

.col-price{
    width: 15%;
    display: inline-block;
    margin-top: 20%;
}

.col-price .panel{
    border-top: 4px solid var(--accent);
}

.col-items{
    width: 23%;
    display: inline-flex;
    margin: 0 5px;
    padding-bottom: 15px;
}

.content .col-items{
    width: 30% !important;
    margin-left: 0 !important;
    margin-right: 11px !important;
}

@media (max-width: 1200px){
    .col-items{ width: 30%; }
    .col-price{ width: 30%; }
    .content .col-items{ width: 30% !important; }
}

@media (max-width: 828px){
    .col-items{ width: 100%; }
    .col-price{ width: 100%; }
    .content .col-items{ width: 100% !important; }
}

/* ===================== ITEM CARDS ===================== */
.row > .item-card{
    flex: 0 0 25%;
    min-width: 0;
    max-width: 25%;
    display: flex;
}

/* category page: narrow categories sidebar, items take the rest */
.row:has(> .col > .row > .item-card) > .col:first-child{
    flex: 0 0 260px;
    min-width: 0;
}

.row:has(> .col > .row > .item-card) > .col:last-child{
    flex: 1 1 0;
    min-width: 0;
}

/* item cards inside the category page's main column */
.col .row > .item-card{
    flex-basis: 33.333%;
    max-width: 33.333%;
}

.item-card .panel{
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.item-card .panel > a:first-child{
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--surface-muted);
}

.item-card .panel > a:first-child .img-fluid{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* the markup sets height:100% inline on the body and footer, which leaves a big empty gap */
.item-card .panel-body,
.item-card .panel-footer{
    height: auto !important;
}

.item-card .panel-body{
    flex: 1;
    padding: 12px 14px 4px;
}

.item-card .panel-body br{
    display: none;
}

.item-card .panel-body::after{
    content: "";
    display: block;
    clear: both;
}

.item-card h4{
    text-align: left;
    font-size: 1rem;
    margin: 0 0 10px;
}

.item-card h4 a{
    color: var(--text);
}

.item-card h4 a:hover{
    color: var(--accent);
}

.item-card .panel-body .button{
    padding: 6px 9px;
    font-size: 0.8rem;
}

.item-card .panel-body .float-right{
    line-height: 32px;
}

.item-card .panel-body .float-right img{
    vertical-align: middle;
}

.item-card hr{
    margin: 8px 0 0;
}

.item-card .panel-footer{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px 12px;
}

.item-card .panel-footer > a:first-child{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-card .panel-footer .price{
    margin-left: auto;
}

.item-card .panel-footer .button{
    margin: 0;
    padding: 6px 12px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

@media (max-width: 1100px){
    .row > .item-card,
    .col .row > .item-card{
        flex-basis: 33.333%;
        max-width: 33.333%;
    }
}

@media (max-width: 900px){
    .row > .item-card,
    .col .row > .item-card{
        flex-basis: 50%;
        max-width: 50%;
    }
}

@media (max-width: 828px){
    .row:has(> .item-card){
        display: flex;
        margin: 0 -6px;
        width: calc(100% + 12px);
    }

    .row > .item-card,
    .col .row > .item-card{
        padding: 0 6px 12px;
    }
}

@media (max-width: 520px){
    .row > .item-card,
    .col .row > .item-card{
        flex-basis: 100%;
        max-width: 100%;
    }
}

/* ===================== FORMS ===================== */
.form-group{
    width: 100%;
    padding: 12px 0;
}

.panel .form-group{
    padding: 10px 0;
}

.form-group button.button{
    padding: 11px 20px;
}

textarea{
    resize: vertical;
    font-family: var(--font);
}

.form-item{
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    min-width: 85%;
    max-width: 100%;
    padding: 10px 12px;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-item::placeholder{
    color: #98A2B3;
}

.form-item:focus{
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 107, 255, 0.18);
    background-color: var(--surface);
}

select.form-item{
    cursor: pointer;
}

.form-caption{
    display: inline-block;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding-right: 8px;
    margin-bottom: 6px;
}

input[type="checkbox"]{
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* hero search */
.cover form{
    max-width: 680px;
    margin: 28px auto 0;
}

.cover .form-group{
    display: flex;
    gap: 8px;
    padding: 0 !important;
}

.cover .form-item,
.form-icon{
    flex: 1;
    float: none;
    width: auto !important;
    min-width: 0;
}

.cover .form-item{
    padding: 14px 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: var(--radius) !important;
    background-color: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    font-size: 1rem !important;
    backdrop-filter: blur(4px);
}

.cover .form-item::placeholder{
    color: rgba(255, 255, 255, 0.7);
}

.cover .form-item:focus{
    background-color: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(79, 107, 255, 0.35);
}

.cover .form-group .button{
    margin: 0;
    padding: 0 22px;
    border-radius: var(--radius);
    background-color: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF !important;
}

.cover .form-group .button:hover{
    background-color: var(--accent-hover);
}

.cover .button-primary{
    margin-top: 8px;
}

/* ===================== FOOTER ===================== */
footer{
    position: relative;
    width: 100%;
    margin-top: 48px;
}

footer .bg-dark{
    padding: 48px max(24px, calc((100% - var(--container)) / 2 + 24px));
    color: var(--text-on-dark);
}

footer .bg-dark .row{
    margin: 0;
    width: 100%;
    gap: 24px;
}

footer .bg-dark .col{
    padding: 0;
    flex: 1 1 200px;
    min-width: 0;
}

footer .bg-blue{
    padding: 16px 24px;
    color: var(--text-on-dark-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    font-size: 0.85rem;
}

footer .bg-blue p{
    margin: 0;
}

footer h1{
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #FFFFFF;
    margin-bottom: 14px;
}

footer h1 .text-danger{
    color: var(--accent) !important;
    font-size: 1.5rem;
    letter-spacing: 0;
    margin-right: 6px;
    vertical-align: middle;
}

footer .bg-dark a{
    color: var(--text-on-dark-muted);
    font-size: 0.92rem;
}

footer .bg-dark a:hover{
    color: #FFFFFF;
}

footer span.br{
    display: block;
    margin-bottom: 8px;
}

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

.dropbtn{
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    border: none;
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text-muted);
    background-color: transparent;
}

.dropdown-content{
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background-color: var(--surface);
    text-align: left !important;
    min-width: 200px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

/* account and notification menus open towards the left, so they stay on screen */
nav.bg-dark .dropdown-content{
    left: auto;
    right: 0;
}

#notifications{
    min-width: 280px;
    max-height: 420px;
    overflow-y: auto;
}

.dropdown-content a{
    color: var(--text) !important;
    float: none;
    padding: 9px 12px !important;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.dropdown-content a:hover{
    background-color: var(--surface-muted) !important;
    color: var(--accent) !important;
}

.dropdown-content hr{
    margin: 6px 0;
}

.dropdown-content.sorter a{
    color: var(--text) !important;
    font-weight: 600;
    padding: 6px 10px !important;
    display: inline-flex !important;
}

.show{
    display: block;
}

/* ===================== BACKGROUNDS ===================== */
.bg-dark{
    background-color: var(--navy-700);
}

.bg-blue{
    background-color: var(--navy-900);
}

.bg-light{
    background-color: var(--surface);
}

/* ===================== ALERTS ===================== */
.alert{
    padding: 14px 18px;
    margin: 16px auto;
    max-width: calc(var(--container) - 48px);
    border-radius: var(--radius);
    border: 1px solid transparent;
    border-left-width: 4px;
    color: var(--text);
    font-weight: 500;
}

.alert-success{
    background-color: var(--success-soft);
    border-color: #BBF7D0;
    border-left-color: var(--success);
}

.alert-danger{
    background-color: var(--danger-soft);
    border-color: #FECACA;
    border-left-color: var(--danger);
}

.alert-info{
    background-color: var(--info-soft);
    border-color: #BFDBFE;
    border-left-color: var(--info);
}

.alert-warning{
    background-color: var(--warning-soft);
    border-color: #FDE68A;
    border-left-color: #D97706;
}

.closebtn{
    margin-left: 15px;
    color: var(--text-muted);
    font-weight: 700;
    float: right;
    font-size: 22px;
    line-height: 20px;
    cursor: pointer;
    transition: color 0.15s;
}

.closebtn:hover{
    color: var(--text);
}

/* ===================== COOKIE BANNER ===================== */
.cookie-banner{
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    max-width: 1100px;
    margin: 0 auto;
    background-color: var(--navy-800);
    color: var(--text-on-dark);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.cookie-banner[hidden]{
    display: none;
}

.cookie-banner-inner{
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.cookie-banner-text{
    flex: 1;
}

.cookie-banner-text strong{
    color: white;
    font-size: 1rem;
}

.cookie-banner-text p{
    margin: 4px 0 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-on-dark-muted);
}

.cookie-banner-text a{
    color: white;
    text-decoration: underline;
}

.cookie-banner-actions{
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cookie-banner-actions .button{
    min-width: 130px;
    margin: 0;
    padding: 10px 16px;
}

.cookie-banner-actions .button-secondary{
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.3);
    color: white !important;
}

.cookie-banner-actions .button-secondary:hover{
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 700px){
    .cookie-banner{
        left: 8px;
        right: 8px;
        bottom: 8px;
    }

    .cookie-banner-inner{
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .cookie-banner-actions .button{
        flex: 1;
        min-width: 0;
    }
}

/* ===================== PRIVACY POLICY ===================== */
.policy{
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 28px !important;
    line-height: 1.7;
    text-align: left;
}

.policy .heading{
    font-size: 1.9rem !important;
}

.policy h2{
    font-size: 1.2rem;
    margin: 32px 0 10px;
    scroll-margin-top: 90px;
}

.policy h3{
    font-size: 1rem;
    margin: 18px 0 6px;
}

.policy ul{
    padding-left: 20px;
}

.policy li{
    margin-bottom: 4px;
}

.policy a{
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.policy-updated{
    color: var(--text-muted);
    font-size: 0.9rem;
}

.policy-toc{
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin: 16px 0 8px;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.policy-toc a{
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: var(--surface-muted);
    border: 1px solid var(--border);
}

.policy-toc a:hover{
    color: var(--accent);
    border-color: var(--accent);
}

.policy-table{
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 14px;
    font-size: 0.9rem;
}

.policy-table th,
.policy-table td{
    border: 1px solid var(--border);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.policy-table th{
    background-color: var(--surface-muted);
    font-weight: 600;
}

@media (max-width: 700px){
    .policy{
        padding: 18px 16px !important;
    }

    .policy-table{
        display: block;
        overflow-x: auto;
    }
}

/* ===================== SHARED: CHIPS, HEADERS, HELPERS ===================== */
.text-muted{ color: var(--text-muted); }
.text-nowrap{ white-space: nowrap; }
.badge-primary{ background-color: var(--accent); color: #fff; }

.chip{
    display: inline-block;
    padding: 2px 9px;
    margin: 2px 0;
    border-radius: 999px;
    background-color: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.8rem;
    line-height: 1.6;
    white-space: nowrap;
}

a.chip-link{ text-decoration: none; }
a.chip-link:hover{ border-color: var(--accent); color: var(--accent); }

.page-header{
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: var(--text-on-dark);
    padding: 28px 0 24px;
    margin-bottom: 24px;
}

.page-header .heading{
    color: #fff;
    font-size: 1.75rem;
    margin: 4px 0 6px;
}

.page-header p{
    color: var(--text-on-dark-muted);
    margin: 0;
    max-width: 720px;
}

.breadcrumb{
    font-size: 0.85rem;
    color: var(--text-on-dark-muted);
}

.breadcrumb a{ color: var(--text-on-dark); }
.breadcrumb a:hover{ color: #fff; }

.toolbar{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.toolbar h1{ margin: 0; }

.check{
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
    cursor: pointer;
    font-size: 0.92rem;
    line-height: 1.45;
}

.check input{ flex-shrink: 0; margin-top: 2px; }

.form-stack .form-group{ padding: 8px 0; }

.form-stack .form-item{
    display: block;
    width: 100%;
    min-width: 0;
}

.form-stack .form-caption{
    display: block;
    color: var(--text);
}

.form-stack small{ display: block; margin-top: 5px; font-size: 0.8rem; }

.req-star{ color: var(--danger); }

.error-list{ margin: 6px 0 0 18px; padding: 0; }

.empty-state{
    text-align: center;
    padding: 48px 20px;
    background-color: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
}

.empty-state h3{ color: var(--text); margin: 14px 0 6px; }
.empty-state .button{ margin: 10px 4px 0; }

/* ===================== HOME: SECTIONS + CATEGORY TILES ===================== */
.section-head{
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.section-link{
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--accent);
    text-decoration: none;
}

.category-tiles{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 8px;
}

.category-tile{
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.category-tile:hover{
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    color: var(--text);
}

.category-tile-icon{
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background-color: var(--accent-soft);
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 6px;
}

.category-tile-name{ font-weight: 700; }
.category-tile-count{ color: var(--text-muted); font-size: 0.85rem; }

/* ===================== CATEGORY BAR ===================== */
.category-bar ul{
    overflow-x: auto;
    scrollbar-width: none;
}

.category-bar ul::-webkit-scrollbar{ display: none; }
.category-bar ul > a.active{ color: var(--accent); }

/* the bar clips overflow, so its menus sit on the window (placed by dropdowns.js) */
.category-bar .dropdown-content{
    position: fixed;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

/* ===================== STORE ===================== */
.store-header .heading svg{ color: #9DB0FF; }

.subcat-chips{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.subcat-chip{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-on-dark);
    font-size: 0.88rem;
    text-decoration: none;
}

.subcat-chip:hover{ background-color: rgba(255, 255, 255, 0.16); color: #fff; }

.subcat-chip span{
    font-size: 0.75rem;
    padding: 0 6px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.14);
}

.store{
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.store-sidebar{
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.store-sidebar > *{ flex-shrink: 0; }
.store-sidebar .panel{ margin: 0; }

.sidebar-title{
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 10px;
}

summary.sidebar-title{
    display: block;
    list-style: none;
    cursor: pointer;
    padding: 14px 16px 0;
    margin: 0;
}

summary.sidebar-title::-webkit-details-marker{ display: none; }

.cat-tree{ list-style: none; margin: 0; padding: 0; }
.cat-tree-sub{ padding-left: 14px; border-left: 1px solid var(--border); margin: 2px 0 4px 12px; }

.cat-link{
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 8px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.92rem;
    text-decoration: none;
}

.cat-link:hover{ background-color: var(--surface-muted); color: var(--accent); }
.cat-link.active{ background-color: var(--accent-soft); color: var(--accent); font-weight: 600; }
.cat-link > span:first-of-type{ flex: 1; min-width: 0; }

.cat-count{
    font-size: 0.75rem;
    color: var(--text-muted);
    background-color: var(--surface-muted);
    border-radius: 999px;
    padding: 1px 8px;
}

.filter-form{ padding-top: 10px; }
.filter-group{ padding: 12px 0; border-bottom: 1px solid var(--border); }
.filter-group:last-of-type{ border-bottom: 0; }
.filter-group .form-item{ width: 100%; min-width: 0; }

.filter-title{
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 8px;
}

.filter-options{ max-height: 230px; overflow-y: auto; }
.filter-options .check > span:first-of-type{ flex: 1; }
.filter-options .check.is-empty{ color: var(--text-muted); }
.filter-count{ font-size: 0.75rem; color: var(--text-muted); }

.price-range{ display: flex; align-items: center; gap: 8px; }
.price-range .form-item{ padding: 8px 10px; }

.filter-actions{ display: flex; gap: 8px; padding-top: 14px; }
.filter-actions .button{ flex: 1; text-align: center; }

.store-toolbar{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.filter-chip{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0 2px 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background-color: var(--accent-soft);
    color: var(--accent);
    font-size: 0.8rem;
    text-decoration: none;
}

.filter-chip:hover{ background-color: var(--accent); color: #fff; }

.sort-form{ display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--text-muted); }
.sort-form .form-item{ min-width: 0; padding: 8px 10px; }

.store-grid{ margin: 0 -8px; }

.store-grid > .item-card{
    flex-basis: 33.333%;
    max-width: 33.333%;
}

.store-pagination{ display: flex; justify-content: center; margin-top: 12px; }

.card-text{
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.45;
    margin: -4px 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-card .card-category{
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.item-card .card-category:hover{ color: var(--accent); }

@media (max-width: 1100px){
    .store-grid > .item-card{ flex-basis: 50%; max-width: 50%; }
}

@media (max-width: 860px){
    .store{ grid-template-columns: 1fr; }
    .store-sidebar{ position: static; max-height: none; overflow: visible; }
    .store-filters:not([open]) summary{ padding-bottom: 14px; }
}

@media (max-width: 520px){
    .store-grid > .item-card{ flex-basis: 100%; max-width: 100%; }
    .store-toolbar{ flex-direction: column; align-items: stretch; }
    .sort-form .form-item{ flex: 1; }
}

/* ===================== UPLOAD / EDIT FORM ===================== */
.upload-form .panel{ margin-bottom: 18px; }

.upload-form .panel-header h1{
    display: flex;
    align-items: center;
    gap: 10px;
}

.step{
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: var(--accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.input-prefix{
    display: flex;
    align-items: stretch;
    max-width: 220px;
}

.input-prefix > span{
    display: grid;
    place-items: center;
    padding: 0 12px;
    border: 1px solid var(--border-strong);
    border-right: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background-color: var(--surface-muted);
    color: var(--text-muted);
}

.input-prefix .form-item{ border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.chip-group{ display: flex; flex-wrap: wrap; gap: 8px; }

.chip-check{ position: relative; cursor: pointer; }

.chip-check input{
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.chip-check span{
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background-color: var(--surface);
    font-size: 0.86rem;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip-check:hover span{ border-color: var(--accent); }

.chip-check input:checked + span{
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.chip-check input:checked + span::before{ content: "\2713  "; }
.chip-check input:focus-visible + span{ box-shadow: 0 0 0 3px rgba(79, 107, 255, 0.3); }

.requirements-box{
    border-top: 1px solid var(--border);
    margin-top: 6px;
    padding-top: 6px;
}

.req-field{ border-bottom: 1px dashed var(--border); padding-bottom: 14px !important; }

.custom-req-list{ display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.custom-req-list:empty{ display: none; }

.custom-req-row{
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
    gap: 8px;
}

.custom-req-row .form-item{ min-width: 0; width: 100%; }

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

.file-drop{
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    padding: 20px 14px;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    background-color: var(--surface-muted);
    color: var(--text-muted);
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.file-drop:hover,
.file-drop:focus-within{ border-color: var(--accent); background-color: var(--accent-soft); }
.file-drop.has-file{ border-style: solid; border-color: var(--success); background-color: var(--success-soft); }
.file-drop strong{ color: var(--text); }

/* the real input covers the box so clicks and drag-and-drop land on it */
.file-drop input[type="file"]{
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-name{
    font-size: 0.8rem;
    color: var(--text);
    word-break: break-all;
    margin-top: 4px;
}

.file-preview{
    width: 100%;
    aspect-ratio: 2 / 1;
    border-radius: var(--radius-sm);
    background: center / cover no-repeat;
    margin-bottom: 6px;
}

.file-preview-icon{ width: 64px; aspect-ratio: 1; }
.file-preview:not([style*="url"]){ display: none; }
.file-drop:has(.file-preview[style*="url"]) > svg{ display: none; }

.button-lg{ padding: 13px 24px !important; font-size: 1rem; }

@media (max-width: 640px){
    .file-grid{ grid-template-columns: 1fr; }
    .custom-req-row{ grid-template-columns: 1fr auto; }
    .custom-req-row input:first-child{ grid-column: 1 / -1; }
}

/* ===================== ADMIN ===================== */
.inline-form{ display: inline-block; }
.inline-form .form-item{ min-width: 260px; }

.admin-split{ align-items: flex-start; }
.admin-split > .col{ flex: 1 1 0; min-width: 0; }
.admin-split > .admin-split-side{ flex: 0 0 360px; position: sticky; top: 76px; }

.req-group-title{
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    margin: 6px 0 8px;
}

tr.row-active td{ background-color: var(--accent-soft); }

.input-with-preview{ display: flex; align-items: center; gap: 10px; }
.input-with-preview .form-item{ flex: 1; min-width: 0; }

.icon-preview{
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background-color: var(--accent-soft);
    color: var(--accent);
}

@media (max-width: 900px){
    .admin-split > .admin-split-side{ flex-basis: 100%; position: static; }
}
/* ===================== PROFILE ===================== */
.profile-page{ padding-bottom: 40px; }

.profile-hero{
    padding: 0;
    overflow: hidden;
    margin: 24px 0 24px;
}

.profile-cover{
    height: 200px;
    background: linear-gradient(120deg, var(--navy-900) 0%, var(--navy-700) 55%, var(--accent) 140%);
    background-size: cover;
    background-position: center;
}

.profile-head{
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 0 24px;
    margin-top: -56px;
}

.profile-avatar{
    width: 120px;
    height: 120px;
    flex: 0 0 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--surface);
    background-color: var(--surface-muted);
    box-shadow: var(--shadow);
}

.profile-ident{
    flex: 1 1 auto;
    min-width: 0;
    padding-bottom: 8px;
}

.profile-ident h1{
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text);
    overflow-wrap: anywhere;
}

.profile-handle{ color: var(--text-muted); font-size: 0.95rem; }

.profile-actions{ padding-bottom: 12px; }
.profile-actions form{ margin: 0; }

.profile-tabs{
    display: flex;
    gap: 4px;
    padding: 16px 16px 0;
    margin-top: 16px;
    border-top: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}

.profile-tabs::-webkit-scrollbar{ display: none; }

.profile-tabs a{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px 12px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}

.profile-tabs a:hover{ color: var(--text); }
.profile-tabs a.active{ color: var(--accent); border-bottom-color: var(--accent); }

.tab-count{
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background-color: var(--surface-muted);
    color: var(--text-muted);
    font-size: 0.78rem;
    text-align: center;
}

.profile-tabs a.active .tab-count{ background-color: var(--accent); color: #fff; }

.profile-box{ padding: 18px; }
.profile-about{ margin: 0; line-height: 1.6; overflow-wrap: anywhere; }

.profile-facts{
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 12px;
    margin: 0;
    font-size: 0.9rem;
}

.profile-facts dt{ color: var(--text-muted); white-space: nowrap; }
.profile-facts dt i{ width: 16px; text-align: center; margin-right: 4px; }
.profile-facts dd{ margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }

.profile-socials{ display: flex; flex-wrap: wrap; gap: 8px; }

.profile-socials a{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background-color: var(--surface-muted);
    color: var(--text);
    font-size: 1.1rem;
}

.profile-socials a:hover{ background-color: var(--accent); color: #fff !important; }

/* followers / following */
.user-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.user-card{
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 16px;
    margin: 0;
    overflow: hidden;
    text-align: center;
    color: var(--text);
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}

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

.user-card-cover{
    align-self: stretch;
    height: 70px;
    background: linear-gradient(120deg, var(--navy-900), var(--navy-700));
    background-size: cover;
    background-position: center;
}

.user-card-avatar{
    width: 64px;
    height: 64px;
    margin-top: -32px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--surface);
    background-color: var(--surface-muted);
}

.user-card-name{ margin-top: 8px; font-weight: 700; padding: 0 10px; overflow-wrap: anywhere; }
.user-card-handle{ color: var(--text-muted); font-size: 0.85rem; }
.user-card-meta{ margin-top: 8px; color: var(--text-muted); font-size: 0.8rem; }

@media (max-width: 640px){
    .profile-cover{ height: 130px; }
    .profile-head{ flex-direction: column; align-items: center; text-align: center; gap: 10px; margin-top: -50px; padding: 0 16px; }
    .profile-avatar{ width: 100px; height: 100px; flex-basis: 100px; }
    .profile-ident{ padding-bottom: 0; }
    .profile-actions{ padding-bottom: 0; }
    .profile-tabs{ padding: 12px 8px 0; }
    .user-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* ===================== FEATURED ===================== */
.featured-page{ padding-bottom: 40px; }
.featured-page .page-header strong{ color: #fff; }

.featured-layout{
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
    max-width: 960px;
}

.featured-layout > .panel{ margin: 0; padding: 22px; }
.featured-layout > .panel:only-child{ grid-column: 1 / -1; max-width: 620px; }
.featured-form .form-group{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 16px;
}

.featured-form .form-group .form-item{ width: 100%; margin: 0; }
.featured-form .form-caption{ margin: 0; text-align: left; }

.featured-estimate{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
    background-color: var(--surface-muted);
    color: var(--text-muted);
}

.featured-estimate strong{ color: var(--text); font-size: 1.25rem; }

.featured-summary .profile-facts{ margin-bottom: 18px; }
.featured-summary .featured-total{ padding-top: 10px; border-top: 1px solid var(--border); color: var(--text); font-size: 1.05rem; }
.featured-summary dd.featured-total{ color: var(--accent); }
.featured-summary small{ display: block; margin-top: 10px; text-align: center; }

@media (max-width: 860px){
    .featured-layout{ grid-template-columns: 1fr; }
}

/* ===================== PAYMENTS ===================== */
.chip-success{ background-color: rgba(22, 163, 74, 0.12); color: #15803d; border-color: transparent; }
.chip-warning{ background-color: rgba(234, 179, 8, 0.16); color: #a16207; border-color: transparent; }
.chip-danger{ background-color: rgba(220, 38, 38, 0.12); color: #b91c1c; border-color: transparent; }

.pay-modal{
    width: min(420px, calc(100vw - 32px));
    padding: 28px 24px 20px;
    position: relative;
    text-align: center;
}

.pay-modal .close{
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: none;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
}

.pay-title{ margin: 0 0 4px; font-size: 1.1rem; overflow-wrap: anywhere; }
.pay-amount{ margin: 0 0 18px; font-size: 2rem; font-weight: 800; color: var(--text); }
.pay-modal form{ margin: 0 0 10px; }

.pay-option{
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 16px !important;
}

.pay-option small{ font-weight: 500; opacity: .85; }
.pay-option[disabled]{ opacity: .55; cursor: not-allowed; }
.pay-note{ margin: 8px 0 0; font-size: 0.8rem; color: var(--text-muted); text-align: center; }

/* add credit */
.deposit-page, .withdraw-page, .checkout-page{ padding-bottom: 40px; }
.deposit-page .page-header strong, .withdraw-page .page-header strong{ color: #fff; }
.deposit-form{ max-width: 560px; padding: 22px; margin: 0; }

.deposit-amounts{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    border: 0;
    padding: 0;
    margin: 0 0 18px;
}

.deposit-amounts legend{ margin-bottom: 8px; padding: 0; }
.deposit-amount{ position: relative; cursor: pointer; }
.deposit-amount input{ position: absolute; opacity: 0; pointer-events: none; }

.deposit-amount span{
    display: block;
    padding: 14px 8px;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--surface);
    transition: border-color .15s ease, background-color .15s ease;
}

.deposit-amount:hover span{ border-color: var(--accent); }
.deposit-amount input:checked + span{ border-color: var(--accent); background-color: rgba(79, 107, 255, 0.08); color: var(--accent); }
.deposit-amount input:focus-visible + span{ box-shadow: 0 0 0 3px rgba(79, 107, 255, 0.3); }
.deposit-custom{ margin-bottom: 18px; }

/* withdraw */
.withdraw-history{ list-style: none; margin: 0; padding: 0; }

.withdraw-history li{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.withdraw-history li:last-child{ border-bottom: 0; }
.iban-input{ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; }
code.iban{ white-space: nowrap; font-size: 0.85rem; }
.withdraw-actions{ display: flex; gap: 6px; justify-content: flex-end; margin: 0; }
.admin-head{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.admin-head .link{ margin-left: auto; padding-top: 0; }
.stripe-status p{ margin: 6px 0; }

/* checkout result */
.checkout-result{
    max-width: 520px;
    margin: 48px auto;
    padding: 36px 28px;
    text-align: center;
}

.checkout-result h1{ font-size: 1.5rem; margin: 12px 0 8px; }
.checkout-icon{ font-size: 3rem; color: var(--text-muted); }

@media (max-width: 520px){
    .deposit-amounts{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* withdrawal bank details */
.form-row-2{ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }
.bank-details dl{ display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; text-align: left; font-size: 0.85rem; }
.bank-details dt{ color: var(--text-muted); }
.bank-details dd{ margin: 0; white-space: nowrap; }
.copy-btn{ border: 0; background: none; padding: 0 4px; color: var(--text-muted); cursor: pointer; }
.copy-btn:hover{ color: var(--accent); }
@media (max-width: 520px){ .form-row-2{ grid-template-columns: 1fr; } }

/* Bot honeypot: kept off-screen (not display:none, which bots skip) */
.hp-field{
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}
