/*
 * RedderCMS - LifeOS Design (Soft UI / Glassmorphism)
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Colors - LifeOS Palette - Modernized */
    --sidebar-bg: #ffffff;
    --content-bg: #fcfcfc;      /* Cleaner off-white */
    
    --primary-color: #000000;   /* Modern stark black for primary */
    --primary-light: #f3f4f6;   /* Subtle gray */
    
    --text-main: #111827;       /* Gray 900 */
    --text-muted: #6b7280;      /* Gray 500 */
    --text-light: #9ca3af;      /* Gray 400 */
    
    --border-color: #e5e7eb;    /* Gray 200 */
    
    /* Layout */
    --sidebar-width: 260px;
    --sidebar-margin: 16px;
    --header-height: 70px;
    
    /* UI - More structured, less round */
    --radius-sidebar: 16px;
    --radius-card: 12px;
    --radius-btn: 8px;
    
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.03);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* --- Base --- */
* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background-color: var(--content-bg);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    font-size: 0.95rem;
}

a { text-decoration: none; color: inherit; transition: 0.2s ease; }
ul { list-style: none; padding: 0; margin: 0; }

/* --- Wrapper --- */
#wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* --- TEIL 1: Sidebar Container (Floating) --- */
#sidebar-wrapper {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    
    border-radius: 0;
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- TEIL 2: Inhalt --- */

/* 1. Header (Logo) */
.sidebar-header {
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background-color: var(--primary-color);
    border-radius: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    padding: 8px;
}

.logo-dot {
    background-color: #fff;
    border-radius: 50%;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800; /* Bold */
    color: var(--text-main);
    letter-spacing: -0.02em;
}

/* 2. Navigation */
.sidebar-nav {
    flex-grow: 1; /* Spacer logic included here */
    padding: 0 16px;
    overflow-y: auto;
    /* Hide scrollbar */
    scrollbar-width: none; 
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-light);
    margin: 24px 12px 8px 12px;
    letter-spacing: 0.05em;
}

.list-group-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: var(--radius-btn);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    background: transparent;
    transition: all 0.2s ease;
}

.list-group-item i {
    width: 20px;
    margin-right: 12px;
    font-size: 1rem;
    text-align: center;
    color: var(--text-light); /* Inactive Icon color */
    transition: color 0.2s ease;
}

/* Hover State */
.list-group-item:hover {
    background-color: var(--primary-light);
    color: var(--text-main);
}
.list-group-item:hover i {
    color: var(--text-main);
}

/* Active State (WICHTIG) */
.list-group-item.active {
    background-color: var(--text-main) !important;
    color: #ffffff !important;
    font-weight: 600;
}

.list-group-item.active i {
    color: #ffffff !important;
}

/* 4. Footer */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background-color: #fff; /* Ensure bg covers */
}

