:root {
    --bs-primary: #6f42c1;
    --bs-primary-rgb: 111, 66, 193;
}

body {
    background-color: #f5f6fa;
    font-family: 'Play', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.btn-primary {
    background-color: #6f42c1;
    border-color: #6f42c1;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #5a32a3;
    border-color: #5a32a3;
}

.btn-outline-primary {
    color: #4a1a8a;
    border-color: #6f42c1;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: #6f42c1;
    border-color: #6f42c1;
    color: #fff;
}

.bg-primary {
    background-color: #6f42c1 !important;
}

.navbar-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

.navbar-nav .nav-item {
    text-align: center;
    min-width: 120px;
}

.nav-link.active {
    font-weight: 600;
    border-bottom: 2px solid #fff;
}

.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.table {
    font-size: 0.9rem;
}

.table th {
    font-weight: 600;
    background-color: #f8f9fa;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

.btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
}

.badge-status {
    font-size: 0.75rem;
    padding: 0.3em 0.6em;
}

.status-new { background-color: #6c757d; color: #fff; }
.status-progress { background-color: #ffc107; color: #000; }
.status-done { background-color: #198754; color: #fff; }
.status-done-warning { background-color: #198754; color: #fff; border: 2px solid #dc3545; }

.status-no { color: #dc3545; font-weight: 600; }
.status-yes { color: #198754; font-weight: 600; }
.status-ok { color: #198754; }
.status-waiting { color: #ffc107; }
.status-incorrect { color: #dc3545; }

.draft-record {
    background-color: #fff3cd !important;
    border-left: 3px solid #ffc107;
}

.stat-card {
    text-align: center;
    padding: 1rem;
}

.stat-card .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #6c757d;
}

.monthly-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
}

.month-cell {
    text-align: center;
    padding: 8px 4px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: default;
}

.month-label {
    font-size: 0.65rem;
    color: #6c757d;
    margin-bottom: 2px;
}

.search-box {
    max-width: 300px;
}

.autocomplete-list {
    position: absolute;
    z-index: 1000;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.autocomplete-list .item {
    padding: 8px 12px;
    cursor: pointer;
}

.autocomplete-list .item:hover {
    background-color: #f0f0f0;
}

.filter-bar {
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.clickable {
    cursor: pointer;
    color: #4a1a8a;
}

.text-primary {
    color: #4a1a8a !important;
}

.clickable:hover {
    text-decoration: underline;
}

.reconciliation-row.reconciled {
    background-color: #d1e7dd;
}

.sortable-th:hover {
    background-color: #e9ecef !important;
}

#kved-dropdown {
    position: absolute;
    z-index: 1050;
}

#kved-dropdown .dropdown-item {
    white-space: normal;
    padding: 6px 12px;
    font-size: 0.9em;
    border-bottom: 1px solid #eee;
}

#kved-dropdown .dropdown-item:hover {
    background-color: #f0ebf8;
}

.auth-page {
    display: flex;
    min-height: 100vh;
    margin: 0;
}

.auth-hero {
    flex: 1;
    background: linear-gradient(135deg, #4a1a8a 0%, #6f42c1 50%, #8b5fd6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(255,255,255,0.04) 0%, transparent 50%);
    pointer-events: none;
}

.auth-hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 420px;
}

.auth-hero-logo {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.auth-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.auth-hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.85;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.auth-feature i {
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.12);
    border-radius: 8px;
    flex-shrink: 0;
}

.auth-hero-footer {
    margin-top: 3rem;
    font-size: 0.8rem;
    opacity: 0.5;
}

.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: #fff;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.auth-form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.25rem;
}

.auth-form-desc {
    color: #6c757d;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.auth-tabs {
    background: #f5f6fa;
    border-radius: 8px;
    padding: 4px;
    gap: 0;
}

.auth-tabs .nav-item {
    flex: 1;
    min-width: auto;
    text-align: center;
}

.auth-tabs .nav-link {
    border-radius: 6px;
    color: #6c757d;
    font-weight: 500;
    padding: 0.5rem 1rem;
    width: 100%;
    transition: all 0.2s;
}

.auth-tabs .nav-link.active {
    background: #6f42c1;
    color: #fff;
    border-bottom: none;
}

.auth-tabs .nav-link:not(.active):hover {
    color: #4a1a8a;
}

.auth-form-panel .form-control-lg {
    border-radius: 8px;
    border: 1.5px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form-panel .form-control-lg:focus {
    border-color: #6f42c1;
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.15);
}

.auth-form-panel .btn-primary.btn-lg {
    border-radius: 8px;
    padding: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.3px;
}

@media (max-width: 768px) {
    .auth-page {
        flex-direction: column;
    }
    .auth-hero {
        padding: 2rem 1.5rem;
        min-height: auto;
    }
    .auth-hero-title {
        font-size: 1.75rem;
    }
    .auth-features {
        display: none;
    }
    .auth-hero-footer {
        display: none;
    }
    .auth-form-panel {
        padding: 2rem 1.5rem;
    }
}

.bg-purple {
    background-color: #6f42c1 !important;
}

.bg-blue {
    background-color: #0d6efd !important;
}
