:root { --primary: #3498db; --sec: #f8f9fa; --dest: #e74c3c; --bg: #f4f6f9; }
body { font-family: Helvetica, Arial, sans-serif; background: var(--bg); margin: 0; padding: 10px; display: flex; flex-direction: column; min-height: 100vh; box-sizing: border-box; }
.main-wrapper { flex: 1; display: flex; flex-direction: column; max-width: 650px; margin: 0 auto; width: 100%; }
.container { flex: 1; display: flex; flex-direction: column; background: white; padding: 25px; border-radius: 4px; position: relative; box-shadow: 0 4px 15px rgba(0,0,0,0.1); margin-top: 5px; }

/* Cabeçalho Web Trava e Padding */
.header-block { background: var(--primary); border-radius: 4px; padding: 0 15px 0 0; display: flex; align-items: center; justify-content: flex-start; margin-bottom: 20px; height: 90px; box-sizing: border-box; transition: background 0.3s;}

.header-logo-wrapper { height: 90px; width: 90px; padding: 0px; box-sizing: border-box; flex: none; display: flex; align-items: center; justify-content: center; margin-right: 15px; }
.header-logo { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; transition: all 0.3s; }
.header-logo.is-square { border-radius: 4px; }

.header-texts { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; }
h1.nome-empresa-txt { margin: 0; text-transform: uppercase; }
h2.num-orcamento-txt { margin: 5px 0 0 0; }

.seamless-input { background: transparent; border: none; outline: none; width: 100%; box-sizing: border-box; font-family: inherit; font-size: inherit; color: inherit; padding: 5px; }
.seamless-input::placeholder { color: #aaa; }
textarea.seamless-input { resize: none; overflow: hidden; vertical-align: middle; padding-top: 6px;}

.row { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; }
input[type="text"]:not(.seamless-input), input[type="tel"]:not(.seamless-input), input[type="number"]:not(.seamless-input), textarea, select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; font-size: 14px; font-family: inherit; }
select { padding: 10px; }

.search-container { background: #f9f9f9; padding: 15px; border-radius: 8px; position: relative; border: 1px solid #eee; margin-bottom: 15px; }
.results-list { position: absolute; width: calc(100% - 30px); max-height: 200px; overflow-y: auto; background: white; border: 1px solid #ddd; z-index: 100; display: none; border-radius:4px; box-shadow:0 4px 10px rgba(0,0,0,0.1);}
.result-item { padding: 12px; cursor: pointer; border-bottom: 1px solid #eee; font-size: 14px; }
.result-item:hover, .result-item.selected { background: var(--primary); color: #000; font-weight: bold; }

.cart-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.cart-table th { padding: 10px 5px; text-transform: uppercase; }
.cart-table td { padding: 8px 5px; vertical-align: middle; }
.cart-table tbody tr:nth-child(even) td { background-color: var(--sec); }

.buttons-row { margin-top: auto; padding-top: 15px; border-top: 1px solid #eee; display: flex; gap: 10px;}
.btn-add, .btn-final, .btn-novo { cursor: pointer; border-radius: 4px; text-transform: uppercase; text-align: center; border: none; font-weight: bold;}
.btn-add { flex: none; }
.btn-final { flex: 1; }
.btn-novo { width: 80px; flex: none; opacity: 0.9; } .btn-novo:hover { opacity: 1; }
.btn-qtd { background: #fff; border: 1px solid #ccc; border-radius: 4px; width: 24px; height: 24px; cursor: pointer; font-weight: bold; font-size: 14px; margin: 0; padding: 0; color: #333; display: flex; justify-content: center; align-items: center; }

#loadingOverlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, 0.9); z-index: 99999; flex-direction: column; justify-content: center; align-items: center; }
.loading-circle { width: 120px; height: 120px; background: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 15px rgba(0,0,0,0.1); overflow: hidden; }
.spin-logo { width: 100px; height: 100px; animation: spin 1.5s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Rodapé Web Novo: 3 Colunas Limpas (+1pt de tamanho) */
.web-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; padding: 0 5px; font-size: 7pt; color: #999; width: 100%; box-sizing: border-box; text-transform: uppercase;}
.footer-links a { color: #666; text-decoration: none; margin-left: 8px; cursor: pointer; font-size: 9pt; vertical-align: middle; }
.footer-links a:hover { opacity: 0.7; }
/* Ajuste do Link brti.app */
.brti-link { text-transform: lowercase; text-decoration: none; color: inherit; font-weight: bold; }
.brti-link:hover { text-decoration: underline; opacity: 0.8; }

#customModal, #maskModal, #logsModal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 10000; align-items: center; justify-content: center; }
.modal-box { background: #fff; width: 90%; max-width: 400px; border-radius: 8px; padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); text-align: center; animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.modal-box h3 { margin-top: 0; color: var(--dest); font-size: 18px; }
.modal-box p { font-size: 14px; color: #444; line-height: 1.5; margin-bottom: 20px;}
.modal-btns { display: flex; gap: 10px; justify-content: center; }
.m-btn { padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; font-size: 13px; text-transform: uppercase; }
.m-btn-primary { background: var(--primary); color: #000; }
.m-btn-sec { background: #eee; color: #333; }
@keyframes popIn { 0% { transform: scale(0.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.mask-box { background: #fff; width: 90%; max-width: 500px; border-radius: 8px; padding: 25px; box-sizing: border-box;}
.mask-box h3 { margin-top: 0; color: #333; font-size: 16px; border-bottom: 2px solid var(--primary); padding-bottom: 10px;}
.mask-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0; }
.badge { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; padding: 6px 10px; border-radius: 15px; font-size: 11px; font-weight: bold; cursor: pointer; transition: 0.2s;}
.badge:hover { background: #1565c0; color: #fff;}
.mask-preview { background: #f5f5f5; padding: 15px; border-radius: 4px; text-align: center; font-size: 18px; font-weight: bold; letter-spacing: 1px; color: #000; border: 1px dashed #ccc; margin-bottom: 15px;}

/* Modal de Logs */
.logs-box { max-width: 600px; text-align: left;}
.logs-content { background: #1e1e1e; color: #00ff00; padding: 10px; font-family: monospace; font-size: 10px; height: 250px; overflow-y: auto; border-radius: 4px; margin-bottom: 15px; line-height: 1.4;}

@media screen and (max-width: 600px) {
    body { padding: 5px; }
    .container { padding: 15px; }
    .header-block { padding: 10px; height: 75px;}
    .header-logo-wrapper { width: 75px; height: 75px; margin-right: 10px;}
    .buttons-row { flex-direction: column; gap: 8px;}
    .btn-novo { width: 100%; margin-right: 0;}
    .btn-final { width: 100%; }
}