﻿/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Roboto+Mono:wght@400;500&display=swap');

:root {
    --primary: 59 130 246;
}

body {
    font-family: 'Inter', system_ui, sans-serif;
}

.mono {
    font-family: 'Roboto Mono', monospace;
}

/* Общие компоненты */
.contract-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .contract-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    }

.payment-row {
    transition: all 0.2s;
}

    .payment-row:hover {
        background-color: #f8fafc;
    }

/* Календарь */
.calendar-day {
    transition: all 0.2s;
    position: relative;
    height: 52px;
    font-size: 15px;
}

    .calendar-day:hover {
        background-color: #f8fafc;
    }

    .calendar-day.selected {
        background-color: #dbeafe;
        border-color: #3b82f6;
        font-weight: 600;
    }

.payment-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: #3b82f6;
    color: white;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-paid {
    background-color: #10b981;
    color: white;
}

.calendar-day {
    aspect-ratio: 1;
    font-size: 0.9rem;
    transition: all 0.2s;
    position: relative;
}

    .calendar-day:hover {
        background: #f3f4f6;
    }

    .calendar-day.selected {
        background: #2563eb !important;
        color: white !important;
        border-color: #2563eb !important;
    }

.payment-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.calendar-day.selected .payment-badge {
    background: white;
    color: #2563eb;
}

.transaction-card {
    transition: all 0.2s;
}

    .transaction-card:hover {
        border-color: #2563eb;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }

.mono {
    font-family: 'Courier New', monospace;
}

/* Анимированный спиннер */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.opacity-50 {
    opacity: 0.5;
}
/* Пользователи */
.user-row:hover {
    background-color: #f8fafc;
}

/* Дополнительные улучшения */
.rounded-3xl {
    border-radius: 1.5rem;
}

input:focus,
select:focus {
    outline: none;
    border-color: rgb(59 130 246);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Hover эффекты для кнопок */
.btn-hover {
    transition: all 0.2s;
}

    .btn-hover:hover {
        transform: translateY(-1px);
    }

/* Анимация для loading */
.animate-spin {
    animation: spin 0.8s linear infinite;
}

/* Плавное появление/исчезновение */
#loadingOverlay {
    transition: opacity 0.2s ease;
}

    #loadingOverlay.hidden {
        opacity: 0;
        pointer-events: none;
    }

    #loadingOverlay:not(.hidden) {
        opacity: 1;
        pointer-events: all;
    }