/* ==========================================================================
   BLACK SCAN - DESIGN MINIMALISTA (PRETO E CINZA / PRO DARK / MONOCHROME)
   ========================================================================== */

:root {
    --bg-main: #09090b;
    --bg-panel: #141417;
    --bg-panel-hover: #1c1c21;
    --bg-card: #18181b;
    --border-subtle: #27272a;
    --border-medium: #3f3f46;
    --border-strong: #52525b;
    
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --accent-white: #ffffff;
    --status-active: #10b981;
    --status-warning: #f59e0b;
    --status-danger: #ef4444;
    
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* PANÉIS DE VIDRO PRETO/CINZA (MINIMALISTA) */
.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* NAVBAR MINIMALISTA */
.navbar {
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(9, 9, 11, 0.9);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: #18181b;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--accent-white);
    display: block;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    background: #18181b;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.green { background-color: var(--status-active); }
.status-dot.red { background-color: var(--status-danger); }

/* CONTEÚDO PRINCIPAL */
.main-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 36px 24px 80px;
}

.hero-header {
    margin-bottom: 32px;
}

.hero-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-white);
    margin-bottom: 8px;
}

.hero-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 720px;
}

/* INPUT SECTION */
.input-card {
    padding: 28px;
    margin-bottom: 32px;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #09090b;
    border: 1px solid var(--border-medium);
    border-radius: 10px;
    padding: 6px;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: var(--accent-white);
}

.input-icon {
    color: var(--text-muted);
    margin-left: 14px;
}

#target-url-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    padding: 10px 8px;
    outline: none;
}

#target-url-input::placeholder {
    color: var(--text-muted);
}

/* BOTÕES MINIMALISTAS */
.btn-primary {
    background: var(--accent-white);
    color: #09090b;
    border: 1px solid var(--accent-white);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #e4e4e7;
}

.btn-secondary {
    background: #18181b;
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #27272a;
    border-color: var(--border-strong);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.audio-live-toggle {
    background: #18181b;
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.audio-live-toggle.active {
    background: #27272a;
    border-color: #ffffff;
    color: #ffffff;
}

/* CHIPS / EXEMPLOS RÁPIDOS */
.quick-examples {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.quick-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.chip {
    background: #18181b;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chip:hover {
    background: #27272a;
    color: var(--text-primary);
}

/* DASHBOARD TOPBAR */
.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 16px;
}

.active-target-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--status-active);
}

