@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Brand Colors Premium da Landing Page */
    --brand-green: #00E676;
    --brand-green-hover: #ffffff; 
    --brand-purple: #833AB4;
    --brand-purple-hover: #702f9c;
    --brand-pink: #E1306C;
    --brand-orange: #F56040;
    --brand-yellow: #FCAF45;
    --brand-gradient: linear-gradient(135deg, var(--brand-purple), var(--brand-pink), var(--brand-orange));
    --brand-blue: #3B82F6;
    
    /* Dark Theme Core */
    --bg-dark: #050505;
    --bg-card: #121212;
    --bg-card-hover: rgba(40, 40, 40, 0.7);
    
    /* Borders & Effects */
    --border-color: rgba(255, 255, 255, 0.05);
    --border-light: rgba(255, 255, 255, 0.12);
    --glass-blur: blur(16px);
    
    /* State Colors */
    --danger: #EF4444;       
    --danger-bg: rgba(239, 68, 68, 0.1);
    --warning: #F59E0B;      
    --success: #10B981;      
    
    /* Typography */
    --text-main: #ffffff;  
    --text-muted: #94a3b8;   
    --text-dark: #cbd5e1;    
    
    /* Spacing & Shapes */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows do LP */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 30px -10px rgba(131, 58, 180, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-glow-green: 0 0 30px rgba(0, 230, 118, 0.3);
    --shadow-glow-purple: 0 0 20px rgba(131, 58, 180, 0.2);
    --shadow-glow-brand: 0 0 30px rgba(225, 48, 108, 0.3);
}

* { box-sizing: border-box; }

html { -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }

