/**
 * KoSch Services – Dediziertes Theme
 * Domain: crm.kosch-services.de
 *
 * Visuelles Profil: Professionell, klar, serviceorientiert
 * Primary: #194D85 (Dunkelblau), Secondary: #F5A623 (Orange/Gold)
 * Buttons: Moderat abgerundet (12px), klare Kanten
 * Typografie: Schlank, effizient
 */

/* ── Erweiterte Token-Overrides ───────────────────────────────────────── */
:root {
    --theme-card-radius: 12px;
    --theme-card-shadow: 0 2px 12px rgba(25, 77, 133, 0.06), 0 1px 3px rgba(0,0,0,0.05);
    --theme-card-hover-shadow: 0 6px 24px rgba(25, 77, 133, 0.12), 0 2px 8px rgba(0,0,0,0.06);
    --theme-input-focus-ring: rgba(25, 77, 133, 0.2);
    --theme-bg-subtle: #f5f7fb;
    --theme-bg-pattern: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' x='10' y='10' fill='%23194D85' fill-opacity='0.02'/%3E%3C/svg%3E");
}

/* ── Background ──────────────────────────────────────────────────────── */
body {
    background: var(--theme-bg-subtle);
    background-image: var(--theme-bg-pattern);
}

/* ── Header: Praeziser Blau-Akzent ───────────────────────────────────── */
.crm-header {
    border-bottom-width: 3px;
    border-image: linear-gradient(90deg, #194D85, #2563eb, #194D85) 1;
}

.logo-text h1 {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ── Cards: Sauber, professionell ────────────────────────────────────── */
.card, .kosch-card, .stat-card {
    border-radius: var(--theme-card-radius);
    box-shadow: var(--theme-card-shadow);
    border: 1px solid rgba(25, 77, 133, 0.06);
}

.card:hover, .kosch-card:hover, .stat-card:hover {
    box-shadow: var(--theme-card-hover-shadow);
}

.card-header {
    border-radius: var(--theme-card-radius) var(--theme-card-radius) 0 0;
}

/* ── Stat Cards: Blau-Akzent oben ────────────────────────────────────── */
.stat-card::before {
    background: linear-gradient(90deg, #194D85, #2563eb, #194D85);
}

.stat-icon {
    background: linear-gradient(135deg, rgba(25, 77, 133, 0.1), rgba(37, 99, 235, 0.06));
    width: 68px;
    height: 68px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* ── Buttons: Moderat abgerundet, businesslike ───────────────────────── */
.btn-primary, .btn-kosch-primary, .user-button {
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.btn-primary:hover, .btn-kosch-primary:hover {
    box-shadow: 0 4px 16px rgba(25, 77, 133, 0.35);
}

.btn-secondary, .btn-kosch-secondary {
    border-radius: 12px;
}

.btn-outline-primary {
    border-radius: 12px;
    border-width: 2px;
}

/* ── Navigation: Aktiver Link mit Blau-Hintergrund ───────────────────── */
.nav-link.active {
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(25, 77, 133, 0.25);
}

.nav-link:hover {
    border-radius: 8px;
}

/* ── Page Header: Professioneller Gradient ────────────────────────────── */
.page-header {
    border-radius: 0 0 15px 15px;
    position: relative;
    overflow: hidden;
}

.page-header::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' x='20' y='20' fill='%23ffffff' fill-opacity='0.06'/%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

/* ── Footer: Dunkelblau, sauber ──────────────────────────────────────── */
.crm-footer {
    border-top: 3px solid #2563eb;
}

.footer-links a:hover {
    color: #F5A623;
}

/* ── Tables: Kuehler Hover ───────────────────────────────────────────── */
.table tbody tr:hover,
.audit-table tr:hover {
    background: rgba(25, 77, 133, 0.03);
}

/* ── Badges: Moderat abgerundet ──────────────────────────────────────── */
.badge {
    border-radius: 8px;
    padding: 3px 10px;
}

/* ── Alerts ───────────────────────────────────────────────────────────── */
.alert {
    border-radius: 10px;
    border-left: 4px solid;
}

/* ── Forms: Blauer Focus-Ring ────────────────────────────────────────── */
.form-control:focus, .form-select:focus {
    border-color: #194D85;
    box-shadow: 0 0 0 3px var(--theme-input-focus-ring);
}

/* ── Dashboard: Stat Numbers in Secondary ────────────────────────────── */
.stat-number {
    color: #194D85;
    font-weight: 800;
}

/* ── Dropdown Menu ───────────────────────────────────────────────────── */
.dropdown-menu {
    border-radius: 10px;
    border: 1px solid rgba(25, 77, 133, 0.1);
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}

/* ── Scrollbar (Webkit) ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--theme-bg-subtle); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #194D85, #0f3759);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #2563eb; }
