/*
 * 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 */
    --sidebar-bg: #ffffff;
    --content-bg: #f8fafc;      /* Very Light Slate */
    
    --primary-color: #0ea5e9;   /* Sky 500 */
    --primary-light: #e0f2fe;   /* Sky 50 */
    
    --text-main: #1e293b;       /* Slate 800 */
    --text-muted: #64748b;      /* Slate 500 */
    --text-light: #94a3b8;      /* Slate 400 */
    
    --border-color: #f1f5f9;    /* Slate 100 */
    
    /* Layout */
    --sidebar-width: 280px;
    --sidebar-margin: 20px;
    --header-height: 80px;
    
    /* UI */
    --radius-sidebar: 30px;
    --radius-card: 24px;
    --radius-btn: 12px;
    
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.05);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px 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: calc(100vh - (2 * var(--sidebar-margin))); /* Margin top/bottom */
    background-color: var(--sidebar-bg);
    
    position: fixed;
    top: var(--sidebar-margin);
    left: var(--sidebar-margin);
    z-index: 1000;
    
    border-radius: var(--radius-sidebar);
    box-shadow: var(--shadow-soft);
    
    display: flex;
    flex-direction: column;
    overflow: hidden; /* For rounded corners */
}

/* --- 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 20px;
    overflow-y: auto;
    /* Hide scrollbar */
    scrollbar-width: none; 
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    margin: 20px 10px 10px 10px;
    letter-spacing: 0.05em;
}

.list-group-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: var(--radius-btn);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    background: transparent;
}

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

/* Hover State */
.list-group-item:hover {
    background-color: #f1f5f9; /* Slate 100 */
    color: var(--text-main);
}
.list-group-item:hover i {
    color: var(--text-muted);
}

/* Active State (WICHTIG) */
.list-group-item.active {
    background-color: var(--primary-light) !important; /* Pastel Blue */
    color: var(--primary-color) !important; /* Cyan Text */
}

.list-group-item.active i {
    color: var(--primary-color) !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: calc(var(--sidebar-width) + (2 * var(--sidebar-margin))); /* Sidebar + Margins */
    padding: var(--sidebar-margin);
    display: flex;
    flex-direction: column;
}

/* 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: none;
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    overflow: hidden;
}

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

.card-body { padding: 24px; }

/* Buttons */
.btn {
    border-radius: var(--radius-btn);
    font-weight: 600;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.btn-primary { background-color: var(--primary-color); color: #fff; }
.btn-primary:hover { background-color: #0284c7; }

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

/* --- 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: 38px; /* Below label */
    color: var(--text-light);
}

.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;
}
