/* ==========================================================================
   DHC Buchhaltung - Custom Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Font Stack (German-friendly with good umlaut support)
   -------------------------------------------------------------------------- */
:root {
    --bs-primary: #2a7fff;
    --bs-primary-rgb: 42, 127, 255;
    --bs-link-color: #2a7fff;
    --bs-link-hover-color: #1a6be6;
}

body {
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
                 sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    background-color: #f5f6f8;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Brand Color Overrides
   -------------------------------------------------------------------------- */
.btn-primary {
    --bs-btn-bg: #2a7fff;
    --bs-btn-border-color: #2a7fff;
    --bs-btn-hover-bg: #1a6be6;
    --bs-btn-hover-border-color: #1a6be6;
    --bs-btn-active-bg: #155cc0;
    --bs-btn-active-border-color: #155cc0;
    --bs-btn-disabled-bg: #7fb3ff;
    --bs-btn-disabled-border-color: #7fb3ff;
}

.btn-outline-primary {
    --bs-btn-color: #2a7fff;
    --bs-btn-border-color: #2a7fff;
    --bs-btn-hover-bg: #2a7fff;
    --bs-btn-hover-border-color: #2a7fff;
    --bs-btn-active-bg: #1a6be6;
    --bs-btn-active-border-color: #1a6be6;
}

a { color: #2a7fff; }
a:hover { color: #1a6be6; }

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    background-color: #212529;
    color: #fff;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h5 {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.08);
    border-left-color: rgba(255, 255, 255, 0.3);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(42, 127, 255, 0.25);
    border-left-color: #2a7fff;
    font-weight: 500;
}

.sidebar .nav-link i {
    width: 1.25em;
    text-align: center;
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

/* --------------------------------------------------------------------------
   Main Content Area
   -------------------------------------------------------------------------- */
.main-content {
    margin-left: 250px;
    min-height: 100vh;
}

.main-content .container-fluid {
    padding: 1.5rem 2rem;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border-radius: 0.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Quick action cards on home page */
.quick-action-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table {
    font-size: 0.9rem;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

.table tbody tr:hover {
    background-color: rgba(42, 127, 255, 0.04);
}

.table td,
.table th {
    vertical-align: middle;
    padding: 0.6rem 0.75rem;
}

/* --------------------------------------------------------------------------
   Currency / Numeric Values (right-aligned)
   -------------------------------------------------------------------------- */
.currency,
.text-currency,
td.currency,
th.currency {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.3rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #7fb3ff;
    box-shadow: 0 0 0 0.2rem rgba(42, 127, 255, 0.15);
}

/* --------------------------------------------------------------------------
   Alerts
   -------------------------------------------------------------------------- */
.alert {
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Action Buttons in Tables
   -------------------------------------------------------------------------- */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Page Headings
   -------------------------------------------------------------------------- */
h2 {
    font-weight: 600;
    color: #212529;
    font-size: 1.5rem;
}

h5.card-title {
    font-weight: 600;
    color: #343a40;
}

/* --------------------------------------------------------------------------
   Responsive: hide sidebar on small screens
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar .nav {
        flex-direction: row !important;
        flex-wrap: wrap;
    }

    .sidebar .nav-link {
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .sidebar .nav-link.active {
        border-left-color: transparent;
        border-bottom-color: #2a7fff;
    }

    .sidebar-footer {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Sidebar-Gruppen, Kacheln, Anmeldung (vorher Inline-Styles in jlohn)
   -------------------------------------------------------------------------- */
.sidebar .nav-gruppe {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1rem 1.25rem 0.3rem;
}

.kachel {
    display: block;
    text-decoration: none;
    color: inherit;
}

.kachel .card-body i {
    font-size: 2rem;
    color: #2a7fff;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a5cbf 0%, #2a7fff 50%, #7fb3ff 100%);
}

.login-card {
    max-width: 420px;
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.login-card .card-body {
    padding: 2.5rem;
}

.login-logo {
    max-width: 200px;
    height: auto;
}

.btn-brand {
    background-color: #2a7fff;
    border-color: #2a7fff;
    color: #fff;
}

.btn-brand:hover {
    background-color: #1a6be6;
    border-color: #1a6be6;
    color: #fff;
}
