/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f5f7fb;
    color: #172033;
    overflow-x: hidden;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

/* =========================================================
   APP
   ========================================================= */

.app-wrapper {
    min-height: 100vh;
    display: flex;
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.app-sidebar {
    width: 255px;
    min-width: 255px;
    min-height: 100vh;
    background:
        linear-gradient(
            180deg,
            #111827 0%,
            #182235 100%
        );
    color: #fff;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow:
        8px 0 30px rgba(0, 0, 0, .08);
}

/* =========================================================
   LOGO
   ========================================================= */

.app-logo {
    padding: 25px 22px;
    border-bottom:
        1px solid rgba(255, 255, 255, .08);
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #4f46e5
        );

    color: #fff;
    font-size: 22px;

    box-shadow:
        0 8px 20px rgba(37, 99, 235, .35);
}

.logo-text strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.3px;
}

.logo-text small {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    margin-top: 2px;
}

/* =========================================================
   MENU
   ========================================================= */

.sidebar-menu {
    padding: 20px 14px;
    flex: 1;
}

.menu-label {
    padding: 0 10px;
    margin-bottom: 8px;

    color: #64748b;
    font-size: 10px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-item {
    width: 100%;
    min-height: 48px;

    border: 0;
    border-radius: 12px;

    background: transparent;
    color: #cbd5e1;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 0 13px;
    margin-bottom: 5px;

    text-decoration: none;

    font-size: 13px;
    font-weight: 600;

    transition: all .2s ease;
}

.menu-item i {
    width: 22px;
    text-align: center;
    font-size: 18px;
}

.menu-item:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
    transform: translateX(2px);
}

.menu-item.active {
    color: #fff;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #4f46e5
        );

    box-shadow:
        0 8px 20px rgba(37, 99, 235, .25);
}

/* =========================================================
   SIDEBAR FOOTER
   ========================================================= */

.sidebar-footer {
    padding: 16px;
    border-top:
        1px solid rgba(255, 255, 255, .08);
}

.user-mini {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 38px;
    height: 38px;

    border-radius: 11px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #334155,
            #475569
        );

    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.user-mini-info {
    min-width: 0;
    flex: 1;
}

.user-mini-info strong {
    display: block;
    color: #fff;
    font-size: 12px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-mini-info small {
    display: block;
    color: #94a3b8;
    font-size: 10px;
    margin-top: 2px;
}

/* =========================================================
   MAIN
   ========================================================= */

.app-main {
    width: calc(100% - 255px);
    margin-left: 255px;
    min-height: 100vh;
}

/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {
    height: 76px;
    padding: 0 30px;

    background: rgba(255, 255, 255, .92);

    border-bottom:
        1px solid #e8ebf0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    position: sticky;
    top: 0;
    z-index: 900;

    backdrop-filter: blur(15px);
}

.topbar-title strong {
    display: block;
    font-size: 17px;
    font-weight: 800;
    color: #172033;
}

.topbar-title small {
    color: #64748b;
    font-size: 11px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-button {
    width: 40px;
    height: 40px;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    background: #fff;
    color: #475569;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: all .2s ease;
}

.topbar-button:hover {
    color: #2563eb;
    border-color: #bfdbfe;
    background: #eff6ff;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 9px;

    padding-left: 8px;
}

.topbar-user .avatar {
    width: 40px;
    height: 40px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #4f46e5
        );
}

/* =========================================================
   CONTENT
   ========================================================= */

.app-content {
    padding: 30px;
    max-width: 1500px;
    margin: 0 auto;
}

/* =========================================================
   WELCOME
   ========================================================= */

.welcome-card {
    position: relative;
    overflow: hidden;

    border-radius: 22px;

    padding: 30px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            #1d4ed8 0%,
            #4338ca 100%
        );

    box-shadow:
        0 18px 40px rgba(37, 99, 235, .20);

    margin-bottom: 25px;
}

.welcome-card::before {
    content: '';
    position: absolute;

    width: 260px;
    height: 260px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, .07);

    right: -70px;
    top: -120px;
}

.welcome-card::after {
    content: '';
    position: absolute;

    width: 180px;
    height: 180px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, .05);

    right: 100px;
    bottom: -110px;
}

.welcome-content {
    position: relative;
    z-index: 2;
}

.welcome-content small {
    opacity: .82;
    font-size: 12px;
}

.welcome-content h1 {
    margin: 7px 0 5px;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.7px;
}

.welcome-content p {
    margin: 0;
    opacity: .85;
    font-size: 13px;
}

.company-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin-top: 17px;

    padding: 8px 12px;

    border-radius: 9px;

    background:
        rgba(255, 255, 255, .13);

    font-size: 11px;
    font-weight: 600;
}

/* =========================================================
   SECTION TITLE
   ========================================================= */

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 14px;
}

.section-heading h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #172033;
}

.section-heading span {
    color: #94a3b8;
    font-size: 11px;
}

/* =========================================================
   MAIN ACTION CARDS
   ========================================================= */

