/* ============================================
   Aktionärsportal - Tierklinik Aarau West AG
   Corporate Design: TKAW CD-Manual konform
   Primärfarben: Graublau #37617A, Türkis #40CCB5
   Akzent: Champagner-Gold #C9A96E
   Premium Luxury Edition
   ============================================ */

:root {
    /* ---- CI/CD Farben ---- */
    --graublau: #37617A;
    --graublau-dark: #243f51;
    --graublau-light: #4a7a96;
    --graublau-ultra-light: rgba(55, 97, 122, 0.04);
    --tuerkis: #40CCB5;
    --tuerkis-light: rgba(64, 204, 181, 0.06);
    --tuerkis-medium: rgba(64, 204, 181, 0.14);
    --notfall-rot: #c9414d;

    /* ---- Luxury Akzente ---- */
    --gold: #C9A96E;
    --gold-light: rgba(201, 169, 110, 0.10);
    --gold-medium: rgba(201, 169, 110, 0.20);
    --gold-dark: #b08f52;
    --champagner: #F5EFE0;

    /* ---- Neutrale Farben (wärmer) ---- */
    --grau-sekundaer: #4B4B4B;
    --grau-text: #2d3239;
    --grau-hell: #f7f6f3;
    --hellgrau: #f7f6f3;
    --grau-border: #e8e4dd;
    --weiss: #ffffff;

    /* ---- Sidebar Dark ---- */
    --sidebar-bg: #1e3444;
    --sidebar-hover: rgba(255,255,255,0.06);
    --sidebar-active: rgba(64, 204, 181, 0.12);
    --sidebar-text: rgba(255,255,255,0.55);
    --sidebar-text-hover: rgba(255,255,255,0.85);
    --sidebar-border: rgba(255,255,255,0.06);

    /* ---- Gradients ---- */
    --gradient: linear-gradient(135deg, var(--graublau), var(--graublau-dark));
    --gradient-reverse: linear-gradient(135deg, var(--graublau-dark), var(--graublau));
    --gradient-gold: linear-gradient(135deg, var(--gold), var(--gold-dark));
    --gradient-luxury: linear-gradient(135deg, #1e3444 0%, #2a4d61 50%, #37617A 100%);

    /* ---- Layout ---- */
    --sidebar-width: 260px;
    --header-height: 60px;

    /* ---- Radien ---- */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 14px;
    --radius-xl: 18px;

    /* ---- Schatten (weicher, edler) ---- */
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.03), 0 1px 2px rgba(0,0,0,0.02);
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.05), 0 2px 6px rgba(0,0,0,0.03);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.06), 0 4px 10px rgba(0,0,0,0.04);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.08), 0 8px 20px rgba(0,0,0,0.05);
    --shadow-gold: 0 4px 16px rgba(201, 169, 110, 0.15);

    /* ---- Übergänge ---- */
    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* ---- Typographie ---- */
    --font-heading: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
    --font-body: 'Inter', 'Calibri', 'Segoe UI', system-ui, sans-serif;
    --font-ui: 'Outfit', 'Calibri', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--grau-hell);
    background-attachment: fixed;
    color: var(--grau-text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    line-height: 1.65;
    font-size: 13.5px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.01em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.nav-group-title {
    font-family: var(--font-ui);
}

.stat-value, .stat-value-lg {
    font-family: var(--font-ui);
}

a {
    color: var(--graublau);
    transition: color var(--transition-fast);
    text-decoration: none;
}
a:hover {
    color: var(--gold);
}

::selection {
    background: var(--gold-medium);
    color: var(--graublau-dark);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d0ccc4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #b5b0a6; }


/* ============================================
   Login Seite – Luxury Edition
   ============================================ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../img/HausA-Wartebereich_R5C_1704.jpg') center/cover no-repeat fixed;
    position: relative;
    overflow: hidden;
}

/* Dunkles, edles Overlay mit Gradient */
.login-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(30, 52, 68, 0.88) 0%,
        rgba(36, 63, 81, 0.78) 40%,
        rgba(55, 97, 122, 0.65) 100%
    );
    z-index: 0;
}

