/* public/css/style.css */

:root {
    --primary-color: #5B3FD8;
    --primary-light: #7E65ED;
    --primary-dark: #452eb8;
    --bg-color: #F8F9FA;
    --card-bg: #FFFFFF;
    --text-main: #333333;
    --text-muted: #888888;
    --sidebar-width: 260px;
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(91, 63, 216, 0.08);
    --shadow-hover: 0 8px 30px rgba(91, 63, 216, 0.15);
}

body {
    background-color: var(--bg-color);
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
}

/* Sidebar */
#sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    transition: all 0.3s;
    overflow-y: auto;
    color: white;
}

#sidebar .sidebar-header {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#sidebar .sidebar-header h3 {
    color: #ffffff;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: 1px;
}

#sidebar ul.components {
    padding: 25px 15px;
}

#sidebar ul li a {
    padding: 12px 18px;
    font-size: 1rem;
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
    margin-bottom: 6px;
}

#sidebar ul li a i {
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
    transition: transform 0.3s ease;
}

#sidebar ul li a:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.1);
    transform: translateX(4px);
}

#sidebar ul li.active > a {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    box-shadow: 0 4px 15px rgba(91, 63, 216, 0.4);
    font-weight: 600;
}

#sidebar ul li.active > a i {
    transform: scale(1.1);
}

#sidebar ul li.category {
    padding: 15px 15px 8px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    letter-spacing: 1.5px;
}

/* Page Content */
#content {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 12px 24px;
    margin: 15px 30px 25px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 15px;
    z-index: 999;
    transition: all 0.3s ease;
}

.topbar .user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.topbar .user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

/* Cards */
.saas-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 24px;
    overflow: hidden;
}

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

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

.card-body-soft {
    padding: 24px;
}

/* Stat Widgets */
.stat-widget {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border-radius: var(--border-radius-lg);
    background: var(--card-bg);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.stat-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
}

.stat-widget.danger::before { background: #dc3545; }
.stat-widget.warning::before { background: #ffc107; }
.stat-widget.success::before { background: #198754; }

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.primary { background: linear-gradient(135deg, var(--primary-light), var(--primary-color)); }
.stat-icon.danger { background: linear-gradient(135deg, #ff6b6b, #dc3545); }
.stat-icon.warning { background: linear-gradient(135deg, #ffd93d, #ffc107); }
.stat-icon.success { background: linear-gradient(135deg, #51cf66, #198754); }

.stat-details h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
}

.stat-details p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Buttons */
.btn-primary-soft {
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    padding: 10px 20px;
    border: none;
    transition: 0.2s;
}
.btn-primary-soft:hover {
    background: var(--primary-dark);
    color: white;
    box-shadow: 0 4px 12px rgba(91, 63, 216, 0.3);
}

/* Badges */
.badge-soft-success { background: rgba(25, 135, 84, 0.1); color: #198754; }
.badge-soft-warning { background: rgba(255, 193, 7, 0.1); color: #ffc107; }
.badge-soft-danger { background: rgba(220, 53, 69, 0.1); color: #dc3545; }

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
    margin-bottom: 0;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    height: 100%;
    width: 2px;
    background: #e9ecef;
}
.timeline-item {
    position: relative;
    margin-bottom: 20px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 2px rgba(91,63,216,0.2);
}

/* Utilities */
.main-content {
    padding: 30px;
    flex: 1;
}

@media (max-width: 768px) {
    #sidebar {
        margin-left: calc(var(--sidebar-width) * -1);
    }
    #sidebar.active {
        margin-left: 0;
    }
    #content {
        width: 100%;
        margin-left: 0;
    }
}

/* Authentication Page */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
}
.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    display: flex;
}
.auth-img {
    flex: 1;
    background: url('https://images.unsplash.com/photo-1579684385127-1ef15d508118?auto=format&fit=crop&q=80&w=600') center/cover;
    display: none;
}
@media (min-width: 768px) {
    .auth-img { display: block; }
}
.auth-form {
    flex: 1;
    padding: 50px;
}