.action-card {
    height: 100%;
    min-height: 190px;

    border: 1px solid #e7eaf0;
    border-radius: 20px;

    background: #fff;

    padding: 24px;

    text-decoration: none;
    color: inherit;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    position: relative;
    overflow: hidden;

    box-shadow:
        0 8px 25px rgba(15, 23, 42, .045);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

.action-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 18px 35px rgba(15, 23, 42, .09);

    border-color: #dbe3f0;
}

.action-card-main {
    min-height: 235px;
}

.action-icon {
    width: 58px;
    height: 58px;

    border-radius: 17px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 26px;

    margin-bottom: 18px;
}

.action-icon.vender {
    background: #dbeafe;
    color: #2563eb;
}

.action-icon.cobranca {
    background: #dcfce7;
    color: #16a34a;
}

.action-icon.produtos {
    background: #fef3c7;
    color: #d97706;
}

.action-icon.clientes {
    background: #ede9fe;
    color: #7c3aed;
}

.action-card h3 {
    margin: 0 0 7px;

    color: #172033;
    font-size: 17px;
    font-weight: 800;
}

.action-card p {
    margin: 0;

    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
}

.action-arrow {
    position: absolute;
    right: 20px;
    bottom: 20px;

    width: 35px;
    height: 35px;

    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f8fafc;
    color: #64748b;

    transition: all .2s ease;
}

.action-card:hover .action-arrow {
    background: #eff6ff;
    color: #2563eb;
    transform: translateX(3px);
}

/* =========================================================
   QUICK STATS
   ========================================================= */

.quick-card {
    border: 1px solid #e7eaf0;
    border-radius: 16px;

    background: #fff;

    padding: 18px;

    box-shadow:
        0 6px 20px rgba(15, 23, 42, .035);
}

.quick-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 13px;
}

.quick-icon {
    width: 38px;
    height: 38px;

    border-radius: 11px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f1f5f9;
    color: #475569;
}

.quick-card small {
    color: #94a3b8;
    font-size: 10px;
}

.quick-card strong {
    display: block;

    color: #172033;
    font-size: 20px;
    font-weight: 800;
}

/* =========================================================
   MOBILE MENU
   ========================================================= */

.mobile-bottom-menu {
    display: none;
}

.mobile-menu-item {
    flex: 1;

    border: 0;
    background: transparent;

    color: #94a3b8;

    padding: 7px 3px 5px;

    text-align: center;

    font-size: 9px;
    font-weight: 600;

    text-decoration: none;
}

.mobile-menu-item i {
    display: block;

    font-size: 20px;
    margin-bottom: 2px;
}

.mobile-menu-item.active {
    color: #2563eb;
}

/* =========================================================
   ACCESS DENIED
   ========================================================= */

.access-denied {
    min-height: 70vh;

    display: flex;
    align-items: center;
    justify-content: center;
}

.access-box {
    max-width: 450px;

    text-align: center;

    background: #fff;

    border-radius: 22px;

    padding: 40px;

    box-shadow:
        0 15px 40px rgba(15, 23, 42, .08);
}

.access-icon {
    width: 70px;
    height: 70px;

    border-radius: 20px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fee2e2;
    color: #dc2626;

    font-size: 30px;
}

.access-box h2 {
    font-size: 20px;
    font-weight: 800;
}

.access-box p {
    color: #64748b;
    font-size: 13px;
}

/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (max-width: 991px) {

    .app-sidebar {
        display: none;
    }

    .app-main {
        width: 100%;
        margin-left: 0;
        padding-bottom: 75px;
    }

    .topbar {
        height: 68px;
        padding: 0 16px;
    }

    .app-content {
        padding: 18px 15px;
    }

    .topbar-title strong {
        font-size: 15px;
    }

    .topbar-title small {
        display: none;
    }

    .topbar-user-info {
        display: none;
    }

    .mobile-bottom-menu {
        display: flex;

        position: fixed;

        left: 0;
        right: 0;
        bottom: 0;

        height: 66px;

        background: rgba(255, 255, 255, .96);

        border-top:
            1px solid #e8ebf0;

        box-shadow:
            0 -5px 25px rgba(15, 23, 42, .07);

        z-index: 2000;

        backdrop-filter: blur(15px);
    }

    .welcome-card {
        padding: 23px;
        border-radius: 18px;
    }

    .welcome-content h1 {
        font-size: 21px;
    }

    .action-card-main {
        min-height: 190px;
    }
}

@media (max-width: 575px) {

    .app-content {
        padding: 13px;
    }

    .welcome-card {
        margin-bottom: 20px;
    }

    .welcome-content h1 {
        font-size: 19px;
    }

    .section-heading {
        margin-top: 3px;
    }

    .action-card {
        min-height: 170px;
        padding: 20px;
    }

    .action-card-main {
        min-height: 190px;
    }

    .action-icon {
        width: 52px;
        height: 52px;
        font-size: 23px;
    }

    .action-card h3 {
        font-size: 15px;
    }

    .quick-card {
        padding: 15px;
    }
}