/* Subtiler Gold-Shimmer oben */
.login-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    z-index: 2;
    opacity: 0.5;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px) saturate(1.2);
    -webkit-backdrop-filter: blur(40px) saturate(1.2);
    border-radius: var(--radius-xl);
    padding: 48px 44px 36px;
    width: 420px;
    max-width: 90vw;
    box-shadow:
        0 32px 64px rgba(0,0,0,0.15),
        0 16px 32px rgba(0,0,0,0.08),
        0 0 0 1px rgba(201, 169, 110, 0.12);
    position: relative;
    z-index: 1;
    animation: loginCardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Goldener Top-Akzent */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 32px;
    right: 32px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    border-radius: 0 0 2px 2px;
}

@keyframes loginCardAppear {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card .logo-area {
    text-align: center;
    margin-bottom: 28px;
}

.login-card .logo-area h1 {
    font-family: var(--font-heading);
    color: var(--graublau);
    font-size: 26px;
    margin: 16px 0 4px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.login-card .logo-area .subtitle {
    color: var(--gold);
    font-size: 12.5px;
    font-weight: 500;
    font-family: var(--font-ui);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-card .form-group { margin-bottom: 18px; }

.login-card .form-group label {
    font-weight: 500;
    font-size: 11.5px;
    color: #6a7180;
    margin-bottom: 6px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-ui);
}

.login-card .form-control {
    padding: 12px 16px;
    font-size: 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid #e0ddd6;
    background: rgba(247, 246, 243, 0.6);
    transition: all var(--transition-fast);
}

.login-card .form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.10);
    background: var(--weiss);
}

.login-card .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
    font-family: var(--font-ui);
    background: var(--gradient-luxury);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    transition: all var(--transition-normal);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.login-card .btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201,169,110,0.15), transparent);
    transition: left 0.5s ease;
}

.login-card .btn-primary:hover {
    background: var(--graublau-dark);
    box-shadow: 0 4px 16px rgba(30, 52, 68, 0.3);
    transform: translateY(-1px);
}

.login-card .btn-primary:hover::after {
    left: 100%;
}

.login-footer-text {
    text-align: center;
    font-size: 10.5px;
    color: #b0aaa0;
    font-family: var(--font-ui);
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(201, 169, 110, 0.12);
    letter-spacing: 0.02em;
}

.login-forgot-link {
    text-align: center;
    margin-top: 14px;
}

.login-forgot-link a {
    font-size: 12.5px;
    color: var(--gold);
    text-decoration: none;
    font-family: var(--font-ui);
    letter-spacing: 0.02em;
}

.login-forgot-link a:hover {
    color: var(--gold-dark);
    text-decoration: underline;
}


/* ============================================
   Sidebar – Dark Luxury Theme
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: none;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
}

.sidebar-logo {
    height: var(--header-height);
    padding: 0 22px;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    position: relative;
}

/* Goldene Linie unter Logo */
.sidebar-logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 22px;
    right: 22px;
    height: 1px;
    background: linear-gradient(90deg, var(--gold), transparent);
    opacity: 0.25;
}

.sidebar-logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.sidebar-nav {
    padding: 10px 0;
    flex: 1;
    overflow-y: auto;
}

/* ---- Nav Groups ---- */
.nav-group {
    border-bottom: 1px solid var(--sidebar-border);
}

.nav-group:last-child {
    border-bottom: none;
}

.nav-group-header {
    display: flex;
    align-items: center;
    padding: 11px 22px;
    gap: 10px;
    cursor: pointer;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all var(--transition-fast);
    user-select: none;
}

.nav-group-header:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-hover);
}

.nav-group.open > .nav-group-header {
    color: rgba(255,255,255,0.9);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.5;
    color: inherit;
    transition: all var(--transition-fast);
}

.nav-group-header:hover .nav-icon {
    opacity: 0.8;
    color: var(--gold);
}

.nav-group.open > .nav-group-header .nav-icon {
    opacity: 0.85;
    color: var(--gold);
}

.nav-group-title {
    flex: 1;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: var(--font-ui);
}

