* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #0f1115;
    color: #f1f3f5;
    font-family: Arial, Helvetica, sans-serif;
}

.topbar {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 34px;
    background: #171a21;
    border-bottom: 1px solid #2b303a;
}

.logo {
    font-size: 21px;
    font-weight: 700;
}

.container {
    width: min(1500px, calc(100% - 48px));
    margin: 40px auto 80px;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 26px;
}

.session-header h1 {
    margin: 0 0 12px;
    font-size: 32px;
}

.session-start {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #8e99aa;
}

.session-start input {
    border: 1px solid #353b47;
    border-radius: 6px;
    background: #101218;
    color: #f1f3f5;
    padding: 8px 10px;
    font-size: 14px;
}

.base-currency-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.base-currency-box label {
    color: #8e99aa;
    font-size: 13px;
}

.base-currency-box select {
    min-width: 100px;
    border: 1px solid #353b47;
    border-radius: 6px;
    background: #101218;
    color: #f1f3f5;
    padding: 9px 12px;
}

.section {
    margin-top: 24px;
    background: #171a21;
    border: 1px solid #2b303a;
    border-radius: 10px;
    overflow: hidden;
}

.section-head {
    min-height: 70px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #2b303a;
}

.section-head h2 {
    margin: 0;
    font-size: 18px;
}

.section-description {
    margin: 6px 0 0;
    color: #6f7a8b;
    font-size: 12px;
}

.head-left {
    display: flex;
    align-items: center;
    gap: 22px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #b7c0ce;
    font-size: 13px;
    cursor: pointer;
}

.checkbox-label input,
table input[type="checkbox"] {
    accent-color: #3b82f6;
    cursor: pointer;
}

.section-actions {
    display: flex;
    gap: 10px;
}

button {
    border: 0;
    border-radius: 7px;
    padding: 10px 15px;
    font-weight: 700;
    cursor: pointer;
}

.primary-button {
    background: #3b82f6;
    color: white;
}

.primary-button:hover {
    background: #2563eb;
}

.secondary-button {
    background: #242a33;
    color: #d8dde5;
    border: 1px solid #353c49;
}

.secondary-button:hover {
    background: #2d3440;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid #292e38;
    text-align: left;
    white-space: nowrap;
}

th {
    font-size: 12px;
    color: #8f9bad;
    text-transform: uppercase;
    font-weight: 600;
}

td {
    font-size: 14px;
}

tr:last-child td {
    border-bottom: 0;
}

.text-input,
.select,
.balance,
.tournament-input,
.tournament-select {
    border: 1px solid #353b47;
    border-radius: 6px;
    background: #101218;
    color: #f1f3f5;
    padding: 8px 10px;
    outline: none;
}

.text-input:focus,
.select:focus,
.balance:focus,
.tournament-input:focus,
.tournament-select:focus {
    border-color: #3b82f6;
}

.text-input {
    width: 180px;
}

.select {
    width: 110px;
}

.balance {
    width: 140px;
}

/* Убираем стрелочки у денежных полей */
.balance::-webkit-outer-spin-button,
.balance::-webkit-inner-spin-button,
.tournament-input[type="number"]::-webkit-outer-spin-button,
.tournament-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.balance,
.tournament-input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.room-actions {
    display: flex;
    align-items: center;
}

.icon-button {
    margin-left: 8px;
    padding: 3px 7px;
    border: 0;
    background: transparent;
    color: #8a95a5;
    font-size: 16px;
}

.icon-button:hover {
    color: #ef4444;
}

.archived-label {
    color: #c38b43;
    font-size: 12px;
}

.hidden-label {
    color: #7f8999;
    font-size: 12px;
}

.empty {
    padding: 25px 20px;
    color: #7f8998;
}

.rates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
}

.rate-card {
    min-width: 220px;
    padding: 15px 18px;
    border: 1px solid #303642;
    border-radius: 8px;
    background: #11141a;
}

.rate-card .pair {
    display: block;
    color: #9ca7b8;
    font-size: 12px;
    margin-bottom: 8px;
}

.rate-card .value {
    display: block;
    font-size: 20px;
    font-weight: 700;
}

.rate-card .timestamp {
    display: block;
    margin-top: 7px;
    color: #6f7a8b;
    font-size: 11px;
}

.tournament-table {
    min-width: 1320px;
}

.tournament-table td {
    vertical-align: middle;
}

.tournament-input {
    width: 100%;
    min-width: 90px;
}

.tournament-input.name {
    min-width: 170px;
}

.tournament-select {
    min-width: 100px;
}

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

.calculated {
    font-weight: 700;
    color: #4da3ff;
}

.profit-positive {
    color: #6fcf83;
}

.profit-negative {
    color: #ef7777;
}

.delete-tournament {
    background: transparent;
    color: #7f8998;
    padding: 4px 8px;
}

.delete-tournament:hover {
    color: #ef4444;
}

.archive-button {
    padding: 4px 8px;
    background: transparent;
    color: #c38b43;
    font-size: 12px;
}

.restore-button {
    padding: 4px 8px;
    background: transparent;
    color: #62a4ef;
    font-size: 12px;
}

@media (max-width: 850px) {
    .container {
        width: calc(100% - 24px);
        margin-top: 24px;
    }

    .session-header,
    .section-head,
    .head-left,
    .section-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .base-currency-box {
        align-items: flex-start;
        flex-direction: column;
    }
} 
.tournament-add-bottom {
    padding: 14px 20px;
    border-top: 1px solid #292e38;
    display: flex;
    justify-content: flex-start;
}

.tournament-add-bottom .primary-button {
    min-width: 190px;
}

.room-warning {
    margin-top: 6px;
    max-width: 210px;
    color: #ef7777;
    font-size: 11px;
    line-height: 1.3;
    white-space: normal;
}
