@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4318FF;
    --secondary-color: #A3AED0;
    --bg-color: #F4F7FE;
    --card-bg: #FFFFFF;
    --text-color: #2B3674;
    --sidebar-width: 280px;
    --shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.05);
}

/* RESET & BASE */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    height: 100vh;
    overflow: hidden;
}

/* DASHBOARD LAYOUT */
.dashboard-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    transition: all 0.3s ease;
    border-right: 1px solid #F0F0F0;
    z-index: 10;
}

.brand {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    text-transform: uppercase;
}

.menu {
    flex-grow: 1;
    overflow-y: auto;
}

.menu-label {
    font-size: 12px;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 15px;
    padding-left: 15px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 5px;
    transition: all 0.3s;
    font-weight: 500;
    gap: 12px;
    cursor: pointer;
}

.menu-item:hover,
.menu-item.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 5px 10px rgba(67, 24, 255, 0.2);
}

.menu-item i {
    width: 20px;
    text-align: center;
}

/* MAIN CONTENT */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.top-bar {
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.greeting h2 {
    font-size: 24px;
    margin: 0;
    font-weight: 700;
    color: var(--text-color);
}

.greeting p {
    color: var(--secondary-color);
    margin: 5px 0 0;
    font-size: 14px;
}

#content-area {
    padding: 0 40px 40px;
    overflow-y: auto;
    flex-grow: 1;
}

/* CARDS */
.card,
.glass-form {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    border: none;
}

/* TABLE STYLES */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 15px 20px;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 12px;
    text-transform: uppercase;
    border-bottom: 1px solid #E9EDF7;
}

td {
    padding: 15px 20px;
    font-size: 14px;
    color: var(--text-color);
    border-bottom: 1px solid #E9EDF7;
}

/* FORM ELEMENTS */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
}

.form-control,
input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #E0E5F2;
    border-radius: 12px;
    background: #FFF;
    color: var(--text-color);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s;
    outline: none;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 24, 255, 0.1);
}

input::placeholder {
    color: #A3AED0;
}

/* BUTTONS */
.btn {
    padding: 10px 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(67, 24, 255, 0.3);
}

.btn-primary:hover {
    background: #3311db;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #EFF4FB;
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: #E0E5F2;
}

.btn-danger {
    background: #EE5D50;
    color: white;
}

/* UTILITIES */
.sub-badge {
    display: inline-block;
    background: #EFF4FB;
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* RESPONSIVE */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        height: 100%;
        box-shadow: var(--shadow);
    }

    .sidebar.active {
        left: 0;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 20px;
        padding-left: 70px;
    }

    .dashboard-container {
        display: block;
    }
}