body {
    margin: 0; padding: 0;
    background-color: var(--bg-dark);
    /* Removido o background-attachment: fixed que estava travando o FPS */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(131, 58, 180, 0.08), transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(225, 48, 108, 0.06), transparent 20%);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, .brand-logo, .section-title, .title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(to right, var(--brand-purple), var(--brand-pink), var(--brand-orange), var(--brand-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

input, select, textarea { font-family: 'Plus Jakarta Sans', sans-serif; }

::placeholder { color: #a1a1aa !important; opacity: 1 !important; }
:-ms-input-placeholder { color: #a1a1aa !important; }
::-ms-input-placeholder { color: #a1a1aa !important; }

.text-muted { color: var(--text-muted) !important; }
.font-bold { font-weight: 600 !important; }
.font-extrabold { font-weight: 800 !important; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.animate-float { animation: float 6s ease-in-out infinite; }

/* ==========================================
   BLOCK BANNER
========================================== */
.global-warning-banner {
    position: relative; top: 0; left: 0; width: 100%; z-index: 9999;
    background: #dc2626; color: white; padding: 12px 20px;
    text-align: center; font-weight: 800; font-size: 14px;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.5);
    display: flex; align-items: center; justify-content: center; gap: 10px;
    text-transform: uppercase; letter-spacing: 1px;
}

body.has-warning .sidebar-unified {
    top: 45px; 
    height: calc(100vh - 45px);
}
@media (max-width: 768px) {
    body.has-warning .sidebar-unified { top: auto; height: auto; }
}

/* ==========================================
   TERMÔMETROS (BARRAS DE PROGRESSO)
========================================== */
.thermo-container {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    backdrop-filter: var(--glass-blur);
    display: flex; flex-direction: column; gap: 6px;
    min-width: 160px;
    transition: all 0.2s ease;
}
.thermo-container:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.15);
}
.thermo-header {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
    white-space: nowrap;
}
.thermo-bar-bg {
    width: 100%; height: 6px; background: rgba(255,255,255,0.1);
    border-radius: 4px; overflow: hidden;
}
.thermo-bar-fill {
    height: 100%; border-radius: 4px; transition: width 0.5s ease;
}
.thermo-bar-fill.green { background: var(--brand-green); box-shadow: 0 0 10px var(--brand-green); }
.thermo-bar-fill.purple { background: var(--brand-purple); box-shadow: 0 0 10px var(--brand-purple); }
.thermo-bar-fill.danger { background: var(--danger); box-shadow: 0 0 10px var(--danger); }

/* ==========================================
   MENU LATERAL
========================================== */
.sidebar-unified {
    width: 280px; 
    background: rgba(5, 5, 5, 0.85); 
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column; padding: 24px 16px; z-index: 100;
    position: fixed; height: 100vh; top: 0; left: 0;
}
.brand-logo { 
    padding: 0 10px 32px; text-align: center; 
    border-bottom: 1px solid var(--border-color); margin-bottom: 24px;
}
.brand-logo img { max-height: 40px; margin: 0 auto; filter: drop-shadow(0 2px 8px rgba(255,255,255,0.1)); }

.nav-link-custom {
    color: var(--text-muted); 
    padding: 14px 20px; 
    margin-bottom: 8px;
    display: flex; align-items: center; gap: 16px;
    text-decoration: none; font-weight: 500; font-size: 15px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease-in-out; 
    cursor: pointer;
}
.nav-link-custom:hover { 
    color: var(--text-main); 
    background: var(--bg-card-hover); 
}
.nav-link-custom.active { 
    color: var(--brand-pink);
    background: rgba(225, 48, 108, 0.1);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--brand-pink);
}
.nav-link-custom i { font-size: 1.25rem; width: 24px; text-align: center; transition: transform 0.2s; }
.nav-link-custom:hover i { transform: scale(1.1); }

/* ==========================================
   ÁREA PRINCIPAL E CARDS
========================================== */
.main-wrapper { 
    margin-left: 280px; 
    padding: 40px; 
    min-height: 100vh; 
    max-width: 1440px;
    position: relative;
}
.main-wrapper.has-banner { padding-top: 80px; }
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; position: relative; }

.view-section { display: none; animation: animateFadeY 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; transform: translateY(12px); }
.view-section.active { display: block; }
@keyframes animateFadeY { to { opacity: 1; transform: translateY(0); } }

/* Aceleração de hardware adicionada para os cards pesados com blur */
.card, .glass-card {
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.6), rgba(20, 20, 20, 0.4));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    will-change: transform; 
    transform: translateZ(0); 
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl); 
    box-shadow: var(--shadow-md); 
    color: var(--text-main);
    transition: all 0.3s ease;
    padding: 24px;
}
.glass-card:hover {
    background: linear-gradient(145deg, rgba(40, 40, 40, 0.7), rgba(30, 30, 30, 0.5));
    border-color: var(--brand-purple);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.section-title { 
    margin: 0 0 24px 0; 
    font-size: 1.75rem; 
    font-weight: 700; 
    color: var(--text-main); 
    display: flex; align-items: center; gap: 12px; 
}
.title-gestao { font-size: 2.5rem; }

/* ==========================================
   BOTÕES E INPUTS
========================================== */
.btn-brand, .btn-brand-purple, .btn-outline-brand {
    font-family: 'Plus Jakarta Sans', sans-serif;
    border-radius: var(--radius-md); 
    padding: 14px 24px; 
    cursor: pointer;
    display: inline-flex;
    align-items: center; justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
}

.btn-brand {
    background: var(--brand-gradient);
    color: #fff !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    box-shadow: var(--shadow-glow-brand);
}
.btn-brand:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: scale(1.02);
    box-shadow: 0 0 40px rgba(225, 48, 108, 0.4); 
}
.btn-brand:active { transform: scale(0.98); }
.btn-brand:disabled { opacity: 0.7; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-brand-purple {
    background-color: var(--brand-purple);
    color: #fff !important;
    font-weight: 700;
    border: none;
    box-shadow: var(--shadow-glow-purple);
}
.btn-brand-purple:hover { background-color: var(--brand-purple-hover); transform: translateY(-2px); }

.btn-outline-brand {
    background: rgba(225, 48, 108, 0.05) !important;
    color: #f27da5 !important;
    border: 1px solid rgba(225, 48, 108, 0.4) !important;
    font-weight: 600;
}
.btn-outline-brand:hover, .btn-outline-brand.active { 
    background: rgba(225, 48, 108, 0.15) !important;
    border-color: var(--brand-pink) !important; 
}

.form-control-dark { 
    background-color: #050505 !important; 
    border: 1px solid #333 !important; 
    color: var(--text-main) !important; 
    border-radius: var(--radius-md) !important; 
    padding: 14px 16px !important; 
    transition: all 0.3s; 
    font-size: 15px;
}
.form-control-dark:focus {
    border-color: var(--brand-pink) !important;
    box-shadow: 0 0 0 2px rgba(225, 48, 108, 0.2) !important; 
    outline: none; 
}

.search-btn-top {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: var(--glass-blur);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; align-items: center; gap: 10px;
}
.search-btn-top:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--brand-purple);
    box-shadow: var(--shadow-glow-purple);
}
.search-btn-top i { color: var(--text-muted); font-size: 16px; }

