@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #7047eb;
    --primary-dark: #5933ca;
    --primary-light: #f0ebff;
    --background: #f7f7fb;
    --surface: #ffffff;
    --text: #25243a;
    --muted: #89889a;
    --border: #ececf2;
    --sidebar-width: 250px;
    --radius: 16px;
    --shadow: 0 5px 20px rgba(35, 28, 70, .045);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-container {
    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 26px 17px 18px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform .3s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px;
    margin-bottom: 43px;
}

.brand-icon {
    width: 43px;
    height: 43px;
    background: linear-gradient(135deg, #7047eb, #9a79f7);
    color: white;
    border-radius: 13px;
    display: grid;
    place-items: center;
    box-shadow: 0 5px 12px rgba(112, 71, 235, .25);
}

.brand-icon svg {
    width: 23px;
    height: 23px;
}

.brand-text h2 {
    font-size: 19px;
    letter-spacing: -.7px;
    font-weight: 800;
}

.brand-text h2 span {
    color: var(--primary);
}

.brand-text small {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .8px;
}

.sidebar-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.1px;
    color: #a3a2b1;
    padding: 0 12px;
    margin-bottom: 12px;
}

.category-label {
    margin-top: 35px;
}

.navigation {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 13px;
    border-radius: 10px;
    text-decoration: none;
    color: #777689;
    font-size: 13px;
    font-weight: 500;
    transition: .2s;
}

.nav-item svg {
    width: 18px;
    height: 18px;
}

.nav-item:hover {
    background: #f7f5ff;
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

.sidebar-bottom {
    margin-top: auto;
}

.sidebar-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 10px;
    background: #f8f7fc;
    border-radius: 12px;
}

.info-icon {
    width: 35px;
    height: 35px;
    background: white;
    color: var(--primary);
    display: grid;
    place-items: center;
    border-radius: 9px;
}

.info-icon svg {
    width: 18px;
}

.sidebar-info strong {
    display: block;
    font-size: 11px;
}

.sidebar-info small {
    display: block;
    color: var(--muted);
    font-size: 9px;
    margin-top: 4px;
}

.sidebar-version {
    text-align: center;
    font-size: 10px;
    color: #aaa9b7;
    margin-top: 18px;
}

/* MAIN */

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.topbar {
    height: 72px;
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 42px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 17px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
}

.breadcrumb svg {
    width: 14px;
}

.breadcrumb strong {
    color: var(--text);
}

.local-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #737285;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #2dbb78;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #e7f8ef;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #eee9ff;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
}

/* CONTENT */

.content-wrapper {
    max-width: 1450px;
    margin: auto;
    padding: 35px 42px;
}

/* WELCOME */

.welcome-section {
    min-height: 225px;
    border-radius: 20px;
    padding: 38px 42px;
    background: linear-gradient(110deg, #f0ebff, #f8f6ff 65%, #e9e4ff);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-content {
    position: relative;
    z-index: 2;
    max-width: 620px;
}

.eyebrow,
.section-eyebrow {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.3px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 17px;
}

.eyebrow svg {
    width: 15px;
}

.welcome-section h1 {
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: -1.5px;
    line-height: 1.2;
    margin-bottom: 13px;
}

.welcome-section h1 span {
    color: var(--primary);
}

.welcome-section p {
    color: #77748e;
    font-size: 13px;
    line-height: 1.8;
    max-width: 510px;
}

/* ILUSTRAÇÃO */

.welcome-illustration {
    position: relative;
    width: 240px;
    height: 175px;
    margin-right: 35px;
}

.illustration-center {
    position: absolute;
    width: 85px;
    height: 85px;
    border-radius: 25px;
    background: linear-gradient(135deg, #7047eb, #a38af5);
    color: white;
    display: grid;
    place-items: center;
    left: 78px;
    top: 45px;
    transform: rotate(-8deg);
    box-shadow: 0 15px 30px rgba(112, 71, 235, .25);
}

.illustration-center svg {
    width: 38px;
    height: 38px;
}

.illustration-card {
    position: absolute;
    width: 52px;
    height: 52px;
    background: white;
    border-radius: 14px;
    display: grid;
    place-items: center;
    box-shadow: 0 7px 20px rgba(50, 35, 100, .1);
}

.illustration-card svg {
    width: 23px;
}

.card-one {
    top: 15px;
    left: 30px;
    color: #4387ed;
    transform: rotate(-12deg);
}

.card-two {
    right: 15px;
    top: 25px;
    color: #20a978;
    transform: rotate(12deg);
}

.card-three {
    bottom: 4px;
    left: 40px;
    color: #e49a37;
    transform: rotate(10deg);
}

/* SEARCH */

.search-section {
    margin: 27px 0;
}

.search-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    height: 52px;
    display: flex;
    align-items: center;
    padding: 0 17px;
    gap: 12px;
    box-shadow: var(--shadow);
}

.search-box>svg {
    width: 19px;
    color: #9998a9;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 12px;
    min-width: 0;
}

.search-box input::placeholder {
    color: #aaa9b8;
}

.search-shortcut {
    color: #a4a3b0;
    font-size: 10px;
    background: #f7f7fa;
    padding: 6px 10px;
    border-radius: 6px;
}

/* STATS */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 17px;
    margin-bottom: 42px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 19px;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 43px;
    height: 43px;
    border-radius: 12px;
    display: grid;
    place-items: center;
}

