:root {

    --primary: #6c5ce7;
    --primary-dark: #5649c7;

    --secondary: #00b894;

    --danger: #d63031;
    --warning: #fdcb6e;
    --info: #0984e3;

    --dark: #1e272e;
    --dark-secondary: #2f3640;

    --light: #f5f6fa;
    --white: #ffffff;

    --text: #2d3436;
    --muted: #636e72;

    --border: #dfe6e9;

    --sidebar-width: 250px;
    --topbar-height: 68px;

    --radius: 12px;

    --shadow:
        0 4px 18px rgba(0, 0, 0, 0.06);

}


/*
|--------------------------------------------------------------------------
| Geral
|--------------------------------------------------------------------------
*/

* {
    box-sizing: border-box;
}

body {

    margin: 0;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--light);

    color: var(--text);

}


/*
|--------------------------------------------------------------------------
| Login
|--------------------------------------------------------------------------
*/

.login-page {

    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );

}

.login-container {

    width: 100%;

    max-width: 430px;

}

.login-card {

    background: var(--white);

    border-radius: 20px;

    padding: 35px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.20);

}

.login-logo {

    width: 72px;

    height: 72px;

    margin: 0 auto 20px;

    border-radius: 18px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: var(--primary);

    color: var(--white);

    font-size: 30px;

}

.login-title {

    text-align: center;

    margin-bottom: 5px;

    font-weight: 700;

}

.login-subtitle {

    text-align: center;

    color: var(--muted);

    margin-bottom: 30px;

}


/*
|--------------------------------------------------------------------------
| Topbar
|--------------------------------------------------------------------------
*/

.topbar {

    height: var(--topbar-height);

    background: var(--white);

    border-bottom: 1px solid var(--border);

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding: 0 20px;

    position: fixed;

    top: 0;

    left: 0;

    right: 0;

    z-index: 1000;

    min-width: 0;

}


/*
|--------------------------------------------------------------------------
| Área esquerda
|--------------------------------------------------------------------------
*/

.topbar-left {

    display: flex;

    align-items: center;

    gap: 15px;

    min-width: 0;

    flex-shrink: 0;

}


.topbar-brand {

    display: flex;

    align-items: center;

    gap: 10px;

    min-width: 0;

}


.topbar-brand-text {

    min-width: 0;

}


.topbar-brand strong {

    display: block;

    font-size: 18px;

    line-height: 1.1;

}


.topbar-brand small {

    display: block;

    color: var(--muted);

    font-size: 11px;

    line-height: 1.2;

    white-space: nowrap;

}


.brand-icon {

    width: 40px;

    height: 40px;

    min-width: 40px;

    border-radius: 10px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: var(--primary);

    color: var(--white);

}


.btn-sidebar-toggle {

    width: 40px;

    height: 40px;

    border: 0;

    background: transparent;

    font-size: 24px;

    cursor: pointer;

    color: var(--dark);

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 8px;

}


.btn-sidebar-toggle:hover {

    background: var(--light);

}


/*
|--------------------------------------------------------------------------
| Área direita
|--------------------------------------------------------------------------
*/

.topbar-user {

    display: flex;

    align-items: center;

    gap: 12px;

    min-width: 0;

    flex: 1;

    justify-content: flex-end;

}


/*
|--------------------------------------------------------------------------
| Instituição atual
|--------------------------------------------------------------------------
*/

.topbar-instituicao {

    display: flex;

    flex-direction: column;

    justify-content: center;

    min-width: 0;

    max-width: 260px;

    line-height: 1.1;

}


.instituicao-label {

    display: flex;

    align-items: center;

    gap: 4px;

    color: var(--muted);

    font-size: 12px;

    white-space: nowrap;

}


.instituicao-label i {

    font-size: 14px;

}


.instituicao-nome {

    display: block;

    font-size: 15px;

    line-height: 1.25;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    color: var(--text);

}


/*
|--------------------------------------------------------------------------
| Trocar instituição
|--------------------------------------------------------------------------
*/

.btn-trocar-instituicao {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 5px;

    color: var(--info);

    text-decoration: none;

    font-size: 14px;

    white-space: nowrap;

    flex-shrink: 0;

}


.btn-trocar-instituicao:hover {

    color: var(--primary);

}


.btn-trocar-instituicao i {

    font-size: 18px;

}


/*
|--------------------------------------------------------------------------
| Usuário
|--------------------------------------------------------------------------
*/

.user-info {

    text-align: right;

    min-width: 0;

    max-width: 150px;

}


.user-info strong {

    display: block;

    font-size: 14px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}


.user-info span {

    display: block;

    font-size: 11px;

    color: var(--muted);

    white-space: nowrap;

}