/* ==========================================
   DASHBOARD KANBAN / PROPERTY CARDS
========================================== */
.dashboard-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    gap: 24px; 
    margin-bottom: 48px; 
}
/* Aceleração de hardware na property-card */
.property-card { 
    padding: 0 !important; 
    overflow: hidden; 
    cursor: pointer; 
    position: relative; flex-direction: column; 
    height: 100%; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    border-radius: 2.5rem; 
    background: #0b141a; 
    border: 1px solid var(--border-color);
    will-change: transform;
    transform: translateZ(0);
}
.property-card:hover { 
    transform: translateY(-4px); 
    box-shadow: var(--shadow-lg); 
    border-color: var(--brand-purple) !important; 
}
.property-card.critical { border-color: rgba(239, 68, 68, 0.3) !important; }
.property-card.incomplete { border-color: rgba(139, 92, 246, 0.3) !important; }
.property-card.active { border-color: rgba(16, 185, 129, 0.3) !important; }

.card-carousel { 
    height: 220px; 
    background-color: #000; 
    position: relative; overflow: hidden; 
}
.carousel-img { 
    width: 100%; height: 100%; object-fit: cover; 
    position: absolute; top:0; left:0; 
    opacity: 0; transition: opacity 0.5s ease; 
}
.carousel-img.active { opacity: 1; z-index: 1; }
.placeholder-img { 
    display: flex; align-items: center; justify-content: center; 
    color: var(--text-muted); font-size: 13px; font-weight: 500; 
    background: #111; 
}

.mini-nav { 
    position: absolute; top: 50%; transform: translateY(-50%); 
    background: rgba(0,0,0,0.5); color: white; border: none; 
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer; 
    z-index: 10; display: flex; align-items: center; justify-content: center; 
    font-size: 14px; opacity: 0; transition: all 0.2s; backdrop-filter: blur(8px); 
}
.mini-nav:hover { background: rgba(0,0,0,0.8); transform: translateY(-50%) scale(1.1); }
.property-card:hover .mini-nav { opacity: 1; }
.mini-nav.prev { left: 12px; } .mini-nav.next { right: 12px; }

