/* CSS for Remote Support App */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 10px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin: 10px 0 20px 0;
    font-size: 24px;
}

.hidden {
    display: none !important;
}

/* Login Section */
#login-section {
    text-align: center;
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

input[type="text"] {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    max-width: 300px;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    min-width: 120px;
}

button:hover {
    background-color: #0056b3;
}

button:active {
    transform: scale(0.98);
}

/* Status Bar */
.status-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 4px;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 120px;
    flex: 1;
    min-width: 100px;
}

.status-label {
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
}

.status-indicator {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    color: white;
    white-space: nowrap;
}

.status-indicator.connected {
    background-color: #28a745;
}

.status-indicator.disconnected {
    background-color: #dc3545;
}

/* Controls */
.controls {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.controls > button {
    width: 100%;
}

.interaction-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.interaction-buttons button {
    flex: 1;
    min-width: 120px;
}

.btn-success {
    background-color: #28a745;
}
.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
}
.btn-danger:hover {
    background-color: #c82333;
}

/* Terminal Log */
.terminal-window {
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', monospace;
    padding: 10px;
    overflow-y: auto;
    border-radius: 4px;
    height: 300px;
    margin-bottom: 10px;
    font-size: 13px;
}

.log-entry {
    margin-bottom: 4px;
    word-wrap: break-word;
}

.timestamp { color: #888; }
.rx-source { color: #569cd6; font-weight: bold; } /* Blue for RX (from BLE) */
.tx-source { color: #6a9955; font-weight: bold; } /* Green for TX (from Admin) */
.system-source { color: #dcdcaa; font-weight: bold; } /* Yellow for System */

/* Mobile Responsive Styles */
@media (max-width: 600px) {
    body {
        padding: 8px;
    }

    .container {
        padding: 12px;
        border-radius: 6px;
    }

    h1 {
        font-size: 20px;
        margin: 10px 0 15px 0;
    }

    #login-section {
        margin-top: 20px;
    }

    input[type="text"] {
        max-width: 100%;
        font-size: 16px;
    }

    button {
        padding: 12px 16px;
        font-size: 16px;
        min-width: 100px;
        width: 100%;
    }

    .status-bar {
        flex-direction: column;
        padding: 10px;
        gap: 10px;
    }

    .status-item {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        min-width: unset;
    }

    .status-label {
        font-size: 11px;
    }

    .status-indicator {
        font-size: 11px;
    }

    .interaction-buttons {
        gap: 8px;
    }

    .interaction-buttons button {
        min-width: 100px;
        flex: 1;
    }

    .terminal-window {
        height: 250px;
        font-size: 12px;
        padding: 8px;
    }
}

@media (max-width: 400px) {
    body {
        padding: 5px;
    }

    .container {
        padding: 10px;
        border-radius: 4px;
    }

    h1 {
        font-size: 18px;
        margin: 8px 0 12px 0;
    }

    button {
        padding: 10px 12px;
        font-size: 14px;
    }

    .status-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }

    .interaction-buttons {
        flex-direction: column;
    }

    .interaction-buttons button {
        width: 100%;
    }

    .terminal-window {
        height: 200px;
        font-size: 11px;
        padding: 6px;
    }
}
