/* ===================== BASE ===================== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Informa ao Samsung Browser (e outros) que a página gerencia seus próprios temas.
   Suprime o "Force Dark Mode" do browser que sobrescreve data-theme="dark". */
:root {
    color-scheme: light dark;
    --primary-blue: #44A8E9;
    --dark-blue: #2885BF;
    --primary-green: #31DC91;
    --dark-green: #43A470;
    --bg-light: #F5F7FA;
    --text-dark: #2C3E50;
    --text-light: #6C757D;
    --white: #FFFFFF;
    --border: #E0E6ED;
    --shadow: rgba(0,0,0,0.08);
    --danger: #E74C3C;
    --warning: #F39C12;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.hidden { display: none !important; }

/* ===================== LOGIN (login.php only) ===================== */
#loginScreen {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

#loginScreen::before {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    top: -80px; right: -80px;
}
#loginScreen::after {
    content: '';
    position: absolute;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    bottom: -60px; left: -60px;
}

.login-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    animation: slideUp 0.5s ease;
    position: relative;
    z-index: 1;
    margin: auto;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    padding: 36px 30px 28px;
    text-align: center;
}

.login-logo {
    display: block;
    margin-bottom: 6px;
}

.login-logo img {
    width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.login-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    font-weight: 400;
    margin-top: 4px;
}

/* Tabs Login/Cadastro */
.login-tabs {
    display: flex;
    background: var(--bg-light);
    border-bottom: 2px solid var(--border);
}

.login-tab {
    flex: 1;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.login-tab.active {
    color: var(--primary-blue);
    background: var(--white);
    border-bottom-color: var(--primary-blue);
}

.tab-pane { display: none; padding: 28px; }
.tab-pane.active { display: block; }

.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 15px;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 13px 16px 13px 42px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--bg-light);
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(68,168,233,0.1);
}

.form-input.valid { border-color: var(--primary-green); }
.form-input.invalid { border-color: var(--danger); }

/* Tipo de documento */
.doc-type-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.doc-type-btn {
    flex: 1;
    padding: 8px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-light);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-light);
}

.doc-type-btn.active {
    border-color: var(--primary-blue);
    background: rgba(68,168,233,0.1);
    color: var(--primary-blue);
}

/* Captcha checkbox */
.captcha-box {
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s;
}

.captcha-box:hover { border-color: var(--primary-blue); }

.captcha-check {
    display: flex;
    align-items: center;
    gap: 12px;
}

.captcha-checkbox {
    width: 22px; height: 22px;
    border: 2px solid #aaa;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.captcha-checkbox.checked {
    background: var(--primary-green);
    border-color: var(--dark-green);
    color: white;
}

.captcha-label {
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 500;
}

.captcha-logo {
    font-size: 10px;
    color: var(--text-light);
    text-align: right;
}

/* Link "Esqueci minha senha" */
.forgot-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 12px;
    color: var(--primary-blue);
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover { color: var(--dark-blue); }

/* Modal "Esqueci minha senha" */
.forgot-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.forgot-overlay.open { display: flex; }

.forgot-card {
    background: var(--white);
    border-radius: 16px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
}

.forgot-card-hd {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    padding: 22px 24px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.forgot-card-hd h3 {
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.forgot-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}

.forgot-close:hover { background: rgba(255,255,255,0.3); }

.forgot-card-body { padding: 24px; }

.forgot-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 18px;
}

.forgot-success {
    display: none;
    background: rgba(49,220,145,0.1);
    border: 1px solid var(--primary-green);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--dark-green);
    margin-bottom: 14px;
}

.btn-login {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.3px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(49,220,145,0.4);
}

.btn-login:active { transform: translateY(0); }

.error-msg {
    background: rgba(231,76,60,0.1);
    border: 1px solid rgba(231,76,60,0.3);
    color: var(--danger);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    display: none;
}

/* ===================== APP ===================== */
#appScreen { min-height: 100vh; display: flex; flex-direction: column; }

/* Header */
.app-header {
    background: var(--white);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-logo {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-blue);
    letter-spacing: -0.5px;
}

.app-logo span { color: var(--primary-green); }

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cart-btn {
    position: relative;
    cursor: pointer;
    width: 40px; height: 40px;
    background: var(--bg-light);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-dark);
    font-size: 18px;
    transition: all 0.3s;
}

.cart-btn:hover { background: var(--border); }

.cart-badge {
    position: absolute;
    top: -5px; right: -5px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 18px; height: 18px;
    font-size: 10px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 13px; font-weight: 700;
}

/* Bottom Nav */
.bottom-nav {
    background: var(--white);
    border-top: 2px solid var(--border);
    display: flex;
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.nav-item {
    flex: 1;
    padding: 10px 4px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s;
    border-top: 3px solid transparent;
}

.nav-item.active {
    color: var(--primary-blue);
    border-top-color: var(--primary-blue);
}

.nav-item i { font-size: 20px; }

/* Main content */
.app-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 10px;
}

.screen { display: none; padding: 16px; }
.screen.active { display: block; }

/* ===================== CATÁLOGO ===================== */
.page-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Search */
.search-bar {
    position: relative;
    margin-bottom: 16px;
}

.search-bar i {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-input {
    width: 100%;
    padding: 13px 16px 13px 42px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    background: var(--white);
    color: #111;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(68,168,233,0.1);
}

/* Categorias */
.categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 20px;
    scrollbar-width: none;
}

.categories::-webkit-scrollbar { display: none; }

.cat-chip {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--border);
    background: var(--white);
    color: var(--text-light);
    transition: all 0.3s;
    white-space: nowrap;
}

.cat-chip.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

/* Grid de produtos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:active { transform: scale(0.97); }

.product-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: #f8fbff;
    display: block;
    padding: 10px;
}

.product-info { padding: 12px; display:flex; flex-direction:column; flex:1; }

.product-category {
    font-size: 10px;
    font-weight: 600;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.product-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-ref {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 10px;
    flex: 1;
}

.btn-add {
    width: 100%;
    padding: 9px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: auto;
    flex-shrink: 0;
}

.btn-add.added {
    background: var(--bg-light);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

/* ===================== CARRINHO ===================== */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.cart-empty i { font-size: 64px; margin-bottom: 16px; opacity: 0.3; }
.cart-empty h3 { font-size: 18px; margin-bottom: 8px; color: var(--text-dark); }

.cart-item {
    background: var(--white);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px var(--shadow);
    display: flex;
    gap: 12px;
    align-items: center;
}

.cart-item-emoji {
    width: 52px; height: 52px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e8f4ff, #d0eaff);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-ref {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 28px; height: 28px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-light);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s;
    color: var(--text-dark);
}

.qty-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.qty-value {
    font-size: 14px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.cart-item-remove {
    color: var(--danger);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

/* Resumo carrinho */
.cart-summary {
    background: var(--white);
    border-radius: 14px;
    padding: 16px;
    margin-top: 16px;
    box-shadow: 0 2px 8px var(--shadow);
}

.summary-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.summary-row.total {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-dark);
    border-top: 2px solid var(--border);
    padding-top: 10px;
    margin-top: 4px;
}

/* Campo de observações */
.obs-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    resize: none;
    height: 80px;
    color: var(--text-dark);
    background: var(--bg-light);
    transition: all 0.3s;
    margin-top: 12px;
}

.obs-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--white);
}

