/* Podstawowe style layoutu - PRZYWRÓCONE */
:root {
    --sidebar-width: 260px;
    --sidebar-width-collapsed: 85px;
}

body {
    background-color: #f8f9fa;
}

.wrapper {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
}

#sidebar {
    flex-shrink: 0;
    width: var(--sidebar-width);
    background: linear-gradient(145deg, #1a1d23, #212529);
    color: #fff;
    transition: width 0.3s ease-in-out;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

#sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
}

#content {
    flex-grow: 1;
    padding: 24px;
    min-width: 0;
    /* Dodane reguły dla ograniczenia i centrowania treści */
    max-width: 1400px;
    margin: 0 auto;
}

/* Lepsze style dla sidebar */
.sidebar-header {
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0;
}

.sidebar-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
}

.components {
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar-section-title {
    padding: 0;
    margin: 0;
}

.sidebar-section-title .nav-link {
    padding: 12px 20px;
    color: #adb5bd;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border: none;
    border-radius: 0;
}

.sidebar-section-title .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(2px);
}

.sidebar-section-title .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.account-name {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Style dla transferów */
.transfer-row {
    background-color: rgba(23, 162, 184, 0.1) !important;
    border-left: 3px solid #17A2B8 !important;
}

.transfer-row:hover {
    background-color: rgba(23, 162, 184, 0.2) !important;
}

.transfer-row .category-name {
    color: #17A2B8;
    font-weight: 600;
}

/* Style dla elementów kont */
.components li[data-account-id] {
    margin: 2px 8px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.components li[data-account-id]:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
}

.components li[data-account-id] .nav-link {
    padding: 10px 12px;
    color: #adb5bd;
    border-radius: 8px;
}

.components li[data-account-id] .nav-link:hover {
    color: #fff;
    background: transparent;
}

.btn-plus {
    color: #28a745;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-plus:hover {
    color: #34ce57;
    transform: scale(1.1);
}

/* Separator w sidebar */
.sidebar-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 15px 20px;
}

/* ... (inne niezbędne style dla sidebara, paska sald itp. powinny tu być) ... */

/* Tabela transakcji - NOWA, POPRAWNA I DODANA na końcu pliku */
.transactions-table .transaction-row {
    cursor: pointer;
}

.transactions-table .expand-icon {
    color: #6c757d;
    transition: transform 0.2s ease-in-out;
}

.transactions-table .transaction-row.is-expanded .expand-icon {
    transform: rotate(90deg);
}

.transactions-table .transaction-details-row {
    display: none; /* Domyślnie ukryte */
}

/* Pokazuj wiersz szczegółów, jeśli poprzedzający go wiersz główny ma klasę .is-expanded */
.transactions-table .transaction-row.is-expanded + .transaction-details-row {
    display: table-row;
}

.transactions-table .transaction-details-content {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 1rem;
}

.transactions-table .account-color-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
}

/* [NOWE] Poprawka dla Awesomplete wewnątrz modala Bootstrap */
/* Nadajemy liście sugestii bardzo wysoki z-index, aby wyświetlała się
   "ponad" nakładką modala (która domyślnie ma z-index ~1050). */
div.awesomplete {
    z-index: 1100;
}

/* Style dla menu dropdown przy kontach */
.dropdown-menu.dropdown-menu-dark {
    background-color: #343a40;
    border: 1px solid #495057;
    display: none;
    z-index: 1200;
    position: absolute;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    min-width: 160px;
}

.dropdown-menu.show {
    display: block !important;
}

.dropdown {
    position: relative;
    z-index: 1200;
}

/* Upewnij się, że dropdown nie jest przycinany przez overflow rodziców */
#sidebar ul, #sidebar li {
    overflow: visible;
}

.dropdown-menu.dropdown-menu-dark .dropdown-item {
    color: #ffffff;
    padding: 8px 15px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.dropdown-menu.dropdown-menu-dark .dropdown-item:hover,
.dropdown-menu.dropdown-menu-dark .dropdown-item:focus {
    background-color: #495057;
    color: #ffffff;
    transform: translateX(2px);
}

.dropdown-menu.dropdown-menu-dark .dropdown-item i {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.dropdown-menu.dropdown-menu-dark .dropdown-item:hover i {
    opacity: 1;
}

.color-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    vertical-align: middle;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.account-menu-editor .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Style dla przycisku dropdown */
.dropdown .btn-sm {
    padding: 4px 8px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #adb5bd;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.dropdown .btn-sm:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.05);
}

/* Style dla separatorów w dropdown */
.dropdown-divider {
    border-color: rgba(255, 255, 255, 0.2) !important;
    margin: 4px 0 !important;
}

/* Animacja dla dropdown menu */
.dropdown-menu {
    transition: all 0.3s ease;
    transform: translateY(-10px);
    opacity: 0;
}

.dropdown-menu.show {
    transform: translateY(0);
    opacity: 1;
}

/* Style dla filtrów transakcji */
#transactionFilters {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

#transactionFilters .form-label {
    font-weight: 500;
    color: #495057;
}

#filter-info {
    font-style: italic;
}

.form-control-color {
    width: 40px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Style dla sekcji podsumowania finansowego */
.financial-summary .card {
    transition: all 0.3s ease;
    border-width: 2px;
}

.financial-summary .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.financial-summary .card-body {
    padding: 1.5rem;
}

.financial-summary h4 {
    font-size: 1.8rem;
    font-weight: 600;
}

.financial-summary .fas {
    font-size: 1.2rem;
}

/* Kolory dla statusów finansowych */
.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-primary {
    color: #007bff !important;
}

.text-secondary {
    color: #6c757d !important;
}

/* Responsywność dla sekcji podsumowania */
@media (max-width: 768px) {
    .financial-summary .col-md-4 {
        margin-bottom: 1rem;
    }
    
    .financial-summary h4 {
        font-size: 1.5rem;
    }
}

/* Style dla kontenera z datami niestandardowymi */
#customDateRangeContainer {
    transition: all 0.3s ease-in-out;
    animation: fadeIn 0.3s ease-in-out;
}

#customDateRangeContainer.show {
    display: flex !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lepsze style dla pól dat */
#customDateRangeContainer input[type="date"] {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    position: relative;
}

#customDateRangeContainer input[type="date"]:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Dodaj ikonę kalendarza do pól dat */
#customDateRangeContainer input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

#customDateRangeContainer input[type="date"]:hover::-webkit-calendar-picker-indicator {
    background-color: rgba(0, 123, 255, 0.1);
    border-radius: 0.25rem;
}

/* Style dla przycisku filtrowania */
#filterDateRangeBtn {
    transition: all 0.2s ease-in-out;
}

#filterDateRangeBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
} 