* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: #0d0d0d;
    color: #f4f4f4;
    font-family: Tahoma, Verdana, Arial, sans-serif;
    font-size: 13px;
}
a { color: #d8d8d8; font-weight: bold; text-decoration: none; }
a:hover { color: #fff; text-decoration: none; }
strong { color: #fff; }
input, select, textarea, button { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; }
input, select, textarea { background: #f5f5f5; border: 1px solid #909090; color: #000; padding: 5px 7px; }
textarea { width: 100%; min-height: 90px; resize: vertical; }
button, .button {
    display: inline-block;
    border: 1px solid #090909;
    background: linear-gradient(#3f3f3f, #111);
    color: #fff;
    font-weight: bold;
    padding: 4px 10px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
}
button:hover, .button:hover { background: linear-gradient(#555, #181818); color: #fff; }
.small { font-size: 12px; color: #d9d9d9; }
.muted { color: #aaa !important; }
.none { color: #d8d8d8; font-weight: bold; }
.ok-text { color: #00d11f; font-weight: bold; }
.bad-text { color: #ff2222; font-weight: bold; }
.warning, .orange-text { color: #ff9b00; font-weight: bold; }

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 50px;
    background: radial-gradient(circle at top, #333 0, #111 35%, #050505 100%);
}
.login-shell {
    width: min(920px, calc(100% - 30px));
    background: #1d1d1d;
    border: 1px solid #3b3b3b;
    padding: 18px;
    box-shadow: 0 12px 35px rgba(0,0,0,.65);
}
.login-shell h1 { margin: 0 0 12px; font-size: 28px; color: #ddd; text-shadow: 0 0 12px #fff; }
.login-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.panel { background: #242424; border: 1px solid #555; padding: 12px; }
.panel h2 { margin: -12px -12px 12px; padding: 5px 8px; background: linear-gradient(#ffb029, #cf7100 45%, #8d4100); color: #fff; font-size: 16px; }
.panel label { display: block; margin-top: 8px; font-weight: bold; }
.panel input { width: 100%; margin-top: 3px; }
.panel button { margin-top: 12px; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    display: grid;
    grid-template-columns: 215px 1fr;
    min-height: 103px;
    background: #050505;
    border-bottom: 2px solid #4b2b00;
    box-shadow: 0 2px 10px rgba(0,0,0,.8);
}
.topbar-brand {
    min-height: 103px;
    padding: 9px 12px;
    border-right: 2px solid #9a5c00;
    background: linear-gradient(90deg, #0b0b0b, #151515 65%, #080808);
}
.topbar-title { display: block; color: #fff; font-size: 28px; line-height: 30px; font-weight: bold; text-decoration: none; text-shadow: 0 0 7px rgba(255,255,255,.55); }
.topbar-clock { margin-top: 2px; color: #fff; font-size: 12px; font-weight: normal; }
.topbar-message-row { margin-top: 4px; min-height: 24px; display: flex; align-items: center; gap: 8px; }
.inbox-alert { color: #dcdcdc; font-weight: normal; text-decoration: none; font-size: 12px; }
.topbar-stats { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); align-content: start; gap: 10px 18px; padding: 26px 16px 0; }
.topbar-stat { min-height: 20px; color: #fff; white-space: nowrap; }
.topbar-stat span { font-weight: bold; color: #fff; }
.topbar-stat strong { color: #fff; font-weight: bold; }

.header-cash { display: inline-block; transition: color .2s ease, transform .2s ease, text-shadow .2s ease; }
.header-cash.cash-gain { color: #00ff3c !important; transform: scale(1.15); text-shadow: 0 0 8px #00ff3c, 0 0 16px rgba(0,255,60,.55); animation: cashPulse .55s ease-in-out infinite alternate; }
.header-cash.cash-loss { color: #ff3030 !important; transform: scale(1.15); text-shadow: 0 0 8px #ff3030, 0 0 16px rgba(255,48,48,.55); animation: cashPulse .55s ease-in-out infinite alternate; }
@keyframes cashPulse { from { transform: scale(1.08); } to { transform: scale(1.18); } }
.header-rank { display: inline-block; }
.header-rank.rank-promoted { color: #ff9b00 !important; text-shadow: 0 0 8px #ff9b00, 0 0 16px rgba(255,155,0,.65); animation: rankPromotionBounce .55s ease-in-out infinite; }
@keyframes rankPromotionBounce { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-5px) scale(1.18); } 70% { transform: translateY(0) scale(1.05); } 100% { transform: translateY(0) scale(1); } }
.inbox-star { color: #ff9b00 !important; font-size: 25px; line-height: 25px; text-decoration: none !important; display: inline-block; text-shadow: 0 0 7px #ff9b00, 0 0 15px rgba(255,155,0,.55); }
.inbox-star:hover { color: #ffc56d !important; }
.inbox-star.spin { animation: inboxStarSpin 1.05s linear infinite; }
@keyframes inboxStarSpin { from { transform: rotate(0deg) scale(1); } 50% { transform: rotate(180deg) scale(1.18); } to { transform: rotate(360deg) scale(1); } }

.game-body { display: flex; flex: 1; align-items: stretch; }
.sidebar { width: 190px; min-width: 190px; background: #151515; border-right: 1px solid #343434; padding: 8px 8px 20px; }
.side-group { margin-bottom: 12px; }
.side-group h3 { margin: 0 0 3px; padding: 4px 7px; background: linear-gradient(#373737, #151515); border: 1px solid #333; color: #fff; font-size: 14px; }
.side-group a, .logout { display: block; padding: 3px 8px; color: #efefef; text-decoration: none; border-bottom: 1px solid #222; font-weight: normal; }
.side-group a:hover, .side-group a.active, .logout:hover { background: #2a2a2a; color: #fff; }
.logout { margin-top: 15px; color: #ffb3b3; }
.main-frame { flex: 1; padding: 14px; background: radial-gradient(circle at top left, #2b2b2b 0, #161616 270px, #101010 100%); overflow: auto; }
h1 { margin: 0 0 14px; font-size: 24px; color: #cfcfcf; padding-left: 8px; background: linear-gradient(90deg, #303030, rgba(48,48,48,0)); text-shadow: 0 0 10px #ffffff; }
h1::before { content: '★ '; color: #fff; }
h2.section-title, .orange-title { margin: 14px 0 0; padding: 4px 7px; background: linear-gradient(#ffb326, #d67700 45%, #8f4400); border: 1px solid #000; color: #fff; font-size: 16px; }
.data-table { width: 100%; border-collapse: collapse; background: #222; border: 1px solid #555; margin: 0 0 14px; }
.data-table th { text-align: left; padding: 5px 7px; background: linear-gradient(#ffb326, #d67700 45%, #8f4400); border: 1px solid #000; color: #fff; }
.data-table td { padding: 6px 7px; border: 1px solid #000; background: #242424; vertical-align: top; }
.data-table tr:nth-child(even) td { background: #1e1e1e; }
.form-table { max-width: 760px; }
.form-table td:first-child { width: 220px; font-weight: bold; }
.form-inline { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flash, .error-box { border: 1px solid #555; background: #222; padding: 8px 10px; margin-bottom: 10px; font-weight: bold; }
.flash.ok { border-color: #0a8f1d; color: #b7ffbf; }
.flash.error, .error-box { border-color: #b00000; color: #ffd0d0; }
.flash.warn { border-color: #c58700; color: #fff1a8; }
.info-box { background: #1f1f1f; border: 1px solid #555; padding: 10px; max-width: 860px; margin: 10px 0; }
.profile-card { display: grid; grid-template-columns: minmax(420px, 760px) 260px; gap: 0; align-items: stretch; max-width: 980px; }
.profile-table { margin: 0; }
.profile-table td:first-child { width: 210px; font-weight: bold; }
.profile-table .quote-cell { min-height: 120px; }
.profile-side-picture { background: #050505; border: 1px solid #000; border-left: 0; min-height: 330px; display: flex; align-items: flex-start; justify-content: center; padding: 8px; }
.profile-side-picture img { max-width: 100%; max-height: 520px; object-fit: contain; }
.no-side-picture { width: 100%; min-height: 300px; border: 1px solid #333; background: #090909; display: flex; align-items: center; justify-content: center; color: #898989; font-size: 12px; }
.profile-hyper { color: #ff9b00; font-weight: bold; }
.profile-property-row td:first-child { color: #ff9b00; }
.username-link, .crewname-link, .profile-link { color: #d8d8d8; font-weight: normal; text-decoration: none; }
.username-link:hover, .crewname-link:hover, .profile-link:hover { color: #fff; }
.players-online-list a { text-decoration: none; font-weight: normal; margin-right: 8px; line-height: 20px; }
.players-online-list .crewleader { font-weight: bold; }
.players-online-list .property-owner { color: #ffcc00; }
.players-online-list .crewleader.property-owner { color: #ffcc00; font-weight: bold; }
.cards-zone { display: flex; gap: 8px; align-items: flex-start; min-height: 112px; }
.slot-reels { font-size: 42px; letter-spacing: 10px; margin: 8px 0; }

@media (max-width: 900px) {
    .topbar { grid-template-columns: 1fr; }
    .topbar-brand { border-right: 0; border-bottom: 1px solid #4b2b00; min-height: auto; }
    .topbar-stats { grid-template-columns: repeat(2, minmax(120px, 1fr)); padding: 10px 12px; }
    .game-body { flex-direction: column; }
    .sidebar { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .profile-card, .login-grid { grid-template-columns: 1fr; }
    .profile-side-picture { border-left: 1px solid #000; }
}

/* v1.5: Bulletfactory */
.bulletfactory-ownerless,
.bulletfactory-info-table,
.bulletfactory-buy-table,
.lead-market-table {
    max-width: 850px;
}
.lead-market-table th,
.lead-market-table td {
    white-space: nowrap;
}

/* v1.6: casino pages */
.casino-owner-info {
    max-width: 820px;
    line-height: 1.45;
}
.roulette-board {
    width: 360px;
    max-width: 100%;
    min-height: 220px;
    margin: 12px 0;
    border: 1px solid #4a4a4a;
    background: radial-gradient(circle at center, #461100 0, #1c1c1c 56%, #080808 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 25px rgba(0,0,0,.8);
}
.roulette-wheel {
    width: 175px;
    height: 175px;
    border-radius: 50%;
    border: 7px solid #d68000;
    background: radial-gradient(circle, #101010 0, #262626 42%, #7a0000 43%, #7a0000 57%, #111 58%);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 0 7px #000;
}
.roulette-wheel span {
    font-size: 13px;
    color: #ffcf79;
}
.roulette-form .option-line {
    display: inline-block;
    min-width: 115px;
    margin-right: 8px;
}
.slot-machine-box {
    max-width: 520px;
    border: 1px solid #555;
    background: linear-gradient(#2b2b2b, #0b0b0b);
    padding: 18px;
    margin: 10px 0;
    text-align: center;
    box-shadow: inset 0 0 20px rgba(255,153,0,.12);
}
.slot-machine-box .slot-reels {
    display: inline-block;
    min-width: 320px;
    padding: 18px 10px;
    border: 2px solid #c87500;
    background: #050505;
    color: #fff;
    font-size: 38px;
    letter-spacing: 7px;
    text-shadow: 0 0 7px #ff9b00;
}
.blackjack-ownerless .link-button {
    font-size: 13px;
}


/* v1.8.1 blackjack + countries polish */
.blackjack-cards-table {
    width: 760px;
    max-width: 100%;
    table-layout: fixed;
}
.blackjack-active-table th,
.blackjack-finished-table th {
    line-height: 18px;
}
.blackjack-active-table th:nth-child(1),
.blackjack-active-table th:nth-child(2),
.blackjack-finished-table th:nth-child(1),
.blackjack-finished-table th:nth-child(2) {
    width: 50%;
}
.blackjack-cards-table .cards-zone {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px;
    align-items: flex-start;
    min-height: 112px;
    margin: 4px 0 6px;
    white-space: normal !important;
}
.blackjack-cards-table .playing-card {
    width: 74px !important;
    height: 100px !important;
    min-width: 74px;
    display: inline-block !important;
    position: relative;
    border-radius: 4px;
    border: 1px solid #777;
    background: #fff;
    color: #090909;
    box-shadow: 1px 1px 2px rgba(0,0,0,.85);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 20px;
    padding: 5px;
    flex: 0 0 auto;
}
.blackjack-cards-table .playing-card .card-rank {
    position: absolute;
    font-weight: bold;
    line-height: 18px;
}
.blackjack-cards-table .playing-card .top-left {
    top: 4px;
    left: 6px;
}
.blackjack-cards-table .playing-card .bottom {
    right: 6px;
    bottom: 4px;
    transform: rotate(180deg);
}
.blackjack-cards-table .playing-card .card-suit {
    position: absolute;
    top: 34px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 36px;
    line-height: 36px;
}
.blackjack-cards-table .red-card {
    color: #d00000 !important;
}
.blackjack-cards-table .hidden-card.dealer-card-back {
    background: radial-gradient(circle at center, #224c93 0, #0b1e4e 56%, #050a1f 100%) !important;
    color: #e8e8e8;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-color: #06122c;
}
.blackjack-cards-table .hidden-card.dealer-card-back span {
    font-size: 40px;
    text-shadow: 0 0 8px #000;
}
.blackjack-score {
    clear: both;
    font-weight: bold;
    color: #fff;
    margin-top: 3px;
}
.blackjack-result-text {
    max-width: 760px;
    margin: 18px 0 14px;
    font-weight: bold;
    line-height: 1.25;
}
.blackjack-result-text.bad-text {
    color: #ff3030 !important;
}
.blackjack-result-actions {
    margin-top: 8px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.blackjack-result-actions form {
    margin: 0;
}
.blackjack-active-table .timer-box {
    width: 105px;
    text-align: center;
    vertical-align: top;
    font-weight: bold;
}
.blackjack-active-table .timer-bar-wrap {
    height: 120px;
    width: 32px;
    border: 1px solid #000;
    margin: 8px auto 0;
    display: flex;
    align-items: flex-end;
    background: #080808;
}
.blackjack-active-table .timer-bar {
    width: 100%;
    background: #00b000;
}
.countries-table th,
.countries-table td {
    white-space: nowrap;
}

/* v1.8.1: optimized Blackjack card visuals */
.blackjack-result-text {
    max-width: 850px;
    margin: 18px 0 14px;
    color: #ff9b00;
    font-weight: bold;
    line-height: 1.25;
}
.blackjack-result-text.bad-text,
.blackjack-result-text.blackjack-result-error {
    color: #ff3030;
}
.blackjack-result-text.blackjack-result-warn {
    color: #ffcf4a;
}
.blackjack-cards-table {
    width: 760px;
    max-width: 100%;
    margin-top: 6px;
}
.blackjack-cards-table th {
    font-size: 15px;
    padding: 3px 6px;
    line-height: 18px;
}
.blackjack-cards-table td {
    padding: 7px 9px;
    vertical-align: top;
}
.blackjack-active-table .timer-box {
    width: 105px;
    text-align: center;
    vertical-align: top;
    font-weight: bold;
}
.blackjack-time-head {
    text-align: center !important;
}
.cards-zone {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    min-height: 112px;
    margin: 4px 0 6px;
    flex-wrap: wrap;
}
.playing-card {
    width: 74px;
    height: 100px;
    border-radius: 4px;
    border: 1px solid #777;
    background: #fff;
    color: #090909;
    box-shadow: 1px 1px 2px rgba(0,0,0,.85);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 20px;
    position: relative;
    padding: 5px;
    flex: 0 0 auto;
}
.playing-card .card-rank {
    position: absolute;
    font-weight: bold;
    line-height: 18px;
}
.playing-card .top-left {
    top: 4px;
    left: 6px;
}
.playing-card .bottom {
    right: 6px;
    bottom: 4px;
    transform: rotate(180deg);
}
.playing-card .card-suit {
    position: absolute;
    top: 34px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 36px;
    line-height: 36px;
}
.red-card {
    color: #d00000;
}
.hidden-card.dealer-card-back {
    background: radial-gradient(circle at center, #224c93 0, #0b1e4e 56%, #050a1f 100%);
    color: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: #06122c;
}
.hidden-card.dealer-card-back span {
    font-size: 40px;
    text-shadow: 0 0 8px #000;
}
.blackjack-score {
    margin-top: 3px;
    font-weight: bold;
}
.blackjack-actions {
    width: 760px;
    max-width: 100%;
    margin-top: 14px;
}
.blackjack-actions td {
    text-align: center;
    padding: 5px;
}
.blackjack-actions form,
.blackjack-result-actions form {
    margin: 0;
}
.blackjack-result-actions {
    margin-top: 8px;
}
.blackjack-result-actions .inline-form {
    margin-right: 8px;
}
.timer-bar-wrap {
    height: 190px;
    width: 34px;
    border: 1px solid #000;
    margin: 8px auto;
    display: flex;
    align-items: flex-end;
    background: #080808;
}
.timer-bar {
    width: 100%;
    background: #00b000;
}


/* v1.8.1: Blackjack card layout and result screen */
.blackjack-result-text {
    max-width: 820px;
    margin: 18px 0 14px;
    color: #ff9b00;
    font-weight: bold;
    line-height: 1.35;
}
.blackjack-result-text.bad-text,
.blackjack-result-text.error {
    color: #ff3030;
}
.blackjack-result-text.warn {
    color: #ff9b00;
}
.blackjack-cards-table {
    width: 760px;
    max-width: 100%;
    margin-top: 6px;
}
.blackjack-cards-table th {
    font-size: 15px;
    padding: 3px 6px;
    line-height: 18px;
}
.blackjack-cards-table td {
    padding: 7px 9px;
}
.blackjack-cards-table .cards-zone {
    min-height: 112px;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 4px;
}
.blackjack-active-table .timer-box {
    width: 105px;
    text-align: center;
    vertical-align: top;
    font-weight: bold;
}
.blackjack-time-head {
    text-align: center !important;
}
.playing-card {
    width: 74px;
    height: 100px;
    border-radius: 4px;
    border: 1px solid #777;
    background: #fff;
    color: #090909;
    box-shadow: 1px 1px 2px rgba(0,0,0,.85);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 20px;
    position: relative;
    padding: 5px;
    flex: 0 0 auto;
}
.playing-card .card-rank {
    position: absolute;
    font-weight: bold;
    line-height: 18px;
}
.playing-card .top-left {
    top: 4px;
    left: 6px;
}
.playing-card .bottom {
    right: 6px;
    bottom: 4px;
    transform: rotate(180deg);
}
.playing-card .card-suit {
    position: absolute;
    top: 34px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 36px;
    line-height: 36px;
}
.red-card {
    color: #d00000;
}
.hidden-card.dealer-card-back {
    background: radial-gradient(circle at center, #224c93 0, #0b1e4e 56%, #050a1f 100%);
    color: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: #06122c;
}
.hidden-card.dealer-card-back span {
    font-size: 40px;
    text-shadow: 0 0 8px #000;
}
.blackjack-score {
    margin-top: 4px;
    font-weight: bold;
}
.blackjack-actions {
    width: 760px;
    max-width: 100%;
    margin-top: 14px;
}
.blackjack-actions td {
    text-align: center;
    padding: 5px;
}
.blackjack-actions form {
    margin: 0;
}
.timer-bar-wrap,
.blackjack-timer-wrap {
    height: 190px;
    width: 34px;
    border: 1px solid #000;
    margin: 8px auto;
    display: flex;
    align-items: flex-end;
    background: #080808;
}
.timer-bar,
.blackjack-timer-bar {
    width: 100%;
    background: #00b000;
}
.blackjack-timer-time {
    margin-bottom: 4px;
}
.link-form {
    display: inline;
}
.link-button {
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #d8d8d8;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}
.link-button:hover {
    color: #ffffff;
    text-decoration: underline;
}
.link-button.orange-link,
.orange-link.link-button {
    color: #ff9b00;
    text-decoration: underline;
}
.link-button.orange-link:hover,
.orange-link.link-button:hover {
    color: #ffc56d;
}
.muted-link {
    margin-left: 12px;
    color: #aaa !important;
    font-weight: normal;
}
.blackjack-play-again,
.blackjack-new-bet,
.blackjack-claim-form {
    margin-top: 8px;
}

/* v1.11: kill page */
.kill-result-block {
    max-width: 800px;
    margin-bottom: 12px;
}
.kill-form-table input[type="text"],
.kill-form-table input[type="number"] {
    max-width: 420px;
}

/* v1.11: kill page */
.kill-result-box {
    max-width: 760px;
    margin: 10px 0 14px;
    padding: 10px 12px;
    background: #1f1f1f;
    border: 1px solid #444;
}
.kill-result-box p {
    margin: 5px 0;
}


/* v1.13: Organized Crime */
.oc-team-table td,
.oc-team-table th {
    vertical-align: middle;
}
.oc-equipment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 12px;
    max-width: 1100px;
}
.oc-equipment-grid .data-table {
    margin-bottom: 0;
}
@media (max-width: 980px) {
    .oc-equipment-grid {
        grid-template-columns: 1fr;
    }
}

/* v1.13 Organized Crime */
.oc-equipment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 12px;
    max-width: 1100px;
}
.oc-equipment-grid .data-table {
    margin-bottom: 0;
}
.oc-team-table {
    max-width: 980px;
}
@media (max-width: 1000px) {
    .oc-equipment-grid {
        grid-template-columns: 1fr;
    }
}

/* v1.15: Domination map and HQ controls */
.domination-statusbar {
    max-width: 1040px;
    background: #121212;
    border: 1px solid #222;
    padding: 9px 10px;
    margin: 0 0 14px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.domination-statusbar span { white-space: nowrap; }
.domination-top-table { max-width: 1040px; }
.crew-color-dot {
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-right: 8px;
    border: 1px solid #000;
    vertical-align: -2px;
}
.domination-layout {
    display: grid;
    grid-template-columns: minmax(520px, 760px) minmax(280px, 380px);
    gap: 16px;
    align-items: start;
    max-width: 1180px;
}
.country-map-stage {
    position: relative;
    width: 100%;
    max-width: 820px;
    aspect-ratio: var(--map-ratio);
    background-color: #050505;
    border: 1px solid #1f1f1f;
    overflow: hidden;
}
.country-map-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}
.map-plot {
    position: absolute;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.42);
    color: #fff;
    text-shadow: 0 1px 3px #000, 0 0 5px #000;
    text-decoration: none;
    font-weight: normal;
    font-size: 12px;
    line-height: 1.05;
    padding: 2px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.28);
    opacity: .90;
}
.map-plot:hover {
    color: #fff;
    text-decoration: none;
    border-color: #fff;
    opacity: 1;
    box-shadow: 0 0 8px rgba(255,255,255,.55), inset 0 0 0 1px rgba(0,0,0,.35);
}
.map-plot.free {
    background: rgba(255,255,255,.035) !important;
    border-color: rgba(255,255,255,.32);
}
.map-plot.owned {
    border-color: rgba(255,255,255,.68);
}
.map-plot.selected {
    border: 2px solid #ff9b00;
    box-shadow: 0 0 10px #ff9b00, inset 0 0 0 1px #000;
    z-index: 3;
}
.map-plot.cooling { opacity: .45; }
.plot-number { font-weight: normal; }
.plot-hq-label {
    color: #ffff00;
    font-weight: normal;
    font-size: 11px;
    text-shadow: 0 0 4px #000;
}
.domination-panel .data-table,
.domination-panel .form-table { max-width: none; width: 100%; }
.selected-plot-table td:first-child,
.hq-options-table td:first-child { width: 105px; }
.hq-options-table input[type="text"] { width: 150px; }
.option-line {
    display: block;
    padding: 4px 0;
    color: #f5f5f5;
    font-weight: normal;
}
.option-line input {
    vertical-align: middle;
    margin-right: 6px;
}
.info-box {
    background: #1f1f1f;
    border: 1px solid #555;
    padding: 10px;
    max-width: 760px;
    margin: 10px 0;
}
.inline-form { display: inline-block; margin: 0; }
@media (max-width: 1100px) {
    .domination-layout { grid-template-columns: 1fr; }
}

/* v15.1: domination map clarity */
.domination-map-note { color: #bfbfbf; }

/* v1.15.1: optimized domination maps with visible country silhouettes */
.domination-layout {
    grid-template-columns: minmax(560px, 820px) minmax(260px, 360px);
    gap: 16px;
    align-items: start;
}
.country-map-stage {
    position: relative;
    width: 100%;
    max-width: 820px;
    aspect-ratio: var(--map-ratio);
    background: #050505;
    border: 1px solid #333;
    overflow: hidden;
    box-shadow: inset 0 0 45px rgba(255,255,255,.05), 0 0 14px rgba(0,0,0,.6);
}
.country-map-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    z-index: 0;
    pointer-events: none;
    user-select: none;
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(255,255,255,.18));
}
.map-plot {
    z-index: 2;
    backdrop-filter: none;
    border: 1px solid rgba(255,255,255,.55);
    color: #fff;
    text-shadow: 0 0 4px #000, 0 1px 2px #000;
    opacity: .88;
}
.map-plot.free {
    background: rgba(255,255,255,.08) !important;
    color: rgba(255,255,255,.8);
}
.map-plot.owned {
    opacity: .82;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.5), 0 0 4px rgba(0,0,0,.55);
}
.map-plot:hover {
    opacity: 1;
    border-color: #fff;
    box-shadow: 0 0 9px rgba(255,255,255,.55), inset 0 0 0 1px #000;
}
.map-plot.selected {
    z-index: 4;
    opacity: 1;
    border: 2px solid #ff9b00;
    box-shadow: 0 0 12px #ff9b00, inset 0 0 0 1px #000;
}
.plot-number {
    font-size: 12px;
}
.plot-hq-label {
    color: #ffff00;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 0 0 5px #000, 0 1px 2px #000;
}


/* v1.15.4: precise domination plot grid over country silhouettes */
.country-map-stage {
    background: radial-gradient(circle at center, #151515 0, #080808 72%, #030303 100%);
}
.map-plot {
    border-color: rgba(255,255,255,.62);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.45);
}
.map-plot.free {
    background: rgba(255,255,255,.045) !important;
}
.map-plot.owned {
    opacity: .76;
}
.map-plot.selected {
    opacity: 1;
}
.country-map-img {
    opacity: 1;
}

/* v12: Drugs Market / Airport drugsrun */
.airport-travel-info {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}
.drugs-market-table .market-amount-input {
    width: 82px;
}
.drugs-market-table td,
.drugs-market-table th {
    vertical-align: middle;
}
.drugs-market-info {
    max-width: 820px;
}
.sell-form-row {
    gap: 6px;
}


/* v1.20: domination plot maps use the approved 800x700 guide coordinate system.
   The source silhouettes are placed from the left edge so the HTML plots line up
   with the red plot distribution guides supplied for each country. */
.country-map-img {
    object-position: left center !important;
}
.country-map-stage {
    max-width: 820px;
}
.map-plot {
    box-sizing: border-box;
}

/* v1.21: requested visual optimizations */
.topbar-stat span {
    color: #ff9b00 !important;
    font-weight: bold !important;
}
.topbar-stat strong,
.topbar-stat strong a,
.topbar-stat .crew-profile-link,
.topbar-stat .crewname-link {
    color: #fff !important;
    font-weight: normal !important;
    text-decoration: none !important;
}
.header-health-wrap {
    position: relative;
    display: inline-block;
    width: 112px;
    height: 16px;
    border: 1px solid #000;
    background: #111;
    vertical-align: -3px;
    box-shadow: inset 0 0 4px rgba(0,0,0,.9);
}
.header-health-fill {
    position: absolute;
    inset: 0 auto 0 0;
    height: 100%;
    transition: width .25s ease;
}
.header-health-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    text-shadow: 0 1px 2px #000;
}
.health-good .header-health-fill { background: linear-gradient(#22dd3d, #078a16); }
.health-mid .header-health-fill { background: linear-gradient(#ffb326, #d67700); }
.health-low .header-health-fill { background: linear-gradient(#ff3c3c, #9b0000); }
.topbar-hospital-banner {
    grid-column: 1 / -1;
    margin-top: -2px;
    padding: 7px 10px;
    border: 1px solid #c00000;
    background: linear-gradient(90deg, #6d0000, #3b0000 55%, #160000);
    color: #ffe2e2;
    font-weight: normal;
    text-shadow: 0 1px 4px #000;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 0 13px rgba(255,0,0,.35);
    animation: hospitalPulse 1.2s ease-in-out infinite alternate;
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: normal;
}
.hospital-banner-title {
    display: inline-block;
    color: #ffb326;
    font-weight: bold;
    font-size: 15px;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.hospital-banner-title::before {
    content: '✚ ';
    color: #ff3030;
    text-shadow: 0 0 8px #ff3030;
}
.hospital-banner-text {
    color: #fff;
    font-weight: bold;
}
@keyframes hospitalPulse {
    from { box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 0 5px rgba(255,0,0,.25); }
    to { box-shadow: inset 0 0 0 1px rgba(255,255,255,.09), 0 0 18px rgba(255,0,0,.75); }
}

.my-properties-page,
.property-narrow,
.property-narrow-table,
.property-admin-box,
.property-section-title {
    max-width: 780px;
}
.property-management-table {
    max-width: 780px;
    width: 780px;
}
.property-management-table td {
    background: #242424 !important;
}
.property-management-table td:first-child {
    width: 220px;
    font-weight: bold;
}
.property-profit-positive {
    color: #00c92b;
    font-weight: bold;
}
.property-profit-negative {
    color: #ff3030;
    font-weight: bold;
}
.reset-profit-form {
    margin-left: 6px;
}
.reset-link {
    color: #d8d8d8 !important;
    font-weight: normal !important;
    text-decoration: underline !important;
}
.auction-toggle {
    min-width: 120px;
}
.auction-start-form {
    margin-top: 8px;
    padding: 8px;
    background: #1b1b1b;
    border: 1px solid #333;
}
.auction-start-form input {
    width: 130px;
}

.stats-page .data-table {
    width: 50%;
    min-width: 560px;
    max-width: 780px;
}
.airport-page .data-table,
.airport-page .info-box,
.airport-page .warning-box,
.black-market-page .data-table,
.black-market-page .orange-title,
.black-market-page .info-box,
.car-theft-page .data-table,
.car-theft-page .orange-title,
.car-theft-page .section-title,
.robbery-narrow,
.robbery-narrow-title {
    max-width: 760px;
    width: 760px;
}
.car-theft-options .radio-line {
    display: block;
    padding: 5px 0;
    line-height: 1.35;
}
.robbery-start-panel {
    width: 760px;
    max-width: 100%;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #333;
    background: #1e1e1e;
}
.robbery-start-button {
    font-size: 15px;
    padding: 8px 18px;
}
.kill-result-box {
    max-width: 780px;
    border: 2px solid #8f4b00;
    background: radial-gradient(circle at top left, #322000, #151515 70%);
    padding: 18px 20px;
    margin: 14px 0 18px;
    box-shadow: 0 0 18px rgba(255,155,0,.22);
}
.kill-result-box .orange-text {
    font-size: 22px;
    line-height: 1.25;
    margin: 6px 0;
    text-shadow: 0 0 8px rgba(255,155,0,.65);
}
.crew-tabs {
    max-width: 780px;
    gap: 0;
    padding: 4px;
    background: #111;
    border: 1px solid #333;
}
.crew-tabs a {
    min-width: 120px;
    text-align: center;
    border: 1px solid #333;
    margin-right: 4px;
    background: linear-gradient(#202020, #0f0f0f);
    color: #fff;
    font-weight: bold;
}
.crew-tabs a.active {
    background: linear-gradient(#ffb326, #d67700 45%, #8f4400);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.property-profile-card {
    display: grid;
    grid-template-columns: minmax(360px, 430px) 340px;
    gap: 0;
    max-width: 780px;
}
.property-profile-table {
    margin: 0;
}
.property-profile-table td:first-child {
    width: 180px;
    font-weight: bold;
}
.property-profile-visual {
    min-height: 220px;
    border: 1px solid #000;
    border-left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.82);
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 1px 5px #000;
}
.property-visual-casino {
    background: radial-gradient(circle at 70% 28%, #c70000 0, transparent 13%), radial-gradient(circle at 35% 65%, #143f85 0, transparent 16%), linear-gradient(135deg, #050505, #3b0b0b 45%, #0c0c0c);
}
.property-visual-bulletfactory {
    background: radial-gradient(circle at center, #8a3a00 0, #241000 55%, #070707 100%);
}
.property-visual-swiss_bank {
    background: radial-gradient(circle at center, #274928 0, #081708 55%, #050505 100%);
}
.property-profile-link {
    color: #ff9b00;
    text-decoration: none;
    font-weight: bold;
}
.property-profile-link:hover {
    color: #ffc56d;
    text-decoration: none;
}

@media (max-width: 1100px) {
    .stats-page .data-table,
    .airport-page .data-table,
    .airport-page .info-box,
    .black-market-page .data-table,
    .black-market-page .orange-title,
    .car-theft-page .data-table,
    .robbery-narrow,
    .robbery-narrow-title {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .property-profile-card {
        grid-template-columns: 1fr;
    }
    .property-profile-visual {
        border-left: 1px solid #000;
    }
}

/* v1.22: requested UI refinements */
.topbar-stat .header-health-text {
    color: #fff !important;
    font-weight: bold !important;
}

/* Keep larger management pages compact and readable. */
.page-drugs_market .data-table,
.page-drugs_market .orange-title,
.page-trade_route .data-table,
.page-trade_route .orange-title,
.page-trade_route .warning-box,
.page-trade_route .info-box,
.page-detectives .data-table,
.page-detectives .orange-title,
.page-detectives .warning-box,
.page-detectives .info-box,
.page-crew .data-table,
.page-crew .orange-title,
.page-crew .warning-box,
.page-crew .info-box,
.page-crew .crew-tabs,
.page-auction .data-table,
.page-auction .orange-title,
.page-auction .warning-box,
.page-auction .info-box {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
}

.page-auction .nested-table {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.page-black_market .data-table,
.page-black_market .orange-title,
.page-black_market .info-box,
.black-market-page .data-table,
.black-market-page .orange-title,
.black-market-page .info-box {
    width: 50%;
    min-width: 560px;
    max-width: 760px;
}

.page-airport .data-table,
.page-airport .orange-title,
.page-airport .info-box,
.page-airport .warning-box {
    width: 50%;
    min-width: 560px;
    max-width: 760px;
}

.page-detectives .detective-table,
.page-detectives .report-table,
.page-trade_route .trade-route-request-table,
.page-trade_route .trade-route-recent-table,
.page-trade_route .trade-route-log-table {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
}

/* Auction can contain nested bid tables; keep those usable inside the narrow layout. */
.page-auction .auction-table td > .data-table {
    width: 100%;
    min-width: 0;
    max-width: none;
}

/* Car Theft choices always under each other. */
.page-car_theft .car-theft-options .radio-line,
.page-car_theft .car-theft-options .option-line {
    display: block;
    margin: 4px 0;
    line-height: 1.35;
}

.swiss-bank-ownerless-box .orange-text {
    font-size: 14px;
}

@media (max-width: 1100px) {
    .page-drugs_market .data-table,
    .page-drugs_market .orange-title,
    .page-trade_route .data-table,
    .page-trade_route .orange-title,
    .page-trade_route .warning-box,
    .page-trade_route .info-box,
    .page-detectives .data-table,
    .page-detectives .orange-title,
    .page-detectives .warning-box,
    .page-detectives .info-box,
    .page-crew .data-table,
    .page-crew .orange-title,
    .page-crew .warning-box,
    .page-crew .info-box,
    .page-crew .crew-tabs,
    .page-auction .data-table,
    .page-auction .orange-title,
    .page-auction .warning-box,
    .page-auction .info-box,
    .page-black_market .data-table,
    .page-black_market .orange-title,
    .page-black_market .info-box,
    .page-airport .data-table,
    .page-airport .orange-title,
    .page-airport .info-box,
    .page-airport .warning-box {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}


/* v1.23: compact tables and admin build bypass UI */
.admin-finish-form {
    margin-left: 8px;
    vertical-align: middle;
}
.admin-finish-form button {
    padding: 2px 7px;
    font-size: 11px;
}

.page-crew_profile .crew-profile-public-table,
.page-crew_profile .orange-title,
.page-crew_profile .info-box,
.page-crew_profile .warning-box,
.page-jail .data-table,
.page-jail .orange-title,
.page-jail .info-box,
.page-jail .warning-box {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
}

.page-jail .form-table {
    width: 50%;
    min-width: 560px;
    max-width: 760px;
}

@media (max-width: 1100px) {
    .page-crew_profile .crew-profile-public-table,
    .page-crew_profile .orange-title,
    .page-crew_profile .info-box,
    .page-crew_profile .warning-box,
    .page-jail .data-table,
    .page-jail .orange-title,
    .page-jail .info-box,
    .page-jail .warning-box,
    .page-jail .form-table {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}


/* v1.24: inbox, crew properties and property profile image polish */
.page-inbox .data-table,
.page-inbox .orange-title,
.page-inbox .info-box,
.page-inbox .warning-box {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
}

.page-crew_properties .data-table,
.page-crew_properties .orange-title,
.page-crew_properties .section-title,
.page-crew_properties .form-table,
.page-crew_properties .info-box,
.page-crew_properties .warning-box {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
}

.page-crew_properties .inline-form,
.page-crew_properties .hidden-form {
    display: inline-block;
    margin: 2px 0;
}

.property-profile-card {
    grid-template-columns: minmax(360px, 430px) 340px;
}

.property-profile-visual {
    background: #050505;
    overflow: hidden;
}

.property-profile-visual img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    display: block;
}

@media (max-width: 1100px) {
    .page-inbox .data-table,
    .page-inbox .orange-title,
    .page-inbox .info-box,
    .page-inbox .warning-box,
    .page-crew_properties .data-table,
    .page-crew_properties .orange-title,
    .page-crew_properties .section-title,
    .page-crew_properties .form-table,
    .page-crew_properties .info-box,
    .page-crew_properties .warning-box {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}


/* v1.26 database-safety/admin tools */
.page-inbox .data-table,
.page-inbox .orange-title,
.page-crew_properties .data-table,
.page-crew_properties .orange-title,
.page-crew_properties .info-box,
.page-admin_tools .admin-tools-table,
.page-admin_tools .admin-tools-title,
.page-admin_tools .admin-tools-box {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
}

.property-profile-visual img {
    max-width: 100%;
    max-height: 260px;
    object-fit: cover;
    display: block;
}

@media (max-width: 1100px) {
    .page-inbox .data-table,
    .page-inbox .orange-title,
    .page-crew_properties .data-table,
    .page-crew_properties .orange-title,
    .page-crew_properties .info-box,
    .page-admin_tools .admin-tools-table,
    .page-admin_tools .admin-tools-title,
    .page-admin_tools .admin-tools-box {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}


/* v1.27: Stock Market */
.page-stock_market .data-table,
.page-stock_market .orange-title,
.page-stock_market .info-box,
.page-stock_market .warning-box,
.page-stock_market .stock-market-note {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
}
.page-stock_market .stock-market-table input,
.page-stock_market .stock-holdings-table input {
    width: 86px;
}
.page-stock_market .form-inline {
    gap: 5px;
}
@media (max-width: 1100px) {
    .page-stock_market .data-table,
    .page-stock_market .orange-title,
    .page-stock_market .info-box,
    .page-stock_market .warning-box,
    .page-stock_market .stock-market-note {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}

/* v1.28: Stock Market 5-minute update layout */
.page-stock_market .stock-market-table,
.page-stock_market .stock-holdings-table,
.page-stock_market .stock-transactions-table,
.page-stock_market .stock-price-log-table,
.page-stock_market .orange-title,
.page-stock_market .info-box,
.page-stock_market .stock-market-note {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
}

@media (max-width: 1100px) {
    .page-stock_market .stock-market-table,
    .page-stock_market .stock-holdings-table,
    .page-stock_market .stock-transactions-table,
    .page-stock_market .stock-price-log-table,
    .page-stock_market .orange-title,
    .page-stock_market .info-box,
    .page-stock_market .stock-market-note {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}


/* v1.29: Crew stats and casino takeover message polish */
.stats-page .crew-stats-table {
    width: 50%;
    min-width: 560px;
    max-width: 780px;
}
.flash a {
    color: #ff9b00;
    text-decoration: none;
    font-weight: bold;
}
.flash a:hover {
    color: #ffc56d;
    text-decoration: none;
}
@media (max-width: 1100px) {
    .stats-page .crew-stats-table {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}

/* v1.30: Jail page visual overhaul */
.jail-page-wrap {
    width: 760px;
    max-width: 100%;
}
.page-jail .jail-page-wrap .data-table,
.page-jail .jail-page-wrap .form-table,
.page-jail .jail-page-wrap .orange-title,
.page-jail .jail-page-wrap .info-box,
.page-jail .jail-page-wrap .warning-box {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}
.jail-intro {
    max-width: 760px;
    line-height: 1.35;
}
.jail-hero-wrap {
    width: 100%;
    border: 1px solid #222;
    background: #050505;
    margin: 0 0 10px;
    overflow: hidden;
}
.jail-hero-image {
    display: block;
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: center center;
    opacity: .92;
}
.jail-status-panel {
    display: flex;
    align-items: center;
    gap: 34px;
    border: 1px solid #333;
    background: #1f1f1f;
    padding: 18px 24px;
    margin: 0 0 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.jail-status-main {
    color: #ff9b00;
    font-size: 24px;
    font-weight: bold;
    white-space: nowrap;
}
.jail-status-time {
    color: #f2f2f2;
    font-size: 16px;
}
.jail-status-time strong {
    color: #ff9b00;
    font-weight: bold;
}
.jail-form-table input[type="number"] {
    width: 170px;
}
.jail-chat-input {
    width: 70%;
    max-width: 520px;
}
.jail-table th,
.jail-chat-table th {
    white-space: nowrap;
}
.jail-table td,
.jail-chat-table td {
    vertical-align: middle;
}

@media (max-width: 800px) {
    .jail-status-panel {
        display: block;
        padding: 14px 16px;
    }
    .jail-status-time {
        margin-top: 8px;
    }
    .jail-hero-image {
        height: 190px;
    }
}


/* v1.31: World map operation panels */
.world-map-title,
.world-map-card {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
}
.world-map-card {
    background: #121212;
    border: 1px solid #333;
    margin: 0 0 14px;
    padding: 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.world-map-card img {
    display: block;
    width: 100%;
    max-height: 430px;
    object-fit: contain;
    background: #050505;
    border: 1px solid #000;
}
.world-map-caption {
    padding: 8px 4px 0;
    color: #d8d8d8;
    line-height: 1.35;
}
.world-map-caption strong {
    color: #ff9b00;
    font-weight: bold;
}
@media (max-width: 1100px) {
    .world-map-title,
    .world-map-card {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}

/* v1.32: Community forums and Newspaper */
.page-forum .forum-table,
.page-forum .forum-titlebar,
.page-forum .forum-box,
.page-crewforum .forum-table,
.page-crewforum .forum-titlebar,
.page-crewforum .forum-box,
.page-newspaper .newspaper-table,
.page-newspaper .newspaper-titlebar,
.page-newspaper .newspaper-box {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
}
.forum-author {
    width: 170px;
}
.forum-actions,
.newspaper-actions {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.page-newspaper .newspaper-table td:first-child,
.page-forum .forum-table td:first-child,
.page-crewforum .forum-table td:first-child {
    vertical-align: top;
}
@media (max-width: 1100px) {
    .page-forum .forum-table,
    .page-forum .forum-titlebar,
    .page-forum .forum-box,
    .page-crewforum .forum-table,
    .page-crewforum .forum-titlebar,
    .page-crewforum .forum-box,
    .page-newspaper .newspaper-table,
    .page-newspaper .newspaper-titlebar,
    .page-newspaper .newspaper-box,
    .forum-actions,
    .newspaper-actions {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}


/* v1.34: Crew Properties layout and technical clarity pass */
.crew-properties-summary {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
}
.crew-properties-quicknav {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 12px;
}
.crew-properties-quicknav a {
    display: inline-block;
    border: 1px solid #333;
    background: #1d1d1d;
    color: #d8d8d8;
    text-decoration: none;
    font-weight: normal;
    padding: 5px 9px;
}
.crew-properties-quicknav a:hover {
    background: #2b2b2b;
    color: #fff;
    text-decoration: none;
}
.crew-properties-dashboard {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 14px;
}
.crew-property-card {
    display: block;
    border: 1px solid #333;
    background: linear-gradient(#242424, #181818);
    padding: 8px 10px;
    min-height: 112px;
    color: #d8d8d8;
    text-decoration: none;
    font-weight: normal;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.crew-property-card:hover {
    color: #fff;
    text-decoration: none;
    border-color: #777;
}
.crew-property-card-title {
    display: block;
    color: #ff9b00;
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 6px;
}
.crew-property-card-status {
    display: inline-block;
    border: 1px solid #555;
    background: #101010;
    padding: 2px 6px;
    margin-bottom: 6px;
    font-size: 11px;
    color: #fff;
}
.crew-property-card-active .crew-property-card-status { color: #b7ffbf; border-color: #0a8f1d; }
.crew-property-card-building .crew-property-card-status { color: #fff1a8; border-color: #c58700; }
.crew-property-card-locked .crew-property-card-status { color: #ffb3b3; border-color: #8f0000; }
.crew-property-card-owner,
.crew-property-card-detail {
    display: block;
    margin-top: 4px;
    line-height: 1.3;
}
.crew-property-card-owner .username-link {
    color: #ff9b00;
    text-decoration: none;
}
.crew-properties-titlebar {
    scroll-margin-top: 12px;
}
.page-crew_properties .crew-property-card .username-link,
.page-crew_properties .crew-property-card .profile-link {
    color: #ff9b00;
    text-decoration: none;
}
.page-crew_properties .data-table td:first-child {
    vertical-align: top;
}
@media (max-width: 1100px) {
    .crew-properties-summary,
    .crew-properties-quicknav,
    .crew-properties-dashboard {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .crew-properties-dashboard {
        grid-template-columns: 1fr;
    }
}

/* v1.35: Trade Route visual polish */
.trade-route-hero {
    width: 50%;
    min-width: 560px;
    max-width: 920px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #3d2a08;
    background: linear-gradient(135deg, #262018, #151515 55%, #0c0c0c);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 18px rgba(0,0,0,.45);
    padding: 12px 14px;
    margin: 0 0 12px;
}
.tr-kicker {
    color: #ff9b00;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .7px;
    font-weight: bold;
    margin-bottom: 3px;
}
.tr-title {
    color: #fff;
    font-weight: bold;
    font-size: 19px;
    text-shadow: 0 0 8px rgba(255,255,255,.25);
}
.tr-subtitle {
    color: #cfcfcf;
    font-size: 12px;
    margin-top: 4px;
}
.trade-route-hero-status {
    white-space: nowrap;
    border: 1px solid #444;
    background: #101010;
    padding: 6px 9px;
    color: #fff;
}
.tr-status-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 7px;
    box-shadow: 0 0 7px currentColor;
}
.tr-status-dot.active { background: #00d11f; color: #00d11f; }
.tr-status-dot.idle { background: #ff9b00; color: #ff9b00; }
.tr-dashboard {
    width: 50%;
    min-width: 560px;
    max-width: 920px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 14px;
}
.tr-card {
    border: 1px solid #333;
    background: linear-gradient(#242424, #181818);
    padding: 8px 9px;
    min-height: 62px;
}
.tr-card-label {
    color: #ff9b00;
    font-weight: bold;
    font-size: 11px;
    margin-bottom: 5px;
}
.tr-card-value {
    color: #fff;
    line-height: 1.25;
}
.tr-card-value a {
    color: #d8d8d8;
    text-decoration: none;
    font-weight: normal;
}
.tr-route-panel,
.tr-active-panel,
.tr-world-map-card {
    width: 50%;
    min-width: 560px;
    max-width: 920px;
}
.tr-route-panel {
    border: 1px solid #333;
    background: #1b1b1b;
    padding: 9px;
    margin: 0 0 14px;
    overflow-x: auto;
}
.tr-route-line {
    display: flex;
    align-items: stretch;
    gap: 5px;
    min-width: 620px;
}
.tr-route-stop {
    min-width: 88px;
    border: 1px solid #444;
    background: #101010;
    padding: 6px 7px;
    text-align: center;
    color: #d8d8d8;
}
.tr-route-stop.hq {
    border-color: #8f5600;
}
.tr-route-stop.current {
    border-color: #ff9b00;
    box-shadow: 0 0 8px rgba(255,155,0,.7);
    background: #2a1b08;
}
.tr-stop-number {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    line-height: 18px;
    font-size: 10px;
    margin-bottom: 4px;
}
.tr-stop-country {
    display: block;
    font-weight: bold;
    color: #fff;
    margin-bottom: 2px;
}
.tr-stop-meta {
    display: block;
    color: #aaa;
    font-size: 11px;
}
.tr-route-arrow {
    display: flex;
    align-items: center;
    color: #ff9b00;
    font-size: 18px;
    font-weight: bold;
}
.tr-active-panel {
    border: 1px solid #333;
    background: #1b1b1b;
    padding: 0;
    margin-bottom: 14px;
}
.tr-active-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: linear-gradient(#272727, #171717);
    border-bottom: 1px solid #333;
}
.tr-active-title {
    color: #fff;
    font-weight: bold;
    font-size: 17px;
}
.tr-active-timer {
    color: #ff9b00;
    font-weight: bold;
    align-self: center;
}
.trade-route-active-table {
    width: 100%;
    margin: 0;
}
.trade-route-active-table td:first-child {
    width: 160px;
    color: #ff9b00;
    font-weight: bold;
}
.trade-route-heading {
    width: 50%;
    min-width: 560px;
    max-width: 920px;
}
.page-trade_route .world-map-card img {
    max-height: 330px;
    object-fit: contain;
}
@media (max-width: 1100px) {
    .trade-route-hero,
    .tr-dashboard,
    .tr-route-panel,
    .tr-active-panel,
    .tr-world-map-card,
    .trade-route-heading {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .tr-dashboard {
        grid-template-columns: 1fr;
    }
}

/* v1.36: Crew Properties relevant-only interface */
.crew-properties-empty-gate {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
    border: 1px solid #7a4a00;
    background: linear-gradient(180deg, #2a210e, #161616);
    color: #f2f2f2;
    padding: 16px 18px;
    margin: 10px 0 14px;
    font-size: 15px;
    line-height: 1.55;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 0 12px rgba(0,0,0,.35);
}
.crew-properties-empty-gate b {
    color: #ff9b00;
}
.crew-properties-status-strip {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
    background: linear-gradient(180deg, #202020, #151515);
    border-color: #3f3f3f;
}
.crew-properties-status-strip b {
    color: #ff9b00;
}
.crew-properties-quicknav {
    background: #151515;
    border: 1px solid #2f2f2f;
    padding: 7px;
}
.crew-properties-quicknav a {
    background: linear-gradient(#2b2b2b, #171717);
    border-color: #454545;
    border-radius: 2px;
}
.crew-properties-quicknav a:hover {
    background: linear-gradient(#ffb326, #b45e00);
    border-color: #000;
    color: #fff;
}
.crew-property-card {
    min-height: 98px;
    border-color: #3e3e3e;
}
.crew-property-card-detail {
    color: #dcdcdc;
}
.international-action-panel {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.international-action-panel .inline-form {
    display: inline-block;
}
.page-crew_properties .crew-properties-dashboard .crew-property-card-owner,
.page-crew_properties .crew-properties-dashboard .crew-property-card-detail {
    font-size: 12px;
}
.page-crew_properties .data-table th,
.page-crew_properties .data-table td {
    line-height: 1.35;
}
@media (max-width: 1100px) {
    .crew-properties-empty-gate {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}


/* v1.36: Crew Properties relevance and visibility pass */
.crew-property-gate-box {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
    border: 1px solid #4b2b00;
    background: linear-gradient(135deg, #211407, #141414 68%, #070707);
    color: #f2f2f2;
    padding: 16px 18px;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 8px 22px rgba(0,0,0,.28);
}
.crew-property-gate-box b {
    color: #ff9b00;
}
.crew-properties-build-table td:first-child,
.crew-properties-build-table th:first-child {
    width: 185px;
}
.page-crew_properties .crew-properties-dashboard:empty,
.page-crew_properties .crew-properties-quicknav:empty {
    display: none;
}
@media (max-width: 1100px) {
    .crew-property-gate-box {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}

/* v1.37: Crew Properties icon polish */
.page-crew_properties .crew-property-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 10px;
    align-items: center;
    min-height: 116px;
    padding: 8px;
    overflow: hidden;
}
.crew-property-card-icon {
    width: 88px;
    height: 88px;
    border: 1px solid #333;
    background: radial-gradient(circle at center, #303030 0, #171717 62%, #090909 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0,0,0,.65);
}
.crew-property-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.crew-property-card-content {
    display: block;
    min-width: 0;
}
.crew-property-section-visual {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    align-items: center;
    background: linear-gradient(135deg, #222, #151515 70%, #0b0b0b);
    border: 1px solid #333;
    padding: 10px;
    margin: 0 0 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.crew-property-section-visual img {
    width: 104px;
    height: 104px;
    object-fit: contain;
    background: radial-gradient(circle at center, #303030 0, #161616 65%, #080808 100%);
    border: 1px solid #333;
}
.crew-property-section-visual strong {
    display: block;
    color: #ff9b00;
    font-size: 16px;
    margin-bottom: 5px;
}
.crew-property-section-visual span {
    display: block;
    color: #d8d8d8;
    font-size: 12px;
}
.crew-property-build-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.crew-property-build-name img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border: 1px solid #333;
    background: #111;
    vertical-align: middle;
}
@media (max-width: 1100px) {
    .page-crew_properties .crew-property-card {
        grid-template-columns: 78px 1fr;
    }
    .crew-property-card-icon {
        width: 74px;
        height: 74px;
    }
    .crew-property-section-visual {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        grid-template-columns: 90px 1fr;
    }
    .crew-property-section-visual img {
        width: 84px;
        height: 84px;
    }
}


/* v1.38: direct crew invitation answers inside Inbox */
.page-inbox .inbox-table,
.page-inbox .orange-title,
.page-inbox .info-box,
.page-inbox .inbox-invite-actions {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
}

.inbox-invite-actions {
    margin: 0 0 14px;
    padding: 10px;
    background: #1f1f1f;
    border: 1px solid #555;
}

.inbox-invite-title {
    color: #ff9b00;
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 6px;
}

.inbox-invite-text {
    margin-bottom: 10px;
    line-height: 1.4;
}

.inbox-invite-actions button {
    margin-right: 6px;
}

@media (max-width: 1100px) {
    .page-inbox .inbox-table,
    .page-inbox .orange-title,
    .page-inbox .info-box,
    .page-inbox .inbox-invite-actions {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}

/* v1.39: Trade Route location maps + image speed optimization */
.world-map-card picture {
    display: block;
}
.tr-position-map-card img {
    max-height: 300px;
    object-fit: contain;
}
.tr-position-map-card .world-map-caption {
    border-top: 1px solid #242424;
    margin-top: 8px;
}

/* v1.40: Crew Properties visual polish v2 */
.cp-operations-hero {
    width: 50%;
    min-width: 560px;
    max-width: 920px;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 12px;
    align-items: stretch;
    margin: 0 0 12px;
    border: 1px solid #4b2b00;
    background: linear-gradient(135deg, #291806 0, #171717 48%, #090909 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 22px rgba(0,0,0,.28);
}
.cp-operations-main {
    padding: 14px 16px;
    border-right: 1px solid #2d2d2d;
}
.cp-hero-kicker {
    display: block;
    color: #ff9b00;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 5px;
}
.cp-operations-main strong {
    display: block;
    font-size: 21px;
    line-height: 24px;
    color: #fff;
    margin-bottom: 5px;
}
.cp-operations-main span:last-child {
    display: block;
    color: #d7d7d7;
}
.cp-operations-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: #272727;
}
.cp-operations-metrics div {
    background: linear-gradient(#222, #141414);
    padding: 12px;
    min-height: 64px;
}
.cp-operations-metrics div.wide {
    grid-column: span 2;
}
.cp-operations-metrics b {
    display: block;
    color: #ff9b00;
    font-size: 17px;
    line-height: 20px;
    margin-bottom: 4px;
}
.cp-operations-metrics span {
    display: block;
    color: #bdbdbd;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.cp-status-badge {
    display: inline-block;
    border: 1px solid #555;
    background: #111;
    color: #fff;
    padding: 2px 7px;
    line-height: 16px;
    min-height: 18px;
    font-size: 11px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 2px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.cp-status-ready,
.cp-status-active {
    border-color: #0a8f1d;
    color: #b7ffbf;
    background: linear-gradient(#143018, #0b160d);
}
.cp-status-building,
.cp-status-waiting,
.cp-status-preparing,
.cp-status-incoming {
    border-color: #c58700;
    color: #fff1a8;
    background: linear-gradient(#3a2904, #17120a);
}
.cp-status-failed,
.cp-status-expired,
.cp-status-declined,
.cp-status-disaster {
    border-color: #b00000;
    color: #ffd0d0;
    background: linear-gradient(#3a0808, #170909);
}
.cp-timer-pill,
.cp-overview-detail {
    display: inline-block;
    margin-left: 7px;
    color: #d8d8d8;
    font-size: 12px;
}
.crew-properties-dashboard {
    gap: 10px;
}
.page-crew_properties .crew-property-card {
    border-color: #3f3f3f;
    background: linear-gradient(135deg, #292929 0, #181818 62%, #0b0b0b 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 6px 14px rgba(0,0,0,.23);
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.page-crew_properties .crew-property-card:hover {
    transform: translateY(-1px);
    border-color: #ff9b00;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 0 13px rgba(255,155,0,.18);
}
.page-crew_properties .crew-property-card-title {
    font-size: 16px;
    margin-bottom: 4px;
}
.crew-property-card-status-wrap {
    display: block;
    margin: 3px 0 6px;
}
.crew-property-card-detail {
    color: #d7d7d7;
}
.crew-property-section-visual {
    border-color: #4b2b00;
    background: linear-gradient(135deg, #2a210e 0, #1a1a1a 52%, #0b0b0b 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 5px 16px rgba(0,0,0,.22);
}
.crew-property-section-visual img {
    border-color: #4a4a4a;
    background: radial-gradient(circle at center, #3a3a3a 0, #1b1b1b 65%, #080808 100%);
}
.crew-property-section-visual span em {
    color: #d8d8d8;
    font-style: normal;
    margin-left: 7px;
}
#cp-international-orders + .crew-property-section-visual {
    border-color: #a56a00;
    background: linear-gradient(135deg, #3a2608 0, #191919 50%, #080808 100%);
}
.cp-build-grid {
    width: 50%;
    min-width: 560px;
    max-width: 920px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}
.cp-build-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 10px;
    align-items: center;
    border: 1px solid #3f3f3f;
    background: linear-gradient(135deg, #242424, #151515 68%, #0a0a0a);
    padding: 8px;
    min-height: 118px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.cp-build-card-visual {
    width: 88px;
    height: 88px;
    border: 1px solid #333;
    background: radial-gradient(circle at center, #333 0, #171717 65%, #090909 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.cp-build-card-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.cp-build-card-body strong {
    display: block;
    color: #ff9b00;
    font-size: 15px;
    margin-bottom: 6px;
}
.cp-build-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 7px;
}
.cp-build-meta span {
    border: 1px solid #444;
    background: #101010;
    color: #e9e9e9;
    padding: 2px 6px;
    font-size: 11px;
}
.cp-build-form {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
}
.cp-build-form input[type="text"] {
    width: 150px;
}
.page-crew_properties .international-action-panel {
    border-color: #5d3a00;
    background: linear-gradient(135deg, #241806, #151515 70%);
}
.page-crew_properties .data-table {
    box-shadow: 0 4px 12px rgba(0,0,0,.14);
}
@media (max-width: 1100px) {
    .cp-operations-hero,
    .cp-build-grid {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .cp-operations-hero {
        grid-template-columns: 1fr;
    }
    .cp-operations-main {
        border-right: 0;
        border-bottom: 1px solid #2d2d2d;
    }
    .cp-build-grid {
        grid-template-columns: 1fr;
    }
}


/* v1.41: International Orders event UI + Crew invite polish */
.page-crew .crew-pending-invites-table,
.page-crew .pending-crew-invites-table,
.page-crew .crew-pending-invites-table + .data-table {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
}

.page-crew_properties .crew-property-card-content,
.page-crew_properties .crew-property-card-owner,
.page-crew_properties .crew-property-card-detail {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.page-crew_properties .crew-property-card-owner {
    display: block;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    color: #d8d8d8;
}

.page-crew_properties .crew-property-card-owner .username-link,
.page-crew_properties .crew-property-card-owner .profile-link {
    display: inline;
    color: #ff9b00;
    font-weight: normal;
    text-decoration: none;
}

.cp-io-card,
.cp-io-flow,
.cp-io-panels,
.cp-io-action-box,
.cp-io-log-table {
    width: 50%;
    min-width: 560px;
    max-width: 920px;
}

.cp-io-card {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 14px;
    align-items: stretch;
    border: 1px solid #865200;
    background: linear-gradient(135deg, #3a2608 0, #1c1c1c 54%, #080808 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 8px 22px rgba(0,0,0,.28);
    margin: 0 0 12px;
    padding: 10px;
}

.cp-io-card-empty {
    border-color: #4b2b00;
    background: linear-gradient(135deg, #241806 0, #171717 62%, #090909 100%);
}

.cp-io-visual {
    width: 124px;
    min-height: 124px;
    border: 1px solid #4a4a4a;
    background: radial-gradient(circle at center, #3b3b3b 0, #181818 66%, #050505 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cp-io-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cp-io-main {
    min-width: 0;
    padding: 4px 4px 2px;
}

.cp-io-kicker {
    display: block;
    color: #ff9b00;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 5px;
}

.cp-io-main > strong {
    display: block;
    color: #fff;
    font-size: 19px;
    line-height: 22px;
    margin-bottom: 7px;
}

.cp-io-main p {
    margin: 8px 0 10px;
    color: #d8d8d8;
    line-height: 1.4;
}

.cp-io-statusline {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

.cp-io-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
}

.cp-io-metrics div {
    border: 1px solid #333;
    background: rgba(0,0,0,.28);
    padding: 6px 7px;
    min-height: 46px;
}

.cp-io-metrics span {
    display: block;
    color: #aaa;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: .04em;
    margin-bottom: 3px;
}

.cp-io-metrics b {
    display: block;
    color: #fff;
    font-size: 12px;
    line-height: 15px;
}

.cp-io-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 0 0 12px;
}

.cp-io-step {
    border: 1px solid #333;
    background: linear-gradient(#242424, #141414);
    color: #9e9e9e;
    padding: 7px 6px;
    text-align: center;
    min-height: 34px;
    font-size: 11px;
    line-height: 14px;
}

.cp-io-step-done {
    border-color: #0a8f1d;
    color: #b7ffbf;
    background: linear-gradient(#163018, #0a130b);
}

.cp-io-step-current {
    border-color: #ff9b00;
    color: #fff;
    background: linear-gradient(#5a3500, #211504);
    box-shadow: 0 0 10px rgba(255,155,0,.25), inset 0 1px 0 rgba(255,255,255,.08);
}

.cp-io-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 12px;
}

.cp-io-panel {
    border: 1px solid #333;
    background: linear-gradient(#222, #151515);
    padding: 9px;
}

.cp-io-panel h3 {
    margin: -9px -9px 8px;
    padding: 5px 7px;
    background: linear-gradient(#ffb326, #d67700 45%, #8f4400);
    border-bottom: 1px solid #000;
    color: #fff;
    font-size: 13px;
}

.cp-io-mini-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-bottom: 0;
}

.cp-io-action-box {
    border: 1px solid #5d3a00;
    background: linear-gradient(135deg, #241806, #151515 70%);
    padding: 10px;
    margin: 0 0 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.cp-io-action-box strong {
    color: #ff9b00;
    font-size: 14px;
    margin-right: 6px;
}

.cp-io-action-box span {
    color: #e8e8e8;
}

.cp-io-log-table th,
.cp-io-log-table td {
    font-size: 12px;
}

@media (max-width: 1100px) {
    .page-crew .crew-pending-invites-table,
    .cp-io-card,
    .cp-io-flow,
    .cp-io-panels,
    .cp-io-action-box,
    .cp-io-log-table {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .cp-io-card,
    .cp-io-panels {
        grid-template-columns: 1fr;
    }
    .cp-io-flow,
    .cp-io-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* v1.41: International Orders event UI + Crew pending invites polish */
.page-crew_properties .crew-property-card-title a {
    color: #ff9b00;
    text-decoration: none;
    font-weight: bold;
}
.page-crew_properties .crew-property-card-title a:hover {
    color: #ffc56d;
    text-decoration: none;
}
.page-crew_properties .crew-property-card-owner {
    display: flex;
    align-items: baseline;
    gap: 5px;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
}
.page-crew_properties .crew-property-card-owner .cp-owner-label {
    color: #d8d8d8;
    flex: 0 0 auto;
}
.page-crew_properties .crew-property-card-owner .cp-owner-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.page-crew_properties .crew-property-card-owner .cp-owner-name a,
.page-crew_properties .crew-property-card-owner .username-link,
.page-crew_properties .crew-property-card-owner .profile-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: normal;
}
.page-crew_properties .crew-property-card-owner .cp-owner-name a:hover,
.page-crew_properties .crew-property-card-owner .username-link:hover,
.page-crew_properties .crew-property-card-owner .profile-link:hover {
    color: #ffcf8a;
    text-decoration: none;
}
.io-operation-card,
.io-progress-flow,
.io-council-panel,
.io-grid,
.io-log-table {
    width: 50%;
    min-width: 560px;
    max-width: 920px;
}
.io-operation-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr) 170px;
    gap: 14px;
    align-items: center;
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid #a56a00;
    background: linear-gradient(135deg, #33240c 0, #191919 52%, #080808 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 7px 18px rgba(0,0,0,.28);
}
.io-operation-card-empty {
    grid-template-columns: 118px minmax(0, 1fr) auto;
}
.io-operation-visual {
    width: 112px;
    height: 112px;
    border: 1px solid #4a4a4a;
    background: radial-gradient(circle at center, #3a3a3a 0, #1b1b1b 65%, #080808 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.io-operation-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.io-kicker {
    color: #ff9b00;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 5px;
}
.io-operation-main h3 {
    margin: 0 0 5px;
    color: #ffffff;
    font-size: 19px;
    line-height: 23px;
}
.io-operation-main p {
    margin: 8px 0 0;
    color: #d8d8d8;
    line-height: 1.35;
    max-width: 620px;
}
.io-status-line {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}
.io-operation-reward {
    text-align: right;
    border-left: 1px solid #313131;
    padding-left: 12px;
}
.io-operation-reward span {
    display: block;
    color: #bdbdbd;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 5px;
}
.io-operation-reward strong {
    display: block;
    color: #ffcf8a;
    font-size: 17px;
    line-height: 20px;
}
.io-progress-flow {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    margin: 0 0 12px;
}
.io-progress-step {
    min-height: 54px;
    border: 1px solid #373737;
    background: linear-gradient(#1f1f1f, #121212);
    padding: 6px 5px;
    text-align: center;
    color: #8f8f8f;
}
.io-progress-step span {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 auto 6px;
    border: 1px solid #555;
    background: #171717;
}
.io-progress-step b {
    display: block;
    font-size: 11px;
    line-height: 13px;
    font-weight: bold;
}
.io-progress-done {
    border-color: #0a8f1d;
    color: #b7ffbf;
}
.io-progress-done span {
    background: #0a8f1d;
    border-color: #40e257;
}
.io-progress-current {
    border-color: #ff9b00;
    color: #fff1a8;
    box-shadow: 0 0 9px rgba(255,155,0,.25);
}
.io-progress-current span {
    background: #ff9b00;
    border-color: #ffd17a;
}
.io-council-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin: 0 0 12px;
    padding: 10px;
    border: 1px solid #4a4a4a;
    background: linear-gradient(135deg, #242424, #151515 70%, #090909);
}
.io-council-panel strong {
    display: block;
    color: #ff9b00;
    margin-bottom: 4px;
}
.io-council-panel span {
    color: #d8d8d8;
    line-height: 1.35;
}
.io-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 12px;
}
.io-panel {
    border: 1px solid #3f3f3f;
    background: linear-gradient(135deg, #232323, #151515 70%, #090909);
    padding: 10px;
}
.io-panel h3 {
    margin: 0 0 8px;
    color: #ff9b00;
    font-size: 15px;
}
.io-cargo-list {
    display: grid;
    gap: 6px;
}
.io-cargo-item {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 6px;
    border: 1px solid #2b2b2b;
    background: #1c1c1c;
}
.io-cargo-item strong {
    color: #ffffff;
    font-weight: bold;
}
.io-cargo-item span {
    color: #d8d8d8;
}
.io-cargo-item em {
    color: #ffcf8a;
    font-style: normal;
    white-space: nowrap;
}
.io-actions-panel {
    grid-template-columns: minmax(0, .9fr) 1.4fr;
}
.io-action-buttons {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}
.io-inline-state {
    display: inline-block;
    padding: 4px 7px;
    border: 1px solid #333;
    background: #161616;
    color: #d8d8d8;
}
.page-crew .pending-crew-invites-table {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
}
@media (max-width: 1100px) {
    .io-operation-card,
    .io-progress-flow,
    .io-council-panel,
    .io-grid,
    .io-log-table,
    .page-crew .pending-crew-invites-table {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .io-operation-card,
    .io-operation-card-empty {
        grid-template-columns: 90px 1fr;
    }
    .io-operation-reward,
    .io-operation-actions {
        grid-column: 1 / -1;
        text-align: left;
        border-left: 0;
        padding-left: 0;
        border-top: 1px solid #303030;
        padding-top: 8px;
    }
    .io-operation-visual {
        width: 84px;
        height: 84px;
    }
    .io-progress-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .io-council-panel,
    .io-actions-panel,
    .io-grid {
        grid-template-columns: 1fr;
    }
    .io-action-buttons {
        justify-content: flex-start;
    }
}

/* v1.43: Crew Properties realtime timers and inbox property invites */
.crew-live-timer {
    color: #ff9b00;
    font-weight: bold;
    white-space: nowrap;
    text-shadow: 0 0 5px rgba(255,155,0,.35);
}
.crew-live-timer-ready {
    color: #b7ffbf;
    text-shadow: none;
}
.inbox-property-invite-actions {
    border-color: #4b2b00;
}
.page-crew_properties .form-table td .crew-live-timer {
    margin-left: 2px;
}

/* v1.44: standalone International Orders page */
.page-international_orders .io-standalone-card,
.page-international_orders .cp-io-progress,
.page-international_orders .io-panels-wide,
.page-international_orders .io-action-box-wide,
.page-international_orders .io-table,
.page-international_orders .io-titlebar {
    width: 50%;
    min-width: 560px;
    max-width: 920px;
}
.page-international_orders .cp-io-progress {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 0 0 12px;
}
.page-international_orders .io-table th,
.page-international_orders .io-table td {
    font-size: 12px;
}
.page-crew_properties .cp-io-compact-link {
    width: 50%;
    min-width: 560px;
    max-width: 820px;
}
@media (max-width: 1100px) {
    .page-international_orders .io-standalone-card,
    .page-international_orders .cp-io-progress,
    .page-international_orders .io-panels-wide,
    .page-international_orders .io-action-box-wide,
    .page-international_orders .io-table,
    .page-international_orders .io-titlebar,
    .page-crew_properties .cp-io-compact-link {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .page-international_orders .cp-io-progress {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* v1.45: International Orders UI polish v2 */
.page-international_orders .io-v2-shell {
    max-width: 1120px;
}
.page-international_orders .io-v2-header,
.page-international_orders .io-v2-operation-card,
.page-international_orders .io-v2-progress,
.page-international_orders .io-v2-status-grid,
.page-international_orders .io-v2-detail-grid,
.page-international_orders .io-v2-council-action,
.page-international_orders .io-v2-result-card,
.page-international_orders .io-v2-contribution-panel,
.page-international_orders .io-v2-empty-card,
.page-international_orders .io-v2-table,
.page-international_orders .io-v2-titlebar,
.page-international_orders .io-v2-narrow {
    width: 50%;
    min-width: 620px;
    max-width: 980px;
}
.page-international_orders .io-v2-header {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(120px, .7fr));
    margin: 0 0 12px;
    border: 1px solid #5d3a00;
    background: linear-gradient(135deg, #291a06 0, #1d1d1d 48%, #0a0a0a 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 20px rgba(0,0,0,.25);
}
.page-international_orders .io-v2-header-main,
.page-international_orders .io-v2-header-metric {
    padding: 12px 14px;
    border-right: 1px solid #303030;
    min-height: 72px;
}
.page-international_orders .io-v2-header-main span,
.page-international_orders .io-v2-header-metric span,
.page-international_orders .io-v2-kicker {
    display: block;
    color: #ff9b00;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: bold;
    margin-bottom: 4px;
}
.page-international_orders .io-v2-header-main strong {
    display: block;
    color: #fff;
    font-size: 21px;
    line-height: 24px;
    margin-bottom: 4px;
}
.page-international_orders .io-v2-header-main em {
    display: block;
    color: #d7d7d7;
    font-style: normal;
    line-height: 1.35;
}
.page-international_orders .io-v2-header-metric strong {
    color: #fff;
    font-size: 15px;
    font-weight: normal;
}
.page-international_orders .io-v2-operation-card {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr) 170px;
    gap: 14px;
    align-items: center;
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid #a56a00;
    background: linear-gradient(135deg, #3b2809 0, #1b1b1b 48%, #070707 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 8px 22px rgba(0,0,0,.30);
}
.page-international_orders .io-v2-operation-image,
.page-international_orders .io-v2-empty-card img {
    width: 118px;
    height: 118px;
    border: 1px solid #4a4a4a;
    background: radial-gradient(circle at center, #353535 0, #181818 68%, #050505 100%);
    object-fit: contain;
    display: block;
}
.page-international_orders .io-v2-operation-copy h2 {
    margin: 0 0 7px;
    color: #fff;
    font-size: 21px;
    line-height: 24px;
}
.page-international_orders .io-v2-status-row {
    display: grid;
    gap: 7px;
}
.page-international_orders .io-v2-status-row > span:not(.cp-status-badge) {
    color: #d8d8d8;
    line-height: 1.4;
}
.page-international_orders .io-v2-reward-box {
    border-left: 1px solid #353535;
    padding-left: 13px;
    text-align: right;
}
.page-international_orders .io-v2-reward-box span,
.page-international_orders .io-v2-result-money span {
    display: block;
    color: #bdbdbd;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 11px;
    margin-bottom: 6px;
}
.page-international_orders .io-v2-reward-box strong,
.page-international_orders .io-v2-result-money strong {
    display: block;
    color: #ffcf8a;
    font-size: 18px;
    line-height: 22px;
}
.page-international_orders .io-v2-progress {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 4px;
    margin: 0 0 12px;
}
.page-international_orders .io-v2-step {
    min-height: 56px;
    border: 1px solid #333;
    background: linear-gradient(#202020, #121212);
    color: #8f8f8f;
    padding: 7px 5px;
    text-align: center;
}
.page-international_orders .io-v2-step i {
    display: block;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1px solid #555;
    background: #141414;
    margin: 0 auto 6px;
}
.page-international_orders .io-v2-step b {
    display: block;
    font-size: 10px;
    line-height: 12px;
}
.page-international_orders .io-v2-step-done {
    border-color: #0a8f1d;
    color: #b7ffbf;
    background: linear-gradient(#142915, #0b120c);
}
.page-international_orders .io-v2-step-done i {
    background: #0a8f1d;
    border-color: #40e257;
}
.page-international_orders .io-v2-step-current {
    border-color: #ff9b00;
    color: #fff1a8;
    background: linear-gradient(#4c2d00, #1d1304);
    box-shadow: 0 0 9px rgba(255,155,0,.25), inset 0 1px 0 rgba(255,255,255,.06);
}
.page-international_orders .io-v2-step-current i {
    background: #ff9b00;
    border-color: #ffd17a;
}
.page-international_orders .io-v2-status-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    margin: 0 0 12px;
}
.page-international_orders .io-v2-status-card {
    min-height: 58px;
    border: 1px solid #313131;
    background: linear-gradient(135deg, #232323, #151515 70%, #0b0b0b);
    padding: 8px;
}
.page-international_orders .io-v2-status-card span {
    display: block;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 10px;
    margin-bottom: 5px;
}
.page-international_orders .io-v2-status-card strong {
    display: block;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
}
.page-international_orders .io-v2-timer-card strong {
    color: #ff9b00;
}
.page-international_orders .io-v2-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 12px;
}
.page-international_orders .io-v2-panel {
    border: 1px solid #3f3f3f;
    background: linear-gradient(135deg, #232323, #151515 70%, #090909);
    padding: 10px;
}
.page-international_orders .io-v2-panel h3 {
    margin: 0 0 8px;
    color: #ff9b00;
    font-size: 15px;
}
.page-international_orders .io-v2-manifest {
    display: grid;
    gap: 6px;
}
.page-international_orders .io-v2-manifest-row {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 6px;
    border: 1px solid #2b2b2b;
    background: #1c1c1c;
}
.page-international_orders .io-v2-manifest-row strong {
    color: #fff;
    font-weight: bold;
}
.page-international_orders .io-v2-manifest-row span {
    color: #d8d8d8;
}
.page-international_orders .io-v2-manifest-row em {
    color: #ffcf8a;
    font-style: normal;
    white-space: nowrap;
}
.page-international_orders .io-v2-council-action,
.page-international_orders .io-v2-contribution-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
    gap: 12px;
    align-items: center;
    margin: 0 0 12px;
    padding: 11px;
    border: 1px solid #5d3a00;
    background: linear-gradient(135deg, #241806, #151515 70%, #080808);
}
.page-international_orders .io-v2-council-action strong,
.page-international_orders .io-v2-contribution-panel strong {
    display: block;
    color: #ff9b00;
    font-size: 15px;
    margin-bottom: 3px;
}
.page-international_orders .io-v2-council-action span,
.page-international_orders .io-v2-contribution-panel p {
    color: #d8d8d8;
    line-height: 1.35;
    margin: 0;
}
.page-international_orders .io-v2-action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}
.page-international_orders .io-v2-car-form {
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #282828;
}
.page-international_orders .io-v2-empty-card {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: 14px;
    align-items: center;
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid #4b2b00;
    background: linear-gradient(135deg, #241806, #171717 62%, #090909);
}
.page-international_orders .io-v2-empty-card strong {
    color: #fff;
    font-size: 20px;
    display: block;
    margin-bottom: 5px;
}
.page-international_orders .io-v2-empty-card p {
    color: #d8d8d8;
    margin: 0 0 8px;
}
.page-international_orders .io-v2-result-card {
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid #555;
    background: linear-gradient(135deg, #202020, #121212 70%, #070707);
}
.page-international_orders .io-v2-result-success {
    border-color: #0a8f1d;
}
.page-international_orders .io-v2-result-partial {
    border-color: #ff9b00;
}
.page-international_orders .io-v2-result-failed {
    border-color: #8f0000;
}
.page-international_orders .io-v2-result-title {
    display: inline-block;
    min-width: 240px;
    vertical-align: top;
}
.page-international_orders .io-v2-result-title span {
    display: block;
    color: #ff9b00;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .05em;
}
.page-international_orders .io-v2-result-title strong {
    color: #fff;
    font-size: 18px;
}
.page-international_orders .io-v2-result-money {
    display: inline-block;
    vertical-align: top;
    margin-left: 16px;
}
.page-international_orders .io-v2-split-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
}
.page-international_orders .io-v2-split-grid div {
    border: 1px solid #303030;
    background: #181818;
    padding: 6px;
}
.page-international_orders .io-v2-split-grid span {
    display: block;
    color: #aaa;
    font-size: 10px;
    text-transform: uppercase;
    margin-bottom: 3px;
}
.page-international_orders .io-v2-split-grid b {
    color: #fff;
    font-size: 12px;
}
.page-international_orders .io-v2-titlebar,
.page-international_orders .io-v2-table {
    width: 50%;
    min-width: 620px;
    max-width: 980px;
}
.page-international_orders .io-v2-table th,
.page-international_orders .io-v2-table td {
    font-size: 12px;
}
@media (max-width: 1120px) {
    .page-international_orders .io-v2-header,
    .page-international_orders .io-v2-operation-card,
    .page-international_orders .io-v2-progress,
    .page-international_orders .io-v2-status-grid,
    .page-international_orders .io-v2-detail-grid,
    .page-international_orders .io-v2-council-action,
    .page-international_orders .io-v2-result-card,
    .page-international_orders .io-v2-contribution-panel,
    .page-international_orders .io-v2-empty-card,
    .page-international_orders .io-v2-table,
    .page-international_orders .io-v2-titlebar,
    .page-international_orders .io-v2-narrow {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .page-international_orders .io-v2-header,
    .page-international_orders .io-v2-operation-card,
    .page-international_orders .io-v2-detail-grid,
    .page-international_orders .io-v2-council-action,
    .page-international_orders .io-v2-contribution-panel,
    .page-international_orders .io-v2-empty-card {
        grid-template-columns: 1fr;
    }
    .page-international_orders .io-v2-operation-image,
    .page-international_orders .io-v2-empty-card img {
        width: 92px;
        height: 92px;
    }
    .page-international_orders .io-v2-reward-box {
        border-left: 0;
        border-top: 1px solid #303030;
        padding-left: 0;
        padding-top: 8px;
        text-align: left;
    }
    .page-international_orders .io-v2-progress,
    .page-international_orders .io-v2-status-grid,
    .page-international_orders .io-v2-split-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .page-international_orders .io-v2-action-buttons {
        justify-content: flex-start;
    }
}

/* v1.46: Trade Route polish v2 */
.tr-phase-badge {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid #444;
    background: #101010;
    color: #fff;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.tr-phase-idle { color: #d8d8d8; border-color: #555; }
.tr-phase-waiting { color: #fff1a8; border-color: #c58700; background: #2a210e; }
.tr-phase-active { color: #b7ffbf; border-color: #0a8f1d; background: #102313; }
.tr-phase-offer { color: #ffcf78; border-color: #ff9b00; background: #2a1b08; box-shadow: 0 0 8px rgba(255,155,0,.22); }
.tr-phase-returning { color: #c9dcff; border-color: #496ea8; background: #10192a; }
.tr-timer-prefix { color: #d8d8d8; font-weight: normal; }
.tr-live-timer { color: #ff9b00; font-weight: bold; }
.tr-stage-flow {
    width: 50%;
    min-width: 560px;
    max-width: 920px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin: 0 0 14px;
}
.tr-stage {
    border: 1px solid #333;
    background: linear-gradient(#242424, #151515);
    color: #aaa;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    padding: 6px;
    font-size: 12px;
}
.tr-stage-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #555;
    box-shadow: 0 0 5px rgba(0,0,0,.9);
    flex: 0 0 auto;
}
.tr-stage.done {
    color: #b7ffbf;
    border-color: #235f2c;
    background: linear-gradient(#1c2a1d, #121912);
}
.tr-stage.done .tr-stage-dot { background: #00d11f; box-shadow: 0 0 7px rgba(0,209,31,.55); }
.tr-stage.current {
    color: #fff;
    border-color: #ff9b00;
    background: linear-gradient(#3a2509, #1b1205);
    box-shadow: 0 0 8px rgba(255,155,0,.35);
}
.tr-stage.current .tr-stage-dot { background: #ff9b00; box-shadow: 0 0 8px rgba(255,155,0,.8); }
.tr-route-stop.visited {
    border-color: #235f2c;
    background: #111e12;
}
.tr-route-stop.visited .tr-stop-number {
    background: #0a8f1d;
}
.tr-active-panel-v2 {
    overflow: hidden;
}
.tr-operation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
}
.tr-op-card {
    border: 1px solid #333;
    background: linear-gradient(145deg, #242424, #151515);
    min-height: 92px;
    padding: 9px 10px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.tr-op-label {
    color: #ff9b00;
    font-weight: bold;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 7px;
}
.tr-op-value {
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.25;
}
.tr-op-note {
    margin-top: 6px;
    color: #aaa;
    font-size: 11px;
    line-height: 1.3;
}
.tr-op-offer .tr-op-value {
    color: #ffcf78;
}
.tr-op-actions button {
    margin: 2px 4px 2px 0;
}
.tr-card-timer .tr-card-value,
.tr-active-timer {
    color: #ff9b00;
}
.page-trade_route .trade-route-recent-table,
.page-trade_route .trade-route-log-table {
    font-size: 12px;
}
@media (max-width: 1100px) {
    .tr-stage-flow {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        grid-template-columns: 1fr;
    }
    .tr-operation-grid {
        grid-template-columns: 1fr;
    }
}

/* v1.47: Smuggling visual polish */
.page-smuggling .data-table,
.page-smuggling .orange-title,
.page-smuggling .info-box,
.page-smuggling .warning-box,
.page-smuggling .error-box {
    width: 50%;
    min-width: 560px;
    max-width: 860px;
}

.smuggling-hero {
    max-width: 920px;
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 14px;
    align-items: center;
    background: linear-gradient(135deg, #272727, #151515 70%, #0b0b0b);
    border: 1px solid #3a3a3a;
    padding: 12px;
    margin: 0 0 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 4px 16px rgba(0,0,0,.35);
}
.smuggling-hero-icon {
    width: 108px;
    height: 108px;
    border: 1px solid #000;
    background: #0b0b0b;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.smuggling-hero-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.smuggling-hero h2 {
    margin: 1px 0 6px;
    color: #fff;
    font-size: 20px;
}
.smuggling-hero p {
    margin: 0;
    color: #d0d0d0;
    line-height: 1.4;
}
.smuggling-eyebrow {
    color: #ff9b00;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .8px;
    font-weight: bold;
}
.smuggling-status-grid {
    max-width: 920px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 16px;
}
.smuggling-status-card,
.smuggling-stock-card,
.smuggling-smuggler-card,
.smuggling-empty-card {
    background: #1f1f1f;
    border: 1px solid #3b3b3b;
    padding: 9px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.smuggling-status-card span,
.smuggling-stock-card span,
.smuggling-card-label {
    display: block;
    color: #ff9b00;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 4px;
}
.smuggling-status-card strong,
.smuggling-stock-card strong {
    color: #fff;
    font-weight: normal;
}
.smuggling-status-card a,
.smuggling-smuggler-card a,
.smuggling-log-card a {
    color: #ff9b00;
    text-decoration: none;
    font-weight: normal;
}
.smuggling-panel,
.smuggling-orders-section,
.smuggling-stock-section,
.smuggling-map-section,
.smuggling-log-section {
    max-width: 920px;
    margin: 0 0 16px;
}
.smuggling-smuggler-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin: 0 0 10px;
}
.smuggling-smuggler-card {
    min-height: 130px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.status-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 3px 7px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 2px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.status-ok { background: #0b4515; color: #baffc3; }
.status-wait { background: #513000; color: #ffd68a; }
.status-danger { background: #5a0606; color: #ffd0d0; }
.smuggling-invite-form {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #202020;
    border: 1px solid #333;
    padding: 8px;
    max-width: 560px;
}
.smuggling-invite-form input { width: 230px; }
.smuggling-order-card {
    max-width: 920px;
    background: linear-gradient(135deg, #242424, #151515 74%, #090909);
    border: 1px solid #4a4a4a;
    margin: 0 0 12px;
    padding: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.04);
}
.smuggling-order-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin: 0 0 10px;
}
.smuggling-order-top h3 {
    margin: 2px 0 0;
    color: #fff;
    font-size: 18px;
}
.smuggling-order-message {
    background: #101010;
    border: 1px solid #2f2f2f;
    color: #e8e8e8;
    padding: 10px;
    line-height: 1.45;
    margin: 0 0 10px;
}
.smuggling-order-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 10px;
}
.smuggling-order-meta div {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 7px 8px;
}
.smuggling-order-meta span {
    display: block;
    color: #ff9b00;
    font-size: 11px;
    margin-bottom: 3px;
    font-weight: bold;
}
.smuggling-order-meta strong {
    color: #fff;
    font-weight: normal;
}
.smuggling-action-row {
    border-top: 1px solid #333;
    padding-top: 9px;
}
.smuggling-live-timer {
    color: #ff9b00;
    font-weight: bold;
}
.smuggling-cooldown-box .crew-live-timer {
    color: #ff9b00;
    font-weight: bold;
}
.smuggling-stock-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    max-width: 760px;
}
.smuggling-world-map {
    max-width: 760px;
}
.smuggling-log-list {
    max-width: 920px;
    display: grid;
    gap: 7px;
}
.smuggling-log-card {
    display: grid;
    grid-template-columns: 150px 1fr 130px;
    gap: 10px;
    align-items: center;
    background: #1f1f1f;
    border: 1px solid #343434;
    padding: 8px;
}
.smuggling-log-time { color: #aaa; font-size: 12px; }
.smuggling-log-body { display: flex; flex-direction: column; gap: 2px; }
.smuggling-log-offer { text-align: right; color: #baffc3; font-weight: bold; }

@media (max-width: 1100px) {
    .page-smuggling .data-table,
    .page-smuggling .orange-title,
    .page-smuggling .info-box,
    .page-smuggling .warning-box,
    .page-smuggling .error-box,
    .smuggling-hero,
    .smuggling-status-grid,
    .smuggling-panel,
    .smuggling-orders-section,
    .smuggling-stock-section,
    .smuggling-map-section,
    .smuggling-log-section {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .smuggling-hero { grid-template-columns: 90px 1fr; }
    .smuggling-hero-icon { width: 90px; height: 90px; }
    .smuggling-status-grid,
    .smuggling-order-meta,
    .smuggling-stock-grid,
    .smuggling-smuggler-grid,
    .smuggling-log-card {
        grid-template-columns: 1fr;
    }
    .smuggling-log-offer { text-align: left; }
}


/* v1.48: Crime result screens polish */
.flash.result-panel-flash {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 0 14px !important;
    box-shadow: none !important;
}
.crime-result-panel {
    position: relative;
    max-width: 820px;
    margin: 0 0 14px;
    border: 1px solid #4a4a4a;
    background: linear-gradient(135deg, #252525 0%, #171717 68%, #090909 100%);
    box-shadow: 0 5px 18px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.05);
    overflow: hidden;
}
.crime-result-glow {
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: #ff9b00;
    box-shadow: 0 0 16px rgba(255,155,0,.7);
}
.crime-result-content { padding: 13px 16px 14px 18px; }
.crime-result-kicker {
    color: #ff9b00;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: .8px;
    text-transform: uppercase;
    margin-bottom: 3px;
}
.crime-result-panel h2 {
    margin: 0 0 7px;
    color: #fff;
    font-size: 22px;
    line-height: 1.15;
    text-shadow: 0 0 8px rgba(255,255,255,.25);
}
.crime-result-message {
    margin: 0 0 10px;
    color: #f1f1f1;
    line-height: 1.45;
    font-size: 13px;
}
.crime-result-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 8px;
}
.crime-result-meta {
    background: #151515;
    border: 1px solid #333;
    padding: 7px 8px;
}
.crime-result-meta span {
    display: block;
    color: #ff9b00;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: .4px;
    margin-bottom: 3px;
}
.crime-result-meta strong {
    color: #fff;
    font-size: 13px;
    font-weight: bold;
}
.crime-result-lines {
    margin: 10px 0 0;
    padding-left: 18px;
    color: #e6e6e6;
    line-height: 1.45;
}
.crime-result-lines li { margin: 3px 0; }
.crime-result-success .crime-result-glow { background: #00b72d; box-shadow: 0 0 16px rgba(0,183,45,.7); }
.crime-result-success .crime-result-kicker { color: #74ff8e; }
.crime-result-warning .crime-result-glow { background: #ff9b00; box-shadow: 0 0 16px rgba(255,155,0,.7); }
.crime-result-danger .crime-result-glow { background: #d10000; box-shadow: 0 0 16px rgba(209,0,0,.72); }
.crime-result-danger .crime-result-kicker { color: #ff6d6d; }
.crime-result-legendary {
    border-color: #bd8d16;
    background: linear-gradient(135deg, #2d230c 0%, #19130a 65%, #080808 100%);
}
.crime-result-legendary .crime-result-glow { background: #ffd36b; box-shadow: 0 0 20px rgba(255,211,107,.78); }
.crime-result-legendary .crime-result-kicker { color: #ffd36b; }
.crime-result-info .crime-result-glow { background: #4f83ff; box-shadow: 0 0 16px rgba(79,131,255,.65); }
.crime-result-info .crime-result-kicker { color: #a9c1ff; }

@media (max-width: 900px) {
    .crime-result-panel { max-width: 100%; }
    .crime-result-meta-grid { grid-template-columns: 1fr; }
}

/* v1.49: Admin Safety & Economy Dashboard */
.admin-side-group h3 {
    background: linear-gradient(#553100, #1c1205);
    border-color: #7b4700;
}
.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 12px;
    width: 50%;
    min-width: 760px;
    max-width: 1080px;
    margin: 0 0 14px;
}
.admin-dashboard-card {
    background: linear-gradient(135deg, #242424, #151515);
    border: 1px solid #4a4a4a;
    padding: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 20px rgba(0,0,0,.28);
}
.admin-card-label {
    color: #ff9b00;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 6px;
}
.admin-card-value {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.admin-card-note {
    color: #cfcfcf;
    font-size: 12px;
    margin-top: 7px;
    line-height: 1.35;
}
.admin-tools-table,
.admin-tools-title {
    width: 50%;
    min-width: 760px;
    max-width: 1080px;
}
.admin-tools-table td:first-child {
    width: 245px;
}
.admin-tools-table code {
    color: #fff;
    background: #111;
    padding: 2px 4px;
}
.admin-tools-table .inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.admin-tools-table .inline-form input,
.admin-tools-table .inline-form select {
    max-width: 145px;
}
@media (max-width: 1180px) {
    .admin-dashboard-grid,
    .admin-tools-table,
    .admin-tools-title {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* v1.51: Trade Route + Smuggling result polish */
.trade-route-result-section,
.smuggling-result-section {
    margin: 12px 0 16px;
}
.trade-route-result-section .crime-result-panel,
.smuggling-result-section .crime-result-panel {
    max-width: 860px;
}
.trade-route-result-section .crime-result-meta-grid,
.smuggling-result-section .crime-result-meta-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 900px) {
    .trade-route-result-section .crime-result-meta-grid,
    .smuggling-result-section .crime-result-meta-grid {
        grid-template-columns: 1fr;
    }
}

/* v1.54: Black Market visual shop polish */
.black-market-visual-page {
    max-width: 1120px;
}
.black-market-hero {
    width: 50%;
    min-width: 760px;
    max-width: 980px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: stretch;
    background: radial-gradient(circle at 12% 0, rgba(255,155,0,.18), transparent 34%), linear-gradient(135deg, #202020, #111 72%);
    border: 1px solid #553200;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 24px rgba(0,0,0,.32);
    padding: 14px;
    margin: 0 0 14px;
}
.black-market-kicker {
    color: #ff9b00;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 4px;
}
.black-market-hero h2 {
    margin: 0 0 4px;
    font-size: 24px;
    color: #fff;
    text-shadow: 0 0 8px rgba(255,155,0,.25);
}
.black-market-hero p {
    margin: 0;
    color: #cfcfcf;
    line-height: 1.35;
}
.black-market-hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 8px;
    min-width: 280px;
}
.black-market-hero-stats div {
    background: rgba(0,0,0,.34);
    border: 1px solid #333;
    padding: 10px;
}
.black-market-hero-stats span {
    display: block;
    color: #ff9b00;
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 4px;
}
.black-market-hero-stats strong {
    color: #fff;
    font-size: 15px;
    font-weight: normal;
}
.black-market-section-title {
    width: 50%;
    min-width: 760px;
    max-width: 980px;
}
.black-market-current-grid {
    width: 50%;
    min-width: 760px;
    max-width: 980px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 18px;
}
.black-market-current-card {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    gap: 10px;
    align-items: center;
    background: #202020;
    border: 1px solid #3b3b3b;
    padding: 10px;
    min-height: 86px;
}
.black-market-current-card.owned {
    border-color: #8f5300;
    background: linear-gradient(135deg, #242424, #17120a);
}
.bm-card-icon,
.bm-category-icon,
.bm-item-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 35% 20%, rgba(255,180,60,.35), transparent 32%), linear-gradient(145deg, #303030, #0a0a0a);
    border: 1px solid #7a4700;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 12px rgba(0,0,0,.45);
    color: #ffb13b;
    text-shadow: 0 0 7px rgba(255,155,0,.45);
    font-weight: bold;
    letter-spacing: .04em;
}
.bm-card-icon {
    width: 58px;
    height: 58px;
    font-size: 13px;
}
.bm-card-category {
    color: #ff9b00;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.bm-card-current {
    color: #fff;
    font-size: 16px;
    margin: 3px 0;
    overflow-wrap: anywhere;
}
.bm-card-subline,
.bm-status-muted,
.bm-item-note {
    color: #bcbcbc;
    font-size: 12px;
}
.bm-card-action {
    text-align: right;
}
.black-market-shop-section {
    width: 50%;
    min-width: 760px;
    max-width: 980px;
    margin: 0 0 18px;
    border: 1px solid #383838;
    background: #171717;
    box-shadow: 0 8px 20px rgba(0,0,0,.22);
}
.black-market-category-header {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(#ffb326, #d67700 45%, #8f4400);
    color: #fff;
    border-bottom: 1px solid #000;
}
.bm-category-icon {
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,.32);
    border-color: rgba(0,0,0,.55);
    color: #fff;
    text-shadow: 0 1px 3px #000;
}
.black-market-category-header h2 {
    margin: 0;
    font-size: 17px;
    color: #fff;
}
.black-market-category-header p {
    margin: 2px 0 0;
    color: #fff4d5;
    font-size: 12px;
}
.bm-category-owned {
    background: rgba(0,0,0,.28);
    border: 1px solid rgba(0,0,0,.45);
    padding: 6px 8px;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
}
.black-market-item-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
}
.black-market-item-card {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 10px;
    align-items: center;
    min-height: 92px;
    padding: 10px;
    background: #232323;
    border: 1px solid #3f3f3f;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.black-market-item-card.is-owned {
    border-color: #00a42b;
    background: linear-gradient(135deg, #203024, #1b1b1b);
}
.black-market-item-card.is-unaffordable {
    opacity: .72;
}
.bm-item-visual {
    width: 64px;
    height: 64px;
    font-size: 13px;
}
.bm-item-name {
    color: #fff;
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 4px;
}
.bm-item-price {
    color: #ffcc78;
    font-weight: bold;
    margin-bottom: 3px;
}
.owned-note,
.bm-status-owned {
    color: #97ff9d;
    font-weight: bold;
}
.bm-item-action {
    text-align: right;
}
.bm-item-action form {
    margin: 0;
}
@media (max-width: 1180px) {
    .black-market-hero,
    .black-market-section-title,
    .black-market-current-grid,
    .black-market-shop-section {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}
@media (max-width: 760px) {
    .black-market-current-grid,
    .black-market-item-grid,
    .black-market-hero-stats {
        grid-template-columns: 1fr;
    }
    .black-market-hero,
    .black-market-category-header,
    .black-market-current-card,
    .black-market-item-card {
        grid-template-columns: 1fr;
    }
    .bm-card-action,
    .bm-item-action {
        text-align: left;
    }
}

/* v1.55: Smuggling operations polish v2 */
.smuggling-page-v3 {
    max-width: 980px;
}
.status-idle {
    background: #272727;
    color: #d8d8d8;
}
.smuggling-hero-v3 {
    position: relative;
    overflow: hidden;
    border-color: #543000;
    background: linear-gradient(135deg, #2b2115 0%, #1b1b1b 55%, #090909 100%);
}
.smuggling-hero-v3::after {
    content: '';
    position: absolute;
    right: -90px;
    top: -90px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,155,0,.18), rgba(255,155,0,0) 65%);
    pointer-events: none;
}
.smuggling-command-grid {
    max-width: 980px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 16px;
}
.smuggling-command-card {
    background: linear-gradient(135deg, #202020, #141414);
    border: 1px solid #383838;
    padding: 9px 10px;
    min-height: 76px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.smuggling-command-primary {
    border-color: #6c3c00;
}
.smuggling-command-card span {
    display: block;
    color: #ff9b00;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 4px;
}
.smuggling-command-card strong {
    display: block;
    color: #fff;
    font-weight: normal;
    margin-bottom: 6px;
}
.smuggling-command-card a {
    color: #ff9b00;
    text-decoration: none;
    font-weight: normal;
}
.smuggling-section-head {
    max-width: 980px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px;
    padding: 8px 10px;
    background: #151515;
    border: 1px solid #333;
}
.smuggling-section-head h2 {
    margin: 1px 0 0;
    color: #fff;
    font-size: 16px;
}
.smuggling-manager-panel {
    background: #181818;
    border: 1px solid #343434;
    padding: 10px;
}
.smuggling-empty-state {
    max-width: 980px;
    border: 1px solid #343434;
    background: linear-gradient(135deg, #202020, #121212);
    padding: 14px;
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.smuggling-empty-state strong {
    color: #ff9b00;
    font-size: 15px;
}
.smuggling-empty-state span {
    color: #cfcfcf;
}
.smuggling-order-dossier {
    border-color: #674000;
    position: relative;
    overflow: hidden;
}
.smuggling-order-dossier::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(#ffb326, #8f4400);
}
.smuggling-clue-note {
    position: relative;
    background: linear-gradient(135deg, #17130f, #0d0d0d);
    border-color: #493000;
    padding-top: 24px;
}
.smuggling-note-label {
    position: absolute;
    top: 6px;
    left: 10px;
    color: #ff9b00;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .7px;
}
.smuggling-order-meta-v2 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.smuggling-action-row-v2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.smuggling-stock-grid-v2 {
    max-width: 980px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}
.smuggling-stock-ready {
    border-color: #255c2d;
    background: linear-gradient(135deg, #162516, #101010);
}
.smuggling-stock-empty {
    opacity: .75;
}
.smuggling-log-list-v2 {
    max-width: 980px;
}
.smuggling-log-list-v2 .smuggling-log-card {
    grid-template-columns: 145px 1fr 120px;
}
.page-smuggling .smuggling-world-map {
    max-width: 640px;
}
@media (max-width: 1100px) {
    .smuggling-page-v3,
    .smuggling-command-grid,
    .smuggling-section-head,
    .smuggling-empty-state {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    .smuggling-command-grid,
    .smuggling-order-meta-v2,
    .smuggling-stock-grid-v2,
    .smuggling-log-list-v2 .smuggling-log-card {
        grid-template-columns: 1fr;
    }
    .smuggling-section-head,
    .smuggling-action-row-v2 {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* v1.56: Roulette visual spin polish */
.roulette-table-preview {
    width: 760px;
    max-width: 100%;
    margin: 8px 0 12px;
    border: 1px solid #313131;
    background: #101010;
    padding: 8px;
}
.roulette-table-preview img {
    display: block;
    width: 100%;
    height: auto;
}
.roulette-spin-card {
    width: 860px;
    max-width: 100%;
    margin: 12px 0 14px;
    overflow: hidden;
}
.roulette-spin-layout {
    display: grid;
    grid-template-columns: minmax(360px, 612px) minmax(220px, 1fr);
    gap: 14px;
    align-items: stretch;
}
.roulette-stage-wrap {
    background: #101010;
    border: 1px solid #333;
    padding: 8px;
}
.roulette-table-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 612 / 300;
    overflow: hidden;
    background: #143815;
}
.roulette-table-stage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.roulette-spin-wheel {
    position: absolute;
    left: 8.8%;
    top: 22.2%;
    width: 23.2%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(#111 0 4deg, #b30000 4deg 9deg, #111 9deg 14deg, #b30000 14deg 19deg, #111 19deg 24deg, #b30000 24deg 29deg, #111 29deg 34deg, #007b26 34deg 39deg, #b30000 39deg 44deg, #111 44deg 49deg, #b30000 49deg 54deg, #111 54deg 59deg, #b30000 59deg 64deg, #111 64deg 69deg, #b30000 69deg 74deg, #111 74deg 79deg, #b30000 79deg 84deg, #111 84deg 89deg, #b30000 89deg 94deg, #111 94deg 99deg, #b30000 99deg 104deg, #111 104deg 109deg, #b30000 109deg 114deg, #111 114deg 119deg, #b30000 119deg 124deg, #111 124deg 129deg, #b30000 129deg 134deg, #111 134deg 139deg, #b30000 139deg 144deg, #111 144deg 149deg, #b30000 149deg 154deg, #111 154deg 159deg, #b30000 159deg 164deg, #111 164deg 169deg, #b30000 169deg 174deg, #111 174deg 180deg, #b30000 180deg 185deg, #111 185deg 190deg, #b30000 190deg 195deg, #111 195deg 200deg, #b30000 200deg 205deg, #111 205deg 210deg, #b30000 210deg 215deg, #111 215deg 220deg, #b30000 220deg 225deg, #111 225deg 230deg, #b30000 230deg 235deg, #111 235deg 240deg, #b30000 240deg 245deg, #111 245deg 250deg, #b30000 250deg 255deg, #111 255deg 260deg, #b30000 260deg 265deg, #111 265deg 270deg, #b30000 270deg 275deg, #111 275deg 280deg, #b30000 280deg 285deg, #111 285deg 290deg, #b30000 290deg 295deg, #111 295deg 300deg, #b30000 300deg 305deg, #111 305deg 310deg, #b30000 310deg 315deg, #111 315deg 320deg, #b30000 320deg 325deg, #111 325deg 330deg, #b30000 330deg 335deg, #111 335deg 340deg, #b30000 340deg 345deg, #111 345deg 350deg, #b30000 350deg 360deg);
    opacity: .74;
    mix-blend-mode: multiply;
    animation: rouletteWheelSpin 4.8s cubic-bezier(.18,.78,.24,1) forwards;
    transform-origin: center;
    pointer-events: none;
}
.roulette-ball-orbit {
    position: absolute;
    left: 8.8%;
    top: 22.2%;
    width: 23.2%;
    aspect-ratio: 1;
    border-radius: 50%;
    transform-origin: center;
    animation: rouletteBallSpin 4.8s cubic-bezier(.13,.77,.28,1) forwards;
    pointer-events: none;
}
.roulette-ball-orbit span {
    position: absolute;
    left: 50%;
    top: 3%;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff, #e7e7e7 45%, #b5b5b5 100%);
    border: 1px solid #555;
    box-shadow: 0 0 9px #fff, 0 1px 2px #000;
}
.roulette-winning-number {
    position: absolute;
    left: calc(8.8% + 11.6% - 23px);
    top: calc(22.2% + 11.6% - 23px);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    text-shadow: 0 1px 2px #000;
    border: 2px solid #f2d27a;
    opacity: 0;
    transform: scale(.6);
    animation: rouletteNumberReveal .55s ease-out 4.9s forwards;
    pointer-events: none;
}
.roulette-winning-number.red { background: #a40000; }
.roulette-winning-number.black { background: #080808; }
.roulette-winning-number.green { background: #00742c; }
.roulette-result-side {
    background: #171717;
    border: 1px solid #333;
    padding: 12px;
    min-height: 100%;
}
.roulette-spinning-text {
    color: #ff9b00;
    font-weight: bold;
    margin: 8px 0;
    animation: rouletteTextFadeOut .35s ease 4.6s forwards;
}
.roulette-final-text {
    color: #fff;
    font-weight: bold;
    margin: 8px 0 10px;
    opacity: 0;
    transform: translateY(6px);
    animation: rouletteTextFadeIn .45s ease 4.9s forwards;
}
.roulette-spin-card .result-meta {
    opacity: 0;
    animation: rouletteTextFadeIn .45s ease 5.05s forwards;
}
@keyframes rouletteWheelSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(-1620deg); }
}
@keyframes rouletteBallSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(calc(1800deg + var(--roulette-stop-angle))); }
}
@keyframes rouletteNumberReveal {
    to { opacity: 1; transform: scale(1); }
}
@keyframes rouletteTextFadeOut {
    to { opacity: 0; transform: translateY(-4px); }
}
@keyframes rouletteTextFadeIn {
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 920px) {
    .roulette-spin-layout { grid-template-columns: 1fr; }
    .roulette-spin-card { width: 100%; }
}

/* v1.57: Casino takeover and Roulette copy polish */
.casino-owner-info {
    max-width: 760px;
    margin: 0 0 14px;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    line-height: 1.35;
}
.casino-owner-block {
    max-width: 760px;
}
.roulette-result-heading {
    font-size: 18px;
    line-height: 1.25;
    margin-bottom: 16px;
}
.roulette-loss-title {
    color: #ff3030 !important;
    text-shadow: 0 0 8px rgba(255, 48, 48, .45);
}
.roulette-win-title {
    color: #00d11f !important;
    text-shadow: 0 0 8px rgba(0, 209, 31, .35);
}
.roulette-result-meta {
    opacity: 0;
    animation: rouletteTextFadeIn .45s ease 4.9s forwards;
}
.roulette-result-meta div {
    margin: 7px 0;
}
.roulette-result-meta span {
    display: inline-block;
    min-width: 82px;
    color: #fff;
    font-weight: bold;
}
.roulette-bet-display.roulette-bet-lost {
    color: #ff3030 !important;
}
.roulette-bet-display.roulette-bet-won,
.roulette-win-amount,
.roulette-stake-display {
    color: #00d11f !important;
}

/* v1.58: casino owner copy and roulette result layout polish */
.casino-owner-main-line {
    color: #ff9b00;
    font-weight: bold;
}
.casino-owner-main-line .orange-link,
.casino-owner-info .orange-link {
    color: #ff9b00 !important;
    font-weight: bold;
    text-decoration: none;
}
.casino-owner-main-line .orange-link:hover,
.casino-owner-info .orange-link:hover {
    color: #ffc56d !important;
    text-decoration: none;
}
.casino-maximum-bet {
    margin: 8px 0 14px;
    color: #fff;
    font-weight: bold;
}
.casino-maximum-bet span {
    color: #ff9b00;
    font-weight: bold;
}
.roulette-spin-card {
    width: 860px;
    max-width: 100%;
}
.roulette-spin-card .roulette-stage-wrap {
    max-width: 760px;
}
.roulette-result-under {
    width: 760px;
    max-width: 100%;
    margin-top: 10px;
    padding: 12px 14px;
    background: #171717;
    border: 1px solid #333;
}
.roulette-final-message {
    opacity: 0;
    transform: translateY(6px);
    animation: rouletteTextFadeIn .45s ease 4.9s forwards;
    font-weight: bold;
}
.roulette-result-under .roulette-spinning-text {
    margin: 0 0 8px;
}
.roulette-result-under .roulette-result-meta {
    opacity: 0;
    animation: rouletteTextFadeIn .45s ease 5.05s forwards;
}
.roulette-bet-display.roulette-bet-red {
    color: #ff3030 !important;
}
.roulette-bet-display.roulette-bet-black {
    color: #d8d8d8 !important;
}
.roulette-bet-display.roulette-bet-neutral {
    color: #ff9b00 !important;
}
.roulette-owner-broke-note {
    opacity: 0;
    animation: rouletteTextFadeIn .45s ease 5.1s forwards;
}
