/* ================================================================
   MoneyFlow – main.css
   Ergänzungen zum AdminLTE-Theme
   ================================================================ */

/* ----------------------------------------------------------------
   Allgemein
   ---------------------------------------------------------------- */

body {
    font-family: "Source Sans Pro", sans-serif;
}

/* Kleine Badge-Schriftgröße angleichen */
.badge {
    font-size: 0.78em;
}

/* Fortschrittsbalken etwas dicker */
.progress.progress-xs {
    height: 6px;
}

/* ----------------------------------------------------------------
   Sidebar – Benutzerpanel
   ---------------------------------------------------------------- */

.user-panel .info a {
    color: #c2c7d0;
    font-weight: 500;
}

.user-panel .info a:hover {
    color: #ffffff;
    text-decoration: none;
}

/* ----------------------------------------------------------------
   Info-Boxen
   ---------------------------------------------------------------- */

.info-box {
    border-radius: 6px;
}

.info-box-number {
    font-size: 1.4rem;
    font-weight: 700;
}

/* ----------------------------------------------------------------
   Karten
   ---------------------------------------------------------------- */

.card {
    border-radius: 6px;
}

.card-header {
    border-radius: 6px 6px 0 0 !important;
}

/* Kompakte Karten-Header */
.card-header .card-title {
    font-size: 0.95rem;
    font-weight: 600;
}

/* ----------------------------------------------------------------
   Tabellen
   ---------------------------------------------------------------- */

.table thead th {
    border-top: none;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
}

.table-sm td,
.table-sm th {
    padding: 0.45rem 0.6rem;
    vertical-align: middle;
}

/* ----------------------------------------------------------------
   Buttons
   ---------------------------------------------------------------- */

.btn-xs {
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1.4;
    border-radius: 3px;
}

/* ----------------------------------------------------------------
   Formulare
   ---------------------------------------------------------------- */

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.15rem rgba(0, 123, 255, 0.2);
}

/* Input-Group Append Text vertikal zentriert */
.input-group-text {
    align-items: center;
}

/* ----------------------------------------------------------------
   Auth-Seiten (Login / Register / Forgot PW)
   ---------------------------------------------------------------- */

.login-page,
.register-page {
    background: #213b71;
}

.login-box,
.register-box {
    width: 380px;
}

@media (max-width: 480px) {
    .login-box,
    .register-box {
        width: 100%;
        padding: 0 10px;
    }
}

.login-logo,
.register-logo {
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.login-card-body,
.register-card-body {
    border-radius: 6px;
}

/* Sprachschalter auf Auth-Seiten */
.login-card-body .btn-xs,
.register-card-body .btn-xs {
    min-width: 54px;
}

/* ----------------------------------------------------------------
   Dashboard – Projektliste
   ---------------------------------------------------------------- */

.list-group-item {
    padding: 0.65rem 1rem;
}

/* ----------------------------------------------------------------
   Übersicht – Farbige Tabellenzeilen
   ---------------------------------------------------------------- */

.table .text-success td,
tr.text-success td {
    color: #28a745 !important;
}

.table .text-danger td,
tr.text-danger td {
    color: #dc3545 !important;
}

.table .text-warning td,
tr.text-warning td {
    color: #ffc107 !important;
}

/* ----------------------------------------------------------------
   Profil
   ---------------------------------------------------------------- */

.profile-user-img {
    width: 90px;
    height: 90px;
    object-fit: cover;
}

.nav-pills .nav-link {
    border-radius: 4px;
}

.nav-pills .nav-link.active {
    background-color: #007bff;
}

/* ----------------------------------------------------------------
   Modals
   ---------------------------------------------------------------- */

.modal-header {
    border-radius: 6px 6px 0 0;
}

/* ----------------------------------------------------------------
   Darkmode-Anpassungen
   ---------------------------------------------------------------- */

.dark-mode .table thead th {
    color: #adb5bd;
}

.dark-mode .card {
    background-color: #343a40;
    border-color: #454d55;
}

.dark-mode .card-header {
    background-color: #3d4349;
    border-bottom-color: #454d55;
}

.dark-mode .list-group-item {
    background-color: #343a40;
    border-color: #454d55;
    color: #c2c7d0;
}

.dark-mode .form-control {
    background-color: #2c3034;
    border-color: #454d55;
    color: #c2c7d0;
}

.dark-mode .form-control:focus {
    background-color: #2c3034;
    color: #ffffff;
}

.dark-mode .input-group-text {
    background-color: #3d4349;
    border-color: #454d55;
    color: #c2c7d0;
}

.dark-mode .modal-content {
    background-color: #343a40;
    color: #c2c7d0;
}

.dark-mode .modal-header,
.dark-mode .modal-footer {
    border-color: #454d55;
}

.dark-mode .table {
    color: #c2c7d0;
}

.dark-mode .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Readonly Inputs in Dark Mode */
body.dark-mode input[readonly] {
    background-color: #454d55 !important;
    cursor: not-allowed;
    color: #868e96;
}

/* Dark Mode: Autofill-Felder anpassen */
.dark-mode input:-webkit-autofill,
.dark-mode input:-webkit-autofill:hover,
.dark-mode input:-webkit-autofill:focus,
.dark-mode input:-webkit-autofill:active,
.dark-mode textarea:-webkit-autofill,
.dark-mode textarea:-webkit-autofill:hover,
.dark-mode textarea:-webkit-autofill:focus,
.dark-mode select:-webkit-autofill,
.dark-mode select:-webkit-autofill:hover,
.dark-mode select:-webkit-autofill:focus {
    -webkit-text-fill-color: #c2c7d0 !important;
    -webkit-box-shadow: 0 0 0 1000px #454d55 inset !important;
    box-shadow: 0 0 0 1000px #454d55 inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Optional: Border-Farbe für autogefüllte Felder im Dark Mode */
.dark-mode input:-webkit-autofill {
    border: 1px solid #6c757d !important;
}

/* ----------------------------------------------------------------
   Responsive Anpassungen
   ---------------------------------------------------------------- */

@media (max-width: 768px) {
    .info-box-number {
        font-size: 1.1rem;
    }

    .card-tools {
        margin-top: 0.25rem;
    }

    .table-responsive {
        font-size: 0.85rem;
    }
}

/* ----------------------------------------------------------------
   Utility
   ---------------------------------------------------------------- */

.cursor-pointer {
    cursor: pointer;
}

.font-weight-600 {
    font-weight: 600;
}

.text-truncate-custom {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
