/* ==== ГЛОБАЛЬНЫЕ НАСТРОЙКИ ==== */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #ffffff;
    overflow-x: hidden;
}

/* ================================
      ЛЕВОЕ ВЫЕЗЖАЮЩЕЕ МЕНЮ
   ================================ */
#mini-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 60px;
    height: 100vh;
    border-right: 2px solid black;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 20px;
    transition: width 0.25s;
    overflow: hidden;
    z-index: 1100;
}

#mini-menu .menu-item {
    width: 100%;
    padding: 15px 0 15px 15px;
    font-size: 22px;
    border-bottom: 2px solid black;
    cursor: pointer;
    box-sizing: border-box;
    white-space: nowrap;
}

/* ================================
            ВЕРХНЯЯ ПАНЕЛЬ
   ================================ */
.topbar {
    position: fixed;
    top: 0;
    left: 60px;
    width: calc(100% - 60px);
    height: 50px;
    border-bottom: 2px solid black;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 15px;
    box-sizing: border-box;
    z-index: 900;
}

.search-box {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box input {
    width: 260px;
    height: 26px;
    border: 1px solid #000;
    padding: 3px 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.top-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.top-actions .btn-inline {
    border: 1px solid #000;
    background: #fff;
    height: 26px;
    padding: 0 10px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.login-box {
    font-size: 13px;
}

/* ================================
              КОНТЕНТ
   ================================ */
.content {
    margin-left: 60px;
    padding-top: 60px;
    padding-right: 20px;
    padding-left: 20px;
    box-sizing: border-box;
}

/* ================================
              ТАБЛИЦЫ
   ================================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    border: 2px solid black;
    padding: 6px;
    text-align: center;
    font-size: 13px;
    vertical-align: middle;
}

th { background: #efefef; }

.options {
    margin-bottom: 14px;
    display: flex;
    gap: 30px;
    font-size: 14px;
}

/* ================================
     РАСЧЁТ — ПЕРЕНЕСЁН ВВЕРХ
   ================================ */
.calc-inline {
    border: 2px solid black;
    padding: 10px 12px;
    margin: 10px 0 16px 0;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.calc-inline-title {
    white-space: nowrap;
}

.calc-inline-sub {
    font-weight: normal;
    margin-left: 6px;
}

.calc-inline-fields {
    display: flex;
    gap: 10px;
    align-items: center;
}

.calc-inline-fields input[type="date"] {
    border: 2px solid black;
    height: 26px;
    padding: 2px 6px;
    box-sizing: border-box;
    min-width: 170px;
}

.calc-inline-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.calc-btn {
    border: 2px solid black;
    padding: 6px 12px;
    background: #e5e5e5;
    cursor: pointer;
    font-size: 13px;
}

/* ================================
     КНОПКА "ДОБАВИТЬ ОПЛАТУ"
   ================================ */
.payments-header {
    margin: 6px 0 8px 0;
    text-align: left;
}

/* кнопки */
.btn {
    border: 2px solid black;
    padding: 8px 12px;
    background: #e5e5e5;
    cursor: pointer;
    font-size: 14px;
}

/* ================================
      НИЖНИЕ КНОПКИ КАРТОЧКИ
   ================================ */
.bottom-nav {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    max-width: 600px;
}

.back-btn, .home-btn {
    border: 2px solid black;
    padding: 10px 20px;
    background: #fff;
    text-decoration: none;
    color: black;
    font-size: 14px;
}

/* ================================
       ДЛЯ СПРАВОК / ОТЧЁТОВ
   ================================ */
.print-only { display: none; }

@media print {
    #mini-menu,
    .topbar,
    .bottom-nav,
    .btn {
        display: none !important;
    }

    .content {
        margin: 0;
        padding: 0;
    }

    .print-only { display: block; }
}

/* ================================================================= */
/*        ТАБЛИЦА ОПЛАТ — КОМПАКТНО, НО НА ВСЮ ШИРИНУ                 */
/* ================================================================= */
.payments-table {
    table-layout: fixed;
}

.payments-table th,
.payments-table td {
    padding: 4px;
    font-size: 12px;
}

.payments-table select,
.payments-table input,
.payments-table textarea,
.payments-table button {
    max-width: 100%;
    box-sizing: border-box;
}

.cell-input {
    border: 1px solid #000;
    box-sizing: border-box;
    font-size: 12px;
    padding: 2px 4px;
    height: 22px;
}

/* инпуты компактнее */
.payments-table .num-input { width: 78px; }
.payments-table .date-input { width: 128px; }

/* Год/Месяц */
.ym-inline {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
}
.ym-month { width: 98px; height: 22px; }
.ym-year  { width: 62px; height: 22px; }

/* Оплата за период (по макету: галка + селекты появляются только при включении) */
.period-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.period-flag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    white-space: nowrap;
}

.period-selects {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap; /* чтобы не ломало в 2 строки */
}

.period-selects .dash {
    padding: 0 3px;
}

/* селекты периода — маленькие, как в макете */
.per-mm { width: 46px; height: 22px; }
.per-yy { width: 64px; height: 22px; }

/* Примечание: textarea многострочное + resize */
.note-inline {
    width: 100%;
    height: 44px;
    min-height: 32px;
    border: 1px solid #000;
    padding: 4px;
    font-size: 12px;
    resize: both;
    overflow: auto;
    background: #fff;
    box-sizing: border-box;
}

/* ID + удалить */
.icon-btn {
    border: 1px solid #000;
    padding: 0 4px;
    background: #fff;
    cursor: pointer;
    font-size: 11px;
    height: 22px;
    line-height: 20px;
}
.icon-btn:hover { background: #eee; }

.id-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.id-num {
    display: inline-block;
    min-width: 14px;
    text-align: center;
}
/* ===== Компактный вид "Год/Месяц" ===== */
.ym-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 8px;
    border: 1px solid #000;
    background: #fff;
    font-size: 12px;
    line-height: 22px;
    white-space: nowrap;
    box-sizing: border-box;
    min-width: 92px; /* чтобы 01.2026 выглядело ровно */
}
