/* Color Pallete */
:root {
    --deep-blue: #1e1f2a;
    --pale-blue: #f5f7fc;
    --ash-gray: #6c757d;
    --white: #ffffff;
    --gray: #f1f1f1;
    --red: #ef4444;
    --shadow-l: 0 2px 8px rgba(0,0,0,0.03);
    --shadow-d: 0 2px 8px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: var(--deep-blue);
}

ul {
    list-style: none;
}

h1 {font-size: 1.8rem; font-weight: 600;}

/* Componant */
/* Navigation Icon */
.icon-btn {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    position: relative;
    cursor: pointer;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-btn:hover {
    background: var(--gray );
}
.badge {
    position: absolute;
    top: 1px;
    right: 1px;
    background: var(--red);
    color: var(--pale-blue);
    font-size: 0.7rem;
    width: 1rem;
    height: 1rem;
    border-radius: 100rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User Dropdown */
.header-user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--gray);
    padding: 0.5rem 1rem;
    border-radius: 100rem;
    cursor: pointer;
}
.header-user-dropdown-btn i {
    color: var(--red);
}

/* Body Grid */
body {
    background-color: var(--pale-blue);
    font-family: "Inter", sans-serif;
    min-height: 100vh; 
    display: grid;
    grid-template-areas: 
    "sidebar header"
    "sidebar body"
    "sidebar footer";
    grid-template-columns: clamp(14rem, 2vw, 17rem) 1fr;
    grid-template-rows: auto 1fr auto;
    color: var(--deep-blue);
}

/* Aside */
.sidebar {
    grid-area: sidebar;
    background-color: var(--white);
    position: fixed;
    width: clamp(14rem, 2vw, 17rem);
    height: 100%;
    z-index: 100;
    box-shadow: var(--shadow-l);
    padding: 1.5rem;
}

/* Aside Header */
.aside-header, .aside-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}

.aside-header {
    border-bottom: 1px solid var(--ash-gray);
    padding-bottom: 1.5rem;
}

.aside-heading {
    display: flex;
    gap: 0.2rem;
    font-weight: 700;
    font-size: 1.5rem;
}

.aside-header i {
  font-size: 2rem;
  color: var(--red);
}

/* Aside Navigation */
.aside-nav {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 90%;
    opacity: 80%;
}

.aside-list, .aside-sublist {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.aside-link {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.aside-item:hover {
    background-color: var(--gray);
    padding: 0.5rem;
    border-radius: 100rem;
}

.aside-link i {
  font-size: clamp(1rem, 5vw, 1.5rem);
}

.aside-sublist {
    padding-left: 1.2rem;
}

/* Aside Footer */
.aside-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--ash-gray);
}

.aside-user-name{font-size: 1rem; font-weight: 600;}
.aside-user-role{font-size: 0.8rem;}
.aside-user-avatar {
  font-size: 1.8rem;
  color: var(--red);
  background-color: var(--pale-blue);
  border-radius: 0.5rem;
  padding: 0.5rem;
}

/* Collabsed Sidebar */
@media (max-width: 768px) {
    body {grid-template-columns: 6rem 1fr;}
    .sidebar {width: 6rem;}

    .aside-link span, .aside-user-info, .aside-head, .aside-collapse-toggle {
        display: none;
    }

    .aside-item:hover {
        padding: 0.3rem;
    }

    .aside-sublist {
    padding-left: 0rem;
    }
}

/* Header */
.header {
    grid-area: header;
    background-color: var(--white);
    box-shadow: var(--shadow);
    padding: 1rem 2.5rem;
    display: flex;
    justify-content: space-between;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.5rem, 2vw, 2rem);
}

/* Dashboard Body*/
.main {
    grid-area: body;
    padding: 2rem;
}

.grids-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.grid-1, .grid-2, .grid-3 {
    display: grid;
    gap: clamp(1rem, 2vw, 2rem);
}

.grid-1 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: 1fr;
}

.data-card{
    background-color: var(--white);
    padding: 1rem;
    border-radius: 1rem;
}

/* Stat Cards */
.stat-header {
    display: flex;
    justify-content: space-between;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-value {
    font-size: clamp(1rem, 2vw, 2rem);
    font-weight: 500;
}

@media (max-width: 768px) {
    .grid-1 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Copy-right Footer */
.footer {
    grid-area: footer;
    background-color: var(--white);
    padding: 0 2rem;
}