.target-badge {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.target-badge strong {
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.dashboard-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* CAIXA DE EXPLICAÇÃO / LINK DO FILHO */
.dual-tab-explanation {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: #121215;
    border: 1px solid var(--border-medium);
    border-radius: 12px;
}

.expl-icon {
    color: var(--text-primary);
    padding-top: 2px;
}

.expl-text {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.expl-text strong {
    color: var(--text-primary);
}

#gateway-link-box {
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: #ffffff;
    background: #09090b;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-medium);
    word-break: break-all;
}

/* TERMÔMETRO DE RISCO */
.risk-thermometer-card {
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.thermometer-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.thermometer-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.current-risk-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.badge-low { background: #27272a; color: #f4f4f5; border: 1px solid #3f3f46; }
.badge-medium { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid #f59e0b; }
.badge-high { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid #ef4444; }
.badge-critical { background: #ef4444; color: #ffffff; }

.thermometer-bar-wrapper {
    flex: 1;
    min-width: 260px;
}

.thermometer-bar {
    height: 8px;
    background: #27272a;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.thermometer-fill {
    height: 100%;
    background: #ffffff;
    transition: width 0.4s ease;
}

.thermometer-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.thermometer-stats {
    display: flex;
    gap: 20px;
}

.t-stat {
    text-align: center;
}

.t-stat .val {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.t-stat .lbl {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* SENSORS GRID (3 COLUMNS) */
.sensors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 1050px) {
    .sensors-grid {
        grid-template-columns: 1fr;
    }
}

.sensor-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sensor-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #18181b;
}

.sensor-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.sensor-icon {
    color: var(--text-secondary);
}

.sensor-state {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: #27272a;
    color: var(--text-secondary);
}

.sensor-state.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--status-active);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.sensor-body {
    height: 240px;
    position: relative;
    background: #09090b;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* VÍDEO & FOTO CONTAINER */
#live-video-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

#remote-snapshot-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 5;
    display: none;
}

.video-overlay {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* AUDIO WAVEFORM & METER */
.audio-container {
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
}

#audio-waveform-canvas {
    width: 100%;
    height: 140px;
    background: #09090b;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}

.decibel-meter {
    width: 100%;
    margin-top: 12px;
}

.db-bar-bg {
    height: 6px;
    background: #27272a;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.db-bar-fill {
    height: 100%;
    background: #ffffff;
    transition: width 0.15s ease;
}

.db-value-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.db-value-text strong {
    color: var(--text-primary);
    font-family: var(--font-mono);
}

/* MAPA LEAFLET INTERATIVO */
.geo-container {
    padding: 0;
}

#geo-map-box {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.sensor-footer {
    padding: 14px 18px;
    border-top: 1px solid var(--border-subtle);
    background: #18181b;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.82rem;
}

.sensor-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-key {
    color: var(--text-muted);
}

.metric-val {
    font-family: var(--font-mono);
    color: var(--text-primary);
    font-weight: 600;
}

.metric-actions {
    margin-top: 6px;
    display: flex;
    justify-content: flex-end;
}

/* TABELA DE LOGS */
.logs-card {
    padding: 24px;
}

.logs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.logs-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.logs-filters {
    display: flex;
    gap: 8px;
}

.log-filter-btn {
    background: #18181b;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.log-filter-btn.active, .log-filter-btn:hover {
    background: #27272a;
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.logs-table-wrapper {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.logs-table th {
    background: #18181b;
    color: var(--text-muted);
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    border-bottom: 1px solid var(--border-subtle);
}

.logs-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.logs-table tr:hover {
    background: #1c1c21;
}

.log-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: var(--font-mono);
    display: inline-block;
}

.tag-audio { background: #27272a; color: #ffffff; }
.tag-video { background: #27272a; color: #a1a1aa; }
.tag-geo { background: #27272a; color: #e4e4e7; }
.tag-system { background: #27272a; color: #71717a; }

/* MODAIS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal-overlay.hidden {
    display: none;
}

.modal-card {
    width: 100%;
    max-width: 580px;
    padding: 32px;
    background: var(--bg-panel);
}

.modal-icon-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.warning-icon-wrapper {
    color: var(--accent-white);
}

.modal-icon-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

.modal-body {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.risk-info-box {
    margin: 16px 0;
    padding: 16px;
    background: #18181b;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
}

.category-badge {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.risk-list {
    margin-top: 12px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.risk-list li {
    display: flex;
    flex-direction: column;
}

.risk-list li strong {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-ghost:hover {
    background: #27272a;
    color: var(--text-primary);
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   NOVO LAYOUT DE SIDEBAR & GLOW LISINHO (V2.0 MINIMALISTA PRO)
   ========================================================================== */

/* EFEITO GLOW LISINHO NOS PANÉIS */
.glass-panel, .sensor-card {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.02);
}

.glass-panel:hover, .sensor-card:hover {
    border-color: var(--border-medium);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 255, 255, 0.05);
}

.sensor-card.active-glow {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.12), inset 0 0 15px rgba(16, 185, 129, 0.04);
}

/* ESTRUTURA PRINCIPAL DO APP COM SIDEBAR ESTILO SHADCN */
.app-layout {
    display: flex;
    min-height: calc(100vh - 69px);
    position: relative;
    overflow-x: hidden;
}

/* SIDEBAR LATERAL COM ANIMAÇÃO COLLAPSE (SHADCN STYLE) */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #0a0a0d 0%, #060608 100%);
    border-right: 1px solid rgba(16, 185, 129, 0.15);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 90;
    position: sticky;
    top: 0;
    height: calc(100vh - 69px);
    overflow-y: auto;
    box-shadow: 6px 0 30px rgba(0, 0, 0, 0.8);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
}

.sidebar.collapsed {
    width: 76px;
    padding: 24px 10px;
}

.sidebar-top-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* CABEÇALHO DA ORGANIZAÇÃO (LUXURY GLASS HEADER) */
.sidebar-org-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(20, 20, 26, 0.85) 0%, rgba(13, 13, 18, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    min-height: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.org-brand-box {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .org-brand-box {
    display: none;
}

.org-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #000000;
    font-weight: 800;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.org-info {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}

.org-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.org-role {
    font-size: 0.72rem;
    color: #10b981;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.sidebar-collapse-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sidebar-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.sidebar.collapsed .sidebar-org-header {
    justify-content: center;
    background: transparent;
    border-color: transparent;
    padding: 4px;
    box-shadow: none;
}

/* NAVEGAÇÃO DA SIDEBAR */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #94a3b8;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-btn {
    justify-content: center;
    padding: 14px 0;
}

.sidebar.collapsed .sidebar-btn .btn-text {
    display: none;
}

.sidebar-btn svg {
    flex-shrink: 0;
    color: #64748b;
    transition: all 0.25s ease;
}

.sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
}

.sidebar.collapsed .sidebar-btn:hover {
    transform: none;
}

.sidebar-btn:hover svg {
    color: #ffffff;
}

.sidebar-btn.active {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.02) 100%);
    color: #ffffff;
    border-color: rgba(16, 185, 129, 0.3);
    border-left: 4px solid #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

.sidebar-btn.active svg {
    color: #10b981;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.8));
}

/* BOTÃO DE DESTAQUE: + NOVA CONSULTA NA SIDEBAR */
.sidebar-btn.btn-sidebar-new {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.08) 100%);
    border: 1px dashed rgba(16, 185, 129, 0.5);
    color: #10b981;
    margin-bottom: 8px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
}

.sidebar-btn.btn-sidebar-new:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #000000 !important;
    border-style: solid;
    border-color: #10b981;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
}

.sidebar-btn.btn-sidebar-new:hover svg {
    color: #000000 !important;
    transform: rotate(90deg);
}

/* RODAPÉ E RELÓGIO DA SIDEBAR */
.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.live-clock-widget {
    background: #141417;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.sidebar.collapsed .live-clock-widget {
    display: none;
}

.clock-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.clock-time {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-white);
    text-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.sidebar-badge-info {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    padding: 10px 12px;
    background: #121215;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar.collapsed .sidebar-badge-info .badge-text {
    display: none;
}

.sidebar.collapsed .sidebar-badge-info {
    justify-content: center;
    padding: 10px 0;
}

/* CARD DO LINK GERADO COM DOMÍNIO ALVO */
.generated-link-card {
    padding: 28px;
    border-color: rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #121516 0%, #161a1b 100%);
    box-shadow: 0 0 35px rgba(16, 185, 129, 0.12);
}

.generated-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.generated-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-white);
}

.generated-badge {
    background: rgba(16, 185, 129, 0.15);
    color: var(--status-active);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.generated-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.generated-link-box {
    display: flex;
    gap: 12px;
    align-items: center;
}

.generated-link-box input {
    flex: 1;
    background: #09090b;
    border: 1px solid var(--border-medium);
    border-radius: 10px;
    padding: 14px 18px;
    color: var(--status-active);
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    outline: none;
}

/* ÁREA CENTRAL PRINCIPAL */
.main-wrapper {
    flex: 1;
    padding: 32px 40px;
    overflow-y: auto;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.tab-section {
    display: none;
    animation: fadeInTab 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tab-section.active-tab {
    display: block;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   BANNER PRINCIPAL DA ABA DE CONFIGURAÇÃO (BLACK SCAN)
   ========================================================================== */
.dashboard-banner-wrapper {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #3f3f46;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.05);
    margin-bottom: 28px;
    background: #09090b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-banner-img {
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   GALERIA DE ÚLTIMAS FOTOS SALVAS (CRAVADAS)
   ========================================================================== */
.photos-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.photo-item-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.photo-item-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-medium);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 0 20px rgba(255,255,255,0.05);
}

.photo-thumb-wrapper {
    width: 100%;
    height: 200px;
    position: relative;
    background: #09090b;
    border-bottom: 1px solid var(--border-subtle);
    overflow: hidden;
}

.photo-thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.photo-item-card:hover .photo-thumb-wrapper img {
    transform: scale(1.04);
}

.photo-info {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
}

.photo-time-badge {
    font-family: var(--font-mono);
    color: var(--accent-white);
    background: #27272a;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
}

/* DESTAQUE PRINCIPAL DA FOTO */
.featured-photo-card {
    margin-bottom: 32px;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
}

.featured-img-box {
    width: 100%;
    max-height: 360px;
    background: #09090b;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-img-box img {
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
}

/* ==========================================================================
   RESPONSIVIDADE E OTIMIZAÇÃO PARA CELULAR (@MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 900px) {
    .app-layout {
        flex-direction: column;
        padding-bottom: 76px;
    }

    .sidebar {
        width: 100%;
        height: 72px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        flex-direction: row;
        border-right: none;
        border-top: 1px solid var(--border-subtle);
        background: rgba(13, 13, 15, 0.95);
        backdrop-filter: blur(16px);
        padding: 8px 12px;
        z-index: 999;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.7);
    }

    .sidebar-heading, .sidebar-org-header, .sidebar-footer {
        display: none !important;
    }

    .sidebar-nav {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        gap: 4px;
    }

    .sidebar-btn {
        flex-direction: column;
        gap: 4px;
        padding: 6px 4px;
        font-size: 0.68rem;
        justify-content: center;
        align-items: center;
        flex: 1;
        border-radius: 8px;
        text-align: center;
    }

    .sidebar-btn svg {
        width: 18px;
        height: 18px;
    }

    .sidebar-btn span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 65px;
    }

    .main-wrapper {
        padding: 16px;
    }

    .sensors-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .featured-photo-card {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }

    .nav-container {
        padding: 12px 16px;
    }

    .brand-title {
        font-size: 1rem;
    }

    .dashboard-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .dashboard-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .dashboard-actions button {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .hero-header h1 {
        font-size: 1.6rem;
    }

    .dashboard-banner-img {
        max-height: 150px;
    }
    .dashboard-banner-wrapper {
        margin-bottom: 20px;
        border-radius: 10px;
    }
}

/* MELHORIAS VISUAIS PARA OS CARDS DO MONITORAMENTO (FOTO MAIOR E GPS MAIOR) */
.sensor-body.video-container, .sensor-body.geo-container {
    min-height: 440px !important;
}
#geo-map-box {
    height: 440px !important;
    width: 100%;
    border-radius: 0 0 12px 12px;
}
#remote-snapshot-img {
    max-height: 420px !important;
    width: auto;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* ESTILOS DA GRADE DE GALERIA REFORMULADA E SEUS CARDS */
.photos-grid-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin-top: 16px;
}
.photo-item-card {
    background: #09090b;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.photo-item-card:hover {
    transform: translateY(-5px);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.15);
}
.photo-item-img-box {
    height: 240px;
    background: #040406;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.photo-item-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.photo-item-card:hover .photo-item-img-box img {
    transform: scale(1.05);
}
.photo-item-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255,255,255,0.01);
}
.photo-item-time {
    font-size: 0.82rem;
    font-family: var(--font-mono);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.photo-item-actions {
    display: flex;
    gap: 8px;
}
.photo-item-actions button {
    flex: 1;
    padding: 8px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-photo-expand {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
}
.btn-photo-expand:hover {
    background: rgba(255,255,255,0.12);
}
.btn-photo-download {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10b981;
}
.btn-photo-download:hover {
    background: #10b981;
    color: #000;
}
.btn-photo-delete {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: #ff4757;
    flex: 0 0 auto !important;
    padding: 8px 12px !important;
}
.btn-photo-delete:hover {
    background: #ff4757;
    color: #fff;
}

/* EFEITO GLOW PARA O CRONÔMETRO DE EXPIRAÇÃO */
#profile-countdown-timer {
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

/* ==========================================================================
   MOBILE RESPONSIVENESS — EXCLUSIVO PARA DISPOSITIVOS MÓVEIS
   Todas as regras abaixo são condicionadas por breakpoints e NÃO afetam
   o layout Desktop (>900px) em hipótese alguma.
   ========================================================================== */

/* --------------------------------------------------------------------------
   BREAKPOINT PRINCIPAL: ≤ 900px — Ajustes gerais para tablets e celulares
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    /* ANTI-OVERFLOW GLOBAL */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* NAVBAR: Compactar e eliminar overflow */
    .nav-container {
        padding: 10px 14px;
        gap: 8px;
    }

    .brand-subtitle {
        display: none;
    }

    .system-status {
        gap: 8px;
    }

    /* Ocultar o relógio da navbar no mobile (fica na sidebar/bottom) */
    .live-clock-top {
        display: none !important;
    }

    /* Badge "Radar Online" fica menor */
    .badge {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    /* Botão Sair: só ícone no mobile pequeno */
    #btn-lock-key span {
        display: none;
    }

    /* APP LAYOUT */
    .app-layout {
        flex-direction: row;
        padding-bottom: 0;
        overflow-x: hidden;
    }

    /* SIDEBAR → DRAWER FIXO */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 999;
        border-right: 1px solid rgba(16, 185, 129, 0.15);
        background: linear-gradient(180deg, #0a0a0d 0%, #060608 100%);
        padding: 24px 16px;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-heading,
    .sidebar-org-header,
    .sidebar-footer {
        display: flex !important;
    }
    
    .sidebar-top-section {
        width: 100%;
        gap: 24px;
    }

    .sidebar-nav {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .sidebar-btn {
        flex-direction: row;
        gap: 14px;
        padding: 13px 16px;
        font-size: 0.92rem;
        justify-content: flex-start;
        align-items: center;
        height: auto;
        border-radius: 12px;
        text-align: left;
    }

    .sidebar-btn svg {
        width: 18px;
        height: 18px;
    }

    .sidebar-btn .btn-text {
        font-size: 0.92rem;
        max-width: none;
        display: inline !important;
        white-space: nowrap;
    }

    .sidebar-btn.active {
        border-bottom: none;
        border-left: 4px solid #10b981 !important;
    }
    
    #mobile-menu-btn {
        display: block !important;
    }

    /* MAIN WRAPPER */
    .main-wrapper {
        padding: 14px 12px 30px 12px;
        overflow-x: hidden;
        max-width: 100vw;
        margin: 0;
        width: 100%;
    }

    /* HERO HEADER */
    .hero-header {
        margin-bottom: 20px;
    }

    .hero-header h1 {
        font-size: 1.35rem;
        line-height: 1.3;
        word-break: break-word;
    }

    .hero-desc {
        font-size: 0.88rem;
    }

    /* BANNER */
    .dashboard-banner-wrapper {
        margin-bottom: 16px;
        border-radius: 10px;
    }

    .dashboard-banner-img {
        max-height: 120px;
        object-fit: cover;
    }

    /* INPUT CARD */
    .input-card {
        padding: 18px 16px;
    }

    /* INPUT WRAPPER: empilhar verticalmente no mobile */
    .input-wrapper {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        gap: 8px;
    }

    .input-icon {
        display: none;
    }

    #target-url-input {
        width: 100%;
        font-size: 16px !important; /* Previne auto-zoom no iOS */
        padding: 12px 10px;
    }

    #btn-inspect {
        width: 100% !important;
        justify-content: center;
        padding: 14px !important;
        font-size: 0.9rem !important;
    }

    /* CHIPS DE EXEMPLO */
    .quick-examples {
        gap: 8px;
        margin-top: 14px;
    }

    .chip {
        font-size: 0.78rem;
        padding: 6px 10px;
    }

    /* GUIA DE PASSOS */
    .step-guide-card {
        padding: 16px !important;
    }

    .steps-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* CARD DO LINK GERADO */
    .generated-link-card {
        padding: 16px !important;
        margin-top: 20px !important;
    }

    .generated-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .generated-title {
        font-size: 0.95rem !important;
    }

    /* Link + Botão Copiar: empilhar verticalamente */
    .generated-link-box {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .generated-link-box input {
        width: 100%;
        font-size: 0.8rem !important;
        padding: 12px 12px !important;
        word-break: break-all;
    }

    #btn-copy-short-url {
        width: 100% !important;
        justify-content: center !important;
        padding: 14px !important;
    }

    /* Botão "Abrir Painel" */
    .generated-actions {
        flex-direction: column !important;
        gap: 10px !important;
    }

    #btn-go-to-dashboard {
        width: 100%;
        justify-content: center !important;
        text-align: center;
        padding: 12px !important;
        font-size: 0.85rem !important;
    }

    /* DASHBOARD TOPBAR */
    .dashboard-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px;
    }

    .active-target-info {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .live-indicator {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Botões do dashboard: grade 2x2 */
    .dashboard-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .dashboard-actions button {
        flex: none;
        width: 100%;
        justify-content: center;
        font-size: 0.8rem;
        padding: 10px 8px;
    }

    /* DUAL TAB EXPLANATION */
    .dual-tab-explanation {
        flex-direction: column;
        gap: 10px;
        padding: 14px;
    }

    #gateway-link-box {
        font-size: 0.78rem !important;
        word-break: break-all;
    }

    /* SENSORS GRID: forçar 1 coluna no mobile */
    .sensors-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    /* SENSOR CARDS: altura menor no mobile */
    .sensor-body.video-container,
    .sensor-body.geo-container {
        min-height: 260px !important;
    }

    #geo-map-box {
        height: 260px !important;
    }

    #remote-snapshot-img {
        max-height: 240px !important;
    }

    /* THERMOMETER CARD */
    .risk-thermometer-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .thermometer-bar-wrapper {
        min-width: unset !important;
        width: 100%;
    }

    .thermometer-stats {
        width: 100%;
        justify-content: space-around;
    }

    /* TABELA DE LOGS: scroll horizontal controlado */
    .logs-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }

    .logs-table {
        min-width: 560px;
    }

    .logs-card {
        padding: 16px;
    }

    .logs-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* GALERIA DE FOTOS */
    .photos-gallery-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .photos-grid-gallery {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }

    .photo-item-img-box {
        height: 160px !important;
    }

    .photo-item-info {
        padding: 10px 12px;
        gap: 8px;
    }

    .photo-item-actions {
        flex-wrap: wrap;
    }

    .photo-item-actions button {
        font-size: 0.72rem !important;
        padding: 6px 8px !important;
    }

    /* FEATURED PHOTO CARD */
    .featured-photo-card {
        grid-template-columns: 1fr !important;
        gap: 16px;
        padding: 16px;
    }

    /* HISTORICO DE CONSULTAS */
    .saved-consultations-card {
        padding: 16px !important;
    }

    #account-key-badge {
        font-size: 0.75rem !important;
        padding: 5px 10px !important;
    }

    /* Cada card de sessão na lista */
    #saved-consultations-list > div {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    #saved-consultations-list > div > div:last-child {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }

    #saved-consultations-list > div > div:last-child button {
        width: 100%;
        justify-content: center;
    }

    /* PERFIL / LICENÇA */
    .profile-grid {
        grid-template-columns: 1fr !important;
    }

    #profile-countdown-timer {
        font-size: 1.4rem !important;
        letter-spacing: 1px !important;
    }

    /* MODAIS: ocupar tela toda no mobile */
    .modal-overlay {
        padding: 12px;
        align-items: flex-end;
    }

    .modal-card {
        max-width: 100% !important;
        width: 100%;
        padding: 20px 16px !important;
        border-radius: 16px 16px 8px 8px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-icon-header h2 {
        font-size: 1.05rem;
    }

    /* MODAL FOOTER: empilhar botões no mobile */
    .modal-footer {
        flex-direction: column;
        gap: 10px;
        margin-top: 18px;
    }

    .modal-footer button {
        width: 100%;
        justify-content: center;
    }

    /* LIGHTBOX: grid de detalhes */
    #modal-photo-lightbox .modal-card {
        max-width: 100% !important;
        padding: 16px !important;
    }

    #modal-photo-lightbox [style*="grid-template-columns: 1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    #modal-photo-lightbox [style*="min-height: 380px"] {
        min-height: 220px !important;
        max-height: 320px !important;
    }

    #modal-photo-lightbox [style*="justify-content: space-between"] {
        flex-direction: column !important;
        gap: 10px !important;
    }

    #modal-photo-lightbox .modal-footer button {
        font-size: 0.82rem;
        padding: 10px 16px;
    }

    /* SOBRESCRITA DE INLINE STYLES VIA ID (inline style tem precedência sobre classe) */
    #main-sensors-grid {
        grid-template-columns: 1fr !important;
    }

    #generated-link-row {
        flex-direction: column !important;
        gap: 10px !important;
    }

    #generated-link-row input {
        font-size: 16px !important; /* Previne auto-zoom no iOS */
        padding: 12px !important;
        word-break: break-all;
    }

    #generated-actions-row {
        flex-direction: column !important;
        justify-content: stretch !important;
        gap: 10px !important;
    }

    #generated-actions-row button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* RELATÓRIO MODAL */
    #modal-report .report-body {
        max-height: 220px !important;
        font-size: 0.78rem !important;
    }
}

