/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    text-align: center;
}

.login-container, .dashboard-card, .settings-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

.btn-sparkasse {
    background-color: #d0021b;
    color: #fff;
}

.btn-sparkasse:hover {
    background-color: #b00217;
}

.login-btn {
    width: 100%;
}

.register-btn {
    background-color: #6c757d;
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.mt-2 {
    margin-top: 10px;
}

.w-100 {
    width: 100%;
}

.text-center {
    text-align: center;
}

/* Dashboard Styles */
.top-bar {
    background-color: #d0021b;
    height: 50px;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.top-logo {
    max-width: 100px;
}

.profile-icon {
    color: #6c757d;
    text-decoration: none;
    font-size: 1.5em;
    padding: 10px;
}

.dashboard-title {
    text-align: left;
    font-size: 2em;
    color: #d0021b;
    margin-top: 60px;
    margin-bottom: 20px;
    font-weight: bold;
    margin-left: 20px;
}

.balance-container {
    transition: all 0.3s ease;
    text-align: left;
}

.balance-container:hover {
    box-shadow: 0 0 10px rgba(208, 2, 27, 0.5);
}

.balance-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.balance-btn {
    width: 48%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.greeting-container {
    text-align: left;
}

.transaction-history {
    max-height: 300px;
    padding: 10px;
    background-color: #fff;
    border-radius: 10px;
    border: 1px solid #ddd;
    overflow-y: auto;
    text-align: left;
}

.transaction-header {
    margin-top: 0;
    color: #333;
    font-size: 1.2em;
    border-bottom: 2px solid #d0021b;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.transaction-row {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    transition: background-color 0.3s ease;
}

.transaction-row.even {
    background-color: #f9f9f9;
}

.transaction-row.odd {
    background-color: #fff;
}

.transaction-row:hover {
    background-color: #f1f1f1;
}

.transaction-icon {
    width: 30px;
    text-align: center;
    flex-shrink: 0;
}

.transaction-icon i {
    font-size: 0.8em;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.transaction-row:hover .transaction-icon i {
    transform: scale(1.2);
}

.transaction-details {
    flex-grow: 1;
    margin-right: 10px;
}

.transaction-narration {
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transaction-date {
    font-size: 0.7em;
    color: #666;
    margin-top: 2px;
}

.transaction-amount {
    width: 120px;
    text-align: right;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

.transaction-history::-webkit-scrollbar {
    width: 8px;
}

.transaction-history::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.transaction-history::-webkit-scrollbar-thumb {
    background: #d0021b;
    border-radius: 4px;
}

.transaction-history::-webkit-scrollbar-thumb:hover {
    background: #b00217;
}

/* Footer Navigation */
.footer-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #d0021b;
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
}

.nav-icon {
    color: #6c757d;
    text-decoration: none;
    font-size: 1.5em;
}

.nav-icon i:hover, .profile-icon i:hover {
    color: #fff;
    transition: color 0.3s ease;
}

/* Settings Styles */
.settings-card {
    text-align: left;
}

.settings-section {
    margin-bottom: 20px;
}

.settings-section h3 {
    font-size: 1.2em;
    color: #d0021b;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.settings-section button, .settings-section select {
    margin-bottom: 10px;
}

.toggle-switch {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.toggle-switch label {
    font-weight: bold;
}

.toggle-switch input {
    width: 40px;
    height: 20px;
    position: relative;
    appearance: none;
    background: #ccc;
    border-radius: 20px;
    outline: none;
    cursor: not-allowed;
}

.toggle-switch input:before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    top: 1px;
    left: 1px;
    transition: left 0.3s;
}

.toggle-switch input:checked {
    background: #d0021b;
}

.toggle-switch input:checked:before {
    left: 21px;
}

/* Error Popup */
.error-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    border: 1px solid #d0021b;
    border-radius: 12px;
    padding: 20px;
    max-width: 300px;
    width: 90%;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    text-align: center;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.error-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.error-icon {
    background-color: #ffe6e6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    line-height: 40px;
    margin: 0 auto 10px;
}

.error-icon i {
    color: #d0021b;
    font-size: 2em;
}

.error-popup div {
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 1em;
    color: #333;
}

/* Responsive Design */
@media (max-width: 400px) {
    .transaction-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .transaction-icon, .transaction-details, .transaction-amount {
        width: 100%;
        text-align: left;
    }
    .transaction-amount {
        margin-top: 5px;
    }
    .error-popup {
        max-width: 90%;
    }
}