.nav-arrow {
    flex-shrink: 0;
    font-size: 9px;
    color: rgba(255,255,255,0.2);
    line-height: 1;
    transition: all var(--transition-fast);
}

.nav-arrow::after {
    content: '\25BE';
}

.nav-group.open > .nav-group-header .nav-arrow::after {
    content: '\25B4';
}

.nav-group-header:hover .nav-arrow {
    color: rgba(255,255,255,0.4);
}

.nav-group-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-group.open > .nav-group-items {
    max-height: 500px;
}

.sidebar-link {
    display: block;
    padding: 7px 22px 7px 47px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 400;
    transition: all var(--transition-fast);
    position: relative;
    border-radius: 0;
    margin-right: 0;
    letter-spacing: 0.01em;
}

.sidebar-link:hover {
    color: var(--sidebar-text-hover);
    background: var(--sidebar-hover);
}

.sidebar-link.active {
    color: white;
    font-weight: 500;
    background: var(--sidebar-active);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    border-radius: 0 1px 1px 0;
    background: var(--gold);
}

.nav-group-items .sidebar-link:last-child {
    margin-bottom: 4px;
}

.sidebar-user {
    padding: 16px 22px;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    position: relative;
}

/* Gold-Linie über User-Bereich */
.sidebar-user::before {
    content: '';
    position: absolute;
    top: 0;
    left: 22px;
    right: 22px;
    height: 1px;
    background: linear-gradient(90deg, var(--gold), transparent);
    opacity: 0.2;
}

.sidebar-user .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient-gold);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    font-family: var(--font-ui);
}

.sidebar-user .user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user .user-name {
    font-family: var(--font-ui);
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    word-break: break-word;
    line-height: 1.3;
}

.sidebar-user .user-role {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    font-weight: 400;
    letter-spacing: 0.02em;
}


/* ============================================
   Main Content
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 28px 36px;
    padding-top: 0;
}

.page-header {
    background: var(--weiss);
    border-bottom: 1px solid var(--grau-border);
    height: var(--header-height);
    padding: 0 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    margin: 0 -36px 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}

.page-header::after {
    display: none;
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 600;
    color: var(--graublau);
    margin: 0;
    letter-spacing: 0.01em;
}

.page-header .breadcrumb {
    font-size: 12px;
    color: #94a0b0;
    margin: 3px 0 0;
    font-family: var(--font-body);
}

.page-body {
    padding: 28px 36px;
}


/* ============================================
   Grid System
   ============================================ */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -14px;
    margin-right: -14px;
}

.row > [class*="col-"] {
    padding-left: 14px;
    padding-right: 14px;
    margin-bottom: 28px;
}

.col-md-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-md-5 { flex: 0 0 41.666%; max-width: 41.666%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.col-md-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-md-9 { flex: 0 0 75%; max-width: 75%; }
.col-md-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; }


/* ============================================
   Cards – Luxury Edition
   ============================================ */
.card {
    background: var(--weiss);
    border: 1px solid var(--grau-border);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 15px 22px;
    border-bottom: 1px solid var(--grau-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, var(--grau-hell), rgba(247,246,243,0.5));
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: var(--graublau);
    letter-spacing: 0.01em;
}

.card-header::before {
    display: none;
}

.card-header h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: var(--graublau);
    margin: 0;
}

.card-title {
    font-size: 10.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 6px;
    color: var(--gold);
    font-family: var(--font-ui);
}

.card-text {
    margin: 0;
}

.card-body {
    padding: 22px;
}

.card-body-compact {
    padding: 16px 20px;
}


/* ============================================
   Stat Cards (Dashboard) – Luxury Edition
   ============================================ */
.stat-card {
    background: var(--weiss);
    border: 1px solid var(--grau-border);
    border-radius: var(--radius-lg);
    padding: 24px 24px 20px;
    text-align: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--tuerkis));
    opacity: 0.4;
    transition: opacity var(--transition-normal);
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.stat-card:hover::before {
    opacity: 0.7;
}

.stat-card .stat-icon {
    font-size: 26px;
    margin-bottom: 8px;
    opacity: 0.6;
}

