@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

/* ==========================================================================
   1. ESTILOS GERAIS E BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif !important;
}

body {
    background-color: #f0f0f0;
    height: 100vh;
    display: flex;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif !important;
}

.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background-color: #f5f5f5;
    overflow: hidden;
}

/* ==========================================================================
   2. SIDEBAR (DESKTOP)
   ========================================================================== */
.sidebar {
    width: 22%;
    min-width: 210px;
    max-width: 260px;
    background-color: #9c7558;
    height: 100vh;
    padding: 2.2vw 1.6vw;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6vw;
    margin-bottom: 2vw;
    padding-left: 0.4vw;
}

.logo-img {
    width: 2vw;
    min-width: 24px;
    max-width: 32px;
    height: auto;
    object-fit: contain;
}

.logo-text {
    font-size: clamp(15px, 1.4vw, 22px);
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 0.4vw;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.8vw;
    padding: 0.7vw 0.9vw;
    border-radius: 20px;
    font-size: clamp(12px, 1vw, 15px);
    color: #2c2c2c;
    text-decoration: none;
    transition: background-color 0.2s;
    cursor: pointer;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.menu-item.active {
    background-color: #ffffff;
    font-weight: 700;
    border-radius: 20px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.menu-icon {
    width: 1.3vw;
    min-width: 16px;
    max-width: 20px;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

/* ==========================================================================
   3. ÁREA PRINCIPAL E FORMULÁRIO (DESKTOP)
   ========================================================================== */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    padding: 2vw;
}

.form-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-container {
    background-color: #ffffff;
    width: 100%;
    max-width: 450px;
    padding: clamp(24px, 3vw, 48px) clamp(16px, 2.5vw, 40px);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 1.5vw;
}

.page-title {
    font-size: clamp(14px, 1.3vw, 18px);
    font-weight: 600;
    color: #8b5e3c;
    letter-spacing: 1.5px;
    text-align: center;
    margin-bottom: 0.5vw;
    text-transform: uppercase;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5vw;
}

.input-group label {
    font-size: clamp(11px, 0.9vw, 13px);
    font-weight: 600;
    color: #8b5e3c;
    letter-spacing: 0.5px;
}

.input-group input {
    width: 100%;
    padding: clamp(12px, 1.1vw, 16px);
    background-color: #e8e8e8;
    border: none;
    border-radius: 10px;
    font-size: clamp(14px, 1.1vw, 16px);
    color: #333;
    outline: none;
    font-weight: 600;
    transition: background-color 0.2s;
}

.input-group input:focus {
    background-color: #dedede;
}

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 0.5vw;
}

.btn-submit {
    background: none;
    border: none;
    color: #8b5e3c;
    font-size: clamp(13px, 1.1vw, 15px);
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    padding: 0.5vw 1.2vw;
    transition: opacity 0.2s;
    text-transform: uppercase;
}

.btn-submit:hover {
    opacity: 0.75;
}

/* ==========================================================================
   4. RESPONSIVIDADE (MOBILE < 768px)
   ========================================================================== */
@media (max-width: 768px) {
    body, html {
        overflow: auto;
    }

    .app-container {
        height: 100vh;
        overflow: hidden;
    }

    /* Sidebar Compacta com Ícone e Texto */
    .sidebar {
        width: 120px;
        min-width: 120px;
        padding: 15px 0;
        gap: 20px;
        align-items: flex-start;
        flex-shrink: 0;
    }

    .logo {
        padding: 0 10px;
        margin-bottom: 0;
        gap: 6px;
    }

    .logo-img {
        width: 18px;
        min-width: 18px;
    }

    .logo-text {
        font-size: 11px;
    }

    .menu {
        padding: 0 6px;
        gap: 6px;
        width: 100%;
    }

    .menu-item {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 8px;
        gap: 8px;
        border-radius: 10px;
    }

    .menu-item.active {
        border-radius: 12px;
    }

    .menu-icon {
        width: 16px;
        min-width: 16px;
    }

    .menu-item span {
        display: inline-block;
        font-size: 10px;
        font-weight: 600;
        white-space: nowrap;
    }

    /* Centralização perfeita na tela */
    .main-content {
        flex: 1;
        width: calc(100vw - 120px);
        padding: 20px 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow-y: auto !important;
    }

    .form-wrapper {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: auto;
    }

    .form-container {
        padding: 24px 16px;
        gap: 16px;
        border-radius: 16px;
    }

    .page-title {
        font-size: 15px;
    }

    .input-group label {
        font-size: 11px;
    }

    .input-group input {
        padding: 12px;
        font-size: 13px;
    }

    .btn-submit {
        font-size: 13px;
        padding: 10px;
    }
}