/* =========================================================
   FEHU / SpaceX UI — production-clean stylesheet
   ---------------------------------------------------------
   Sections:
   1) Reset
   2) Tokens (:root)
   3) Global base
   4) Bootstrap overrides (safe)
   5) Header / Nav / Burger / Mobile menu
   6) Common UI (inputs/buttons/helpers)
   7) Search UI
   8) Layout helpers (page-wrap, fehu-page, titles)
   9) Analytics
   10) Auction page
   11) Auth page
   12) News page
   13) Company / forms (fehu/spacex)
   14) Deal page
   15) FEHU section menu + table pages (list/profile/support)
   16) Toast
   17) LEGACY (commented out)
========================================================= */


/* =========================================================
   1) RESET
========================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; }


/* =========================================================
   2) TOKENS (single source of truth)
========================================================= */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Runic&display=swap");

:root {
    /* Bootstrap tokens */
    --bs-primary: #000;
    --bs-primary-rgb: 0,0,0;
    --bs-link-color: #000;
    --bs-link-hover-color: #333;

    /* FEHU tokens */
    --bg: #fff;
    --text: #111;
    --muted: #6b7280;
    --line: #e5e7eb;
    --card: #fff;
    --accent: #000;

    --shadow: 0 18px 60px rgba(16, 17, 20, .08);
    --radius: 10px;

    --font-base: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
    --font-rune: "Cardo", serif;
}


/* =========================================================
   3) GLOBAL BASE
========================================================= */
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-base);
    font-size: 15px;
    line-height: 1.5;
}

