*{box-sizing:border-box}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f5f6f8;color:#222}
a{color:#0b65c2;text-decoration:none}
.topbar{display:flex;gap:18px;align-items:center;padding:14px 24px;background:#111827;color:white;flex-wrap:wrap}
.topbar a{color:white;margin-right:10px}
.brand{font-size:22px;font-weight:bold}
.search{display:flex;gap:6px;flex:1;max-width:420px}
.search input{flex:1}
.container{max-width:1200px;margin:25px auto;padding:0 15px}
.footer{text-align:center;padding:30px;color:#777}
input,textarea,select,button{padding:10px;border:1px solid #ccc;border-radius:8px}
textarea{min-height:120px}
button,.btn{background:#111827;color:white;border:0;padding:10px 14px;border-radius:8px;cursor:pointer;display:inline-block}
.card,.auth-card{background:white;padding:20px;border-radius:12px;box-shadow:0 2px 10px #0001;margin-bottom:18px}
.auth-card{max-width:420px;margin:40px auto}
.form{display:flex;flex-direction:column;gap:10px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:18px}
.auction-card{background:white;border-radius:12px;box-shadow:0 2px 10px #0001;overflow:hidden;padding-bottom:14px}
.auction-card img,.no-img{width:100%;height:170px;object-fit:cover;background:#ddd;display:flex;align-items:center;justify-content:center}
.auction-card h3,.auction-card p{padding:0 14px}
.price{font-size:20px;font-weight:bold;color:#0a7d35}
.alert{padding:12px;border-radius:8px;margin-bottom:12px}
.alert.success{background:#dcfce7;color:#166534}
.alert.error{background:#fee2e2;color:#991b1b}
table{width:100%;border-collapse:collapse;background:white;border-radius:12px;overflow:hidden}
td,th{padding:10px;border-bottom:1px solid #eee;text-align:left}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:15px}
.actions{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}
.auction-detail{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.main-photo{width:100%;border-radius:12px;background:#ddd}
.thumbs{display:flex;gap:8px;margin-top:8px;flex-wrap:wrap}
.thumbs img{width:80px;height:80px;object-fit:cover;border-radius:8px}
.inline-form{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}
.row{display:block;padding:12px;border-bottom:1px solid #eee}
.chat{min-height:300px}
.msg{background:#f3f4f6;padding:10px;border-radius:10px;margin-bottom:10px;max-width:70%}
.msg.mine{background:#dbeafe;margin-left:auto}
@media(max-width:800px){.auction-detail{grid-template-columns:1fr}.topbar{display:block}.search{margin:10px 0}}

.timer{font-size:14px;color:#374151}
.countdown.soon{color:#b45309}
.countdown.ended{color:#991b1b}
.live-dot{font-size:12px;background:#dcfce7;color:#166534;padding:3px 7px;border-radius:99px}
.new-bid-row{animation:flashBid 2s ease-out}
@keyframes flashBid{from{background:#dcfce7}to{background:white}}

.badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:99px;background:#dc2626;color:white;font-size:12px;margin-left:4px}
.badge.hidden{display:none}
#toast-container{position:fixed;right:18px;top:80px;z-index:9999;display:flex;flex-direction:column;gap:10px}
.toast{background:#111827;color:white;padding:14px 16px;border-radius:12px;box-shadow:0 8px 30px #0003;min-width:260px;max-width:360px;animation:toastIn .25s ease-out}
.toast p{margin:6px 0 0;color:#e5e7eb}
.toast.hide{opacity:0;transform:translateX(20px);transition:.3s}
.unread-row{background:#eff6ff}
@keyframes toastIn{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}


/* v1.5 form layout fix */
.auth-card form,
.card.form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-card label,
.card.form label {
    font-weight: bold;
    margin-top: 6px;
}

.auth-card input,
.auth-card select,
.auth-card textarea,
.card.form input,
.card.form select,
.card.form textarea {
    width: 100%;
    display: block;
}

.auth-card button,
.card.form button {
    width: fit-content;
    margin-top: 8px;
}

/* v1.6 approval workflow */
.status-badge{display:inline-block;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:bold;background:#e5e7eb;color:#374151}
.status-active,.status-approved{background:#dcfce7;color:#166534}
.status-pending_approval{background:#fef3c7;color:#92400e}
.status-rejected,.status-cancelled{background:#fee2e2;color:#991b1b}
.status-payment_pending{background:#dbeafe;color:#1e40af}
.status-paid,.status-completed{background:#ede9fe;color:#5b21b6}
.muted{color:#6b7280;font-size:13px}

/* v1.7 message notifications */
.conversation-row.unread-row{background:#eff6ff}
.chat{max-height:500px;overflow-y:auto}
.msg strong{display:block;margin-bottom:4px}

/* v1.8 auction details action/report layout fix */
.auction-action-panel{max-width:620px}
.auction-actions{display:flex;flex-direction:column;gap:12px;margin:18px 0}
.action-form{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:10px;align-items:center;max-width:520px}
.auction-buttons{display:flex;gap:10px;flex-wrap:wrap;margin:15px 0}
.auction-buttons form{margin:0}
.auto-bid-box{background:#eff6ff;border:1px solid #bfdbfe;padding:12px;border-radius:10px;max-width:520px}
.auto-bid-box form{margin-top:8px}
.report-form{display:grid;grid-template-columns:1fr;gap:10px;max-width:520px;margin-top:10px}
.report-form textarea{width:100%;min-height:120px}
.report-form button{width:fit-content}
@media(max-width:700px){.action-form{grid-template-columns:1fr}.action-form button{width:fit-content}}

/* v1.9 UI polish + RTL */
body{background:linear-gradient(180deg,#f7f8fb,#eef1f5);font-size:16px}
body.rtl{font-family:Tahoma,Arial,sans-serif}
body.rtl table, body.rtl td, body.rtl th{text-align:right}
.topbar{position:sticky;top:0;z-index:1000;box-shadow:0 8px 25px #0001}
.lang-switch{background:#ffffff22;padding:7px 10px;border-radius:999px}
.hero{background:linear-gradient(135deg,#111827,#1f2937);color:white;border-radius:24px;padding:46px;margin-bottom:22px;box-shadow:0 12px 35px #0002}
.hero h1{font-size:46px;margin:0 0 10px}
.hero p{font-size:18px;max-width:720px;color:#d1d5db}
.btn-light{background:white;color:#111827}
.chip-list{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0 30px}
.chip-list a{background:white;border:1px solid #e5e7eb;border-radius:999px;padding:9px 14px;color:#111827}
.home-section{margin:34px 0}
.section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.section-title h2{margin:0;font-size:26px}
.empty-state{background:white;border:1px dashed #cbd5e1;border-radius:16px;padding:30px;text-align:center;color:#64748b;}
.auction-card{position: relative;transition:.2s;display:flex;flex-direction:column;overflow: visible;}
.auction-card:hover{transform:translateY(-3px);box-shadow:0 12px 30px #0002}
.auction-img-link img,.auction-img-link .no-img{height:190px}
.auction-card-body{padding:14px}
.auction-card h3{padding:0;margin:0 0 10px;font-size:18px}
.auction-card p{padding:0}
.auction-meta{display:flex;justify-content:space-between;gap:10px;align-items:center;color:#64748b;font-size:13px}
.auction-detail{align-items:start}
.auction-gallery,.auction-action-panel,.description-card{background:white;border-radius:18px;box-shadow:0 2px 10px #0001}
.auction-gallery{padding:14px;position: relative;}
.auction-action-panel h1{font-size:32px;margin-top:0}
.no-detail-image{height:420px;background:#e5e7eb;border-radius:14px;display:flex;align-items:center;justify-content:center;color:#64748b}
.detail-line{display:flex;justify-content:space-between;gap:15px;border-bottom:1px solid #eef2f7;padding:12px 0}
.detail-line span{color:#64748b}
.price-line strong{color:#0a7d35;font-size:24px}
.report-box{margin-top:10px}
.report-box summary{cursor:pointer;font-weight:bold}
.description-card{line-height:1.7}
.description-card pre{white-space:pre-wrap;background:#f8fafc;border-radius:12px;padding:14px}
body.rtl .msg.mine{margin-right:auto;margin-left:0}
body.rtl .msg{direction:rtl}
@media(max-width:900px){
    .hero{padding:30px}
    .hero h1{font-size:34px}
    .topbar{gap:10px}
    .search{max-width:none;width:100%}
    nav{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
}

/* v2.0 marketplace */
.status-escrowed{background:#dbeafe;color:#1e40af}
.status-shipped{background:#fef3c7;color:#92400e}
.status-delivered{background:#ede9fe;color:#5b21b6}
.status-disputed{background:#fee2e2;color:#991b1b}
.status-refunded{background:#e5e7eb;color:#374151}

/* v2.0.1 user/profile management */
.avatar-preview{width:120px;height:120px;object-fit:cover;border-radius:50%;border:4px solid #e5e7eb}
.mini-avatar{width:34px;height:34px;object-fit:cover;border-radius:50%;vertical-align:middle;margin-inline-end:8px}
.status-user{background:#e5e7eb;color:#374151}
.status-moderator{background:#dbeafe;color:#1e40af}
.status-admin{background:#ede9fe;color:#5b21b6}
.status-super_admin{background:#fee2e2;color:#991b1b}
.status-suspended{background:#fef3c7;color:#92400e}
.status-banned{background:#fee2e2;color:#991b1b}

/* v2.0.2 verification + 2FA */
.verification-warning{border:2px solid #dc2626}
.verification-warning ul{margin:8px 0 12px}
.qr-code{max-width:240px;border:10px solid white;border-radius:12px;box-shadow:0 4px 20px #0002}

/* v2.0.3 Arabic font + light/dark theme + persistent alerts */
@font-face{
    font-family:'HacenTunisia';
    src:url('/fonts/Hacen-Tunisia-Lt.ttf') format('truetype');
    font-weight:normal;
    font-style:normal;
    font-display:swap;
}
body.rtl,
body.rtl input,
body.rtl textarea,
body.rtl select,
body.rtl button{
    font-family:'HacenTunisia', Tahoma, Arial, sans-serif;
}
body.theme-light{background:#f8fafc;color:#111827}
body.theme-light .card,
body.theme-light .auth-card,
body.theme-light .auction-card,
body.theme-light .auction-gallery,
body.theme-light .auction-action-panel,
body.theme-light .description-card{background:#fff;color:#111827}
body.theme-light .topbar{background:#fff;color:#111827;border-bottom:1px solid #e5e7eb}
body.theme-light .topbar a{color:#111827}
body.theme-light .lang-switch{background:#f1f5f9}
body.theme-dark{background:#0f172a;color:#e5e7eb}
body.theme-dark .card,
body.theme-dark .auth-card,
body.theme-dark .auction-card,
body.theme-dark .auction-gallery,
body.theme-dark .auction-action-panel,
body.theme-dark .description-card{background:#111827;color:#e5e7eb}
body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select{background:#0b1220;color:#e5e7eb;border-color:#334155}
body.theme-dark .topbar{background:#020617}
.persistent-alert{display:block!important}
.verification-warning{border:2px solid #dc2626;box-shadow:0 8px 30px #dc262633}
.checklist{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}
.checklist>div{padding:12px;border-radius:12px;border:1px solid #e5e7eb}
.checklist .ok{background:#dcfce7;color:#166534}
.checklist .bad{background:#fee2e2;color:#991b1b}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.form label,.auth-card label,.profile-form label{display:block;font-weight:700}
.form input,.form textarea,.form select,.auth-card input,.auth-card textarea,.auth-card select{margin-top:4px}

/* v2.0.5 account security */
.security-score h2{margin-top:0}
.score-bar{height:16px;background:#e5e7eb;border-radius:999px;overflow:hidden;margin:12px 0 18px}
.score-bar span{display:block;height:100%;background:#16a34a;border-radius:999px}

/* v2.0.7 cleanup */
.admin-settings-form h2{margin-top:24px;padding-top:18px;border-top:1px solid #e5e7eb}
.admin-settings-form label{font-weight:700;margin-top:8px}
.admin-settings-form input,.admin-settings-form select{max-width:520px}

/* v2.0.8 user account center */
.account-hero{display:flex;justify-content:space-between;gap:20px;align-items:center}
.account-badges{display:flex;gap:8px;flex-wrap:wrap}
.account-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px;margin:18px 0}
.account-form-grid{display:grid;grid-template-columns:1fr;gap:10px;max-width:720px}
.account-form-grid label{font-weight:700}
@media(max-width:700px){.account-hero{flex-direction:column;align-items:flex-start}}

/* v2.0.9 Arabic completion + PayPal */
body.rtl input,body.rtl textarea,body.rtl select{text-align:right}

/* v2.0.9.2 elegant navbar + settings */
.navbar{
    position:sticky;
    top:0;
    z-index:1000;
    background:#ffffffcc;
    backdrop-filter:blur(14px);
    border-bottom:1px solid #e5e7eb;
    box-shadow:0 8px 28px #00000012;
}
.nav-inner{
    max-width:1280px;
    margin:0 auto;
    padding:12px 18px;
    display:flex;
    align-items:center;
    gap:18px;
}
.nav-brand{
    font-size:24px;
    font-weight:900;
    color:#111827;
    text-decoration:none;
    white-space:nowrap;
}
.nav-search{
    display:flex;
    gap:8px;
    align-items:center;
    flex:1;
    max-width:420px;
}
.nav-search input{
    width:100%;
    border-radius:999px;
    border:1px solid #d1d5db;
    padding:10px 14px;
}
.nav-search button{
    border-radius:999px;
    padding:10px 16px;
}
.nav-links{
    display:flex;
    align-items:center;
    gap:6px;
    flex-wrap:wrap;
    justify-content:flex-end;
}
.nav-links a{
    text-decoration:none;
    color:#374151;
    padding:8px 10px;
    border-radius:999px;
    font-weight:600;
    font-size:14px;
}
.nav-links a:hover{
    background:#f3f4f6;
    color:#111827;
}
.nav-pill{
    background:#f1f5f9;
}
.nav-warning{
    background:#fee2e2!important;
    color:#991b1b!important;
}
.nav-icon-link{
    position:relative;
}
body.theme-dark .navbar{
    background:#020617cc;
    border-bottom-color:#1f2937;
}
body.theme-dark .nav-brand,
body.theme-dark .nav-links a{
    color:#e5e7eb;
}
body.theme-dark .nav-links a:hover,
body.theme-dark .nav-pill{
    background:#1f2937;
}
.admin-settings-form select,
.admin-settings-form input{
    width:100%;
}
@media(max-width:950px){
    .nav-inner{flex-direction:column;align-items:stretch}
    .nav-search{max-width:none}
    .nav-links{justify-content:flex-start}
}

/* v2.0.9.3 dropdown navigation */
.nav-inner{
    align-items:center;
}
.nav-menu{
    list-style:none;
    display:flex;
    align-items:center;
    gap:6px;
    margin:0;
    padding:0;
    flex-wrap:wrap;
    justify-content:flex-end;
}
.nav-menu > li{
    position:relative;
}
.nav-menu a{
    display:block;
    text-decoration:none;
    color:#374151;
    padding:9px 12px;
    border-radius:10px;
    font-weight:700;
    font-size:14px;
    white-space:nowrap;
}
.nav-menu a:hover{
    background:#f3f4f6;
    color:#111827;
}
.dropdown > a::after{
    content:"▾";
    font-size:10px;
    margin-inline-start:6px;
}
.dropdown-menu{
    display:none;
    position:absolute;
    top:100%;
    inset-inline-start:0;
    min-width:220px;
    list-style:none;
    margin:4px 0 0;
    padding:8px;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:14px;
    box-shadow:0 20px 50px #0002;
    z-index:2000;
}
.dropdown:hover > .dropdown-menu,
.dropdown:focus-within > .dropdown-menu{
    display:block;
}
.dropdown-menu li{
    margin:0;
}
.dropdown-menu a{
    border-radius:10px;
    padding:10px 12px;
    font-weight:600;
}
body.rtl .dropdown-menu{
    inset-inline-start:auto;
    inset-inline-end:0;
}
body.theme-dark .dropdown-menu{
    background:#111827;
    border-color:#1f2937;
}
body.theme-dark .nav-menu a{
    color:#e5e7eb;
}
body.theme-dark .nav-menu a:hover{
    background:#1f2937;
}
@media(max-width:950px){
    .nav-menu{
        justify-content:flex-start;
    }
    .dropdown-menu{
        position:static;
        box-shadow:none;
        border:0;
        background:transparent;
        padding:4px 0 4px 12px;
    }
    .dropdown:hover > .dropdown-menu,
    .dropdown:focus-within > .dropdown-menu{
        display:block;
    }
}

/* v2.1 platform */
.seller-profile .stats{margin-top:16px}
pre{white-space:pre-wrap;background:#0f172a;color:#e5e7eb;padding:18px;border-radius:14px;overflow:auto}

/* v2.1.2 finalize orders + navbar fixes */
.dropdown-menu{margin:0!important}
.user-menu>a{background:#eef2ff;color:#3730a3!important}
body.theme-dark .user-menu>a{background:#312e81;color:#e0e7ff!important}
.bidder-name{letter-spacing:1px}

/* v2.1.3 user auction dashboard + username links */
.username-link{font-weight:700;text-decoration:none;color:#2563eb}
.username-link:hover{text-decoration:underline}
body.theme-dark .username-link{color:#93c5fd}
.user-menu .dropdown-menu{min-width:230px}

/* v2.1.3.9 theme coverage + ads */
body.theme-dark table,
body.theme-dark th,
body.theme-dark td{border-color:#334155;color:#e5e7eb}
body.theme-dark th{background:#1f2937;color:#f8fafc}
body.theme-dark tr:nth-child(even){background:#0b1220}
body.theme-dark .empty-state,
body.theme-dark .chip-list a,
body.theme-dark .auto-bid-box,
body.theme-dark .checklist>div,
body.theme-dark .unread-row,
body.theme-dark .conversation-row.unread-row,
body.theme-dark .no-detail-image,
body.theme-dark .description-card pre,
body.theme-dark .lang-switch{background:#1f2937;color:#e5e7eb;border-color:#334155}
body.theme-dark .detail-line{border-bottom-color:#334155}
body.theme-dark .detail-line span,
body.theme-dark .auction-meta,
body.theme-dark .muted{color:#cbd5e1}
body.theme-dark .dropdown-menu a,
body.theme-dark .nav-search input{color:#e5e7eb}
body.theme-dark .btn-light{background:#e5e7eb;color:#111827}
body.theme-dark .status-badge{background:#334155;color:#e5e7eb}
body.theme-dark .status-active,
body.theme-dark .status-approved{background:#14532d;color:#dcfce7}
body.theme-dark .status-pending,
body.theme-dark .status-pending_approval{background:#78350f;color:#fef3c7}
body.theme-dark .status-rejected,
body.theme-dark .status-cancelled,
body.theme-dark .status-banned{background:#7f1d1d;color:#fee2e2}
body.theme-dark .status-payment_pending{background:#1e3a8a;color:#dbeafe}
body.theme-dark .status-paid,
body.theme-dark .status-completed,
body.theme-dark .status-delivered{background:#4c1d95;color:#ede9fe}
body.theme-dark .status-user,
body.theme-dark .status-refunded{background:#334155;color:#e5e7eb}
body.theme-dark .checklist .ok{background:#14532d;color:#dcfce7}
body.theme-dark .checklist .bad{background:#7f1d1d;color:#fee2e2}
body.theme-dark .score-bar{background:#334155}
body.theme-dark .toast{background:#020617;color:#f8fafc;border:1px solid #334155}
body.theme-dark .toast p{color:#cbd5e1}
body.theme-dark a{color:#93c5fd}
body.theme-dark .auction-card h3 a{color:#bfdbfe}
body.theme-light .status-badge{box-shadow:0 1px 0 #00000008}
.mbeah-promo-slot{max-width:1280px;margin:14px auto;padding:0 18px}
.mbeah-promo-slot a{display:flex;align-items:center;justify-content:center;gap:12px;min-height:76px;border:1px solid #e5e7eb;border-radius:16px;background:#fff;color:#111827;text-decoration:none;overflow:hidden;box-shadow:0 4px 18px #0000000d}
.mbeah-promo-slot img{max-width:100%;max-height:120px;object-fit:contain;display:block}
.mbeah-promo-slot span{font-weight:800}
body.theme-dark .mbeah-promo-slot a{background:#111827;color:#e5e7eb;border-color:#334155}
.mbeah-promo-global_top,.mbeah-promo-global_bottom{margin-top:10px;margin-bottom:10px}
@media(max-width:700px){.mbeah-promo-slot{padding:0 10px}.mbeah-promo-slot a{min-height:60px}.mbeah-promo-slot img{max-height:90px}}

/* v2.1.4.0 ads admin management */
.admin-ad-edit {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color, #ddd);
}
.admin-ad-preview img {
    width: 100%;
    max-height: 140px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--card-bg, #fff);
}
.admin-ad-fields {
    display: grid;
    gap: .75rem;
}
.admin-ad-fields .form-row {
    display: grid;
    gap: .3rem;
}
.btn.danger,
button.danger {
    background: #b42318;
    color: #fff;
}
@media (max-width: 700px) {
    .admin-ad-edit { grid-template-columns: 1fr; }
}

/* 2.2.1 auction action ordering + modal theme fixes */
.ordered-auction-actions {
    display: grid;
    gap: 10px;
}
.ordered-auction-actions .action-form,
.ordered-auction-actions .bid-form {
    margin: 0;
}
.buy-now-btn {
    width: 100%;
    font-weight: 700;
}
.modal-content {
    background: var(--card-bg, #fff);
    color: var(--text-color, #111);
    border-color: var(--border-color, #ddd);
}
.modal-header,
.modal-footer {
    border-color: var(--border-color, #ddd);
}
.modal-body input,
.modal-body textarea {
    width: 100%;
    margin-bottom: 12px;
}
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.show { display: flex; }
.modal-backdrop-custom {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
}
.modal-dialog {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
}
.modal-content {
    border-radius: 16px;
    overflow: hidden;
}
.modal-header,
.modal-footer,
.modal-body {
    padding: 16px;
}
.modal-header,
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.btn-close {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
}

/* v2.2.2 complete button styling + equal action sizing */
button,
.btn,
a.btn,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #2563eb;
    color: #fff !important;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
    box-shadow: 0 7px 18px rgba(37, 99, 235, .20);
    white-space: nowrap;
}
button:hover,
.btn:hover,
a.btn:hover,
input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(37, 99, 235, .26);
}
button:active,
.btn:active,
a.btn:active,
input[type="submit"]:active {
    transform: translateY(0);
}
.btn.secondary,
button.secondary,
a.btn.secondary {
    background: #f8fafc;
    color: #1e293b !important;
    border-color: #cbd5e1;
    box-shadow: 0 5px 14px rgba(15, 23, 42, .08);
}
.btn.success,
button.success,
a.btn.success {
    background: #16a34a;
    color: #fff !important;
    box-shadow: 0 7px 18px rgba(22, 163, 74, .20);
}
.btn.danger,
button.danger,
a.btn.danger {
    background: #dc2626;
    color: #fff !important;
    box-shadow: 0 7px 18px rgba(220, 38, 38, .20);
}
.btn.small-btn,
button.small-btn {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: .92rem;
}
.btn-block,
.action-form > button,
.action-form > .btn,
.ordered-auction-actions > button,
.ordered-auction-actions > .btn,
.auction-secondary-actions button,
.auction-secondary-actions .btn,
.pay-winner-form button,
.report-form button {
    width: 100%;
}
.ordered-auction-actions {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}
.ordered-auction-actions .action-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: stretch;
}
.ordered-auction-actions .buy-now-form {
    grid-template-columns: 1fr;
}
.ordered-auction-actions > button,
.ordered-auction-actions .buy-now-btn {
    min-height: 50px;
    font-size: 1.02rem;
}
.ordered-auction-actions input,
.report-form input,
.report-form textarea,
.offer-row input {
    min-height: 44px;
}
.bid-form .bid-submit-btn,
.ordered-auction-actions .action-form button {
    min-width: 160px;
}
.auction-secondary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}
.auction-secondary-actions form {
    margin: 0;
}
.seller-offers-box .offer-row {
    display: grid;
    gap: 10px;
}
.seller-offers-box .inline-form {
    display: inline-grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    margin: 0 8px 8px 0;
}
.seller-offers-box .inline-form button {
    min-width: 120px;
}
.modal-footer .btn,
.modal-footer button {
    min-width: 130px;
}
body.theme-dark button,
body.theme-dark .btn,
body.theme-dark a.btn,
body.theme-dark input[type="submit"] {
    background: #3b82f6;
    color: #fff !important;
    border-color: #60a5fa;
}
body.theme-dark .btn.secondary,
body.theme-dark button.secondary,
body.theme-dark a.btn.secondary {
    background: #1f2937;
    color: #e5e7eb !important;
    border-color: #475569;
}
body.theme-dark .btn.success,
body.theme-dark button.success {
    background: #15803d;
    border-color: #22c55e;
}
body.theme-dark .btn.danger,
body.theme-dark button.danger {
    background: #b91c1c;
    border-color: #ef4444;
}
body.theme-dark .btn-close {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: #e5e7eb !important;
}
.btn-close,
button.btn-close {
    min-height: auto;
    padding: 0 6px;
    width: auto;
    box-shadow: none;
    color: inherit !important;
}
@media (max-width: 700px) {
    button,
    .btn,
    a.btn,
    input[type="submit"] {
        min-height: 46px;
        width: 100%;
        white-space: normal;
    }
    .ordered-auction-actions .action-form,
    .seller-offers-box .inline-form,
    .auction-secondary-actions {
        grid-template-columns: 1fr;
    }
    .bid-form .bid-submit-btn,
    .ordered-auction-actions .action-form button,
    .seller-offers-box .inline-form button,
    .modal-footer .btn,
    .modal-footer button {
        min-width: 0;
    }
    .modal-footer {
        gap: 10px;
    }
}

/* 2.2.3 listing mode, conditions, quantity, variants */
.auction-create-form .soft-card,
.variant-builder {
    border: 1px solid var(--border-color, #e5e7eb);
    background: var(--card-bg, #fff);
    margin: 16px 0;
    padding: 16px;
    border-radius: 14px;
}
.variant-table-wrap { overflow-x: auto; width: 100%; }
.variant-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.variant-table th,
.variant-table td { padding: 8px; vertical-align: middle; }
.variant-table input,
.variant-buy-form select { width: 100%; min-height: 42px; }
.variant-buy-form { gap: 10px; }
.variant-buy-form label { font-weight: 700; margin-top: 6px; }
.variant-special-offer { font-weight: 700; }
html[data-theme="dark"] .variant-builder,
body.dark .variant-builder,
html[data-bs-theme="dark"] .variant-builder {
    background: var(--card-bg, #111827);
    border-color: var(--border-color, #374151);
}

/* 2.2.4 variant option images */
.variant-table input[type="file"] {
    min-width: 170px;
    padding: 8px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 10px;
    background: var(--card-bg, #fff);
    color: var(--text-color, #222);
}
.variant-table td.center,
.variant-table th.center {
    text-align: center;
    vertical-align: middle;
}
.variant-table input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.auction-gallery .main-photo {
    transition: opacity .15s ease-in-out;
}

.terms-register-box,
.terms-inline-card {
    border: 1px solid var(--border, #ddd);
    border-radius: 14px;
    padding: 14px;
    margin: 14px 0;
    background: var(--card-bg, #fff);
}
.terms-accepted-badge {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(25, 135, 84, .12);
    color: #198754;
    font-weight: 700;
}
.terms-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    line-height: 1.55;
    margin: 10px 0;
}
.terms-check input { margin-top: 6px; min-width: 18px; min-height: 18px; }
.link-button {
    border: 0;
    background: transparent;
    color: var(--primary, #0d6efd);
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font: inherit;
    font-weight: 700;
}
.terms-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}
.terms-modal.show { display: block; }
.terms-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.58);
}
.terms-modal-dialog {
    position: relative;
    width: min(920px, calc(100vw - 24px));
    max-height: calc(100vh - 40px);
    margin: 20px auto;
    background: var(--card-bg, #fff);
    color: var(--text-color, #111);
    border: 1px solid var(--border, #ddd);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0,0,0,.28);
    display: flex;
    flex-direction: column;
}
.terms-modal-header,
.terms-modal-footer {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border, #ddd);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.terms-modal-footer {
    border-top: 1px solid var(--border, #ddd);
    border-bottom: 0;
    justify-content: flex-end;
}
.terms-modal-header h2 { margin: 0 0 4px; }
.terms-modal-body {
    padding: 18px;
    overflow-y: auto;
    max-height: 68vh;
    line-height: 1.75;
}
.terms-modal-body h2 { margin-top: 0; }
.terms-modal-body h3 {
    margin: 22px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border, #ddd);
}
.terms-modal-body p { margin: 7px 0; }
.btn:disabled,
button:disabled {
    opacity: .55;
    cursor: not-allowed;
}
[data-theme="dark"] .terms-register-box,
[data-theme="dark"] .terms-inline-card,
[data-theme="dark"] .terms-modal-dialog {
    background: var(--card-bg, #161b22);
    color: var(--text-color, #f5f5f5);
}
.theme-dark .terms-register-box,
.theme-dark .terms-inline-card,
.theme-dark .terms-modal-dialog {
    background: var(--card-bg, #161b22);
    color: var(--text-color, #f5f5f5);
}


/* v2.3.4.1 admin dashboard square grid buttons */
.admin-dashboard-actions{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(150px, 150px));
    gap:16px;
    align-items:stretch;
    justify-content:start;
    margin:24px 0;
}
.admin-dashboard-actions .btn,
.admin-dashboard-actions a.btn{
    width:150px;
    height:150px;
    min-width:0;
    padding:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    white-space:normal;
    line-height:1.2;
    border-radius:18px;
    font-size:18px;
    font-weight:800;
}
@media(max-width:700px){
    .admin-dashboard-actions{
        grid-template-columns:repeat(2, minmax(130px, 1fr));
        gap:12px;
    }
    .admin-dashboard-actions .btn,
    .admin-dashboard-actions a.btn{
        width:100%;
        height:130px;
        font-size:16px;
    }
}


/* v2.3.5 admin auction manager action buttons */
.admin-auction-actions{
    min-width:220px;
}
.admin-auction-actions form{
    display:grid;
    grid-template-columns:1fr 120px;
    gap:8px;
    align-items:center;
    margin:0 0 8px;
}
.admin-auction-actions form:last-child{
    grid-template-columns:1fr;
}
.admin-auction-actions select,
.admin-auction-actions input{
    width:100%;
    min-height:42px;
}
.admin-auction-actions button{
    width:120px;
    min-width:120px;
    height:42px;
    padding:0 12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    white-space:normal;
}
.admin-auction-actions form:last-child button{
    width:100%;
    min-width:100%;
}
@media(max-width:900px){
    .admin-auction-actions{min-width:180px;}
    .admin-auction-actions form{grid-template-columns:1fr;}
    .admin-auction-actions button{width:100%; min-width:100%;}
}


/* v2.3.5 equal buttons inside admin auction manager table */
.admin-auctions-table button{
    width:140px;
    min-width:140px;
    height:44px;
    padding:0 12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    line-height:1.2;
}
.admin-auctions-table .inline-form{
    gap:8px;
    align-items:center;
}
.admin-auctions-table input,
.admin-auctions-table select{
    min-height:44px;
}
.admin-auctions-table .admin-auction-actions button{
    width:140px;
    min-width:140px;
}
.admin-auctions-table .admin-auction-actions form:last-child button{
    width:100%;
    min-width:100%;
}

.auction-image-badge-wrap {
  position: relative;
}

.condition-badge {
  position: absolute;
  text-align:center;
  line-height:50px;
  width:100px;
  height:50px;
}

.condition-badge:after {
	content: "";
    position: absolute;
    top: 0px;
    transform: skew(14deg);
    right: -8px;
    width: 16px;
    height: inherit;
    background-color: black;
    border-radius: 0 4px 4px 0;
}
.condition-badge:before {
  content:"";
  position: absolute;
  top: 7px;
  transform: skewY(30deg);
  left:0px;
  width:20px;
  height:inherit;
  background-color:black;
  z-index:-10;
}

.condition-badge {
  top: -6px;
  left: -8px;
}

.condition-refurbished { background-color: #2ce757; }
.condition-refurbished:after, .condition-refurbished:before { background-color: #186226; }

.condition-new { background-color: #2ca0e7; }
.condition-new:after, .condition-new:before { background-color: #184662; }

.condition-used { background-color: red; }
.condition-used:after, .condition-used:before { background-color: #7e2a2a; }

.condition-open-box { background-color: #e1e72c; }
.condition-open-box:after, .condition-open-box:before { background-color: #8f9312; }

.condition-for-parts { background-color: #571e68; color: white; }
.condition-for-parts:after,.condition-for-parts:before { background-color: #3b1945; }

.condition-like-new { background-color: #be2ce7; }
.condition-like-new:after, .condition-like-new:before { background-color: #7c2679; }

.condition-damaged { background-color: #12165f; }
.condition-damaged:after, .condition-damaged:before { background-color: #000; }
/* Patch 2.4 */
.filter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;align-items:end}
.filter-wide{grid-column:1/-1}
.permission-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;margin:10px 0 16px}
.preset-form{border-top:1px solid var(--border-color,#e5e7eb);padding-top:14px;margin-top:14px}
.log-json{max-width:260px;max-height:120px;overflow:auto;white-space:pre-wrap;font-size:12px}
.offer-history-card table td{vertical-align:top}

.next-step-link{
    background:#fef3c7!important;
    color:#92400e!important;
    display:flex!important;
    align-items:center;
    gap:6px;
}
.next-step-main{
    background:#fff7ed;
    border:1px solid #fed7aa;
    border-radius:999px;
    padding:2px 7px;
    font-size:12px;
}
.next-step-badge{
    background:#ea580c;
    color:white;
    margin-left:0;
}
.next-step-dropdown a{
    display:flex;
    flex-direction:column;
    gap:2px;
}
.next-step-dropdown small{
    color:#6b7280;
    font-weight:400;
    max-width:260px;
    overflow:hidden;
    text-overflow:ellipsis;
}
.next-step-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:18px;
}
.next-step-card-head{
    display:flex;
    justify-content:space-between;
    gap:10px;
    align-items:center;
    margin-bottom:10px;
}
.next-step-chip{
    display:inline-flex;
    align-items:center;
    border-radius:999px;
    padding:6px 10px;
    background:#fef3c7;
    color:#92400e;
    font-weight:800;
    font-size:13px;
}
.pay-winner-row:target,
#ship-order:target,
#confirm-delivery:target,
#complete-order:target{
    outline:3px solid #f59e0b;
    outline-offset:3px;
    animation:nextStepPulse 1.2s ease-out 2;
}
@keyframes nextStepPulse{
    from{box-shadow:0 0 0 8px #f59e0b55}
    to{box-shadow:0 0 0 0 #f59e0b00}
}
body.theme-dark .next-step-link{background:#78350f!important;color:#fef3c7!important}
body.theme-dark .next-step-main{background:#451a03;color:#ffedd5;border-color:#92400e}
body.theme-dark .next-step-dropdown small{color:#cbd5e1}
body.theme-dark .next-step-chip{background:#78350f;color:#fef3c7}
