/* --- BASE STYLES --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background-color: #f4f7f6; color: #333; }

/* --- LOGO SIZING --- */
.login-logo { max-width: 220px; height: auto; margin-bottom: 0.5rem; }
.sidebar-logo { max-width: 160px; height: auto; filter: brightness(0) invert(1); }

/* --- OVERLAYS & MODALS --- */
.overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: center; z-index: 1000; padding: 1rem; }
.overlay:not(.active) { display: none; }
.login-panel { background: white; padding: 3rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); max-width: 400px; width: 100%; text-align: center; }
.login-panel p { color: #666; margin-bottom: 2rem; font-size: 0.95rem; }
.input-group { margin-bottom: 1.2rem; text-align: left; }
.input-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: #444; font-size: 0.9rem; }
.input-group input:not([type="checkbox"]) { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; }
.input-group input:not([type="checkbox"]):focus { outline: none; border-color: #7b1fa2; box-shadow: 0 0 0 2px rgba(123, 31, 162, 0.15); }
.error-message { color: #d32f2f; font-size: 0.85rem; margin-bottom: 1rem; min-height: 1.2em; text-align: center; }
.btn-primary { width: 100%; padding: 12px; background-color: #7b1fa2; color: white; border: none; border-radius: 6px; font-size: 1rem; cursor: pointer; font-weight: bold; transition: background 0.2s; }
.btn-primary:hover { background-color: #4a148c; }
.btn-primary:disabled { background-color: #9e9e9e; cursor: not-allowed; }

/* --- AUTH TOGGLES & CHECKBOXES --- */
.checkbox-group { text-align: left; margin-bottom: 0.8rem; }
.checkbox-group label { font-size: 0.85rem; color: #444; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.checkbox-group input[type="checkbox"] { cursor: pointer; accent-color: #7b1fa2; width: 16px; height: 16px; }
.checkbox-group a { color: #7b1fa2; text-decoration: none; font-weight: 600; }
.checkbox-group a:hover { text-decoration: underline; }
.auth-links { margin-top: 1.5rem; font-size: 0.9rem; }
.auth-links a { color: #7b1fa2; text-decoration: none; font-weight: 600; transition: color 0.2s; }
.auth-links a:hover { color: #4a148c; text-decoration: underline; }
.auth-links .divider { margin: 0 10px; color: #cbd5e1; }

/* MQTT Modal Specifics */
.modal-panel { background: white; padding: 2rem; border-radius: 12px; max-width: 700px; width: 100%; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #f1f5f9; padding-bottom: 1rem; margin-bottom: 1rem; flex-shrink: 0; }
.modal-header h3 { color: #4a148c; font-size: 1.2rem; margin-right: 2rem;}
.modal-body { overflow-y: auto; flex: 1; padding-right: 5px; } 
.btn-close { background: transparent; border: none; font-size: 1.8rem; cursor: pointer; color: #64748b; position: absolute; right: 1.5rem; top: 1.5rem; }
.btn-close:hover { color: #d32f2f; }
.code-container { background: #1e293b; border-radius: 8px; padding: 1rem; overflow-x: auto; margin-top: 1rem; border: 1px solid #0f172a; position: relative; }
.code-container code { color: #a5b4fc; font-family: monospace; font-size: 0.9rem; white-space: pre; }
.btn-copy { position: absolute; top: 0.8rem; right: 0.8rem; background: #334155; color: #f8fafc; border: none; border-radius: 4px; padding: 5px 10px; font-size: 0.8rem; cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 6px; }
.btn-copy:hover { background: #475569; }
.btn-copy.copied { background: #16a34a; color: white; }