.stat-card .stat-value {
    font-family: var(--font-ui);
    font-size: 28px;
    font-weight: 700;
    color: var(--graublau);
    line-height: 1.1;
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
}

.stat-card .stat-label {
    font-size: 10px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 6px;
    font-weight: 500;
    font-family: var(--font-ui);
}


/* ============================================
   Tables – Refined Luxury
   ============================================ */
.table-wrapper,
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table,
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.table th {
    background: linear-gradient(180deg, var(--grau-hell), rgba(247,246,243,0.5));
    padding: 10px 18px;
    font-family: var(--font-ui);
    font-size: 10.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gold-dark);
    border-bottom: 1px solid var(--grau-border);
    text-align: left;
    white-space: nowrap;
}

.data-table td,
.table td {
    padding: 11px 18px;
    font-size: 13px;
    border-bottom: 1px solid rgba(232, 228, 221, 0.6);
    vertical-align: middle;
    color: var(--grau-text);
}

.data-table tbody tr,
.table tbody tr {
    transition: all var(--transition-fast);
}

.data-table tbody tr:nth-child(even),
.table tbody tr:nth-child(even) {
    background: rgba(247, 246, 243, 0.4);
}

.data-table tr:hover,
.table tbody tr:hover,
.table-hover tbody tr:hover {
    background: var(--gold-light);
}

.data-table tr.clickable,
.table tr.clickable {
    cursor: pointer;
}

.data-table .text-right,
.table .text-right { text-align: right !important; }
.data-table .text-center,
.table .text-center { text-align: center !important; }

.table-sm th,
.table-sm td {
    padding: 8px 14px;
}

.card-body .table,
.card-body .data-table {
    margin-bottom: 0;
}

.card-body .table tr:last-child td,
.card-body .data-table tr:last-child td {
    border-bottom: none;
}


/* ============================================
   Buttons – Elegant Edition
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    line-height: 1.4;
    white-space: nowrap;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.btn:active { transform: scale(0.97); }

.btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.btn-sm svg {
    width: 12px;
    height: 12px;
}

.btn-primary {
    background: var(--graublau);
    color: white;
}
.btn-primary:hover {
    background: var(--graublau-dark);
    color: white;
    box-shadow: 0 2px 8px rgba(36, 63, 81, 0.25);
}

.btn-accent {
    background: var(--tuerkis);
    color: white;
}
.btn-accent:hover {
    background: #35b9a3;
    color: white;
    box-shadow: 0 2px 8px rgba(64, 204, 181, 0.25);
}

.btn-danger {
    background: var(--notfall-rot);
    color: white;
}
.btn-danger:hover {
    background: #b53643;
    color: white;
}

.btn-outline {
    background: var(--weiss);
    border: 1px solid var(--grau-border);
    color: var(--grau-text);
}
.btn-outline:hover {
    background: var(--grau-hell);
    border-color: var(--gold);
    color: var(--graublau);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 6px;
    gap: 4px;
}

.btn-lg {
    padding: 10px 22px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.03em;
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--graublau);
    color: var(--graublau);
}
.btn-outline-primary:hover {
    background: rgba(55, 97, 122, 0.06);
    color: var(--graublau-dark);
    border-color: var(--graublau-dark);
}

.btn-outline-secondary {
    background: transparent;
    border: 1px solid var(--grau-border);
    color: #6a7180;
}
.btn-outline-secondary:hover {
    background: var(--grau-hell);
    color: var(--grau-text);
    border-color: var(--gold);
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid var(--notfall-rot);
    color: var(--notfall-rot);
}
.btn-outline-danger:hover {
    background: rgba(201, 65, 77, 0.06);
    color: #b53643;
    border-color: #b53643;
}

.btn-warning {
    background: var(--gold);
    color: white;
    border: none;
}
.btn-warning:hover {
    background: var(--gold-dark);
    color: white;
    box-shadow: var(--shadow-gold);
}

.btn-success {
    background: #2d8f4a;
    color: white;
    border: none;
}
.btn-success:hover {
    background: #247d3e;
    color: white;
}


/* ============================================
   Forms – Refined
   ============================================ */