.badge-missing, .badge-warn, .badge-ok { 
    position: absolute; top: 12px; right: 12px; 
    color: white; font-size: 11px; font-weight: 700; 
    padding: 6px 12px; border-radius: var(--radius-full); 
    letter-spacing: 0.5px; z-index: 5; text-transform: uppercase;
    backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow-sm);
}
.badge-missing { background: rgba(239, 68, 68, 0.85); } 
.badge-warn { background: rgba(139, 92, 246, 0.85); } 
.badge-ok { background: rgba(0, 230, 118, 0.85); color: #000; }

.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.card-type { 
    font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; 
    color: var(--text-muted); font-weight: 700; margin-bottom: 0; 
}
.card-title-dash { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 18px; color: var(--text-main); font-weight: 600; line-height: 1.3; }
.card-price { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 8px; }

.card-stats-grid { 
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; 
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05); 
    padding: 16px 0; margin: 8px 0;
}
.card-stats-grid span { 
    font-size: 14px; color: var(--text-dark); display: flex; flex-direction: column; 
    align-items: center; gap: 4px; font-weight: 500;
}
.card-stats-grid i { color: var(--brand-purple); font-size: 16px; margin-bottom: 4px; }
.card-address { font-size: 14px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: auto; font-weight: 400; display: flex; align-items: center; gap: 8px;}

/* ==========================================
   OVERLAY DE BLOQUEIO DE IMPORTAÇÃO
========================================== */
.import-locked-overlay {
    position: absolute; inset: 0; z-index: 50; border-radius: 2rem;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(4px);
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px;
}

/* ==========================================
   PÁGINA DO IMÓVEL (PÚBLICO E PRIVADO)
========================================== */
.topbar { 
    position: sticky; top: 0; z-index: 100; 
    background: rgba(5, 5, 5, 0.85); 
    backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); 
    border-bottom: 1px solid var(--border-color); padding: 16px 0; margin-bottom: -1px; 
}

.back-link {
    color: var(--text-main); text-decoration: none; font-size: 14px; font-weight: 600;
    display: flex; align-items: center; gap: 8px; transition: all 0.2s;
    background: rgba(255,255,255,0.05); padding: 8px 16px; 
    border-radius: var(--radius-full); border: 1px solid var(--border-color);
}
.back-link:hover { background: rgba(255,255,255,0.1); transform: translateX(-4px); }

.btn-delete-icon {
    background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); 
    color: var(--danger); font-size: 16px; cursor: pointer; transition: all 0.2s;
    width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.btn-delete-icon:hover { background: var(--danger); color: white; transform: scale(1.05); }

.hero { 
    position: relative; height: 50vh; min-height: 400px; max-height: 600px; 
    background-size: cover; background-position: center; margin-bottom: 40px; 
    border-radius: 0 0 3rem 3rem; 
    overflow: hidden; 
    box-shadow: 0 24px 50px -12px rgba(0,0,0,0.5); 
}
.hero .overlay { 
    position: absolute; inset: 0; 
    background: linear-gradient(180deg, rgba(5,5,5,0.1) 0%, rgba(5,5,5,0.8) 60%, rgba(5,5,5,1) 100%); 
}
.hero-content { 
    position: absolute; bottom: 0; left: 0; width: 100%; 
    padding: 0 40px 60px 40px; max-width: 1100px; margin: 0 auto; right: 0;
}
.hero-title { 
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(36px, 6vw, 64px); 
    font-weight: 800; margin: 0 0 16px 0; line-height: 1.1; 
    color: white; text-shadow: 0 4px 24px rgba(0,0,0,0.5); 
    letter-spacing: -0.02em;
}
.hero-price { 
    display: inline-flex; align-items: center;
    background: rgba(225, 48, 108, 0.1);
    border: 1px solid rgba(225, 48, 108, 0.3);
    backdrop-filter: blur(16px);
    color: #f27da5; font-weight: 800; font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem; padding: 12px 24px; border-radius: var(--radius-full);
    margin-bottom: 24px; box-shadow: var(--shadow-glow-brand); 
}

