:root {
    --primary: #0d5ea8;
    --primary-dark: #084b86;
    --primary-light: #2f84d0;
    --bg-soft: #f2f4f7;
    --border: #dbe4ee;
    --text: #123b67;
    --muted: #68778a;
    --white: #ffffff;
    --danger: #dc3545;
    --success: #198754;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    --radius-xl: 18px;
    --radius-lg: 14px;
    --radius-md: 12px;
}

* {
    font-family: 'Roboto', sans-serif;
}

body {
    background: #f8fafc;
    color: var(--text);
}

.container-ww01 {
    width: 100%;
    max-width: 90% !important;
    margin: 0 5%;
}

/* TOPO */
.topbar {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    color: var(--white);
}

.topbar span {
    opacity: .95;
}

/* HEADER */
.navbar-custom {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(219, 228, 238, .7);
    box-shadow: 0 8px 30px rgba(13, 94, 168, 0.06);
}

/* LOGO */
.brand-box {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
}

.brand-box:hover {
    color: var(--primary-dark);
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(13, 94, 168, .22);
}

/* BUSCA */
.search-wrap {
    position: relative;
}

.search-wrap input {
    height: 54px;
    padding-left: 18px;
    padding-right: 60px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .03);
}

.search-wrap input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(13, 94, 168, .12);
}

.search-wrap button {
    position: absolute;
    top: 50%;
    right: 7px;
    transform: translateY(-50%);
    height: 42px;
    border-radius: 20rem;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    transition: .25s ease;
}

.search-wrap button:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-50%) scale(1.04);
}

/* CHIPS DO HEADER */
.nav-chip {
    height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .03);
    transition: .25s ease;
}

.nav-chip:hover {
    color: var(--primary);
    border-color: rgba(13, 94, 168, .25);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(13, 94, 168, .08);
}

.nav-chip-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white !important;
    border-color: transparent;
}

.nav-chip-primary:hover {
    color: white !important;
    opacity: .96;
}

.header-user-badge {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* CATEGORIAS */
.categories-wrap {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(219, 228, 238, .7);
}

.categories-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: thin;
}

.categories-scroll::-webkit-scrollbar {
    height: 8px;
}

.categories-scroll::-webkit-scrollbar-thumb {
    background: #c9d7e6;
    border-radius: 999px;
}

.category-card {
    min-width: max-content;
    padding: 12px 18px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .03);
    transition: .25s ease;
    font-weight: 500;
    white-space: nowrap;
}

.category-card i {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(13, 94, 168, .08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card:hover {
    transform: translateY(-2px);
    border-color: rgba(13, 94, 168, .25);
    box-shadow: 0 12px 24px rgba(13, 94, 168, .08);
    color: var(--primary);
}

/* MODAL AUTH */
.modal-auth .modal-content {
    border: none;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .18);
}

.modal-auth .auth-side {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
    color: white;
    padding: 32px;
    height: 100%;
}

.modal-auth .auth-form {
    padding: 32px;
}

.modal-auth .form-control {
    min-height: 50px;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.modal-auth .form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(13, 94, 168, .10);
}

/* BOTÃO PRINCIPAL */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    color: white;
    min-height: 50px;
    border-radius: 14px;
    font-weight: 700;
}

.btn-primary-custom:hover {
    opacity: .96;
    color: white;
}

/* FEEDBACK LOGIN/CADASTRO */
.auth-feedback {
    display: none;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.auth-feedback.success {
    display: block;
    background: rgba(25, 135, 84, .12);
    color: #146c43;
    border: 1px solid rgba(25, 135, 84, .18);
}

.auth-feedback.error {
    display: block;
    background: rgba(220, 53, 69, .10);
    color: #b02a37;
    border: 1px solid rgba(220, 53, 69, .18);
}

/* SELETOR LOGIN / CADASTRO */
.auth-switch {
    display: flex;
    align-items: center;
    background: #f4f6f8;
    border-radius: 999px;
    padding: 4px;
    gap: 4px;
}

.auth-switch-btn {
    flex: 1;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    font-weight: 600;
    transition: .25s ease;
}

.auth-switch-btn:hover {
    color: var(--primary);
}

.auth-switch-btn.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
}

/* LINKS DENTRO DO MODAL */
.modal-auth small a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.modal-auth small a:hover {
    text-decoration: underline;
}

/* INPUT GLOBAL */
.form-control {
    font-size: 12pt !important;
}

/* RESPONSIVO */
@media (max-width: 991px) {
    .brand-box {
        justify-content: center;
    }

    .mobile-center {
        justify-content: center !important;
    }

    .topbar .container {
        justify-content: center !important;
        text-align: center;
    }

    .topbar .d-flex {
        justify-content: center !important;
        width: 100%;
    }

    .navbar-custom .row > div {
        text-align: center;
    }

    .search-wrap {
        max-width: 100%;
        margin: 0 auto;
    }

    .categories-wrap {
        text-align: center;
    }

    .header-user-badge {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .brand-mark {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .search-wrap input {
        height: 50px;
    }

    .nav-chip {
        height: 40px;
        padding: 0 12px;
        font-size: 13px;
        gap: 6px;
    }

    .category-card {
        padding: 10px 15px;
    }

    .category-card i {
        width: 30px;
        height: 30px;
    }

    .modal-auth .auth-form {
        padding: 24px 18px;
    }

    .auth-switch-btn {
        height: 40px;
        font-size: 14px;
    }
}