.footer-item {
    display: flex;
    align-items: center;
    padding: 10px;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-btn);
    transition: 0.2s;
}
.footer-item:hover {
    background-color: #f8fafc;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #cbd5e1; /* Placeholder */
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* --- Page Content Wrapper --- */
#page-content-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--sidebar-margin);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Header (Top Bar - Optional, simple in this design) */
.top-bar {
    background: transparent; /* Blend with bg */
    padding: 10px 0 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

/* Cards */
.card {
    background-color: #ffffff;
    border-radius: var(--radius-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    background: transparent;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-main);
}

.card-body { padding: 24px; }

/* Buttons */
.btn {
    border-radius: var(--radius-btn);
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid transparent;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}
.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: #333333;
    border-color: #333333;
    color: #fff;
}
.btn-white {
    background-color: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-white:hover {
    background-color: var(--primary-light);
    border-color: var(--border-color);
}

/* Utilities / Modernization Classes */
.text-sky { color: var(--primary-color); }

.card-modern {
    background-color: #ffffff;
    border-radius: var(--radius-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    transition: all 0.2s ease;
}

.card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.table-modern thead th {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
}

.table-modern tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    vertical-align: middle;
}

.badge-soft-success { background-color: rgba(16, 185, 129, 0.1); color: #10b981; }
.badge-soft-warning { background-color: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.badge-soft-danger { background-color: rgba(239, 68, 68, 0.1); color: #ef4444; }
.badge-soft-primary { background-color: rgba(0, 0, 0, 0.05); color: #111827; }
.badge-soft-info { background-color: rgba(14, 165, 233, 0.1); color: #0ea5e9; }

/* --- LOGIN PAGE --- */
.login-page-body {
    background-color: #f1f5f9; /* Slate 100 */
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Scroll to Top Button --- */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 9000;
    transition: all 0.3s ease;
}

.scroll-to-top:hover {
    background-color: #0284c7;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.scroll-to-top.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background-color: #ffffff;
    border-radius: 24px; /* Rounded 3xl */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
}

.login-brand {
    margin-bottom: 30px;
}

.login-logo {
    width: 48px;
    height: 48px;
    background-color: var(--primary-color);
    border-radius: 12px;
    margin: 0 auto 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.login-form {
    text-align: left;
}

.login-form .form-group-icon {
    position: relative;
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.login-form input {
    width: 100%;
    padding: 12px 16px 12px 40px; /* Space for icon */
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: #f8fafc;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.login-form input:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.login-form i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.btn-primary-3d {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.btn-primary-3d:hover {
    background-color: #0284c7; /* Darker Sky */
}

.login-footer {
    margin-top: 24px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.login-alert {
    background-color: #fef2f2;
    color: #ef4444;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: left;
    border: 1px solid #fee2e2;
}

/* --- Log Notification Sliding Effect --- */
.log-description-wrapper.can-slide:hover .log-description-content {
    animation: slide-log-text var(--slide-duration, 5s) linear infinite alternate;
    animation-delay: 0.5s;
}

@keyframes slide-log-text {
    0% { transform: translateX(0); }
    10% { transform: translateX(0); } /* Small pause at start */
    90% { transform: translateX(var(--slide-distance)); }
    100% { transform: translateX(var(--slide-distance)); } /* Small pause at end */
}


/* --- Auto-Generated Utilities --- */
.width-auto { width: auto; }
.width-20px { width: 20px; }
.bg-hex-000 { background-color: #000; }
.width-32px { width: 32px; }
.height-32px { height: 32px; }
.fs-0dot85rem { font-size: 0.85rem; }
.fs-0dot7rem { font-size: 0.7rem; }
.cursor-pointer { cursor: pointer; }
.fs-0dot6rem { font-size: 0.6rem; }
.width-300px { width: 300px; }
.z-index-1050 { z-index: 1050; }
.max-height-300px { max-height: 300px; }
.fs-0dot75rem { font-size: 0.75rem; }
.width-38px { width: 38px; }
.height-38px { height: 38px; }
.text-hex-fff { color: #fff; }
.width-350px { width: 350px; }
.max-height-400px { max-height: 400px; }
.z-index-9999 { z-index: 9999; }
.min-width-300px { min-width: 300px; }
.max-width-500px { max-width: 500px; }
.height-350px { height: 350px; }
.width-28px { width: 28px; }
.height-28px { height: 28px; }
.width-36px { width: 36px; }
.height-36px { height: 36px; }
.height-200px { height: 200px; }
.height-70vh { height: 70vh; }
.width-250px { width: 250px; }
.width-42px { width: 42px; }
.height-42px { height: 42px; }
.width-34px { width: 34px; }
.height-34px { height: 34px; }
.max-width-150px { max-width: 150px; }
.min-height-80px { min-height: 80px; }
.max-width-140px { max-width: 140px; }
.width-35px { width: 35px; }
.height-35px { height: 35px; }
.width-90pct { width: 90%; }
.z-index-10 { z-index: 10; }
.width-1dot2rem { width: 1.2rem; }
.height-1dot2rem { height: 1.2rem; }
.height-160px { height: 160px; }
.width-48px { width: 48px; }
.height-48px { height: 48px; }
.max-width-300px { max-width: 300px; }
.min-height-400px { min-height: 400px; }
.max-height-70vh { max-height: 70vh; }
.max-width-50pct { max-width: 50%; }
.max-height-65vh { max-height: 65vh; }
.height-12px { height: 12px; }
.width-0pct { width: 0%; }
.width-50px { width: 50px; }
.height-50px { height: 50px; }
.width-40px { width: 40px; }
.height-40px { height: 40px; }
.max-width-100px { max-width: 100px; }
.height-8px { height: 8px; }
.max-width-250px { max-width: 250px; }
.height-30px { height: 30px; }
.max-width-200px { max-width: 200px; }
.fs-0dot65rem { font-size: 0.65rem; }
.width-80px { width: 80px; }
.height-80px { height: 80px; }
.fs-1dot0rem { font-size: 1.0rem; }
.width-26px { width: 26px; }
.height-26px { height: 26px; }
.height-60px { height: 60px; }
.z-index-2 { z-index: 2; }
.fs-6rem { font-size: 6rem; }
.z-index-1 { z-index: 1; }
.width-120px { width: 120px; }
.height-120px { height: 120px; }
.width-2dot5em { width: 2.5em; }
.height-1dot25em { height: 1.25em; }
.width-31px { width: 31px; }
.height-31px { height: 31px; }
.fs-0dot8rem { font-size: 0.8rem; }
.max-width-180px { max-width: 180px; }
.fs-4rem { font-size: 4rem; }
.z-index-1060 { z-index: 1060; }
.width-25pct { width: 25%; }
.width-15pct { width: 15%; }
.width-20pct { width: 20%; }
.width-5pct { width: 5%; }
.min-width-250px { min-width: 250px; }
.width-10pct { width: 10%; }
.z-index-5 { z-index: 5; }
.width-8px { width: 8px; }
.height-300px { height: 300px; }
.fs-2rem { font-size: 2rem; }
.height-6px { height: 6px; }
.fs-0dot95rem { font-size: 0.95rem; }
.max-width-400px { max-width: 400px; }
.width-72px { width: 72px; }
.height-72px { height: 72px; }
.fs-1dot8rem { font-size: 1.8rem; }
.max-height-600px { max-height: 600px; }
.width-1dot25rem { width: 1.25rem; }
.height-1dot25rem { height: 1.25rem; }
.width-45px { width: 45px; }
.height-45px { height: 45px; }
.width-60px { width: 60px; }
.fs-1dot5rem { font-size: 1.5rem; }
.min-width-200px { min-width: 200px; }
.width-45pct { width: 45%; }
.text-hex-212529 { color: #212529 !important; }
.fs-1dot1em { font-size: 1.1em; }
.cursor-help { cursor: help; }
.fs-0dot9rem { font-size: 0.9rem; }
.text-hex-666 { color: #666; }
.bg-hex-0d6efd { background-color: #0d6efd; }
.text-white { color: white; }
.width-16px { width: 16px; }
.height-16px { height: 16px; }
.fs-11px { font-size: 11px; }
.width-55pct { width: 55%; }
.height-140px { height: 140px; }
.fs-3rem { font-size: 3rem; }
.max-width-100pct { max-width: 100%; }
.width-30pct { width: 30%; }
.width-4px { width: 4px; }
.fs-0dot5rem { font-size: 0.5rem; }
.height-100px { height: 100px; }
.max-height-100pct { max-height: 100%; }
.height-250px { height: 250px; }
.width-3em { width: 3em; }
.height-1dot5em { height: 1.5em; }
.height-24px { height: 24px; }
.min-width-180px { min-width: 180px; }
.text-hex-0ea5e9 { color: #0ea5e9; }
.text-hex-f43f5e { color: #f43f5e; }
.text-hex-10b981 { color: #10b981; }
.min-width-60px { min-width: 60px; }
.max-height-500px { max-height: 500px; }
.width-12px { width: 12px; }
.width-10px { width: 10px; }
.height-10px { height: 10px; }
.width-2dot5rem { width: 2.5rem; }
.width-200px { width: 200px; }
.fs-1dot2rem { font-size: 1.2rem; }
.width-100px { width: 100px; }