/* Grid de Mídias */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.media-card { 
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; 
    padding: 24px 20px; border-radius: var(--radius-lg); text-decoration: none; color: white; 
    border: 1px solid var(--border-color); background: #121212; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; text-align: left; 
}
.media-card:hover { background: var(--bg-card-hover); border-color: var(--brand-purple); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.media-card.disabled { opacity: 0.5; cursor: not-allowed; } .media-card.disabled:hover { transform: none; box-shadow: none; border-color: var(--border-color); }
.media-card .icon { font-size: 32px; color: var(--text-dark); margin-bottom: 8px;}
.media-text strong { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.media-text span { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* Adornos por tipo */
.media-photo { border-bottom: 3px solid var(--brand-purple); }
.media-video { border-bottom: 3px solid var(--danger); }
.media-pdf { border-bottom: 3px solid var(--brand-blue); }
.media-tour { border-bottom: 3px solid var(--brand-green); }


/* Grid de Detalhes */
.overview-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.ov-item { 
    background: #121212; border: 1px solid var(--border-color); 
    border-radius: var(--radius-lg); padding: 24px 20px; text-align: center; 
    display: flex; flex-direction: column; justify-content: center;
}
.ov-item span { display: block; color: var(--text-muted); font-size: 12px; text-transform: uppercase; margin-bottom: 8px; font-weight: 700; letter-spacing: 1px;}
.ov-item strong { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 20px; color: #fff; font-weight: 700;}

/* Edição Imóvel */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.label { color: var(--text-dark); font-size: 12px; text-transform: uppercase; font-weight: 700; display: block; margin-bottom: 8px; letter-spacing: 1px; }
.edit-input { 
    background: #050505 !important; 
    border: 1px solid #333 !important; 
    color: white !important; padding: 14px 16px !important; 
    border-radius: var(--radius-md) !important; width: 100%; 
    font-size: 15px; font-family: 'Plus Jakarta Sans', sans-serif; text-align: center; transition: all 0.3s; 
}
.edit-input:focus { border-color: var(--brand-pink) !important; box-shadow: 0 0 0 2px rgba(225, 48, 108, 0.2);}
.edit-input.full { text-align: left; }
.edit-wrapper { display: flex; align-items: center; gap: 8px; }

.transparent-title-edit { 
    background: transparent !important; border: none !important; 
    border-bottom: 1px dashed rgba(255,255,255,0.3) !important; 
    color: white !important; font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(32px, 5vw, 48px) !important; font-weight: 800; 
    width: 100%; margin-bottom: 16px; resize: none; overflow: hidden; 
    padding: 0 !important; line-height: 1.1; border-radius: 0 !important;
}
.transparent-title-edit:focus { border-bottom-style: solid !important; border-color: var(--brand-pink) !important; }

.edit-price-wrapper { 
    display: flex; align-items: center; 
    background: rgba(225, 48, 108, 0.1);
    border: 1px solid rgba(225, 48, 108, 0.3);
    border-radius: var(--radius-full); padding: 8px 24px; margin-bottom: 24px; width: fit-content;
    box-shadow: var(--shadow-glow-brand);
}
.edit-input-large { 
    background: transparent !important; border: none !important; 
    color: #f27da5 !important; font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800; font-size: 2rem; width: 220px; outline: none; padding: 0 !important;
}

/* Checklists (Características) */
.checklist { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); padding: 0; list-style: none; margin: 0; }
.checklist li { 
    background: #121212; border: 1px solid var(--border-color); 
    padding: 14px 16px; border-radius: var(--radius-md); 
    font-size: 14px; font-weight: 600; color: var(--text-main); 
    display: flex; align-items: center; gap: 12px; transition: all 0.2s; 
}
.checklist li:hover { background: var(--bg-card-hover); border-color: var(--brand-green); transform: translateX(2px); }
.tag-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px;}
.tag { 
    background: rgba(255,255,255,0.05); padding: 6px 16px; border-radius: var(--radius-full); 
    font-size: 13px; font-weight: 600; color: var(--text-main); border: 1px solid rgba(255,255,255,0.1);
}

.missing-field { border: 1px solid var(--warning) !important; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2) !important; }

/* ==========================================
   MODAIS, SEARCH E FIXER
========================================== */
.modal { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.9) !important; backdrop-filter: blur(8px); }
.modal-panel { 
    position: relative; background: #121212; border: 1px solid #333; 
    border-radius: 24px; width: 90%; max-width: 600px; padding: 40px; 
    box-shadow: 0 0 40px rgba(225, 48, 108, 0.15); z-index: 2001; 
}
.btn-close { 
    position: absolute; top: 16px; right: 16px; 
    background: rgba(255,255,255,0.05); border: none; color: var(--text-muted); 
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer; 
    display: flex; align-items: center; justify-content: center; transition: all 0.2s; 
}
.btn-close:hover { background: var(--danger-bg); color: var(--danger); transform: rotate(90deg); }

