
:root {
    --primary: #a45c75;
    --primary-dark: #85445c;
    --primary-light: #f8edf1;

    --background: #f8f7f8;
    --surface: #ffffff;

    --text: #33272c;
    --muted: #8c7d83;
    --border: #eee8eb;

    --sidebar-width: 260px;
}

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

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
}

button {
    font-family: inherit;
}

.app-container {
    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    padding: 27px 18px 18px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
    margin-bottom: 48px;
}

.brand-logo {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-family: Georgia, serif;
    font-size: 19px;
}

.sidebar-brand h2 {
    font-family: Georgia, serif;
    font-weight: normal;
    font-size: 17px;
}

.sidebar-brand span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 2px;
}

.sidebar-section {
    margin-bottom: 32px;
}

.section-label {
    display: block;
    margin: 0 12px 13px;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1.5px;
    color: #aa9ba1;
}

.main-navigation {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: #75676d;
    font-size: 13px;
    transition: 0.2s;
}

.nav-link:hover {
    background: #faf4f6;
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: bold;
}

.nav-icon {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

/* USER AREA */

.sidebar-bottom {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 5px 15px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: bold;
    font-size: 12px;
}

.user-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-info strong {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-info span {
    font-size: 10px;
    color: var(--muted);
    text-transform: capitalize;
}

.logout-button {
    width: 100%;
    padding: 11px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: #a45c75;
    text-align: left;
    cursor: pointer;
    font-size: 12px;
}

.logout-button:hover {
    background: var(--primary-light);
}

/* MAIN CONTENT */

.main-content {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 70px;
    padding: 0 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
}

.breadcrumb strong {
    color: var(--text);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--muted);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #35ae77;
}

.menu-toggle {
    display: none;
    border: none;
    background: none;
    font-size: 23px;
    cursor: pointer;
    color: var(--text);
}

.content-wrapper {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 38px;
    flex: 1;
}

/* WELCOME */

.welcome-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}

.welcome-label {
    color: var(--primary);
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;
}

.welcome-section h1 {
    margin-top: 10px;
    font-size: 25px;
    font-weight: 600;
}

.welcome-section p {
    margin-top: 9px;
    font-size: 13px;
    color: var(--muted);
}

.welcome-date {
    color: var(--muted);
    font-size: 12px;
}

/* METRICS */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 38px;
}

.metric-card {
    padding: 22px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 0;
}

.metric-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.metric-icon {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: 17px;
}

.metric-icon.purple {
    color: #8663ad;
    background: #f2edfa;
}

.metric-icon.green {
    color: #39966e;
    background: #eaf6f0;
}

.metric-icon.blue {
    color: #5183b7;
    background: #edf4fa;
}

.metric-icon.orange {
    color: #bd8744;
    background: #faf2e7;
}

.metric-value {
    display: block;
    margin-top: 19px;
    font-size: 29px;
    font-weight: 600;
}

.metric-description {
    display: block;
    margin-top: 7px;
    font-size: 11px;
    color: var(--muted);
}

/* SECTIONS */

.dashboard-section {
    margin-bottom: 36px;
}

.section-heading {
    margin-bottom: 18px;
}

.section-heading h2 {
    font-size: 17px;
}

.section-heading p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

/* QUICK ACTIONS */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: white;
    text-align: left;
    cursor: pointer;
    transition: 0.2s;
}

.action-card:hover {
    border-color: #d6a5b7;
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(80, 42, 58, 0.05);
}

.action-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 22px;
}

.action-card strong {
    font-size: 13px;
}

.action-card > span:last-child {
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
}

/* ACTIVITY */

.activity-container {
    background: white;
    border: 1px solid var(--border);
    border-radius: 11px;
    overflow: hidden;
}

.activity-list {
    padding: 5px 20px;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-description {
    font-size: 12px;
}

.activity-reason {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
}

.activity-quantity {
    font-weight: bold;
    font-size: 12px;
    white-space: nowrap;
}

.quantity-positive {
    color: #39966e;
}

.quantity-negative {
    color: #c45b67;
}

.activity-date {
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}

.empty-state {
    padding: 28px;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

/* FOOTER */

.main-footer {
    display: flex;
    justify-content: space-between;
    padding: 20px 38px;
    border-top: 1px solid var(--border);
    background: white;
    color: var(--muted);
    font-size: 10px;
}

/* MOBILE */

.sidebar-overlay {
    display: none;
}

@media (max-width: 1100px) {

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

}

@media (max-width: 850px) {

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 90;
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .topbar {
        padding: 0 20px;
        gap: 15px;
    }

    .content-wrapper {
        padding: 27px 20px;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .main-footer {
        padding: 18px 20px;
    }

}

@media (max-width: 520px) {

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

    .welcome-section {
        align-items: flex-start;
        flex-direction: column;
    }

    .welcome-section h1 {
        font-size: 21px;
    }

    .breadcrumb {
        font-size: 10px;
    }

    .topbar-right {
        font-size: 0;
    }

    .activity-item {
        flex-wrap: wrap;
    }

}
