/* PC-Flex Custom Styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--procon-font-family, 'Poppins', sans-serif);
}
main {
    flex: 1;
}

/* Tabellensortierung */
th.sortable {
    position: relative;
    user-select: none;
}
th.sortable::after {
    content: ' \2195';
    opacity: 0.3;
    font-size: 0.8em;
}
th.sortable.sort-asc::after {
    content: ' \2191';
    opacity: 0.8;
}
th.sortable.sort-desc::after {
    content: ' \2193';
    opacity: 0.8;
}
th.sortable:hover {
    background-color: rgba(255, 255, 255, 0.03);
}
thead:not(.table-dark) th.sortable:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

#cfr-view-toggle .btn.active {
    background-color: #6c757d;
    color: #fff;
    border-color: #6c757d;
}

/* ==========================================================================
   ProCon Corporate Design — Bootstrap Overrides + Custom Components
   ========================================================================== */

/* --- Bootstrap Primary-Farbe auf ProCon-Gruen --- */
:root {
    --bs-primary: #013B20;
    --bs-primary-rgb: 1, 59, 32;
}

/* --- Navbar ProCon --- */
.navbar-procon {
    background-color: var(--procon-green, #013B20) !important;
}
.navbar-procon .navbar-brand img {
    height: 30px;
    filter: brightness(0) invert(1);  /* Dunkelgruenes SVG → Weiss */
}
.navbar-procon .navbar-brand span {
    color: #fff;
    font-weight: 600;
    font-size: 1.25rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* --- Pill-Buttons (ProCon-Stil) --- */
.btn-procon {
    border: 1px solid var(--procon-dark, #012916);
    border-radius: var(--procon-btn-border-radius, 31px);
    background: transparent;
    color: var(--procon-dark, #012916);
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.btn-procon:hover,
.btn-procon:focus {
    background-color: var(--procon-dark, #012916);
    color: #fff;
    border-color: var(--procon-dark, #012916);
}
/* Weisse Variante (auf dunklem Hintergrund, z.B. Login) */
.btn-procon-light {
    border: 1px solid #fff;
    border-radius: var(--procon-btn-border-radius, 31px);
    background: transparent;
    color: #fff;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.btn-procon-light:hover,
.btn-procon-light:focus {
    background-color: #fff;
    color: var(--procon-dark, #012916);
}

/* Page-Header Info-Icon (Baustein 38) */
.btn-page-info {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--procon-green);
    color: var(--procon-white);
    border: 1px solid var(--procon-green);
    border-radius: 50%;
    line-height: 1;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn-page-info:hover,
.btn-page-info:focus {
    background-color: var(--procon-dark);
    border-color: var(--procon-dark);
    color: var(--procon-white);
    transform: scale(1.05);
}
.btn-page-info i {
    font-size: 1.1rem;
}

/* --- Shadow-Cards (ProCon-Stil) --- */
.card-procon {
    box-shadow: var(--procon-card-shadow, 0px 8px 24px rgba(0, 0, 0, 0.15));
    border: none;
    border-bottom: 5px solid var(--procon-green, #013B20);
    transition: box-shadow 0.3s ease, border-bottom-width 0.3s ease;
}
.card-procon:hover {
    box-shadow: var(--procon-card-shadow-hover, 0px 16px 48px rgba(0, 0, 0, 0.15));
    border-bottom-width: 15px;
}

/* --- KPI-Kacheln: Shadow ergaenzen, Status-Farben behalten --- */
/* HINWEIS: .kpi-card und .card-procon werden in Baustein 15b auf Feature-Views angewendet.
   Hier nur CSS-Definition — Feature-Views NICHT anfassen! */
.kpi-card {
    box-shadow: var(--procon-card-shadow, 0px 8px 24px rgba(0, 0, 0, 0.15));
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.kpi-card:hover {
    box-shadow: var(--procon-card-shadow-hover, 0px 16px 48px rgba(0, 0, 0, 0.15));
    transform: translateY(-2px);
}

/* --- Tabellen-Header dezent --- */
.table thead th {
    background-color: var(--procon-gray-light, #E9E9E9);
    font-weight: 600;
}

/* --- Sortier-Indikatoren ProCon-Gruen --- */
th.sortable.sort-asc::after,
th.sortable.sort-desc::after {
    color: var(--procon-green, #013B20);
    opacity: 1;
}

/* --- Login-Seite --- */
.login-card-procon {
    max-width: 420px;
    margin: 60px auto 0;
}
.login-card-procon .login-logo {
    display: block;
    margin: 0 auto 1.5rem;
    max-width: 220px;
}
.login-card-procon .form-control-underline {
    border: none;
    border-bottom: 2px solid var(--procon-green, #013B20);
    border-radius: 0;
    background: transparent;
    padding: 0.5rem 0;
    font-size: 1rem;
}
.login-card-procon .form-control-underline:focus {
    box-shadow: none;
    border-bottom-color: var(--procon-dark, #012916);
}

/* --- Footer ProCon --- */
.footer-procon {
    background-color: #fff;
    padding: 1.5rem 0;
    border-top: 1px solid var(--procon-gray-light, #E9E9E9);
    text-align: center;
}
.footer-procon img {
    height: 35px;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}
.footer-procon small {
    color: var(--procon-gray-footer, #BBBBBB);
    display: block;
}