/* Linha de botões do carrinho mobile */
.cart-btn-row { display:flex; gap:8px; margin-top:12px; }
.cart-btn-row .btn-primary { flex:1; width:auto; margin-top:0; }
.btn-cancelar-orc { flex:1; padding:13px; border:1.5px solid var(--danger,#e74c3c); border-radius:12px; background:transparent; color:var(--danger,#e74c3c); font-family:'Montserrat',sans-serif; font-size:14px; font-weight:700; cursor:pointer; transition:all .2s; display:flex; align-items:center; justify-content:center; gap:7px; }
.btn-cancelar-orc:hover { background:var(--danger,#e74c3c); color:#fff; }

.btn-primary {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 16px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(49,220,145,0.4);
}

/* ===================== COTAÇÕES ===================== */
.cotacao-card {
    background: var(--white);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.cotacao-card:active { transform: scale(0.98); }

.cotacao-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.cotacao-num {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-dark);
}

.cotacao-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-enviado    { background: rgba(49,220,145,0.15);  color: var(--dark-green); }
.status-pendente   { background: rgba(243,156,18,0.15);  color: var(--warning); }
.status-revisado   { background: rgba(68,168,233,0.15);  color: var(--dark-blue); }
.status-integrado  { background: rgba(126,87,194,0.15);  color: #7e57c2; }

.cotacao-cliente {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.cotacao-info {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    font-size: 12px;
    color: var(--text-light);
}

.cotacao-info .cotacao-emitente { font-size: inherit; }
.cotacao-info-row2 {
    flex-basis: 100%; display: flex; align-items: center;
    gap: 6px; margin-top: 2px; flex-wrap: wrap;
}
.cotacao-tipo-pedido, .cotacao-tipo-orc {
    font-size: 10px; font-weight: 600; padding: 2px 7px;
    border-radius: 20px; white-space: nowrap;
}
.cotacao-tipo-pedido { background: rgba(126,87,194,0.13); color: #7e57c2; }
.cotacao-tipo-orc    { background: rgba(68,168,233,0.12); color: var(--dark-blue); }

/* ===================== PERFIL ===================== */
.profile-hero {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 16px;
    color: white;
}

.profile-avatar {
    width: 70px; height: 70px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    font-weight: 800;
    margin: 0 auto 12px;
    border: 3px solid rgba(255,255,255,0.4);
}

.profile-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.profile-doc { font-size: 13px; opacity: 0.8; }

.profile-card {
    background: var(--white);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 10px;
}

.profile-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

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

.profile-item i {
    color: var(--primary-blue);
    width: 20px;
    text-align: center;
}

.profile-item-label { color: var(--text-light); font-size: 12px; }
.profile-item-value { font-weight: 600; color: var(--text-dark); }

.btn-logout {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--danger);
    border-radius: 12px;
    background: transparent;
    color: var(--danger);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 16px;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

/* ===================== MODAL PRODUTO ===================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 6500;
    display: none;
    align-items: flex-end;
    /* Garante mínimo de 60px acima do sheet — corrige vh inflado do Samsung Browser */
    padding-top: 60px;
}

.modal-overlay.active { display: flex; }

.modal-sheet {
    background: var(--white);
    border-radius: 20px 20px 0 0;
    width: 100%;
    /* dvh = dynamic viewport (não inclui chrome do browser); vh como fallback */
    max-height: 85vh;
    max-height: 85dvh;
    overflow-y: auto;
    animation: slideSheet 0.3s ease;
    padding: 20px 20px 40px;
}

@keyframes slideSheet {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.modal-handle {
    width: 40px; height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 20px;
}

.modal-product-img {
    width: 100%;
    background: #f8fbff;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
}

.modal-product-cat {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.modal-product-name {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
}

.modal-product-ref {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.modal-product-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 20px;
}

.modal-qty-section {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.modal-qty-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.modal-qty-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.modal-qty-btn {
    width: 44px; height: 44px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s;
    color: var(--text-dark);
}

.modal-qty-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.modal-qty-value {
    font-size: 28px;
    font-weight: 800;
    min-width: 50px;
    text-align: center;
}

/* ===================== MODAL SUCESSO ===================== */
.success-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 6500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.success-modal.active { display: flex; }

.success-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    max-width: 340px;
    width: 100%;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.7); }
    to   { opacity: 1; transform: scale(1); }
}

.success-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: white;
}

.success-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.success-text { font-size: 14px; color: var(--text-light); line-height: 1.6; }
.success-num { font-size: 28px; font-weight: 800; color: var(--primary-blue); margin: 12px 0; }

/* ===================== FORMULÁRIO ===================== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.select-input {
    width: 100%;
    padding: 13px 16px 13px 42px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--bg-light);
    appearance: none;
    transition: all 0.3s;
}

.select-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--white);
}

/* Info badge */
.info-banner {
    background: rgba(68,168,233,0.1);
    border: 1px solid rgba(68,168,233,0.3);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 12px;
    color: var(--dark-blue);
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 16px;
}

/* Notificação flutuante (substitui .toast) */
.notif-toast {
    position: fixed;
    top: -180px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    min-width: 300px;
    max-width: min(calc(100vw - 32px), 480px);
    transition: top 0.38s cubic-bezier(0.34, 1.4, 0.64, 1);
    pointer-events: none;
}
.notif-toast.show {
    top: 20px;
    pointer-events: all;
}
.notif-toast-inner {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 14px 44px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.08);
    padding: 15px 48px 18px 18px;
    position: relative;
    overflow: hidden;
    border-left: 5px solid #44A8E9;
}
.notif-toast.type-success .notif-toast-inner { border-left-color: #31DC91; }
.notif-toast.type-error   .notif-toast-inner { border-left-color: #E74C3C; }
.notif-toast.type-warning .notif-toast-inner { border-left-color: #F39C12; }
.notif-toast.type-info    .notif-toast-inner { border-left-color: #44A8E9; }

.notif-toast-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 3px;
    display: block;
}
.notif-toast.type-success .notif-toast-label { color: #43A470; }
.notif-toast.type-error   .notif-toast-label { color: #E74C3C; }
.notif-toast.type-warning .notif-toast-label { color: #b7770d; }
.notif-toast.type-info    .notif-toast-label { color: #2885BF; }

.notif-toast-msg {
    font-size: 13px;
    font-weight: 600;
    color: #2C3E50;
    line-height: 1.45;
    display: block;
    word-break: break-word;
    white-space: pre-wrap;
}
.notif-toast-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    font-size: 14px;
    padding: 5px 7px;
    border-radius: 7px;
    line-height: 1;
    transition: background .15s, color .15s;
}
.notif-toast-close:hover { background: #f5f7fa; color: #2C3E50; }

.notif-toast-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: #44A8E9;
    transform-origin: left;
    transform: scaleX(0);
}
.notif-toast.type-success .notif-toast-bar { background: #31DC91; }
.notif-toast.type-error   .notif-toast-bar { background: #E74C3C; }
.notif-toast.type-warning .notif-toast-bar { background: #F39C12; }
.notif-toast.type-info    .notif-toast-bar { background: #44A8E9; }
.notif-toast-bar.running {
    animation: notifProgress 10s linear forwards;
}
@keyframes notifProgress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* ===================== CLIENTE SELECIONADO ===================== */
.cliente-banner {
    background: linear-gradient(135deg, rgba(68,168,233,0.12), rgba(40,133,191,0.08));
    border: 2px solid rgba(68,168,233,0.35);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.cliente-banner:hover { border-color: var(--primary-blue); }

.cliente-banner-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 18px;
    flex-shrink: 0;
}

.cliente-banner-info { flex: 1; min-width: 0; }

.cliente-banner-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-blue);
    margin-bottom: 2px;
}

.cliente-banner-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cliente-banner-cnpj {
    font-size: 11px;
    color: var(--text-light);
}

.cliente-banner-change {
    font-size: 12px;
    color: var(--primary-blue);
    font-weight: 600;
    flex-shrink: 0;
}

/* Sem cliente banner */
.no-cliente-banner {
    background: rgba(243,156,18,0.08);
    border: 2px dashed rgba(243,156,18,0.4);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.no-cliente-banner:hover { border-color: var(--warning); }

.no-cliente-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: rgba(243,156,18,0.15);
    display: flex; align-items: center; justify-content: center;
    color: var(--warning); font-size: 18px;
    flex-shrink: 0;
}

.no-cliente-text { flex: 1; }
.no-cliente-title { font-size: 13px; font-weight: 700; color: var(--text-dark); }
.no-cliente-sub { font-size: 11px; color: var(--text-light); }

/* ===================== MODAL CLIENTE ===================== */
.client-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 6500;
    display: none;
    align-items: flex-end;
}

.client-modal-overlay.active { display: flex; }

.client-modal-sheet {
    background: var(--white);
    border-radius: 22px 22px 0 0;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    animation: slideSheet 0.3s ease;
    padding: 20px 20px 40px;
}

.client-modal-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
}

.client-modal-sub {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Resultado de busca */
.client-result {
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.client-result:hover, .client-result.selected {
    border-color: var(--primary-blue);
    background: rgba(68,168,233,0.06);
}

.client-result-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.client-result-cnpj {
    font-size: 12px;
    color: var(--text-light);
}

.client-result-info {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-light);
}

.divider-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
}

.divider-or::before, .divider-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.btn-outline {
    width: 100%;
    padding: 13px;
    border: 2px solid var(--primary-blue);
    border-radius: 10px;
    background: transparent;
    color: var(--primary-blue);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}

.btn-outline:hover { background: rgba(68,168,233,0.08); }

/* Seção cadastro novo cliente */
.new-client-section { display: none; }
.new-client-section.active { display: block; position: relative; }

/* CNPJ lookup — overlay + spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.cnpj-spinner {
  width: 38px; height: 38px;
  border: 3px solid rgba(68,168,233,.25);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.back-btn {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: var(--bg-light);
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 14px;
    flex-shrink: 0;
}

/* ===================== AÇÕES DA COTAÇÃO ===================== */
.cotacao-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.action-btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 9px 6px;
    border-radius: 9px;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    white-space: nowrap;
}

.action-btn-edit {
    background: rgba(68,168,233,0.12);
    color: var(--dark-blue);
    border: 1.5px solid rgba(68,168,233,0.3);
}

.action-btn-edit:hover { background: rgba(68,168,233,0.22); }

.action-btn-resend {
    background: rgba(49,220,145,0.12);
    color: var(--dark-green);
    border: 1.5px solid rgba(49,220,145,0.3);
}

.action-btn-resend:hover { background: rgba(49,220,145,0.22); }

/* Botões de escolha dentro do modal Reenviar */
.reenv-choice-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 18px 12px;
    border-radius: 14px;
    border: 2px solid rgba(68,168,233,0.3);
    background: rgba(68,168,233,0.07);
    color: var(--dark-blue);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.reenv-choice-btn:hover { background: rgba(68,168,233,0.15); border-color: rgba(68,168,233,0.5); }
.reenv-choice-btn.reenv-wa {
    border-color: rgba(37,211,102,0.3);
    background: rgba(37,211,102,0.07);
    color: #128C7E;
}
.reenv-choice-btn.reenv-wa:hover { background: rgba(37,211,102,0.15); border-color: rgba(37,211,102,0.5); }

.reenv-back-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.reenv-back-btn:hover { color: var(--text-dark); }

/* Modal reenvio de email */
.simple-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 6500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.simple-modal-overlay.active { display: flex; }

.simple-modal-card {
    background: var(--white);
    border-radius: 20px;
    padding: 28px 24px;
    width: 100%;
    max-width: 380px;
    animation: popIn 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
}

.simple-modal-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.simple-modal-icon.email-icon { background: rgba(68,168,233,0.12); color: var(--dark-blue); }
.simple-modal-icon.whats-icon { background: rgba(37,211,102,0.12); color: #128C7E; }

.simple-modal-title { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.simple-modal-sub { font-size: 13px; color: var(--text-light); margin-bottom: 20px; }

.btn-cancel {
    width: 100%;
    padding: 13px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-light);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s;
}

.btn-cancel:hover { background: var(--bg-light); }

/* Modal editar cotação */
.edit-cot-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 6500;
    display: none;
    align-items: flex-end;
}

.edit-cot-overlay.active { display: flex; }

.edit-cot-sheet {
    background: var(--white);
    border-radius: 22px 22px 0 0;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideSheet 0.3s ease;
    padding: 20px 20px 40px;
}

.edit-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

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

.edit-item-emoji {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e8f4ff, #d0eaff);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.edit-item-info { flex: 1; min-width: 0; }

.edit-item-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edit-item-ref { font-size: 11px; color: var(--text-light); }

.edit-qty-control {
    display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}

.edit-qty-btn {
    width: 28px; height: 28px;
    border: 2px solid var(--border);
    border-radius: 7px;
    background: var(--bg-light);
    font-size: 14px; font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    color: var(--text-dark);
}

.edit-qty-btn:hover { border-color: var(--primary-blue); color: var(--primary-blue); }

.edit-qty-val {
    font-size: 14px; font-weight: 800;
    min-width: 22px; text-align: center;
}

.edit-remove-btn {
    color: var(--danger);
    cursor: pointer;
    font-size: 15px;
    padding: 4px;
    flex-shrink: 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ===== DESKTOP LAYOUT (>= 1024px) ===== */
.dt-sidebar, .dt-main, .dt-panel, .dt-topbar { display: none; }

/* Sidebar */
.dt-sidebar { width:234px; min-width:234px; background:white; border-right:1px solid var(--border); flex-direction:column; height:100vh; overflow:hidden; flex-shrink:0; }
.dt-sidebar-hd { padding:22px 18px 16px; border-bottom:1px solid var(--border); }
.dt-logo { display:block; margin-bottom:6px; }
.dt-logo img { width:160px; height:auto; display:block; }
.dt-tagline { font-size:9px; color:var(--text-light); font-weight:600; text-transform:uppercase; letter-spacing:.6px; padding-left:0; }
.dt-nav { flex:1; padding:12px 10px; overflow-y:auto; }
.dt-nav-section { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.8px; color:var(--text-light); padding:0 8px; margin:12px 0 4px; }
.dt-nav-section:first-child { margin-top:0; }
.dt-nav-item { display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:9px; cursor:pointer; font-size:13px; font-weight:600; color:var(--text-light); transition:all .2s; margin-bottom:2px; user-select:none; }
.dt-nav-item:hover { background:var(--bg-light); color:var(--text-dark); }
.dt-nav-item.active { background:linear-gradient(135deg,rgba(68,168,233,.13),rgba(40,133,191,.07)); color:var(--primary-blue); }
.dt-nav-item i { width:16px; text-align:center; font-size:14px; flex-shrink:0; }
.dt-nav-badge { margin-left:auto; background:var(--danger); color:white; border-radius:10px; padding:1px 7px; font-size:10px; font-weight:700; }
.dt-sidebar-ft { padding:12px 10px; border-top:1px solid var(--border); }
.dt-user-row { display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:9px; cursor:pointer; transition:all .2s; margin-bottom:2px; }
.dt-user-row:hover { background:var(--bg-light); }
.dt-user-avatar { width:34px; height:34px; border-radius:50%; background:linear-gradient(135deg,var(--primary-blue),var(--dark-blue)); display:flex; align-items:center; justify-content:center; color:white; font-size:12px; font-weight:700; flex-shrink:0; }
.dt-user-info { flex:1; min-width:0; }
.dt-user-name { font-size:12px; font-weight:700; color:var(--text-dark); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dt-user-role { font-size:10px; color:var(--text-light); }
.dt-logout-row { display:flex; align-items:center; gap:10px; padding:8px 12px; border-radius:9px; cursor:pointer; font-size:12px; font-weight:600; color:var(--danger); transition:all .2s; }
.dt-logout-row:hover { background:rgba(231,76,60,.07); }

/* Área central */
.dt-main { flex:1; flex-direction:column; height:100vh; overflow:hidden; background:var(--bg-light); min-width:0; }
.dt-topbar { background:white; border-bottom:1px solid var(--border); padding:0 20px; display:flex; flex-direction:column; flex-shrink:0; }
.dt-topbar-row1 { display:flex; align-items:center; gap:12px; padding:12px 0; }
.dt-topbar-row2 { display:flex; align-items:center; gap:6px; padding:8px 0 10px; border-top:1px solid var(--border); }
.dt-topbar-title { font-size:17px; font-weight:800; color:var(--text-dark); white-space:nowrap; }
.dt-topbar-search { flex:1; position:relative; }
.dt-topbar-search i { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--text-light); font-size:13px; pointer-events:none; }
.dt-search-input { width:100%; padding:9px 13px 9px 36px; border:2px solid var(--border); border-radius:9px; font-family:'Montserrat',sans-serif; font-size:13px; background:var(--bg-light); color:#111; transition:all .3s; }
.dt-search-input:focus { outline:none; border-color:var(--primary-blue); background:white; box-shadow:0 0 0 3px rgba(68,168,233,.1); }
.dt-topbar-cats { display:flex; gap:5px; align-items:center; flex-wrap:nowrap; flex:1; overflow-x:auto; overflow-y:visible; scrollbar-width:none; -ms-overflow-style:none; }
.dt-topbar-cats::-webkit-scrollbar { display:none; }
.dt-cats-more-btn { flex-shrink:0; background:none; border:1.5px solid var(--border); border-radius:20px; padding:5px 12px; font-size:12px; font-weight:700; color:var(--text-light); cursor:pointer; white-space:nowrap; transition:all .2s; font-family:'Montserrat',sans-serif; }
.dt-cats-more-btn:hover { border-color:var(--primary-blue); color:var(--primary-blue); }
/* Category chips dropdown */
.cat-chip-root { position:relative; }
/* Dropdown posicionado via JS com position:fixed (contorna overflow do container) */
.cat-chip-dd { display:none; position:fixed; z-index:9999; background:var(--white); border:1px solid var(--border); border-radius:10px; min-width:200px; max-height:280px; overflow-y:auto; box-shadow:0 8px 24px rgba(0,0,0,.12); padding:4px 0; }
.cat-chip-dd-item { padding:8px 14px; font-size:12px; cursor:pointer; color:var(--text-dark); white-space:nowrap; transition:background .15s; background:var(--white); }
.cat-chip-dd-item:hover { background:var(--bg-light); color:var(--primary-blue); }
.cat-chip-dd-item.has-sub { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.cat-chip-dd-item.has-sub::after { content:'›'; font-size:14px; opacity:.5; flex-shrink:0; }
.cat-chip-dd-sub { display:none; position:fixed; z-index:10000; background:var(--white); border:1px solid var(--border); border-radius:10px; min-width:190px; max-height:260px; overflow-y:auto; box-shadow:0 8px 24px rgba(0,0,0,.14); padding:4px 0; }
.cat-chip-sub2 { font-size:10px; padding:4px 10px 4px 20px; opacity:.85; }
.dt-topbar-cats .cat-chip { padding:6px 13px; font-size:11px; }
.dt-scroll { flex:1; overflow-y:auto; padding:18px 20px; }

/* Grid de produtos desktop */
.dt-products-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }

.dt-screen { display:none; height:100%; flex-direction:column; overflow:hidden; }
.dt-screen.active { display:flex; }
.dt-cotacoes-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:12px; }
.dt-perfil-layout { display:grid; grid-template-columns:280px 1fr; gap:20px; padding:20px; overflow-y:auto; flex:1; }

/* Painel direito */
.dt-panel { width:300px; min-width:300px; flex-direction:column; height:100vh; background:white; border-left:1px solid var(--border); overflow:hidden; flex-shrink:0; }
.dt-panel-hd { padding:16px 16px 12px; border-bottom:1px solid var(--border); flex-shrink:0; }
.dt-panel-hd-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:2px; }
.dt-panel-title { font-size:14px; font-weight:800; color:var(--text-dark); }
.dt-panel-badge { background:var(--danger); color:white; border-radius:10px; padding:2px 8px; font-size:10px; font-weight:700; }
.dt-panel-sub { font-size:10px; color:var(--text-light); }
.dt-panel-cliente { padding:10px 14px; border-bottom:1px solid var(--border); flex-shrink:0; }
.dt-panel-items { flex:1; min-height:0; overflow-y:auto; padding:8px 14px; }
.dt-panel-empty { flex:1; min-height:0; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:30px 20px; text-align:center; color:var(--text-light); }
.dt-panel-empty i { font-size:44px; opacity:.18; margin-bottom:12px; display:block; }
.dt-panel-empty-title { font-size:13px; font-weight:700; color:var(--text-dark); margin-bottom:5px; }
.dt-panel-empty-sub { font-size:11px; }
.dt-pitem { display:flex; align-items:center; gap:9px; padding:9px 0; border-bottom:1px solid var(--border); }
.dt-pitem:last-child { border-bottom:none; }
.dt-pitem-img { width:42px; height:42px; border-radius:8px; background:#f8fbff; border:1px solid var(--border); object-fit:contain; padding:3px; flex-shrink:0; }
.dt-pitem-info { flex:1; min-width:0; }
.dt-pitem-name { font-size:11px; font-weight:700; color:var(--text-dark); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:1px; }
.dt-pitem-ref  { font-size:10px; color:var(--text-light); }
.dt-pitem-preco{ font-size:10px; color:var(--primary-blue); font-weight:600; }
.dt-pitem-qty  { display:flex; align-items:center; gap:4px; flex-shrink:0; }
.dt-qty-btn { width:22px; height:22px; border:1.5px solid var(--border); border-radius:5px; background:var(--bg-light); font-size:12px; font-weight:700; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all .2s; color:var(--text-dark); }
.dt-qty-btn:hover { border-color:var(--primary-blue); color:var(--primary-blue); }
.dt-qty-val { font-size:12px; font-weight:800; min-width:16px; text-align:center; }
.dt-pitem-del { color:var(--danger); cursor:pointer; font-size:12px; padding:3px; flex-shrink:0; }
.dt-panel-ft { padding:12px 14px; border-top:1px solid var(--border); flex-shrink:0; background:white; }
.dt-summary-row { display:flex; justify-content:space-between; font-size:11px; color:var(--text-light); margin-bottom:3px; }
.dt-summary-row.total { font-size:12px; font-weight:700; color:var(--text-dark); border-top:1px solid var(--border); padding-top:7px; margin-top:3px; }
.dt-sum-discount { color:var(--primary-green) !important; }
.dt-sum-dynamic { margin-top:6px; }

/* ── Cupom (desktop painel) ── */
.dt-cupom-row { margin-top:6px; }
.dt-cupom-input-row { display:flex; gap:5px; }
.dt-cupom-input { flex:1; padding:6px 9px; border:1.5px solid var(--border); border-radius:7px; font-family:'Montserrat',sans-serif; font-size:11px; color:var(--text-dark); background:var(--bg-light); }
.dt-cupom-input:focus { outline:none; border-color:var(--primary-blue); background:white; }
.dt-cupom-btn { padding:6px 10px; background:var(--primary-blue); color:#fff; border:none; border-radius:7px; font-size:11px; font-weight:700; cursor:pointer; white-space:nowrap; }
.dt-cupom-btn:hover { background:var(--dark-blue); }
.dt-cupom-applied { display:flex; align-items:center; gap:6px; font-size:11px; color:var(--primary-green); font-weight:600; background:rgba(49,220,145,.1); border-radius:7px; padding:5px 8px; }
.dt-cupom-applied strong { font-weight:800; }
.dt-cupom-remove { margin-left:auto; background:none; border:none; cursor:pointer; color:var(--text-light); font-size:13px; line-height:1; }
.dt-cupom-remove:hover { color:var(--danger); }

/* ── Cupom (mobile carrinho) ── */
.cupom-section { margin:10px 0; }
.cupom-input-row { display:flex; gap:8px; }
.cupom-input { flex:1; padding:9px 12px; border:1.5px solid var(--border); border-radius:10px; font-family:'Montserrat',sans-serif; font-size:13px; color:var(--text-dark); background:white; }
.cupom-input:focus { outline:none; border-color:var(--primary-blue); }
.cupom-btn { padding:9px 14px; background:var(--primary-blue); color:#fff; border:none; border-radius:10px; font-size:13px; font-weight:700; cursor:pointer; white-space:nowrap; }
.cupom-btn:hover { background:var(--dark-blue); }
.cupom-applied { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--primary-green); font-weight:600; background:rgba(49,220,145,.1); border-radius:10px; padding:8px 12px; }
.cupom-applied strong { font-weight:800; }
.cupom-remove { margin-left:auto; background:none; border:none; cursor:pointer; color:var(--text-light); font-size:16px; }
.cupom-remove:hover { color:var(--danger); }

.dt-panel-obs { width:100%; padding:8px 10px; border:1.5px solid var(--border); border-radius:8px; font-family:'Montserrat',sans-serif; font-size:11px; resize:none; height:54px; color:var(--text-dark); background:var(--bg-light); transition:all .3s; margin:8px 0 7px; }
.dt-panel-obs:focus { outline:none; border-color:var(--primary-blue); background:white; }
.dt-panel-btn-row { display:flex; gap:8px; }
.dt-btn-enviar { flex:1; padding:11px; border:none; border-radius:9px; background:linear-gradient(135deg,var(--primary-green),var(--dark-green)); color:white; font-family:'Montserrat',sans-serif; font-size:12px; font-weight:700; cursor:pointer; transition:all .3s; display:flex; align-items:center; justify-content:center; gap:7px; }
.dt-btn-enviar:hover { transform:translateY(-1px); box-shadow:0 4px 14px rgba(49,220,145,.35); }
.dt-btn-cancelar { flex:1; padding:9px; border:1.5px solid var(--danger,#e74c3c); border-radius:9px; background:transparent; color:var(--danger,#e74c3c); font-family:'Montserrat',sans-serif; font-size:11px; font-weight:700; cursor:pointer; transition:all .2s; display:flex; align-items:center; justify-content:center; gap:6px; }
.dt-btn-cancelar:hover { background:var(--danger,#e74c3c); color:#fff; }
.dt-btn-orcamento { width:100%; padding:9px; border:2px solid var(--primary-blue); border-radius:9px; background:transparent; color:var(--primary-blue); font-family:'Montserrat',sans-serif; font-size:11px; font-weight:700; cursor:pointer; transition:all .3s; display:flex; align-items:center; justify-content:center; gap:6px; text-decoration:none; }
.dt-btn-orcamento:hover { background:rgba(68,168,233,.08); transform:translateY(-1px); }

/* Banner de boas-vindas */
.dt-welcome-banner {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; padding: 60px 40px; text-align: center;
}
.dt-welcome-icon { margin-bottom: 28px; }
.dt-welcome-icon img { width: 220px; height: auto; display: block; }
.dt-welcome-title { font-size: 26px; font-weight: 800; color: var(--text-dark); letter-spacing: -.5px; margin-bottom: 12px; }
.dt-welcome-sub { font-size: 15px; color: var(--text-light); line-height: 1.7; max-width: 420px; margin-bottom: 40px; }
.dt-welcome-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
    max-width: 460px; width: 100%; margin-bottom: 32px;
}
.dt-welcome-stat { background: var(--bg-light); border-radius: 14px; padding: 18px 12px; border: 1px solid var(--border); }
.dt-welcome-stat-num { font-size: 22px; font-weight: 800; color: var(--primary-blue); margin-bottom: 4px; }
.dt-welcome-stat-label { font-size: 10px; color: var(--text-light); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.dt-welcome-cta { font-size: 13px; color: var(--text-light); background: var(--bg-light); padding: 10px 20px; border-radius: 20px; border: 1px dashed var(--border); }

/* Filtro de cotações (mobile) */
.cot-filters { display: flex; gap: 8px; margin-bottom: 14px; }
.cot-search-wrap { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--white); border: 1.5px solid var(--border); border-radius: 10px; padding: 0 12px; }
.cot-search-wrap i { color: var(--text-light); font-size: 13px; flex-shrink: 0; }
.cot-search-input { flex: 1; border: none; outline: none; font-size: 13px; font-family: 'Montserrat', sans-serif; background: transparent; color: var(--text-dark); padding: 10px 0; }
.cot-search-input::placeholder { color: var(--text-light); }
.cot-date-input { border: 1.5px solid var(--border); border-radius: 10px; padding: 0 10px; font-size: 12px; font-family: 'Montserrat', sans-serif; color: var(--text-dark); background: var(--white); outline: none; cursor: pointer; height: 40px; }
.cot-date-input::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }

/* Botão imprimir (desktop only) */
.action-btn-print { background: rgba(107,124,147,.10); color: #4a5568; border: 1.5px solid rgba(107,124,147,.25); }
.action-btn-print:hover { background: rgba(107,124,147,.18); }

/* Filtro de cotações (desktop topbar) */
.dt-cot-date-input { border: 1.5px solid var(--border); border-radius: 10px; padding: 0 12px; font-size: 13px; font-family: 'Montserrat', sans-serif; color: var(--text-dark); background: var(--white); outline: none; cursor: pointer; height: 38px; }
.dt-cot-date-input::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }

/* ═══════════ DESKTOP ≥ 1024px ═══════════ */
@media (min-width: 1024px) {
    body { height:100vh; overflow:hidden; }

    #appScreen { flex-direction:row; height:100vh; overflow:hidden; }

    /* Wrapper exclusivo do desktop.php */
    .dt-layout { display:flex; width:100%; height:100vh; overflow:hidden; }

    /* Desliga mobile UI */
    .app-header  { display:none !important; }
    .bottom-nav  { display:none !important; }
    .app-content { display:none !important; }

    /* Liga desktop UI */
    .dt-sidebar { display:flex; }
    .dt-main    { display:flex; }
    .dt-panel   { display:flex; }

    .dt-products-grid { grid-template-columns:repeat(4,1fr); }

    /* Modais centralizados */
    .client-modal-overlay, .edit-cot-overlay, .modal-overlay { align-items:center; justify-content:center; }
    .client-modal-sheet { max-width:540px; border-radius:20px; max-height:88vh; margin:auto; }
    .edit-cot-sheet     { max-width:560px; border-radius:20px; max-height:88vh; margin:auto; }
    .modal-sheet        { max-width:680px; border-radius:20px; width:90%; margin:auto; }
    .modal-handle       { display:none; }

    ::-webkit-scrollbar { width:6px; }
    ::-webkit-scrollbar-track { background:var(--bg-light); }
    ::-webkit-scrollbar-thumb { background:var(--border); border-radius:6px; }
}

/* Telas ainda maiores: 6 colunas */
@media (min-width: 1440px) {
    .dt-products-grid  { grid-template-columns:repeat(6,1fr); gap:12px; }
    .dt-panel          { width:320px; }
}

/* Telas intermediárias: 3 colunas */
@media (min-width: 1024px) and (max-width: 1279px) {
    .dt-products-grid { grid-template-columns:repeat(3,1fr); }
}

/* ─────────────────────────────────────────────────
   MODAL PRODUTO — ajustes de altura e imagem
───────────────────────────────────────────────── */
.modal-sheet {
    max-height: 92vh;
    overflow-y: auto;
}

.modal-product-img img {
    max-height: 160px;
    width: auto;
    object-fit: contain;
}

/* Tabela de detalhes do produto */
.product-detail-table { width:100%; border-collapse:collapse; margin:12px 0; }
.product-detail-table td { padding:6px 8px; font-size:12px; vertical-align:top; border-bottom:1px solid var(--border); }
.product-detail-table td:last-child { border-bottom:none; }
.pdt-label { color:var(--text-light); font-weight:600; white-space:nowrap; width:40%; }
.pdt-value { color:var(--text-dark); font-weight:500; }
.pdt-section-title { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--primary-blue); padding:10px 8px 4px; }
.pdt-complemento { font-size:12px; color:var(--text-dark); line-height:1.6; padding:6px 8px 10px; background:var(--bg-light); border-radius:8px; margin-top:4px; }

/* Quantidade no modal — input */
input.modal-qty-value {
    width: 52px;
    text-align: center;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    background: var(--bg-light);
    padding: 6px 4px;
    outline: none;
    -moz-appearance: textfield;
}
input.modal-qty-value::-webkit-inner-spin-button,
input.modal-qty-value::-webkit-outer-spin-button { -webkit-appearance: none; }
input.modal-qty-value:focus { border-color: var(--primary-blue); background: var(--white); }

/* ─────────────────────────────────────────────────
   BUSCA INTELIGENTE — Autocomplete dropdown
───────────────────────────────────────────────── */
.search-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    z-index: 200;
    overflow: hidden;
    max-height: 380px;
    overflow-y: auto;
}

.search-sugg-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}
.search-sugg-item:last-of-type { border-bottom: none; }
.search-sugg-item:hover { background: var(--bg-light); }

.search-sugg-img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--bg-light);
    border: 1px solid var(--border);
    padding: 3px;
    flex-shrink: 0;
}

.search-sugg-info { flex: 1; min-width: 0; }
.search-sugg-name { font-size: 13px; font-weight: 600; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-sugg-meta { font-size: 11px; color: var(--text-light); margin-top: 2px; }

.search-sugg-footer {
    padding: 10px 14px;
    font-size: 12px;
    color: var(--primary-blue);
    font-weight: 600;
    cursor: pointer;
    background: var(--bg-light);
    border-top: 1px solid var(--border);
    text-align: center;
    transition: background .15s;
}
.search-sugg-footer:hover { background: rgba(68,168,233,.08); }

/* Posicionamento no desktop (dentro do topbar) */
.dt-topbar-search { position: relative; }

/* ─────────────────────────────────────────────────
   RESULTADOS DE BUSCA — agrupados por categoria
───────────────────────────────────────────────── */
.search-cat-group { margin-bottom: 28px; }
.search-cat-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    padding: 8px 0 10px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.search-cat-title i { color: var(--primary-blue); }

/* ─────────────────────────────────────────────────
   MODAL — botão X de fechar
───────────────────────────────────────────────── */
.modal-close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    z-index: 1;
}
.modal-close-btn:hover { background: var(--border); color: var(--text-dark); }
.modal-sheet { position: relative; }

/* ─────────────────────────────────────────────────
   TELA DE CLIENTES — Desktop
───────────────────────────────────────────────── */
.dt-cliente-list { display:flex; flex-direction:column; gap:8px; }
.dt-cliente-card { background:white; border-radius:12px; padding:14px 16px; border:1.5px solid var(--border); cursor:pointer; transition:all .2s; display:flex; align-items:center; gap:14px; }
.dt-cliente-card:hover { border-color:var(--primary-blue); box-shadow:0 2px 12px rgba(68,168,233,.12); }
.dt-cliente-avatar { width:40px; height:40px; border-radius:50%; background:linear-gradient(135deg,var(--primary-blue),var(--dark-blue)); display:flex; align-items:center; justify-content:center; color:white; font-size:13px; font-weight:700; flex-shrink:0; }
.dt-cliente-info { flex:1; min-width:0; }
.dt-cliente-razao { font-size:13px; font-weight:700; color:var(--text-dark); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:2px; }
.dt-cliente-meta { font-size:11px; color:var(--text-light); }
.dt-cliente-uf { flex-shrink:0; font-size:11px; font-weight:700; color:var(--primary-blue); background:rgba(68,168,233,.1); padding:3px 8px; border-radius:20px; }
.dt-clientes-pagination { display:flex; align-items:center; justify-content:center; gap:12px; padding:16px 0; }
.dt-clientes-pagination button { padding:7px 18px; border:1.5px solid var(--border); border-radius:8px; background:white; font-family:'Montserrat',sans-serif; font-size:12px; font-weight:600; cursor:pointer; transition:all .2s; color:var(--text-dark); }
.dt-clientes-pagination button:hover:not(:disabled) { border-color:var(--primary-blue); color:var(--primary-blue); }
.dt-clientes-pagination button:disabled { opacity:.4; cursor:default; }
.dt-clientes-pagination span { font-size:12px; color:var(--text-light); font-weight:600; }

/* ─────────────────────────────────────────────────
   DASHBOARD
───────────────────────────────────────────────── */
.dt-dash-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:20px; }
.dt-dash-stat { background:white; border-radius:14px; padding:18px 16px; border:1px solid var(--border); display:flex; align-items:center; gap:14px; }
.dt-dash-stat-icon { width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; color:white; font-size:18px; flex-shrink:0; }
.dt-dash-stat-val { font-size:26px; font-weight:800; color:var(--text-dark); line-height:1; margin-bottom:3px; }
.dt-dash-stat-lbl { font-size:11px; color:var(--text-light); font-weight:600; text-transform:uppercase; letter-spacing:.4px; }
.dt-dash-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:20px; }
.dt-dash-card { background:white; border-radius:14px; padding:18px; border:1px solid var(--border); margin-bottom:20px; }
.dt-dash-card-hd { font-size:13px; font-weight:700; color:var(--text-dark); margin-bottom:14px; display:flex; align-items:center; gap:8px; }
.dt-dash-card-hd i { color:var(--primary-blue); }
/* Power BI embed card */
.dash-powerbi-card { padding-bottom:18px; overflow:hidden; }
.dash-powerbi-wrap { width:100%; height:60vh; min-height:280px; border-radius:0 0 12px 12px; overflow:hidden; background:var(--bg-light); }
.dash-powerbi-wrap iframe { width:100%; height:100%; border:none; display:block; }
@media (min-width:1024px) { .dash-powerbi-wrap { height:78vh; min-height:500px; } }
/* Top cotações list */
.dt-top-cot-item { display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid var(--border); }
.dt-top-cot-item:last-child { border-bottom:none; }
.dt-top-cot-rank { width:24px; height:24px; border-radius:50%; background:var(--bg-light); display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:800; color:var(--text-light); flex-shrink:0; }
.dt-top-cot-rank.gold   { background:linear-gradient(135deg,#f6d365,#fda085); color:white; }
.dt-top-cot-rank.silver { background:linear-gradient(135deg,#e0e0e0,#bdbdbd); color:white; }
.dt-top-cot-rank.bronze { background:linear-gradient(135deg,#d4a574,#b8860b); color:white; }
.dt-top-cot-info { flex:1; min-width:0; }
.dt-top-cot-cliente { font-size:12px; font-weight:700; color:var(--text-dark); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dt-top-cot-meta { font-size:11px; color:var(--text-light); }
.dt-top-cot-itens { font-size:12px; font-weight:800; color:var(--primary-blue); flex-shrink:0; }
/* Abertos list */
.dt-aberto-item { display:flex; align-items:center; gap:10px; padding:11px 0; border-bottom:1px solid var(--border); }
.dt-aberto-item:last-child { border-bottom:none; }
.dt-aberto-info { flex:1; min-width:0; }
.dt-aberto-num { font-size:12px; font-weight:800; color:var(--text-dark); margin-bottom:2px; }
.dt-aberto-cliente { font-size:12px; color:var(--text-light); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dt-aberto-meta { font-size:11px; color:var(--text-light); }
.dt-aberto-actions { display:flex; gap:6px; flex-shrink:0; }
.dt-aberto-btn { padding:5px 12px; border-radius:6px; font-size:11px; font-weight:700; cursor:pointer; font-family:'Montserrat',sans-serif; border:none; transition:all .2s; }
.dt-aberto-btn-cont { background:rgba(68,168,233,.12); color:var(--primary-blue); }
.dt-aberto-btn-cont:hover { background:rgba(68,168,233,.22); }
.dt-aberto-btn-del { background:rgba(231,76,60,.1); color:var(--danger); }
.dt-aberto-btn-del:hover { background:rgba(231,76,60,.2); }
@media (max-width:1279px) {
    .dt-dash-stats { grid-template-columns:repeat(2,1fr); }
    .dt-dash-grid  { grid-template-columns:1fr; }
}

/* ── Dashboard Accordion ─────────────────────────────────────────────────── */
.dt-acc-hd { cursor:pointer; user-select:none; }
.dt-acc-toggle { margin-left:auto; background:none; border:none; color:var(--text-light); cursor:pointer; padding:0; font-size:12px; transition:transform .25s; flex-shrink:0; }
.dt-acc-card.acc-collapsed .dt-acc-toggle { transform:rotate(-90deg); }
.dt-acc-body { overflow:hidden; transition:height .3s ease, opacity .25s ease; opacity:1; }
.dt-acc-card.acc-collapsed .dt-acc-body { opacity:0; pointer-events:none; }
.dt-acc-card.acc-collapsed .dt-dash-card-hd { margin-bottom:0; }

/* ── Dashboard — barra Estatísticas + filtro ─────────────────────────────── */
.dash-stats-bar { display:flex; align-items:center; background:var(--bg-light); border-radius:12px; padding:12px 16px; margin-bottom:16px; border:1px solid var(--border); gap:10px; }
.dash-stats-bar-title { font-size:13px; font-weight:700; color:var(--text-dark); display:flex; align-items:center; gap:8px; }
.dash-stats-bar-title i { color:var(--primary-blue); }
.dash-filter-btn { margin-left:auto; background:none; border:1px solid var(--border); border-radius:8px; padding:6px 12px; cursor:pointer; font-size:12px; font-weight:600; color:var(--text-mid); display:flex; align-items:center; gap:6px; transition:background .15s; font-family:'Montserrat',sans-serif; white-space:nowrap; }
.dash-filter-btn:hover { background:white; }
.dash-filter-btn i { color:var(--primary-blue); }
.dash-filter-btn.active { background:rgba(68,168,233,.1); border-color:var(--primary-blue); color:var(--primary-blue); }
.dash-filter-panel { background:white; border-radius:12px; border:1px solid var(--border); padding:14px 16px; margin-bottom:16px; display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap; }
.dash-filter-field { display:flex; flex-direction:column; gap:4px; }
.dash-filter-field label { font-size:11px; font-weight:600; color:var(--text-light); }
.dash-filter-field input[type="date"] { border:1px solid var(--border); border-radius:8px; padding:7px 10px; font-size:13px; font-family:'Montserrat',sans-serif; color:var(--text-dark); background:var(--bg-light); }
.dash-filter-apply { background:var(--primary-blue); color:white; border:none; border-radius:8px; padding:8px 16px; font-size:13px; font-weight:600; cursor:pointer; font-family:'Montserrat',sans-serif; }
.dash-filter-reset { background:none; color:var(--text-light); border:1px solid var(--border); border-radius:8px; padding:8px 14px; font-size:12px; font-weight:600; cursor:pointer; font-family:'Montserrat',sans-serif; }

/* ── Dashboard — KPI grid ────────────────────────────────────────────────── */
.dash-kpi-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
.dash-kpi-row3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px; margin-bottom:14px; }
.dash-kpi-row2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:20px; }
@media (max-width:1279px) { .dash-kpi-row3 { grid-template-columns:1fr 1fr; } }
@media (max-width:599px)  { .dash-kpi-row3 { grid-template-columns:1fr; } .dash-kpi-row2 { grid-template-columns:1fr; } }
.dash-kpi-val { font-size:26px; font-weight:800; color:var(--text-dark); line-height:1.2; margin-bottom:4px; }
.dash-kpi-sub { font-size:12px; color:var(--text-light); }
.dash-kpi-compare { display:flex; align-items:center; gap:8px; }
.dash-kpi-compare-item { flex:1; min-width:0; }
.dash-kpi-compare-lbl { font-size:11px; color:var(--text-light); font-weight:600; margin-bottom:3px; }
.dash-kpi-compare-val { font-size:15px; font-weight:800; color:var(--text-dark); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dash-kpi-compare-val.green { color:#1ea86a; }
.dash-kpi-compare-sep { color:var(--border); font-size:13px; flex-shrink:0; }
.dash-kpi-top5-title { font-size:10px; font-weight:700; color:var(--text-light); margin:10px 0 5px; text-transform:uppercase; letter-spacing:.5px; }
.dash-kpi-top5-row { display:flex; align-items:center; gap:6px; padding:5px 0; border-bottom:1px solid var(--border); }
.dash-kpi-top5-row:last-child { border-bottom:none; }
.dash-kpi-top5-rank { width:18px; height:18px; border-radius:50%; background:var(--bg-light); display:flex; align-items:center; justify-content:center; font-size:9px; font-weight:800; color:var(--text-light); flex-shrink:0; }
.dash-kpi-top5-nome { flex:1; font-size:11px; color:var(--text-dark); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dash-kpi-top5-val { font-size:11px; font-weight:700; color:var(--primary-blue); white-space:nowrap; }
.dash-chart-empty { text-align:center; padding:28px 16px; color:var(--text-light); font-size:13px; }
.dash-chart-empty i { font-size:26px; opacity:.2; display:block; margin-bottom:8px; }
@media (max-width:479px) { .dash-kpi-grid { grid-template-columns:1fr; } }

/* ─────────────────────────────────────────────────
   SORT TOGGLE — tela de clientes
───────────────────────────────────────────────── */
.dt-sort-toggle { display:flex; gap:6px; align-items:center; }
.dt-sort-btn { padding:5px 14px; border:1.5px solid var(--border); border-radius:20px; background:transparent; font-family:'Montserrat',sans-serif; font-size:11px; font-weight:600; cursor:pointer; color:var(--text-light); transition:all .2s; white-space:nowrap; }
.dt-sort-btn:hover { border-color:var(--primary-blue); color:var(--primary-blue); }
.dt-sort-btn.active { background:var(--primary-blue); border-color:var(--primary-blue); color:#fff; }

/* Badge de orçamentos no card do cliente */
.dt-cliente-orc-badge { flex-shrink:0; font-size:10px; font-weight:700; color:var(--primary-green); background:rgba(49,220,145,.12); padding:3px 8px; border-radius:20px; display:flex; align-items:center; gap:4px; }

/* Badge de contatos no card do cliente */
.dt-cliente-contact-badge { flex-shrink:0; font-size:10px; font-weight:700; color:#6c63ff; background:rgba(108,99,255,.12); padding:3px 8px; border-radius:20px; display:flex; align-items:center; gap:4px; }

/* ─────────────────────────────────────────────────
   THEME TOGGLE — perfil
───────────────────────────────────────────────── */
.theme-toggle-wrap { display:flex; gap:8px; margin-top:8px; }
.theme-btn { padding:7px 18px; border:1.5px solid var(--border); border-radius:8px; background:transparent; font-family:'Montserrat',sans-serif; font-size:12px; font-weight:600; cursor:pointer; color:var(--text-light); transition:all .2s; display:flex; align-items:center; gap:6px; }
.theme-btn:hover { border-color:var(--primary-blue); color:var(--primary-blue); }
.theme-btn.active { background:var(--primary-blue); border-color:var(--primary-blue); color:#fff; }
.theme-btn.active i { color:#fff; }

/* ─────────────────────────────────────────────────
   CONTACT MODAL — contatos do cliente
───────────────────────────────────────────────── */
.contact-item {
    background: var(--bg-light);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    text-align: left;
    width: 100%;
}
.contact-item:hover { border-color: var(--primary-blue); background: rgba(68,168,233,.06); }
.contact-item-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-dark);
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.contact-item-info {
    font-size: 11px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}
#contactListSection, #contactFormSection { width: 100%; text-align: left; }

/* ─────────────────────────────────────────────────
   CLIENT DETAIL — split 60/40 + contact cards
───────────────────────────────────────────────── */
.dt-cliente-detail-split {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.dt-cliente-detail-hd {
    display: flex;
    align-items: center;
    gap: 14px;
}
.dt-cliente-detail-avatar {
    width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px; font-weight: 700;
    box-shadow: 0 2px 8px rgba(30,90,200,.18);
}
.dt-cliente-detail-name {
    font-size: 15px; font-weight: 700; color: var(--text-main);
    line-height: 1.25; margin-bottom: 2px;
}
.dt-cliente-detail-cnpj {
    font-size: 11px; color: var(--text-light); letter-spacing: .3px;
}
.dt-cliente-detail-left  { flex: 0 0 58%; min-width: 0; }
.dt-cliente-detail-right {
    flex: 1;
    min-width: 0;
    border-left: 1px solid var(--border);
    padding-left: 20px;
}
.dt-contatos-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.dt-contatos-hd-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-light);
}

/* Contact card */
.dt-contato-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: stretch;
    gap: 10px;
    transition: border-color .15s;
}
.dt-contato-card:hover { border-color: var(--primary-blue); }
.dt-contato-card-info  { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.dt-contato-card-nome  {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}
.dt-contato-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--text-light);
    align-items: center;
}
.dt-contato-card-meta i { font-size: 10px; margin-right: 3px; }
.dt-contato-card-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 6px;
}
.dt-contato-tag-ativo {
    font-size: 10px;
    font-weight: 700;
    background: rgba(49,220,145,.12);
    color: #1ea86a;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.dt-contato-card-btn {
    flex: 1;
    border: 1.5px solid var(--border);
    background: var(--bg-light);
    border-radius: 7px;
    padding: 0 12px;
    cursor: pointer;
    color: var(--text-light);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: border-color .15s, color .15s;
    white-space: nowrap;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}
.dt-contato-card-btn:hover { border-color: var(--primary-blue); color: var(--primary-blue); }

/* ─────────────────────────────────────────────────
   WIZARD SALVAR / ENVIAR
───────────────────────────────────────────────── */
.wiz-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9000;
    align-items: center;
    justify-content: center;
}
.wiz-overlay.active { display: flex; }

.wiz-sheet {
    background: var(--white);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 26px 28px 22px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
}

.wiz-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}
.wiz-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -.3px;
}

/* Linha do tempo */
.wiz-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
}
.wiz-step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.wiz-step-dot {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 2.5px solid var(--border);
    background: var(--bg-light);
    display: flex; align-items: center; justify-content: center;
    transition: all .25s;
}
.wiz-step-dot span {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-light);
    transition: color .25s;
}
.wiz-step-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .4px;
    transition: color .25s;
    white-space: nowrap;
}
.wiz-step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 6px;
    margin-bottom: 20px;
    transition: background .25s;
}
/* Ativo */
.wiz-step-node.active .wiz-step-dot {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(68,168,233,.18);
}
.wiz-step-node.active .wiz-step-dot span { color: #fff; }
.wiz-step-node.active .wiz-step-label    { color: var(--primary-blue); }
/* Concluído */
.wiz-step-node.done .wiz-step-dot {
    border-color: var(--primary-green);
    background: var(--primary-green);
}
.wiz-step-node.done .wiz-step-dot span { color: #fff; }
.wiz-step-node.done .wiz-step-label    { color: var(--primary-green); }
.wiz-step-line.done { background: var(--primary-green); }

/* Corpo do passo */
.wiz-body { padding: 4px 0 8px; }
.wiz-body-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

/* Botões FOB / CIF */
.wiz-frete-row { display: flex; gap: 12px; margin-bottom: 14px; }
.wiz-frete-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 10px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: var(--bg-light);
    cursor: pointer;
    transition: all .2s;
    font-family: 'Montserrat', sans-serif;
}
.wiz-frete-btn i    { font-size: 22px; color: var(--text-light); transition: color .2s; }
.wiz-frete-btn span { font-size: 14px; font-weight: 800; color: var(--text-dark); }
.wiz-frete-btn small { font-size: 10px; color: var(--text-light); text-align: center; line-height: 1.4; }
.wiz-frete-btn:hover { border-color: var(--primary-blue); background: rgba(68,168,233,.06); }
.wiz-frete-btn:hover i { color: var(--primary-blue); }
.wiz-frete-btn.selected {
    border-color: var(--primary-blue);
    background: rgba(68,168,233,.08);
    box-shadow: 0 0 0 3px rgba(68,168,233,.15);
}
.wiz-frete-btn.selected i    { color: var(--primary-blue); }
.wiz-frete-btn.selected span { color: var(--primary-blue); }

.wiz-field-cond { margin-top: 4px; }

/* Labels e inputs */
.wiz-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 6px;
}
.wiz-req { color: var(--danger); }
.wiz-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: var(--text-dark);
    background: var(--bg-light);
    outline: none;
    transition: border-color .2s, background .2s;
    box-sizing: border-box;
}
.wiz-input:focus { border-color: var(--primary-blue); background: var(--white); }
.wiz-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: var(--text-dark);
    background: var(--bg-light);
    outline: none;
    resize: vertical;
    transition: border-color .2s, background .2s;
    box-sizing: border-box;
    line-height: 1.55;
}
.wiz-textarea:focus { border-color: var(--primary-blue); background: var(--white); }
.wiz-textarea-lg { height: 180px; resize: vertical; }

/* Select condição de pagamento */
.wiz-select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: var(--text-dark);
    background: var(--bg-light);
    outline: none;
    cursor: pointer;
    transition: border-color .2s;
    box-sizing: border-box;
}
.wiz-select:focus { border-color: var(--primary-blue); }

/* Nota informativa */
.wiz-info-note {
    font-size: 11px;
    color: var(--text-light);
    background: rgba(68,168,233,.07);
    border: 1px solid rgba(68,168,233,.2);
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 12px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 7px;
}
.wiz-info-note i { color: var(--primary-blue); margin-top: 1px; flex-shrink: 0; }
.wiz-info-note strong { color: var(--text-dark); }

/* Botões Email / WhatsApp */
.wiz-envio-row { display: flex; gap: 12px; margin-bottom: 16px; }
.wiz-envio-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 10px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: var(--bg-light);
    cursor: pointer;
    transition: all .2s;
    font-family: 'Montserrat', sans-serif;
}
.wiz-envio-btn i    { font-size: 24px; color: var(--text-light); transition: color .2s; }
.wiz-envio-btn span { font-size: 12px; font-weight: 700; color: var(--text-dark); }
.wiz-envio-btn:hover { border-color: var(--primary-blue); background: rgba(68,168,233,.06); }
.wiz-envio-btn:hover i { color: var(--primary-blue); }
.wiz-envio-btn.selected {
    border-color: var(--primary-blue);
    background: rgba(68,168,233,.08);
    box-shadow: 0 0 0 3px rgba(68,168,233,.15);
}
.wiz-envio-btn.selected i    { color: var(--primary-blue); }
.wiz-envio-btn.selected span { color: var(--primary-blue); }

.wiz-envio-form { padding-top: 4px; }

/* Botão Enviar (dentro do form) */
.wiz-btn-enviar {
    width: 100%;
    margin-top: 14px;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity .2s, transform .15s;
}
.wiz-btn-enviar:hover    { opacity: .9; transform: translateY(-1px); }
.wiz-btn-enviar:disabled { opacity: .55; cursor: default; transform: none; }
.wiz-btn-wpp { background: linear-gradient(135deg, #25D366, #128C7E); }

/* ── Qualificação do Lead (step wizard) ── */
.wiz-qual-herdado {
    background: rgba(59,130,246,.07);
    border: 1px solid rgba(59,130,246,.22);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-secondary, #555);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}
.wiz-qual-herdado i { color: var(--primary, #2563eb); flex-shrink: 0; }

.wiz-qual-pergunta {
    background: var(--bg, #f5f7fa);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
    border: 1px solid var(--border, #e0e6ed);
}
.wiz-qual-pergunta-titulo {
    font-size: 13px;
    font-weight: 700;
    color: var(--text, #2c3e50);
    margin-bottom: 10px;
    line-height: 1.4;
}
.wiz-qual-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    margin-bottom: 5px;
    transition: background .15s, border-color .15s;
    font-size: 13px;
    color: var(--text, #2c3e50);
}
.wiz-qual-option:hover { background: rgba(68,168,233,.07); }
.wiz-qual-option.selected {
    background: rgba(68,168,233,.13);
    border-color: var(--primary-blue, #44A8E9);
}
.wiz-qual-option input[type="radio"] { flex-shrink: 0; accent-color: var(--primary-blue, #44A8E9); }
.wiz-qual-option-texto { flex: 1; }
.wiz-qual-peso {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary-blue, #44A8E9);
    background: rgba(68,168,233,.12);
    border-radius: 20px;
    padding: 2px 8px;
    white-space: nowrap;
}
.wiz-qual-erro {
    color: #ef4444;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Badges de qualificação (histórico de cotações) ── */
.qual-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}
.qual-badge-frio   { background: rgba(239,68,68,.12);  color: #ef4444; }
.qual-badge-morno  { background: rgba(245,158,11,.12); color: #d97706; }
.qual-badge-quente { background: rgba(34,197,94,.12);  color: #16a34a; }

/* Navegação inferior */
.wiz-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.wiz-nav-btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
}
.wiz-nav-back {
    background: var(--bg-light);
    border: 1.5px solid var(--border);
    color: var(--text-light);
}
.wiz-nav-back:hover { border-color: var(--text-light); color: var(--text-dark); }
.wiz-nav-next {
    background: var(--primary-blue);
    border: none;
    color: #fff;
    margin-left: auto;
}
.wiz-nav-next:hover { opacity: .88; }

/* ═══════════════════════════════════════════════
   KIT WIZARD
═══════════════════════════════════════════════ */
.kit-wiz-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 50000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.kit-wiz-overlay.active { display: flex; }
.kit-wiz-modal {
    background: var(--white);
    border-radius: 18px;
    width: 480px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0,0,0,.28);
    display: flex;
    flex-direction: column;
}
.kit-wiz-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}
.kit-wiz-header-title { font-size: 14px; font-weight: 800; color: var(--text-dark); }
.kit-wiz-header-sub   { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.kit-wiz-close {
    background: none; border: none; cursor: pointer;
    color: var(--text-light); font-size: 16px; padding: 4px; line-height: 1; flex-shrink: 0;
}
.kit-wiz-close:hover { color: var(--danger); }

/* Step indicator bar */
.kit-wiz-steps-bar {
    display: flex;
    align-items: center;
    padding: 16px 20px 10px;
}
.kit-wiz-step-indicator {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--border); color: var(--text-light);
    font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: background .2s, color .2s;
}
.kit-wiz-step-indicator.active { background: var(--primary-blue); color: #fff; }
.kit-wiz-step-indicator.done   { background: var(--primary-green); color: #fff; }
.kit-wiz-step-line { flex: 1; height: 2px; background: var(--border); margin: 0 6px; }

/* Step content */
.kit-wiz-body { padding: 16px 20px; flex: 1; }
.kit-wiz-step { display: none; }
.kit-wiz-step.kw-active { display: block; }
.kit-wiz-step-title { font-size: 13px; font-weight: 700; color: var(--text-dark); margin-bottom: 14px; }
.kit-wiz-select {
    width: 100%; padding: 10px 12px;
    border: 1.5px solid var(--border); border-radius: 10px;
    font-size: 13px; color: var(--text-dark); background: var(--white);
    cursor: pointer; font-family: 'Montserrat', sans-serif;
}
.kit-wiz-select:focus { outline: none; border-color: var(--primary-blue); }

/* Quantity row */
.kit-wiz-qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.kit-wiz-qty-btn {
    width: 42px; height: 42px; border-radius: 10px;
    border: 1.5px solid var(--border); background: var(--bg-light);
    font-size: 22px; cursor: pointer; display: flex; align-items: center;
    justify-content: center; color: var(--text-dark); flex-shrink: 0;
}
.kit-wiz-qty-btn:hover { background: var(--primary-blue); color: #fff; border-color: var(--primary-blue); }
.kit-wiz-qty-input {
    flex: 1; padding: 8px 12px;
    border: 1.5px solid var(--border); border-radius: 10px;
    font-size: 20px; font-weight: 700; text-align: center;
    color: var(--text-dark); background: var(--white);
    font-family: 'Montserrat', sans-serif;
}
.kit-wiz-qty-input:focus { outline: none; border-color: var(--primary-blue); }
input[type=number].kit-wiz-qty-input::-webkit-inner-spin-button,
input[type=number].kit-wiz-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Summary box */
.kit-wiz-summary {
    background: var(--bg-light); border-radius: 10px;
    padding: 12px 14px; font-size: 12px; color: var(--text-dark);
    border: 1px solid var(--border);
}
.kit-wiz-summary-row { margin-bottom: 6px; line-height: 1.4; }
.kit-wiz-summary-row:last-child { margin-bottom: 0; }

/* Footer */
.kit-wiz-footer {
    display: flex; gap: 10px;
    padding: 14px 20px 18px; border-top: 1px solid var(--border);
}
.kit-wiz-btn-back {
    flex: 1; padding: 10px; border: 1.5px solid var(--border);
    border-radius: 10px; background: var(--bg-light); color: var(--text-dark);
    font-size: 13px; font-weight: 600; cursor: pointer; font-family: 'Montserrat', sans-serif;
}
.kit-wiz-btn-back:hover { border-color: var(--primary-blue); color: var(--primary-blue); }
.kit-wiz-btn-next {
    flex: 2; padding: 10px; border: none;
    border-radius: 10px; background: var(--primary-blue); color: #fff;
    font-size: 13px; font-weight: 700; cursor: pointer; font-family: 'Montserrat', sans-serif;
}
.kit-wiz-btn-next:hover { opacity: .9; }
.kit-wiz-btn-next:disabled { opacity: .5; cursor: not-allowed; }

/* Cart subtitle for kit items */
.cart-item-kit-sub, .dt-pitem-kit-sub {
    font-size: 10px; color: var(--text-light); margin-top: 2px; font-style: italic;
}

/* Dark theme overrides */
[data-theme="dark"] .wiz-sheet   { background: var(--white); }
[data-theme="dark"] .wiz-frete-btn,
[data-theme="dark"] .wiz-envio-btn { background: var(--bg-light); }
[data-theme="dark"] .wiz-input,
[data-theme="dark"] .wiz-textarea,
[data-theme="dark"] .wiz-select  { background: var(--bg-light); color: var(--text-dark); border-color: var(--border); }
[data-theme="dark"] .wiz-input:focus,
[data-theme="dark"] .wiz-textarea:focus,
[data-theme="dark"] .wiz-select:focus { background: #2d3240; }

/* ═══════════════════════════════════════════════
   DARK THEME
═══════════════════════════════════════════════ */
[data-theme="dark"] {
    --bg-light:   #1a1d23;
    --white:      #252932;
    --text-dark:  #dde4f0;
    --text-light: #8898aa;
    --border:     #2e3444;
    --shadow:     rgba(0,0,0,0.5);
}

[data-theme="dark"] body { background:var(--bg-light); color:var(--text-dark); }

/* Estrutura desktop */
[data-theme="dark"] .dt-sidebar  { background:#1e2330; border-color:var(--border); }
[data-theme="dark"] .dt-topbar   { background:var(--white); border-color:var(--border); }
[data-theme="dark"] .dt-panel    { background:#1e2330; border-color:var(--border); }
[data-theme="dark"] .dt-main     { background:var(--bg-light); }

/* Elementos de navegação */
[data-theme="dark"] .dt-nav-item { color:var(--text-light); }
[data-theme="dark"] .dt-nav-item:hover,
[data-theme="dark"] .dt-nav-item.active { background:rgba(68,168,233,.12); color:var(--primary-blue); }

/* Cards */
[data-theme="dark"] .product-card,
[data-theme="dark"] .cotacao-card,
[data-theme="dark"] .dt-cliente-card,
[data-theme="dark"] .dt-dash-stat,
[data-theme="dark"] .dt-dash-card,
[data-theme="dark"] .profile-card,
[data-theme="dark"] .profile-hero { background:var(--white) !important; border-color:var(--border) !important; }

/* Painel direito */
[data-theme="dark"] .dt-pitem { background:rgba(255,255,255,.04); border-color:var(--border); }
[data-theme="dark"] .dt-panel-ft { border-color:var(--border); }

/* Inputs */
[data-theme="dark"] .dt-search-input,
[data-theme="dark"] .search-input,
[data-theme="dark"] .form-input,
[data-theme="dark"] .dt-panel-obs { background:rgba(255,255,255,.05); border-color:var(--border); color:var(--text-dark); }
[data-theme="dark"] .dt-search-input::placeholder,
[data-theme="dark"] .search-input::placeholder,
[data-theme="dark"] .dt-panel-obs::placeholder { color:var(--text-light); }

/* Search bar wrapper */
[data-theme="dark"] .dt-topbar-search { background:rgba(255,255,255,.06); border-color:var(--border); }

/* Modais */
[data-theme="dark"] .modal-overlay { background:rgba(0,0,0,.65); }
[data-theme="dark"] .modal-sheet,
[data-theme="dark"] .client-modal-sheet { background:#1e2330; }
[data-theme="dark"] #cnpjLookupOverlay { background:rgba(30,35,48,.88) !important; }
[data-theme="dark"] #cnpjLookupOverlay > div:last-child { color:var(--primary-blue); }
[data-theme="dark"] .modal-product-img { background:#2a2f3d; }

/* Sugestões de busca */
[data-theme="dark"] .search-suggestions-dropdown { background:var(--white); border-color:var(--border); }
[data-theme="dark"] .search-sugg-item:hover { background:rgba(255,255,255,.06); }
[data-theme="dark"] .search-sugg-footer { background:rgba(68,168,233,.08); }

/* Category chips */
[data-theme="dark"] .cat-chip { background:rgba(255,255,255,.07); border-color:var(--border); color:var(--text-dark); }
[data-theme="dark"] .cat-chip:hover { background:rgba(68,168,233,.15); border-color:var(--primary-blue); }
[data-theme="dark"] .cat-chip.active { background:var(--primary-blue); border-color:var(--primary-blue); color:#fff; }
[data-theme="dark"] .cat-chip-dd { background:#1e2330; border-color:var(--border); box-shadow:0 8px 24px rgba(0,0,0,.4); }
[data-theme="dark"] .cat-chip-dd-item:hover { background:rgba(68,168,233,.15); }
[data-theme="dark"] .cat-chip-dd-sub { background:#1e2330; border-color:var(--border); box-shadow:0 8px 24px rgba(0,0,0,.4); }

/* Sort toggle */
[data-theme="dark"] .dt-sort-btn { border-color:var(--border); color:var(--text-light); }
[data-theme="dark"] .dt-sort-btn:hover { border-color:var(--primary-blue); color:var(--primary-blue); }
[data-theme="dark"] .dt-sort-btn.active { background:var(--primary-blue); border-color:var(--primary-blue); color:#fff; }

/* Theme buttons */
[data-theme="dark"] .theme-btn { border-color:var(--border); color:var(--text-light); }
[data-theme="dark"] .theme-btn.active { background:var(--primary-blue); border-color:var(--primary-blue); color:#fff; }

/* Topbar cats scroll btns */
[data-theme="dark"] .dt-cats-more-btn { background:var(--white); border-color:var(--border); color:var(--text-dark); }

/* Kit Wizard dark */
[data-theme="dark"] .kit-wiz-modal   { background: var(--white); }
[data-theme="dark"] .kit-wiz-select  { background: var(--bg-light); color: var(--text-dark); border-color: var(--border); }
[data-theme="dark"] .kit-wiz-qty-input { background: var(--bg-light); color: var(--text-dark); border-color: var(--border); }
[data-theme="dark"] .kit-wiz-qty-btn { background: rgba(255,255,255,.06); }
[data-theme="dark"] .kit-wiz-summary { background: rgba(255,255,255,.04); border-color: var(--border); }
[data-theme="dark"] .kit-wiz-btn-back { background: rgba(255,255,255,.06); border-color: var(--border); color: var(--text-dark); }

/* Login page em dark — mantém gradiente original */
[data-theme="dark"] #loginScreen { background:linear-gradient(135deg,#1f6fa1,#155a87); }
[data-theme="dark"] .login-card  { background:#252932; color:var(--text-dark); }
[data-theme="dark"] .login-tab   { color:var(--text-light); border-color:var(--border); }
[data-theme="dark"] .form-group label { color:var(--text-dark); }
[data-theme="dark"] .form-input  { background:rgba(255,255,255,.07); border-color:var(--border); color:var(--text-dark); }