.form-group {
    margin-bottom: 18px;
}

.form-group label,
.form-label {
    display: block;
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 500;
    color: #7a8290;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form-control,
.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e0ddd6;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    color: var(--grau-text);
    transition: all var(--transition-fast);
    background: var(--weiss);
    font-family: inherit;
    line-height: 1.5;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.08);
}

.form-control::placeholder {
    color: #c5c0b6;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
}

select.form-control,
.form-select {
    appearance: auto;
}

.form-select-sm {
    padding: 7px 12px;
    font-size: 12.5px;
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
}


/* ============================================
   Alerts – Refined
   ============================================ */
.alert {
    padding: 14px 18px 14px 22px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 450;
    line-height: 1.5;
    border-left: 3px solid;
}

.alert-success {
    background: rgba(64, 204, 181, 0.06);
    color: #1a7a68;
    border-color: var(--tuerkis);
}

.alert-error,
.alert-danger {
    background: rgba(201, 65, 77, 0.05);
    color: #9c2a34;
    border-color: var(--notfall-rot);
}

.alert-info {
    background: rgba(55, 97, 122, 0.04);
    color: var(--graublau);
    border-color: var(--graublau-light);
}

.alert-warning {
    background: var(--gold-light);
    color: var(--gold-dark);
    border-color: var(--gold);
}


/* ============================================
   Badges – Refined
   ============================================ */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.4;
    font-family: var(--font-ui);
}

.badge-stamm { background: var(--graublau); color: white; }
.badge-vorzug { background: var(--tuerkis); color: white; }
.badge-stimm { background: var(--gold); color: white; }
.badge-aktiv { background: rgba(64, 204, 181, 0.1); color: #1a7a68; }
.badge-inaktiv { background: rgba(201, 65, 77, 0.08); color: #9c2a34; }
.badge-typ-a { background: var(--graublau); color: white; }
.badge-typ-b { background: rgba(55, 97, 122, 0.1); color: var(--graublau); }

.badge.bg-primary { background: var(--graublau); color: white; }
.badge.bg-secondary { background: #6c757d; color: white; }
.badge.bg-success { background: #2d8f4a; color: white; }
.badge.bg-danger { background: var(--notfall-rot); color: white; }
.badge.bg-warning { background: var(--gold); color: white; }
.badge.bg-info { background: var(--tuerkis); color: white; }


/* ============================================
   Detail Panel – Luxury
   ============================================ */
.detail-panel {
    background: var(--weiss);
    border: 1px solid var(--grau-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.detail-header {
    padding: 22px 24px;
    border-bottom: 1px solid var(--grau-border);
    background: linear-gradient(180deg, var(--grau-hell), rgba(247,246,243,0.3));
    position: relative;
}

.detail-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, var(--gold), transparent);
    opacity: 0.15;
}

.detail-header h2 {
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--graublau);
    margin: 0 0 2px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.detail-row {
    display: flex;
    padding: 10px 24px;
    border-bottom: 1px solid rgba(232, 228, 221, 0.5);
    font-size: 13px;
    transition: background var(--transition-fast);
}

.detail-row:hover {
    background: var(--gold-light);
}

.detail-row:last-child { border-bottom: none; }

.detail-label {
    width: 170px;
    color: var(--gold-dark);
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    padding-top: 1px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-ui);
}

.detail-value {
    flex: 1;
    color: var(--grau-text);
    font-weight: 450;
}


/* ============================================
   Search / Filter Bar
   ============================================ */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar .search-input {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.filter-bar .search-input input {
    padding-left: 38px;
}

.filter-bar .search-input::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b5b0a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}


/* ============================================
   Chart Container
   ============================================ */
.chart-container {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
}


/* ============================================
   Tabs – Luxury
   ============================================ */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--grau-border);
    gap: 0;
    margin-bottom: 24px;
}

.tab-link {
    padding: 11px 22px;
    font-size: 13px;
    font-weight: 500;
    color: #9aa2ae;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--transition-fast);
    font-family: var(--font-ui);
    letter-spacing: 0.02em;
}

.tab-link:hover {
    color: var(--graublau);
}

.tab-link.active {
    color: var(--graublau);
    border-bottom-color: var(--gold);
    font-weight: 600;
    background: transparent;
}


/* ============================================
   Modal – Luxury
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(30, 52, 68, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 520px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

/* Goldener Akzent auf Modal */
.modal-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 32px;
    right: 32px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    border-radius: 0 0 2px 2px;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-box h3 {
    font-family: var(--font-heading);
    color: var(--graublau);
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
}


/* ============================================
   Pagination – Refined
   ============================================ */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 24px 0 8px;
    gap: 4px;
    justify-content: center;
}

