.sidebar {
    width: 265px;
    background: #ffffff;
    padding: 20px;
    height: 100vh;

    position: fixed;
    left: 0;
    top: 0;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /*justify-content: space-between;*/

    /* sombra só à direita */
    box-shadow: 6px 0 12px rgba(0,0,0,0.12);
    z-index: 10;
    box-sizing: border-box;
}

.sidebar-controls {
    display: flex;
    flex-direction: column;
    /*gap: 12px;
    margin-top: 20px;*/
    margin-top: 12px;
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* sidebar footer -------------------------------------------------------- */
.sidebar-footer {
    margin-top: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-footer a {
    font-size: 13px;
    color: #ff7310;
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sidebar-footer a:hover {
    background: #ffefe2;
    color: #d85c00;
}

.footer-logo {
    max-width: 55%;
    margin: 0 auto 0px auto;
    opacity: 0.85;
}


/* Brand (Fox WebTool) -------------------------------------------------------- */

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

.brand-icon {
    font-size: 22px;
}

.brand-text {
    font-size: 22px;
    font-weight: 700;
    color: #ff7310;
}

.brand:hover .brand-text {
    text-decoration: underline;
}

.brand-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.version {
    font-size: 13px;
    color: #777;
}


/* Connect button -------------------------------------------------------- */
.connect-btn {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 8px 12px;
    border-radius: 10px;
    border: none;
    cursor: pointer;

    background: #eee;
    color: #555;
    font-size: 14px;

    transition: background 0.2s, color 0.2s;
}

.connect-btn .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #999;
}

.connect-btn.connected .dot {
    background: #2ecc71;   /* VERDE FIXO */
}

/* conectado */
.connect-btn.connected {
    background: #e8f5e9;
    color: #2e7d32;
}

.connect-btn.just-connected .dot {
    animation: blink-once 1s ease-out;
}

@keyframes blink-once {
    0%   { opacity: 0.2; }
    50%  { opacity: 1; }
    100% { opacity: 1; }
}

/* scan button -------------------------------------------------------- */
.scan-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: bold;

    background: #ff7310;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.scan-btn:disabled {
    background: #cccccc;
    color: #777;
    cursor: not-allowed;
}


/* scan progress bar -------------------------------------------------------- */
.progress-wrap {
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 6px;
    margin-top: 12px;
    overflow: hidden;
    display: none;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: #4caf50;
    transition: width 0.1s linear;
}

/* lista de dispositivos scaneados -------------------------------------------------------- */
.scan-results {
    margin-top: 16px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    display: none;
}

.scan-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
}

.scan-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Item */
.scan-item {
    padding: 8px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 13px;
}

.scan-item:hover {
    background: #ffefe2;
}