/* Search Modal */
.modal-search-content { max-width: 800px; padding: 30px; display: flex; flex-direction: column; gap: 20px; max-height: 90vh; }
.search-header { display: flex; gap: 12px; margin-top: 10px; }
.search-input-main { 
    flex: 1; padding: 16px 20px; border-radius: var(--radius-md); 
    border: 1px solid #333; background: #050505; 
    color: white; font-size: 16px; transition: 0.3s;
}
.search-input-main:focus { border-color: var(--brand-pink); box-shadow: 0 0 0 2px rgba(225, 48, 108, 0.2); outline: none; }
.filters-toggle-btn { 
    background: #121212; border: 1px solid #333; color: var(--text-dark); 
    padding: 0 20px; border-radius: var(--radius-md); cursor: pointer; transition: 0.2s; 
}
.filters-toggle-btn:hover { background: var(--bg-card-hover); color: white; border-color: var(--brand-pink); }
.btn-search-go { background: var(--brand-gradient); color: white; border: none; padding: 0 30px; border-radius: var(--radius-md); font-weight: 800; text-transform: uppercase; cursor: pointer; transition: 0.2s; }
.btn-search-go:hover { filter: brightness(1.1); box-shadow: var(--shadow-glow-brand); }

.filters-panel { display: none; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; padding: 24px; background: #050505; border: 1px solid #333; border-radius: var(--radius-md); }
.filters-panel.show { display: grid; }
.filters-panel label { color: var(--text-muted); font-size: 11px; font-weight: 700; margin-bottom: 6px; display: block; text-transform: uppercase; letter-spacing: 1px;}
.filters-panel select, .filters-panel input { width: 100%; background: #121212; border: 1px solid #333; color: white; padding: 10px; border-radius: 8px;}

.search-results-area { flex: 1; overflow-y: auto; min-height: 400px; display: flex; flex-direction: column; gap: 12px; padding-right: 8px; }
.search-item { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 20px; background: #121212; border-radius: var(--radius-md); cursor: pointer; border: 1px solid #333; 
    transition: 0.3s;
}
.search-item:hover { background: var(--bg-card-hover); border-color: var(--brand-purple); transform: translateX(4px); box-shadow: var(--shadow-glow-purple); }
.si-ident { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 700; color: white; display: block; margin-bottom: 4px; }
.si-desc { font-size: 13px; color: var(--text-muted); }
.si-price { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 18px; font-weight: 800; color: #f27da5; }

/* Fixer Modal */
.fixer-panel { text-align: center; max-width: 480px !important; padding: 50px 40px !important; }
.fixer-step h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 28px; color: white; margin-bottom: 12px; font-weight: 800; }
.step-indicator { font-size: 11px; text-transform: uppercase; color: var(--brand-purple); font-weight: 800; margin-bottom: 30px; letter-spacing: 1px;}
.fixer-input-group { margin: 40px 0; display: flex; justify-content: center; gap: 12px; align-items: center; flex-wrap: wrap; }
.fix-select, .fix-text { background: #050505; color: white; border: 1px solid #333; padding: 16px; border-radius: var(--radius-md); font-size: 16px; outline: none; width: 100%; transition: 0.3s;}
.fix-select:focus, .fix-text:focus { border-color: var(--brand-pink); box-shadow: 0 0 0 2px rgba(225, 48, 108, 0.2); }
.fix-number { background: transparent; border: none; border-bottom: 2px solid var(--brand-pink); color: white; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 40px; font-weight: 800; text-align: center; width: 160px; outline: none; transition: 0.3s;}
.fix-number:focus { border-bottom-color: var(--brand-purple); }
.fixer-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; margin-top: 40px; }
.btn-skip { background: transparent; border: 1px solid #333; color: var(--text-muted); border-radius: var(--radius-md); cursor: pointer; padding: 14px; font-weight: 600; text-transform: uppercase; transition: 0.2s;}
.btn-skip:hover { background: #121212; color: white; border-color: var(--brand-purple); }

/* TOAST NOTIFICATION */
.toast { 
    position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%) translateY(20px); 
    background: var(--brand-green); color: black; font-weight: 800; font-family: 'Plus Jakarta Sans', sans-serif;
    padding: 14px 32px; border-radius: var(--radius-full); box-shadow: var(--shadow-glow-green); 
    z-index: 9999; opacity: 0; transition: opacity 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); 
    pointer-events: none; text-transform: uppercase; letter-spacing: 1px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Conversas inspiradas no Direct */
.direct-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.direct-heading h3 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.direct-heading p { font-size: 13px; }
.direct-eyebrow { display: block; color: #f394b7; font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }
.direct-heading-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--brand-gradient); color: #fff; font-size: 22px; flex-shrink: 0; }
.direct-notice { color: #e5c58c; background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.2); border-radius: 14px; padding: 12px 16px; font-size: 12px; line-height: 1.6; }
.direct-layout { height: calc(100vh - 250px); min-height: 520px; border-radius: 24px; overflow: hidden; border: 1px solid #262626; background: #000; box-shadow: var(--shadow-xl); }
.direct-sidebar { background: #000; border-right: 1px solid #262626; }
.direct-sidebar-header, .direct-chat-header { background: #000; border-bottom: 1px solid #262626; }
.direct-chat-header { z-index: 10; }
.direct-section-title { color: #fff; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.direct-header-icon { color: #f394b7; font-size: 17px; }
.direct-search { font-size: 13px !important; padding-left: 38px !important; border-radius: 12px !important; border-color: #262626 !important; background: #262626 !important; }
.direct-chat { background: #000; }
.direct-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(45deg, var(--brand-yellow), var(--brand-pink), var(--brand-purple)); padding: 2px; flex-shrink: 0; }
.direct-avatar-list { width: 46px; height: 46px; }
.direct-contact { width: 100%; border: 0; text-align: left; color: inherit; background: transparent; cursor: pointer; transition: background 0.2s; }
.direct-contact:hover, .direct-contact.active { background: #1a1a1a; }
.direct-contact:focus-visible { outline: 2px solid #f394b7; outline-offset: -3px; }
.direct-empty-icon { width: 72px; height: 72px; display: grid; place-items: center; border: 2px solid #f5f5f5; border-radius: 50%; color: #f5f5f5; font-size: 29px; }
.direct-composer-disabled { display: flex; align-items: center; gap: 12px; margin: 12px 16px 16px; padding: 13px 16px; border: 1px solid #363636; border-radius: 999px; color: #a8a8a8; font-size: 12px; }
.direct-composer-disabled span { flex: 1; }
.direct-message-bubble { max-width: min(75%, 420px); border-radius: 20px; padding: 10px 14px; color: #fff; font-size: 13.5px; overflow-wrap: anywhere; }
.direct-message-sent { background: var(--brand-gradient); border-bottom-right-radius: 6px; }
.direct-message-received { background: #262626; border-bottom-left-radius: 6px; }

/* Conversas / Base de Conhecimento */
.chat-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 85%;
    font-size: 14px;
    position: relative;
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
}
.chat-bubble-received {
    background: #202c33;
    color: white;
    border-top-left-radius: 0;
    align-self: flex-start;
    border-left: 4px solid var(--brand-purple);
}
.chat-bubble-sent {
    background: #005c4b;
    color: white;
    border-top-right-radius: 0;
    align-self: flex-end;
}
.chat-bubble-sent .delete-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    opacity: 1;
    transition: 0.2s;
    border: 1px solid rgba(255,255,255,0.2);
}
.chat-bubble-sent .delete-btn:hover {
    transform: scale(1.15);
    background: #dc2626;
}

/* MOBILE RESPONSIVO GERAL */
@media (max-width: 1024px) {
    .main-wrapper { margin-left: 240px; padding: 30px; }
    .sidebar-unified { width: 240px; }
}

@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    
    .sidebar-unified { 
        width: 100vw; /* Garante que não passa da tela */
        height: auto; 
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center;
        padding: 8px 4px; /* Reduzimos as margens laterais */
        position: fixed; 
        bottom: 0; 
        left: 0; 
        top: auto; 
        border-right: none; 
        border-top: 1px solid var(--border-color); 
        background: rgba(5, 5, 5, 0.95); /* Um pouco mais escuro pro mobile */
        backdrop-filter: var(--glass-blur); 
        -webkit-backdrop-filter: var(--glass-blur); 
        z-index: 999; 
        padding-bottom: env(safe-area-inset-bottom, 12px); /* Respeita a barra do iPhone */
        box-sizing: border-box;
    }
    
    .brand-logo { display: none !important; }
    
    .nav-link-custom { 
        flex: 1; /* Força cada item a ocupar exatos 20% */
        display: flex;
        flex-direction: column; 
        align-items: center; 
        justify-content: center;
        gap: 3px; 
        padding: 6px 2px; 
        margin-bottom: 0; 
        border-radius: var(--radius-md); 
        text-align: center;
        min-width: 0; /* Essencial para o flex shrink funcionar */
    }

    .nav-link-custom i {
        font-size: 19px; /* Tamanho padronizado pros ícones */
        margin: 0;
        width: auto;
    }
    
    .nav-link-custom span {
        font-size: 9.5px; /* Tamanho de Tab Bar nativa */
        white-space: nowrap; /* Não deixa a palavra quebrar a linha */
        overflow: hidden;
        text-overflow: ellipsis; /* Coloca "..." se a tela for minúscula */
        max-width: 100%;
        display: block;
        font-weight: 600;
        text-transform: capitalize;
    }
    
    .nav-link-custom.active { 
        box-shadow: none; 
        background: rgba(225, 48, 108, 0.1);
    }

    .main-wrapper { margin-left: 0; padding: 20px; margin-bottom: 90px; }
    .dashboard-grid { grid-template-columns: 1fr; gap: 20px; }
    .search-header { flex-direction: column; }
    .btn-search-go { padding: 16px; }
    .hero { height: 40vh; border-radius: 0 0 24px 24px; margin-bottom: 30px; }
    .hero-content { padding: 0 20px 40px 20px; }
    .view-section { padding-bottom: 80px; }
    .transparent-title-edit { font-size: 28px !important; }
    
    .title-gestao { 
        font-size: 2.2rem !important; 
        display: flex; 
        flex-direction: column; 
        align-items: flex-start; 
        line-height: 1.1; 
    }
    .title-gestao span { margin-left: 0 !important; }

    .import-input-group {
        flex-direction: column;
        gap: 12px;
    }
    .import-input-group .form-control {
        border-radius: var(--radius-md) !important;
        width: 100%;
    }
    .import-input-group .btn-brand, 
    .import-input-group .btn-outline-brand {
        border-radius: var(--radius-md) !important;
        width: 100%;
        margin-left: 0 !important;
    }
    .thermo-container {
        min-width: 0 !important; 
        width: 100%;
        padding: 10px !important;
    }
    .thermo-header {
        font-size: 9px;
        flex-direction: column; 
        align-items: flex-start;
        gap: 4px;
    }
}