.page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--grau-border);
    background: var(--weiss);
    color: var(--graublau);
    font-size: 0.85em;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.page-item .page-link:hover {
    background: var(--grau-hell);
    border-color: var(--gold);
}

.page-item.active .page-link {
    background: var(--graublau);
    border-color: transparent;
    color: white;
    font-weight: 600;
}


/* ============================================
   Print Styles
   ============================================ */
@media print {
    .sidebar, .page-header .btn, .no-print { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .page-body { padding: 0 !important; }
    .card { border: none; box-shadow: none; }
    body { background: white; }
}


/* ============================================
   Responsive
   ============================================ */
@media (max-width: 992px) {
    .row > [class*="col-md-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }
    .main-content {
        margin-left: 0;
        padding: 16px 20px;
        padding-top: 0;
    }
    .page-header {
        padding: 16px 20px;
        margin: 0 -20px 16px;
    }
    .page-body {
        padding: 16px 20px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .mobile-toggle {
        display: flex !important;
    }
    .row > [class*="col-md-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--graublau);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
    align-items: center;
    justify-content: center;
}

.mobile-toggle:hover {
    background: var(--grau-hell);
}


/* ============================================
   Utility Classes
   ============================================ */
.text-right, .text-end { text-align: right !important; }
.text-center { text-align: center !important; }
.text-left, .text-start { text-align: left !important; }
.text-muted { color: #9aa2ae; }
.text-success { color: #1a7a68; }
.text-danger { color: var(--notfall-rot); }
.text-primary { color: var(--graublau); }
.text-accent { color: var(--tuerkis); }
.text-graublau { color: var(--graublau); }
.text-tuerkis { color: var(--tuerkis); }
.text-grau { color: #777; }
.text-hellgrau { color: #9aa2ae; }
.text-rot { color: var(--notfall-rot); }
.text-gruen { color: #2d8f4a; }
.text-gold { color: var(--gold); }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.p-0 { padding: 0; }
.p-2 { padding: 8px; }
.p-3 { padding: 16px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-center, .align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.justify-between, .justify-content-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }

.font-mono { font-family: 'SF Mono', 'Consolas', 'Monaco', monospace; }
.font-tabular { font-variant-numeric: tabular-nums; }
.fw-bold { font-weight: 600; }
.fw-normal { font-weight: 400; }
.fs-xs { font-size: 0.75em; }
.fs-sm { font-size: 0.85em; }
.fs-md { font-size: 0.9em; }
.fs-lg { font-size: 1.1em; }

.stat-value-lg {
    font-family: var(--font-ui);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--graublau);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.logo-svg {
    width: 40px;
    height: 40px;
}


/* ============================================
   Page-specific
   ============================================ */
.table a,
.data-table a {
    color: var(--graublau);
    text-decoration: none;
    font-weight: 500;
}

.table a:hover,
.data-table a:hover {
    color: var(--gold);
}

.card .form-group:last-child {
    margin-bottom: 0;
}

.empty-state {
    text-align: center;
    padding: 52px 28px;
    color: #b0aaa0;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.35;
}

.empty-state p {
    font-size: 13px;
    margin: 0;
    font-family: var(--font-ui);
}


/* ============================================
   Focus & Interaction
   ============================================ */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

.main-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

code {
    background: rgba(201, 169, 110, 0.08);
    color: var(--graublau);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
}

.sidebar ::selection {
    background: rgba(201, 169, 110, 0.3);
    color: white;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-check-input {
    width: 16px;
    height: 16px;
    accent-color: var(--gold);
}
