/**
 * File: public/css/style.css
 * Tema: Modern & Clean CRM Relawan MZFK
 */

:root {
    /* Color Palette */
    --primary-color: #1e293b;     /* Navy Dark */
    --secondary-color: #10b981;   /* Emerald Green */
    --accent-color: #f59e0b;      /* Amber */
    --danger-color: #ef4444;      /* Rose */
    --bg-body: #f1f5f9;           /* Slate Light */
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    /* Layout Sizes */
    --sidebar-width: 260px;
    --header-height: 70px;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout Wrapper */
.main-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-color);
    color: #cbd5e1;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header h3 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.sidebar-menu {
    flex: 1;
    list-style: none;
    padding: 1rem 0.75rem;
}

.sidebar-menu li {
    margin-bottom: 0.25rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-menu a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.sidebar-menu li.active a {
    background-color: var(--secondary-color);
    color: #fff;
}

.logout-item {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Main Content Area */
.content-area {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevent flex shrink issues */
}

/* Top Navigation */
.top-nav {
    height: var(--header-height);
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 900;
}

.system-name {
    font-weight: 600;
    color: var(--text-muted);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    background-color: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary-color);
}

/* Page Content */
.main-content {
    padding: 2rem;
    flex: 1;
}

/* Components: Card & Stats */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Buttons */
.btn-primary {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s;
}

.btn-primary:hover {
    filter: brightness(0.9);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .content-area {
        margin-left: 0;
    }
}