/* =================== NAVBAR =================== */
.navbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 20px;
    background: rgba(0,0,0,0.75);
    border-bottom: 1px solid #c49b63;
    /* ensure navbar doesn't cause horizontal overflow and fills viewport */
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
    left: 0;
    right: 0;
    z-index: 2;
}

.nav-link {
    flex: 0 0 auto;
    padding: 6px 18px;
    color: #c9a855;
    text-decoration: none;
    font-size: 0.95em;
    letter-spacing: 0.04em;
    border: 1px solid transparent;
    border-radius: 3px;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(200,160,80,0.15);
    border-color: #c49b63;
}

.nav-link.active {
    background: linear-gradient(to bottom, #c9a855, #7a5c2e);
    border-color: #e8c87a;
    color: #f5e8c0;
    text-shadow: 1px 1px 2px #000;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 5px;
    background: #c0392b;
    color: #fff;
    font-size: 0.72em;
    font-weight: bold;
    border-radius: 10px;
    vertical-align: middle;
    line-height: 1;
}

/* =================== SORTOWANIE W NAGŁÓWKACH =================== */
th a {
    color: inherit;
    text-decoration: none;
    position: relative;
}
th a::after { content: ''; position: absolute; right: -15px; }
th.sorted-asc a::after  { content: '⬆'; }
th.sorted-desc a::after { content: '⬇'; }

/* =================== OGÓLNE =================== */
/* let body grow with content and always at least viewport height so pseudo-element can cover entire page; keep horizontal overflow hidden */
html, body { min-height: 100vh; overflow-x: hidden; }
body {
    font-family: 'Verdana', sans-serif;
    color: #f0e6d2;
    margin: 0;
    position: relative;
}

/* Background layer: use a pseudo-element so the visual background is
   isolated from document flow and more stable on mobile browsers. */
body::before {
    content: "";
    /* position absolute so the background moves with page content (scrolls with tables) */
    position: absolute;
    inset: 0; /* top:0; right:0; bottom:0; left:0; */
    background-image: url('tibia_background.jpg');
    /* fit the image to viewport width, but repeat vertically so it "zawija się" na wysokość */
    background-repeat: repeat-y; /* repeat only on Y axis */
    /* center horizontally to keep visual composition while fitting width */
    background-position: top center;
    /* fit width, preserve aspect ratio */
    background-size: 100% auto;
    background-attachment: scroll;
    z-index: -1; /* sit behind page content */
    pointer-events: none; /* do not capture pointer events */
    /* keep a separate stacking context to avoid rendering bugs */
    transform: translateZ(0);
}

/* Mobile fallback: keep background sizing simple */
@media (max-width: 820px) {
    /* On mobile use cover to avoid visible seams; apply to the pseudo-element */
    body::before {
        background-position: top center;
        background-size: cover;
        background-repeat: no-repeat;
    }
    /* ensure content remains above background */
    .tables-container, .quest-gather-container, .quests-container, .main-table, .monthly-table {
        position: relative;
        z-index: 1;
    }
}

/* =================== NAGŁÓWEK =================== */
h2.site-title {
    text-align: center;
    margin: 0 0 5px 0;
    font-size: 1.8em;
    color: #f0e6d2;
    text-shadow: 2px 2px 4px #000;
}

/* =================== FLEX NA TABELKI =================== */
.tables-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* wyrównanie do góry */
    margin: 20px;
}

.left-column, .right-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* wymusza start od góry */
}

.left-column { flex: 0 0 69%; }
.right-column { flex: 0 0 26%; }

/* =================== STYLE TABEL =================== */
.main-table table, .monthly-table table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0,0,0,0.7);
    box-shadow: 0 0 15px #000;
}