.user-avatar {

    width: 40px;

    height: 40px;

    min-width: 40px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    background: var(--light);

    color: var(--primary);

    flex-shrink: 0;

}


.btn-logout {

    width: 36px;

    height: 36px;

    min-width: 36px;

    display: flex;

    align-items: center;

    justify-content: center;

    color: var(--danger);

    font-size: 20px;

    text-decoration: none;

    border-radius: 8px;

    flex-shrink: 0;

}


.btn-logout:hover {

    background: rgba(214, 48, 49, .08);

    color: var(--danger);

}


/*
|--------------------------------------------------------------------------
| Topbar - Tablet
|--------------------------------------------------------------------------
*/

@media (max-width: 1100px) {

    .topbar-instituicao {

        max-width: 190px;

    }

    .btn-trocar-instituicao span {

        display: none;

    }

    .btn-trocar-instituicao {

        width: 36px;

        height: 36px;

    }

}


/*
|--------------------------------------------------------------------------
| Topbar - Celular
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {

    .topbar {

        height: var(--topbar-height);

        padding: 0 10px;

        gap: 8px;

    }


    .topbar-left {

        gap: 7px;

    }


    .btn-sidebar-toggle {

        width: 36px;

        height: 36px;

        font-size: 23px;

    }


    .topbar-brand {

        gap: 7px;

    }


    .brand-icon {

        width: 38px;

        height: 38px;

        min-width: 38px;

        border-radius: 10px;

    }


    .topbar-brand strong {

        font-size: 17px;

    }


    .topbar-brand small {

        font-size: 9px;

    }


    .topbar-user {

        gap: 7px;

        overflow: hidden;

    }


    .topbar-instituicao {

        max-width: 130px;

        min-width: 0;

    }


    .instituicao-label {

        font-size: 10px;

    }


    .instituicao-nome {

        font-size: 13px;

    }


    .btn-trocar-instituicao {

        width: 32px;

        height: 32px;

        min-width: 32px;

    }


    .btn-trocar-instituicao i {

        font-size: 17px;

    }


    .user-info {

        display: none;

    }


    .user-avatar {

        width: 36px;

        height: 36px;

        min-width: 36px;

    }


    .btn-logout {

        width: 32px;

        height: 32px;

        min-width: 32px;

        font-size: 18px;

    }

}


/*
|--------------------------------------------------------------------------
| Topbar - Celulares pequenos
|--------------------------------------------------------------------------
*/

@media (max-width: 420px) {

    .topbar {

        padding: 0 7px;

        gap: 5px;

    }


    .topbar-left {

        gap: 4px;

    }


    .topbar-brand {

        gap: 5px;

    }


    .brand-icon {

        width: 34px;

        height: 34px;

        min-width: 34px;

    }


    .topbar-brand strong {

        font-size: 15px;

    }


    .topbar-brand small {

        display: none;

    }


    .topbar-user {

        gap: 4px;

    }


    .topbar-instituicao {

        max-width: 105px;

    }


    .instituicao-label span {

        display: none;

    }


    .instituicao-label {

        font-size: 9px;

    }


    .instituicao-nome {

        font-size: 12px;

    }


    .user-avatar {

        width: 32px;

        height: 32px;

        min-width: 32px;

    }


    .btn-logout {

        width: 30px;

        height: 30px;

        min-width: 30px;

    }

}


/*
|--------------------------------------------------------------------------
| Sidebar
|--------------------------------------------------------------------------
*/

.sidebar {

    width: var(--sidebar-width);

    position: fixed;

    top: var(--topbar-height);

    bottom: 0;

    left: 0;

    background: var(--dark);

    color: var(--white);

    z-index: 900;

    display: flex;

    flex-direction: column;

    transition: .25s;

}

.sidebar-menu {

    padding: 20px 12px;

    flex: 1;

}

.menu-section-title {

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 1px;

    color: #95a5a6;

    padding: 15px 12px 8px;

}

.menu-item {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px;

    margin-bottom: 4px;

    border-radius: 8px;

    color: #dfe6e9;

    text-decoration: none;

    transition: .2s;

}

.menu-item:hover {

    background: rgba(255, 255, 255, .08);

    color: var(--white);

}

.menu-item i {

    width: 22px;

    text-align: center;

}

.sidebar-footer {

    padding: 15px;

    border-top: 1px solid rgba(255,255,255,.08);

    text-align: center;

}

.sidebar-footer span {

    display: block;

    font-weight: 700;

}

.sidebar-footer small {

    color: #95a5a6;

}


/*
|--------------------------------------------------------------------------
| Conteúdo
|--------------------------------------------------------------------------
*/

.main-content {

    margin-left: var(--sidebar-width);

    padding: 90px 25px 30px;

    min-height: 100vh;

    transition: .25s;

}