.stat-icon svg {
    width: 20px;
}

.stat-icon.purple {
    color: #7650e9;
    background: #f0ebff;
}

.stat-icon.blue {
    color: #4287ed;
    background: #eaf2ff;
}

.stat-icon.green {
    color: #21a979;
    background: #e7f8f1;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin-bottom: 5px;
}

.stat-card strong {
    font-size: 23px;
    font-weight: 800;
}

/* SECTION HEADER */

.applications-section,
.favorites-section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 23px;
}

.section-header h2 {
    font-size: 20px;
    letter-spacing: -.7px;
    margin-top: 7px;
}

.section-header p {
    color: var(--muted);
    font-size: 11px;
    margin-top: 7px;
}

.view-actions {
    color: var(--muted);
    font-size: 11px;
}

/* APP GRID */

.applications-grid,
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

.app-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 20px;
    min-height: 180px;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s, border-color .2s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.app-card:hover {
    transform: translateY(-4px);
    border-color: #d8cdfd;
    box-shadow: 0 12px 28px rgba(45, 35, 90, .09);
}

.app-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 17px;
}

.app-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
}

.app-icon svg {
    width: 24px;
    height: 24px;
}

.app-icon.purple {
    background: #f0ebff;
    color: #7047eb;
}

.app-icon.blue {
    background: #eaf2ff;
    color: #4387ed;
}

.app-icon.green {
    background: #e5f8f0;
    color: #1eaa77;
}

.app-icon.orange {
    background: #fff2e4;
    color: #e69a3e;
}

.app-icon.red {
    background: #ffeded;
    color: #e35d67;
}

.app-icon.cyan {
    background: #e5f7fa;
    color: #28a6bb;
}

.app-icon.pink {
    background: #ffedf5;
    color: #d95e99;
}

.app-icon.dark {
    background: #efeff3;
    color: #54546b;
}

.favorite-btn {
    border: none;
    background: transparent;
    color: #c7c6d0;
    padding: 5px;
    transition: .2s;
}

.favorite-btn svg {
    width: 17px;
    height: 17px;
}

.favorite-btn:hover,
.favorite-btn.active {
    color: #f0ae36;
}

.favorite-btn.active svg {
    fill: #f0ae36;
}

.app-card h3 {
    font-size: 14px;
    margin-bottom: 7px;
    letter-spacing: -.2px;
}

.app-card p {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 17px;
    flex: 1;
}

.app-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f1f0f5;
    padding-top: 13px;
}

.app-category {
    color: #9291a2;
    font-size: 9px;
}

.open-app {
    border: none;
    background: #f3efff;
    color: var(--primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: .2s;
}

.open-app:hover {
    background: var(--primary);
    color: white;
}

.open-app svg {
    width: 13px;
    height: 13px;
}

/* FAVORITES */

.favorites-empty {
    grid-column: 1 / -1;
    background: white;
    border: 1px dashed #ddd9e9;
    border-radius: 14px;
    padding: 28px;
    text-align: center;
    color: var(--muted);
}

.favorites-empty svg {
    width: 27px;
    margin-bottom: 10px;
    color: #b6a5ec;
}

.favorites-empty p {
    font-size: 12px;
    margin-bottom: 5px;
}

.favorites-empty small {
    font-size: 10px;
}

/* EMPTY STATE */

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--muted);
}

.empty-state svg {
    width: 35px;
    margin-bottom: 12px;
}

.empty-state h3 {
    font-size: 14px;
    color: var(--text);
    margin-bottom: 7px;
}

.empty-state p {
    font-size: 11px;
}

/* FOOTER */

.footer {
    border-top: 1px solid var(--border);
    padding: 23px 0 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer strong {
    display: block;
    font-size: 11px;
    margin-bottom: 5px;
}

.footer span {
    color: var(--muted);
    font-size: 10px;
}

.footer-version {
    color: #aaa9b7;
}

[hidden] {
    display: none !important;
}

/* RESPONSIVO */

@media (max-width: 1100px) {

    .applications-grid,
    .favorites-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .welcome-illustration {
        margin-right: 0;
    }
}

@media (max-width: 800px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0, 0, 0, .08);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .topbar {
        padding: 0 20px;
    }

    .content-wrapper {
        padding: 25px 20px;
    }

    .welcome-section {
        padding: 30px;
    }

    .welcome-illustration {
        transform: scale(.8);
        transform-origin: center right;
        margin-left: -20px;
    }
}

@media (max-width: 600px) {
    .welcome-illustration {
        display: none;
    }

    .welcome-section {
        min-height: 190px;
        padding: 27px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .applications-grid,
    .favorites-grid {
        grid-template-columns: 1fr;
    }

    .content-wrapper {
        padding: 20px 15px;
    }

    .topbar {
        height: 62px;
        padding: 0 15px;
    }

    .local-status {
        display: none;
    }

    .breadcrumb {
        font-size: 11px;
    }

    .search-shortcut {
        display: none;
    }

    .footer {
        gap: 15px;
    }
}