th, td { padding: 10px 15px; border: 1px solid #c49b63; text-align: center; }
.main-table table th, .monthly-table table th { white-space: nowrap; }

th {
    background: linear-gradient(to bottom, #b89b6b, #8c6f4a);
    color: #fff;
    font-size: 1.1em;
}

tr:nth-child(even) { background: rgba(255,255,255,0.1); }
tr:hover { background: rgba(255,255,255,0.2); }

td.negative { color: #f4a0b0; }

/* =================== SELECT WYBORU MIESIĄCA =================== */
.monthly-table form select {
    background: linear-gradient(to bottom, #c9a855, #7a5c2e);
    border: 1px solid #e8c87a;
    border-radius: 3px;
    color: #f5e8c0;
    text-shadow: 1px 1px 2px #000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.6);
    font-family: 'Verdana', sans-serif;
    font-size: 1.1em;
    font-weight: bold;
    padding: 4px 8px;
    cursor: pointer;
    outline: none;
}

.monthly-table form select:hover {
    filter: brightness(1.2);
}

.monthly-table form select option {
    background: #3a2a10;
    color: #f5e8c0;
}

/* =================== NAGŁÓWEK PRAWEJ TABELI =================== */
.monthly-header {
    display: flex;
    justify-content: space-between; /* title left, dropdown right */
    align-items: center;
    position: relative;
    margin-bottom: 8px;
    gap: 12px;
}

.monthly-title {
    text-align: left;
    margin: 0;
    font-size: 1.8em;
    color: #f0e6d2;
    text-shadow: 1px 1px 2px #000;
}

/* Dropdown po prawej we flexie (nie absolute) */
.monthly-table form {
    position: static;
    margin: 0;
    padding: 0;
}

/* =================== RESPONSYWNOŚĆ =================== */
@media (max-width:1024px) {
    th, td { padding:8px 10px; font-size:0.95em; }
    h2.site-title { font-size:1.5em; }
    .monthly-title { font-size:1.5em; }
}

/* Stack columns below each other on screens narrower than 1640px */
@media (max-width:1640px) {
    .tables-container {
        flex-direction: column;
        align-items: stretch;
        margin: 10px;
    }
    .left-column, .right-column {
        flex: 1 1 100%;
        width: 100%;
    }
    .right-column { margin-left: 0; margin-top: 20px; }

    /* Horizontal scroll on wide tables */
    .main-table, .monthly-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width:768px) {
    th, td { padding:6px 8px; font-size:0.85em; }
    h2.site-title { font-size:1.3em; }
    .monthly-title { font-size:1.3em; }
}

/* MOBILE: smaller screens */
@media (max-width:600px) {
    .navbar {
        padding: 8px 10px;
        gap: 6px;
        flex-wrap: wrap;
    }
    .nav-link {
        padding: 6px 10px;
        font-size: 0.9em;
    }

    .tables-container { margin: 8px; }
    .quests-container, .quest-gather-container { margin: 8px; }

    /* Keep table as table (not block) – parent wrapper handles scroll */
    .main-table table, .monthly-table table {
        min-width: max-content; /* table stays wide, wrapper scrolls */
    }
    .main-table table th, .main-table table td,
    .monthly-table table th, .monthly-table table td {
        white-space: nowrap;
        padding: 6px 8px;
        font-size: 0.82em;
    }

    /* Quest table: horizontal scroll with sticky first 3 columns */
    .quests-table-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* limit height a bit less aggressively on mobile */
        max-height: calc(100vh - 90px);
    }
    .quests-table th, .quests-table td {
        padding: 7px 8px;
        font-size: 0.82em;
    }
    /* Shrink sticky columns a little on mobile */
    .sticky-col-1 { min-width: 90px; }
    .sticky-col-2 { left: 90px;  min-width: 42px; }
    .sticky-col-3 { left: 132px; min-width: 100px; }

    /* Quest header columns narrower on mobile */
    .quest-header { width: 60px; min-width: 60px; max-width: 60px; padding: 6px 3px 20px !important; }
    .quest-header-name { font-size: 0.8em; }

    /* Gather table */
    .gather-table th, .gather-table td {
        padding: 7px 8px;
        font-size: 0.82em;
    }
}

/* =================== QUEST GATHER =================== */
.quest-gather-container {
    margin: 20px;
}

.quest-gather-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.quest-gather-header .site-title {
    margin: 0;
}

.quest-gather-header select {
    background: linear-gradient(to bottom, #c9a855, #7a5c2e);
    border: 1px solid #e8c87a;
    border-radius: 3px;
    color: #f5e8c0;
    text-shadow: 1px 1px 2px #000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.6);
    font-family: 'Verdana', sans-serif;
    font-size: 1.1em;
    font-weight: bold;
    padding: 6px 12px;
    cursor: pointer;
    outline: none;
    min-width: 220px;
}

.quest-gather-header select:hover { filter: brightness(1.2); }
.quest-gather-header select option { background: #3a2a10; color: #f5e8c0; }

.gather-tables {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.gather-section {
    flex: 1;
}

.gather-title {
    text-align: center;
    margin: 0 0 6px 0;
    font-size: 1.6em;
    text-shadow: 1px 1px 3px #000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.gather-need    { color: #f0c060; }
.gather-canhelp { color: #6edb6e; }
.gather-notyet  { color: #f4a0b0; }

.gather-count {
    background: rgba(0,0,0,0.5);
    border: 1px solid #c49b63;
    border-radius: 10px;
    font-size: 0.7em;
    padding: 1px 8px;
    color: #c9a855;
}

.gather-req-level {
    font-size: 0.65em;
    color: #aaa;
    font-weight: normal;
}

.gather-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0,0,0,0.7);
    box-shadow: 0 0 15px #000;
}

.gather-table th, .gather-table td {
    padding: 10px 15px;
    border: 1px solid #c49b63;
    text-align: center;
}

.gather-table th {
    background: linear-gradient(to bottom, #b89b6b, #8c6f4a);
    color: #fff;
    font-size: 1em;
    white-space: nowrap;
}

.gather-table tr:nth-child(even) { background: rgba(255,255,255,0.1); }
.gather-table tr:hover           { background: rgba(255,255,255,0.15); }

.gather-missing { color: #f4a0b0; font-weight: bold; }
.gather-empty   { color: #666; font-style: italic; }

/* Kolory profesji - wiersze */
.gather-table tr.voc-knight   { background: rgba(50,  120, 220, 0.08); }
.gather-table tr.voc-paladin  { background: rgba(220, 185, 30,  0.08); }
.gather-table tr.voc-sorcerer { background: rgba(210, 50,  50,  0.08); }
.gather-table tr.voc-druid    { background: rgba(40,  200, 90,  0.08); }

.gather-table tr.voc-knight:hover   { background: rgba(50,  120, 220, 0.24); }
.gather-table tr.voc-paladin:hover  { background: rgba(220, 185, 30,  0.24); }
.gather-table tr.voc-sorcerer:hover { background: rgba(210, 50,  50,  0.24); }
.gather-table tr.voc-druid:hover    { background: rgba(40,  200, 90,  0.24); }

/* Dot przy nazwie profesji */
.voc-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
    opacity: 0.9;
}
.voc-knight   .voc-dot { background: #3a8aee; }
.voc-paladin  .voc-dot { background: #e0c020; }
.voc-sorcerer .voc-dot { background: #e03030; }
.voc-druid    .voc-dot { background: #28c85a; }

@media (max-width: 900px) {
    .gather-tables { flex-direction: column; }
}


/* =================== QUESTS =================== */
.quests-container {
    margin: 20px;
}

.quests-table-wrapper {
    overflow-x: auto;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.quests-table {
    border-collapse: collapse;
    background: rgba(0,0,0,0.7);
    box-shadow: 0 0 15px #000;
    font-size: 0.9em;
}

.quests-table th,
.quests-table td {
    border: 1px solid #c49b63;
    text-align: center;
    padding: 10px 15px;
    white-space: nowrap;
}

.quests-table thead th {
    background: linear-gradient(to bottom, #b89b6b, #8c6f4a);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Sticky kolumny Nick / Lvl / Vocation */
.sticky-col {
    position: sticky;
    z-index: 1;
}
.quests-table thead .sticky-col {
    background: linear-gradient(to bottom, #b89b6b, #8c6f4a);
    z-index: 3;
}

.sticky-col-1 { left: 0;     min-width: 120px; }
.sticky-col-2 { left: 120px; min-width: 55px;  }
.sticky-col-3 { left: 175px; min-width: 140px; }

/* Nagłówki questów */
.quest-header {
    position: relative;
    vertical-align: middle;
    padding: 6px 4px 22px !important;
    width: 80px;
    min-width: 80px;
    max-width: 80px;
}

.quest-header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.quest-header-name {
    font-size: 0.88em;
    white-space: normal;
    word-break: break-word;
    text-align: center;
    line-height: 1.3;
}

.quest-req-level {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.95em;
    color: #f0d090;
    opacity: 0.55;
    font-weight: bold;
}

/* Statusy questów */
.quest-cell { font-size: 1.3em;}
.quest-done     { color: #6edb6e; }
.quest-not_done { color: #f4a0b0; }
.quest-too_low  { color: #555; }
.quest-unknown  { color: #666; }


/* =================== CHAR BAZAR =================== */
.bazar-container {
    margin: 20px auto;
    max-width: 1500px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Obie tabelki (pending + accepted) tej samej szerokości */
.bazar-container .quests-table-wrapper { width: 100%; }
.bazar-container .quests-table         { width: 100%; table-layout: fixed; }

/* Stałe szerokości kolumn bazaru — zapobiegają "skakaniu" */
.bazar-th-name       { width: 14%; }

/* Link do profilu postaci */
.character-link {
    color: #a8c8f0;
    text-decoration: none;
    transition: color 0.15s;
}
.character-link:hover {
    color: #6eb3ff;
    text-decoration: underline;
}
.bazar-th-lvl-header { width: 6%; position: relative; white-space: nowrap; }
.bazar-th-voc        { width: 13%; }
.bazar-th-server     { width: 9%; }
.bazar-th-price      { width: 10%; }
.bazar-th-desc       { width: 30%; }
.bazar-th-addedby    { width: 9%; font-size: 0.85em; }
.bazar-th-outside    { width: 90px; min-width: 90px; border-left: 3px solid #7a5010 !important; border-bottom: none !important; }

/* Pasek filtrów */
.bazar-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
    background: rgba(0,0,0,0.65);
    border: 1px solid #c49b63;
    border-radius: 5px;
    padding: 12px 18px;
    margin-bottom: 16px;
}

.bazar-filter-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #f0d090;
    font-size: 0.85em;
    font-weight: bold;
    letter-spacing: 0.03em;
}

.bazar-select,
.bazar-input {
    background: linear-gradient(to bottom, #3a2a10, #26180a);
    border: 1px solid #c49b63;
    border-radius: 3px;
    color: #f5e8c0;
    font-family: 'Verdana', sans-serif;
    font-size: 0.95em;
    padding: 5px 10px;
    cursor: pointer;
    outline: none;
    min-width: 140px;
}

.bazar-select:focus,
.bazar-input:focus {
    border-color: #e8c87a;
    box-shadow: 0 0 4px rgba(200,160,80,0.4);
}

.bazar-select option {
    background: #3a2a10;
    color: #f5e8c0;
}

.bazar-input {
    min-width: 80px;
    max-width: 100px;
}

.bazar-inline-desc {
    min-width: unset;
    max-width: unset;
    width: 100%;
    box-sizing: border-box;
    resize: none;
    overflow: hidden;
    min-height: 30px;
    line-height: 1.4;
    font-family: inherit;
    font-size: inherit;
}

/* Kolumna Server i Price */
/* Kolumna Server i Price — szerokości zdefiniowane w bloku stałych szerokości powyżej */

.bazar-price {
    font-weight: bold;
    color: #f0d090;
    white-space: nowrap;
}

.bazar-currency {
    font-size: 0.8em;
    opacity: 0.75;
    margin-left: 3px;
}

/* Pusta tabela */
.bazar-empty {
    text-align: center;
    padding: 20px !important;
    color: #a09070;
    font-style: italic;
}

.bazar-empty code {
    background: rgba(255,255,255,0.08);
    padding: 2px 6px;
    border-radius: 3px;
    font-style: normal;
    color: #e8c87a;
}

/* Licznik wyników */
.bazar-count {
    text-align: right;
    font-size: 0.82em;
    color: #a09070;
    margin-top: 8px;
}

@media (max-width: 820px) {
    .bazar-container { position: relative; z-index: 1; }
    .bazar-filters { flex-direction: column; }
    .bazar-select, .bazar-input { min-width: 100%; }
}

/* =================== NAV: LOGIN / LOGOUT =================== */
.nav-spacer {
    flex: 1;
    min-width: 4px;
}

.nav-user-info {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 10px;
    padding: 0 4px 0 8px;
    white-space: nowrap;
}

.nav-account-identity {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-username {
    color: #f0d090;
    font-size: 0.85em;
    font-weight: bold;
}

.nav-access-status {
    display: inline-flex;
    align-items: stretch;
    min-height: 38px;
    overflow: hidden;
    background: rgba(13, 9, 4, 0.72);
    border: 1px solid rgba(196, 155, 99, 0.72);
    border-radius: 7px;
    box-shadow: inset 0 0 12px rgba(210, 160, 30, 0.06);
}

.nav-status-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px;
    color: #e8d5ad;
    cursor: default;
}

.nav-status-item + .nav-status-item {
    border-left: 1px solid rgba(196, 155, 99, 0.42);
}

.nav-status-icon {
    color: #e8bd4d;
    font-size: 1.25em;
    line-height: 1;
    text-shadow: 0 0 7px rgba(232, 189, 77, 0.35);
}

.nav-status-points strong {
    color: #f4ddb0;
    font-size: 0.84em;
    letter-spacing: 0.03em;
}

.nav-status-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1px;
    font-size: 0.68em;
    line-height: 1.05;
    text-align: center;
}

.nav-status-copy > span {
    color: #d8c7a5;
}

.nav-status-copy strong {
    color: #f2c95f;
    font-size: 1.25em;
    letter-spacing: 0.03em;
}

/* Gear button + dropdown */
.nav-gear-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-settings {
    background: transparent;
    border: none;
    color: #a09070;
    font-size: 1.35em;
    padding: 4px 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transition: color 0.15s, transform 0.3s;
}
.nav-settings:hover {
    color: #f0d090;
    transform: rotate(60deg);
}

.nav-gear-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 170px;
    background: rgba(18,10,3,0.97);
    border: 1px solid #7a5018;
    border-radius: 5px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.65);
    z-index: 200;
    overflow: hidden;
}
.nav-gear-wrap.open .nav-gear-menu {
    display: block;
}
.gear-menu-item {
    display: block;
    padding: 11px 18px;
    text-decoration: none;
    font-size: 0.88em;
    letter-spacing: 0.02em;
    transition: background 0.12s;
    white-space: nowrap;
}
.gear-item-settings {
    color: #c9a855;
    border-bottom: 1px solid #3a2508;
}
.gear-item-settings:hover {
    background: rgba(200,160,60,0.14);
    color: #f0d090;
}
.gear-item-premium {
    color: #ffe066;
    border-bottom: 1px solid #3a2508;
}
.gear-item-premium:hover {
    background: rgba(200,160,30,0.18);
    color: #fff5b0;
}
.gear-item-logout {
    color: #e07070;
}
.gear-item-logout:hover {
    background: rgba(200,50,50,0.2);
    color: #ff9090;
}

/* Register link */
.nav-register {
    border: 1px solid #8a6020 !important;
    border-radius: 3px;
    color: #e8c060 !important;
    padding: 5px 14px !important;
    margin-left: 2px;
}
.nav-register:hover, .nav-register.active {
    background: rgba(200,160,50,0.15) !important;
    border-color: #c49b63 !important;
}

.nav-role {
    font-size: 0.72em;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: bold;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nav-role-user      { background: rgba(80,120,200,0.25); color: #8ab4f8; border: 1px solid #4a6ea0; }
.nav-role-moderator { background: rgba(80,180,80,0.22);  color: #7dd87d; border: 1px solid #3a803a; }
.nav-role-rejected  { background: rgba(180,40,40,0.22);  color: #f08080; border: 1px solid #7a1818; }
.nav-role-admin     { background: rgba(200,80,80,0.22);  color: #f08080; border: 1px solid #803030; }
.nav-role-unverified { background: rgba(160,120,40,0.22); color: #c8a050; border: 1px solid #7a5a20; }

/* Admin nav link */
.nav-admin {
    border: 1px solid #8a6020 !important;
    color: #e8c060 !important;
}
.nav-admin:hover {
    background: rgba(200,160,50,0.15) !important;
    border-color: #c49b63 !important;
    color: #f5e8c0 !important;
}
.nav-admin.active {
    background: linear-gradient(to bottom, #c9a855, #7a5c2e) !important;
    border-color: #e8c87a !important;
    color: #f5e8c0 !important;
}

/* =================== LOGIN PAGE =================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 40px 20px;
}

.login-box {
    background: rgba(0,0,0,0.72);
    border: 1px solid #c49b63;
    border-radius: 8px;
    padding: 36px 44px;
    min-width: 320px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.login-title {
    color: #f0d090;
    font-size: 1.4em;
    margin: 0 0 24px;
    text-align: center;
    letter-spacing: 0.04em;
}

.login-error {
    background: rgba(180,40,40,0.22);
    border: 1px solid #803030;
    border-radius: 4px;
    color: #f09090;
    font-size: 0.9em;
    padding: 8px 12px;
    margin-bottom: 18px;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #d0b880;
    font-size: 0.85em;
    font-weight: bold;
    letter-spacing: 0.03em;
}

.login-input {
    background: linear-gradient(to bottom, #3a2a10, #26180a);
    border: 1px solid #c49b63;
    border-radius: 4px;
    color: #f5e8c0;
    font-family: 'Verdana', sans-serif;
    font-size: 1em;
    padding: 8px 12px;
    outline: none;
    transition: border-color 0.15s;
}

.login-input:focus {
    border-color: #e8c87a;
    box-shadow: 0 0 5px rgba(200,160,80,0.35);
}

.login-btn {
    background: linear-gradient(to bottom, #7a5520, #4a3010);
    border: 1px solid #c49b63;
    border-radius: 4px;
    color: #f5e8c0;
    font-family: 'Verdana', sans-serif;
    font-size: 1em;
    font-weight: bold;
    padding: 10px;
    cursor: pointer;
    margin-top: 6px;
    transition: background 0.15s;
}

.login-btn:hover {
    background: linear-gradient(to bottom, #9a6a28, #6a4418);
    border-color: #e8c87a;
}

/* =================== BAZAR SECTIONS =================== */
.bazar-section {
    margin-bottom: 32px;
}

.bazar-section-title {
    color: #f0d090;
    font-size: 1.05em;
    letter-spacing: 0.04em;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bazar-section-pending {
    border-bottom: 1px solid rgba(200,160,80,0.2);
    padding-bottom: 20px;
    margin-bottom: 24px;
}

/* Badge z liczbą oczekujących */
.bazar-pending-badge {
    background: #b84040;
    color: #fff;
    font-size: 0.75em;
    font-weight: bold;
    border-radius: 10px;
    padding: 2px 8px;
    min-width: 20px;
    text-align: center;
}

/* Wiersz oczekujący — subtelnie inny */
.bazar-pending-row td {
    background: rgba(100,60,0,0.12) !important;
    color: #ddc898;
}

/* Wiersze zaakceptowane — ten sam kolor tekstu co pending */
#bazar-table tbody td {
    color: #ddc898;
}

.bazar-pending-note {
    font-size: 0.8em;
    color: #907050;
    margin: 6px 0 0;
    font-style: italic;
}

/* ─── Name cell z przyciskami akcji ───────────────────── */

/* ─── "Outside" column – wizualnie poza tabelką ─────── */

.bazar-outside-col {
    border-left: 3px solid #5a3808 !important;
    background: rgba(18,10,2,0.45) !important;
    vertical-align: middle;
    padding: 4px 10px !important;
    white-space: nowrap;
}

.bazar-outside-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
}

/* Okrągłe przyciski-ikony */
.bazar-action-btn {
    border: 2px solid;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.05em;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.12s, box-shadow 0.12s;
    background: transparent;
}

.bazar-btn-accept {
    color: #6aea6a;
    border-color: #2a7a2a;
    background: rgba(40,140,40,0.25);
}
.bazar-btn-accept:hover {
    background: rgba(50,180,50,0.45);
    box-shadow: 0 0 9px rgba(100,240,100,0.6);
    transform: scale(1.15);
}

.bazar-btn-reject,
.bazar-btn-remove {
    color: #f07070;
    border-color: #8a2a2a;
    background: rgba(160,40,40,0.28);
}
.bazar-btn-reject:hover,
.bazar-btn-remove:hover {
    background: rgba(200,45,45,0.48);
    box-shadow: 0 0 9px rgba(240,100,100,0.6);
    transform: scale(1.15);
}

/* Przycisk edycji (admin) */
.bazar-btn-edit {
    color: #a8c8f0;
    border-color: #3a5a8a;
    background: rgba(40,80,160,0.25);
    font-size: 1rem;
}
.bazar-btn-edit:hover {
    background: rgba(55,110,220,0.42);
    box-shadow: 0 0 9px rgba(100,170,255,0.55);
    transform: scale(1.15);
}


/* Inline delete confirm */
.bazar-action-form { display: inline; }

.bazar-delete-wrap {
    display: inline-flex;
    align-items: center;
}

.bazar-delete-confirm {
    display: none;
    align-items: center;
    gap: 4px;
    animation: fadeIn 0.12s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.bazar-confirm-delete {
    background: rgba(140,35,35,0.3);
    border: 1px solid #7a3030;
    border-radius: 3px;
    color: #f08080;
    font-size: 0.8em;
    font-weight: bold;
    padding: 3px 9px;
    cursor: pointer;
    transition: background 0.12s;
    white-space: nowrap;
}
.bazar-confirm-delete:hover { background: rgba(180,45,45,0.55); }

.bazar-confirm-cancel {
    background: rgba(55,45,25,0.4);
    border: 1px solid #6a5830;
    border-radius: 3px;
    color: #c0a870;
    font-size: 0.8em;
    padding: 3px 9px;
    cursor: pointer;
    transition: background 0.12s;
    white-space: nowrap;
}
.bazar-confirm-cancel:hover { background: rgba(75,60,30,0.65); }

/* Przycisk usuwania wiersza (stary mały – zachowany) */
.bazar-remove-form { display: inline; margin: 0; padding: 0; }
.bazar-remove-btn {
    background: transparent; border: none; color: #9a4040;
    font-size: 0.75em; cursor: pointer; padding: 0 4px 0 0;
    vertical-align: middle; opacity: 0.5; transition: opacity 0.15s, color 0.15s;
}
.bazar-remove-btn:hover { opacity: 1; color: #e06060; }

/* Kolumna Added by */
/* bazar-th-addedby — szerokość zdefiniowana w bloku stałych szerokości powyżej */

/* ─── Inline header filters ──────────────────────────────────────────── */
.bazar-th-with-filter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.bazar-th-filter-select {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(196,155,99,0.45);
    border-radius: 3px;
    color: #f0e0c0;
    font-family: 'Verdana', sans-serif;
    font-size: 0.73em;
    font-weight: normal;
    padding: 2px 4px;
    cursor: pointer;
    outline: none;
    max-width: 130px;
    width: 100%;
}
.bazar-th-filter-select:focus { border-color: #e8c87a; }
.bazar-th-filter-select option { background: #3a2a10; color: #f5e8c0; }

/* ─── Level header + popup ───────────────────────────────────────────── */
.bazar-th-lvl-header {
    /* szerokość i position/white-space zdefiniowane w bloku stałych szerokości powyżej */
}

.bazar-lvl-filter-trigger {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(196,155,99,0.45);
    border-radius: 3px;
    color: #f0e0c0;
    font-family: 'Verdana', sans-serif;
    font-size: 0.73em;
    font-weight: normal;
    padding: 2px 6px;
    cursor: pointer;
    outline: none;
    width: 100%;
    max-width: 130px;
    text-align: center;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
}
.bazar-lvl-filter-trigger:hover { border-color: #c49b63; color: #f5e8c0; }
.bazar-lvl-filter-trigger.active { border-color: #e8c87a; color: #e8c87a; }

.bazar-lvl-popup {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(14, 8, 2, 0.97);
    border: 1px solid #c49b63;
    border-radius: 5px;
    padding: 10px 14px;
    z-index: 200;
    min-width: 150px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.75);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bazar-lvl-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #d0b880;
    font-size: 0.8em;
    font-weight: normal;
    white-space: nowrap;
}

.bazar-lvl-input {
    background: linear-gradient(to bottom, #3a2a10, #26180a);
    border: 1px solid #c49b63;
    border-radius: 3px;
    color: #f5e8c0;
    font-family: 'Verdana', sans-serif;
    font-size: 0.95em;
    padding: 3px 6px;
    width: 68px;
    outline: none;
}
.bazar-lvl-input:focus { border-color: #e8c87a; }

.bazar-added-by {
    font-size: 0.8em;
    color: inherit;
    text-align: center;
}

/* ─── Inline add row ───────────────────────────────────── */
.bazar-inline-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.bazar-inline-name {
    min-width: 120px;
    flex: 1 1 120px;
    font-size: 0.85em;
    padding: 3px 6px;
}

.bazar-inline-desc {
    min-width: 160px;
    width: 100%;
    font-size: 0.85em;
    padding: 3px 6px;
}

.bazar-desc,
.quests-table td.bazar-desc {
    color: #c0a878;
    font-size: 0.88em;
    font-style: italic;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 160px;
    max-width: 320px;
}

.bazar-inline-price-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.bazar-inline-price {
    width: 100%;
    min-width: 0;
    font-size: 0.85em;
    padding: 3px 4px;
    box-sizing: border-box;
}

.bazar-inline-currency {
    width: 100%;
    min-width: 0;
    font-size: 0.82em;
    padding: 3px 2px;
    box-sizing: border-box;
}

.bazar-inline-confirm,
.bazar-inline-cancel {
    background: transparent;
    border: none;
    font-size: 1em;
    cursor: pointer;
    padding: 0 3px;
    transition: transform 0.1s, opacity 0.15s;
    opacity: 0.7;
    flex-shrink: 0;
}

.bazar-inline-confirm { color: #5cdb5c; }
.bazar-inline-cancel  { color: #db5c5c; }

.bazar-inline-confirm:hover { opacity: 1; transform: scale(1.2); }
.bazar-inline-cancel:hover  { opacity: 1; transform: scale(1.2); }

.bazar-inline-dash {
    color: #605040;
    text-align: center;
}

/* Wiersz trigger "+ Dodaj postać" */
.bazar-add-trigger-cell {
    text-align: left;
    padding: 6px 8px !important;
    background: rgba(0,0,0,0.1) !important;
}

.bazar-add-inline-btn {
    background: transparent;
    border: 1px dashed #806040;
    border-radius: 3px;
    color: #a08050;
    font-size: 0.82em;
    padding: 3px 12px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.bazar-add-inline-btn:hover {
    color: #e8c87a;
    border-color: #c49b63;
}

/* =================== FORMULARZ DODAWANIA (stary, zachowany) =================== */
.bazar-add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    background: rgba(0,0,0,0.55);
    border: 1px solid #8a6832;
    border-radius: 5px;
    padding: 10px 16px;
    margin-bottom: 14px;
}

.bazar-add-label {
    color: #f0d090;
    font-size: 0.85em;
    font-weight: bold;
    white-space: nowrap;
}

.bazar-add-name   { min-width: 180px; flex: 1 1 180px; }
.bazar-add-price  { min-width: 90px;  max-width: 120px; }
.bazar-add-currency { min-width: 70px; }

.bazar-add-btn {
    background: linear-gradient(to bottom, #5a3e10, #3a2508);
    border: 1px solid #c49b63;
    border-radius: 3px;
    color: #f5e8c0;
    font-size: 0.9em;
    font-weight: bold;
    padding: 5px 16px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.bazar-add-btn:hover {
    background: linear-gradient(to bottom, #7a5520, #5a3a10);
    border-color: #e8c87a;
}

/* Przycisk usuwania wiersza */
.bazar-remove-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.bazar-remove-btn {
    background: transparent;
    border: none;
    color: #9a4040;
    font-size: 0.75em;
    cursor: pointer;
    padding: 0 4px 0 0;
    vertical-align: middle;
    opacity: 0.5;
    transition: opacity 0.15s, color 0.15s;
}

.bazar-remove-btn:hover {
    opacity: 1;
    color: #e06060;
}

/* Kolumna Scraped */
.bazar-th-scraped { min-width: 120px; font-size: 0.8em; }

.bazar-scraped {
    font-size: 0.75em;
    color: #a09070;
    white-space: nowrap;
}

.bazar-not-scraped {
    color: #e89040;
    font-style: italic;
}

/* =================== ZMIANA HASŁA =================== */
.chpw-user {
    color: #a09070;
    font-size: 0.85em;
    margin: -10px 0 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chpw-user strong {
    color: #f0d090;
}

.chpw-hint {
    color: #806040;
    font-weight: normal;
    font-size: 0.9em;
}

.chpw-success {
    background: rgba(40,140,40,0.2);
    border: 1px solid #3a803a;
    border-radius: 4px;
    color: #7dd87d;
    font-size: 0.9em;
    padding: 8px 12px;
    margin-bottom: 18px;
    text-align: center;
}

.chpw-back {
    text-align: center;
    margin-top: 16px;
    font-size: 0.85em;
}

.chpw-back-link {
    color: #906840;
    text-decoration: none;
    border-bottom: 1px dotted #906840;
    transition: color 0.15s;
}

.chpw-back-link:hover {
    color: #c49b63;
    border-bottom-color: #c49b63;
}

/* Notatka pod przyciskiem Register */
.register-note {
    margin-top: 14px;
    font-size: 0.82em;
    color: #907050;
    text-align: center;
    line-height: 1.5;
}
.register-note strong {
    color: #c8a050;
}

/* =================== USERS MANAGEMENT =================== */
.users-container {
    margin: 20px;
}

/* Na telefonie tabela przewija cały widok, tak jak ranking EXP Contest. */
html.users-page,
body.users-page {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Tło i pasek zakładek pozostają przy ekranie podczas przesuwania tabeli. */
body.users-page::before { position: fixed; }

body.users-page .navbar {
    position: sticky;
    left: 0;
}

@media (max-width: 600px) {
    .users-page .users-container { margin: 8px; }
    .users-page .users-table { min-width: 1700px; }
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0,0,0,0.72);
    box-shadow: 0 0 15px #000;
}

.users-table th {
    background: linear-gradient(to bottom, #b89b6b, #8c6f4a);
    color: #fff;
    font-size: 1em;
    padding: 10px 15px;
    border: 1px solid #c49b63;
    text-align: center;
    white-space: nowrap;
}

.users-th-name    { min-width: 150px; text-align: left !important; }
.users-th-role    { min-width: 120px; }
.users-th-change  { min-width: 130px; }
.users-th-actions { min-width: 100px; }
.users-th-permission { min-width: 65px; }
.users-th-accounts { width: 45px; }
.users-td-accounts { font-variant-numeric: tabular-nums; }

:is(.users-td-permission, .quest-visibility-toggle) input[type="checkbox"] {
    appearance: none;
    display: inline-grid;
    place-content: center;
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
    vertical-align: middle;
    border: 1px solid #c49b63;
    border-radius: 4px;
    background: linear-gradient(to bottom, #3a2a10, #26180a);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

:is(.users-td-permission, .quest-visibility-toggle) input[type="checkbox"]::before {
    content: "";
    width: 5px;
    height: 10px;
    border: solid #26180a;
    border-width: 0 2px 2px 0;
    transform: translateY(-1px) rotate(45deg);
    visibility: hidden;
}

:is(.users-td-permission, .quest-visibility-toggle) input[type="checkbox"]:checked {
    background: linear-gradient(to bottom, #e8c87a, #b89b6b);
}

:is(.users-td-permission, .quest-visibility-toggle) input[type="checkbox"]:checked::before {
    visibility: visible;
}

:is(.users-td-permission, .quest-visibility-toggle) input[type="checkbox"]:hover:not(:disabled) {
    border-color: #ffe066;
}

:is(.users-td-permission, .quest-visibility-toggle) input[type="checkbox"]:focus-visible {
    outline: 2px solid #ffe066;
    outline-offset: 3px;
}

:is(.users-td-permission, .quest-visibility-toggle) input[type="checkbox"]:disabled {
    opacity: 0.55;
    cursor: default;
}

@media (forced-colors: active) {
    :is(.users-td-permission, .quest-visibility-toggle) input[type="checkbox"] {
        appearance: auto;
    }

    :is(.users-td-permission, .quest-visibility-toggle) input[type="checkbox"]::before {
        display: none;
    }
}

.users-table td {
    padding: 9px 14px;
    border: 1px solid #c49b63;
    text-align: center;
    vertical-align: middle;
}

.users-table tr:nth-child(even) { background: rgba(255,255,255,0.07); }
.users-table tr:hover           { background: rgba(255,255,255,0.14); }

.users-row-unverified {
    background: rgba(200,150,30,0.07) !important;
}
.users-row-unverified:hover {
    background: rgba(200,150,30,0.18) !important;
}

.users-td-name {
    font-weight: bold;
    color: #f0e6d2;
    text-align: left !important;
}

/* Role badges */
.role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78em;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.role-badge-unverified { background: rgba(160,120,40,0.22); color: #c8a050; border-color: #7a5a20; }
.role-badge-user       { background: rgba(80,120,200,0.25); color: #8ab4f8; border-color: #4a6ea0; }
.role-badge-moderator  { background: rgba(80,180,80,0.22);  color: #7dd87d; border-color: #3a803a; }
.role-badge-rejected   { background: rgba(180,40,40,0.22);  color: #f08080; border-color: #7a1818; }
.role-badge-admin      { background: rgba(200,80,80,0.22);  color: #f08080; border-color: #803030; }

/* Formularz zmiany roli */
.users-role-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    justify-content: center;
}

.users-role-select {
    background: linear-gradient(to bottom, #3a2a10, #26180a);
    border: 1px solid #c49b63;
    border-radius: 3px;
    color: #f5e8c0;
    font-family: 'Verdana', sans-serif;
    font-size: 0.88em;
    padding: 4px 8px;
    cursor: pointer;
    outline: none;
}
.users-role-select:focus { border-color: #e8c87a; }
.users-role-select option { background: #3a2a10; color: #f5e8c0; }

/* Przyciski akcji */
.users-btn {
    border: 1px solid;
    border-radius: 3px;
    font-family: 'Verdana', sans-serif;
    font-size: 0.82em;
    font-weight: bold;
    padding: 4px 11px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.users-btn-save {
    background: linear-gradient(to bottom, #3a5a3a, #263826);
    border-color: #4a8a4a;
    color: #9de89d;
}
.users-btn-save:hover {
    background: linear-gradient(to bottom, #4a7a4a, #365436);
    border-color: #7dd87d;
    color: #c0ffc0;
}

.users-btn-accept {
    background: linear-gradient(to bottom, #4a6020, #2e3a12);
    border-color: #8ab040;
    color: #c8e870;
}
.users-btn-accept:hover {
    background: linear-gradient(to bottom, #6a8030, #4a5a1a);
    border-color: #b0d050;
    color: #e0ff90;
}

.users-btn-delete {
    background: linear-gradient(to bottom, #5a1a1a, #3a0e0e);
    border-color: #9a3030;
    color: #f08080;
}
.users-btn-delete:hover {
    background: linear-gradient(to bottom, #7a2020, #5a1212);
    border-color: #e05050;
    color: #ffb0b0;
}

.users-own-label {
    color: #706050;
    font-size: 0.85em;
    font-style: italic;
}

.users-td-actions {
    white-space: nowrap;
}

/* Inline delete confirm w tabeli users */
.users-delete-wrap {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.users-delete-confirm {
    display: none;
    align-items: center;
    gap: 4px;
}

.users-empty {
    text-align: center !important;
    color: #a09070;
    font-style: italic;
    padding: 20px !important;
}

/* =================== UNVERIFIED PAGE =================== */
.unverified-box {
    max-width: 440px !important;
}

.unverified-desc {
    color: #c0a880;
    font-size: 0.9em;
    line-height: 1.6;
    margin-bottom: 14px;
    text-align: center;
}

.unverified-hl {
    color: #8ab4f8;
}

.unverified-links {
    text-align: center;
    margin-top: 20px;
    font-size: 0.88em;
}

/* =================== IDLE EVENTS =================== */
.idle-events-container {
    width: calc(100% - 40px);
    margin: 28px auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.idle-events-layout.has-pacc-panel {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1880px);
    gap: 18px;
    align-items: start;
    justify-content: center;
}

.idle-pacc-panel {
    position: sticky;
    top: 12px;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    contain: size;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(196, 155, 99, 0.72);
    border-radius: 12px;
    background: rgba(10, 8, 7, 0.92);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.55);
}

.idle-pacc-panel > h2 {
    margin: 0;
    padding: 10px 12px;
    border-bottom: 1px solid #c49b63;
    background: linear-gradient(to bottom, #b89b6b, #8c6f4a);
    color: #fff;
    text-align: center;
    font-size: 1.05em;
    text-shadow: 1px 1px 2px #000;
}

.idle-pacc-windows {
    display: grid;
    flex: 1 1 auto;
    gap: 8px;
    min-height: 0;
    margin: 0;
    padding: 9px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    list-style: none;
}

.idle-pacc-window {
    position: relative;
    padding: 8px;
    border: 1px solid rgba(196, 155, 99, 0.28);
    border-left: 3px solid #dca832;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.035);
}

.idle-pacc-range {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 3px 6px;
    padding-right: 52px;
}

.idle-pacc-range strong {
    color: #f2d89b;
    font-size: 0.85em;
}

.idle-pacc-range span {
    color: #aa9a83;
    font-size: 0.68em;
}

.idle-pacc-count {
    position: absolute;
    top: 8px;
    right: 7px;
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(190, 130, 20, 0.3);
    color: #ffd77a;
    font-size: 0.62em;
    font-weight: bold;
    white-space: nowrap;
}

.idle-pacc-events {
    display: grid;
    gap: 5px;
    margin: 7px 0 0;
    padding: 7px 0 0;
    border-top: 1px solid rgba(196, 155, 99, 0.18);
    list-style: none;
}

.idle-pacc-events li {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 1px 5px;
    min-width: 0;
}

.idle-pacc-events span {
    color: #aa9a83;
    font-size: 0.62em;
    white-space: nowrap;
}

.idle-pacc-events strong {
    min-width: 0;
    overflow: hidden;
    color: #9fc1f3;
    font-size: 0.68em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.idle-pacc-events i {
    grid-column: 2;
    font-size: 0.56em;
    font-style: normal;
    font-weight: bold;
}

.idle-pacc-events i.event-raid {
    color: #ffaaa0;
}

.idle-pacc-events i.event-exp {
    color: #ffd77a;
}

.idle-year-calendar {
    display: grid;
    width: 100%;
    max-width: 1880px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
    margin: 0 auto;
}

.idle-month-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(196, 155, 99, 0.72);
    border-radius: 12px;
    background: rgba(10, 8, 7, 0.86);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.55);
}

.idle-month-card h2 {
    margin: 0;
    padding: 10px 12px;
    background: linear-gradient(to bottom, #b89b6b, #8c6f4a);
    border-bottom: 1px solid #c49b63;
    color: #fff;
    text-align: center;
    font-size: 1.18em;
    letter-spacing: 0.04em;
    text-shadow: 1px 1px 2px #000;
}

.idle-calendar-weekdays,
.idle-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.idle-calendar-weekdays {
    background: rgba(184, 155, 107, 0.13);
    border-bottom: 1px solid rgba(196, 155, 99, 0.35);
}

.idle-calendar-weekdays span {
    padding: 6px 2px;
    color: #bbaa8f;
    text-align: center;
    font-size: 0.72em;
    font-weight: bold;
    text-transform: uppercase;
}

.idle-calendar-day {
    position: relative;
    min-width: 0;
    min-height: 58px;
    border-right: 1px solid rgba(196, 155, 99, 0.18);
    border-bottom: 1px solid rgba(196, 155, 99, 0.18);
    background: rgba(255, 255, 255, 0.025);
    box-sizing: border-box;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.idle-calendar-day:nth-child(7n) {
    border-right: 0;
}

.idle-calendar-day.is-empty {
    background: rgba(0, 0, 0, 0.23);
}

.idle-calendar-day.has-event.event-raid {
    background: linear-gradient(145deg, rgba(140, 32, 24, 0.35), rgba(40, 12, 10, 0.22));
    box-shadow: inset 0 0 0 1px rgba(210, 75, 60, 0.62);
}

.idle-calendar-day.has-event.event-exp {
    background: linear-gradient(145deg, rgba(175, 118, 18, 0.38), rgba(55, 37, 8, 0.22));
    box-shadow: inset 0 0 0 1px rgba(220, 168, 50, 0.66);
}

.idle-calendar-day.is-today {
    outline: 2px solid #6edb6e;
    outline-offset: -2px;
    background-color: rgba(70, 180, 85, 0.16);
    z-index: 1;
}

.idle-calendar-day.has-event.is-event-highlighted {
    box-shadow: inset 0 0 0 2px #f0c060, 0 0 9px rgba(240, 192, 96, 0.48);
    filter: brightness(1.18);
    z-index: 2;
}

.idle-calendar-day-number {
    position: absolute;
    top: 4px;
    left: 5px;
    color: #b9aa95;
    font-size: 0.72em;
    line-height: 1;
}

.idle-calendar-day.is-today .idle-calendar-day-number {
    color: #9af0a5;
    font-weight: bold;
}

.idle-calendar-markers {
    display: flex;
    height: 100%;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 14px 2px 2px;
    box-sizing: border-box;
}

.idle-calendar-event-marker {
    display: flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: transform 0.15s ease;
}

a.idle-calendar-event-marker:hover,
a.idle-calendar-event-marker:focus-visible,
span.idle-calendar-event-marker:focus-visible {
    transform: scale(1.06);
}

.idle-calendar-event-marker img {
    display: block;
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.idle-calendar-marker-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d24b3c;
    box-shadow: 0 0 5px rgba(210, 75, 60, 0.75);
}

.event-exp .idle-calendar-marker-dot {
    background: #dca832;
    box-shadow: 0 0 5px rgba(220, 168, 50, 0.75);
}

.idle-event-tooltip {
    position: fixed;
    z-index: 1000;
    display: grid;
    min-width: 150px;
    max-width: min(280px, calc(100vw - 16px));
    gap: 3px;
    padding: 8px 11px;
    border: 1px solid #6a5020;
    border-radius: 6px;
    background: #1e1a10;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.72);
    color: #d4b878;
    font-size: 0.82em;
    line-height: 1.3;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    box-sizing: border-box;
    transition: opacity 0.12s ease;
}

.idle-event-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
}

.idle-event-tooltip-date {
    color: #c9bda8;
    font-size: 0.9em;
}

.idle-event-tooltip-name {
    color: #9fc1f3;
}

.idle-event-tooltip-type {
    font-size: 0.78em;
    font-weight: bold;
}

.idle-event-tooltip.event-raid .idle-event-tooltip-type {
    color: #ffaaa0;
}

.idle-event-tooltip.event-exp .idle-event-tooltip-type {
    color: #ffd77a;
}

.idle-events-empty {
    margin: 30px auto;
    padding: 24px;
    border: 1px solid rgba(196, 155, 99, 0.4);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.62);
    color: #a99a84;
    text-align: center;
    font-style: italic;
}

@media (max-width: 1600px) {
    .idle-year-calendar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .idle-year-calendar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .idle-events-layout.has-pacc-panel {
        grid-template-columns: 1fr;
    }

    .idle-pacc-panel {
        position: static;
        contain: none;
        height: min(70vh, 720px);
    }
}

@media (max-width: 680px) {
    .idle-events-container {
        width: calc(100% - 20px);
        margin: 18px auto;
    }

    .idle-year-calendar {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .idle-calendar-day,
    .idle-calendar-markers {
        min-height: 52px;
    }

    .idle-calendar-event-marker {
        width: 30px;
        height: 30px;
    }

    .idle-calendar-event-marker img {
        width: 26px;
        height: 26px;
    }

}

/* =================== MARKET =================== */
.market-container {
    margin: 20px auto;
    max-width: 1500px;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.market-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: flex-start;
}

.market-col {
    flex: 1 1 680px;
    min-width: 0;
    max-width: 750px;
}

@media (max-width: 1500px) {
    .market-cols { flex-direction: column; align-items: stretch; }
    .market-col  { max-width: 100%; }
}

.market-col h2.section-title {
    text-align: center;
    margin: 0 0 8px 0;
    font-size: 1.4em;
    color: #f0e6d2;
    text-shadow: 2px 2px 4px #000;
}

/* Tabele na stronie market — lekko mniejszy padding niż gather-table */
#market-table th, #market-table td,
#market-history-table th, #market-history-table td,
#mymarket-table th, #mymarket-table td,
#watchlist-table th, #watchlist-table td {
    padding: 5px;
    font-size: 0.9em;
}

#market-table td.item-cell-name,
#market-history-table td.item-cell-name,
#mymarket-table td.item-cell-name,
#watchlist-table td.item-cell-name {
    max-width: 320px;
    overflow-wrap: anywhere;
    white-space: normal;
    width: 35%;
}

#market-table td.ts-cell,
#market-history-table td.ts-cell,
#mymarket-table td.ts-cell,
#watchlist-table td.ts-cell {
    white-space: nowrap;
    color: #f0e6d2;
    font-size: 0.88em;
}

/* Odznaki offer-id i cen */
.offer-id {
    display: inline-block;
    background: rgba(240, 230, 210, 0.1);
    border: 1px solid rgba(240, 230, 210, 0.3);
    color: #f0e6d2;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.price-pc {
    display: inline-block;
    background: rgba(200, 160, 60, 0.18);
    border: 1px solid rgba(200, 160, 60, 0.45);
    color: #d4a840;
    font-weight: bold;
    white-space: nowrap;
    padding: 3px 10px;
    border-radius: 20px;
}

.price-cc {
    display: inline-block;
    background: rgba(100, 170, 240, 0.15);
    border: 1px solid rgba(100, 170, 240, 0.4);
    color: #7ab8f5;
    font-weight: bold;
    white-space: nowrap;
    padding: 3px 10px;
    border-radius: 20px;
}

.relisted-badge {
    display: inline-block;
    background: rgba(70, 165, 210, 0.18);
    border: 1px solid rgba(70, 165, 210, 0.45);
    color: #78c9ec;
    font-size: 0.82em;
    font-weight: bold;
    padding: 2px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

.overdue-badge {
    display: inline-block;
    background: rgba(210, 130, 30, 0.18);
    border: 1px solid rgba(210, 130, 30, 0.45);
    color: #e8a050;
    font-size: 0.82em;
    font-weight: bold;
    padding: 2px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

.status-available {
    display: inline-block;
    background: rgba(80, 180, 80, 0.15);
    border: 1px solid rgba(80, 180, 80, 0.4);
    color: #7ecf7e;
    font-size: 0.82em;
    font-weight: bold;
    padding: 2px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

.status-gone {
    display: inline-block;
    background: rgba(160, 160, 160, 0.12);
    border: 1px solid rgba(160, 160, 160, 0.3);
    color: #999;
    font-size: 0.82em;
    font-weight: bold;
    padding: 2px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

.status-relisted {
    display: inline-block;
    background: rgba(70, 165, 210, 0.18);
    border: 1px solid rgba(70, 165, 210, 0.45);
    color: #78c9ec;
    font-size: 0.82em;
    font-weight: bold;
    padding: 2px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

.status-overdue {
    display: inline-block;
    background: rgba(210, 130, 30, 0.18);
    border: 1px solid rgba(210, 130, 30, 0.45);
    color: #e8a050;
    font-size: 0.82em;
    font-weight: bold;
    padding: 2px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Tooltip daty wystawienia dla wpisów w historii marketu */
.history-date-tooltip {
    position: relative;
    cursor: help;
}

.history-date-tooltip::after {
    content: attr(data-tooltip);
    display: none;
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    padding: 6px 10px;
    border: 1px solid #6a5020;
    border-radius: 5px;
    background: #1e1a10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.65);
    color: #d4b878;
    font-size: 0.95em;
    font-weight: normal;
    line-height: 1.35;
    pointer-events: none;
    white-space: nowrap;
}

.history-date-tooltip:hover::after {
    display: block;
}

.ts-date {
    font-size: 0.85em;
    white-space: nowrap;
}

.ts-date-sold {
    color: #999;
}

.ts-date-relisted {
    color: #78c9ec;
}

.ts-date-overdue {
    color: #e8a050;
}

/* Przyciski watch / unwatch */
.btn-watch {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(200,160,60,0.15);
    border: 1px solid rgba(200,160,60,0.4);
    color: #d4a840;
    border-radius: 50%;
    width: 26px; height: 26px;
    font-size: 1.1em; font-weight: bold;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s;
}
.btn-watch:hover:not(:disabled):not(.limit-reached) { background: rgba(200,160,60,0.35); }
.btn-watch.watched {
    background: rgba(80,180,80,0.2);
    border-color: rgba(80,180,80,0.5);
    color: #7ecf7e;
    cursor: default;
}
.btn-watch.limit-reached {
    background: rgba(200,60,60,0.15);
    border-color: rgba(200,60,60,0.4);
    color: #e07060;
    cursor: not-allowed;
}

.btn-unwatch {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(200,80,60,0.13);
    border: 1px solid rgba(200,80,60,0.35);
    color: #e07060;
    border-radius: 50%;
    width: 26px; height: 26px;
    font-size: 1em; font-weight: bold;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s;
}
.btn-unwatch:hover { background: rgba(200,80,60,0.3); }

/* Filtr tekstowy nad tabelą */
.market-filter {
    width: 100%;
    margin-bottom: 8px;
    padding: 5px 10px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(240,230,210,0.2);
    border-radius: 6px;
    color: #f0e6d2;
    font-size: 0.9em;
    box-sizing: border-box;
}
.market-filter::placeholder { color: #a09070; }

/* Komunikat błędu pod tabelą market */
.watch-error {
    color: #e07060;
    font-size: 0.82em;
    margin-top: 4px;
    text-align: center;
}

/* Wrapper + tooltip dla przycisku watch */
.watch-btn-wrap {
    position: relative;
    display: inline-block;
}
.watch-btn-wrap .watch-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e1a10;
    border: 1px solid #6a5020;
    color: #d4b878;
    font-size: 0.82em;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 5px;
    pointer-events: none;
    z-index: 10;
}
.watch-btn-wrap:hover .watch-tooltip {
    display: block;
}
.btn-watch.limit-reached { cursor: default; }

/* Paginacja specyficzna dla marketu (override globalnej .pagination) */
.market-pagination-bar {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    font-size: 1rem;
}
.market-pagination-bar .page-btn {
    background: #2a2a2a;
    color: #c8a96e;
    border: 1px solid #444;
    padding: 7px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.15s;
}
.market-pagination-bar .page-btn:hover:not(:disabled) {
    background: #3a3a2a;
    border-color: #c8a96e;
}
.market-pagination-bar .page-btn.active {
    background: #c8a96e;
    color: #1a1a1a;
    border-color: #c8a96e;
    font-weight: bold;
    cursor: default;
}
.market-pagination-bar .page-btn:disabled {
    opacity: 0.35;
    cursor: default;
}
.market-pagination-bar .page-ellipsis {
    color: #888;
    padding: 4px 6px;
    font-size: 0.85em;
    line-height: 1.8;
}

/* ── Paginacja (market i inne tabele) ── */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 10px;
    justify-content: center;
}
.page-btn {
    background: #2a2a2a;
    color: #c8a96e;
    border: 1px solid #444;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.15s;
}
.page-btn:hover:not(:disabled) {
    background: #3a3a2a;
    border-color: #c8a96e;
}
.page-btn.active {
    background: #c8a96e;
    color: #1a1a1a;
    border-color: #c8a96e;
    font-weight: bold;
    cursor: default;
}
.page-btn:disabled {
    opacity: 0.35;
    cursor: default;
}
.page-ellipsis {
    color: #888;
    padding: 4px 6px;
    font-size: 0.85em;
    line-height: 1.8;
}

/* ── Members-only box (My Market bez uprawnień) ── */
.members-only-box {
    background: rgba(0,0,0,0.55);
    border: 1px solid #6a5020;
    border-radius: 6px;
    padding: 36px 28px;
    text-align: center;
    color: #c0a070;
}
.members-only-title {
    margin: 0 0 14px;
    font-size: 1.1em;
    font-weight: bold;
    color: #d4b878;
}
.members-only-body {
    margin: 0 0 14px;
    font-size: 0.95em;
    line-height: 1.6;
}
.members-only-hint {
    margin: 0;
    font-size: 0.9em;
    color: #a09070;
}
.members-only-link {
    color: #c8a96e;
    text-decoration: underline;
    font-weight: bold;
}

/* ── Premium — navbar badge ── */
.nav-role-premium {
    background: linear-gradient(135deg, rgba(210,160,30,0.35), rgba(255,210,60,0.18));
    color: #ffe066;
    border: 1px solid #c8a020;
    font-size: 0.72em;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: bold;
    letter-spacing: 0.04em;
}

.nav-role-premium-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(210,160,30,0.35), rgba(255,210,60,0.18));
    border: 1px solid #c8a020;
    color: #ffe066;
    font-size: 0.7em;
    font-weight: bold;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 2px;
    vertical-align: middle;
    letter-spacing: 0.03em;
    cursor: default;
    white-space: nowrap;
}

/* ── Premium — tabela Users ── */
.users-th-premium { min-width: 160px; }
.users-th-market-boost { min-width: 300px; }
.users-th-idle-premium { min-width: 380px; }

.users-td-premium {
    white-space: nowrap;
    text-align: center;
}

.users-td-idle-premium {
    min-width: 380px;
    text-align: center;
}

.users-td-market-boost {
    min-width: 300px;
    text-align: center;
}

.users-premium-until {
    color: #ffe066;
    font-size: 0.85em;
    font-weight: bold;
}

.users-premium-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(210,160,30,0.35), rgba(255,210,60,0.18));
    border: 1px solid #c8a020;
    color: #ffe066;
    font-size: 0.7em;
    font-weight: bold;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.03em;
}

.users-premiums-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.users-premium-badge-expired {
    background: rgba(80, 70, 50, 0.28);
    border-color: #74654c;
    color: #9b8c70;
}

.users-premiums-list form {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}

.users-idle-limit-form input,
.users-idle-grant-form input {
    width: 52px;
    padding: 4px 5px;
    border: 1px solid #806030;
    border-radius: 5px;
    background: #2b1f0d;
    color: #f5e8c0;
    font-size: 0.82em;
    text-align: center;
}

.users-row-premium {
    background: rgba(200, 160, 20, 0.06) !important;
}
.users-row-premium:hover {
    background: rgba(200, 160, 20, 0.14) !important;
}

.users-btn-premium {
    background: linear-gradient(to bottom, #5a4a10, #3a2e08);
    border-color: #c8a020;
    color: #ffe066;
}
.users-btn-premium:hover {
    background: linear-gradient(to bottom, #7a6418, #5a4810);
    border-color: #ffe066;
    color: #fff5b0;
}

.users-btn-reset-premium {
    background: linear-gradient(to bottom, #3a2a10, #26180a);
    border-color: #806030;
    color: #a08040;
}
.users-btn-reset-premium:hover {
    background: linear-gradient(to bottom, #5a4010, #3a2a08);
    border-color: #c8a020;
    color: #ffe066;
}

/* ── Get Market Boost page ── */
.getpremium-box   { max-width: 480px; }

.getpremium-title { color: #ffe066 !important; }

.getpremium-intro {
    color: #c0a878;
    font-size: 0.92em;
    line-height: 1.7;
    text-align: center;
    margin: 0 0 18px;
}

.getpremium-hl { color: #ffe066; font-weight: bold; }

.getpremium-card {
    background: rgba(200,160,40,0.08);
    border: 1px solid #7a5a18;
    border-radius: 6px;
    padding: 20px 22px;
    margin-bottom: 20px;
    text-align: center;
}

.getpremium-card-title {
    margin: 0 0 10px;
    font-size: 1em;
    font-weight: bold;
    color: #f0d090;
}

.getpremium-card-body {
    margin: 0 0 12px;
    color: #c0a878;
    font-size: 0.9em;
}

.getpremium-char {
    margin: 0 0 4px;
    font-size: 1.2em;
    font-weight: bold;
    color: #ffe066;
    letter-spacing: 0.06em;
}

.getpremium-city {
    margin: 0;
    color: #a09070;
    font-size: 0.85em;
}
.getpremium-city strong { color: #c0a878; }

.getpremium-note {
    margin: 0 0 6px;
    font-size: 0.82em;
    color: #a09070;
    text-align: center;
    line-height: 1.6;
}
.getpremium-note strong { color: #c0a878; }

.getpremium-back {
    text-align: center;
    margin-top: 18px;
    font-size: 0.88em;
}

/* =================== EXP CONTEST =================== */
.contest-container {
    margin: 20px;
    position: relative;
    z-index: 1;
}

/* Na telefonie ranking przewija cały widok, a nie osobny obszar tabeli. */
html.contest-page,
body.contest-page {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Tło pozostaje pod całym ekranem podczas poziomego przesuwania konkursu. */
body.contest-page::before { position: fixed; }

/* Pasek zakładek pozostaje wyrównany do ekranu, gdy treść przesuwa się w bok. */
body.contest-page .navbar {
    position: sticky;
    left: 0;
}

@media (max-width: 600px) {
    .contest-page .contest-container { margin: 8px; }
    .contest-page #contest-table,
    .contest-page .contest-history-table { min-width: 680px; }
}

/* ── Admin bar ── */
.contest-admin-bar {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contest-btn {
    border: 1px solid;
    border-radius: 4px;
    font-family: 'Verdana', sans-serif;
    font-size: 0.88em;
    font-weight: bold;
    padding: 6px 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s;
    white-space: nowrap;
}

.contest-btn-create {
    background: linear-gradient(to bottom, #3a5a3a, #263826);
    border-color: #4a8a4a;
    color: #9de89d;
}
.contest-btn-create:hover {
    background: linear-gradient(to bottom, #4a7a4a, #365436);
    border-color: #7dd87d;
    color: #c0ffc0;
}

.contest-btn-cancel {
    background: linear-gradient(to bottom, #5a1a1a, #3a0e0e);
    border-color: #9a3030;
    color: #f08080;
}
.contest-btn-cancel:hover {
    background: linear-gradient(to bottom, #7a2020, #5a1212);
    border-color: #e05050;
    color: #ffb0b0;
}

/* ── Layout dwóch kolumn ── */
.contest-cols {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contest-info-col {
    flex: 0 0 42%;
    min-width: 260px;
    max-width: 480px;
}

.contest-main-col {
    flex: 1 1 0;
    min-width: 0;
}

@media (max-width: 960px) {
    .contest-cols       { flex-direction: column; }
    .contest-info-col   { flex: 1 1 auto; max-width: none; }
}

/* ── Lewy panel z informacjami o konkursie ── */
.contest-info-panel {
    background: rgba(0,0,0,0.70);
    border: 1px solid #c49b63;
    border-radius: 6px;
    padding: 18px 20px;
    position: relative;
    box-shadow: 0 0 15px #000;
    text-align: center;
}

/* Badge wewnątrz panelu — blok sam w sobie, wyśrodkowany */
.contest-info-panel .contest-status-badge {
    display: block;
    width: fit-content;
    margin: 0 auto 12px;
}

.contest-status-badge {
    display: inline-block;
    font-size: 0.78em;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 10px;
    margin-bottom: 12px;
    letter-spacing: 0.06em;
}

.contest-badge-active  { background: rgba(80,200,80,0.18);  border: 1px solid #3a803a; color: #7dd87d; }
.contest-badge-planned { background: rgba(80,120,220,0.18); border: 1px solid #3a5aa0; color: #8ab4f8; }
.contest-badge-finished{ background: rgba(200,200,200,0.15);border: 1px solid #888;    color: #d0d0d0; }

.contest-countdown {
    color: #b9ecb9;
    font-size: 0.78em;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    position: absolute;
    right: 20px;
    top: 21px;
    white-space: nowrap;
}

.contest-dates {
    font-size: 0.87em;
    color: #d0b880;
    margin-bottom: 14px;
    line-height: 1.9;
}

.contest-date-label {
    color: #a09070;
    margin-right: 4px;
}

.contest-section-title {
    font-size: 0.80em;
    font-weight: bold;
    color: #c49b63;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(196,155,99,0.25);
    padding-bottom: 4px;
    margin: 14px 0 8px;
}

.contest-desc {
    font-size: 0.88em;
    color: #c0a870;
    line-height: 1.65;
    white-space: pre-wrap;
}

/* Nagrody */
.contest-prizes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* W wyśrodkowanym boksie (planned) — treść wyśrodkowana */
.contest-box-content {
    display: block;
    text-align: center;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

/* Pierwsza sekcja w bloku dostaje margines górny */
.contest-box-content > .contest-section-title:first-child {
    margin-top: 18px;
}

.contest-prize-item {
    padding: 5px 0;
    border-bottom: 1px solid rgba(196,155,99,0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.contest-prize-item:last-child { border-bottom: none; }

.contest-prize-cond  { color: #e8c87a; font-weight: bold; font-size: 0.87em; }
.contest-prize-desc  { color: #c0a870; font-size: 0.84em; }

/* Tabela mnożników */
.contest-mult-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
    background: rgba(0,0,0,0.3);
}
.contest-mult-table th,
.contest-mult-table td {
    padding: 5px 10px;
    text-align: center;
    border: 1px solid rgba(196,155,99,0.3);
}
.contest-mult-table th {
    background: rgba(120,90,40,0.4);
    color: #c49b63;
    font-weight: bold;
}
tr.contest-mult-active-row td { background: rgba(180,140,50,0.08); }

.contest-mult-badge {
    display: inline-block;
    background: rgba(200,160,30,0.20);
    border: 1px solid rgba(200,160,30,0.50);
    color: #e0c060;
    font-weight: bold;
    font-size: 0.9em;
    padding: 1px 8px;
    border-radius: 10px;
}

.contest-mult-none { color: #555; }

/* ── Ranking — numery i podświetlenia top 3 ── */
.contest-rank-num {
    font-weight: bold;
    color: #a09070;
    font-size: 0.95em;
}
.rank-gold   { color: #e8c840 !important; }
.rank-silver { color: #c8c8cc !important; }
.rank-bronze { color: #c8844a !important; }

tr.contest-rank-1 { background: rgba(210,170,20,0.12) !important; }
tr.contest-rank-2 { background: rgba(180,180,185,0.10) !important; }
tr.contest-rank-3 { background: rgba(160,100,40,0.10) !important; }
tr.contest-rank-1:hover { background: rgba(210,170,20,0.22) !important; }
tr.contest-rank-2:hover { background: rgba(180,180,185,0.20) !important; }
tr.contest-rank-3:hover { background: rgba(160,100,40,0.20) !important; }

/* ── Boksik wyśrodkowany (brak konkursu / zaplanowany) ── */
.contest-centered-outer {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.contest-info-box {
    background: rgba(0,0,0,0.70);
    border: 1px solid #c49b63;
    border-radius: 8px;
    padding: 36px 44px;
    max-width: 620px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    text-align: center;
}

.contest-box-title {
    color: #f0d090;
    font-size: 1.3em;
    margin: 10px 0 16px;
    text-shadow: 1px 1px 2px #000;
}

.contest-no-contest-title {
    color: #f0d090;
    font-size: 1.2em;
    font-weight: bold;
    margin: 0 0 12px;
}

.contest-no-contest-body {
    color: #a09070;
    font-size: 0.95em;
    margin: 0;
}

/* ── Historia konkursów ── */
.contest-history-section { margin-top: 24px; }

/* Wrapper wyrównujący tabelę historii do szerokości prawej kolumny rankingów */
.contest-history-aligned {
    display: flex;
    gap: 20px;
    margin-top: 24px;
}
.contest-history-aligned .contest-info-col {
    flex-shrink: 0;
    visibility: hidden; /* niewidoczny spacer — tylko utrzymuje szerokość */
}

.contest-history-title {
    color: #f0d090;
    font-size: 1.4em;
    margin: 0 0 16px;
    text-shadow: 1px 1px 2px #000;
    text-align: center;
}

.contest-history-select-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.contest-history-select {
    background: rgba(0,0,0,0.70);
    border: 1px solid #c49b63;
    border-radius: 4px;
    color: #f0d090;
    font-family: 'Verdana', sans-serif;
    font-size: 0.9em;
    padding: 6px 14px;
    cursor: pointer;
    min-width: 280px;
    text-align: center;
}
.contest-history-select:focus { outline: none; border-color: #e8c87a; }

.contest-history-entry   { margin-bottom: 32px; }

.contest-history-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.contest-history-dates {
    color: #d0b880;
    font-size: 0.88em;
}

.contest-history-desc {
    color: #907050;
    font-size: 0.85em;
    font-style: italic;
    margin: 0 0 8px;
    line-height: 1.5;
    text-align: center;
}

.contest-history-table-wrap {
    display: flex;
    justify-content: center;
}

.contest-history-table { width: 100%; }

/* ── Info "brak aktywnego" wewnątrz panelu ostatniego konkursu ── */
.contest-no-active-notice {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(196,155,99,0.2);
    text-align: center;
}

/* ── Admin actions wewnątrz panelu/boksu ── */
.contest-admin-actions {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(196,155,99,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.contest-cancel-wrap {
    display: inline-flex;
    align-items: center;
}

.contest-cancel-confirm {
    display: none;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.contest-cancel-question {
    font-size: 0.82em;
    color: #e07060;
    white-space: nowrap;
}

.contest-btn-edit {
    background: linear-gradient(to bottom, #2a3a5a, #18263a);
    border-color: #4a6aa0;
    color: #8ab4f8;
}
.contest-btn-edit:hover {
    background: linear-gradient(to bottom, #3a5070, #263650);
    border-color: #7aa4f0;
    color: #c0d8ff;
}

.contest-btn-confirm-yes {
    background: linear-gradient(to bottom, #5a1a1a, #3a0e0e);
    border-color: #9a3030;
    color: #f08080;
    padding: 4px 10px;
    font-size: 0.82em;
}
.contest-btn-confirm-yes:hover {
    background: linear-gradient(to bottom, #7a2020, #5a1212);
    border-color: #e05050;
    color: #ffb0b0;
}

.contest-btn-confirm-no {
    background: linear-gradient(to bottom, #3a3020, #26200e);
    border-color: #7a6030;
    color: #c0a050;
    padding: 4px 10px;
    font-size: 0.82em;
}
.contest-btn-confirm-no:hover {
    background: linear-gradient(to bottom, #5a4a28, #3a3018);
    border-color: #e8c87a;
    color: #f0d090;
}

.contest-included {
    color: #a09070;
    font-size: 0.85em;
    font-style: italic;
}
.contest-create-outer {
    display: flex;
    justify-content: center;
    padding: 30px 20px;
}

.contest-create-box {
    background: rgba(0,0,0,0.72);
    border: 1px solid #c49b63;
    border-radius: 8px;
    padding: 36px 44px;
    max-width: 660px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.contest-create-title {
    color: #f0d090;
    font-size: 1.4em;
    margin: 0 0 24px;
    text-align: center;
}

.contest-create-error {
    background: rgba(180,40,40,0.22);
    border: 1px solid #803030;
    border-radius: 4px;
    color: #f09090;
    font-size: 0.9em;
    padding: 8px 12px;
    margin-bottom: 18px;
    text-align: center;
}

.contest-form-row-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 0;
}

.contest-form-group { margin-bottom: 16px; }

.contest-form-label {
    display: block;
    color: #d0b880;
    font-size: 0.88em;
    font-weight: bold;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}

.contest-form-hint {
    color: #806040;
    font-weight: normal;
    font-size: 0.88em;
}

.contest-form-input {
    background: linear-gradient(to bottom, #3a2a10, #26180a);
    border: 1px solid #c49b63;
    border-radius: 4px;
    color: #f5e8c0;
    font-family: 'Verdana', sans-serif;
    font-size: 0.9em;
    padding: 7px 10px;
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
}
.contest-form-input:focus { border-color: #e8c87a; box-shadow: 0 0 4px rgba(200,160,80,0.3); }

.contest-form-textarea {
    background: linear-gradient(to bottom, #3a2a10, #26180a);
    border: 1px solid #c49b63;
    border-radius: 4px;
    color: #f5e8c0;
    font-family: 'Verdana', sans-serif;
    font-size: 0.88em;
    padding: 8px 10px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    min-height: 80px;
}
.contest-form-textarea:focus { border-color: #e8c87a; }

.contest-dynamic-section {
    margin-bottom: 20px;
    border: 1px solid rgba(196,155,99,0.2);
    border-radius: 5px;
    padding: 14px 16px;
    background: rgba(0,0,0,0.2);
}

.contest-dynamic-title {
    color: #c49b63;
    font-size: 0.9em;
    font-weight: bold;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contest-dynamic-btn {
    background: transparent;
    border: 1px dashed #806040;
    border-radius: 3px;
    color: #a08050;
    font-size: 0.82em;
    padding: 3px 10px;
    cursor: pointer;
    font-family: 'Verdana', sans-serif;
    transition: color 0.15s, border-color 0.15s;
}
.contest-dynamic-btn:hover { color: #e8c87a; border-color: #c49b63; }

/* Przycisk "Add row" pod kontenerem z wierszami */
.contest-add-row-btn {
    display: block;
    margin-top: 8px;
}

.contest-col-labels {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    font-size: 0.76em;
    color: #806040;
    margin-bottom: 6px;
    padding: 0 2px;
}

.contest-dynamic-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    margin-bottom: 6px;
    align-items: center;
}

.contest-remove-btn {
    background: rgba(120,40,40,0.3);
    border: 1px solid rgba(160,60,60,0.4);
    border-radius: 50%;
    color: #e07070;
    width: 26px;
    height: 26px;
    font-size: 1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    transition: background 0.12s;
}
.contest-remove-btn:hover { background: rgba(180,50,50,0.45); }

.contest-mult-hint {
    color: #806040;
    font-size: 0.82em;
    margin: 0 0 10px;
    line-height: 1.55;
    font-style: italic;
}

.contest-form-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.contest-submit-btn {
    background: linear-gradient(to bottom, #3a5a3a, #263826);
    border: 1px solid #4a8a4a;
    border-radius: 4px;
    color: #9de89d;
    font-family: 'Verdana', sans-serif;
    font-size: 0.95em;
    font-weight: bold;
    padding: 9px 20px;
    cursor: pointer;
    transition: background 0.15s;
}
.contest-submit-btn:hover {
    background: linear-gradient(to bottom, #4a7a4a, #365436);
    border-color: #7dd87d;
    color: #c0ffc0;
}

.contest-cancel-link {
    color: #806040;
    font-size: 0.88em;
    text-decoration: none;
    border-bottom: 1px dotted #806040;
}
.contest-cancel-link:hover { color: #c49b63; border-bottom-color: #c49b63; }

@media (max-width: 600px) {
    .contest-form-row-two { grid-template-columns: 1fr; }
    .contest-create-box   { padding: 24px 18px; }
    .contest-info-box     { padding: 24px 18px; }
}

/* ── Panel widoczności questów ─────────────────────────────────────────── */
.quest-visibility-container {
    max-width: 820px;
    margin: 20px auto 40px;
    padding: 0 16px;
}

.quest-visibility-hint {
    color: #a09070;
    font-size: 0.88em;
    text-align: center;
    margin: -8px 0 18px;
}

.quest-visibility-error {
    color: #ff9a9a;
    background: rgba(110, 20, 20, 0.35);
    border: 1px solid #8a3a3a;
    border-radius: 4px;
    padding: 9px 12px;
}

.quest-visibility-table-wrapper { overflow-x: auto; }

.quest-visibility-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #c49b63;
    background: rgba(0, 0, 0, 0.25);
}

.quest-visibility-table th,
.quest-visibility-table td {
    border: 1px solid #c49b63;
    padding: 8px 12px;
    text-align: center;
}

.quest-visibility-table th { color: #d9b875; }
.quest-visibility-table tr:nth-child(even) { background: rgba(255, 255, 255, 0.04); }
.quest-visibility-name { color: #ddd0b0; text-align: left !important; }

.quest-visibility-level {
    width: 90px;
    padding: 5px 7px;
    color: #eee0bd;
    background: #1d1712;
    border: 1px solid #6f5736;
    border-radius: 3px;
}

.quest-visibility-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #cbb78f;
    cursor: pointer;
}

.quest-visibility-save {
    display: block;
    margin: 18px auto 0;
    padding: 9px 22px;
    color: #9de89d;
    background: linear-gradient(to bottom, #3a5a3a, #263826);
    border: 1px solid #4a8a4a;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.quest-visibility-save:hover { color: #c0ffc0; border-color: #7dd87d; }

/* ── Prywatny panel Idle Hunt ───────────────────────────────────────────── */
.idle-hunt-container {
    margin: 22px auto 48px;
    max-width: calc(100vw - 28px);
}

.idle-hunt-header {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.idle-hunt-header h1 { color: #d9b875; margin: 0; }
.idle-hunt-premium { color: #ffd76a; margin: 0; }
.idle-automation-summary { color: #ffd76a; margin: 16px 0 8px; }
.idle-premium-count { border-radius: 10px; display: inline-block; padding: 2px 6px; white-space: nowrap; }
.idle-premium-count.active { background: #244e2d; color: #9aefaa; }
.idle-premium-count.inactive { background: #652929; color: #ffb0b0; }
.idle-hunt-locked { color: #e4a0a0; margin: 0; }

.idle-promo-row {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 10px;
}

.idle-promo-row-pricing-only,
.idle-promo-row-monster-only { grid-template-columns: minmax(0, 1fr); }
.idle-promo-row-without-monster { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.idle-premium-offer {
    background: rgba(0, 0, 0, .58);
    border: 1px solid #6a5020;
    border-radius: 6px;
    color: #c0a070;
    margin: 0;
    padding: 20px 24px;
    text-align: center;
}

.idle-premium-offer h2 {
    color: #d4b878;
    font-size: 1.15em;
    margin: 0 0 10px;
}

.idle-premium-offer-intro {
    line-height: 1.6;
    margin: 0 auto 15px;
    max-width: 760px;
}

.idle-premium-pricing-wrap { overflow-x: auto; }

.idle-premium-pricing {
    border-collapse: collapse;
    margin: 0 auto;
    width: 100%;
}

.idle-premium-pricing th,
.idle-premium-pricing td {
    border: 1px solid rgba(196, 155, 99, .38);
    padding: 7px 12px;
    white-space: nowrap;
}

.idle-premium-pricing thead th {
    background: rgba(106, 80, 32, .45);
    color: #ead39c;
}

.idle-premium-pricing tbody th {
    background: transparent;
    color: #d4b878;
    font-size: inherit;
    text-align: center;
}
.idle-premium-pricing tbody td { color: #f0d58e; font-weight: bold; }
.idle-premium-pricing-note { color: #9f927a; font-size: .85em; margin: 10px 0 0; }
.idle-premium-contact { color: #cbb78f; margin: 14px 0 0; }
.idle-premium-contact strong { color: #ffe08a; }
.idle-premium-offer-compact { padding: 8px 10px; }
.idle-premium-offer-compact h2 { margin-bottom: 4px; }
.idle-premium-offer-compact .idle-premium-pricing { font-size: 12px; }
.idle-premium-offer-compact .idle-premium-pricing th,
.idle-premium-offer-compact .idle-premium-pricing td { padding: 3px 5px; }
.idle-premium-offer-compact .idle-premium-contact { font-size: 12px; line-height: 1.2; margin-top: 6px; }

@media (max-width: 900px) {
    .idle-promo-row { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .idle-premium-offer { padding: 16px 12px; }
    .idle-premium-offer-compact { padding: 8px 10px; }
    .idle-premium-pricing-wrap { overflow-x: auto; }
    .idle-premium-pricing { min-width: 460px; }
}

.idle-hunt-add-form,
.idle-inline-form,
.idle-hunt-choice-form,
.idle-password-form {
    align-items: flex-end;
    display: flex;
    gap: 4px;
}

.idle-hunt-add-form label {
    color: #cbb78f;
    display: grid;
    font-size: 12px;
    gap: 4px;
}

.idle-hunt-add-form input,
.idle-hunt-table input,
.idle-hunt-table select,
.idle-hunt-table button,
.idle-hunt-add-form button {
    background: #201913;
    border: 1px solid #705938;
    border-radius: 4px;
    color: #eee0bd;
    font: inherit;
    padding: 4px 5px;
}

.idle-hunt-table button,
.idle-hunt-add-form button { cursor: pointer; white-space: nowrap; }
.idle-hunt-table button:hover,
.idle-hunt-add-form button:hover { border-color: #c49b63; color: #fff0bf; }
.idle-hunt-table :disabled { cursor: not-allowed; opacity: .5; }

.idle-hunt-alert {
    border: 1px solid;
    border-radius: 4px;
    margin: 10px 0;
    padding: 9px 12px;
}
.idle-hunt-alert.success { background: rgba(30, 95, 45, .35); border-color: #4c9860; color: #a8efb8; }
.idle-hunt-alert.error { background: rgba(110, 20, 20, .35); border-color: #8a3a3a; color: #ffaaaa; }
.idle-config-message { color: #ffaaaa; font-size: 12px; margin: 0 0 8px; }
.idle-config-message.success { color: #a8efb8; }

.idle-order-toolbar { align-items: center; color: #bca986; display: flex; flex-wrap: wrap; gap: 9px; margin: 8px 0 0; }
.idle-order-toolbar button { background: #2a2117; border: 1px solid #80663f; border-radius: 4px; color: #f0d58e; cursor: pointer; padding: 5px 10px; }
.idle-order-toolbar button:disabled { cursor: not-allowed; opacity: .5; }
#idle-order-message { color: #d9b875; font-size: 12px; }

.idle-boosted-monster {
    align-items: center;
    background: linear-gradient(135deg, rgba(95, 69, 13, .55), rgba(30, 23, 13, .72));
    border: 1px solid rgba(255, 215, 0, .55);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
    padding: 9px 12px;
    text-align: center;
}
.idle-boosted-monster h2 { color: #ffd700; font-size: 14px; margin: 0 0 7px; }
.idle-boosted-monster-content { align-items: center; color: #d8c9a8; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; }
.idle-boosted-monster-content img { flex: 0 0 48px; object-fit: contain; }
.idle-boosted-monster-content strong { color: #ffe68a; font-size: 17px; }
.idle-boosted-exp { color: #ffd700; font-weight: bold; }

.idle-next-raid {
    align-items: center;
    background: linear-gradient(135deg, rgba(65, 30, 88, .62), rgba(24, 16, 31, .76));
    border: 1px solid rgba(188, 112, 230, .58);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
    padding: 9px 12px;
    text-align: center;
}
.idle-next-raid h2 { color: #d69cff; font-size: 14px; margin: 0 0 7px; }
.idle-next-raid.active { border-color: rgba(255, 190, 72, .82); box-shadow: inset 0 0 18px rgba(255, 153, 45, .1); }
.idle-next-raid.active h2 { color: #ffc65c; }
.idle-next-raid-content { align-items: center; color: #d8c9e2; display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: center; }
.idle-next-raid-content img { flex: 0 0 48px; object-fit: contain; }
.idle-next-raid-content strong { color: #edc9ff; font-size: 17px; }
.idle-next-raid-exp { color: #cdb6d8; font-weight: normal; }
.idle-next-raid-date { background: rgba(188, 112, 230, .18); border: 1px solid rgba(220, 168, 255, .48); border-radius: 4px; color: #f1c8ff; font-size: 18px; font-weight: bold; letter-spacing: .2px; margin-top: 10px; padding: 4px 10px; text-shadow: 0 1px 3px rgba(0, 0, 0, .75); }
.idle-next-raid-unavailable { color: #a997ae; margin: 0; }
.idle-raid-status-link { color: #e6b9ff; display: inline-block; font-size: 12px; margin-top: 9px; }
.idle-auto-raid-column, .idle-auto-raid-cell,
.idle-force-raid-column, .idle-force-raid-cell { max-width: 52px; min-width: 44px; padding-left: 4px !important; padding-right: 4px !important; text-align: center; white-space: normal !important; width: 48px; }
.idle-auto-raid-heading, .idle-force-raid-heading { display: inline-block; line-height: 1.05; }
.idle-auto-raid-form { margin: 0; }
.idle-auto-raid-cell input[type="checkbox"] { accent-color: #a970c5; cursor: pointer; height: 18px; width: 18px; }
.idle-auto-raid-cell input[type="checkbox"]:disabled { cursor: default; opacity: .65; }
[data-idle-player] .idle-auto-raid-cell input[type="checkbox"]:disabled:checked {
    filter: sepia(1) saturate(2) hue-rotate(220deg);
    opacity: 1;
}
.idle-raid-form { margin: 0; }
.idle-raid-button { color: #e6b9ff !important; min-width: 48px; }

.idle-raid-status-container { margin: 0 auto; max-width: 1250px; padding: 22px 18px 50px; }
.idle-raid-status-header { align-items: center; display: flex; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.idle-raid-status-header h1 { color: #edc9ff; margin: 0 0 5px; }
.idle-raid-status-header p { color: #ad9bb5; margin: 0; }
.idle-raid-status-back { background: rgba(188, 112, 230, .13); border: 1px solid rgba(220, 168, 255, .42); border-radius: 4px; color: #e6b9ff; padding: 7px 11px; text-decoration: none; white-space: nowrap; }
.idle-raid-status-summary { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(120px, 1fr)); margin-bottom: 16px; }
.idle-raid-status-count { background: rgba(0, 0, 0, .62); border: 1px solid #54465b; border-radius: 5px; display: grid; gap: 2px; padding: 12px; text-align: center; }
.idle-raid-status-count strong { font-size: 24px; }
.idle-raid-status-count span { color: #baabbf; font-size: 12px; text-transform: uppercase; }
.idle-raid-status-count.queued strong, .idle-raid-job-status.queued { color: #e8cc7a; }
.idle-raid-status-count.running strong, .idle-raid-job-status.running { color: #83c8f4; }
.idle-raid-status-count.success strong, .idle-raid-job-status.success { color: #8cdda0; }
.idle-raid-status-count.failure strong, .idle-raid-job-status.failure { color: #ff9999; }
.idle-raid-status-table-wrap { overflow-x: auto; }
.idle-raid-status-table { background: rgba(0, 0, 0, .68); border-collapse: collapse; min-width: 900px; width: 100%; }
.idle-raid-status-table th, .idle-raid-status-table td { border: 1px solid rgba(196, 155, 99, .25); padding: 8px; text-align: center; vertical-align: middle; }
.idle-raid-status-table th { color: #d9b875; }
.idle-raid-status-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, .035); }
.idle-raid-status-table tr.idle-raid-job-failure { background: rgba(110, 20, 20, .18); }
.idle-raid-character { color: #f0dfbc; font-weight: bold; text-align: left !important; }
.idle-raid-job-status { font-weight: bold; white-space: nowrap; }
.idle-raid-result { max-width: 360px; text-align: left !important; }
.idle-raid-result strong, .idle-raid-result span { display: block; }
.idle-raid-result span { color: #b9aabf; font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.idle-raid-status-empty { color: #a997ae; padding: 22px !important; }

@media (max-width: 700px) {
    .idle-raid-status-header { align-items: flex-start; flex-direction: column; }
    .idle-raid-status-summary { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}

.idle-hunt-table-wrap { overflow-x: auto; width: 100%; }
.idle-hunt-table { background: rgba(0, 0, 0, .65); border-collapse: collapse; min-width: 1900px; width: 100%; }
.idle-hunt-table th,
.idle-hunt-table td { border: 1px solid rgba(196, 155, 99, .25); padding: 3px 4px; text-align: center; vertical-align: middle; }
.idle-hunt-table th { color: #d9b875; white-space: nowrap; }
.idle-points-heading { display: inline-block; line-height: 1.05; }
.idle-hunt-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, .035); }
.idle-hunt-table tbody tr.idle-hunt-row-inactive > td {
    background: rgba(105, 31, 31, .22);
    color: #a9958f;
}
.idle-hunt-table tbody tr.idle-hunt-row-inactive:hover > td { background: rgba(125, 38, 38, .3); }
.idle-hunt-table tbody tr.idle-hunt-row-inactive > td:first-child { box-shadow: inset 4px 0 #b44a4a; }
.idle-hunt-table tbody tr.idle-hunt-row-pending-activation > td { background: rgba(105, 31, 31, .22); color: #a9958f; }
.idle-hunt-table tbody tr.idle-hunt-row-pending-deactivation > td { background: rgba(105, 60, 24, .16); }
.idle-hunt-table tbody tr.idle-hunt-row-pending-activation > td:first-child,
.idle-hunt-table tbody tr.idle-hunt-row-pending-deactivation > td:first-child { box-shadow: inset 4px 0 #c99a35; }
.idle-hunt-table tbody tr.idle-order-dragging { opacity: .48; }
.idle-hunt-row-inactive img { filter: grayscale(1); opacity: .5; }
.idle-hunt-row-inactive .idle-account-number,
.idle-hunt-row-inactive .idle-preference-detail,
.idle-hunt-row-inactive .idle-loot-items small { color: #9b927f; }
.idle-hunt-table tbody tr.idle-hunt-row-paused > td { background: rgba(164, 116, 20, .34); }
.idle-hunt-table tbody tr.idle-hunt-row-paused:hover > td { background: rgba(188, 137, 27, .43); }
.idle-hunt-table tbody tr.idle-hunt-row-paused > td:first-child { box-shadow: inset 4px 0 #e0b23f; }
.idle-hunt-table select { max-width: 210px; }
.idle-hunt-table .idle-character-select { box-sizing: border-box; }
.idle-password-form { align-items: stretch; flex-direction: column; }
.idle-password-form input { width: 120px; }
.idle-password-form button { display: none; }
.idle-password-form input[name="password"]:not(:placeholder-shown) + button { display: block; }
.idle-account-number { color: #d2c19e; font-family: monospace; }
.idle-character-vocation { display: inline-block; }
.idle-character-vocation .voc-dot { margin-right: 4px; }
.idle-player-character-count { color: #f1dfb8; }
.idle-player-character-count[title] { cursor: help; text-decoration: underline dotted rgba(217, 184, 117, .7); text-underline-offset: 2px; }
.idle-order-cell { min-width: 34px; white-space: nowrap; }
.idle-drag-handle { color: #d9b875; cursor: grab; display: inline-block; font-size: 18px; line-height: 1; padding: 5px 3px; touch-action: none; }
.idle-drag-handle:active { cursor: grabbing; }
.idle-order-countdown { color: #ffe08a; max-width: none; white-space: nowrap; }
.idle-monster-cell { min-width: 130px; }
.idle-monster-cell img { margin-right: 4px; vertical-align: middle; }
.idle-preference-layout { align-items: center; display: flex; }
.idle-owner-timestamp > span { display: block; white-space: nowrap; }
.idle-equipment { height: 36px; min-width: 34px; }
.idle-loot-cell { max-width: 245px; }
.idle-loot-empty { color: #9b927f; font-size: 12px; white-space: nowrap; }
.idle-loot-content { align-items: center; display: flex; gap: 6px; }
.idle-loot-items { align-items: center; display: flex; flex-wrap: wrap; gap: 3px; justify-content: flex-start; max-width: 245px; min-width: 42px; width: fit-content; }
.idle-loot-item { flex: 0 0 32px; height: 32px; position: relative; }
.idle-loot-items small { bottom: -2px; color: #ffd700; position: absolute; right: -1px; text-shadow: 1px 1px #000; }
.idle-loot-item img { border-radius: 3px; display: block; }
.idle-loot-item.idle-loot-addable { cursor: pointer; }
.idle-loot-item.idle-loot-addable img:hover { outline: 2px solid #777; }
.idle-loot-item.idle-loot-valuable img { outline: 2px solid #ffd700; }
.idle-loot-item.idle-loot-ignorable { display: none; }
.idle-hunt-table.idle-show-ignorable-loot .idle-loot-item.idle-loot-ignorable { display: inline-block; }
body.idle-loot-modifier-held .idle-loot-item.idle-loot-addable img:hover { outline-color: #63bd63; }
.idle-loot-hidden-count { color: #aaa; font-size: 18px; margin: 0 5px; }
.idle-loot-hidden-count[hidden],
.idle-hunt-table.idle-show-ignorable-loot .idle-loot-hidden-count { display: none; }
.idle-loot-actions { display: flex; flex: 0 0 auto; flex-direction: column; gap: 3px; }
.idle-clear-loot-form { flex: 0 0 auto; }
.idle-clear-loot-form button { padding: 3px 6px; }
.idle-loot-heading { display: block; }
.idle-loot-header-actions { align-items: center; display: flex; gap: 4px; justify-content: center; margin-top: 4px; }
.idle-loot-header-actions form { margin: 0; }
.idle-loot-header-actions button { font-size: 12px; padding: 3px 5px; }
.idle-loot-lists { align-items: start; display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
.idle-loot-list-panel { background: rgba(0, 0, 0, .55); border: 1px solid rgba(196, 155, 99, .35); border-radius: 6px; min-width: 0; padding: 10px; }
.idle-loot-list-header { align-items: center; display: flex; gap: 10px; justify-content: space-between; margin-bottom: 9px; }
.idle-loot-list-panel h2 { color: #d9b875; font-size: 18px; margin: 0; }
.idle-loot-list-panel h2 span { color: #9f927a; font-size: 14px; }
.idle-loot-list-grid { display: grid; gap: 5px; grid-template-columns: repeat(auto-fill, 38px); }
.idle-loot-list-toggle { background: rgba(34, 25, 14, .86); border: 1px solid #80663f; border-radius: 4px; color: #d9b875; cursor: pointer; flex: 0 0 auto; font-size: 12px; padding: 4px 9px; }
.idle-loot-list-toggle:hover { background: rgba(80, 58, 28, .78); border-color: #c49b63; color: #f1dfb8; }
.idle-loot-list-toggle[hidden],
.idle-loot-list-item[hidden] { display: none; }
.idle-loot-list-item { align-items: center; background: #201913; border: 1px solid #705938; border-radius: 4px; cursor: pointer; display: flex; height: 38px; justify-content: center; padding: 2px; width: 38px; }
.idle-loot-list-item:hover { border-color: #b44a4a; box-shadow: 0 0 0 1px #b44a4a; }
.idle-loot-list-item img { display: block; }
.idle-loot-list-panel-valuable .idle-loot-list-item { border-color: #a88b27; box-shadow: inset 0 0 0 1px rgba(255, 215, 0, .25); }
.idle-loot-list-panel-valuable .idle-loot-list-item:hover,
.idle-loot-list-panel-valuable .idle-loot-list-item:focus-visible {
    border-color: #b44a4a;
    box-shadow: inset 0 0 0 1px rgba(255, 215, 0, .25), 0 0 0 1px #b44a4a;
}
.idle-status { border-radius: 10px; display: inline-block; font-size: 12px; padding: 2px 6px; white-space: nowrap; }
.idle-status.active { background: #244e2d; color: #9aefaa; }
.idle-status.pending { background: #54451f; color: #ffe08a; }
.idle-status.paused { background: #66501f; color: #ffe08a; }
.idle-status.error { background: #652929; color: #ffb0b0; }
.idle-status-detail { color: #e4a0a0; display: block; margin-top: 4px; max-width: 180px; }
.idle-status.idle-status-centered { display: block; margin-left: auto; margin-right: auto; width: fit-content; }
.idle-status-detail.idle-status-centered { margin-left: auto; margin-right: auto; text-align: center; }
.idle-inactive-detail { margin: 4px auto 0; max-width: none; white-space: nowrap; width: max-content; }
.idle-preference-detail { color: #b8b1a4; display: block; margin-top: 4px; }
.idle-hunt-table td.red-cell { background: rgba(110, 20, 20, .35); color: #ffaaaa; }
.idle-row-actions { align-items: center; display: inline-flex; gap: 4px; }
.idle-pause-form { display: inline-flex; margin: 0; }
.idle-automation-button { font-size: 12px !important; height: 26px; line-height: 1; padding: 0 !important; transition: background .12s, box-shadow .12s, transform .12s; width: 27px; }
.idle-pause-button { border-color: #8a6d2a !important; color: #f1c65c !important; font-size: 15px !important; }
.idle-pause-button:hover { background: rgba(145, 105, 25, .42) !important; box-shadow: 0 0 8px rgba(224, 173, 64, .45); transform: scale(1.1); }
.idle-resume-button { border-color: #397a45 !important; color: #8ee59d !important; }
.idle-resume-button:hover { background: rgba(39, 126, 57, .38) !important; box-shadow: 0 0 8px rgba(91, 208, 111, .42); transform: scale(1.1); }
.idle-remove-button { border-color: #843f3f !important; color: #ffaaaa !important; transition: background .12s, box-shadow .12s, transform .12s; }
.idle-remove-button:hover { background: rgba(180, 45, 45, .48) !important; border-color: #b84d4d !important; box-shadow: 0 0 9px rgba(240, 100, 100, .55); transform: scale(1.12); }
.idle-remove-icon-button { font-size: 10px !important; height: 26px; line-height: 1; padding: 0 !important; width: 27px; }
.idle-delete-wrap { align-items: center; display: inline-flex; }
.idle-delete-confirm { align-items: center; display: none; gap: 3px; }
.idle-delete-confirm form { display: inline-flex; margin: 0; }
.idle-delete-confirming .idle-delete-trigger { display: none; }
.idle-delete-confirming .idle-delete-confirm { display: inline-flex; }
.idle-delete-confirm-button,
.idle-delete-cancel-button { border-radius: 3px; cursor: pointer; font-size: 12px; font-weight: bold; height: 24px; line-height: 1; padding: 2px 6px; }
.idle-delete-confirm-button { background: rgba(140, 35, 35, .3); border: 1px solid #7a3030; color: #f08080; }
.idle-delete-confirm-button:hover { background: rgba(180, 45, 45, .55); }
.idle-delete-cancel-button { background: rgba(55, 45, 25, .4); border: 1px solid #6a5830; color: #c0a870; }
.idle-delete-cancel-button:hover { background: rgba(75, 60, 30, .65); }
.idle-fast-tooltip { background: rgba(10, 8, 5, .97); border: 1px solid #80663f; border-radius: 4px; color: #f1dfb8; font-size: 12px; max-width: 220px; padding: 5px 7px; pointer-events: none; position: fixed; text-align: left; white-space: pre-line; z-index: 10000; }
.idle-hunt-empty { color: #9f927a; padding: 24px !important; }
.idle-players-panel { margin-top: 32px; }
.idle-players-panel h2 { color: #d9b875; margin: 0 0 12px; }
.idle-players-select-label { color: #cbb78f; display: block; font-size: 12px; margin-bottom: 4px; }
.idle-players-panel .market-filter { margin-bottom: 8px; max-width: 360px; }
.idle-players-table { min-width: 900px; }
.idle-players-table tbody[hidden] { display: none; }
.idle-player-character-summary[title] { cursor: help; text-decoration: underline dotted rgba(217, 184, 117, .7); text-underline-offset: 2px; }
.idle-inline-add-row { background: rgba(0, 0, 0, .18) !important; }
.idle-inline-add-cell { padding: 8px 9px !important; text-align: left !important; }
.idle-inline-add-form { align-items: flex-end; display: flex; flex-wrap: wrap; gap: 8px; }
.idle-inline-add-form label { color: #cbb78f; display: grid; font-size: 12px; gap: 4px; }
.idle-inline-add-form input { width: 150px; }
.idle-inline-add-form select { max-width: 240px; min-width: 180px; }
.idle-account-import { margin-top: 12px; max-width: 680px; text-align: left; white-space: normal; }
.idle-account-import p { font-size: 12px; line-height: 1.5; }
.idle-inline-actions { display: flex; gap: 5px; }
.idle-add-trigger-cell {
    background: rgba(0, 0, 0, .1) !important;
    padding: 7px 9px !important;
    text-align: left !important;
}
.idle-add-inline-button {
    background: transparent !important;
    border: 1px dashed #806040 !important;
    color: #a08050 !important;
    font-size: .82em !important;
    padding: 4px 12px !important;
}

@media (max-width: 760px) {
    .idle-loot-lists { grid-template-columns: 1fr; }
}
.idle-add-inline-button:hover { border-color: #c49b63 !important; color: #e8c87a !important; }

@media (max-width: 760px) {
    .idle-hunt-add-form { align-items: stretch; flex-direction: column; width: 100%; }
    .idle-inline-add-form { align-items: stretch; flex-direction: column; }
    .idle-inline-add-form input,
    .idle-inline-add-form select { box-sizing: border-box; max-width: none; width: 100%; }
}

/* Wspólny wygląd nagłówków kolumn we wszystkich tabelach. */
table thead th,
.main-table table th,
.monthly-table table th {
    background: linear-gradient(to bottom, #b89b6b, #8c6f4a) !important;
    color: #fff !important;
    font-size: .9em !important;
}

.idle-boss-form { margin: 0; min-width: 155px; }
.idle-boss-form select { max-width: 210px; }
.idle-boss-enter { display: block; font-size: 11px; margin: 5px auto 0; padding: 3px 12px; }
.idle-boss-form [data-boss-hint] { font-size: 11px; max-width: 210px; white-space: normal; }
.idle-boss-form :disabled { cursor: not-allowed; opacity: .55; }
.idle-hunt-job { margin-top: 5px; }
.idle-hunt-job[data-status="queued"] { color: #ffe08a; }
.idle-hunt-job[data-status="running"] { color: #83c8f4; }
.idle-hunt-job[data-status="failure"] { color: #ff9999; }

.idle-boss-enter-tooltip { display: inline-block; }
.idle-boss-enter-tooltip .idle-boss-enter:disabled { pointer-events: none; }
.idle-boss-enter-tooltip:focus-visible { outline: 2px solid #d9b875; outline-offset: 2px; }
