﻿/* Îñíîâíè ñòèëîâå çà body è html */
html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Íàâèãàöèÿ */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link,
.navbar-nav .btn {
    font-weight: 500;
    transition: color 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
}

    .navbar-nav .nav-link:hover,
    .navbar-nav .btn:hover {
        color: #ffffff !important;
        background-color: rgba(255, 255, 255, 0.15);
        transform: translateY(-2px);
    }

/* Êàðòè çà ñìåòêè */
.account-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 10px;
    overflow: hidden;
}

    .account-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }

    .account-card .card-header {
        font-weight: 600;
        border-bottom: none;
    }

    .account-card .balance-amount {
        font-size: 1.5rem;
        font-weight: 700;
    }

/* Áóòîíè */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

.btn-group .btn {
    border-radius: 0;
}

    .btn-group .btn:first-child {
        border-top-left-radius: 8px;
        border-bottom-left-radius: 8px;
    }

    .btn-group .btn:last-child {
        border-top-right-radius: 8px;
        border-bottom-right-radius: 8px;
    }

/* Àëåðòè */
.alert {
    border: none;
    border-radius: 10px;
    font-weight: 500;
}

.alert-dismissible .btn-close {
    padding: 1rem 1rem;
}

/* Ôîðìè */
.form-floating > label {
    font-weight: 500;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

    .form-control:focus, .form-select:focus {
        border-color: #0d6efd;
        box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    }

/* Ñòàòèñòèêà êàðòè */
.stats-card {
    border-radius: 15px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

    .stats-card .card-body {
        padding: 2rem;
    }

.stats-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Òàáëèöè */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

    .table thead th {
        background-color: #495057;
        color: white;
        border: none;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.85rem;
        letter-spacing: 0.5px;
    }

    .table tbody tr {
        transition: background-color 0.2s ease;
    }

        .table tbody tr:hover {
            background-color: #f8f9fa;
        }

/* Öâåòíè áåéäæîâå */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
}

/* Footer */
.footer {
    background-color: #ffffff;
    border-top: 1px solid #dee2e6;
    margin-top: auto;
}

    .footer a {
        color: #6c757d;
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .footer a:hover {
            color: #495057;
        }

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .stats-value {
        font-size: 2rem;
    }

    .account-card .balance-amount {
        font-size: 1.25rem;
    }
}

/* Àíèìàöèè */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Öâåòîâà ïàëèòðà çà òèïîâå ñìåòêè */
.account-savings {
    border-left: 4px solid #28a745;
}

.account-salary {
    border-left: 4px solid #007bff;
}

.account-current {
    border-left: 4px solid #17a2b8;
}

.account-credit {
    border-left: 4px solid #dc3545;
}

.account-investment {
    border-left: 4px solid #6f42c1;
}

.account-cash {
    border-left: 4px solid #28a745;
}

.account-other {
    border-left: 4px solid #6c757d;
}

/* Óñïåøíè è íåóñïåøíè ñúñòîÿíèÿ */
.text-success-custom {
    color: #198754 !important;
}

.text-danger-custom {
    color: #dc3545 !important;
}

/* Shadows */
.shadow-custom {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-custom-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Mobile Navigation Improvements - Добавете в site.css или отделен файл */

/* Основни подобрения за navbar на малки екрани */
@media (max-width: 991.98px) {
    /* По-голям и по-видим navbar toggler */
    .navbar-toggler {
        padding: 0.5rem;
        font-size: 1.1rem;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 0.375rem;
    }

        .navbar-toggler:focus {
            box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
        }

    /* Подобрена навигация на малки екрани */
    .navbar-collapse {
        background-color: rgba(0, 0, 0, 0.05);
        margin-top: 0.5rem;
        border-radius: 0.375rem;
        padding: 0.5rem;
    }

    .navbar-nav .nav-item {
        margin-bottom: 0.25rem;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 0.25rem;
        display: flex;
        align-items: center;
        transition: all 0.2s ease;
    }

        .navbar-nav .nav-link:hover {
            background-color: rgba(255, 255, 255, 0.1);
            transform: translateX(5px);
        }

    /* Подобрения за dropdown менютата */
    .dropdown-menu {
        border: none;
        border-radius: 0.375rem;
        box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
        margin-top: 0.25rem;
    }

    .dropdown-item {
        padding: 0.75rem 1rem;
        border-radius: 0.25rem;
        margin: 0.125rem;
        display: flex;
        align-items: center;
    }

        .dropdown-item:hover {
            background-color: #f8f9fa;
            transform: translateX(3px);
        }

        .dropdown-item i {
            width: 20px;
            text-align: center;
            margin-right: 0.5rem;
        }

        /* Специални стилове за различни типове dropdown елементи */
        .dropdown-item.text-success:hover {
            background-color: #d1edff;
            color: #0f5132 !important;
        }

        .dropdown-item.text-danger:hover {
            background-color: #f8d7da;
            color: #721c24 !important;
        }

    /* Подобрения за потребителското dropdown меню */
    #navbarDropdown {
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Специални подобрения за много малки екрани */
@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-nav .nav-link span {
        font-size: 0.9rem;
    }

    /* Компактни dropdown менюта */
    .dropdown-menu {
        min-width: 250px;
        max-width: calc(100vw - 2rem);
    }

    .dropdown-item {
        font-size: 0.9rem;
        padding: 0.625rem 0.875rem;
    }

    /* Подобрения за footer */
    footer .row {
        text-align: center;
    }

    footer .col-md-6:last-child {
        margin-top: 0.5rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* По-големи touch targets */
    .navbar-nav .nav-link {
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .dropdown-item {
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .navbar-toggler {
        min-width: 48px;
        min-height: 48px;
    }

    /* Премахваме hover ефекти на touch устройства */
    .navbar-nav .nav-link:hover {
        transform: none;
    }

    .dropdown-item:hover {
        transform: none;
    }

    /* Но добавяме active states */
    .navbar-nav .nav-link:active {
        background-color: rgba(255, 255, 255, 0.2) !important;
    }

    .dropdown-item:active {
        background-color: var(--bs-primary) !important;
        color: white !important;
    }
}

/* Landscape orientation на малки екрани */
@media (max-width: 991.98px) and (orientation: landscape) {
    .navbar-collapse {
        max-height: 60vh;
        overflow-y: auto;
    }

    .navbar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
    }

        .navbar-nav .nav-item {
            flex: 0 0 auto;
            margin: 0.25rem;
        }

    .dropdown-menu {
        max-height: 50vh;
        overflow-y: auto;
    }
}

/* Анимации за по-гладко изживяване */
.navbar-collapse {
    transition: all 0.3s ease-in-out;
}

.dropdown-menu {
    transition: all 0.2s ease-in-out;
}

.dropdown-item {
    transition: all 0.15s ease-in-out;
}

/* Accessibility подобрения */
@media (prefers-reduced-motion: reduce) {
    .navbar-nav .nav-link,
    .dropdown-item,
    .navbar-collapse,
    .dropdown-menu {
        transition: none;
    }

        .navbar-nav .nav-link:hover,
        .dropdown-item:hover {
            transform: none;
        }
}

/* Осигуряваме че dropdown менютата остават бели */
.dropdown-menu {
    background-color: white !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    color: #212529 !important;
}

.dropdown-item {
    color: #212529 !important;
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: #f8f9fa !important;
        color: #212529 !important;
    }

    .dropdown-item.text-success:hover {
        background-color: #d1edff !important;
        color: #0f5132 !important;
    }

    .dropdown-item.text-danger:hover {
        background-color: #f8d7da !important;
        color: #721c24 !important;
    }

.dropdown-header {
    color: #6c757d !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .navbar-toggler {
        border: 2px solid;
    }

    .dropdown-menu {
        border: 2px solid;
    }

    .dropdown-item:hover {
        outline: 2px solid;
    }
}

/* Responsive tables for very small screens */
@media (max-width: 500px) {
    .table-responsive > table {
        min-width: 600px;
    }
}