/* --------------------------------------------------------------------------
   BREAKPOINT PEQUENO: ≤ 480px — Celulares compactos (SE, Mini, Android pequeno)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    /* NAVBAR: mínimo possível */
    .brand-title {
        font-size: 0.85rem !important;
    }

    .brand-icon {
        width: 30px;
        height: 30px;
    }

    .badge {
        display: none;
    }

    /* SIDEBAR MOBILE AJUSTES PEQUENOS */
    .sidebar {
        width: 250px;
        padding: 16px 12px;
    }

    .app-layout {
        padding-bottom: 0;
    }

    .main-wrapper {
        padding: 10px 10px 30px 10px;
    }

    /* HERO HEADER */
    .hero-header h1 {
        font-size: 1.15rem;
    }

    /* BANNER menor em telas muito pequenas */
    .dashboard-banner-img {
        max-height: 90px;
    }

    /* INPUT WRAPPER */
    #target-url-input {
        font-size: 16px !important;
    }

    /* BOTÕES DO DASHBOARD: forçar 1 coluna em SE */
    .dashboard-actions {
        grid-template-columns: 1fr;
    }

    /* GALERIA: 1 coluna em telas muito pequenas */
    .photos-grid-gallery {
        grid-template-columns: 1fr !important;
    }

    .photo-item-img-box {
        height: 200px !important;
    }

    /* CHIPS: compactar mais */
    .chip {
        font-size: 0.72rem;
        padding: 5px 8px;
    }

    /* SENSOR BODY */
    .sensor-body.video-container,
    .sensor-body.geo-container {
        min-height: 220px !important;
    }

    #geo-map-box {
        height: 220px !important;
    }

    /* PERFIL: countdown menor */
    #profile-countdown-timer {
        font-size: 1.1rem !important;
        letter-spacing: 0.5px !important;
    }

    /* INPUT CARD: padding mínimo */
    .input-card {
        padding: 14px 12px;
    }

    /* CONSULTAS SALVAS: compactar título */
    #saved-consultations-list [style*="font-size: 1.15rem"] {
        font-size: 0.95rem !important;
    }
}

/* --------------------------------------------------------------------------
   LANDSCAPE MOBILE: garantir que não quebre em tela deitada
   -------------------------------------------------------------------------- */
@media (max-width: 900px) and (orientation: landscape) {


    .app-layout {
        padding-bottom: 0;
    }

    .sensor-body.video-container,
    .sensor-body.geo-container {
        min-height: 200px !important;
    }

    #geo-map-box {
        height: 200px !important;
    }

    .dashboard-banner-img {
        max-height: 80px;
    }

    .modal-overlay {
        align-items: center;
    }

    .modal-card {
        max-height: 80vh;
        border-radius: 12px;
    }
}