a { color: #000; text-decoration: none; }
a:hover { text-decoration: underline; }

main { min-height: 80vh; }


/* =========================================================
   4) BOOTSTRAP OVERRIDES (safe)
========================================================= */
.table { --bs-table-hover-bg: #f8f9fa; }
.badge { font-weight: 500; }

.form-control:focus {
    border-color: #000;
    box-shadow: 0 0 0 .25rem rgb(0 0 0 / 5%);
}

.btn,
.btn-dark,
.form-select,
.form-control {
    border-radius: 0;
}

.btn-outline-dark { border-color: #ccc; }
.btn-outline-dark:hover { background: #f7f7f7; border-color: #999; }

.is-invalid { border-color: #dc3545 !important; }
.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}
.was-validated .form-control:invalid ~ .invalid-feedback,
.was-validated .form-select:invalid ~ .invalid-feedback {
    display: block;
}


/* =========================================================
   5) HEADER / NAV / BURGER / MOBILE MENU
========================================================= */

/* Header variant (Bootstrap-ish) */
.app-header {
    border-bottom: 1px solid #ddd;
    padding: 0.75rem 0;
    font-weight: 600;
    position: relative;
    z-index: 1000;
}

.app-header .navbar-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: #000;
    text-decoration: none;
    letter-spacing: -0.5px;
}
.app-header .navbar-brand:hover { color: #000; }

.user-menu .btn {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
}

.user-id {
    font-size: 0.8rem;
    color: #555;
}

/* FEHU topbar header variant */
header {
    border-bottom: 1px solid var(--line);
    background: #fff;
    position: relative;
    z-index: 1000;
}

.topbar {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.brand svg {
    height: 50px;
    width: auto;
}
@media (max-width: 900px) {
    .brand svg { height: 28px; width: auto; }
}

.brand-name {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: .8px;
}

nav {
    display: flex;
    align-items: center;
    gap: 26px;
    white-space: nowrap;
}

nav a {
    color: #111;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1.2px;
    position: relative;
    padding: 6px 0;
    opacity: .9;
    transition: opacity .2s ease;
    cursor: pointer;
}

nav a:hover { opacity: 1; }

nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    bottom: -4px;
    height: 1px;
    background: #111;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}

nav a:hover::after { transform: scaleX(1); }

/* Burger */
.burger {
    display: none;
    width: 34px;
    height: 24px;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.burger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #111;
    transition: transform .3s ease, top .3s ease, opacity .2s ease;
}
.burger span:first-child { top: 6px; }
.burger span:last-child  { top: 16px; }

.burger.active span:first-child { top: 11px; transform: rotate(45deg); }
.burger.active span:last-child  { top: 11px; transform: rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity .25s ease, transform .25s ease;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.mobile-menu-inner {
    padding: 90px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.mobile-acc { border-bottom: 1px solid #e5e5e5; }

.mobile-acc-head {
    width: 100%;
    background: none;
    border: 0;
    padding: 14px 0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
    position: relative;
}
.mobile-acc-head::after {
    content: "▾";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: .6;
}
.mobile-acc.open .mobile-acc-head::after {
    transform: translateY(-50%) rotate(180deg);
}

.mobile-acc-body { display: none; padding-bottom: 12px; }
.mobile-acc.open .mobile-acc-body { display: block; }

.mobile-acc-body a {
    display: block;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: #111;
}

@media (min-width: 769px) { .mobile-menu { display: none; } }

@media (max-width: 768px) {
    nav { display: none; }
    .burger { display: block; }
}


/* =========================================================
   6) COMMON UI (inputs/buttons/helpers)
========================================================= */
.input {
    width: 100%;
    height: 40px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 14px;
    outline: none;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.input:focus { border-color: #111; transform: translateY(-1px); }

.btn-primary {
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(180deg, #1a1a1a, #000);
    color: #fff;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn-primary:hover {
    filter: brightness(.96);
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(0,0,0,.22);
}
.btn-primary:active { transform: translateY(0); }

.page-sub {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

.empty { color: #777; font-size: 14px; }




/* =========================================================
   7) SEARCH UI
========================================================= */

.search-wrapper.active { display: block; }

@media (min-width: 769px) {
    .search-wrapper { margin-left: auto; }
}
@media (max-width: 769px) {
    .search-wrapper { display: none; }
}
.search-box {
    border: 1px solid #ccc;
    border-radius: 12px;
    padding: 0.35rem 0.75rem;
    width: 340px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.search-box:focus { outline: none; width: 340px; }
#searchResults{
    max-width: fit-content;
}
#searchResults li {
    position: relative;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
#searchResults li:hover { background-color: #f7f7f7; }

#searchResults a {
    text-decoration: none;
    color: #000;
    display: block;
    padding: 0.6rem 0.75rem;
    position: relative;
}

.auction-preview {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 0.75rem;
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    width: 200px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    transform: translateY(5px);
}

.auction-item:hover .auction-preview {
    word-break: break-word;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.auction-preview strong { font-weight: 600; }


/* =========================================================
   8) LAYOUT HELPERS
========================================================= */
.page-wrap {
    min-height: calc(100vh - 220px);
    display: flex;
    flex-direction: column;
}

.fehu-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 26px 20px 0;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0;
}


/* =========================================================
   9) ANALYTICS
========================================================= */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 26px;
}

@media (max-width: 900px) {
    .analytics-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .analytics-grid { grid-template-columns: 1fr; }
}

.kpi {
    border: 1px solid #e5e5e5;
    padding: 18px;
    background: #fff;
}

.kpi-title {
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #777;
}

.kpi-value {
    font-size: 26px;
    font-weight: 800;
    margin-top: 6px;
}

/* analytics card style (kept, but deconflicted from legacy) */
.card {
    border: 1px solid var(--line);
    background: var(--card);
    padding: 22px;
    margin-top: 28px;
}
.card h3 {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.card h5 { letter-spacing: 0.04em; }


/* =========================================================
   10) AUCTION PAGE (scoped)
========================================================= */
.auction-page { padding: 60px 0; }

.auction-sheet {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 48px;
    border: 1px solid #000;
}

.rune-watermark {
    position: absolute;
    right: -40px;
    top: -80px;
    font-family: "Cardo", serif;
    font-size: 520px;
    line-height: 1;
    color: rgba(0,0,0,.035);
    pointer-events: none;
    user-select: none;
}

.auction-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #000;
    padding-bottom: 28px;
}

.auction-title {
    margin: 0;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.auction-sub {
    margin-top: 6px;
    font-size: 13px;
    color: #555;
    text-transform: lowercase;
}

.auction-status {
    border: 1px solid #000;
    padding: 6px 16px;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.auction-row,
.auction-grid { border-bottom: 1px solid #000; }

.auction-row {
    display: flex;
    gap: 80px;
    padding: 20px 0;
}

.auction-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 32px;
    padding: 28px 0;
}
.auction-grid.small { font-size: 14px; }

/* label/value scoped to auction so it doesn't fight auth */
.auction-page .label {
    display: block;
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #444;
}
.auction-page .value { margin-top: 6px; font-size: 16px; }
.auction-page .value.big { font-size: 30px; font-weight: 800; }
.auction-page .value.strong { font-weight: 700; }

.main-price {
    padding: 0 24px;
    border-left: 1px solid #000;
    border-right: 1px solid #000;
    text-align: center;
}

.fehu-mark {
    display: block;
    margin-top: 6px;
    font-size: 10px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #777;
}

.notice {
    margin: 36px 0;
    padding: 16px;
    border: 1px solid #000;
    text-align: center;
    font-size: 14px;
}
.notice strong { letter-spacing: .08em; }

.participants h2,
.description h2 {
    margin: 36px 0 14px;
    font-size: 13px;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.participants .count { font-weight: 400; color: #555; }

.list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid #000;
}
.list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #000;
    font-size: 14px;
}
.user .email { margin-left: 6px; color: #666; font-size: 13px; }

.status.approved { font-weight: 700; letter-spacing: .08em; }

.description p {
    margin: 0;
    font-size: 14px;
    color: #444;
    max-width: 600px;
}

.auction-footer { margin-top: 48px; text-align: right; }
.auction-footer a { font-size: 14px; color: #000; text-decoration: underline; }

/* Bidding */
.bidding {
    border-top: 1px solid #000;
    padding-top: 36px;
    margin-top: 48px;
}

.bidding-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.bidding-header h2 {
    margin: 0;
    font-size: 13px;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.bidding-header .hint {
    font-size: 11px;
    color: #666;
    letter-spacing: .12em;
}

.bidding-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: end;
    margin-bottom: 12px;
}

.bid-input label {
    display: block;
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #444;
    margin-bottom: 6px;
}

.bid-input input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #000;
    font-size: 16px;
    outline: none;
}

.bid-submit {
    border: 1px solid #000;
    background: #000;
    color: #fff;
    padding: 12px 26px;
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    cursor: pointer;
}
.bid-submit:hover { background: #fff; color: #000; }

.bid-suggest {
    font-size: 11px;
    color: #666;
    letter-spacing: .08em;
    margin-bottom: 24px;
}

.bids-history { margin-top: 12px; }

.bids-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.bids-scroll {
    border-top: 1px solid #000;
    max-height: 240px;
    overflow-y: auto;
}

.bids-table { width: 100%; border-collapse: collapse; }
.bids-table tr { border-bottom: 1px solid #000; }
.bids-table td { padding: 10px 0; font-size: 13px; }
.bids-table td:nth-child(1) { width: 40%; }
.bids-table td:nth-child(2) { width: 30%; font-weight: 700; }
.bids-table td:nth-child(3) {
    width: 30%;
    text-align: right;
    color: #555;
}

.bid-row.new-bid { background: rgba(0,0,0,0.04); }


/* =========================================================
   11) AUTH PAGE (scoped: fixes label/field collisions)
========================================================= */
.auth-wrap {
    position: relative;
    background: #fff;
    color: var(--text);
    animation: authFade .6s ease-out forwards;
}

@keyframes authFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-wrap::before {
    display: none;
    content: "ᚠ";
    z-index: 0;
    position: absolute;
    font-family: "Cardo", serif;
    right: 12%;
    top: -127px;
    font-size: 860px;
    line-height: 1;
    color: rgba(0, 0, 0, .035);
    pointer-events: none;
    user-select: none;
}

.auth-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 34px 18px;
    z-index: 40;
    position: relative;
}

.hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: start;
    padding: 18px 0 26px;
    border-bottom: 1px solid var(--line);
}

.hero-title {
    margin: 0 0 18px;
    font-size: 52px;
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.hero-sub {
    margin: 0;
    max-width: 520px;
    color: #555;
    font-size: 14.5px;
    line-height: 1.65;
}

.auth-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 18px 14px;
}

.auth-card-title {
    font-weight: 800;
    font-size: 14px;
    letter-spacing: .08em;
    margin-bottom: 14px;
    text-transform: uppercase;
}

/* Scoped fields + labels so they don't fight other pages */
.auth-wrap .field { margin: 0 0 12px; }
.auth-wrap .label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #444;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.rowline { margin: 8px 0 14px; }

.chk {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #444;
    user-select: none;
}
.chk input { width: 16px; height: 16px; }

.auth-links {
    margin-top: 12px;
    font-size: 12px;
    color: #444;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.auth-links a {
    color: #111;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}
.auth-links .sep { opacity: .5; padding: 0 4px; }

.how { padding: 18px 0 10px; }
.how-title { font-size: 18px; font-weight: 700; margin: 0 0 16px; color: #111; }

.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 12px 0 8px;
}

.how-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 18px 18px 16px;
    min-height: 150px;
    transition: transform .25s ease, box-shadow .25s ease;
}
.how-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0,0,0,.12);
}

.how-top {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: left;
    margin-bottom: 10px;
}

.rune-mark {
    font-family: "Cardo", serif;
    font-size: 28px;
    line-height: 1;
    font-weight: 800;
    color: #111;
    opacity: .9;
}

.how-idx {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .14em;
    color: #111;
    opacity: .7;
}

.how-card h3 {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .06em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.how-card p {
    margin: 0;
    color: #555;
    font-size: 13.5px;
    line-height: 1.6;
}

@media (max-width: 980px) {
    .auth-wrap::before { display: none; }
    .hero { grid-template-columns: 1fr; }
    .hero-title { font-size: 40px; }
    .how-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    #searchInput{ display: none; }
    .topbar { padding: 12px 14px; }
    .brand svg { height: 26px; }

    .hero { grid-template-columns: 1fr; gap: 20px; padding: 10px 0 18px; }
    .hero-left { order: 2; }
    .hero-right { order: 1; }

    .hero-title {
        font-size: 32px;
        line-height: 1.1;
        letter-spacing: -0.01em;
        margin-bottom: 14px;
    }

    .hero-sub { font-size: 14px; line-height: 1.6; max-width: 100%; }

    .auth-card {
        padding: 16px 14px;
        border-radius: 8px;
        box-shadow: 0 12px 28px rgba(0,0,0,.08);
    }

    .input { height: 44px; font-size: 15px; }
    .btn-primary { height: 46px; font-size: 13px; }

    .how { padding: 10px 0 0; }
    .how-title { font-size: 16px; margin-bottom: 12px; }
    .how-card { padding: 14px; min-height: unset; }
    .how-card h3 { font-size: 13px; }
    .how-card p { font-size: 13px; }
    .rune-mark { font-size: 24px; }
}


/* =========================================================
   12) NEWS PAGE
========================================================= */
.news-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 20px 80px;
}

.news-header {
    border-bottom: 2px solid #000;
    padding-bottom: 18px;
    margin-bottom: 32px;
    text-align: center;
}

.news-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0;
}

.news-sub {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

.news-filters {
    display: flex;
    justify-content: center;
    gap: 32px;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 28px 0 40px;
}

.news-filter { cursor: pointer; color: var(--muted); }
.news-filter.active {
    color: #000;
    font-weight: 600;
    border-bottom: 1px solid #000;
    padding-bottom: 2px;
}

.news-filters a { text-decoration: none; color: inherit; }
.news-filters a:hover { color: #000; }

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    column-gap: 32px;
    row-gap: 36px;
    justify-content: center;
}

.news-item {
    border-top: 1px solid var(--line);
    padding-top: 16px;
    font-size: 14px;
    min-width: 0;
}

.news-head {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.news-status { color: #000; font-weight: 600; }

.news-name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 6px;
}

.news-name a { color: #000; text-decoration: none; }
.news-name a:hover { text-decoration: underline; }

.news-meta {
    font-size: 13px;
    color: #444;
    line-height: 1.45;
    margin-bottom: 10px;
}

.news-price {
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}
.news-price strong { font-size: 15px; }

.news-timer { font-size: 12px; color: var(--muted); }
.timer-warning { color: #b91c1c; }

.news-empty {
    text-align: center;
    color: var(--muted);
    padding: 120px 0;
}

.view-switch {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 42px;
}

.view-btn {
    background: none;
    border: none;
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    padding: 4px 0;
}

.view-btn.active { color: #000; border-bottom: 1px solid #000; }

.view-newspaper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    column-gap: 32px;
    row-gap: 36px;
}

/* cards view */
.view-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 48px;
    max-width: 1280px;
    margin: 0 auto;
}

.view-cards .news-item {
    border-top: 2px solid #000;
    padding-top: 24px;
    font-size: 15px;
}

.view-cards .news-name {
    font-size: 22px;
    line-height: 1.3;
    margin-bottom: 10px;
}

.view-cards .news-meta {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.view-cards .news-price strong { font-size: 20px; }
.view-cards .news-timer { font-size: 13px; margin-top: 12px; }

/* central newspaper rail */
.news-rail {
    max-width: 1180px;
    margin: 0 auto;
}

@media (max-width: 1300px) { .news-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 980px)  { .news-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 900px)  { .view-cards { grid-template-columns: 1fr; } }
@media (max-width: 640px)  { .news-grid { grid-template-columns: 1fr; } }


/* =========================================================
   13) COMPANY / FORMS (fehu/spacex) — cleaned duplicates
========================================================= */
.fehu-company,
.spacex-company {
    max-width: 900px;
    margin: 0 auto;
}

.fehu-title,
.spacex-title {
    letter-spacing: 0.5px;
    font-size: 1.8rem;
}

.fehu-sub { font-size: 0.85rem; color: #777; }

.fehu-card,
.spacex-card {
    background: #fff;
    border: 1px solid #000;
    border-radius: 0;
    padding: 2rem;
}

.fehu-field,
.spacex-field { margin-bottom: 1rem; }

.fehu-field label,
.spacex-field label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #555;
    margin-bottom: 0.3rem;
    display: block;
}

.fehu-btn,
.spacex-btn {
    border-radius: 0;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}
.fehu-btn:hover,
.spacex-btn:hover { background-color: #000; color: #fff; }

input, textarea, select {
    border-radius: 0 !important;
    border: 1px solid #000 !important;
    box-shadow: none !important;
}


/* =========================================================
   14) DEAL PAGE (scoped .grid to deal-page)
========================================================= */
.deal-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.deal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 48px;
}

.deal-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.deal-sub { font-size: 14px; color: var(--muted); margin-top: 6px; }

.deal-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    border: 1px solid var(--line);
}
.status-paid     { background:#000; color:#fff; border-color:#000; }
.status-pending  { background:#fff; }
.status-failed   { opacity:.5; }
.status-refunded { opacity:.7; }

.amount { font-size: 22px; font-weight: 600; }

.section { margin-bottom: 56px; }
.section-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 24px;
}

/* deal-only grid (prevents fighting other grids) */
.deal-page .grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.item-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.item-value { font-size: 16px; font-weight: 500; }

.parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.party {
    border: 1px solid var(--line);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.party-name { font-weight: 600; }

.icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid #000;
    position: relative;
    flex-shrink: 0;
}
.icon.ok { background: #000; }


.actions { display: flex; gap: 16px; flex-wrap: wrap; }

.deal-page .btn {
    padding: 14px 22px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    border: 1px solid var(--line);
    border-radius: 0;
    background: #fff;
    cursor: pointer;
    transition: .2s;
}

.deal-page .btn-primary {
    background: #000;
    color: #fff;
    border-color: #000;
}
.deal-page .btn-primary:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.deal-page .btn:hover {
    transform: translateY(-1px);
    background: #000;
    color: #fff;
    border-color: #000;
}

@media (max-width: 900px) {
    .deal-header { flex-direction: column; align-items: flex-start; }
    .deal-page .grid, .parties { grid-template-columns: 1fr; }
}


/* =========================================================
   15) FEHU SECTION MENU + TABLE PAGES (list/profile/support)
========================================================= */
.section-menu {
    position: relative;
    margin-top: 22px;
    background: #fafafa;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    z-index: 50;
    overflow: visible;
}

/* watermark (kept, was duplicated) */
.section-menu::after {
    content: "ᚠ";
    position: absolute;
    right: -140px;
    top: 80%;
    font-family: "Cardo", serif;
    font-size: 360px;
    line-height: 1;
    color: rgba(0,0,0,.018);
    pointer-events: none;
}

.section-menu-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    gap: 48px;
    position: relative;
    z-index: 2;
}

/* menu tree */
.menu-item { position: relative; }

.menu-label {
    position: relative;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #777;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 6px;
}
.menu-label::after { content: "▾"; font-size: 10px; opacity: .6; }

.menu-item.open .menu-label { color: #000; }

.menu-label::before {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: #000;
    transform: scaleX(0);
    transition: transform .2s ease;
}
.menu-item.open .menu-label::before { transform: scaleX(1); }

.menu-count { font-size: 10px; font-weight: 700; color: #999; }

.menu-sub {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 10px 14px;
    list-style: none;
    display: none;
    z-index: 100;
}
.menu-item.open .menu-sub { display: block; }

.menu-sub a {
    display: block;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    opacity: .85;
}
.menu-sub a:hover { opacity: 1; text-decoration: underline; }

.fehu-content { flex: 1; margin-top: 28px; }

/* FEHU table cards */
.fehu-card {
    border: 1px solid var(--line);
    background: var(--card);
    padding: 18px 20px;
    min-height: 100%;
}

/* table */
.fehu-table { width: 100%; border-collapse: collapse; }
.fehu-table th {
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-align: left;
    padding: 10px 8px;
    border-bottom: 2px solid #000;
}
.fehu-table td {
    font-size: 13px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--line);
}

.fehu-row:hover { background: #fafafa; }

.fehu-table a { color: #000; text-decoration: underline; font-weight: 400; }
.fehu-table a:visited { color: #000; }
.fehu-table a:hover { opacity: .65; }

.badge-fehu {
    font-size: 11px;
    padding: 4px 8px;
    border: 1px solid #000;
    letter-spacing: .06em;
    display: inline-block;
}

.badge-paid     { background: #000; color: #fff; }
.badge-pending  { border-style: dashed; color: #000; }
.badge-failed   { border-color: #000; color: #000; opacity: .5; }
.badge-refunded { border-color: #000; color: #000; opacity: .7; }

/* responsive table */
@media (max-width: 768px) {
    .section-menu-inner { gap: 26px; overflow-x: auto; }
    .menu-sub { position: static; border: 0; padding: 6px 0 0; }
    .section-menu::after { display: none; }

    .fehu-table thead { display: none; }
    .fehu-row {
        display: block;
        padding: 14px 0;
        border-bottom: 1px solid var(--line);
    }
    .fehu-row td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 6px 0;
        border: 0;
        font-size: 13px;
    }
    .fehu-row td::before {
        content: attr(data-label);
        font-size: 11px;
        letter-spacing: .14em;
        text-transform: uppercase;
        color: var(--muted);
        flex-shrink: 0;
    }
    .badge-fehu { font-size: 10px; }
}

/* Profile/support grids (scoped by container, avoids fighting deal/news) */
.fehu-content .grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}
@media (max-width: 900px) {
    .fehu-content .grid { grid-template-columns: 1fr; }
}

/* Profile */
.profile-head { display: flex; align-items: center; gap: 18px; }

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-meta { font-size: 13px; color: var(--muted); }

.fehu-content .field { margin-bottom: 14px; }
.fehu-content .field label {
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #777;
    display: block;
    margin-bottom: 4px;
}
.fehu-content .field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: #fff;
}

.stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--line);
}
.stat:last-child { border-bottom: 0; }

.actions {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 18px;
    margin-top: 28px;
}
@media (max-width: 900px) { .actions { grid-template-columns: 1fr; } }

.action {
    border: 1px solid var(--line);
    padding: 20px;
    text-align: center;
}
.action h4 {
    font-size: 13px;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.action p {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 12px;
}
.action a {
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none;
    color: #000;
}

/* Support */
.support-mail {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .04em;
    margin-top: 6px;
}
.support-mail a { color: #000; text-decoration: none; }

.btn-submit {
    margin-top: 6px;
    padding: 14px 18px;
    background: #000;
    color: #fff;
    border: 0;
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    cursor: pointer;
}

@media (max-width: 768px) {
    .page-title { font-size: 22px; }
    .fehu-page { padding: 18px 16px 0; }
    .section-menu { display: none; }
}


/* =========================================================
   16) FOOTER (single, cleaned)
========================================================= */
footer {
    border-top: 1px solid var(--line);
    text-align: center;
    padding: 16px 12px;
    color: var(--muted);
    font-size: 0.85rem;
    background: #fff;
}

@media (max-width: 768px) {
    footer { font-size: 0.75rem; padding: 12px 10px; }
}


/* =========================================================
   17) TOAST
========================================================= */
.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    padding: 14px 18px;
    background: #000;
    color: #fff;
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all .25s ease;
    z-index: 2000;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: #000; }
.toast.error { background: #b00020; }

.fehu-pagination{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:12px;
    margin-top:30px;
    padding-top:18px;
    border-top:1px solid #111;
}

.fehu-page-link{
    min-width:38px;
    height:38px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    color:#000;
    border:1px solid transparent;
    font-size:13px;
    letter-spacing:.08em;
    transition:.25s;
}

.fehu-page-link:hover{
    color:#000;
}

.fehu-page-link.active{
    color:#000;
    border-color:#000;
}

.fehu-page-link.arrow{
    font-size:18px;
    padding:0 6px;
}


/* =========================================================
   18) LEGACY BLOCK (commented out to prevent conflicts)
   ---------------------------------------------------------
   Этот блок ломал FEHU UI из-за глобальных:
   - body / header / footer / .card / .grid / .container
   Если он реально нужен — лучше вынести в отдельный файл
   и подключать только на legacy-страницах.
========================================================= */
/*
.container { max-width: 1200px; padding: 0 20px; }
header { background: #2c3e50; color: white; }
header a { color: white; text-decoration: none; }
header h1 a { font-size: 1.5rem; }
nav a { margin-left: 20px; font-weight: 500; }
main { padding: 2rem 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-top: 20px; }
.card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  text-decoration: none;
  color: inherit;
}
.card:hover { transform: translateY(-5px); }
.card img { width: 100%; height: 180px; object-fit: cover; }
.card h3 { padding: 15px 15px 5px; font-size: 1.1rem; }
.price { padding: 0 15px 15px; color: #e74c3c; font-weight: bold; font-size: 1.2rem; }

.product-detail { display: flex; gap: 30px; background: white; padding: 30px; border-radius: 12px; }
.product-detail img { width: 400px; height: 400px; object-fit: cover; border-radius: 12px; }
.product-detail button { margin-top: 20px; padding: 12px 24px; background: #27ae60; color: white; border: none; border-radius: 6px; font-size: 1.1rem; cursor: pointer; }

footer { background: #2c3e50; color: #bdc3c7; text-align: center; padding: 1.5rem 0; margin-top: 4rem; }

.container { max-width: 800px; margin: auto; padding: 0 1rem; }
.form-group { margin-bottom: 1.5rem; }
label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
input, select, textarea { width: 100%; padding: 0.75rem; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; }

button { background: #27ae60; color: white; padding: 0.75rem 1.5rem; border: none; border-radius: 6px; font-size: 1.1rem; cursor: pointer; }
button:hover { background: #219653; }

.progress-bar { display: flex; justify-content: space-between; margin-bottom: 2rem; position: relative; }
.progress-bar::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 4px; background: #ddd; z-index: -1; }

.step { height: 13px; background: #ddd; color: #666; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; transition: 0.3s; }
.step.active { background: #27ae60; color: white; }
.step.future { opacity: 0.6; }

.btn-prev { background: #95a5a6; margin-right: 1rem; }
.btn-prev:hover { background: #7f8c8d; }

.user-info { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.btn-login, .btn-logout { background: #3498db; color: white; border: none; padding: 0.4rem 0.8rem; border-radius: 4px; font-size: 0.85rem; cursor: pointer; }
.btn-login:hover, .btn-logout:hover { background: #2980b9; }

#current-user-id { font-weight: 600; color: #27ae60; }
.countdown { font-weight: bold; color: #e67e22; }
.finished { color: #c0392b; }

.timeline { display: flex; justify-content: space-between; margin: 1.5rem 0; }
.step { text-align: center; padding: 1.5rem; border-radius: 6px; background: #ecf0f1; font-size: 0.9rem; }
.step.active { background: #d4edda; font-weight: bold; }

.bid-form { background: #f8f9fa; padding: 1rem; border-radius: 8px; margin: 1.5rem 0; }
*/
