/* Business Management System - Modern Design (Coursue Style) */

/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Colors */
    --primary-color: #6C5DD3;
    --primary-light: #CFC8FF;
    --primary-dark: #3f3cbb;
    --secondary-color: #A098AE;
    --bg-color: #F2F4F8; /* Light Gray-Blue Background */
    --surface-color: #FFFFFF;
    --text-primary: #1F2937;
    --text-secondary: #A098AE;
    --success-color: #00BA88;
    --danger-color: #FF4D4D;
    
    /* Layout */
    --sidebar-width: 280px;
    --header-height: 80px;
    --border-radius: 20px;
    --border-radius-sm: 12px;
    
    /* Shadows */
    --shadow-soft: 0 10px 40px rgba(29, 22, 23, 0.05); /* very soft shadow */
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    font-size: 0.95rem;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-primary);
}

a {
    text-decoration: none;
}

/* ==================
   Sidebar Styles 
   ================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--surface-color);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
    /* No border, just whitespace or subtle shadow if needed */
    /* box-shadow: 4px 0 30px rgba(0,0,0,0.02); */
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3rem;
    padding: 0 0.5rem;
}

.sidebar-brand i {
    color: var(--surface-color);
    background: var(--primary-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.25rem;
}

.nav-section {
    font-size: 0.75rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding-left: 1rem;
    font-weight: 600;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1rem;
    color: var(--secondary-color);
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
}

.nav-link i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.25rem;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(108, 93, 211, 0.05); /* very light purple */
}

.nav-link.active {
    background-color: var(--primary-color);
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(108, 93, 211, 0.3);
}

.nav-link.active i {
    color: #fff;
}

/* ==================
   Main Content 
   ================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 0 2rem 2rem 2rem;
}

/* ==================
   Header 
   ================== */
.main-header {
    height: var(--header-height);
    background: transparent; /* Transparent header on light bg */
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-top: 1.5rem;
}

.search-form {
    background: var(--surface-color);
    border-radius: 30px; /* Pill shape */
    padding: 0.5rem 1.5rem;
    width: 400px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-card);
}

.search-form i {
    color: var(--secondary-color);
    margin-right: 10px;
}

.search-form input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.search-form input::placeholder {
    color: var(--secondary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%; /* Circle */
    background: var(--surface-color);
    border: none;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s;
    position: relative;
}

.header-btn:hover {
    transform: translateY(-2px);
    color: var(--primary-color);
}

/* User Profile in Header */
.user-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-color);
    padding: 0.5rem 0.75rem 0.5rem 1.5rem; /* Pill shape */
    border-radius: 40px;
    box-shadow: var(--shadow-card);
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    text-align: right;
    margin-right: 8px;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
}

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

/* ==================
   Cards & Content 
   ================== */
.card {
    background: var(--surface-color);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-header {
    background: transparent;
    border-bottom: none;
    padding: 0 0 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.card-body {
    padding: 0;
}

/* Stat Cards specific */
.stat-card {
    position: relative;
    overflow: hidden;
}

/* Buttons */
.btn {
    border-radius: 12px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    box-shadow: none;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 14px rgba(108, 93, 211, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 93, 211, 0.6);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: var(--secondary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.table td {
    padding: 1rem 0;
    vertical-align: middle;
    border-bottom: 1px solid #f5f5f5;
    color: var(--text-primary);
    font-weight: 500;
}

/* Inputs / Forms */
.form-control, .form-select {
    border: 2px solid #F0F0F0;
    background-color: #FAFCFE;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(108, 93, 211, 0.1);
    background-color: #fff;
}

/* Badges */
.badge {
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-weight: 500;
}

.bg-primary { background-color: var(--primary-color) !important; }

/* Dashboard Specific Overrides */

/* Hero Section (if added later) */
.hero-card {
    background: linear-gradient(135deg, #6C5DD3 0%, #8B80F9 100%);
    color: white;
}

.hero-card * {
    color: white;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
    background-color: #eee;
    border-radius: 3px;
}

/* Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 0;
}
.breadcrumb-item.active {
    color: var(--secondary-color);
}

/* Footer Adjustments */
footer {
    padding-top: 2rem;
    color: var(--secondary-color);
    font-size: 0.85rem;
}