.sidebar-collapsed .sidebar {

    margin-left: calc(var(--sidebar-width) * -1);

}

.sidebar-collapsed .main-content {

    margin-left: 0;

}


/*
|--------------------------------------------------------------------------
| Cards
|--------------------------------------------------------------------------
*/

.card {

    border: 0;

    border-radius: var(--radius);

    box-shadow: var(--shadow);

}


/*
|--------------------------------------------------------------------------
| Botões
|--------------------------------------------------------------------------
*/

.btn-primary {

    background: var(--primary);

    border-color: var(--primary);

}

.btn-primary:hover {

    background: var(--primary-dark);

    border-color: var(--primary-dark);

}



/*
|--------------------------------------------------------------------------
| Instituições
|--------------------------------------------------------------------------
*/

.instituicao-search {
    max-width: 280px;
}

.institution-icon {

    width: 42px;
    height: 42px;

    min-width: 42px;

    border-radius: 10px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: rgba(108, 92, 231, 0.10);

    color: var(--primary);

}

.empty-state {

    padding: 60px 20px;

    text-align: center;

}

.empty-state-icon {

    width: 70px;
    height: 70px;

    margin: 0 auto 20px;

    border-radius: 16px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: rgba(108, 92, 231, 0.10);

    color: var(--primary);

    font-size: 30px;

}

.instituicao-mobile-item {

    padding: 18px;

    border-bottom: 1px solid var(--border);

}

.instituicao-mobile-item:last-child {
    border-bottom: 0;
}

@media (max-width: 767px) {

    .instituicao-search {
        max-width: none;
        width: 100%;
    }

}


/*
|--------------------------------------------------------------------------
| Responsividade
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {

    .sidebar {

        margin-left: calc(
            var(--sidebar-width) * -1
        );

    }

    .main-content {

        margin-left: 0;

        padding: 85px 15px 20px;

    }

    .sidebar-collapsed .sidebar {

        margin-left: 0;

    }

    .topbar {

        padding: 0 12px;

    }

    .user-info {

        display: none;

    }

    .login-card {

        padding: 25px 20px;

    }

}


/*
|--------------------------------------------------------------------------
| Cabeçalho de página
|--------------------------------------------------------------------------
*/

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/*
|--------------------------------------------------------------------------
| Formulários
|--------------------------------------------------------------------------
*/

.form-label {
    font-weight: 500;
}

.form-control,
.form-select {
    min-height: 44px;
}

.input-group-text {
    background: var(--light);
}


/*
|--------------------------------------------------------------------------
| Responsividade
|--------------------------------------------------------------------------
*/

@media (max-width: 575px) {

    .page-header h1 {
        font-size: 1.5rem;
    }




/* FOTO DO USUÁRIO */
.preview-foto-usuario{
    width: 180px;
    height: 240px;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-foto-usuario img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-foto-icone {
    font-size: 6rem!important;
}


/* WEBCAM 3:4 */
.webcam-area-3x4 {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 3 / 4;
    margin: 0 auto;
    overflow: hidden;
}

.webcam-video-3x4 {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
}

/* =========================================================
   CARDS DE USUÁRIOS
   ========================================================= */

.usuario-card {
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.usuario-card:hover {
    transform: translateY(-2px);
}

.usuario-card .card-footer {
    border-top: 0;
}

.usuario-card .user-list-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
}

.usuario-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.usuario-card-header .usuario-info {
    flex: 1;
    min-width: 0;
}

.usuario-card-header .usuario-status {
    flex-shrink: 0;
}


.min-w-0 {
    min-width: 0;
}

/* ==========================================================
   FOTO DO USUÁRIO - PADRÃO 3x4
   ========================================================== */

.user-list-avatar {
    position: relative;

    width: 75px !important;
    height: 100px !important;

    min-width: 75px !important;
    min-height: 100px !important;

    max-width: 75px !important;
    max-height: 100px !important;

    flex: 0 0 75px;

    aspect-ratio: 3 / 4;

    overflow: hidden;

    border-radius: 6px;

    background: #f1f3f5;

    display: flex;
    align-items: center;
    justify-content: center;
}


/* Foto */

.user-list-avatar img,
.user-list-avatar .usuario-foto {
    position: absolute;

    inset: 0;

    width: 100% !important;
    height: 100% !important;

    max-width: none !important;
    max-height: none !important;

    display: block;

    object-fit: cover;
    object-position: center center;
}


/* Ícone quando não existe foto */

.user-list-avatar i {
    font-size: 2.5rem;

    color: #6c757d;
}


/*
|--------------------------------------------------------------------------
| PDV
|--------------------------------------------------------------------------
*/

.pdv-page {
    width: 100%;
}

.pdv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.pdv-products-card,
.pdv-carrinho-card {
    overflow: hidden;
}

.pdv-search .input-group-text {
    min-width: 48px;
    justify-content: center;
}

.pdv-categorias-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.pdv-categorias {
    display: flex;
    gap: 8px;
    min-width: max-content;
}

.pdv-categoria {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 6px 12px 6px 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--white);
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    transition: .2s;
}

.pdv-categoria:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pdv-categoria.active {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

.pdv-categoria-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(108, 92, 231, .10);
    color: var(--primary);
}

.pdv-categoria.active .pdv-categoria-icon {
    background: rgba(255, 255, 255, .18);
    color: var(--white);
}

.pdv-categoria-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdv-produto {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text);
    text-align: left;
    overflow: hidden;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.pdv-produto:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(108, 92, 231, .45);
    box-shadow: var(--shadow);
}

