/* ── General-App – Theme ─────────────────────────────────────────────────── */

:root {
    --primary:      #6C3FFD;
    --primary-dark: #5A2FD8;
    --primary-light:#8B6CFF;
    --bg-gradient:  linear-gradient(135deg, #6C3FFD 0%, #4F46E5 50%, #3B82F6 100%);
    --card-radius:  12px;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md:    0 4px 16px rgba(0,0,0,.08);
    --sidebar-width: 230px;
}

/* Global */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f5f7fb;
    min-height: 100vh;
    padding-top: 56px;
}

/* Navbar */
.navbar {
    background: var(--bg-gradient) !important;
    padding: 0.7rem 0;
}
.navbar .brand-icon {
    font-size: 1.3rem;
    margin-right: 0.3rem;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    background: #fff;
    width: var(--sidebar-width);
    border-right: 1px solid #eef2f6;
}
.sidebar-sticky {
    position: sticky;
    top: 56px;
}
.sidebar .nav {
    padding-left: 0;
    margin: 0;
    list-style: none;
}
.sidebar-link {
    padding: 0.7rem 1.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: #495057;
    text-decoration: none;
    display: block;
    transition: background .15s, color .15s;
    border-left: 3px solid transparent;
}
.sidebar-link:hover {
    background: #f0edff;
    color: var(--primary);
}
.sidebar-link.active {
    background: #f0edff;
    color: var(--primary);
    border-left-color: var(--primary);
}

/* Mobile bottom nav */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    box-shadow: 0 -1px 6px rgba(0,0,0,.08);
}
.mobile-nav-link {
    font-size: 1.4rem;
    text-decoration: none;
    opacity: .4;
    transition: opacity .15s;
}
.mobile-nav-link.active,
.mobile-nav-link:hover {
    opacity: 1;
}

/* Main content offset for sidebar */
.sidebar-link {
    white-space: nowrap;
    font-size: 0.85rem;
}
@media (min-width: 768px) {
    main.flex-grow-1, main.ms-auto {
        margin-left: var(--sidebar-width) !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    .container-fluid.px-3 {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

/* Cards */
.card {
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s;
}
.card:hover {
    box-shadow: var(--shadow-md);
}

/* Buttons */
.btn-primary {
    background: var(--bg-gradient);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: opacity .2s, transform .1s;
}
.btn-primary:hover {
    opacity: .92;
    transform: translateY(-1px);
}
.btn-primary:active {
    transform: translateY(0);
}
.btn-outline-primary {
    border-radius: 8px;
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
}
.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Form fields */
.form-control {
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    padding: 0.65rem 0.9rem;
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108,63,253,.15);
}
.form-control-lg {
    padding: 0.75rem 1rem;
}

/* Welcome page */
.welcome-icon {
    font-size: 4rem;
    opacity: .3;
}
.feature-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
}
.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.feature-icon {
    font-size: 2rem;
}

/* Avatar */
.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-gradient);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(108,63,253,.3);
}

/* Verify page */
.verify-icon {
    font-size: 3rem;
}
.letter-spacing-3 {
    letter-spacing: 0.5em;
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
}
.alert-success-subtle {
    background: #e8f5e9;
    color: #1b5e20;
}
.alert-danger-subtle {
    background: #fbe9e7;
    color: #b71c1c;
}
.alert-warning-subtle {
    background: #fff8e1;
    color: #e65100;
}
.alert-info-subtle {
    background: #e3f2fd;
    color: #0d47a1;
}

/* Sticky page header */
.sticky-header {
    position: sticky;
    top: 56px;
    z-index: 15;
    background: #f5f7fb;
    padding: 12px 0 4px 0;
    border-bottom: 1px solid #e2e8f0;
}
/* Fix sticky in flex/grid containers */
.sticky-header::before {
    content: '';
    display: block;
}

/* Badge overrides */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
    border-radius: 20px;
}

/* Table */
.table thead th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    border-bottom-width: 1px;
}

/* ── Sidebar-Version ────────────────────────────────────────────── */
.sidebar {
    display: flex;
    flex-direction: column;
}
.sidebar-sticky {
    position: sticky;
    top: 56px;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 28px;
}
.sidebar-sticky .nav {
    flex: 1;
}
.sidebar-version {
    text-align: center;
    font-size: 0.65rem;
    color: #9ca3af;
    padding: 4px 0;
    margin-top: auto;
    flex-shrink: 0;
}

/* ── Notification Sidebar (rechts) ──────────────────────────────────── */
.notification-sidebar {
    position: fixed;
    top: 56px;
    right: 0;
    bottom: 0;
    width: 300px;
    background: #fff;
    border-left: 1px solid #eef2f6;
    z-index: 99;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.notif-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eef2f6;
    background: #fafbfc;
    flex-shrink: 0;
}
.notif-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}
.notif-item {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background .15s;
}
.notif-item:hover {
    background: #f8f9fa;
}
.notif-unread {
    background: #f0edff;
    border-left: 3px solid var(--primary);
}
.notif-unread:hover {
    background: #e8e3ff;
}
.notif-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}
.notif-msg {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.15rem;
    line-height: 1.3;
}
.notif-time {
    font-size: 0.7rem;
    color: #9ca3af;
}
.notif-actions {
    flex-shrink: 0;
    margin-left: 0.5rem;
}
.notif-actions .btn-link {
    font-size: 0.75rem;
    opacity: 0.5;
}
.notif-actions .btn-link:hover {
    opacity: 1;
}

/* Notif-Badge in der Navbar */
.notif-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    font-size: 0.65rem;
    padding: 0.15em 0.4em;
    min-width: 16px;
    text-align: center;
    background: #ef4444;
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
    line-height: 1;
    display: none;
}
.nav-link {
    position: relative;
}

/* Main content kein Margin-right wenn Notif-Sidebar aktiv */
@media (min-width: 1200px) {
    main.flex-grow-1, main.ms-auto {
        margin-right: 0 !important;
    }
}
@media (min-width: 1540px) {
    main.flex-grow-1, main.ms-auto {
        margin-right: 300px !important;
    }
}
