/**
 * KoSch Holding – Dediziertes Theme
 * Domain: crm.kosch-holding.de
 *
 * Visuelles Profil: Warm, corporate, vertrauenswuerdig
 * Primary: #F5A623 (Orange/Gold), Secondary: #194D85 (Dunkelblau)
 * Buttons: Abgerundet (50px), weiche Schatten
 * Typografie: Etwas groesser, mehr Gewicht
 */

/* ── Erweiterte Token-Overrides ───────────────────────────────────────── */
:root {
    --theme-card-radius: 16px;
    --theme-card-shadow: 0 4px 20px rgba(245, 166, 35, 0.08), 0 1px 4px rgba(0,0,0,0.06);
    --theme-card-hover-shadow: 0 8px 30px rgba(245, 166, 35, 0.15), 0 4px 12px rgba(0,0,0,0.08);
    --theme-input-focus-ring: rgba(245, 166, 35, 0.25);
    --theme-bg-subtle: #fffcf5;
    --theme-bg-pattern: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 20.5V18H0v-2h20v-2l10 3.25L20 20.5z' fill='%23F5A623' fill-opacity='0.03'/%3E%3C/svg%3E");
}

/* ── Background ──────────────────────────────────────────────────────── */
body {
    background: var(--theme-bg-subtle);
    background-image: var(--theme-bg-pattern);
}

/* ── Header: Warmer Goldakzent ───────────────────────────────────────── */
.crm-header {
    border-bottom-width: 3px;
    border-image: linear-gradient(90deg, #F5A623, #ff8c00, #F5A623) 1;
}

.logo-text h1 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ── Cards: Weicher, waermer ─────────────────────────────────────────── */
.card, .kosch-card, .stat-card {
    border-radius: var(--theme-card-radius);
    box-shadow: var(--theme-card-shadow);
    border: 1px solid rgba(245, 166, 35, 0.08);
}

.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: Gold-Akzent oben ────────────────────────────────────── */
.stat-card::before {
    background: linear-gradient(90deg, #F5A623, #ff8c00, #F5A623);
}

.stat-icon {
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.12), rgba(255, 140, 0, 0.08));
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* ── Buttons: Stark abgerundet, warmere Hover ────────────────────────── */
.btn-primary, .btn-kosch-primary, .user-button {
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
}

.btn-primary:hover, .btn-kosch-primary:hover {
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.4);
}

.btn-secondary, .btn-kosch-secondary {
    border-radius: 50px;
}

.btn-outline-primary {
    border-radius: 50px;
    border-width: 2px;
}

/* ── Navigation: Aktiver Link mit Gold-Hintergrund ───────────────────── */
.nav-link.active {
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(245, 166, 35, 0.3);
}

.nav-link:hover {
    border-radius: 10px;
}

/* ── Page Header: Warmer Gradient ────────────────────────────────────── */
.page-header {
    border-radius: 0 0 20px 20px;
    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='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

/* ── Footer: Corporate-Blau mit Gold-Akzent ──────────────────────────── */
.crm-footer {
    border-top: 3px solid #F5A623;
}

.footer-links a:hover {
    color: #F5A623;
}

/* ── Tables: Waermere Hover-Farbe ────────────────────────────────────── */
.table tbody tr:hover,
.audit-table tr:hover {
    background: rgba(245, 166, 35, 0.04);
}

/* ── Badges: Abgerundet passend zu Buttons ───────────────────────────── */
.badge {
    border-radius: 50px;
    padding: 4px 12px;
}

/* ── Alerts ───────────────────────────────────────────────────────────── */
.alert {
    border-radius: 14px;
    border-left: 4px solid;
}

/* ── Forms: Gold Focus-Ring ──────────────────────────────────────────── */
.form-control:focus, .form-select:focus {
    border-color: #F5A623;
    box-shadow: 0 0 0 3px var(--theme-input-focus-ring);
}

/* ── Dashboard: Stat Numbers in Primary ──────────────────────────────── */
.stat-number {
    color: #c77d0a;
    font-weight: 800;
}

/* ── Dropdown Menu ───────────────────────────────────────────────────── */
.dropdown-menu {
    border-radius: 14px;
    border: 1px solid rgba(245, 166, 35, 0.15);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* ── Scrollbar (Webkit) ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--theme-bg-subtle); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #F5A623, #c77d0a);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #e09000; }
