/* css/debts.css */

/* ========== Контейнер ========== */
.debts-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    background: #F8F8F8;
    -webkit-overflow-scrolling: touch;
}

/* ========== Карточка долга ========== */
.debt-item {
    background: #FFFFFF;
    border-radius: 6px;
    margin-bottom: 8px;
    padding: 14px 16px;
    cursor: pointer;
    border-left: 4px solid var(--color-dynamic-red);
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    grid-template-areas:
        "client   sum"
        "date     paid"
        "remark   debt";
    gap: 4px 16px;
    align-items: start;
    transition: box-shadow 0.15s ease, transform 0.1s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.debt-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.debt-item:active {
    transform: scale(0.99);
}

/* ========== Левая колонка ========== */
.debt-client {
    grid-area: client;
    font-family: 'Play', 'SF Pro Display', -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.debt-date {
    grid-area: date;
    font-family: 'Play', 'SF Pro Display', -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #999;
    letter-spacing: 0.3px;
}

.debt-remark {
    grid-area: remark;
    font-size: 11px;
    color: #AAA;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ========== Правая колонка ========== */
.debt-sum {
    grid-area: sum;
    font-family: 'Play', 'SF Pro Display', -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-ocean-blue);
    text-align: right;
    white-space: nowrap;
}

.debt-paid {
    grid-area: paid;
    font-family: 'Play', 'SF Pro Display', -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #4A9E6E;
    text-align: right;
    white-space: nowrap;
}

.debt-remaining {
    grid-area: debt;
    font-family: 'Play', 'SF Pro Display', -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-dynamic-red);
    text-align: right;
    white-space: nowrap;
}

/* ========== Пустое состояние ========== */
.debts-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #999;
    text-align: center;
    gap: 12px;
    background: #FFFFFF;
    margin: 8px 12px;
    border-radius: 6px;
}

.debts-empty svg {
    width: 48px;
    height: 48px;
    opacity: 0.3;
}

.debts-empty .all-clear {
    font-family: 'Play', 'SF Pro Display', -apple-system, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #4A9E6E;
}

.debts-empty p {
    font-size: 13px;
}
