/* ========================================
   LOGIN - Estilos Específicos para a Página de Login
   ======================================== */
.login-container {
    max-width: 480px;
    margin: 2rem auto;
    padding: 30px;
    border-radius: 10px;
    border: var(--bs-border-width) solid var(--bs-border-color);
}

#btnLogin {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
}

/* ========================================
   RETENÇÕES - Seções de Retenções Federais
   ======================================== */
.retencoes-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.retencoes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tipoRetFederais {
    display: flex;
    flex-direction: column;
    background-color: #00000024;
    padding: 5px 10px;
    border-radius: 7px;
    font-size: 0.85rem;
}

.tipoRetFederais.hide {
    display: none;
}

.tipoRetFederais div {
    font-weight: bold;
}

/* ========================================
   RESULTADO - Exibição de Output
   ======================================== */
   .output-area {
    flex: 2;
    padding: 20px;
    border: 1px solid #444;
    border-radius: 8px;
    font-family: monospace;
    overflow-y: auto;
}

#resultado {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.texto {
    display: flex;
    flex-direction: column;
}

.texto strong {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

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

.texto-bloco textarea {
    height: 5rem;
}

.texto-bloco textarea.limite-atingido {
    border: 1px solid var(--bs-form-invalid-border-color);
    background-color: #3d1b1b26;
}

.tributoTextarea {
    height: 4rem !important;
}

.custom-placeholder {
    font-style: italic;
    display: flex;
    justify-content: center;
}

/* ========================================
   CONTADORES & LABELS - Informações Visuais
   ======================================== */
#cid {
    font-size: 0.8em;
}

.caracteres {
    font-size: 0.7em;
    text-align: right;
    padding-right: 10px;
}

.output-area header {
    display: none;
}

/* ========================================
   TOOLTIPS - Dicas Flutuantes
   ======================================== */
.custom-tooltip {
    position: relative;
    display: inline-block;
}

.tooltiptext {
    visibility: hidden;
    background-color: #000000e3;
    color: #ffffffc7;
    text-align: center;
    font-size: 0.7rem;
    padding: 5px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    width: 90%;
    bottom: 120%;
    left: 5%;
}

.tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #000000e3 transparent transparent transparent;
}

.custom-tooltip input:focus ~ .tooltiptext,
.custom-tooltip input:hover ~ .tooltiptext {
    visibility: visible;
}

/* ========================================
   SELETOR DE REGISTROS - Dropdown
   ======================================== */
.registro-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 20px;
}

.registro-select:focus {
    outline: none;
    border-color: #007acc;
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
}

.registro-select option {
    color: #e0e0e0;
}

.search-container {
    position: relative;
    margin-bottom: 10px;
}

.registro-lista {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bs-body-bg);
    border: 1px solid #444;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
}

.registro-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #333;
    transition: background-color 0.2s;
}

.registro-item:hover,
.registro-item.selected {
    background: #00000035;
}

.registro-item:last-child {
    border-bottom: none;
}

.registro-item .codigo {
    font-weight: bold;
    color: #007acc;
}

.registro-item .empresa {
    font-size: 0.9rem;
    font-weight: bold;
}

.registro-item .data {
    font-size: 0.7rem;
}

/* ========================================
   BLOQUEADOR DE MOBILE - Detecção de Dispositivo
   ======================================== */
#mobile-blocker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #121212;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.mobile-blocker-content {
    text-align: center;
    padding: 40px;
    max-width: 500px;
}

.mobile-blocker-icon {
    color: #ff6b6b;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

.mobile-blocker-icon svg {
    stroke: #ff6b6b;
}

.mobile-blocker-content h1 {
    color: #e0e0e0;
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: bold;
}

.mobile-blocker-content p {
    color: #b0b0b0;
    font-size: 16px;
    line-height: 1.6;
    margin: 10px 0;
}

/* ========================================
   SPINNER DE AUTENTICAÇÃO
   ======================================== */
.auth-spinner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-body-bg);
    z-index: 99999;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.auth-spinner.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner-container .spinner-border {
    width: 50px;
    height: 50px;
    border-width: 5px;
}

.spinner-container p {
    margin: 0;
    font-size: 16px;
    color: var(--bs-body-color);
}