.pdv-produto:disabled {
    cursor: not-allowed;
    opacity: .68;
}

.pdv-produto-foto {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pdv-produto-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdv-produto-foto > i {
    font-size: 3rem;
    color: #adb5bd;
}

.pdv-produto-destaque {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--warning);
    color: #5f4500;
}

.pdv-produto-esgotado {
    position: absolute;
    inset: auto 8px 8px 8px;
    padding: 5px 8px;
    border-radius: 7px;
    background: rgba(214, 48, 49, .92);
    color: var(--white);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
}

.pdv-produto-body {
    padding: 11px;
    min-width: 0;
}

.pdv-produto-codigo {
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin-bottom: 3px;
}

.pdv-produto-nome {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 38px;
    font-size: 14px;
    line-height: 1.35;
}

.pdv-produto-descricao {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdv-produto-preco {
    margin-top: 8px;
}

.pdv-produto-preco small {
    display: block;
    color: var(--muted);
    text-decoration: line-through;
    font-size: 11px;
}

.pdv-produto-preco strong {
    display: block;
    color: var(--primary);
    font-size: 17px;
}

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

.pdv-empty {
    padding: 60px 20px;
    text-align: center;
}

.pdv-empty-icon,
.pdv-carrinho-vazio-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 15px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 92, 231, .10);
    color: var(--primary);
    font-size: 28px;
}

.pdv-carrinho-card {
    position: sticky;
    top: calc(var(--topbar-height) + 15px);
}

.pdv-carrinho-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--white);
}

.pdv-carrinho-vazio {
    min-height: 300px;
    padding: 35px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--muted);
}

.pdv-carrinho-vazio strong {
    color: var(--text);
}

.pdv-carrinho-vazio span {
    margin-top: 5px;
    font-size: 13px;
}

.pdv-carrinho-itens {
    max-height: 430px;
    overflow-y: auto;
}

.pdv-carrinho-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 10px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
}

.pdv-carrinho-item-info {
    min-width: 0;
}

.pdv-carrinho-item-info strong {
    display: block;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdv-carrinho-item-info small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.pdv-carrinho-item-controles {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pdv-carrinho-qtd {
    min-width: 28px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}

.pdv-carrinho-item-controles .btn {
    width: 29px;
    height: 29px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pdv-carrinho-item-subtotal {
    grid-column: 1 / -1;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    text-align: right;
}

.pdv-carrinho-footer {
    background: var(--white);
}

.pdv-total-linha {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.pdv-desconto-input {
    width: 125px;
}

.pdv-total-final {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pdv-total-final span {
    font-size: 17px;
    font-weight: 600;
}

.pdv-total-final strong {
    color: var(--primary);
    font-size: 25px;
}

@media (max-width: 1199px) {
    .pdv-carrinho-card {
        position: static;
    }

    .pdv-carrinho-itens {
        max-height: 360px;
    }
}

@media (max-width: 767px) {
    .pdv-header {
        align-items: flex-start;
    }

    .pdv-header .btn {
        white-space: nowrap;
    }

    .pdv-products-card .card-body {
        padding: 12px;
    }

    .pdv-produto-body {
        padding: 9px;
    }

    .pdv-produto-nome {
        font-size: 13px;
    }

    .pdv-produto-preco strong {
        font-size: 15px;
    }

    .pdv-carrinho-card {
        margin-bottom: 20px;
    }
}

@media (max-width: 420px) {
    .pdv-header {
        gap: 8px;
    }

    .pdv-header p {
        font-size: 11px;
    }

    .pdv-header h1 {
        font-size: 1.15rem;
    }

    .pdv-header .badge {
        display: none;
    }

    .pdv-produto-foto {
        aspect-ratio: 1 / 1;
    }

    .pdv-produto-descricao {
        display: none;
    }

    .pdv-produto-estoque {
        font-size: 9px;
    }

    .pdv-carrinho-item {
        padding-left: 10px;
        padding-right: 10px;
    }
}



